agentroam-runtime-darwin-arm64 0.2.0-preview.71 → 0.2.0-preview.72
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 +3 -2
- package/package.json +1 -1
- package/runtime/.next/BUILD_ID +1 -1
- package/runtime/.next/app-build-manifest.json +10 -10
- package/runtime/.next/app-path-routes-manifest.json +1 -1
- package/runtime/.next/build-manifest.json +5 -5
- 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 +1 -1
- 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 +4 -4
- 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/client-logs/route.js +1 -1
- package/runtime/.next/server/app/api/collaboration/route.js +11 -11
- package/runtime/.next/server/app/api/collaboration/route.js.nft.json +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 +3 -3
- 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/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 -0
- package/runtime/.next/server/app/api/messaging/route.js.nft.json +1 -0
- 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/push/vapid.body +1 -1
- package/runtime/.next/server/app/api/remote-tools/register/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]/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]/thread-goal/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 -0
- package/runtime/.next/server/app/api/sessions/parallel/route.js.nft.json +1 -0
- 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/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/web/page.js +13 -21
- package/runtime/.next/server/app/web/page_client-reference-manifest.js +1 -1
- package/runtime/.next/server/app-paths-manifest.json +39 -37
- package/runtime/.next/server/chunks/1614.js +1 -1
- package/runtime/.next/server/chunks/1973.js +1 -0
- package/runtime/.next/server/chunks/5303.js +2 -2
- package/runtime/.next/server/chunks/6977.js +1 -1
- package/runtime/.next/server/chunks/732.js +1 -1
- package/runtime/.next/server/chunks/7519.js +3 -3
- 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/50-0b6604ece6278dc2.js +1 -0
- package/runtime/.next/static/chunks/app/web/{error-6470e38a145095eb.js → error-36b287ca40eab041.js} +1 -1
- package/runtime/.next/static/chunks/app/web/layout-62386960d8601cc2.js +1 -0
- package/runtime/.next/static/chunks/app/web/page-6b37d8153e607928.js +1 -0
- package/runtime/.next/static/chunks/{main-0de4062ff39c4193.js → main-94a733696db11b91.js} +1 -1
- package/runtime/.next/static/chunks/{main-app-41078426602904fd.js → main-app-07b9ccbb642d9b9d.js} +1 -1
- package/runtime/.next/static/css/50f255aa50ec70d1.css +1 -0
- package/runtime/lib/browser-live/viewer-frame-flow.mjs +10 -2
- package/runtime/lib/browser-live/viewer-video-flow.mjs +11 -0
- package/runtime/lib/remote-control/application/compound-video-session.mjs +383 -0
- package/runtime/lib/remote-control/application/paced-video-sender.mjs +261 -0
- package/runtime/lib/remote-control/application/remote-hover-dispatch.mjs +26 -0
- package/runtime/lib/remote-control/application/remote-video-session.mjs +232 -37
- package/runtime/lib/remote-control/helper-manager.mjs +5 -1
- package/runtime/lib/remote-control/infrastructure/compound-compression.mjs +20 -0
- package/runtime/lib/remote-control/infrastructure/native-compound-video.mjs +44 -0
- package/runtime/lib/remote-control/infrastructure/native-video-encoder.mjs +62 -8
- package/runtime/lib/remote-control/infrastructure/werift-video-feedback.mjs +98 -0
- package/runtime/lib/remote-control/infrastructure/werift-video-recovery.mjs +108 -0
- package/runtime/lib/remote-control/infrastructure/werift-video-transport.mjs +310 -24
- package/runtime/lib/remote-control/remote-authorization.mjs +55 -12
- package/runtime/lib/remote-control/remote-video-signal.mjs +25 -1
- package/runtime/lib/remote-control/webrtc-video.mjs +3 -1
- package/runtime/lib/remote-control/windows-helper.mjs +11 -2
- 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/native/Support.noindex/WeComSendBridge.app/Contents/Info.plist +13 -0
- package/runtime/native/Support.noindex/WeComSendBridge.app/Contents/MacOS/NativeAXBridge +0 -0
- package/runtime/native/Support.noindex/WeComSendBridge.app/Contents/Resources/agentroam-component.json +4 -0
- package/runtime/native/Support.noindex/WeComSendBridge.app/Contents/_CodeSignature/CodeResources +128 -0
- package/runtime/node_modules/.package-lock.json +26 -20
- package/runtime/node_modules/@agent/core/dist/index.js +2775 -154
- package/runtime/node_modules/@agent/messaging/dist/assets/wecom/NativeAXBridge.swift +240 -0
- package/runtime/node_modules/@agent/messaging/dist/assets/wecom/codec.py +133 -0
- package/runtime/node_modules/@agent/messaging/dist/assets/wecom/native_sender.py +445 -0
- package/runtime/node_modules/@agent/messaging/dist/assets/wecom/reader.py +309 -0
- package/runtime/node_modules/@agent/messaging/dist/index.js +1219 -0
- package/runtime/node_modules/@agent/messaging/package.json +7 -0
- package/runtime/node_modules/@agent/native-runtime/dist/index.js +6299 -808
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/bridge.mjs +88 -82
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/browser-sdk.js +61 -61
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-8zdh6hy9.mjs +45 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-b5da77cd.mjs +34 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-f2yzhw4m.mjs +18 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-j29a9c1a.mjs +17 -0
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core.mjs +11 -11
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.json +33 -25
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/manifest.zst.json +37 -29
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/package.json +14 -14
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/sdk.mjs +84 -81
- package/runtime/node_modules/caniuse-lite/data/agents.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/browserVersions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/aac.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/accelerometer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ambient-light.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/apng.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/array-find-index.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/array-find.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/array-flat.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/array-includes.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/asmjs.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/async-functions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/atob-btoa.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/audio-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/audio.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/audiotracks.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/autofocus.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/auxclick.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/av1.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/avif.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/background-attachment.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/background-sync.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/battery-status.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/beacon.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/bigint.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/bloburls.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/border-image.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/border-radius.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/brotli.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/calc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/canvas-text.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/canvas.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ch-unit.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/classlist.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/clipboard.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/colr-v1.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/colr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/console-basic.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/console-time.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/const.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/contenteditable.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/cors.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/credential-management.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/cross-document-view-transitions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/cryptography.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-all.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-animation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-any-link.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-appearance.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-autofill.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-canvas.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-cascade-scope.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-color-function.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-container-queries-style.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-container-query-units.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-containment.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-counters.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-element-function.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-env-function.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-exclusions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-filter-function.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-filters.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-first-line.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-fixed.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-gradients.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-grid-animation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-grid-lanes.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-grid.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-has.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-if.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-image-set.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-masks.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-media-scripting.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-module-scripts.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-nesting.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-opacity.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-overflow.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-page-break.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-reflections.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-regions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-relative-colors.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-resize.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-sel2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-sel3.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-selection.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-shapes.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-sticky.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-table.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-box-trim.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-textshadow.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-transitions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-variables.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-when-else.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css-zoom.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-attr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-colors.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/currentcolor.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/custom-elements.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/customevent.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/customizable-select.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/datalist.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dataset.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/datauri.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/decorators.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/details.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dialog.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dnssec.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/do-not-track.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/document-policy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/documenthead.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dom-range.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/domcontentloaded.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dommatrix.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/download.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/dragndrop.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/element-closest.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/element-from-point.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/eme.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/eot.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es5.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6-class.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6-generators.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6-module.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6-number.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/es6.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/eventsource.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/feature-policy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/fetch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/fileapi.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/filereader.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/filereadersync.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/filesystem.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/flac.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/flexbox.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/flow-root.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-feature.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-kerning.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-loading.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-smooth.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/fontface.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/form-attribute.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/form-validation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/forms.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/fullscreen.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/gamepad.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/geolocation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/gyroscope.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/hashchange.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/heif.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/hevc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/hidden.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/history.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/html5semantic.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/http2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/http3.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/imagecapture.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ime.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/import-maps.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/imports.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/indexeddb.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/inline-block.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/innertext.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-color.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-datetime.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-event.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-minlength.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-number.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-pattern.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-range.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-search.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/input-selection.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/internationalization.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/jpegxl.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/jpegxr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/json.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/lazyload.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/let.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/loading-lazy-media.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/localecompare.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/magnetometer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/matchesselector.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/matchmedia.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mathml.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/maxlength.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/media-fragments.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mediasource.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/menu.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/meter.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/midi.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mp3.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mpeg-dash.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mpeg4.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/multicolumn.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mutation-events.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/nav-timing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/netinfo.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/notifications.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/object-entries.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/object-fit.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/object-observe.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/object-values.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/objectrtc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/offline-apps.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ogv.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/online-status.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/opus.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/outline.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/page-transition-events.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/passkeys.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/passwordrules.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/path2d.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/payment-request.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/permissions-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/picture.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ping.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/png-alpha.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/pointer-events.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/pointer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/pointerlock.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/portals.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/progress.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/promise-finally.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/promises.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/proximity.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/proxy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/push-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/queryselector.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/rellist.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/rem.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/resource-timing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ruby.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/run-in.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/script-async.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/script-defer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/sdch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/selection-api.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/server-timing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/setimmediate.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/shadowdom.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/sni.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/spdy.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/sql-storage.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/srcset.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/stream.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/streams.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/style-scoped.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/subresource-bundling.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-css.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-filters.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-html.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-html5.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-img.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg-smil.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/svg.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/sxg.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/template-literals.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/template.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/temporal.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/testfeat.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/text-decoration.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/text-overflow.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/text-stroke.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/textcontent.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/textencoder.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/tls1-1.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/tls1-2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/tls1-3.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/touch.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/transforms2d.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/transforms3d.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/trusted-types.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/ttf.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/typedarrays.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/u2f.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/url.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/use-strict.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/user-select-none.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/user-timing.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/vector-effect.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/vibration.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/video.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/videotracks.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/view-transitions.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/viewport-units.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wai-aria.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wake-lock.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-bigint.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-bulk-memory.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-extended-const.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-gc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-multi-memory.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-multi-value.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-mutable-globals.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-nontrapping-fptoint.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-reference-types.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-relaxed-simd.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-signext.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-simd.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-tail-calls.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm-threads.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wasm.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wav.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wbr-element.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/web-animation.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/web-serial.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/web-share.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webauthn.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webcodecs.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webgl.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webgl2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webgpu.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webhid.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webm.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webnfc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webp.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/websockets.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webtransport.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webusb.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webvr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webvtt.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webworkers.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/webxr.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/will-change.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/woff.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/woff2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/word-break.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/wordwrap.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/xhr2.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/xhtml.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/features/zstd.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AX.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/AZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BB.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BJ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/BZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CV.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CX.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/CZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/DE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/DJ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/DK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/DM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/DO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/DZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/EC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/EE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/EG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ER.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ES.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ET.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/FI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/FJ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/FK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/FM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/FO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/FR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GB.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GP.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GQ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/GY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/HK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/HN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/HR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/HT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/HU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ID.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IQ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/IT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/JE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/JM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/JO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/JP.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KP.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/KZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LB.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LV.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/LY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ME.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ML.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MP.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MQ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MV.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MX.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/MZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NP.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/NZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/OM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/PY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/QA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/RE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/RO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/RS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/RU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/RW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SB.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SK.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ST.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SV.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/SZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TD.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TH.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TJ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TL.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TO.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TR.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TV.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/TZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/UA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/UG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/US.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/UY.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/UZ.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VC.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VG.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VI.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VN.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/VU.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/WF.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/WS.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/YE.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/YT.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ZA.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ZM.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/ZW.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-af.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-an.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-as.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-eu.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-na.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-oc.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-sa.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/regions/alt-ww.js +1 -1
- package/runtime/node_modules/caniuse-lite/data/versionGroups.js +1 -1
- package/runtime/node_modules/caniuse-lite/package.json +1 -1
- package/runtime/node_modules/mediabunny/README.md +1 -5
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.cjs +312 -260
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.cjs +12 -12
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.min.mjs +12 -12
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.mjs +312 -260
- package/runtime/node_modules/mediabunny/dist/bundles/mediabunny.node.cjs +312 -260
- package/runtime/node_modules/mediabunny/dist/modules/src/aes.js +53 -40
- package/runtime/node_modules/mediabunny/dist/modules/src/conversion.js +38 -10
- package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-boxes.js +3 -2
- package/runtime/node_modules/mediabunny/dist/modules/src/isobmff/isobmff-demuxer.js +78 -78
- package/runtime/node_modules/mediabunny/dist/modules/src/matroska/matroska-demuxer.js +109 -110
- package/runtime/node_modules/mediabunny/dist/modules/src/media-source.js +23 -11
- package/runtime/node_modules/mediabunny/dist/modules/src/muxer.js +41 -22
- 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 +14 -6
- package/runtime/node_modules/mediabunny/src/aes.ts +52 -39
- package/runtime/node_modules/mediabunny/src/conversion.ts +49 -10
- package/runtime/node_modules/mediabunny/src/isobmff/isobmff-boxes.ts +3 -1
- package/runtime/node_modules/mediabunny/src/isobmff/isobmff-demuxer.ts +88 -96
- package/runtime/node_modules/mediabunny/src/matroska/matroska-demuxer.ts +137 -146
- package/runtime/node_modules/mediabunny/src/media-source.ts +24 -9
- package/runtime/node_modules/mediabunny/src/muxer.ts +52 -33
- package/runtime/node_modules/mediabunny/src/version.ts +1 -1
- package/runtime/node_modules/ws/README.md +2 -3
- package/runtime/node_modules/ws/lib/receiver.js +8 -0
- package/runtime/node_modules/ws/lib/websocket.js +20 -6
- package/runtime/node_modules/ws/package.json +1 -1
- package/runtime/node_modules/zstd-codec/index.js +4 -0
- package/runtime/node_modules/zstd-codec/lib/constants.js +2 -0
- package/runtime/node_modules/zstd-codec/lib/helpers.js +60 -0
- package/runtime/node_modules/zstd-codec/lib/module.js +27 -0
- package/runtime/node_modules/zstd-codec/lib/zstd-codec-binding-wasm.js +21 -0
- package/runtime/node_modules/zstd-codec/lib/zstd-codec-binding.js +63 -0
- package/runtime/node_modules/zstd-codec/lib/zstd-codec.js +363 -0
- package/runtime/node_modules/zstd-codec/lib/zstd-stream.js +116 -0
- package/runtime/node_modules/zstd-codec/package.json +29 -0
- package/runtime/package-lock.json +52 -45
- package/runtime/package.json +1 -0
- package/runtime/server.js +1 -1
- package/runtime/webapp/dist/assets/AiHubPane-DBuhzcId.js +1 -0
- package/runtime/webapp/dist/assets/App-CrZstnCH.css +1 -0
- package/runtime/webapp/dist/assets/App-D3-qxUjs.js +187 -0
- package/runtime/webapp/dist/assets/BrowserLivePanel-BywwOAML.js +76 -0
- package/runtime/webapp/dist/assets/CollaborationDashboard-DQeiZyu9.js +1 -0
- package/runtime/webapp/dist/assets/CollaborationPage-CGymkv8f.js +16 -0
- package/runtime/webapp/dist/assets/{FilePreview-BjbfWw2s.js → FilePreview-CkY_jNql.js} +5 -5
- package/runtime/webapp/dist/assets/FileTree-W85iiqhO.js +11 -0
- package/runtime/webapp/dist/assets/FlowStudioPane-Ccp0FhYn.js +5 -0
- package/runtime/webapp/dist/assets/MessagingBridge-D_cArR8-.js +6 -0
- package/runtime/webapp/dist/assets/MessagingPage-BIgDwGgU.js +7 -0
- package/runtime/webapp/dist/assets/MessagingPage-CpRafjqY.css +1 -0
- package/runtime/webapp/dist/assets/RemoteDesktopPage-Di31a6s4.js +1 -0
- package/runtime/webapp/dist/assets/{smartphone-D7oS3YTz.js → RunningSessionsIcon-BbgfV3Y9.js} +8 -18
- package/runtime/webapp/dist/assets/SessionDashboard-D3n4eFut.css +1 -0
- package/runtime/webapp/dist/assets/SessionDashboard-a7HETCwZ.js +16 -0
- package/runtime/webapp/dist/assets/{SessionDashboardBridge-DYsMZhuH.js → SessionDashboardBridge-DEUcW6SI.js} +1 -1
- package/runtime/webapp/dist/assets/{TerminalPane-CPOiBcye.js → TerminalPane-BLqkE0Sr.js} +2 -2
- package/runtime/webapp/dist/assets/{abnfDiagram-VCTEODGH-DCFFqJUU.js → abnfDiagram-VCTEODGH-DeYUTKWn.js} +1 -1
- package/runtime/webapp/dist/assets/arc-Fb_TLw7m.js +1 -0
- package/runtime/webapp/dist/assets/{architectureDiagram-5GKGNRK7-DoK3A_n1.js → architectureDiagram-5GKGNRK7-CuFeRT7v.js} +1 -1
- package/runtime/webapp/dist/assets/arrow-left-ChO37N0V.js +6 -0
- package/runtime/webapp/dist/assets/{arrow-right-B0uCZ1Pd.js → arrow-right-CBoNjLZc.js} +1 -1
- package/runtime/webapp/dist/assets/{artifact-links-nzx7joYs.js → artifact-links-DPEFlv87.js} +1 -1
- package/runtime/webapp/dist/assets/{blockDiagram-I7D4REHJ-DgXszyX7.js → blockDiagram-I7D4REHJ-CSQFiZW1.js} +1 -1
- package/runtime/webapp/dist/assets/{c4Diagram-7LVT6UL2-q7KO4v1Q.js → c4Diagram-7LVT6UL2-Dp0yNsZN.js} +1 -1
- package/runtime/webapp/dist/assets/channel-CcOPsanj.js +1 -0
- package/runtime/webapp/dist/assets/chevron-down-DqV6YJGE.js +6 -0
- package/runtime/webapp/dist/assets/{chunk-2Q5K7J3B-CH8lOKmL.js → chunk-2Q5K7J3B-HGRodfIv.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-5VM5RSS4-DwP7xEWd.js → chunk-5VM5RSS4-CBrQNVFD.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-F27PBJKO-BV3TTaxI.js → chunk-F27PBJKO-DB6uGYpD.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-IMKFNOWR-BbaiG4yG.js → chunk-IMKFNOWR-Dedjjkdt.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-JWPE2WC7-Dv9x27hI.js → chunk-JWPE2WC7-CFqPSTPh.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-POPQ4Y6H-Uk-GiSLP.js → chunk-POPQ4Y6H-3acvfPpy.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-SVP7TREG-lFcKEwyL.js → chunk-SVP7TREG-Bn9tMxLG.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-TICWLB2K-DFZALWPC.js → chunk-TICWLB2K-BjPHa9Ep.js} +1 -1
- package/runtime/webapp/dist/assets/{chunk-XXDRQBXY-8jLPZkMb.js → chunk-XXDRQBXY-pSIpAtkj.js} +1 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-De9Vn3qI.js +1 -0
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-De9Vn3qI.js +1 -0
- package/runtime/webapp/dist/assets/clipboard-BvwmdR4z.js +1 -0
- package/runtime/webapp/dist/assets/{codeSyntax-Dgv0FfoZ.js → codeSyntax-Bs__ElW1.js} +3 -3
- package/runtime/webapp/dist/assets/collaboration-DkVTQ-wS.css +1 -0
- package/runtime/webapp/dist/assets/{collaboration-f29NaKWy.js → collaboration-xcnZxf7i.js} +2 -2
- package/runtime/webapp/dist/assets/copilot-7BoBRmFo.png +0 -0
- package/runtime/webapp/dist/assets/{cose-bilkent-JH36ORCC-86P-lxD4.js → cose-bilkent-JH36ORCC-Cc1ea8TO.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefin-OW5HDTMX-mtRVdchl.js → cynefin-OW5HDTMX-B2IeHhVa.js} +1 -1
- package/runtime/webapp/dist/assets/{cynefinDiagram-5FMLGOSQ-DhqAIoq6.js → cynefinDiagram-5FMLGOSQ-BeZhQnWx.js} +1 -1
- package/runtime/webapp/dist/assets/{dagre-GXQ25YYZ-DD9olCTy.js → dagre-GXQ25YYZ-DF08UpVJ.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-S7CK7UJ4-CLGKipLp.js → diagram-S7CK7UJ4-Cx_tPRJp.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-UQ7AKVKN-Dm7uGpUO.js → diagram-UQ7AKVKN-Cb6fFvJt.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VSXAHHWV-OZYfwAth.js → diagram-VSXAHHWV-CvuweBru.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-VX7I27RA-BpQqNFxQ.js → diagram-VX7I27RA-BYouVdoe.js} +1 -1
- package/runtime/webapp/dist/assets/{diagram-Z3DM3KII-BrWsMYCU.js → diagram-Z3DM3KII-DRBjsxYw.js} +1 -1
- package/runtime/webapp/dist/assets/{ebnfDiagram-PWID7BFC-BRH-K-J7.js → ebnfDiagram-PWID7BFC-CxHOPzwg.js} +1 -1
- package/runtime/webapp/dist/assets/{erDiagram-RLTQ6QDP-BDNSVr6H.js → erDiagram-RLTQ6QDP-tUK9K8ZD.js} +1 -1
- package/runtime/webapp/dist/assets/external-link-DpecT7Vm.js +6 -0
- package/runtime/webapp/dist/assets/{file-types-XHMBkbNr.js → file-types-CfFmgvNi.js} +4 -9
- package/runtime/webapp/dist/assets/{flowDiagram-HODETNUW-DseLK02Y.js → flowDiagram-HODETNUW-BFd8shzR.js} +1 -1
- package/runtime/webapp/dist/assets/{ganttDiagram-EL5Y4UJY-v_uNZx1g.js → ganttDiagram-EL5Y4UJY-Dt3qJ3nR.js} +1 -1
- package/runtime/webapp/dist/assets/{gitGraphDiagram-WWUBYQGX-EdvVYEMk.js → gitGraphDiagram-WWUBYQGX-L22kw422.js} +1 -1
- package/runtime/webapp/dist/assets/image-plus-Bzr6FXFm.js +6 -0
- package/runtime/webapp/dist/assets/index-C165MF0E.js +489 -0
- package/runtime/webapp/dist/assets/index-IYQjHlQx.css +1 -0
- package/runtime/webapp/dist/assets/{infoDiagram-27XIBGKW-Ck26xp1i.js → infoDiagram-27XIBGKW-DBrWW4hh.js} +1 -1
- package/runtime/webapp/dist/assets/{ishikawaDiagram-5VMMS53U-DGnOVObq.js → ishikawaDiagram-5VMMS53U-BiQERurn.js} +1 -1
- package/runtime/webapp/dist/assets/{journeyDiagram-3NMN7TZE-S7oKAQs8.js → journeyDiagram-3NMN7TZE-CbuOAsvy.js} +1 -1
- package/runtime/webapp/dist/assets/{kanban-definition-UXKFOSKX-DcrYA4VY.js → kanban-definition-UXKFOSKX-BS0cpYtD.js} +1 -1
- package/runtime/webapp/dist/assets/{layout-CYHINS_I.js → layout-C6lzLyIZ.js} +1 -1
- package/runtime/webapp/dist/assets/{linear-B-lEfto_.js → linear-DOnDPVCl.js} +1 -1
- package/runtime/webapp/dist/assets/{loader-circle-DMWQZenY.js → loader-circle-DzxGeGeP.js} +1 -1
- package/runtime/webapp/dist/assets/{mermaid.core-B3fzlEw9.js → mermaid.core-CIbk74HW.js} +6 -6
- package/runtime/webapp/dist/assets/{mindmap-definition-YA3MSWOX-wJkCh55V.js → mindmap-definition-YA3MSWOX-BXA3aIva.js} +1 -1
- package/runtime/webapp/dist/assets/page-oP1ftgSe.js +91 -0
- package/runtime/webapp/dist/assets/{pegDiagram-XKGWAZYB-H4uk2OUO.js → pegDiagram-XKGWAZYB-oUTq5zGX.js} +1 -1
- package/runtime/webapp/dist/assets/{pieDiagram-E7YTZNPT-yLnU_MCb.js → pieDiagram-E7YTZNPT-CES_HFyS.js} +1 -1
- package/runtime/webapp/dist/assets/{quadrantDiagram-AXDQQJYC-DyD93O4P.js → quadrantDiagram-AXDQQJYC-BDJl9Tah.js} +1 -1
- package/runtime/webapp/dist/assets/{railroadDiagram-O6MQD6OU-DZ833xbw.js → railroadDiagram-O6MQD6OU-BCu1VCKA.js} +1 -1
- package/runtime/webapp/dist/assets/{requirementDiagram-BXWQKSXE-DJV4nGui.js → requirementDiagram-BXWQKSXE-CqUIqsRU.js} +1 -1
- package/runtime/webapp/dist/assets/{rotate-ccw-CKqo62Ra.js → rotate-ccw-Bjr9jTxM.js} +1 -1
- package/runtime/webapp/dist/assets/{rotate-cw-D-M3ZDSa.js → rotate-cw-A1YTnj9Q.js} +1 -1
- package/runtime/webapp/dist/assets/{sankeyDiagram-P5KCCOFB-BeOYMFTR.js → sankeyDiagram-P5KCCOFB-DaveIjpG.js} +1 -1
- package/runtime/webapp/dist/assets/search-rB9Vl5Kd.js +6 -0
- package/runtime/webapp/dist/assets/{send-LvtpJMkk.js → send-BEl9srBG.js} +1 -1
- package/runtime/webapp/dist/assets/{sequenceDiagram-WJ2MYXX4-BBcgqG33.js → sequenceDiagram-WJ2MYXX4-C7zRgFw8.js} +1 -1
- package/runtime/webapp/dist/assets/{shield-check-SeEkz1Nd.js → shield-check-C79GaqpX.js} +1 -1
- package/runtime/webapp/dist/assets/{sizeCapture-INFHLROL-B0GJZjw0.js → sizeCapture-INFHLROL-BKOrYnP1.js} +1 -1
- package/runtime/webapp/dist/assets/{stateDiagram-D77RDMKH-BmSvB3vd.js → stateDiagram-D77RDMKH-Cz_WH93D.js} +1 -1
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-Dw9aybAU.js +1 -0
- package/runtime/webapp/dist/assets/{swimlanes-42K2YHIH-BAZdMUD6.js → swimlanes-42K2YHIH-CbDMTwgn.js} +1 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-CZrm7vi4.js +8 -0
- package/runtime/webapp/dist/assets/{timeline-definition-24CTP7MA-BSgVFMNG.js → timeline-definition-24CTP7MA-CanMvfCK.js} +1 -1
- package/runtime/webapp/dist/assets/{trash-2-CHYPyYDY.js → trash-2-RnFgAyKW.js} +5 -10
- package/runtime/webapp/dist/assets/types-DguAd3Ud.js +6 -0
- package/runtime/webapp/dist/assets/use-error-notice-CAYVDT8Z.css +1 -0
- package/runtime/webapp/dist/assets/use-error-notice-_MLy2aPZ.js +11 -0
- package/runtime/webapp/dist/assets/{vennDiagram-4TSXK5OY-C-brvbkB.js → vennDiagram-4TSXK5OY-CR-V0-y3.js} +1 -1
- package/runtime/webapp/dist/assets/{wardleyDiagram-VM6X3IG4-CeqqVR1s.js → wardleyDiagram-VM6X3IG4-CjTtvx6s.js} +1 -1
- package/runtime/webapp/dist/assets/{web-aLPH3xFw.js → web-DPag1EjS.js} +1 -1
- package/runtime/webapp/dist/assets/{web-Dzd7NW_F.js → web-DedGjdA8.js} +1 -1
- package/runtime/webapp/dist/assets/x-Bx8qOEL4.js +6 -0
- package/runtime/webapp/dist/assets/{xychartDiagram-S5SC5T6Z-mPizwpXM.js → xychartDiagram-S5SC5T6Z-D2959gYR.js} +1 -1
- package/runtime/webapp/dist/index.html +2 -2
- package/runtime/ws-server.mjs +19 -5
- package/runtime/.next/static/chunks/113-b9b8fc001b7cd590.js +0 -1
- package/runtime/.next/static/chunks/app/web/layout-ecfb758d244808a4.js +0 -1
- package/runtime/.next/static/chunks/app/web/page-27145471bd2171c2.js +0 -1
- package/runtime/.next/static/css/afa521adcec25f87.css +0 -1
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-07pvccxf.mjs +0 -43
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-0rjxgk9e.mjs +0 -18
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-fpeb751h.mjs +0 -33
- package/runtime/node_modules/@anthropic-ai/claude-agent-sdk/core-jf0rbr11.mjs +0 -17
- package/runtime/webapp/dist/assets/AiHubPane-Cp_tNJNR.js +0 -6
- package/runtime/webapp/dist/assets/App-Cs8U1u-X.js +0 -175
- package/runtime/webapp/dist/assets/App-QWoPBMW0.css +0 -1
- package/runtime/webapp/dist/assets/BrowserLivePanel-B1zYRS_7.js +0 -76
- package/runtime/webapp/dist/assets/CollaborationDashboard-DIVa26zk.js +0 -1
- package/runtime/webapp/dist/assets/CollaborationPage-Fsvkw8ZM.js +0 -16
- package/runtime/webapp/dist/assets/FileTree-C6gg9p4m.js +0 -11
- package/runtime/webapp/dist/assets/FlowStudioPane-CCuxZBVJ.js +0 -5
- package/runtime/webapp/dist/assets/RemoteDesktopPage-DpoYuKhA.js +0 -1
- package/runtime/webapp/dist/assets/SessionDashboard-CAoW5-uN.css +0 -1
- package/runtime/webapp/dist/assets/SessionDashboard-DOWjUIY1.js +0 -26
- package/runtime/webapp/dist/assets/arc-vjNW9DYV.js +0 -1
- package/runtime/webapp/dist/assets/channel-CsnhvX8S.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-ZZMXUADV-Bed40USf.js +0 -1
- package/runtime/webapp/dist/assets/classDiagram-v2-VYDZK3BY-Bed40USf.js +0 -1
- package/runtime/webapp/dist/assets/clipboard-BteN9-AC.js +0 -6
- package/runtime/webapp/dist/assets/collaboration-BiaML8jX.css +0 -1
- package/runtime/webapp/dist/assets/crown-y1qmM0NZ.js +0 -6
- package/runtime/webapp/dist/assets/index--zKd3rTs.js +0 -507
- package/runtime/webapp/dist/assets/index-D0gsdpeQ.css +0 -1
- package/runtime/webapp/dist/assets/page-Cc56wyOt.js +0 -91
- package/runtime/webapp/dist/assets/stateDiagram-v2-MP3YSRHH-CQ9wpJCJ.js +0 -1
- package/runtime/webapp/dist/assets/swimlanesDiagram-VR7AAH4N-8XTJp3Fr.js +0 -8
- /package/runtime/.next/static/{mGwTFWK2dzlY3HjsjZGzh → ngVhkJylacc9Set69K3lG}/_buildManifest.js +0 -0
- /package/runtime/.next/static/{mGwTFWK2dzlY3HjsjZGzh → ngVhkJylacc9Set69K3lG}/_ssgManifest.js +0 -0
|
@@ -1,507 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./page-Cc56wyOt.js","./smartphone-D7oS3YTz.js","./artifact-links-nzx7joYs.js","./trash-2-CHYPyYDY.js","./clipboard-BteN9-AC.js","./CollaborationTabBridge-Dxq4G1Uk.js","./SessionDashboardBridge-DYsMZhuH.js","./RemoteDesktopTabBridge-Cp9mLtcY.js","./CollaborationPage-Fsvkw8ZM.js","./shield-check-SeEkz1Nd.js","./collaboration-f29NaKWy.js","./collaboration-BiaML8jX.css","./loader-circle-DMWQZenY.js","./crown-y1qmM0NZ.js","./CollaborationDashboard-DIVa26zk.js","./file-types-XHMBkbNr.js","./arrow-right-B0uCZ1Pd.js","./CollaborationDashboard-CCXC6JuQ.css","./SessionDashboard-DOWjUIY1.js","./SessionDashboard-CAoW5-uN.css","./RemoteDesktopPage-DpoYuKhA.js","./BrowserLivePanel-B1zYRS_7.js","./rotate-ccw-CKqo62Ra.js","./App-Cs8U1u-X.js","./FilePreview-BjbfWw2s.js","./FilePreview-B7Ab2X_E.css","./send-LvtpJMkk.js","./rotate-cw-D-M3ZDSa.js","./FileTree-C6gg9p4m.js","./App-QWoPBMW0.css"])))=>i.map(i=>d[i]);
|
|
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 f of c)if(f.type==="childList")for(const g of f.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&o(g)}).observe(document,{childList:!0,subtree:!0});function n(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(c){if(c.ep)return;c.ep=!0;const f=n(c);fetch(c.href,f)}})();const N3="modulepreload",O3=function(e,t){return new URL(e,t).href},ch={},zn=function(t,n,o){let c=Promise.resolve();if(n&&n.length>0){const g=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=O3(m,o),m in ch)return;ch[m]=!0;const C=m.endsWith(".css"),y=C?'[rel="stylesheet"]':"";if(o)for(let _=g.length-1;_>=0;_--){const k=g[_];if(k.href===m&&(!C||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${y}`))return;const S=document.createElement("link");if(S.rel=C?"stylesheet":N3,C||(S.as="script"),S.crossOrigin="",S.href=m,w&&S.setAttribute("nonce",w),document.head.appendChild(S),C)return new Promise((_,k)=>{S.addEventListener("load",_),S.addEventListener("error",()=>k(Error(`Unable to preload CSS for ${m}`)))})}))}function f(g){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=g,window.dispatchEvent(x),!x.defaultPrevented)throw g}return c.then(g=>{for(const x of g||[])x.status==="rejected"&&f(x.reason);return t().catch(f)})};var wn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function C2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var A2={exports:{}},mc={},S2={exports:{}},Ie={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var ia=Symbol.for("react.element"),k3=Symbol.for("react.portal"),D3=Symbol.for("react.fragment"),M3=Symbol.for("react.strict_mode"),P3=Symbol.for("react.profiler"),L3=Symbol.for("react.provider"),B3=Symbol.for("react.context"),F3=Symbol.for("react.forward_ref"),U3=Symbol.for("react.suspense"),j3=Symbol.for("react.memo"),W3=Symbol.for("react.lazy"),uh=Symbol.iterator;function z3(e){return e===null||typeof e!="object"?null:(e=uh&&e[uh]||e["@@iterator"],typeof e=="function"?e:null)}var I2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T2=Object.assign,R2={};function Ps(e,t,n){this.props=e,this.context=t,this.refs=R2,this.updater=n||I2}Ps.prototype.isReactComponent={};Ps.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ps.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _2(){}_2.prototype=Ps.prototype;function cd(e,t,n){this.props=e,this.context=t,this.refs=R2,this.updater=n||I2}var ud=cd.prototype=new _2;ud.constructor=cd;T2(ud,Ps.prototype);ud.isPureReactComponent=!0;var fh=Array.isArray,N2=Object.prototype.hasOwnProperty,fd={current:null},O2={key:!0,ref:!0,__self:!0,__source:!0};function k2(e,t,n){var o,c={},f=null,g=null;if(t!=null)for(o in t.ref!==void 0&&(g=t.ref),t.key!==void 0&&(f=""+t.key),t)N2.call(t,o)&&!O2.hasOwnProperty(o)&&(c[o]=t[o]);var x=arguments.length-2;if(x===1)c.children=n;else if(1<x){for(var w=Array(x),m=0;m<x;m++)w[m]=arguments[m+2];c.children=w}if(e&&e.defaultProps)for(o in x=e.defaultProps,x)c[o]===void 0&&(c[o]=x[o]);return{$$typeof:ia,type:e,key:f,ref:g,props:c,_owner:fd.current}}function $3(e,t){return{$$typeof:ia,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function dd(e){return typeof e=="object"&&e!==null&&e.$$typeof===ia}function V3(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var dh=/\/+/g;function vu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?V3(""+e.key):t.toString(36)}function ll(e,t,n,o,c){var f=typeof e;(f==="undefined"||f==="boolean")&&(e=null);var g=!1;if(e===null)g=!0;else switch(f){case"string":case"number":g=!0;break;case"object":switch(e.$$typeof){case ia:case k3:g=!0}}if(g)return g=e,c=c(g),e=o===""?"."+vu(g,0):o,fh(c)?(n="",e!=null&&(n=e.replace(dh,"$&/")+"/"),ll(c,t,n,"",function(m){return m})):c!=null&&(dd(c)&&(c=$3(c,n+(!c.key||g&&g.key===c.key?"":(""+c.key).replace(dh,"$&/")+"/")+e)),t.push(c)),1;if(g=0,o=o===""?".":o+":",fh(e))for(var x=0;x<e.length;x++){f=e[x];var w=o+vu(f,x);g+=ll(f,t,n,w,c)}else if(w=z3(e),typeof w=="function")for(e=w.call(e),x=0;!(f=e.next()).done;)f=f.value,w=o+vu(f,x++),g+=ll(f,t,n,w,c);else if(f==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return g}function Ra(e,t,n){if(e==null)return e;var o=[],c=0;return ll(e,o,"","",function(f){return t.call(n,f,c++)}),o}function H3(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Qt={current:null},cl={transition:null},G3={ReactCurrentDispatcher:Qt,ReactCurrentBatchConfig:cl,ReactCurrentOwner:fd};function D2(){throw Error("act(...) is not supported in production builds of React.")}Ie.Children={map:Ra,forEach:function(e,t,n){Ra(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ra(e,function(){t++}),t},toArray:function(e){return Ra(e,function(t){return t})||[]},only:function(e){if(!dd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ie.Component=Ps;Ie.Fragment=D3;Ie.Profiler=P3;Ie.PureComponent=cd;Ie.StrictMode=M3;Ie.Suspense=U3;Ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G3;Ie.act=D2;Ie.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=T2({},e.props),c=e.key,f=e.ref,g=e._owner;if(t!=null){if(t.ref!==void 0&&(f=t.ref,g=fd.current),t.key!==void 0&&(c=""+t.key),e.type&&e.type.defaultProps)var x=e.type.defaultProps;for(w in t)N2.call(t,w)&&!O2.hasOwnProperty(w)&&(o[w]=t[w]===void 0&&x!==void 0?x[w]:t[w])}var w=arguments.length-2;if(w===1)o.children=n;else if(1<w){x=Array(w);for(var m=0;m<w;m++)x[m]=arguments[m+2];o.children=x}return{$$typeof:ia,type:e.type,key:c,ref:f,props:o,_owner:g}};Ie.createContext=function(e){return e={$$typeof:B3,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:L3,_context:e},e.Consumer=e};Ie.createElement=k2;Ie.createFactory=function(e){var t=k2.bind(null,e);return t.type=e,t};Ie.createRef=function(){return{current:null}};Ie.forwardRef=function(e){return{$$typeof:F3,render:e}};Ie.isValidElement=dd;Ie.lazy=function(e){return{$$typeof:W3,_payload:{_status:-1,_result:e},_init:H3}};Ie.memo=function(e,t){return{$$typeof:j3,type:e,compare:t===void 0?null:t}};Ie.startTransition=function(e){var t=cl.transition;cl.transition={};try{e()}finally{cl.transition=t}};Ie.unstable_act=D2;Ie.useCallback=function(e,t){return Qt.current.useCallback(e,t)};Ie.useContext=function(e){return Qt.current.useContext(e)};Ie.useDebugValue=function(){};Ie.useDeferredValue=function(e){return Qt.current.useDeferredValue(e)};Ie.useEffect=function(e,t){return Qt.current.useEffect(e,t)};Ie.useId=function(){return Qt.current.useId()};Ie.useImperativeHandle=function(e,t,n){return Qt.current.useImperativeHandle(e,t,n)};Ie.useInsertionEffect=function(e,t){return Qt.current.useInsertionEffect(e,t)};Ie.useLayoutEffect=function(e,t){return Qt.current.useLayoutEffect(e,t)};Ie.useMemo=function(e,t){return Qt.current.useMemo(e,t)};Ie.useReducer=function(e,t,n){return Qt.current.useReducer(e,t,n)};Ie.useRef=function(e){return Qt.current.useRef(e)};Ie.useState=function(e){return Qt.current.useState(e)};Ie.useSyncExternalStore=function(e,t,n){return Qt.current.useSyncExternalStore(e,t,n)};Ie.useTransition=function(){return Qt.current.useTransition()};Ie.version="18.3.1";S2.exports=Ie;var me=S2.exports;const X3=C2(me);/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react-jsx-runtime.production.min.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var Y3=me,K3=Symbol.for("react.element"),Z3=Symbol.for("react.fragment"),Q3=Object.prototype.hasOwnProperty,q3=Y3.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,J3={key:!0,ref:!0,__self:!0,__source:!0};function M2(e,t,n){var o,c={},f=null,g=null;n!==void 0&&(f=""+n),t.key!==void 0&&(f=""+t.key),t.ref!==void 0&&(g=t.ref);for(o in t)Q3.call(t,o)&&!J3.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)c[o]===void 0&&(c[o]=t[o]);return{$$typeof:K3,type:e,key:f,ref:g,props:c,_owner:q3.current}}mc.Fragment=Z3;mc.jsx=M2;mc.jsxs=M2;A2.exports=mc;var P=A2.exports,Zs=function(e){return e&&e.Math===Math&&e},ft=Zs(typeof globalThis=="object"&&globalThis)||Zs(typeof window=="object"&&window)||Zs(typeof self=="object"&&self)||Zs(typeof wn=="object"&&wn)||Zs(typeof wn=="object"&&wn)||function(){return this}()||Function("return this")(),hd={},lt=function(e){try{return!!e()}catch{return!0}},ey=lt,qt=!ey(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ty=lt,gd=!ty(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),ry=gd,_a=Function.prototype.call,Rn=ry?_a.bind(_a):function(){return _a.apply(_a,arguments)},P2={},L2={}.propertyIsEnumerable,B2=Object.getOwnPropertyDescriptor,ny=B2&&!L2.call({1:2},1);P2.f=ny?function(t){var n=B2(this,t);return!!n&&n.enumerable}:L2;var Pi=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},F2=gd,U2=Function.prototype,Lf=U2.call,iy=F2&&U2.bind.bind(Lf,Lf),dt=F2?iy:function(e){return function(){return Lf.apply(e,arguments)}},j2=dt,sy=j2({}.toString),oy=j2("".slice),Li=function(e){return oy(sy(e),8,-1)},ay=dt,ly=lt,cy=Li,yu=Object,uy=ay("".split),W2=ly(function(){return!yu("z").propertyIsEnumerable(0)})?function(e){return cy(e)==="String"?uy(e,""):yu(e)}:yu,Ls=function(e){return e==null},fy=Ls,dy=TypeError,pd=function(e){if(fy(e))throw new dy("Can't call method on "+e);return e},hy=W2,gy=pd,Bs=function(e){return hy(gy(e))},Eu=typeof document=="object"&&document.all,St=typeof Eu>"u"&&Eu!==void 0?function(e){return typeof e=="function"||e===Eu}:function(e){return typeof e=="function"},py=St,yr=function(e){return typeof e=="object"?e!==null:py(e)},bu=ft,my=St,xy=function(e){return my(e)?e:void 0},_n=function(e,t){return arguments.length<2?xy(bu[e]):bu[e]&&bu[e][t]},wy=dt,xc=wy({}.isPrototypeOf),vy=ft,hh=vy.navigator,gh=hh&&hh.userAgent,z2=gh?String(gh):"",$2=ft,Cu=z2,ph=$2.process,mh=$2.Deno,xh=ph&&ph.versions||mh&&mh.version,wh=xh&&xh.v8,zr,kl;wh&&(zr=wh.split("."),kl=zr[0]>0&&zr[0]<4?1:+(zr[0]+zr[1]));!kl&&Cu&&(zr=Cu.match(/Edge\/(\d+)/),(!zr||zr[1]>=74)&&(zr=Cu.match(/Chrome\/(\d+)/),zr&&(kl=+zr[1])));var V2=kl,vh=V2,yy=lt,Ey=ft,by=Ey.String,H2=!!Object.getOwnPropertySymbols&&!yy(function(){var e=Symbol("symbol detection");return!by(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&vh&&vh<41}),Cy=H2,G2=Cy&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Ay=_n,Sy=St,Iy=xc,Ty=G2,Ry=Object,md=Ty?function(e){return typeof e=="symbol"}:function(e){var t=Ay("Symbol");return Sy(t)&&Iy(t.prototype,Ry(e))},_y=String,xd=function(e){try{return _y(e)}catch{return"Object"}},Ny=St,Oy=xd,ky=TypeError,wd=function(e){if(Ny(e))return e;throw new ky(Oy(e)+" is not a function")},Dy=wd,My=Ls,vd=function(e,t){var n=e[t];return My(n)?void 0:Dy(n)},Au=Rn,Su=St,Iu=yr,Py=TypeError,Ly=function(e,t){var n,o;if(t==="string"&&Su(n=e.toString)&&!Iu(o=Au(n,e))||Su(n=e.valueOf)&&!Iu(o=Au(n,e))||t!=="string"&&Su(n=e.toString)&&!Iu(o=Au(n,e)))return o;throw new Py("Can't convert object to primitive value")},X2={exports:{}},yh=ft,By=Object.defineProperty,yd=function(e,t){try{By(yh,e,{value:t,configurable:!0,writable:!0})}catch{yh[e]=t}return t},Fy=ft,Uy=yd,Eh="__core-js_shared__",bh=X2.exports=Fy[Eh]||Uy(Eh,{});(bh.versions||(bh.versions=[])).push({version:"3.50.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Ed=X2.exports,Ch=Ed,jy=Object.create||Object,Y2=function(e,t){return Ch[e]||(Ch[e]=t||jy(null))},Wy=pd,zy=Object,sa=function(e){return zy(Wy(e))},$y=dt,Vy=sa,Hy=$y({}.hasOwnProperty),dr=Object.hasOwn||function(t,n){return Hy(Vy(t),n)},Gy=dt,Xy=0,Yy=Math.random(),Ky=Gy(1.1.toString),wc=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Ky(++Xy+Yy,36)},Zy=ft,Qy=Y2,Ah=dr,qy=wc,Jy=H2,eE=G2,Ji=Zy.Symbol,Tu=Qy("wks"),tE=eE?Ji.for||Ji:Ji&&Ji.withoutSetter||qy,Xr=function(e){return Ah(Tu,e)||(Tu[e]=Jy&&Ah(Ji,e)?Ji[e]:tE("Symbol."+e)),Tu[e]},rE=Rn,Sh=yr,Ih=md,nE=vd,iE=Ly,sE=Xr,oE=TypeError,aE=sE("toPrimitive"),lE=function(e,t){if(!Sh(e)||Ih(e))return e;var n=nE(e,aE),o;if(n){if(t===void 0&&(t="default"),o=rE(n,e,t),!Sh(o)||Ih(o))return o;throw new oE("Can't convert object to primitive value")}return t===void 0&&(t="number"),iE(e,t)},cE=lE,uE=md,K2=function(e){var t=cE(e,"string");return uE(t)?t:t+""},fE=ft,Th=yr,Bf=fE.document,dE=Th(Bf)&&Th(Bf.createElement),Z2=function(e){return dE?Bf.createElement(e):{}},hE=qt,gE=lt,pE=Z2,Q2=!hE&&!gE(function(){return Object.defineProperty(pE("div"),"a",{get:function(){return 7}}).a!==7}),mE=qt,xE=Rn,wE=P2,vE=Pi,yE=Bs,EE=K2,bE=dr,CE=Q2,Rh=Object.getOwnPropertyDescriptor;hd.f=mE?Rh:function(t,n){if(t=yE(t),n=EE(n),CE)try{return Rh(t,n)}catch{}if(bE(t,n))return vE(!xE(wE.f,t,n),t[n])};var Er={},AE=qt,SE=lt,q2=AE&&SE(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),IE=yr,TE=String,RE=TypeError,Yr=function(e){if(IE(e))return e;throw new RE(TE(e)+" is not an object")},_E=qt,NE=Q2,OE=q2,Na=Yr,_h=K2,kE=TypeError,Ru=Object.defineProperty,DE=Object.getOwnPropertyDescriptor,_u="enumerable",Nu="configurable",Ou="writable";Er.f=_E?OE?function(t,n,o){if(Na(t),n=_h(n),Na(o),typeof t=="function"&&n==="prototype"&&"value"in o&&Ou in o&&!o[Ou]){var c=DE(t,n);c&&c[Ou]&&(t[n]=o.value,o={configurable:Nu in o?o[Nu]:c[Nu],enumerable:_u in o?o[_u]:c[_u],writable:!1})}return Ru(t,n,o)}:Ru:function(t,n,o){if(Na(t),n=_h(n),Na(o),NE)try{return Ru(t,n,o)}catch{}if("get"in o||"set"in o)throw new kE("Accessors not supported");return"value"in o&&(t[n]=o.value),t};var ME=qt,PE=Er,LE=Pi,vc=ME?function(e,t,n){return PE.f(e,t,LE(1,n))}:function(e,t,n){return e[t]=n,e},J2={exports:{}},Ff=qt,BE=dr,em=Function.prototype,FE=Ff&&Object.getOwnPropertyDescriptor,tm=BE(em,"name"),UE=tm&&(function(){}).name==="something",jE=tm&&(!Ff||Ff&&FE(em,"name").configurable),rm={PROPER:UE,CONFIGURABLE:jE},WE=dt,zE=St,Uf=Ed,$E=WE(Function.toString);zE(Uf.inspectSource)||(Uf.inspectSource=function(e){return $E(e)});var nm=Uf.inspectSource,VE=ft,HE=St,Nh=VE.WeakMap,GE=HE(Nh)&&/native code/.test(String(Nh)),XE=Y2,YE=wc,Oh=XE("keys"),bd=function(e){return Oh[e]||(Oh[e]=YE(e))},yc={},KE=GE,im=ft,ZE=yr,QE=vc,ku=dr,Du=Ed,qE=bd,JE=yc,kh="Object already initialized",jf=im.TypeError,e8=im.WeakMap,Dl,Mo,Ml,t8=function(e){return Ml(e)?Mo(e):Dl(e,{})},r8=function(e){return function(t){var n;if(!ZE(t)||(n=Mo(t)).type!==e)throw new jf("Incompatible receiver, "+e+" required");return n}};if(KE||Du.state){var rn=Du.state||(Du.state=new e8);rn.get=rn.get,rn.has=rn.has,rn.set=rn.set,Dl=function(e,t){if(rn.has(e))throw new jf(kh);return t.facade=e,rn.set(e,t),t},Mo=function(e){return rn.get(e)||{}},Ml=function(e){return rn.has(e)}}else{var Yi=qE("state");JE[Yi]=!0,Dl=function(e,t){if(ku(e,Yi))throw new jf(kh);return t.facade=e,QE(e,Yi,t),t},Mo=function(e){return ku(e,Yi)?e[Yi]:{}},Ml=function(e){return ku(e,Yi)}}var Ec={set:Dl,get:Mo,has:Ml,enforce:t8,getterFor:r8},Cd=dt,n8=lt,i8=St,Oa=dr,Wf=qt,s8=rm.CONFIGURABLE,o8=nm,sm=Ec,a8=sm.enforce,l8=sm.get,Dh=String,ul=Object.defineProperty,c8=Cd("".slice),u8=Cd("".replace),f8=Cd([].join),d8=Wf&&!n8(function(){return ul(function(){},"length",{value:8}).length!==8}),h8=String(String).split("String"),g8=J2.exports=function(e,t,n){c8(Dh(t),0,7)==="Symbol("&&(t="["+u8(Dh(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Oa(e,"name")||s8&&e.name!==t)&&(Wf?ul(e,"name",{value:t,configurable:!0}):e.name=t),d8&&n&&Oa(n,"arity")&&e.length!==n.arity&&ul(e,"length",{value:n.arity});try{n&&Oa(n,"constructor")&&n.constructor?Wf&&ul(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var o=a8(e);return Oa(o,"source")||(o.source=f8(h8,typeof t=="string"?t:"")),e};Function.prototype.toString=g8(function(){return i8(this)&&l8(this).source||o8(this)},"toString");var om=J2.exports,p8=St,m8=Er,x8=om,w8=yd,oi=function(e,t,n,o){o||(o={});var c=o.enumerable,f=o.name!==void 0?o.name:t;if(p8(n)&&x8(n,f,o),o.global)c?e[t]=n:w8(t,n);else{try{o.unsafe?e[t]&&(c=!0):delete e[t]}catch{}c?e[t]=n:m8.f(e,t,{value:n,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e},bc={},v8=Math.ceil,y8=Math.floor,E8=Math.trunc||function(t){var n=+t;return(n>0?y8:v8)(n)},b8=E8,Ad=function(e){var t=+e;return t!==t||t===0?0:b8(t)},C8=Ad,A8=Math.max,S8=Math.min,I8=function(e,t){var n=C8(e);return n<0?A8(n+t,0):S8(n,t)},T8=Ad,R8=Math.min,_8=function(e){var t=T8(e);return t>0?R8(t,9007199254740991):0},N8=_8,oa=function(e){return N8(e.length)},O8=Bs,k8=I8,D8=oa,M8=function(e){return function(t,n,o){var c=O8(t),f=D8(c);if(f===0)return!e&&-1;var g=k8(o,f),x;if(e&&n!==n){for(;f>g;)if(x=c[g++],x!==x)return!0}else for(;f>g;g++)if((e||g in c)&&c[g]===n)return e||g||0;return!e&&-1}},P8={indexOf:M8(!1)},L8=dt,Mu=dr,B8=Bs,F8=P8.indexOf,U8=yc,Mh=L8([].push),am=function(e,t){var n=B8(e),o=0,c=[],f;for(f in n)!Mu(U8,f)&&Mu(n,f)&&Mh(c,f);for(;t.length>o;)Mu(n,f=t[o++])&&(~F8(c,f)||Mh(c,f));return c},Sd=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],j8=am,W8=Sd,z8=W8.concat("length","prototype");bc.f=Object.getOwnPropertyNames||function(t){return j8(t,z8)};var lm={};lm.f=Object.getOwnPropertySymbols;var $8=_n,V8=dt,H8=bc,G8=lm,X8=Yr,Y8=V8([].concat),K8=$8("Reflect","ownKeys")||function(t){var n=H8.f(X8(t)),o=G8.f;return o?Y8(n,o(t)):n},Ph=dr,Z8=K8,Q8=hd,q8=Er,J8=function(e,t,n){for(var o=Z8(t),c=q8.f,f=Q8.f,g=0;g<o.length;g++){var x=o[g];!Ph(e,x)&&!(n&&Ph(n,x))&&c(e,x,f(t,x))}},e4=lt,t4=St,r4=/#|\.prototype\./,aa=function(e,t){var n=i4[n4(e)];return n===o4?!0:n===s4?!1:t4(t)?e4(t):!!t},n4=aa.normalize=function(e){return String(e).replace(r4,".").toLowerCase()},i4=aa.data={},s4=aa.NATIVE="N",o4=aa.POLYFILL="P",cm=aa,ka=ft,a4=hd.f,l4=vc,c4=oi,u4=yd,f4=J8,d4=cm,fn=function(e,t){var n=e.target,o=e.global,c=e.stat,f,g,x,w,m,C;if(o?g=ka:c?g=ka[n]||u4(n,{}):g=ka[n]&&ka[n].prototype,g)for(x in t){if(m=t[x],e.dontCallGetSet?(C=a4(g,x),w=C&&C.value):w=g[x],f=d4(o?x:n+(c?".":"#")+x,e.forced),!f&&w!==void 0){if(typeof m==typeof w)continue;f4(m,w)}(e.sham||w&&w.sham)&&l4(m,"sham",!0),c4(g,x,m,e)}},um={},h4=am,g4=Sd,fm=Object.keys||function(t){return h4(t,g4)},p4=qt,m4=q2,x4=Er,w4=Yr,v4=Bs,y4=fm;um.f=p4&&!m4?Object.defineProperties:function(t,n){w4(t);for(var o=v4(n),c=y4(n),f=c.length,g=0,x;f>g;)x4.f(t,x=c[g++],o[x]);return t};var E4=_n,b4=E4("document","documentElement"),C4=Yr,A4=um,Lh=Sd,S4=yc,I4=b4,T4=Z2,R4=bd,Bh=">",Fh="<",zf="prototype",$f="script",dm=R4("IE_PROTO"),Pu=function(){},hm=function(e){return Fh+$f+Bh+e+Fh+"/"+$f+Bh},Uh=function(e){e.write(hm("")),e.close();var t=e.parentWindow.Object;return e=null,t},_4=function(){var e=T4("iframe"),t="java"+$f+":",n;return e.style.display="none",I4.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(hm("document.F=Object")),n.close(),n.F},Da,fl=function(){try{Da=new ActiveXObject("htmlfile")}catch{}fl=typeof document<"u"?document.domain&&Da?Uh(Da):_4():Uh(Da);for(var e=Lh.length;e--;)delete fl[zf][Lh[e]];return fl()};S4[dm]=!0;var Cc=Object.create||function(t,n){var o;return t!==null?(Pu[zf]=C4(t),o=new Pu,Pu[zf]=null,o[dm]=t):o=fl(),n===void 0?o:A4.f(o,n)},N4=Xr,O4=Cc,k4=Er.f,Vf=N4("unscopables"),Hf=Array.prototype;Hf[Vf]===void 0&&k4(Hf,Vf,{configurable:!0,value:O4(null)});var Ac=function(e){Hf[Vf][e]=!0},D4=fn,M4=sa,P4=oa,L4=Ad,B4=Ac;D4({target:"Array",proto:!0},{at:function(t){var n=M4(this),o=P4(n),c=L4(t),f=c>=0?c:o+c;return f<0||f>=o?void 0:n[f]}});B4("at");var F4=ft,U4=dt,Id=function(e,t){return U4(F4[e].prototype[t])},j4=Id;j4("Array","at");var W4=Li,z4=dt,$4=function(e){if(W4(e)==="Function")return z4(e)},jh=$4,V4=wd,H4=gd,G4=jh(jh.bind),Td=function(e,t){return V4(e),t===void 0?e:H4?G4(e,t):function(){return e.apply(t,arguments)}},X4=Td,Y4=W2,K4=sa,Z4=oa,Wh=function(e){var t=e===1;return function(n,o,c){for(var f=K4(n),g=Y4(f),x=Z4(g),w=X4(o,c),m,C;x-- >0;)if(m=g[x],C=w(m,x,f),C)switch(e){case 0:return m;case 1:return x}return t?-1:void 0}},gm={findLast:Wh(0),findLastIndex:Wh(1)},Q4=fn,q4=gm.findLast,J4=Ac;Q4({target:"Array",proto:!0},{findLast:function(t){return q4(this,t,arguments.length>1?arguments[1]:void 0)}});J4("findLast");var eb=Id;eb("Array","findLast");var tb=fn,rb=gm.findLastIndex,nb=Ac;tb({target:"Array",proto:!0},{findLastIndex:function(t){return rb(this,t,arguments.length>1?arguments[1]:void 0)}});nb("findLastIndex");var ib=Id;ib("Array","findLastIndex");var sb=Xr,ob=sb("toStringTag"),pm={};pm[ob]="z";var Rd=String(pm)==="[object z]",ab=Rd,lb=St,dl=Li,cb=Xr,ub=cb("toStringTag"),fb=Object,db=dl(function(){return arguments}())==="Arguments",hb=function(e,t){try{return e[t]}catch{}},Sc=ab?dl:function(e){var t,n,o;return e===void 0?"Undefined":e===null?"Null":typeof(n=hb(t=fb(e),ub))=="string"?n:db?dl(t):(o=dl(t))==="Object"&&lb(t.callee)?"Arguments":o},gb=Sc,pb=String,mb=function(e){if(gb(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return pb(e)},xb=mb,_d=function(e,t){return e===void 0?arguments.length<2?"":t:xb(e)},wb=qt,vb=lt,yb=Yr,zh=_d,hl=Error.prototype.toString,Eb=vb(function(){if(wb){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if(hl.call(e)!=="true")return!0}return hl.call({message:1,name:2})!=="2: 1"||hl.call({})!=="Error"}),mm=Eb?function(){var t=yb(this),n=zh(t.name,"Error"),o=zh(t.message);return n?o?n+": "+o:n:o}:hl,bb=oi,$h=mm,Vh=Error.prototype;Vh.toString!==$h&&bb(Vh,"toString",$h);var Ic=Object.create?Object.create(null):{},Cb=lt,Ab=!Cb(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Sb=dr,Ib=St,Tb=sa,Rb=bd,_b=Ab,Hh=Rb("IE_PROTO"),Gf=Object,Nb=Gf.prototype,xm=_b?Gf.getPrototypeOf:function(e){var t=Tb(e);if(Sb(t,Hh))return t[Hh];var n=t.constructor;return Ib(n)&&t instanceof n?n.prototype:t instanceof Gf?Nb:null},Ob=lt,kb=St,Db=yr,Gh=xm,Mb=oi,Pb=Xr,Xf=Pb("iterator"),wm=!1,Ri,Lu,Bu;[].keys&&(Bu=[].keys(),"next"in Bu?(Lu=Gh(Gh(Bu)),Lu!==Object.prototype&&(Ri=Lu)):wm=!0);var Lb=!Db(Ri)||Ob(function(){var e={};return Ri[Xf].call(e)!==e});Lb&&(Ri={});kb(Ri[Xf])||Mb(Ri,Xf,function(){return this});var vm={IteratorPrototype:Ri,BUGGY_SAFARI_ITERATORS:wm},Bb=Er.f,Fb=dr,Ub=Xr,Xh=Ub("toStringTag"),Tc=function(e,t,n){e&&!n&&(e=e.prototype),e&&!Fb(e,Xh)&&Bb(e,Xh,{configurable:!0,value:t})},jb=vm.IteratorPrototype,Wb=Cc,zb=Pi,$b=Tc,Vb=Ic,Hb=function(){return this},Gb=function(e,t,n,o){var c=t+" Iterator";return e.prototype=Wb(jb,{next:zb(+!o,n)}),$b(e,c,!1),Vb[c]=Hb,e},Xb=dt,Yb=wd,Kb=function(e,t,n){try{return Xb(Yb(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},Zb=yr,Qb=function(e){return Zb(e)||e===null},qb=Qb,Jb=String,e6=TypeError,t6=function(e){if(qb(e))return e;throw new e6("Can't set "+Jb(e)+" as a prototype")},r6=Kb,n6=yr,i6=pd,s6=t6,ym=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},n;try{n=r6(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(c,f){return i6(c),s6(f),n6(c)&&(e?n(c,f):c.__proto__=f),c}}():void 0),o6=fn,a6=Rn,Em=rm,l6=St,c6=Gb,Yh=xm,Kh=ym,u6=Tc,f6=vc,Fu=oi,d6=Xr,h6=Ic,bm=vm,g6=Em.PROPER,p6=Em.CONFIGURABLE,Zh=bm.IteratorPrototype,Ma=bm.BUGGY_SAFARI_ITERATORS,Qs=d6("iterator"),Qh="keys",qs="values",qh="entries",m6=function(){return this},Cm=function(e,t,n,o,c,f,g){c6(n,t,o);var x=function(O){if(O===c&&S)return S;if(!Ma&&O&&O in C)return C[O];switch(O){case Qh:return function(){return new n(this,O)};case qs:return function(){return new n(this,O)};case qh:return function(){return new n(this,O)}}return function(){return new n(this)}},w=t+" Iterator",m=!1,C=e.prototype,y=C[Qs]||C["@@iterator"]||c&&C[c],S=!Ma&&y||x(c),_=t==="Array"&&C.entries||y,k,D,X;if(_&&(k=Yh(_.call(new e)),k!==Object.prototype&&k.next&&(Yh(k)!==Zh&&(Kh?Kh(k,Zh):l6(k[Qs])||Fu(k,Qs,m6)),u6(k,w,!0))),g6&&c===qs&&y&&y.name!==qs&&(p6?f6(C,"name",qs):(m=!0,S=function(){return a6(y,this)})),c)if(D={values:x(qs),keys:f?S:x(Qh),entries:x(qh)},g)for(X in D)(Ma||m||!(X in C))&&Fu(C,X,D[X]);else o6({target:t,proto:!0,forced:Ma||m},D);return C[Qs]!==S&&Fu(C,Qs,S,{name:c}),h6[t]=S,D},Am=function(e,t){return{value:e,done:t}},x6=Bs,Nd=Ac,Jh=Ic,Sm=Ec,w6=Er.f,v6=Cm,Pa=Am,y6=qt,Im="Array Iterator",E6=Sm.set,b6=Sm.getterFor(Im);v6(Array,"Array",function(e,t){E6(this,{type:Im,target:x6(e),index:0,kind:t})},function(){var e=b6(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Pa(void 0,!0);switch(e.kind){case"keys":return Pa(n,!1);case"values":return Pa(t[n],!1)}return Pa([n,t[n]],!1)},"values");var eg=Jh.Arguments=Jh.Array;Nd("keys");Nd("values");Nd("entries");if(y6&&eg.name!=="values")try{w6(eg,"name",{value:"values"})}catch{}var C6=fn,A6=sa,Tm=fm,S6=lt,I6=S6(function(){Tm(1)});C6({target:"Object",stat:!0,forced:I6},{keys:function(t){return Tm(A6(t))}});var T6=Rd,R6=Sc,_6=T6?{}.toString:function(){return"[object "+R6(this)+"]"},N6=Rd,O6=oi,k6=_6;N6||O6(Object.prototype,"toString",k6,{unsafe:!0});var Rm={exports:{}},_m={},D6=dt,M6=D6([].slice),P6=Li,L6=Bs,Nm=bc.f,B6=M6,Om=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],F6=function(e){try{return Nm(e)}catch{return B6(Om)}};_m.f=function(t){return Om&&P6(t)==="Window"?F6(t):Nm(L6(t))};var U6=lt,j6=U6(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),W6=lt,z6=yr,$6=Li,tg=j6,gl=Object.isExtensible,V6=W6(function(){gl(1)}),H6=V6||tg?function(t){return!z6(t)||tg&&$6(t)==="ArrayBuffer"?!1:gl?gl(t):!0}:gl,G6=lt,X6=!G6(function(){return Object.isExtensible(Object.preventExtensions({}))}),Y6=fn,K6=dt,Z6=yc,Q6=yr,Od=dr,q6=Er.f,rg=bc,J6=_m,kd=H6,eC=wc,tC=X6,km=!1,bn=eC("meta"),rC=0,Dd=function(e){q6(e,bn,{value:{objectID:"O"+rC++,weakData:{}}})},nC=function(e,t){if(!Q6(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!Od(e,bn)){if(!kd(e))return"F";if(!t)return"E";Dd(e)}return e[bn].objectID},iC=function(e,t){if(!Od(e,bn)){if(!kd(e))return!0;if(!t)return!1;Dd(e)}return e[bn].weakData},sC=function(e){return tC&&km&&kd(e)&&!Od(e,bn)&&Dd(e),e},oC=function(){aC.enable=function(){},km=!0;var e=rg.f,t=K6([].splice),n={};n[bn]=1,e(n).length&&(rg.f=function(o){for(var c=e(o),f=0,g=c.length;f<g;f++)if(c[f]===bn){t(c,f,1);break}return c},Y6({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:J6.f}))},aC=Rm.exports={enable:oC,fastKey:nC,getWeakData:iC,onFreeze:sC};Z6[bn]=!0;var Dm=Rm.exports,lC=Xr,cC=Ic,uC=lC("iterator"),fC=Array.prototype,dC=function(e){return e!==void 0&&(cC.Array===e||fC[uC]===e)},hC=Li,gC=Ls,ng=vd,pC=Xr,ig=pC("iterator"),mC=Array.prototype,Mm=function(e){if(!gC(e))return ng(e,ig)||ng(e,"@@iterator")||(hC(e)==="Arguments"?mC[ig]:void 0)},xC=Rn,wC=St,vC=Yr,yC=xd,EC=Mm,bC=TypeError,CC=function(e,t){var n=arguments.length<2?EC(e):t;if(wC(n))return vC(xC(n,e));throw new bC(yC(e)+" is not iterable")},AC=Rn,sg=Yr,SC=vd,IC=function(e,t,n){var o,c;sg(e);try{if(o=SC(e,"return"),!o){if(t==="throw")throw n;return n}o=AC(o,e)}catch(f){c=!0,o=f}if(t==="throw")throw n;if(c)throw o;return sg(o),n},TC=Td,RC=Rn,_C=Yr,NC=xd,OC=dC,kC=oa,og=xc,DC=CC,MC=Mm,ag=IC,PC=TypeError,pl=function(e,t){this.stopped=e,this.result=t},lg=pl.prototype,Md=function(e,t,n){var o=n&&n.that,c=!!(n&&n.AS_ENTRIES),f=!!(n&&n.IS_RECORD),g=!!(n&&n.IS_ITERATOR),x=!!(n&&n.INTERRUPTED),w=TC(t,o),m,C,y,S,_,k,D,X=function(R){var U=m;return m=void 0,U&&ag(U,"normal"),new pl(!0,R)},O=function(R){return c?(_C(R),x?w(R[0],R[1],X):w(R[0],R[1])):x?w(R,X):w(R)};if(f)m=e.iterator;else if(g)m=e;else{if(C=MC(e),!C)throw new PC(NC(e)+" is not iterable");if(OC(C)){for(y=0,S=kC(e);S>y;y++)if(_=O(e[y]),_&&og(lg,_))return _;return new pl(!1)}m=DC(e,C)}for(k=f?e.next:m.next;!(D=RC(k,m)).done;){var I=D.value;try{_=O(I)}catch(R){if(m)ag(m,"throw",R);else throw R}if(typeof _=="object"&&_&&og(lg,_))return _}return new pl(!1)},LC=xc,BC=TypeError,Rc=function(e,t){if(LC(t,e))return e;throw new BC("Incorrect invocation")},FC=Xr,Pm=FC("iterator"),Lm=!1;try{var UC=0,cg={next:function(){return{done:!!UC++}},return:function(){Lm=!0}};cg[Pm]=function(){return this},Array.from(cg,function(){throw 2})}catch{}var jC=function(e,t){try{if(!t&&!Lm)return!1}catch{return!1}var n=!1;try{var o={};o[Pm]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch{}return n},WC=St,zC=yr,ug=ym,Bm=function(e,t,n){var o,c;return ug&&WC(o=t.constructor)&&o!==n&&zC(c=o.prototype)&&c!==n.prototype&&ug(e,c),e},$C=fn,VC=ft,HC=dt,fg=cm,GC=oi,XC=Dm,YC=Md,KC=Rc,ZC=St,QC=Ls,Uu=yr,ju=lt,qC=jC,JC=Tc,eA=Bm,Fm=function(e,t,n){var o=e.indexOf("Map")!==-1,c=e.indexOf("Weak")!==-1,f=o?"set":"add",g=VC[e],x=g&&g.prototype,w=g,m={},C=function(O){var I=HC(x[O]);GC(x,O,O==="add"?function(U){return I(this,U===0?0:U),this}:O==="delete"?function(R){return c&&!Uu(R)?!1:I(this,R===0?0:R)}:O==="get"?function(U){return c&&!Uu(U)?void 0:I(this,U===0?0:U)}:O==="has"?function(U){return c&&!Uu(U)?!1:I(this,U===0?0:U)}:function(U,G){return I(this,U===0?0:U,G),this})},y=fg(e,!ZC(g)||!(c||x.forEach&&!ju(function(){new g().entries().next()})));if(y)w=n.getConstructor(t,e,o,f),XC.enable();else if(fg(e,!0)){var S=new w,_=S[f](c?{}:-0,1)!==S,k=ju(function(){S.has(1)}),D=qC(function(O){new g(O)}),X=!c&&ju(function(){for(var O=new g,I=5;I--;)O[f](I,I);return!O.has(-0)});D||(w=t(function(O,I){KC(O,x);var R=eA(new g,O,w);return QC(I)||YC(I,R[f],{that:R,AS_ENTRIES:o}),R}),w.prototype=x,x.constructor=w),(k||X)&&(C("delete"),C("has"),o&&C("get")),(X||_)&&C(f),c&&x.clear&&delete x.clear}return m[e]=w,$C({global:!0,constructor:!0,forced:w!==g},m),JC(w,e),c||n.setStrong(w,e,o),w},dg=om,tA=Er,Pd=function(e,t,n){return n.get&&dg(n.get,t,{getter:!0}),n.set&&dg(n.set,t,{setter:!0}),tA.f(e,t,n)},rA=oi,nA=function(e,t,n){for(var o in t)rA(e,o,t[o],n);return e},iA=_n,sA=Pd,oA=Xr,aA=qt,hg=oA("species"),lA=function(e){var t=iA(e);aA&&t&&!t[hg]&&sA(t,hg,{configurable:!0,get:function(){return this}})},gg=Cc,cA=Pd,pg=nA,uA=Td,fA=Rc,dA=Ls,hA=Md,gA=Cm,La=Am,pA=lA,Js=qt,mg=Dm.fastKey,Um=Ec,xg=Um.set,Wu=Um.getterFor,jm={getConstructor:function(e,t,n,o){var c=e(function(m,C){fA(m,f),xg(m,{type:t,index:gg(null),first:null,last:null,size:0}),Js||(m.size=0),dA(C)||hA(C,m[o],{that:m,AS_ENTRIES:n})}),f=c.prototype,g=Wu(t),x=function(m,C,y){var S=g(m),_=w(m,C),k,D;return _?_.value=y:(S.last=_={index:D=mg(C,!0),key:C,value:y,previous:k=S.last,next:null,removed:!1},S.first||(S.first=_),k&&(k.next=_),Js?S.size++:m.size++,D!=="F"&&(S.index[D]=_)),m},w=function(m,C){var y=g(m),S=mg(C),_;if(S!=="F")return y.index[S];for(_=y.first;_;_=_.next)if(_.key===C)return _};return pg(f,{clear:function(){for(var C=this,y=g(C),S=y.first;S;)S.removed=!0,S.previous&&(S.previous=S.previous.next=null),S=S.next;y.first=y.last=null,y.index=gg(null),Js?y.size=0:C.size=0},delete:function(m){var C=this,y=g(C),S=w(C,m);if(S){var _=S.next,k=S.previous;delete y.index[S.index],S.removed=!0,k&&(k.next=_),_&&(_.previous=k),y.first===S&&(y.first=_),y.last===S&&(y.last=k),Js?y.size--:C.size--}return!!S},forEach:function(C){for(var y=g(this),S=uA(C,arguments.length>1?arguments[1]:void 0),_;_=_?_.next:y.first;)for(S(_.value,_.key,this);_&&_.removed;)_=_.previous},has:function(C){return!!w(this,C)}}),pg(f,n?{get:function(C){var y=w(this,C);return y&&y.value},set:function(C,y){return x(this,C===0?0:C,y)}}:{add:function(C){return x(this,C=C===0?0:C,C)}}),Js&&cA(f,"size",{configurable:!0,get:function(){return g(this).size}}),c},setStrong:function(e,t,n){var o=t+" Iterator",c=Wu(t),f=Wu(o);gA(e,t,function(g,x){xg(this,{type:o,target:g,state:c(g),kind:x,last:null})},function(){for(var g=f(this),x=g.kind,w=g.last;w&&w.removed;)w=w.previous;return!g.target||!(g.last=w=w?w.next:g.state.first)?(g.target=null,La(void 0,!0)):La(x==="keys"?w.key:x==="values"?w.value:[w.key,w.value],!1)},n?"entries":"values",!n,!0),pA(t)}},mA=Fm,xA=jm;mA("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},xA);var wA=Fm,vA=jm;wA("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},vA);var eo=ft,yA=z2,EA=Li,Ba=function(e){return yA.slice(0,e.length)===e},Wm=function(){return Ba("Bun/")?"BUN":Ba("Cloudflare-Workers")?"CLOUDFLARE":Ba("Deno/")?"DENO":Ba("Node.js/")?"NODE":eo.Bun&&typeof Bun.version=="string"?"BUN":eo.Deno&&typeof Deno.version=="object"?"DENO":EA(eo.process)==="process"?"NODE":eo.window&&eo.document?"BROWSER":"REST"}(),bA=Wm,CA=bA==="NODE",AA=ft,SA=CA,zm=function(e){if(SA){try{return AA.process.getBuiltinModule(e)}catch{}try{return Function('return require("'+e+'")')()}catch{}}},$m={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}},IA=dt,Vm=Error,TA=IA("".replace),RA=function(e){return String(new Vm(e).stack)}("zxcasd"),Hm=/\n\s*at [^:]*:[^\n]*/,_A=Hm.test(RA),Gm=function(e,t){if(_A&&typeof e=="string"&&!Vm.prepareStackTrace)for(;t--;)e=TA(e,Hm,"");return e},NA=fn,Pl=_n,OA=zm,Ld=lt,kA=Cc,Bd=Pi,Ll=Er.f,DA=oi,ml=Pd,xl=dr,MA=Rc,PA=Yr,Xm=mm,wg=_d,ps=$m,LA=Gm,Ym=Ec,Fd=qt,Cs="DOMException",Yf="DATA_CLONE_ERR",_c=Pl("Error"),Cn=Pl(Cs)||function(){try{var e=Pl("MessageChannel")||OA("worker_threads").MessageChannel;new e().port1.postMessage(new WeakMap)}catch(t){if(t.name===Yf&&t.code===25)return t.constructor}}(),BA=Cn&&Cn.prototype,Km=_c.prototype,FA=Ym.set,UA=Ym.getterFor(Cs),jA="stack"in new _c(Cs),Zm=function(e){return xl(ps,e)&&ps[e].m?ps[e].c:0},Ud=function(){MA(this,yo);var t=arguments.length,n=wg(t<1?void 0:arguments[0]),o=wg(t<2?void 0:arguments[1],"Error"),c=Zm(o);if(FA(this,{type:Cs,name:o,message:n,code:c}),Fd||(this.name=o,this.message=n,this.code=c),jA){var f=new _c(n);f.name=Cs,Ll(this,"stack",Bd(1,LA(f.stack,1)))}},yo=Ud.prototype=kA(Km),Qm=function(e){return{enumerable:!0,configurable:!0,get:e}},zu=function(e){return Qm(function(){return UA(this)[e]})};Fd&&(ml(yo,"code",zu("code")),ml(yo,"message",zu("message")),ml(yo,"name",zu("name")));Ll(yo,"constructor",Bd(1,Ud));var Nc=Ld(function(){return!(new Cn instanceof _c)}),WA=Nc||Ld(function(){return Km.toString!==Xm||String(new Cn(1,2))!=="2: 1"}),zA=Nc||Ld(function(){return new Cn(1,"DataCloneError").code!==25});Nc||Cn[Yf]!==25||BA[Yf];var vg=Nc;NA({global:!0,constructor:!0,forced:vg},{DOMException:vg?Ud:Cn});var Po=Pl(Cs),Bl=Po.prototype;WA&&Cn===Po&&DA(Bl,"toString",Xm);zA&&Fd&&Cn===Po&&ml(Bl,"code",Qm(function(){return Zm(PA(this).name)}));for(var yg in ps)if(xl(ps,yg)){var Eg=ps[yg],Fa=Eg.s,bg=Bd(6,Eg.c);xl(Po,Fa)||Ll(Po,Fa,bg),xl(Bl,Fa)||Ll(Bl,Fa,bg)}var $A=fn,VA=ft,jd=_n,Kf=Pi,Zf=Er.f,Cg=dr,HA=Rc,GA=Bm,Ag=_d,$u=$m,XA=Gm,YA=qt,la="DOMException",qm=jd("Error"),ca=jd(la),Wd=function(){HA(this,KA);var t=arguments.length,n=Ag(t<1?void 0:arguments[0]),o=Ag(t<2?void 0:arguments[1],"Error"),c=new ca(n,o),f=new qm(n);return f.name=la,Zf(c,"stack",Kf(1,XA(f.stack,1))),GA(c,this,Wd),c},KA=Wd.prototype=ca.prototype,ZA="stack"in new qm(la),QA="stack"in new ca(1,2),Vu=ca&&YA&&Object.getOwnPropertyDescriptor(VA,la),qA=!!Vu&&!(Vu.writable&&Vu.configurable),Sg=ZA&&!qA&&!QA;$A({global:!0,constructor:!0,forced:Sg},{DOMException:Sg?Wd:ca});var fo=jd(la),Ig=fo.prototype;if(Ig.constructor!==fo){Zf(Ig,"constructor",Kf(1,fo));for(var Tg in $u)if(Cg($u,Tg)){var Rg=$u[Tg],_g=Rg.s;Cg(fo,_g)||Zf(fo,_g,Kf(6,Rg.c))}}var JA=_n,eS=Tc,Ng="DOMException";eS(JA(Ng),Ng);var tS=dt,rS=lt,Jm=St,nS=Sc,iS=_n,sS=nm,ex=function(){},tx=iS("Reflect","construct"),zd=/^\s*(?:class|function)\b/,oS=tS(zd.exec),aS=!zd.test(ex),to=function(t){if(!Jm(t))return!1;try{return tx(ex,[],t),!0}catch{return!1}},rx=function(t){if(!Jm(t))return!1;switch(nS(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return aS||!!oS(zd,sS(t))}catch{return!0}};rx.sham=!0;var lS=!tx||rS(function(){var e;return to(to.call)||!to(Object)||!to(function(){e=!0})||e})?rx:to,cS=qt,uS=Er,fS=Pi,dS=function(e,t,n){cS?uS.f(e,t,fS(0,n)):e[t]=n},hS=TypeError,gS=function(e,t){if(e<t)throw new hS("Not enough arguments");return e},pS=ft,mS=lt,Og=pS.RegExp,xS=!mS(function(){var e=!0;try{Og(".","d")}catch{e=!1}var t={},n="",o=e?"dgimsy":"gimsy",c=function(w,m){Object.defineProperty(t,w,{get:function(){return n+=m,!0}})},f={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};e&&(f.hasIndices="d");for(var g in f)c(g,f[g]);var x=Object.getOwnPropertyDescriptor(Og.prototype,"flags").get.call(t);return x!==o||n!==o}),wS={correct:xS},vS=Yr,yS=function(){var e=vS(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},ES=Rn,bS=dr,CS=xc,kg=wS,AS=yS,SS=RegExp.prototype,IS=kg.correct?function(e){return e.flags}:function(e){return!kg.correct&&CS(SS,e)&&!bS(e,"flags")?ES(AS,e):e.flags},Ua=dt,ja=Map.prototype,TS={Map,set:Ua(ja.set),get:Ua(ja.get),has:Ua(ja.has),remove:Ua(ja.delete)},Hu=dt,Wa=Set.prototype,nx={Set,add:Hu(Wa.add),has:Hu(Wa.has),remove:Hu(Wa.delete),proto:Wa},RS=Rn,_S=function(e,t,n){for(var o=n?e:e.iterator,c=e.next,f,g;!(f=RS(c,o)).done;)if(g=t(f.value),g!==void 0)return g},ix=dt,NS=_S,sx=nx,OS=sx.Set,ox=sx.proto,kS=ix(ox.forEach),ax=ix(ox.keys),DS=ax(new OS).next,MS=function(e,t,n){return n?NS({iterator:ax(e),next:DS},t):kS(e,t)},PS=ft,LS=lt,Gu=V2,Xu=Wm,Dg=PS.structuredClone,lx=!!Dg&&!LS(function(){if(Xu==="DENO"&&Gu>92||Xu==="NODE"&&Gu>94||Xu==="BROWSER"&&Gu>97)return!1;var e=new ArrayBuffer(8),t=Dg(e,{transfer:[e]});return e.byteLength!==0||t.byteLength!==8}),$d=ft,BS=zm,FS=lx,US=$d.structuredClone,Mg=$d.ArrayBuffer,za=$d.MessageChannel,Qf=!1,Yu,Pg,$a,Ku;if(FS)Qf=function(e){US(e,{transfer:[e]})};else if(Mg)try{za||(Yu=BS("worker_threads"),Yu&&(za=Yu.MessageChannel)),za&&(Pg=new za,$a=new Mg(2),Ku=function(e){Pg.port1.postMessage(null,[e])},$a.byteLength===2&&(Ku($a),$a.byteLength===0&&(Qf=Ku)))}catch{}var jS=Qf,WS=lt,zS=Pi,$S=!WS(function(){var e=new Error("a");return"stack"in e?(Object.defineProperty(e,"stack",zS(1,7)),e.stack!==7):!0}),VS=fn,Bt=ft,Eo=_n,ua=dt,Vd=lt,HS=wc,As=St,GS=lS,XS=Ls,Oc=yr,YS=md,KS=Md,cx=Yr,Fl=Sc,ZS=dr,QS=dS,Zu=vc,wl=oa,qS=gS,JS=IS,kc=TS,Hd=nx,e7=MS,Lg=jS,t7=$S,Gd=lx,ho=Bt.Object,r7=Bt.Array,ux=Bt.Date,fx=Bt.Error,n7=Bt.TypeError,i7=Bt.PerformanceMark,_i=Eo("DOMException"),qf=kc.Map,Xd=kc.has,dx=kc.get,Ul=kc.set,hx=Hd.Set,gx=Hd.add,s7=Hd.has,o7=Eo("Object","keys"),a7=ua([].push),l7=ua((!0).valueOf),c7=ua(1.1.valueOf),u7=ua("".valueOf),f7=ua(ux.prototype.getTime),Jf=HS("structuredClone"),Lo="DataCloneError",vl="Transferring",px=function(e){return!Vd(function(){var t=new Bt.Set([7]),n=e(t),o=e(ho(7));return n===t||!n.has(7)||!Oc(o)||+o!=7})&&e},Bg=function(e,t){return!Vd(function(){var n=new t,o=e({a:n,b:n});return!(o&&o.a===o.b&&o.a instanceof t&&o.a.stack===n.stack)})},d7=function(e){return!Vd(function(){var t=e(new Bt.AggregateError([1],Jf,{cause:3}));return t.name!=="AggregateError"||t.errors[0]!==1||t.message!==Jf||t.cause!==3})},Si=Bt.structuredClone,h7=!Bg(Si,fx)||!Bg(Si,_i)||!d7(Si),g7=!Si&&px(function(e){return new i7(Jf,{detail:e}).detail}),Gn=px(Si)||g7,Qu=function(e){throw new _i("Uncloneable type: "+e,Lo)},or=function(e,t){throw new _i((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",Lo)},qu=function(e,t){return Gn||or(t),Gn(e)},p7=function(){var e;try{e=new Bt.DataTransfer}catch{try{e=new Bt.ClipboardEvent("").clipboardData}catch{}}return e&&e.items&&e.files?e:null},mx=function(e,t,n){if(Xd(t,e))return dx(t,e);var o=n||Fl(e),c,f,g,x,w,m;if(o==="SharedArrayBuffer")Gn?c=Gn(e):c=e;else{var C=Bt.DataView;!C&&!As(e.slice)&&or("ArrayBuffer");try{if(As(e.slice)&&!e.resizable)c=e.slice(0);else for(f=e.byteLength,g=("maxByteLength"in e)?{maxByteLength:e.maxByteLength}:void 0,c=new ArrayBuffer(f,g),x=new C(e),w=new C(c),m=0;m<f;m++)w.setUint8(m,x.getUint8(m))}catch{throw new _i("ArrayBuffer is detached",Lo)}}return Ul(t,e,c),c},m7=function(e,t,n,o,c){var f=Bt[t];return Oc(f)||or(t),new f(mx(e.buffer,c),n,o)},Pt=function(e,t){if(YS(e)&&Qu("Symbol"),!Oc(e))return e;if(t){if(Xd(t,e))return dx(t,e)}else t=new qf;var n=Fl(e),o,c,f,g,x,w,m,C;switch(n){case"Array":f=r7(wl(e));break;case"Object":f={};break;case"Map":f=new qf;break;case"Set":f=new hx;break;case"RegExp":f=new RegExp(e.source,JS(e));break;case"Error":switch(c=e.name,c){case"AggregateError":f=new(Eo(c))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":f=new(Eo(c));break;case"CompileError":case"LinkError":case"RuntimeError":f=new(Eo("WebAssembly",c));break;default:f=new fx}break;case"DOMException":f=new _i(e.message,e.name);break;case"ArrayBuffer":case"SharedArrayBuffer":f=mx(e,t,n);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":w=n==="DataView"?e.byteLength:e.length,f=m7(e,n,e.byteOffset,w,t);break;case"DOMQuad":try{f=new DOMQuad(Pt(e.p1,t),Pt(e.p2,t),Pt(e.p3,t),Pt(e.p4,t))}catch{f=qu(e,n)}break;case"File":if(Gn)try{f=Gn(e),Fl(f)!==n&&(f=void 0)}catch{}if(!f)try{f=new File([e],e.name,e)}catch{}f||or(n);break;case"FileList":if(g=p7(),g){for(x=0,w=wl(e);x<w;x++)g.items.add(Pt(e[x],t));f=g.files}else f=qu(e,n);break;case"ImageData":try{f=new ImageData(Pt(e.data,t),e.width,e.height,{colorSpace:e.colorSpace})}catch{f=qu(e,n)}break;default:if(Gn)f=Gn(e);else switch(n){case"BigInt":f=ho(e.valueOf());break;case"Boolean":f=ho(l7(e));break;case"Number":f=ho(c7(e));break;case"String":f=ho(u7(e));break;case"Date":f=new ux(f7(e));break;case"Blob":try{f=e.slice(0,e.size,e.type)}catch{or(n)}break;case"DOMPoint":case"DOMPointReadOnly":o=Bt[n];try{f=o.fromPoint?o.fromPoint(e):new o(e.x,e.y,e.z,e.w)}catch{or(n)}break;case"DOMRect":case"DOMRectReadOnly":o=Bt[n];try{f=o.fromRect?o.fromRect(e):new o(e.x,e.y,e.width,e.height)}catch{or(n)}break;case"DOMMatrix":case"DOMMatrixReadOnly":o=Bt[n];try{f=o.fromMatrix?o.fromMatrix(e):new o(e)}catch{or(n)}break;case"AudioData":case"VideoFrame":As(e.clone)||or(n);try{f=e.clone()}catch{Qu(n)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":or(n);default:Qu(n)}}switch(Ul(t,e,f),n){case"Array":case"Object":for(m=o7(e),x=0,w=wl(m);x<w;x++)C=m[x],QS(f,C,Pt(e[C],t));break;case"Map":e.forEach(function(y,S){Ul(f,Pt(S,t),Pt(y,t))});break;case"Set":e.forEach(function(y){gx(f,Pt(y,t))});break;case"Error":Zu(f,"message",Pt(e.message,t)),ZS(e,"cause")&&Zu(f,"cause",Pt(e.cause,t)),c==="AggregateError"?f.errors=Pt(e.errors,t):c==="SuppressedError"&&(f.error=Pt(e.error,t),f.suppressed=Pt(e.suppressed,t));case"DOMException":t7&&Zu(f,"stack",Pt(e.stack,t))}return f},x7=function(e,t){if(!Oc(e))throw new n7("Transfer option cannot be converted to a sequence");var n=[];KS(e,function(S){a7(n,cx(S))});for(var o=0,c=wl(n),f=new hx,g,x,w,m,C,y;o<c;){if(g=n[o++],x=Fl(g),m=void 0,x==="ArrayBuffer"?s7(f,g):Xd(t,g))throw new _i("Duplicate transferable",Lo);if(x==="ArrayBuffer"){gx(f,g);continue}if(Gd)m=Si(g,{transfer:[g]});else switch(x){case"ImageBitmap":w=Bt.OffscreenCanvas,GS(w)||or(x,vl);try{C=new w(g.width,g.height),y=C.getContext("bitmaprenderer"),y.transferFromImageBitmap(g),m=C.transferToImageBitmap()}catch{}break;case"AudioData":case"VideoFrame":(!As(g.clone)||!As(g.close))&&or(x,vl);try{m=g.clone(),g.close()}catch{}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":or(x,vl)}if(m===void 0)throw new _i("This object cannot be transferred: "+x,Lo);Ul(t,g,m)}return f},w7=function(e){e7(e,function(t){Gd?Si(t,{transfer:[t]}):As(t.transfer)?t.transfer():Lg?Lg(t):or("ArrayBuffer",vl)})};VS({global:!0,enumerable:!0,sham:!Gd,forced:h7},{structuredClone:function(t){var n=qS(arguments.length,1)>1&&!XS(arguments[1])?cx(arguments[1]):void 0,o=n?n.transfer:void 0,c,f;o!==void 0&&(c=new qf,f=x7(o,c));var g=Pt(t,c);return f&&w7(f),g}});var v7=ft,y7=v7,E7=y7;E7.structuredClone;function b7(){typeof AbortSignal.timeout!="function"&&Object.defineProperty(AbortSignal,"timeout",{configurable:!0,writable:!0,value:e=>{const t=new AbortController;return setTimeout(()=>{t.abort(new DOMException("The operation timed out.","TimeoutError"))},e),t.signal}})}const C7=me.createContext(null),A7={},Fg=e=>{let t;const n=new Set,o=(C,y)=>{const S=typeof C=="function"?C(t):C;if(!Object.is(S,t)){const _=t;t=y??(typeof S!="object"||S===null)?S:Object.assign({},t,S),n.forEach(k=>k(t,_))}},c=()=>t,w={setState:o,getState:c,getInitialState:()=>m,subscribe:C=>(n.add(C),()=>n.delete(C)),destroy:()=>{(A7?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},m=t=e(o,c,w);return w},S7=e=>e?Fg(e):Fg;var xx={exports:{}},wx={},vx={exports:{}},yx={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* use-sync-external-store-shim.production.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var Ss=me;function I7(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var T7=typeof Object.is=="function"?Object.is:I7,R7=Ss.useState,_7=Ss.useEffect,N7=Ss.useLayoutEffect,O7=Ss.useDebugValue;function k7(e,t){var n=t(),o=R7({inst:{value:n,getSnapshot:t}}),c=o[0].inst,f=o[1];return N7(function(){c.value=n,c.getSnapshot=t,Ju(c)&&f({inst:c})},[e,n,t]),_7(function(){return Ju(c)&&f({inst:c}),e(function(){Ju(c)&&f({inst:c})})},[e]),O7(n),n}function Ju(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!T7(e,n)}catch{return!0}}function D7(e,t){return t()}var M7=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?D7:k7;yx.useSyncExternalStore=Ss.useSyncExternalStore!==void 0?Ss.useSyncExternalStore:M7;vx.exports=yx;var P7=vx.exports;/**
|
|
27
|
-
* @license React
|
|
28
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var Dc=me,L7=P7;function B7(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var F7=typeof Object.is=="function"?Object.is:B7,U7=L7.useSyncExternalStore,j7=Dc.useRef,W7=Dc.useEffect,z7=Dc.useMemo,$7=Dc.useDebugValue;wx.useSyncExternalStoreWithSelector=function(e,t,n,o,c){var f=j7(null);if(f.current===null){var g={hasValue:!1,value:null};f.current=g}else g=f.current;f=z7(function(){function w(_){if(!m){if(m=!0,C=_,_=o(_),c!==void 0&&g.hasValue){var k=g.value;if(c(k,_))return y=k}return y=_}if(k=y,F7(C,_))return k;var D=o(_);return c!==void 0&&c(k,D)?(C=_,k):(C=_,y=D)}var m=!1,C,y,S=n===void 0?null:n;return[function(){return w(t())},S===null?void 0:function(){return w(S())}]},[t,n,o,c]);var x=U7(e,f[0],f[1]);return W7(function(){g.hasValue=!0,g.value=x},[x]),$7(x),x};xx.exports=wx;var V7=xx.exports;const H7=C2(V7),Ex={},{useDebugValue:G7}=X3,{useSyncExternalStoreWithSelector:X7}=H7;let Ug=!1;const Y7=e=>e;function K7(e,t=Y7,n){(Ex?"production":void 0)!=="production"&&n&&!Ug&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Ug=!0);const o=X7(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return G7(o),o}const jg=e=>{(Ex?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?S7(e):e,n=(o,c)=>K7(t,o,c);return Object.assign(n,t),n},Z7=e=>e?jg(e):jg,Q7={};function q7(e,t){let n;try{n=e()}catch{return}return{getItem:c=>{var f;const g=w=>w===null?null:JSON.parse(w,void 0),x=(f=n.getItem(c))!=null?f:null;return x instanceof Promise?x.then(g):g(x)},setItem:(c,f)=>n.setItem(c,JSON.stringify(f,void 0)),removeItem:c=>n.removeItem(c)}}const Bo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(o){return Bo(o)(n)},catch(o){return this}}}catch(n){return{then(o){return this},catch(o){return Bo(o)(n)}}}},J7=(e,t)=>(n,o,c)=>{let f={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:X=>X,version:0,merge:(X,O)=>({...O,...X}),...t},g=!1;const x=new Set,w=new Set;let m;try{m=f.getStorage()}catch{}if(!m)return e((...X)=>{console.warn(`[zustand persist middleware] Unable to update item '${f.name}', the given storage is currently unavailable.`),n(...X)},o,c);const C=Bo(f.serialize),y=()=>{const X=f.partialize({...o()});let O;const I=C({state:X,version:f.version}).then(R=>m.setItem(f.name,R)).catch(R=>{O=R});if(O)throw O;return I},S=c.setState;c.setState=(X,O)=>{S(X,O),y()};const _=e((...X)=>{n(...X),y()},o,c);let k;const D=()=>{var X;if(!m)return;g=!1,x.forEach(I=>I(o()));const O=((X=f.onRehydrateStorage)==null?void 0:X.call(f,o()))||void 0;return Bo(m.getItem.bind(m))(f.name).then(I=>{if(I)return f.deserialize(I)}).then(I=>{if(I)if(typeof I.version=="number"&&I.version!==f.version){if(f.migrate)return f.migrate(I.state,I.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return I.state}).then(I=>{var R;return k=f.merge(I,(R=o())!=null?R:_),n(k,!0),y()}).then(()=>{O==null||O(k,void 0),g=!0,w.forEach(I=>I(k))}).catch(I=>{O==null||O(void 0,I)})};return c.persist={setOptions:X=>{f={...f,...X},X.getStorage&&(m=X.getStorage())},clearStorage:()=>{m==null||m.removeItem(f.name)},getOptions:()=>f,rehydrate:()=>D(),hasHydrated:()=>g,onHydrate:X=>(x.add(X),()=>{x.delete(X)}),onFinishHydration:X=>(w.add(X),()=>{w.delete(X)})},D(),k||_},e5=(e,t)=>(n,o,c)=>{let f={storage:q7(()=>localStorage),partialize:D=>D,version:0,merge:(D,X)=>({...X,...D}),...t},g=!1;const x=new Set,w=new Set;let m=f.storage;if(!m)return e((...D)=>{console.warn(`[zustand persist middleware] Unable to update item '${f.name}', the given storage is currently unavailable.`),n(...D)},o,c);const C=()=>{const D=f.partialize({...o()});return m.setItem(f.name,{state:D,version:f.version})},y=c.setState;c.setState=(D,X)=>{y(D,X),C()};const S=e((...D)=>{n(...D),C()},o,c);c.getInitialState=()=>S;let _;const k=()=>{var D,X;if(!m)return;g=!1,x.forEach(I=>{var R;return I((R=o())!=null?R:S)});const O=((X=f.onRehydrateStorage)==null?void 0:X.call(f,(D=o())!=null?D:S))||void 0;return Bo(m.getItem.bind(m))(f.name).then(I=>{if(I)if(typeof I.version=="number"&&I.version!==f.version){if(f.migrate)return[!0,f.migrate(I.state,I.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,I.state];return[!1,void 0]}).then(I=>{var R;const[U,G]=I;if(_=f.merge(G,(R=o())!=null?R:S),n(_,!0),U)return C()}).then(()=>{O==null||O(_,void 0),_=o(),g=!0,w.forEach(I=>I(_))}).catch(I=>{O==null||O(void 0,I)})};return c.persist={setOptions:D=>{f={...f,...D},D.storage&&(m=D.storage)},clearStorage:()=>{m==null||m.removeItem(f.name)},getOptions:()=>f,rehydrate:()=>k(),hasHydrated:()=>g,onHydrate:D=>(x.add(D),()=>{x.delete(D)}),onFinishHydration:D=>(w.add(D),()=>{w.delete(D)})},f.skipHydration||k(),_||S},t5=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Q7?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),J7(e,t)):e5(e,t),r5=t5;function n5(){return typeof document<"u"&&document.body.dataset.webShell==="1"}function bx(){return typeof navigator>"u"?!1:n5()||!/Electron\//i.test(navigator.userAgent)}function h_(e=900){const[t,n]=me.useState(()=>typeof window<"u"&&window.innerWidth<e);return me.useEffect(()=>{const o=window.matchMedia(`(max-width: ${e-1}px)`),c=f=>n(f.matches);return n(o.matches),o.addEventListener("change",c),()=>o.removeEventListener("change",c)},[e]),t}const Wg={classic:"原布局","agent-rail":"单层抬头","all-sessions":"所有会话"},i5="agent-rail",s5="agent-web-shell:navigation-layout:v1";function Cx(e){return e==="classic"||e==="agent-rail"||e==="all-sessions"}function o5(e){return e==="classic"?"agent-rail":e==="agent-rail"?"all-sessions":"classic"}function g_(e){return`${Wg[e]} · 切换到${Wg[o5(e)]}`}function a5(e){if(!e||typeof e!="object")return null;const t=e;return t.type===s5&&Cx(t.navigationLayout)?t.navigationLayout:null}const zg=[{id:"glass",label:"毛玻璃",preview:["#c3dbee","#357b88"]},{id:"pearl",label:"珍珠白",preview:["#f5f6fa","#4f6ef7"]},{id:"scifi",label:"科幻霓虹",preview:["#050a14","#22d3ee"]},{id:"noir",label:"暗夜黑",preview:["#0f1115","#a78bfa"]},{id:"mist",label:"雾白靛蓝",preview:["#f7f8fb","#4258c4"]},{id:"pine",label:"暖灰松绿",preview:["#f6f7f3","#356c55"]},{id:"graphite",label:"石墨夜色",preview:["#202630","#a4bad2"]}],p_=[{id:"standard",label:"标准",description:"侧边栏 + 对话区"},{id:"focus",label:"专注",description:"隐藏侧边栏,居中沉浸对话"},{id:"compact",label:"紧凑",description:"更小间距与字号,信息密度优先"}],Ax=4;function Sx(e){return Array.isArray(e)?[...new Set(e.filter(t=>typeof t=="string"&&t.length>0))]:[]}function l5(e,t){const n=e??{};return{...n.skin!==void 0?{skin:n.skin}:{},...n.layout!==void 0?{layout:n.layout}:{},...Cx(n.navigationLayout)?{navigationLayout:n.navigationLayout}:{},...n.autoSpeak!==void 0?{autoSpeak:n.autoSpeak}:{},...n.wakeEnabled!==void 0?{wakeEnabled:n.wakeEnabled}:{},...n.wakeWord!==void 0?{wakeWord:n.wakeWord}:{},...n.runningFirst!==void 0?{runningFirst:n.runningFirst}:{},...typeof n.dashboardSessionsMerged=="boolean"?{dashboardSessionsMerged:n.dashboardSessionsMerged}:{},pinnedSessionIds:Sx(n.pinnedSessionIds),...t<Ax&&bx()?{wakeEnabled:!1}:{}}}function c5(e=bx()){return!e}const Fo=Z7()(r5(e=>({skin:"pearl",layout:"standard",navigationLayout:i5,autoSpeak:!1,wakeEnabled:c5(),wakeWord:"小智",runningFirst:!1,dashboardSessionsMerged:!1,pinnedSessionIds:[],setSkin:t=>e({skin:t}),setLayout:t=>e({layout:t}),setNavigationLayout:t=>e({navigationLayout:t}),setAutoSpeak:t=>e({autoSpeak:t}),setWakeEnabled:t=>e({wakeEnabled:t}),setWakeWord:t=>e({wakeWord:t}),setRunningFirst:t=>e({runningFirst:t}),setDashboardSessionsMerged:t=>e({dashboardSessionsMerged:t}),togglePinnedSession:t=>e(n=>({pinnedSessionIds:n.pinnedSessionIds.includes(t)?n.pinnedSessionIds.filter(o=>o!==t):Sx([...n.pinnedSessionIds,t])})),removePinnedSessions:t=>e(n=>{const o=new Set(t);return{pinnedSessionIds:n.pinnedSessionIds.filter(c=>!o.has(c))}})}),{name:"agent-ui-prefs",version:Ax,migrate:l5}));var Ix={exports:{}},br={},Tx={exports:{}},Rx={};/**
|
|
35
|
-
* @license React
|
|
36
|
-
* scheduler.production.min.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/(function(e){function t(re,fe){var ge=re.length;re.push(fe);e:for(;0<ge;){var Pe=ge-1>>>1,Ae=re[Pe];if(0<c(Ae,fe))re[Pe]=fe,re[ge]=Ae,ge=Pe;else break e}}function n(re){return re.length===0?null:re[0]}function o(re){if(re.length===0)return null;var fe=re[0],ge=re.pop();if(ge!==fe){re[0]=ge;e:for(var Pe=0,Ae=re.length,wt=Ae>>>1;Pe<wt;){var ze=2*(Pe+1)-1,dn=re[ze],ce=ze+1,Mr=re[ce];if(0>c(dn,ge))ce<Ae&&0>c(Mr,dn)?(re[Pe]=Mr,re[ce]=ge,Pe=ce):(re[Pe]=dn,re[ze]=ge,Pe=ze);else if(ce<Ae&&0>c(Mr,ge))re[Pe]=Mr,re[ce]=ge,Pe=ce;else break e}}return fe}function c(re,fe){var ge=re.sortIndex-fe.sortIndex;return ge!==0?ge:re.id-fe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;e.unstable_now=function(){return f.now()}}else{var g=Date,x=g.now();e.unstable_now=function(){return g.now()-x}}var w=[],m=[],C=1,y=null,S=3,_=!1,k=!1,D=!1,X=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(re){for(var fe=n(m);fe!==null;){if(fe.callback===null)o(m);else if(fe.startTime<=re)o(m),fe.sortIndex=fe.expirationTime,t(w,fe);else break;fe=n(m)}}function U(re){if(D=!1,R(re),!k)if(n(w)!==null)k=!0,ve(G);else{var fe=n(m);fe!==null&&he(U,fe.startTime-re)}}function G(re,fe){k=!1,D&&(D=!1,O(Y),Y=-1),_=!0;var ge=S;try{for(R(fe),y=n(w);y!==null&&(!(y.expirationTime>fe)||re&&!Ee());){var Pe=y.callback;if(typeof Pe=="function"){y.callback=null,S=y.priorityLevel;var Ae=Pe(y.expirationTime<=fe);fe=e.unstable_now(),typeof Ae=="function"?y.callback=Ae:y===n(w)&&o(w),R(fe)}else o(w);y=n(w)}if(y!==null)var wt=!0;else{var ze=n(m);ze!==null&&he(U,ze.startTime-fe),wt=!1}return wt}finally{y=null,S=ge,_=!1}}var W=!1,B=null,Y=-1,$=5,ae=-1;function Ee(){return!(e.unstable_now()-ae<$)}function ne(){if(B!==null){var re=e.unstable_now();ae=re;var fe=!0;try{fe=B(!0,re)}finally{fe?K():(W=!1,B=null)}}else W=!1}var K;if(typeof I=="function")K=function(){I(ne)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,j=le.port2;le.port1.onmessage=ne,K=function(){j.postMessage(null)}}else K=function(){X(ne,0)};function ve(re){B=re,W||(W=!0,K())}function he(re,fe){Y=X(function(){re(e.unstable_now())},fe)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(re){re.callback=null},e.unstable_continueExecution=function(){k||_||(k=!0,ve(G))},e.unstable_forceFrameRate=function(re){0>re||125<re?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<re?Math.floor(1e3/re):5},e.unstable_getCurrentPriorityLevel=function(){return S},e.unstable_getFirstCallbackNode=function(){return n(w)},e.unstable_next=function(re){switch(S){case 1:case 2:case 3:var fe=3;break;default:fe=S}var ge=S;S=fe;try{return re()}finally{S=ge}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(re,fe){switch(re){case 1:case 2:case 3:case 4:case 5:break;default:re=3}var ge=S;S=re;try{return fe()}finally{S=ge}},e.unstable_scheduleCallback=function(re,fe,ge){var Pe=e.unstable_now();switch(typeof ge=="object"&&ge!==null?(ge=ge.delay,ge=typeof ge=="number"&&0<ge?Pe+ge:Pe):ge=Pe,re){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=ge+Ae,re={id:C++,callback:fe,priorityLevel:re,startTime:ge,expirationTime:Ae,sortIndex:-1},ge>Pe?(re.sortIndex=ge,t(m,re),n(w)===null&&re===n(m)&&(D?(O(Y),Y=-1):D=!0,he(U,ge-Pe))):(re.sortIndex=Ae,t(w,re),k||_||(k=!0,ve(G))),re},e.unstable_shouldYield=Ee,e.unstable_wrapCallback=function(re){var fe=S;return function(){var ge=S;S=fe;try{return re.apply(this,arguments)}finally{S=ge}}}})(Rx);Tx.exports=Rx;var u5=Tx.exports;/**
|
|
43
|
-
* @license React
|
|
44
|
-
* react-dom.production.min.js
|
|
45
|
-
*
|
|
46
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
47
|
-
*
|
|
48
|
-
* This source code is licensed under the MIT license found in the
|
|
49
|
-
* LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/var f5=me,vr=u5;function q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var _x=new Set,Uo={};function Bi(e,t){Is(e,t),Is(e+"Capture",t)}function Is(e,t){for(Uo[e]=t,e=0;e<t.length;e++)_x.add(t[e])}var An=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),e1=Object.prototype.hasOwnProperty,d5=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,$g={},Vg={};function h5(e){return e1.call(Vg,e)?!0:e1.call($g,e)?!1:d5.test(e)?Vg[e]=!0:($g[e]=!0,!1)}function g5(e,t,n,o){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function p5(e,t,n,o){if(t===null||typeof t>"u"||g5(e,t,n,o))return!0;if(o)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Jt(e,t,n,o,c,f,g){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=c,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=f,this.removeEmptyString=g}var Ut={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ut[e]=new Jt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ut[t]=new Jt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ut[e]=new Jt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ut[e]=new Jt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ut[e]=new Jt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ut[e]=new Jt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ut[e]=new Jt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ut[e]=new Jt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ut[e]=new Jt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Yd=/[\-:]([a-z])/g;function Kd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Yd,Kd);Ut[t]=new Jt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Yd,Kd);Ut[t]=new Jt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Yd,Kd);Ut[t]=new Jt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ut[e]=new Jt(e,1,!1,e.toLowerCase(),null,!1,!1)});Ut.xlinkHref=new Jt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ut[e]=new Jt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Zd(e,t,n,o){var c=Ut.hasOwnProperty(t)?Ut[t]:null;(c!==null?c.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(p5(t,n,c,o)&&(n=null),o||c===null?h5(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):c.mustUseProperty?e[c.propertyName]=n===null?c.type===3?!1:"":n:(t=c.attributeName,o=c.attributeNamespace,n===null?e.removeAttribute(t):(c=c.type,n=c===3||c===4&&n===!0?"":""+n,o?e.setAttributeNS(o,t,n):e.setAttribute(t,n))))}var Nn=f5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Va=Symbol.for("react.element"),es=Symbol.for("react.portal"),ts=Symbol.for("react.fragment"),Qd=Symbol.for("react.strict_mode"),t1=Symbol.for("react.profiler"),Nx=Symbol.for("react.provider"),Ox=Symbol.for("react.context"),qd=Symbol.for("react.forward_ref"),r1=Symbol.for("react.suspense"),n1=Symbol.for("react.suspense_list"),Jd=Symbol.for("react.memo"),jn=Symbol.for("react.lazy"),kx=Symbol.for("react.offscreen"),Hg=Symbol.iterator;function ro(e){return e===null||typeof e!="object"?null:(e=Hg&&e[Hg]||e["@@iterator"],typeof e=="function"?e:null)}var rt=Object.assign,ef;function go(e){if(ef===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ef=t&&t[1]||""}return`
|
|
51
|
-
`+ef+e}var tf=!1;function rf(e,t){if(!e||tf)return"";tf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(m){var o=m}Reflect.construct(e,[],t)}else{try{t.call()}catch(m){o=m}e.call(t.prototype)}else{try{throw Error()}catch(m){o=m}e()}}catch(m){if(m&&o&&typeof m.stack=="string"){for(var c=m.stack.split(`
|
|
52
|
-
`),f=o.stack.split(`
|
|
53
|
-
`),g=c.length-1,x=f.length-1;1<=g&&0<=x&&c[g]!==f[x];)x--;for(;1<=g&&0<=x;g--,x--)if(c[g]!==f[x]){if(g!==1||x!==1)do if(g--,x--,0>x||c[g]!==f[x]){var w=`
|
|
54
|
-
`+c[g].replace(" at new "," at ");return e.displayName&&w.includes("<anonymous>")&&(w=w.replace("<anonymous>",e.displayName)),w}while(1<=g&&0<=x);break}}}finally{tf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?go(e):""}function m5(e){switch(e.tag){case 5:return go(e.type);case 16:return go("Lazy");case 13:return go("Suspense");case 19:return go("SuspenseList");case 0:case 2:case 15:return e=rf(e.type,!1),e;case 11:return e=rf(e.type.render,!1),e;case 1:return e=rf(e.type,!0),e;default:return""}}function i1(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ts:return"Fragment";case es:return"Portal";case t1:return"Profiler";case Qd:return"StrictMode";case r1:return"Suspense";case n1:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ox:return(e.displayName||"Context")+".Consumer";case Nx:return(e._context.displayName||"Context")+".Provider";case qd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Jd:return t=e.displayName||null,t!==null?t:i1(e.type)||"Memo";case jn:t=e._payload,e=e._init;try{return i1(e(t))}catch{}}return null}function x5(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return i1(t);case 8:return t===Qd?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ni(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Dx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function w5(e){var t=Dx(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var c=n.get,f=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(g){o=""+g,f.call(this,g)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return o},setValue:function(g){o=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ha(e){e._valueTracker||(e._valueTracker=w5(e))}function Mx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=Dx(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function jl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function s1(e,t){var n=t.checked;return rt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gg(e,t){var n=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;n=ni(t.value!=null?t.value:n),e._wrapperState={initialChecked:o,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Px(e,t){t=t.checked,t!=null&&Zd(e,"checked",t,!1)}function o1(e,t){Px(e,t);var n=ni(t.value),o=t.type;if(n!=null)o==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?a1(e,t.type,n):t.hasOwnProperty("defaultValue")&&a1(e,t.type,ni(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Xg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function a1(e,t,n){(t!=="number"||jl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var po=Array.isArray;function ms(e,t,n,o){if(e=e.options,t){t={};for(var c=0;c<n.length;c++)t["$"+n[c]]=!0;for(n=0;n<e.length;n++)c=t.hasOwnProperty("$"+e[n].value),e[n].selected!==c&&(e[n].selected=c),c&&o&&(e[n].defaultSelected=!0)}else{for(n=""+ni(n),t=null,c=0;c<e.length;c++){if(e[c].value===n){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function l1(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(q(91));return rt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Yg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(q(92));if(po(n)){if(1<n.length)throw Error(q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ni(n)}}function Lx(e,t){var n=ni(t.value),o=ni(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),o!=null&&(e.defaultValue=""+o)}function Kg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Bx(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function c1(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Bx(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ga,Fx=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,o,c){MSApp.execUnsafeLocalFunction(function(){return e(t,n,o,c)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ga=Ga||document.createElement("div"),Ga.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ga.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function jo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var bo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},v5=["Webkit","ms","Moz","O"];Object.keys(bo).forEach(function(e){v5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bo[t]=bo[e]})});function Ux(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||bo.hasOwnProperty(e)&&bo[e]?(""+t).trim():t+"px"}function jx(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var o=n.indexOf("--")===0,c=Ux(n,t[n],o);n==="float"&&(n="cssFloat"),o?e.setProperty(n,c):e[n]=c}}var y5=rt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function u1(e,t){if(t){if(y5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(q(62))}}function f1(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var d1=null;function e0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var h1=null,xs=null,ws=null;function Zg(e){if(e=ha(e)){if(typeof h1!="function")throw Error(q(280));var t=e.stateNode;t&&(t=Fc(t),h1(e.stateNode,e.type,t))}}function Wx(e){xs?ws?ws.push(e):ws=[e]:xs=e}function zx(){if(xs){var e=xs,t=ws;if(ws=xs=null,Zg(e),t)for(e=0;e<t.length;e++)Zg(t[e])}}function $x(e,t){return e(t)}function Vx(){}var nf=!1;function Hx(e,t,n){if(nf)return e(t,n);nf=!0;try{return $x(e,t,n)}finally{nf=!1,(xs!==null||ws!==null)&&(Vx(),zx())}}function Wo(e,t){var n=e.stateNode;if(n===null)return null;var o=Fc(n);if(o===null)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(q(231,t,typeof n));return n}var g1=!1;if(An)try{var no={};Object.defineProperty(no,"passive",{get:function(){g1=!0}}),window.addEventListener("test",no,no),window.removeEventListener("test",no,no)}catch{g1=!1}function E5(e,t,n,o,c,f,g,x,w){var m=Array.prototype.slice.call(arguments,3);try{t.apply(n,m)}catch(C){this.onError(C)}}var Co=!1,Wl=null,zl=!1,p1=null,b5={onError:function(e){Co=!0,Wl=e}};function C5(e,t,n,o,c,f,g,x,w){Co=!1,Wl=null,E5.apply(b5,arguments)}function A5(e,t,n,o,c,f,g,x,w){if(C5.apply(this,arguments),Co){if(Co){var m=Wl;Co=!1,Wl=null}else throw Error(q(198));zl||(zl=!0,p1=m)}}function Fi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Gx(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Qg(e){if(Fi(e)!==e)throw Error(q(188))}function S5(e){var t=e.alternate;if(!t){if(t=Fi(e),t===null)throw Error(q(188));return t!==e?null:e}for(var n=e,o=t;;){var c=n.return;if(c===null)break;var f=c.alternate;if(f===null){if(o=c.return,o!==null){n=o;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===n)return Qg(c),e;if(f===o)return Qg(c),t;f=f.sibling}throw Error(q(188))}if(n.return!==o.return)n=c,o=f;else{for(var g=!1,x=c.child;x;){if(x===n){g=!0,n=c,o=f;break}if(x===o){g=!0,o=c,n=f;break}x=x.sibling}if(!g){for(x=f.child;x;){if(x===n){g=!0,n=f,o=c;break}if(x===o){g=!0,o=f,n=c;break}x=x.sibling}if(!g)throw Error(q(189))}}if(n.alternate!==o)throw Error(q(190))}if(n.tag!==3)throw Error(q(188));return n.stateNode.current===n?e:t}function Xx(e){return e=S5(e),e!==null?Yx(e):null}function Yx(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Yx(e);if(t!==null)return t;e=e.sibling}return null}var Kx=vr.unstable_scheduleCallback,qg=vr.unstable_cancelCallback,I5=vr.unstable_shouldYield,T5=vr.unstable_requestPaint,ut=vr.unstable_now,R5=vr.unstable_getCurrentPriorityLevel,t0=vr.unstable_ImmediatePriority,Zx=vr.unstable_UserBlockingPriority,$l=vr.unstable_NormalPriority,_5=vr.unstable_LowPriority,Qx=vr.unstable_IdlePriority,Mc=null,an=null;function N5(e){if(an&&typeof an.onCommitFiberRoot=="function")try{an.onCommitFiberRoot(Mc,e,void 0,(e.current.flags&128)===128)}catch{}}var Vr=Math.clz32?Math.clz32:D5,O5=Math.log,k5=Math.LN2;function D5(e){return e>>>=0,e===0?32:31-(O5(e)/k5|0)|0}var Xa=64,Ya=4194304;function mo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Vl(e,t){var n=e.pendingLanes;if(n===0)return 0;var o=0,c=e.suspendedLanes,f=e.pingedLanes,g=n&268435455;if(g!==0){var x=g&~c;x!==0?o=mo(x):(f&=g,f!==0&&(o=mo(f)))}else g=n&~c,g!==0?o=mo(g):f!==0&&(o=mo(f));if(o===0)return 0;if(t!==0&&t!==o&&!(t&c)&&(c=o&-o,f=t&-t,c>=f||c===16&&(f&4194240)!==0))return t;if(o&4&&(o|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)n=31-Vr(t),c=1<<n,o|=e[n],t&=~c;return o}function M5(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function P5(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes;0<f;){var g=31-Vr(f),x=1<<g,w=c[g];w===-1?(!(x&n)||x&o)&&(c[g]=M5(x,t)):w<=t&&(e.expiredLanes|=x),f&=~x}}function m1(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function qx(){var e=Xa;return Xa<<=1,!(Xa&4194240)&&(Xa=64),e}function sf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function fa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Vr(t),e[t]=n}function L5(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<n;){var c=31-Vr(n),f=1<<c;t[c]=0,o[c]=-1,e[c]=-1,n&=~f}}function r0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-Vr(n),c=1<<o;c&t|e[o]&t&&(e[o]|=t),n&=~c}}var Be=0;function Jx(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var ew,n0,tw,rw,nw,x1=!1,Ka=[],Kn=null,Zn=null,Qn=null,zo=new Map,$o=new Map,$n=[],B5="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Jg(e,t){switch(e){case"focusin":case"focusout":Kn=null;break;case"dragenter":case"dragleave":Zn=null;break;case"mouseover":case"mouseout":Qn=null;break;case"pointerover":case"pointerout":zo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$o.delete(t.pointerId)}}function io(e,t,n,o,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:n,eventSystemFlags:o,nativeEvent:f,targetContainers:[c]},t!==null&&(t=ha(t),t!==null&&n0(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function F5(e,t,n,o,c){switch(t){case"focusin":return Kn=io(Kn,e,t,n,o,c),!0;case"dragenter":return Zn=io(Zn,e,t,n,o,c),!0;case"mouseover":return Qn=io(Qn,e,t,n,o,c),!0;case"pointerover":var f=c.pointerId;return zo.set(f,io(zo.get(f)||null,e,t,n,o,c)),!0;case"gotpointercapture":return f=c.pointerId,$o.set(f,io($o.get(f)||null,e,t,n,o,c)),!0}return!1}function iw(e){var t=bi(e.target);if(t!==null){var n=Fi(t);if(n!==null){if(t=n.tag,t===13){if(t=Gx(n),t!==null){e.blockedOn=t,nw(e.priority,function(){tw(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=w1(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);d1=o,n.target.dispatchEvent(o),d1=null}else return t=ha(n),t!==null&&n0(t),e.blockedOn=n,!1;t.shift()}return!0}function ep(e,t,n){yl(e)&&n.delete(t)}function U5(){x1=!1,Kn!==null&&yl(Kn)&&(Kn=null),Zn!==null&&yl(Zn)&&(Zn=null),Qn!==null&&yl(Qn)&&(Qn=null),zo.forEach(ep),$o.forEach(ep)}function so(e,t){e.blockedOn===t&&(e.blockedOn=null,x1||(x1=!0,vr.unstable_scheduleCallback(vr.unstable_NormalPriority,U5)))}function Vo(e){function t(c){return so(c,e)}if(0<Ka.length){so(Ka[0],e);for(var n=1;n<Ka.length;n++){var o=Ka[n];o.blockedOn===e&&(o.blockedOn=null)}}for(Kn!==null&&so(Kn,e),Zn!==null&&so(Zn,e),Qn!==null&&so(Qn,e),zo.forEach(t),$o.forEach(t),n=0;n<$n.length;n++)o=$n[n],o.blockedOn===e&&(o.blockedOn=null);for(;0<$n.length&&(n=$n[0],n.blockedOn===null);)iw(n),n.blockedOn===null&&$n.shift()}var vs=Nn.ReactCurrentBatchConfig,Hl=!0;function j5(e,t,n,o){var c=Be,f=vs.transition;vs.transition=null;try{Be=1,i0(e,t,n,o)}finally{Be=c,vs.transition=f}}function W5(e,t,n,o){var c=Be,f=vs.transition;vs.transition=null;try{Be=4,i0(e,t,n,o)}finally{Be=c,vs.transition=f}}function i0(e,t,n,o){if(Hl){var c=w1(e,t,n,o);if(c===null)pf(e,t,o,Gl,n),Jg(e,o);else if(F5(c,e,t,n,o))o.stopPropagation();else if(Jg(e,o),t&4&&-1<B5.indexOf(e)){for(;c!==null;){var f=ha(c);if(f!==null&&ew(f),f=w1(e,t,n,o),f===null&&pf(e,t,o,Gl,n),f===c)break;c=f}c!==null&&o.stopPropagation()}else pf(e,t,o,null,n)}}var Gl=null;function w1(e,t,n,o){if(Gl=null,e=e0(o),e=bi(e),e!==null)if(t=Fi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Gx(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gl=e,null}function sw(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(R5()){case t0:return 1;case Zx:return 4;case $l:case _5:return 16;case Qx:return 536870912;default:return 16}default:return 16}}var Xn=null,s0=null,El=null;function ow(){if(El)return El;var e,t=s0,n=t.length,o,c="value"in Xn?Xn.value:Xn.textContent,f=c.length;for(e=0;e<n&&t[e]===c[e];e++);var g=n-e;for(o=1;o<=g&&t[n-o]===c[f-o];o++);return El=c.slice(e,1<o?1-o:void 0)}function bl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Za(){return!0}function tp(){return!1}function Cr(e){function t(n,o,c,f,g){this._reactName=n,this._targetInst=c,this.type=o,this.nativeEvent=f,this.target=g,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(n=e[x],this[x]=n?n(f):f[x]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Za:tp,this.isPropagationStopped=tp,this}return rt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Za)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Za)},persist:function(){},isPersistent:Za}),t}var Fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},o0=Cr(Fs),da=rt({},Fs,{view:0,detail:0}),z5=Cr(da),of,af,oo,Pc=rt({},da,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:a0,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==oo&&(oo&&e.type==="mousemove"?(of=e.screenX-oo.screenX,af=e.screenY-oo.screenY):af=of=0,oo=e),of)},movementY:function(e){return"movementY"in e?e.movementY:af}}),rp=Cr(Pc),$5=rt({},Pc,{dataTransfer:0}),V5=Cr($5),H5=rt({},da,{relatedTarget:0}),lf=Cr(H5),G5=rt({},Fs,{animationName:0,elapsedTime:0,pseudoElement:0}),X5=Cr(G5),Y5=rt({},Fs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),K5=Cr(Y5),Z5=rt({},Fs,{data:0}),np=Cr(Z5),Q5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},q5={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},J5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eI(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=J5[e])?!!t[e]:!1}function a0(){return eI}var tI=rt({},da,{key:function(e){if(e.key){var t=Q5[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?q5[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:a0,charCode:function(e){return e.type==="keypress"?bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rI=Cr(tI),nI=rt({},Pc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ip=Cr(nI),iI=rt({},da,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:a0}),sI=Cr(iI),oI=rt({},Fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),aI=Cr(oI),lI=rt({},Pc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),cI=Cr(lI),uI=[9,13,27,32],l0=An&&"CompositionEvent"in window,Ao=null;An&&"documentMode"in document&&(Ao=document.documentMode);var fI=An&&"TextEvent"in window&&!Ao,aw=An&&(!l0||Ao&&8<Ao&&11>=Ao),sp=" ",op=!1;function lw(e,t){switch(e){case"keyup":return uI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rs=!1;function dI(e,t){switch(e){case"compositionend":return cw(t);case"keypress":return t.which!==32?null:(op=!0,sp);case"textInput":return e=t.data,e===sp&&op?null:e;default:return null}}function hI(e,t){if(rs)return e==="compositionend"||!l0&&lw(e,t)?(e=ow(),El=s0=Xn=null,rs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return aw&&t.locale!=="ko"?null:t.data;default:return null}}var gI={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ap(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!gI[e.type]:t==="textarea"}function uw(e,t,n,o){Wx(o),t=Xl(t,"onChange"),0<t.length&&(n=new o0("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var So=null,Ho=null;function pI(e){Ew(e,0)}function Lc(e){var t=ss(e);if(Mx(t))return e}function mI(e,t){if(e==="change")return t}var fw=!1;if(An){var cf;if(An){var uf="oninput"in document;if(!uf){var lp=document.createElement("div");lp.setAttribute("oninput","return;"),uf=typeof lp.oninput=="function"}cf=uf}else cf=!1;fw=cf&&(!document.documentMode||9<document.documentMode)}function cp(){So&&(So.detachEvent("onpropertychange",dw),Ho=So=null)}function dw(e){if(e.propertyName==="value"&&Lc(Ho)){var t=[];uw(t,Ho,e,e0(e)),Hx(pI,t)}}function xI(e,t,n){e==="focusin"?(cp(),So=t,Ho=n,So.attachEvent("onpropertychange",dw)):e==="focusout"&&cp()}function wI(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Lc(Ho)}function vI(e,t){if(e==="click")return Lc(t)}function yI(e,t){if(e==="input"||e==="change")return Lc(t)}function EI(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gr=typeof Object.is=="function"?Object.is:EI;function Go(e,t){if(Gr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++){var c=n[o];if(!e1.call(t,c)||!Gr(e[c],t[c]))return!1}return!0}function up(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fp(e,t){var n=up(e);e=0;for(var o;n;){if(n.nodeType===3){if(o=e+n.textContent.length,e<=t&&o>=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=up(n)}}function hw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gw(){for(var e=window,t=jl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=jl(e.document)}return t}function c0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function bI(e){var t=gw(),n=e.focusedElem,o=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hw(n.ownerDocument.documentElement,n)){if(o!==null&&c0(n)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=n.textContent.length,f=Math.min(o.start,c);o=o.end===void 0?f:Math.min(o.end,c),!e.extend&&f>o&&(c=o,o=f,f=c),c=fp(n,f);var g=fp(n,o);c&&g&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==g.node||e.focusOffset!==g.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),f>o?(e.addRange(t),e.extend(g.node,g.offset)):(t.setEnd(g.node,g.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var CI=An&&"documentMode"in document&&11>=document.documentMode,ns=null,v1=null,Io=null,y1=!1;function dp(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;y1||ns==null||ns!==jl(o)||(o=ns,"selectionStart"in o&&c0(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Io&&Go(Io,o)||(Io=o,o=Xl(v1,"onSelect"),0<o.length&&(t=new o0("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=ns)))}function Qa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var is={animationend:Qa("Animation","AnimationEnd"),animationiteration:Qa("Animation","AnimationIteration"),animationstart:Qa("Animation","AnimationStart"),transitionend:Qa("Transition","TransitionEnd")},ff={},pw={};An&&(pw=document.createElement("div").style,"AnimationEvent"in window||(delete is.animationend.animation,delete is.animationiteration.animation,delete is.animationstart.animation),"TransitionEvent"in window||delete is.transitionend.transition);function Bc(e){if(ff[e])return ff[e];if(!is[e])return e;var t=is[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in pw)return ff[e]=t[n];return e}var mw=Bc("animationend"),xw=Bc("animationiteration"),ww=Bc("animationstart"),vw=Bc("transitionend"),yw=new Map,hp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ai(e,t){yw.set(e,t),Bi(t,[e])}for(var df=0;df<hp.length;df++){var hf=hp[df],AI=hf.toLowerCase(),SI=hf[0].toUpperCase()+hf.slice(1);ai(AI,"on"+SI)}ai(mw,"onAnimationEnd");ai(xw,"onAnimationIteration");ai(ww,"onAnimationStart");ai("dblclick","onDoubleClick");ai("focusin","onFocus");ai("focusout","onBlur");ai(vw,"onTransitionEnd");Is("onMouseEnter",["mouseout","mouseover"]);Is("onMouseLeave",["mouseout","mouseover"]);Is("onPointerEnter",["pointerout","pointerover"]);Is("onPointerLeave",["pointerout","pointerover"]);Bi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Bi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Bi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Bi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Bi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Bi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),II=new Set("cancel close invalid load scroll toggle".split(" ").concat(xo));function gp(e,t,n){var o=e.type||"unknown-event";e.currentTarget=n,A5(o,t,void 0,e),e.currentTarget=null}function Ew(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var o=e[n],c=o.event;o=o.listeners;e:{var f=void 0;if(t)for(var g=o.length-1;0<=g;g--){var x=o[g],w=x.instance,m=x.currentTarget;if(x=x.listener,w!==f&&c.isPropagationStopped())break e;gp(c,x,m),f=w}else for(g=0;g<o.length;g++){if(x=o[g],w=x.instance,m=x.currentTarget,x=x.listener,w!==f&&c.isPropagationStopped())break e;gp(c,x,m),f=w}}}if(zl)throw e=p1,zl=!1,p1=null,e}function Xe(e,t){var n=t[S1];n===void 0&&(n=t[S1]=new Set);var o=e+"__bubble";n.has(o)||(bw(t,e,2,!1),n.add(o))}function gf(e,t,n){var o=0;t&&(o|=4),bw(n,e,o,t)}var qa="_reactListening"+Math.random().toString(36).slice(2);function Xo(e){if(!e[qa]){e[qa]=!0,_x.forEach(function(n){n!=="selectionchange"&&(II.has(n)||gf(n,!1,e),gf(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qa]||(t[qa]=!0,gf("selectionchange",!1,t))}}function bw(e,t,n,o){switch(sw(t)){case 1:var c=j5;break;case 4:c=W5;break;default:c=i0}n=c.bind(null,t,n,e),c=void 0,!g1||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(t,n,{capture:!0,passive:c}):e.addEventListener(t,n,!0):c!==void 0?e.addEventListener(t,n,{passive:c}):e.addEventListener(t,n,!1)}function pf(e,t,n,o,c){var f=o;if(!(t&1)&&!(t&2)&&o!==null)e:for(;;){if(o===null)return;var g=o.tag;if(g===3||g===4){var x=o.stateNode.containerInfo;if(x===c||x.nodeType===8&&x.parentNode===c)break;if(g===4)for(g=o.return;g!==null;){var w=g.tag;if((w===3||w===4)&&(w=g.stateNode.containerInfo,w===c||w.nodeType===8&&w.parentNode===c))return;g=g.return}for(;x!==null;){if(g=bi(x),g===null)return;if(w=g.tag,w===5||w===6){o=f=g;continue e}x=x.parentNode}}o=o.return}Hx(function(){var m=f,C=e0(n),y=[];e:{var S=yw.get(e);if(S!==void 0){var _=o0,k=e;switch(e){case"keypress":if(bl(n)===0)break e;case"keydown":case"keyup":_=rI;break;case"focusin":k="focus",_=lf;break;case"focusout":k="blur",_=lf;break;case"beforeblur":case"afterblur":_=lf;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":_=rp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":_=V5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":_=sI;break;case mw:case xw:case ww:_=X5;break;case vw:_=aI;break;case"scroll":_=z5;break;case"wheel":_=cI;break;case"copy":case"cut":case"paste":_=K5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":_=ip}var D=(t&4)!==0,X=!D&&e==="scroll",O=D?S!==null?S+"Capture":null:S;D=[];for(var I=m,R;I!==null;){R=I;var U=R.stateNode;if(R.tag===5&&U!==null&&(R=U,O!==null&&(U=Wo(I,O),U!=null&&D.push(Yo(I,U,R)))),X)break;I=I.return}0<D.length&&(S=new _(S,k,null,n,C),y.push({event:S,listeners:D}))}}if(!(t&7)){e:{if(S=e==="mouseover"||e==="pointerover",_=e==="mouseout"||e==="pointerout",S&&n!==d1&&(k=n.relatedTarget||n.fromElement)&&(bi(k)||k[Sn]))break e;if((_||S)&&(S=C.window===C?C:(S=C.ownerDocument)?S.defaultView||S.parentWindow:window,_?(k=n.relatedTarget||n.toElement,_=m,k=k?bi(k):null,k!==null&&(X=Fi(k),k!==X||k.tag!==5&&k.tag!==6)&&(k=null)):(_=null,k=m),_!==k)){if(D=rp,U="onMouseLeave",O="onMouseEnter",I="mouse",(e==="pointerout"||e==="pointerover")&&(D=ip,U="onPointerLeave",O="onPointerEnter",I="pointer"),X=_==null?S:ss(_),R=k==null?S:ss(k),S=new D(U,I+"leave",_,n,C),S.target=X,S.relatedTarget=R,U=null,bi(C)===m&&(D=new D(O,I+"enter",k,n,C),D.target=R,D.relatedTarget=X,U=D),X=U,_&&k)t:{for(D=_,O=k,I=0,R=D;R;R=Ki(R))I++;for(R=0,U=O;U;U=Ki(U))R++;for(;0<I-R;)D=Ki(D),I--;for(;0<R-I;)O=Ki(O),R--;for(;I--;){if(D===O||O!==null&&D===O.alternate)break t;D=Ki(D),O=Ki(O)}D=null}else D=null;_!==null&&pp(y,S,_,D,!1),k!==null&&X!==null&&pp(y,X,k,D,!0)}}e:{if(S=m?ss(m):window,_=S.nodeName&&S.nodeName.toLowerCase(),_==="select"||_==="input"&&S.type==="file")var G=mI;else if(ap(S))if(fw)G=yI;else{G=wI;var W=xI}else(_=S.nodeName)&&_.toLowerCase()==="input"&&(S.type==="checkbox"||S.type==="radio")&&(G=vI);if(G&&(G=G(e,m))){uw(y,G,n,C);break e}W&&W(e,S,m),e==="focusout"&&(W=S._wrapperState)&&W.controlled&&S.type==="number"&&a1(S,"number",S.value)}switch(W=m?ss(m):window,e){case"focusin":(ap(W)||W.contentEditable==="true")&&(ns=W,v1=m,Io=null);break;case"focusout":Io=v1=ns=null;break;case"mousedown":y1=!0;break;case"contextmenu":case"mouseup":case"dragend":y1=!1,dp(y,n,C);break;case"selectionchange":if(CI)break;case"keydown":case"keyup":dp(y,n,C)}var B;if(l0)e:{switch(e){case"compositionstart":var Y="onCompositionStart";break e;case"compositionend":Y="onCompositionEnd";break e;case"compositionupdate":Y="onCompositionUpdate";break e}Y=void 0}else rs?lw(e,n)&&(Y="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Y="onCompositionStart");Y&&(aw&&n.locale!=="ko"&&(rs||Y!=="onCompositionStart"?Y==="onCompositionEnd"&&rs&&(B=ow()):(Xn=C,s0="value"in Xn?Xn.value:Xn.textContent,rs=!0)),W=Xl(m,Y),0<W.length&&(Y=new np(Y,e,null,n,C),y.push({event:Y,listeners:W}),B?Y.data=B:(B=cw(n),B!==null&&(Y.data=B)))),(B=fI?dI(e,n):hI(e,n))&&(m=Xl(m,"onBeforeInput"),0<m.length&&(C=new np("onBeforeInput","beforeinput",null,n,C),y.push({event:C,listeners:m}),C.data=B))}Ew(y,t)})}function Yo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xl(e,t){for(var n=t+"Capture",o=[];e!==null;){var c=e,f=c.stateNode;c.tag===5&&f!==null&&(c=f,f=Wo(e,n),f!=null&&o.unshift(Yo(e,f,c)),f=Wo(e,t),f!=null&&o.push(Yo(e,f,c))),e=e.return}return o}function Ki(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function pp(e,t,n,o,c){for(var f=t._reactName,g=[];n!==null&&n!==o;){var x=n,w=x.alternate,m=x.stateNode;if(w!==null&&w===o)break;x.tag===5&&m!==null&&(x=m,c?(w=Wo(n,f),w!=null&&g.unshift(Yo(n,w,x))):c||(w=Wo(n,f),w!=null&&g.push(Yo(n,w,x)))),n=n.return}g.length!==0&&e.push({event:t,listeners:g})}var TI=/\r\n?/g,RI=/\u0000|\uFFFD/g;function mp(e){return(typeof e=="string"?e:""+e).replace(TI,`
|
|
55
|
-
`).replace(RI,"")}function Ja(e,t,n){if(t=mp(t),mp(e)!==t&&n)throw Error(q(425))}function Yl(){}var E1=null,b1=null;function C1(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var A1=typeof setTimeout=="function"?setTimeout:void 0,_I=typeof clearTimeout=="function"?clearTimeout:void 0,xp=typeof Promise=="function"?Promise:void 0,NI=typeof queueMicrotask=="function"?queueMicrotask:typeof xp<"u"?function(e){return xp.resolve(null).then(e).catch(OI)}:A1;function OI(e){setTimeout(function(){throw e})}function mf(e,t){var n=t,o=0;do{var c=n.nextSibling;if(e.removeChild(n),c&&c.nodeType===8)if(n=c.data,n==="/$"){if(o===0){e.removeChild(c),Vo(t);return}o--}else n!=="$"&&n!=="$?"&&n!=="$!"||o++;n=c}while(n);Vo(t)}function qn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function wp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Us=Math.random().toString(36).slice(2),on="__reactFiber$"+Us,Ko="__reactProps$"+Us,Sn="__reactContainer$"+Us,S1="__reactEvents$"+Us,kI="__reactListeners$"+Us,DI="__reactHandles$"+Us;function bi(e){var t=e[on];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Sn]||n[on]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=wp(e);e!==null;){if(n=e[on])return n;e=wp(e)}return t}e=n,n=e.parentNode}return null}function ha(e){return e=e[on]||e[Sn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ss(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function Fc(e){return e[Ko]||null}var I1=[],os=-1;function li(e){return{current:e}}function Ye(e){0>os||(e.current=I1[os],I1[os]=null,os--)}function He(e,t){os++,I1[os]=e.current,e.current=t}var ii={},Ht=li(ii),cr=li(!1),Ni=ii;function Ts(e,t){var n=e.type.contextTypes;if(!n)return ii;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in n)c[f]=t[f];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function ur(e){return e=e.childContextTypes,e!=null}function Kl(){Ye(cr),Ye(Ht)}function vp(e,t,n){if(Ht.current!==ii)throw Error(q(168));He(Ht,t),He(cr,n)}function Cw(e,t,n){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return n;o=o.getChildContext();for(var c in o)if(!(c in t))throw Error(q(108,x5(e)||"Unknown",c));return rt({},n,o)}function Zl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ii,Ni=Ht.current,He(Ht,e),He(cr,cr.current),!0}function yp(e,t,n){var o=e.stateNode;if(!o)throw Error(q(169));n?(e=Cw(e,t,Ni),o.__reactInternalMemoizedMergedChildContext=e,Ye(cr),Ye(Ht),He(Ht,e)):Ye(cr),He(cr,n)}var xn=null,Uc=!1,xf=!1;function Aw(e){xn===null?xn=[e]:xn.push(e)}function MI(e){Uc=!0,Aw(e)}function ci(){if(!xf&&xn!==null){xf=!0;var e=0,t=Be;try{var n=xn;for(Be=1;e<n.length;e++){var o=n[e];do o=o(!0);while(o!==null)}xn=null,Uc=!1}catch(c){throw xn!==null&&(xn=xn.slice(e+1)),Kx(t0,ci),c}finally{Be=t,xf=!1}}return null}var as=[],ls=0,Ql=null,ql=0,Rr=[],_r=0,Oi=null,vn=1,yn="";function vi(e,t){as[ls++]=ql,as[ls++]=Ql,Ql=e,ql=t}function Sw(e,t,n){Rr[_r++]=vn,Rr[_r++]=yn,Rr[_r++]=Oi,Oi=e;var o=vn;e=yn;var c=32-Vr(o)-1;o&=~(1<<c),n+=1;var f=32-Vr(t)+c;if(30<f){var g=c-c%5;f=(o&(1<<g)-1).toString(32),o>>=g,c-=g,vn=1<<32-Vr(t)+c|n<<c|o,yn=f+e}else vn=1<<f|n<<c|o,yn=e}function u0(e){e.return!==null&&(vi(e,1),Sw(e,1,0))}function f0(e){for(;e===Ql;)Ql=as[--ls],as[ls]=null,ql=as[--ls],as[ls]=null;for(;e===Oi;)Oi=Rr[--_r],Rr[_r]=null,yn=Rr[--_r],Rr[_r]=null,vn=Rr[--_r],Rr[_r]=null}var wr=null,xr=null,Qe=!1,$r=null;function Iw(e,t){var n=Nr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ep(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,wr=e,xr=qn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,wr=e,xr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Oi!==null?{id:vn,overflow:yn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Nr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,wr=e,xr=null,!0):!1;default:return!1}}function T1(e){return(e.mode&1)!==0&&(e.flags&128)===0}function R1(e){if(Qe){var t=xr;if(t){var n=t;if(!Ep(e,t)){if(T1(e))throw Error(q(418));t=qn(n.nextSibling);var o=wr;t&&Ep(e,t)?Iw(o,n):(e.flags=e.flags&-4097|2,Qe=!1,wr=e)}}else{if(T1(e))throw Error(q(418));e.flags=e.flags&-4097|2,Qe=!1,wr=e}}}function bp(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;wr=e}function el(e){if(e!==wr)return!1;if(!Qe)return bp(e),Qe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!C1(e.type,e.memoizedProps)),t&&(t=xr)){if(T1(e))throw Tw(),Error(q(418));for(;t;)Iw(e,t),t=qn(t.nextSibling)}if(bp(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){xr=qn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}xr=null}}else xr=wr?qn(e.stateNode.nextSibling):null;return!0}function Tw(){for(var e=xr;e;)e=qn(e.nextSibling)}function Rs(){xr=wr=null,Qe=!1}function d0(e){$r===null?$r=[e]:$r.push(e)}var PI=Nn.ReactCurrentBatchConfig;function ao(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(q(309));var o=n.stateNode}if(!o)throw Error(q(147,e));var c=o,f=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===f?t.ref:(t=function(g){var x=c.refs;g===null?delete x[f]:x[f]=g},t._stringRef=f,t)}if(typeof e!="string")throw Error(q(284));if(!n._owner)throw Error(q(290,e))}return e}function tl(e,t){throw e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Cp(e){var t=e._init;return t(e._payload)}function Rw(e){function t(O,I){if(e){var R=O.deletions;R===null?(O.deletions=[I],O.flags|=16):R.push(I)}}function n(O,I){if(!e)return null;for(;I!==null;)t(O,I),I=I.sibling;return null}function o(O,I){for(O=new Map;I!==null;)I.key!==null?O.set(I.key,I):O.set(I.index,I),I=I.sibling;return O}function c(O,I){return O=ri(O,I),O.index=0,O.sibling=null,O}function f(O,I,R){return O.index=R,e?(R=O.alternate,R!==null?(R=R.index,R<I?(O.flags|=2,I):R):(O.flags|=2,I)):(O.flags|=1048576,I)}function g(O){return e&&O.alternate===null&&(O.flags|=2),O}function x(O,I,R,U){return I===null||I.tag!==6?(I=Af(R,O.mode,U),I.return=O,I):(I=c(I,R),I.return=O,I)}function w(O,I,R,U){var G=R.type;return G===ts?C(O,I,R.props.children,U,R.key):I!==null&&(I.elementType===G||typeof G=="object"&&G!==null&&G.$$typeof===jn&&Cp(G)===I.type)?(U=c(I,R.props),U.ref=ao(O,I,R),U.return=O,U):(U=_l(R.type,R.key,R.props,null,O.mode,U),U.ref=ao(O,I,R),U.return=O,U)}function m(O,I,R,U){return I===null||I.tag!==4||I.stateNode.containerInfo!==R.containerInfo||I.stateNode.implementation!==R.implementation?(I=Sf(R,O.mode,U),I.return=O,I):(I=c(I,R.children||[]),I.return=O,I)}function C(O,I,R,U,G){return I===null||I.tag!==7?(I=Ti(R,O.mode,U,G),I.return=O,I):(I=c(I,R),I.return=O,I)}function y(O,I,R){if(typeof I=="string"&&I!==""||typeof I=="number")return I=Af(""+I,O.mode,R),I.return=O,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case Va:return R=_l(I.type,I.key,I.props,null,O.mode,R),R.ref=ao(O,null,I),R.return=O,R;case es:return I=Sf(I,O.mode,R),I.return=O,I;case jn:var U=I._init;return y(O,U(I._payload),R)}if(po(I)||ro(I))return I=Ti(I,O.mode,R,null),I.return=O,I;tl(O,I)}return null}function S(O,I,R,U){var G=I!==null?I.key:null;if(typeof R=="string"&&R!==""||typeof R=="number")return G!==null?null:x(O,I,""+R,U);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case Va:return R.key===G?w(O,I,R,U):null;case es:return R.key===G?m(O,I,R,U):null;case jn:return G=R._init,S(O,I,G(R._payload),U)}if(po(R)||ro(R))return G!==null?null:C(O,I,R,U,null);tl(O,R)}return null}function _(O,I,R,U,G){if(typeof U=="string"&&U!==""||typeof U=="number")return O=O.get(R)||null,x(I,O,""+U,G);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case Va:return O=O.get(U.key===null?R:U.key)||null,w(I,O,U,G);case es:return O=O.get(U.key===null?R:U.key)||null,m(I,O,U,G);case jn:var W=U._init;return _(O,I,R,W(U._payload),G)}if(po(U)||ro(U))return O=O.get(R)||null,C(I,O,U,G,null);tl(I,U)}return null}function k(O,I,R,U){for(var G=null,W=null,B=I,Y=I=0,$=null;B!==null&&Y<R.length;Y++){B.index>Y?($=B,B=null):$=B.sibling;var ae=S(O,B,R[Y],U);if(ae===null){B===null&&(B=$);break}e&&B&&ae.alternate===null&&t(O,B),I=f(ae,I,Y),W===null?G=ae:W.sibling=ae,W=ae,B=$}if(Y===R.length)return n(O,B),Qe&&vi(O,Y),G;if(B===null){for(;Y<R.length;Y++)B=y(O,R[Y],U),B!==null&&(I=f(B,I,Y),W===null?G=B:W.sibling=B,W=B);return Qe&&vi(O,Y),G}for(B=o(O,B);Y<R.length;Y++)$=_(B,O,Y,R[Y],U),$!==null&&(e&&$.alternate!==null&&B.delete($.key===null?Y:$.key),I=f($,I,Y),W===null?G=$:W.sibling=$,W=$);return e&&B.forEach(function(Ee){return t(O,Ee)}),Qe&&vi(O,Y),G}function D(O,I,R,U){var G=ro(R);if(typeof G!="function")throw Error(q(150));if(R=G.call(R),R==null)throw Error(q(151));for(var W=G=null,B=I,Y=I=0,$=null,ae=R.next();B!==null&&!ae.done;Y++,ae=R.next()){B.index>Y?($=B,B=null):$=B.sibling;var Ee=S(O,B,ae.value,U);if(Ee===null){B===null&&(B=$);break}e&&B&&Ee.alternate===null&&t(O,B),I=f(Ee,I,Y),W===null?G=Ee:W.sibling=Ee,W=Ee,B=$}if(ae.done)return n(O,B),Qe&&vi(O,Y),G;if(B===null){for(;!ae.done;Y++,ae=R.next())ae=y(O,ae.value,U),ae!==null&&(I=f(ae,I,Y),W===null?G=ae:W.sibling=ae,W=ae);return Qe&&vi(O,Y),G}for(B=o(O,B);!ae.done;Y++,ae=R.next())ae=_(B,O,Y,ae.value,U),ae!==null&&(e&&ae.alternate!==null&&B.delete(ae.key===null?Y:ae.key),I=f(ae,I,Y),W===null?G=ae:W.sibling=ae,W=ae);return e&&B.forEach(function(ne){return t(O,ne)}),Qe&&vi(O,Y),G}function X(O,I,R,U){if(typeof R=="object"&&R!==null&&R.type===ts&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case Va:e:{for(var G=R.key,W=I;W!==null;){if(W.key===G){if(G=R.type,G===ts){if(W.tag===7){n(O,W.sibling),I=c(W,R.props.children),I.return=O,O=I;break e}}else if(W.elementType===G||typeof G=="object"&&G!==null&&G.$$typeof===jn&&Cp(G)===W.type){n(O,W.sibling),I=c(W,R.props),I.ref=ao(O,W,R),I.return=O,O=I;break e}n(O,W);break}else t(O,W);W=W.sibling}R.type===ts?(I=Ti(R.props.children,O.mode,U,R.key),I.return=O,O=I):(U=_l(R.type,R.key,R.props,null,O.mode,U),U.ref=ao(O,I,R),U.return=O,O=U)}return g(O);case es:e:{for(W=R.key;I!==null;){if(I.key===W)if(I.tag===4&&I.stateNode.containerInfo===R.containerInfo&&I.stateNode.implementation===R.implementation){n(O,I.sibling),I=c(I,R.children||[]),I.return=O,O=I;break e}else{n(O,I);break}else t(O,I);I=I.sibling}I=Sf(R,O.mode,U),I.return=O,O=I}return g(O);case jn:return W=R._init,X(O,I,W(R._payload),U)}if(po(R))return k(O,I,R,U);if(ro(R))return D(O,I,R,U);tl(O,R)}return typeof R=="string"&&R!==""||typeof R=="number"?(R=""+R,I!==null&&I.tag===6?(n(O,I.sibling),I=c(I,R),I.return=O,O=I):(n(O,I),I=Af(R,O.mode,U),I.return=O,O=I),g(O)):n(O,I)}return X}var _s=Rw(!0),_w=Rw(!1),Jl=li(null),ec=null,cs=null,h0=null;function g0(){h0=cs=ec=null}function p0(e){var t=Jl.current;Ye(Jl),e._currentValue=t}function _1(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function ys(e,t){ec=e,h0=cs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(lr=!0),e.firstContext=null)}function kr(e){var t=e._currentValue;if(h0!==e)if(e={context:e,memoizedValue:t,next:null},cs===null){if(ec===null)throw Error(q(308));cs=e,ec.dependencies={lanes:0,firstContext:e}}else cs=cs.next=e;return t}var Ci=null;function m0(e){Ci===null?Ci=[e]:Ci.push(e)}function Nw(e,t,n,o){var c=t.interleaved;return c===null?(n.next=n,m0(t)):(n.next=c.next,c.next=n),t.interleaved=n,In(e,o)}function In(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Wn=!1;function x0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ow(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function En(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jn(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,ke&2){var c=o.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),o.pending=t,In(e,n)}return c=o.interleaved,c===null?(t.next=t,m0(o)):(t.next=c.next,c.next=t),o.interleaved=t,In(e,n)}function Cl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,r0(e,n)}}function Ap(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var c=null,f=null;if(n=n.firstBaseUpdate,n!==null){do{var g={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};f===null?c=f=g:f=f.next=g,n=n.next}while(n!==null);f===null?c=f=t:f=f.next=t}else c=f=t;n={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:o.shared,effects:o.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function tc(e,t,n,o){var c=e.updateQueue;Wn=!1;var f=c.firstBaseUpdate,g=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var w=x,m=w.next;w.next=null,g===null?f=m:g.next=m,g=w;var C=e.alternate;C!==null&&(C=C.updateQueue,x=C.lastBaseUpdate,x!==g&&(x===null?C.firstBaseUpdate=m:x.next=m,C.lastBaseUpdate=w))}if(f!==null){var y=c.baseState;g=0,C=m=w=null,x=f;do{var S=x.lane,_=x.eventTime;if((o&S)===S){C!==null&&(C=C.next={eventTime:_,lane:0,tag:x.tag,payload:x.payload,callback:x.callback,next:null});e:{var k=e,D=x;switch(S=t,_=n,D.tag){case 1:if(k=D.payload,typeof k=="function"){y=k.call(_,y,S);break e}y=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=D.payload,S=typeof k=="function"?k.call(_,y,S):k,S==null)break e;y=rt({},y,S);break e;case 2:Wn=!0}}x.callback!==null&&x.lane!==0&&(e.flags|=64,S=c.effects,S===null?c.effects=[x]:S.push(x))}else _={eventTime:_,lane:S,tag:x.tag,payload:x.payload,callback:x.callback,next:null},C===null?(m=C=_,w=y):C=C.next=_,g|=S;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;S=x,x=S.next,S.next=null,c.lastBaseUpdate=S,c.shared.pending=null}}while(!0);if(C===null&&(w=y),c.baseState=w,c.firstBaseUpdate=m,c.lastBaseUpdate=C,t=c.shared.interleaved,t!==null){c=t;do g|=c.lane,c=c.next;while(c!==t)}else f===null&&(c.shared.lanes=0);Di|=g,e.lanes=g,e.memoizedState=y}}function Sp(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],c=o.callback;if(c!==null){if(o.callback=null,o=n,typeof c!="function")throw Error(q(191,c));c.call(o)}}}var ga={},ln=li(ga),Zo=li(ga),Qo=li(ga);function Ai(e){if(e===ga)throw Error(q(174));return e}function w0(e,t){switch(He(Qo,t),He(Zo,e),He(ln,ga),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:c1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=c1(t,e)}Ye(ln),He(ln,t)}function Ns(){Ye(ln),Ye(Zo),Ye(Qo)}function kw(e){Ai(Qo.current);var t=Ai(ln.current),n=c1(t,e.type);t!==n&&(He(Zo,e),He(ln,n))}function v0(e){Zo.current===e&&(Ye(ln),Ye(Zo))}var et=li(0);function rc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var wf=[];function y0(){for(var e=0;e<wf.length;e++)wf[e]._workInProgressVersionPrimary=null;wf.length=0}var Al=Nn.ReactCurrentDispatcher,vf=Nn.ReactCurrentBatchConfig,ki=0,tt=null,Ct=null,Rt=null,nc=!1,To=!1,qo=0,LI=0;function zt(){throw Error(q(321))}function E0(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Gr(e[n],t[n]))return!1;return!0}function b0(e,t,n,o,c,f){if(ki=f,tt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Al.current=e===null||e.memoizedState===null?jI:WI,e=n(o,c),To){f=0;do{if(To=!1,qo=0,25<=f)throw Error(q(301));f+=1,Rt=Ct=null,t.updateQueue=null,Al.current=zI,e=n(o,c)}while(To)}if(Al.current=ic,t=Ct!==null&&Ct.next!==null,ki=0,Rt=Ct=tt=null,nc=!1,t)throw Error(q(300));return e}function C0(){var e=qo!==0;return qo=0,e}function sn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rt===null?tt.memoizedState=Rt=e:Rt=Rt.next=e,Rt}function Dr(){if(Ct===null){var e=tt.alternate;e=e!==null?e.memoizedState:null}else e=Ct.next;var t=Rt===null?tt.memoizedState:Rt.next;if(t!==null)Rt=t,Ct=e;else{if(e===null)throw Error(q(310));Ct=e,e={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},Rt===null?tt.memoizedState=Rt=e:Rt=Rt.next=e}return Rt}function Jo(e,t){return typeof t=="function"?t(e):t}function yf(e){var t=Dr(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var o=Ct,c=o.baseQueue,f=n.pending;if(f!==null){if(c!==null){var g=c.next;c.next=f.next,f.next=g}o.baseQueue=c=f,n.pending=null}if(c!==null){f=c.next,o=o.baseState;var x=g=null,w=null,m=f;do{var C=m.lane;if((ki&C)===C)w!==null&&(w=w.next={lane:0,action:m.action,hasEagerState:m.hasEagerState,eagerState:m.eagerState,next:null}),o=m.hasEagerState?m.eagerState:e(o,m.action);else{var y={lane:C,action:m.action,hasEagerState:m.hasEagerState,eagerState:m.eagerState,next:null};w===null?(x=w=y,g=o):w=w.next=y,tt.lanes|=C,Di|=C}m=m.next}while(m!==null&&m!==f);w===null?g=o:w.next=x,Gr(o,t.memoizedState)||(lr=!0),t.memoizedState=o,t.baseState=g,t.baseQueue=w,n.lastRenderedState=o}if(e=n.interleaved,e!==null){c=e;do f=c.lane,tt.lanes|=f,Di|=f,c=c.next;while(c!==e)}else c===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ef(e){var t=Dr(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var o=n.dispatch,c=n.pending,f=t.memoizedState;if(c!==null){n.pending=null;var g=c=c.next;do f=e(f,g.action),g=g.next;while(g!==c);Gr(f,t.memoizedState)||(lr=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),n.lastRenderedState=f}return[f,o]}function Dw(){}function Mw(e,t){var n=tt,o=Dr(),c=t(),f=!Gr(o.memoizedState,c);if(f&&(o.memoizedState=c,lr=!0),o=o.queue,A0(Bw.bind(null,n,o,e),[e]),o.getSnapshot!==t||f||Rt!==null&&Rt.memoizedState.tag&1){if(n.flags|=2048,ea(9,Lw.bind(null,n,o,c,t),void 0,null),_t===null)throw Error(q(349));ki&30||Pw(n,t,c)}return c}function Pw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Lw(e,t,n,o){t.value=n,t.getSnapshot=o,Fw(t)&&Uw(e)}function Bw(e,t,n){return n(function(){Fw(t)&&Uw(e)})}function Fw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Gr(e,n)}catch{return!0}}function Uw(e){var t=In(e,1);t!==null&&Hr(t,e,1,-1)}function Ip(e){var t=sn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:e},t.queue=e,e=e.dispatch=UI.bind(null,tt,e),[t.memoizedState,e]}function ea(e,t,n,o){return e={tag:e,create:t,destroy:n,deps:o,next:null},t=tt.updateQueue,t===null?(t={lastEffect:null,stores:null},tt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e)),e}function jw(){return Dr().memoizedState}function Sl(e,t,n,o){var c=sn();tt.flags|=e,c.memoizedState=ea(1|t,n,void 0,o===void 0?null:o)}function jc(e,t,n,o){var c=Dr();o=o===void 0?null:o;var f=void 0;if(Ct!==null){var g=Ct.memoizedState;if(f=g.destroy,o!==null&&E0(o,g.deps)){c.memoizedState=ea(t,n,f,o);return}}tt.flags|=e,c.memoizedState=ea(1|t,n,f,o)}function Tp(e,t){return Sl(8390656,8,e,t)}function A0(e,t){return jc(2048,8,e,t)}function Ww(e,t){return jc(4,2,e,t)}function zw(e,t){return jc(4,4,e,t)}function $w(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vw(e,t,n){return n=n!=null?n.concat([e]):null,jc(4,4,$w.bind(null,t,e),n)}function S0(){}function Hw(e,t){var n=Dr();t=t===void 0?null:t;var o=n.memoizedState;return o!==null&&t!==null&&E0(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function Gw(e,t){var n=Dr();t=t===void 0?null:t;var o=n.memoizedState;return o!==null&&t!==null&&E0(t,o[1])?o[0]:(e=e(),n.memoizedState=[e,t],e)}function Xw(e,t,n){return ki&21?(Gr(n,t)||(n=qx(),tt.lanes|=n,Di|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,lr=!0),e.memoizedState=n)}function BI(e,t){var n=Be;Be=n!==0&&4>n?n:4,e(!0);var o=vf.transition;vf.transition={};try{e(!1),t()}finally{Be=n,vf.transition=o}}function Yw(){return Dr().memoizedState}function FI(e,t,n){var o=ti(e);if(n={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null},Kw(e))Zw(t,n);else if(n=Nw(e,t,n,o),n!==null){var c=Zt();Hr(n,e,o,c),Qw(n,t,o)}}function UI(e,t,n){var o=ti(e),c={lane:o,action:n,hasEagerState:!1,eagerState:null,next:null};if(Kw(e))Zw(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var g=t.lastRenderedState,x=f(g,n);if(c.hasEagerState=!0,c.eagerState=x,Gr(x,g)){var w=t.interleaved;w===null?(c.next=c,m0(t)):(c.next=w.next,w.next=c),t.interleaved=c;return}}catch{}finally{}n=Nw(e,t,c,o),n!==null&&(c=Zt(),Hr(n,e,o,c),Qw(n,t,o))}}function Kw(e){var t=e.alternate;return e===tt||t!==null&&t===tt}function Zw(e,t){To=nc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Qw(e,t,n){if(n&4194240){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,r0(e,n)}}var ic={readContext:kr,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useInsertionEffect:zt,useLayoutEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useMutableSource:zt,useSyncExternalStore:zt,useId:zt,unstable_isNewReconciler:!1},jI={readContext:kr,useCallback:function(e,t){return sn().memoizedState=[e,t===void 0?null:t],e},useContext:kr,useEffect:Tp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Sl(4194308,4,$w.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Sl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Sl(4,2,e,t)},useMemo:function(e,t){var n=sn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var o=sn();return t=n!==void 0?n(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=FI.bind(null,tt,e),[o.memoizedState,e]},useRef:function(e){var t=sn();return e={current:e},t.memoizedState=e},useState:Ip,useDebugValue:S0,useDeferredValue:function(e){return sn().memoizedState=e},useTransition:function(){var e=Ip(!1),t=e[0];return e=BI.bind(null,e[1]),sn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var o=tt,c=sn();if(Qe){if(n===void 0)throw Error(q(407));n=n()}else{if(n=t(),_t===null)throw Error(q(349));ki&30||Pw(o,t,n)}c.memoizedState=n;var f={value:n,getSnapshot:t};return c.queue=f,Tp(Bw.bind(null,o,f,e),[e]),o.flags|=2048,ea(9,Lw.bind(null,o,f,n,t),void 0,null),n},useId:function(){var e=sn(),t=_t.identifierPrefix;if(Qe){var n=yn,o=vn;n=(o&~(1<<32-Vr(o)-1)).toString(32)+n,t=":"+t+"R"+n,n=qo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=LI++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},WI={readContext:kr,useCallback:Hw,useContext:kr,useEffect:A0,useImperativeHandle:Vw,useInsertionEffect:Ww,useLayoutEffect:zw,useMemo:Gw,useReducer:yf,useRef:jw,useState:function(){return yf(Jo)},useDebugValue:S0,useDeferredValue:function(e){var t=Dr();return Xw(t,Ct.memoizedState,e)},useTransition:function(){var e=yf(Jo)[0],t=Dr().memoizedState;return[e,t]},useMutableSource:Dw,useSyncExternalStore:Mw,useId:Yw,unstable_isNewReconciler:!1},zI={readContext:kr,useCallback:Hw,useContext:kr,useEffect:A0,useImperativeHandle:Vw,useInsertionEffect:Ww,useLayoutEffect:zw,useMemo:Gw,useReducer:Ef,useRef:jw,useState:function(){return Ef(Jo)},useDebugValue:S0,useDeferredValue:function(e){var t=Dr();return Ct===null?t.memoizedState=e:Xw(t,Ct.memoizedState,e)},useTransition:function(){var e=Ef(Jo)[0],t=Dr().memoizedState;return[e,t]},useMutableSource:Dw,useSyncExternalStore:Mw,useId:Yw,unstable_isNewReconciler:!1};function jr(e,t){if(e&&e.defaultProps){t=rt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function N1(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:rt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wc={isMounted:function(e){return(e=e._reactInternals)?Fi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var o=Zt(),c=ti(e),f=En(o,c);f.payload=t,n!=null&&(f.callback=n),t=Jn(e,f,c),t!==null&&(Hr(t,e,c,o),Cl(t,e,c))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=Zt(),c=ti(e),f=En(o,c);f.tag=1,f.payload=t,n!=null&&(f.callback=n),t=Jn(e,f,c),t!==null&&(Hr(t,e,c,o),Cl(t,e,c))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Zt(),o=ti(e),c=En(n,o);c.tag=2,t!=null&&(c.callback=t),t=Jn(e,c,o),t!==null&&(Hr(t,e,o,n),Cl(t,e,o))}};function Rp(e,t,n,o,c,f,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,f,g):t.prototype&&t.prototype.isPureReactComponent?!Go(n,o)||!Go(c,f):!0}function qw(e,t,n){var o=!1,c=ii,f=t.contextType;return typeof f=="object"&&f!==null?f=kr(f):(c=ur(t)?Ni:Ht.current,o=t.contextTypes,f=(o=o!=null)?Ts(e,c):ii),t=new t(n,f),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Wc,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=f),t}function _p(e,t,n,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&Wc.enqueueReplaceState(t,t.state,null)}function O1(e,t,n,o){var c=e.stateNode;c.props=n,c.state=e.memoizedState,c.refs={},x0(e);var f=t.contextType;typeof f=="object"&&f!==null?c.context=kr(f):(f=ur(t)?Ni:Ht.current,c.context=Ts(e,f)),c.state=e.memoizedState,f=t.getDerivedStateFromProps,typeof f=="function"&&(N1(e,t,f,n),c.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(t=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),t!==c.state&&Wc.enqueueReplaceState(c,c.state,null),tc(e,n,c,o),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function Os(e,t){try{var n="",o=t;do n+=m5(o),o=o.return;while(o);var c=n}catch(f){c=`
|
|
56
|
-
Error generating stack: `+f.message+`
|
|
57
|
-
`+f.stack}return{value:e,source:t,stack:c,digest:null}}function bf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function k1(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var $I=typeof WeakMap=="function"?WeakMap:Map;function Jw(e,t,n){n=En(-1,n),n.tag=3,n.payload={element:null};var o=t.value;return n.callback=function(){oc||(oc=!0,z1=o),k1(e,t)},n}function ev(e,t,n){n=En(-1,n),n.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var c=t.value;n.payload=function(){return o(c)},n.callback=function(){k1(e,t)}}var f=e.stateNode;return f!==null&&typeof f.componentDidCatch=="function"&&(n.callback=function(){k1(e,t),typeof o!="function"&&(ei===null?ei=new Set([this]):ei.add(this));var g=t.stack;this.componentDidCatch(t.value,{componentStack:g!==null?g:""})}),n}function Np(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new $I;var c=new Set;o.set(t,c)}else c=o.get(t),c===void 0&&(c=new Set,o.set(t,c));c.has(n)||(c.add(n),e=n9.bind(null,e,t,n),t.then(e,e))}function Op(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function kp(e,t,n,o,c){return e.mode&1?(e.flags|=65536,e.lanes=c,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=En(-1,1),t.tag=2,Jn(n,t,1))),n.lanes|=1),e)}var VI=Nn.ReactCurrentOwner,lr=!1;function Kt(e,t,n,o){t.child=e===null?_w(t,null,n,o):_s(t,e.child,n,o)}function Dp(e,t,n,o,c){n=n.render;var f=t.ref;return ys(t,c),o=b0(e,t,n,o,f,c),n=C0(),e!==null&&!lr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Tn(e,t,c)):(Qe&&n&&u0(t),t.flags|=1,Kt(e,t,o,c),t.child)}function Mp(e,t,n,o,c){if(e===null){var f=n.type;return typeof f=="function"&&!D0(f)&&f.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=f,tv(e,t,f,o,c)):(e=_l(n.type,null,o,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!(e.lanes&c)){var g=f.memoizedProps;if(n=n.compare,n=n!==null?n:Go,n(g,o)&&e.ref===t.ref)return Tn(e,t,c)}return t.flags|=1,e=ri(f,o),e.ref=t.ref,e.return=t,t.child=e}function tv(e,t,n,o,c){if(e!==null){var f=e.memoizedProps;if(Go(f,o)&&e.ref===t.ref)if(lr=!1,t.pendingProps=o=f,(e.lanes&c)!==0)e.flags&131072&&(lr=!0);else return t.lanes=e.lanes,Tn(e,t,c)}return D1(e,t,n,o,c)}function rv(e,t,n){var o=t.pendingProps,c=o.children,f=e!==null?e.memoizedState:null;if(o.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},He(fs,mr),mr|=n;else{if(!(n&1073741824))return e=f!==null?f.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,He(fs,mr),mr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=f!==null?f.baseLanes:n,He(fs,mr),mr|=o}else f!==null?(o=f.baseLanes|n,t.memoizedState=null):o=n,He(fs,mr),mr|=o;return Kt(e,t,c,n),t.child}function nv(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function D1(e,t,n,o,c){var f=ur(n)?Ni:Ht.current;return f=Ts(t,f),ys(t,c),n=b0(e,t,n,o,f,c),o=C0(),e!==null&&!lr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Tn(e,t,c)):(Qe&&o&&u0(t),t.flags|=1,Kt(e,t,n,c),t.child)}function Pp(e,t,n,o,c){if(ur(n)){var f=!0;Zl(t)}else f=!1;if(ys(t,c),t.stateNode===null)Il(e,t),qw(t,n,o),O1(t,n,o,c),o=!0;else if(e===null){var g=t.stateNode,x=t.memoizedProps;g.props=x;var w=g.context,m=n.contextType;typeof m=="object"&&m!==null?m=kr(m):(m=ur(n)?Ni:Ht.current,m=Ts(t,m));var C=n.getDerivedStateFromProps,y=typeof C=="function"||typeof g.getSnapshotBeforeUpdate=="function";y||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(x!==o||w!==m)&&_p(t,g,o,m),Wn=!1;var S=t.memoizedState;g.state=S,tc(t,o,g,c),w=t.memoizedState,x!==o||S!==w||cr.current||Wn?(typeof C=="function"&&(N1(t,n,C,o),w=t.memoizedState),(x=Wn||Rp(t,n,x,o,S,w,m))?(y||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(t.flags|=4194308)):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=w),g.props=o,g.state=w,g.context=m,o=x):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{g=t.stateNode,Ow(e,t),x=t.memoizedProps,m=t.type===t.elementType?x:jr(t.type,x),g.props=m,y=t.pendingProps,S=g.context,w=n.contextType,typeof w=="object"&&w!==null?w=kr(w):(w=ur(n)?Ni:Ht.current,w=Ts(t,w));var _=n.getDerivedStateFromProps;(C=typeof _=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(x!==y||S!==w)&&_p(t,g,o,w),Wn=!1,S=t.memoizedState,g.state=S,tc(t,o,g,c);var k=t.memoizedState;x!==y||S!==k||cr.current||Wn?(typeof _=="function"&&(N1(t,n,_,o),k=t.memoizedState),(m=Wn||Rp(t,n,m,o,S,k,w)||!1)?(C||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(o,k,w),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(o,k,w)),typeof g.componentDidUpdate=="function"&&(t.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof g.componentDidUpdate!="function"||x===e.memoizedProps&&S===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&S===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=k),g.props=o,g.state=k,g.context=w,o=m):(typeof g.componentDidUpdate!="function"||x===e.memoizedProps&&S===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&S===e.memoizedState||(t.flags|=1024),o=!1)}return M1(e,t,n,o,f,c)}function M1(e,t,n,o,c,f){nv(e,t);var g=(t.flags&128)!==0;if(!o&&!g)return c&&yp(t,n,!1),Tn(e,t,f);o=t.stateNode,VI.current=t;var x=g&&typeof n.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&g?(t.child=_s(t,e.child,null,f),t.child=_s(t,null,x,f)):Kt(e,t,x,f),t.memoizedState=o.state,c&&yp(t,n,!0),t.child}function iv(e){var t=e.stateNode;t.pendingContext?vp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&vp(e,t.context,!1),w0(e,t.containerInfo)}function Lp(e,t,n,o,c){return Rs(),d0(c),t.flags|=256,Kt(e,t,n,o),t.child}var P1={dehydrated:null,treeContext:null,retryLane:0};function L1(e){return{baseLanes:e,cachePool:null,transitions:null}}function sv(e,t,n){var o=t.pendingProps,c=et.current,f=!1,g=(t.flags&128)!==0,x;if((x=g)||(x=e!==null&&e.memoizedState===null?!1:(c&2)!==0),x?(f=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),He(et,c&1),e===null)return R1(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(g=o.children,e=o.fallback,f?(o=t.mode,f=t.child,g={mode:"hidden",children:g},!(o&1)&&f!==null?(f.childLanes=0,f.pendingProps=g):f=Vc(g,o,0,null),e=Ti(e,o,n,null),f.return=t,e.return=t,f.sibling=e,t.child=f,t.child.memoizedState=L1(n),t.memoizedState=P1,e):I0(t,g));if(c=e.memoizedState,c!==null&&(x=c.dehydrated,x!==null))return HI(e,t,g,o,x,c,n);if(f){f=o.fallback,g=t.mode,c=e.child,x=c.sibling;var w={mode:"hidden",children:o.children};return!(g&1)&&t.child!==c?(o=t.child,o.childLanes=0,o.pendingProps=w,t.deletions=null):(o=ri(c,w),o.subtreeFlags=c.subtreeFlags&14680064),x!==null?f=ri(x,f):(f=Ti(f,g,n,null),f.flags|=2),f.return=t,o.return=t,o.sibling=f,t.child=o,o=f,f=t.child,g=e.child.memoizedState,g=g===null?L1(n):{baseLanes:g.baseLanes|n,cachePool:null,transitions:g.transitions},f.memoizedState=g,f.childLanes=e.childLanes&~n,t.memoizedState=P1,o}return f=e.child,e=f.sibling,o=ri(f,{mode:"visible",children:o.children}),!(t.mode&1)&&(o.lanes=n),o.return=t,o.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function I0(e,t){return t=Vc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function rl(e,t,n,o){return o!==null&&d0(o),_s(t,e.child,null,n),e=I0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function HI(e,t,n,o,c,f,g){if(n)return t.flags&256?(t.flags&=-257,o=bf(Error(q(422))),rl(e,t,g,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(f=o.fallback,c=t.mode,o=Vc({mode:"visible",children:o.children},c,0,null),f=Ti(f,c,g,null),f.flags|=2,o.return=t,f.return=t,o.sibling=f,t.child=o,t.mode&1&&_s(t,e.child,null,g),t.child.memoizedState=L1(g),t.memoizedState=P1,f);if(!(t.mode&1))return rl(e,t,g,null);if(c.data==="$!"){if(o=c.nextSibling&&c.nextSibling.dataset,o)var x=o.dgst;return o=x,f=Error(q(419)),o=bf(f,o,void 0),rl(e,t,g,o)}if(x=(g&e.childLanes)!==0,lr||x){if(o=_t,o!==null){switch(g&-g){case 4:c=2;break;case 16:c=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:c=32;break;case 536870912:c=268435456;break;default:c=0}c=c&(o.suspendedLanes|g)?0:c,c!==0&&c!==f.retryLane&&(f.retryLane=c,In(e,c),Hr(o,e,c,-1))}return k0(),o=bf(Error(q(421))),rl(e,t,g,o)}return c.data==="$?"?(t.flags|=128,t.child=e.child,t=i9.bind(null,e),c._reactRetry=t,null):(e=f.treeContext,xr=qn(c.nextSibling),wr=t,Qe=!0,$r=null,e!==null&&(Rr[_r++]=vn,Rr[_r++]=yn,Rr[_r++]=Oi,vn=e.id,yn=e.overflow,Oi=t),t=I0(t,o.children),t.flags|=4096,t)}function Bp(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),_1(e.return,t,n)}function Cf(e,t,n,o,c){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:c}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=o,f.tail=n,f.tailMode=c)}function ov(e,t,n){var o=t.pendingProps,c=o.revealOrder,f=o.tail;if(Kt(e,t,o.children,n),o=et.current,o&2)o=o&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bp(e,n,t);else if(e.tag===19)Bp(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(He(et,o),!(t.mode&1))t.memoizedState=null;else switch(c){case"forwards":for(n=t.child,c=null;n!==null;)e=n.alternate,e!==null&&rc(e)===null&&(c=n),n=n.sibling;n=c,n===null?(c=t.child,t.child=null):(c=n.sibling,n.sibling=null),Cf(t,!1,c,n,f);break;case"backwards":for(n=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&rc(e)===null){t.child=c;break}e=c.sibling,c.sibling=n,n=c,c=e}Cf(t,!0,n,null,f);break;case"together":Cf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Il(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Tn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Di|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,n=ri(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ri(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function GI(e,t,n){switch(t.tag){case 3:iv(t),Rs();break;case 5:kw(t);break;case 1:ur(t.type)&&Zl(t);break;case 4:w0(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,c=t.memoizedProps.value;He(Jl,o._currentValue),o._currentValue=c;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(He(et,et.current&1),t.flags|=128,null):n&t.child.childLanes?sv(e,t,n):(He(et,et.current&1),e=Tn(e,t,n),e!==null?e.sibling:null);He(et,et.current&1);break;case 19:if(o=(n&t.childLanes)!==0,e.flags&128){if(o)return ov(e,t,n);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),He(et,et.current),o)break;return null;case 22:case 23:return t.lanes=0,rv(e,t,n)}return Tn(e,t,n)}var av,B1,lv,cv;av=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};B1=function(){};lv=function(e,t,n,o){var c=e.memoizedProps;if(c!==o){e=t.stateNode,Ai(ln.current);var f=null;switch(n){case"input":c=s1(e,c),o=s1(e,o),f=[];break;case"select":c=rt({},c,{value:void 0}),o=rt({},o,{value:void 0}),f=[];break;case"textarea":c=l1(e,c),o=l1(e,o),f=[];break;default:typeof c.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=Yl)}u1(n,o);var g;n=null;for(m in c)if(!o.hasOwnProperty(m)&&c.hasOwnProperty(m)&&c[m]!=null)if(m==="style"){var x=c[m];for(g in x)x.hasOwnProperty(g)&&(n||(n={}),n[g]="")}else m!=="dangerouslySetInnerHTML"&&m!=="children"&&m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&m!=="autoFocus"&&(Uo.hasOwnProperty(m)?f||(f=[]):(f=f||[]).push(m,null));for(m in o){var w=o[m];if(x=c!=null?c[m]:void 0,o.hasOwnProperty(m)&&w!==x&&(w!=null||x!=null))if(m==="style")if(x){for(g in x)!x.hasOwnProperty(g)||w&&w.hasOwnProperty(g)||(n||(n={}),n[g]="");for(g in w)w.hasOwnProperty(g)&&x[g]!==w[g]&&(n||(n={}),n[g]=w[g])}else n||(f||(f=[]),f.push(m,n)),n=w;else m==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,x=x?x.__html:void 0,w!=null&&x!==w&&(f=f||[]).push(m,w)):m==="children"?typeof w!="string"&&typeof w!="number"||(f=f||[]).push(m,""+w):m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&(Uo.hasOwnProperty(m)?(w!=null&&m==="onScroll"&&Xe("scroll",e),f||x===w||(f=[])):(f=f||[]).push(m,w))}n&&(f=f||[]).push("style",n);var m=f;(t.updateQueue=m)&&(t.flags|=4)}};cv=function(e,t,n,o){n!==o&&(t.flags|=4)};function lo(e,t){if(!Qe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function $t(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var c=e.child;c!==null;)n|=c.lanes|c.childLanes,o|=c.subtreeFlags&14680064,o|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)n|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function XI(e,t,n){var o=t.pendingProps;switch(f0(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $t(t),null;case 1:return ur(t.type)&&Kl(),$t(t),null;case 3:return o=t.stateNode,Ns(),Ye(cr),Ye(Ht),y0(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(el(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,$r!==null&&(H1($r),$r=null))),B1(e,t),$t(t),null;case 5:v0(t);var c=Ai(Qo.current);if(n=t.type,e!==null&&t.stateNode!=null)lv(e,t,n,o,c),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(q(166));return $t(t),null}if(e=Ai(ln.current),el(t)){o=t.stateNode,n=t.type;var f=t.memoizedProps;switch(o[on]=t,o[Ko]=f,e=(t.mode&1)!==0,n){case"dialog":Xe("cancel",o),Xe("close",o);break;case"iframe":case"object":case"embed":Xe("load",o);break;case"video":case"audio":for(c=0;c<xo.length;c++)Xe(xo[c],o);break;case"source":Xe("error",o);break;case"img":case"image":case"link":Xe("error",o),Xe("load",o);break;case"details":Xe("toggle",o);break;case"input":Gg(o,f),Xe("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!f.multiple},Xe("invalid",o);break;case"textarea":Yg(o,f),Xe("invalid",o)}u1(n,f),c=null;for(var g in f)if(f.hasOwnProperty(g)){var x=f[g];g==="children"?typeof x=="string"?o.textContent!==x&&(f.suppressHydrationWarning!==!0&&Ja(o.textContent,x,e),c=["children",x]):typeof x=="number"&&o.textContent!==""+x&&(f.suppressHydrationWarning!==!0&&Ja(o.textContent,x,e),c=["children",""+x]):Uo.hasOwnProperty(g)&&x!=null&&g==="onScroll"&&Xe("scroll",o)}switch(n){case"input":Ha(o),Xg(o,f,!0);break;case"textarea":Ha(o),Kg(o);break;case"select":case"option":break;default:typeof f.onClick=="function"&&(o.onclick=Yl)}o=c,t.updateQueue=o,o!==null&&(t.flags|=4)}else{g=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Bx(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=g.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=g.createElement(n,{is:o.is}):(e=g.createElement(n),n==="select"&&(g=e,o.multiple?g.multiple=!0:o.size&&(g.size=o.size))):e=g.createElementNS(e,n),e[on]=t,e[Ko]=o,av(e,t,!1,!1),t.stateNode=e;e:{switch(g=f1(n,o),n){case"dialog":Xe("cancel",e),Xe("close",e),c=o;break;case"iframe":case"object":case"embed":Xe("load",e),c=o;break;case"video":case"audio":for(c=0;c<xo.length;c++)Xe(xo[c],e);c=o;break;case"source":Xe("error",e),c=o;break;case"img":case"image":case"link":Xe("error",e),Xe("load",e),c=o;break;case"details":Xe("toggle",e),c=o;break;case"input":Gg(e,o),c=s1(e,o),Xe("invalid",e);break;case"option":c=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},c=rt({},o,{value:void 0}),Xe("invalid",e);break;case"textarea":Yg(e,o),c=l1(e,o),Xe("invalid",e);break;default:c=o}u1(n,c),x=c;for(f in x)if(x.hasOwnProperty(f)){var w=x[f];f==="style"?jx(e,w):f==="dangerouslySetInnerHTML"?(w=w?w.__html:void 0,w!=null&&Fx(e,w)):f==="children"?typeof w=="string"?(n!=="textarea"||w!=="")&&jo(e,w):typeof w=="number"&&jo(e,""+w):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(Uo.hasOwnProperty(f)?w!=null&&f==="onScroll"&&Xe("scroll",e):w!=null&&Zd(e,f,w,g))}switch(n){case"input":Ha(e),Xg(e,o,!1);break;case"textarea":Ha(e),Kg(e);break;case"option":o.value!=null&&e.setAttribute("value",""+ni(o.value));break;case"select":e.multiple=!!o.multiple,f=o.value,f!=null?ms(e,!!o.multiple,f,!1):o.defaultValue!=null&&ms(e,!!o.multiple,o.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=Yl)}switch(n){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return $t(t),null;case 6:if(e&&t.stateNode!=null)cv(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(q(166));if(n=Ai(Qo.current),Ai(ln.current),el(t)){if(o=t.stateNode,n=t.memoizedProps,o[on]=t,(f=o.nodeValue!==n)&&(e=wr,e!==null))switch(e.tag){case 3:Ja(o.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ja(o.nodeValue,n,(e.mode&1)!==0)}f&&(t.flags|=4)}else o=(n.nodeType===9?n:n.ownerDocument).createTextNode(o),o[on]=t,t.stateNode=o}return $t(t),null;case 13:if(Ye(et),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Qe&&xr!==null&&t.mode&1&&!(t.flags&128))Tw(),Rs(),t.flags|=98560,f=!1;else if(f=el(t),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(q(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(q(317));f[on]=t}else Rs(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;$t(t),f=!1}else $r!==null&&(H1($r),$r=null),f=!0;if(!f)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,t.mode&1&&(e===null||et.current&1?At===0&&(At=3):k0())),t.updateQueue!==null&&(t.flags|=4),$t(t),null);case 4:return Ns(),B1(e,t),e===null&&Xo(t.stateNode.containerInfo),$t(t),null;case 10:return p0(t.type._context),$t(t),null;case 17:return ur(t.type)&&Kl(),$t(t),null;case 19:if(Ye(et),f=t.memoizedState,f===null)return $t(t),null;if(o=(t.flags&128)!==0,g=f.rendering,g===null)if(o)lo(f,!1);else{if(At!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(g=rc(e),g!==null){for(t.flags|=128,lo(f,!1),o=g.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=n,n=t.child;n!==null;)f=n,e=o,f.flags&=14680066,g=f.alternate,g===null?(f.childLanes=0,f.lanes=e,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=g.lanes,f.child=g.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,f.updateQueue=g.updateQueue,f.type=g.type,e=g.dependencies,f.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return He(et,et.current&1|2),t.child}e=e.sibling}f.tail!==null&&ut()>ks&&(t.flags|=128,o=!0,lo(f,!1),t.lanes=4194304)}else{if(!o)if(e=rc(g),e!==null){if(t.flags|=128,o=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),lo(f,!0),f.tail===null&&f.tailMode==="hidden"&&!g.alternate&&!Qe)return $t(t),null}else 2*ut()-f.renderingStartTime>ks&&n!==1073741824&&(t.flags|=128,o=!0,lo(f,!1),t.lanes=4194304);f.isBackwards?(g.sibling=t.child,t.child=g):(n=f.last,n!==null?n.sibling=g:t.child=g,f.last=g)}return f.tail!==null?(t=f.tail,f.rendering=t,f.tail=t.sibling,f.renderingStartTime=ut(),t.sibling=null,n=et.current,He(et,o?n&1|2:n&1),t):($t(t),null);case 22:case 23:return O0(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?mr&1073741824&&($t(t),t.subtreeFlags&6&&(t.flags|=8192)):$t(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function YI(e,t){switch(f0(t),t.tag){case 1:return ur(t.type)&&Kl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ns(),Ye(cr),Ye(Ht),y0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return v0(t),null;case 13:if(Ye(et),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));Rs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ye(et),null;case 4:return Ns(),null;case 10:return p0(t.type._context),null;case 22:case 23:return O0(),null;case 24:return null;default:return null}}var nl=!1,Vt=!1,KI=typeof WeakSet=="function"?WeakSet:Set,oe=null;function us(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(o){at(e,t,o)}else n.current=null}function F1(e,t,n){try{n()}catch(o){at(e,t,o)}}var Fp=!1;function ZI(e,t){if(E1=Hl,e=gw(),c0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var c=o.anchorOffset,f=o.focusNode;o=o.focusOffset;try{n.nodeType,f.nodeType}catch{n=null;break e}var g=0,x=-1,w=-1,m=0,C=0,y=e,S=null;t:for(;;){for(var _;y!==n||c!==0&&y.nodeType!==3||(x=g+c),y!==f||o!==0&&y.nodeType!==3||(w=g+o),y.nodeType===3&&(g+=y.nodeValue.length),(_=y.firstChild)!==null;)S=y,y=_;for(;;){if(y===e)break t;if(S===n&&++m===c&&(x=g),S===f&&++C===o&&(w=g),(_=y.nextSibling)!==null)break;y=S,S=y.parentNode}y=_}n=x===-1||w===-1?null:{start:x,end:w}}else n=null}n=n||{start:0,end:0}}else n=null;for(b1={focusedElem:e,selectionRange:n},Hl=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var D=k.memoizedProps,X=k.memoizedState,O=t.stateNode,I=O.getSnapshotBeforeUpdate(t.elementType===t.type?D:jr(t.type,D),X);O.__reactInternalSnapshotBeforeUpdate=I}break;case 3:var R=t.stateNode.containerInfo;R.nodeType===1?R.textContent="":R.nodeType===9&&R.documentElement&&R.removeChild(R.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(U){at(t,t.return,U)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return k=Fp,Fp=!1,k}function Ro(e,t,n){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var c=o=o.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&F1(t,n,f)}c=c.next}while(c!==o)}}function zc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var o=n.create;n.destroy=o()}n=n.next}while(n!==t)}}function U1(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function uv(e){var t=e.alternate;t!==null&&(e.alternate=null,uv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[on],delete t[Ko],delete t[S1],delete t[kI],delete t[DI])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function fv(e){return e.tag===5||e.tag===3||e.tag===4}function Up(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function j1(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Yl));else if(o!==4&&(e=e.child,e!==null))for(j1(e,t,n),e=e.sibling;e!==null;)j1(e,t,n),e=e.sibling}function W1(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(W1(e,t,n),e=e.sibling;e!==null;)W1(e,t,n),e=e.sibling}var Lt=null,Wr=!1;function Un(e,t,n){for(n=n.child;n!==null;)dv(e,t,n),n=n.sibling}function dv(e,t,n){if(an&&typeof an.onCommitFiberUnmount=="function")try{an.onCommitFiberUnmount(Mc,n)}catch{}switch(n.tag){case 5:Vt||us(n,t);case 6:var o=Lt,c=Wr;Lt=null,Un(e,t,n),Lt=o,Wr=c,Lt!==null&&(Wr?(e=Lt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Lt.removeChild(n.stateNode));break;case 18:Lt!==null&&(Wr?(e=Lt,n=n.stateNode,e.nodeType===8?mf(e.parentNode,n):e.nodeType===1&&mf(e,n),Vo(e)):mf(Lt,n.stateNode));break;case 4:o=Lt,c=Wr,Lt=n.stateNode.containerInfo,Wr=!0,Un(e,t,n),Lt=o,Wr=c;break;case 0:case 11:case 14:case 15:if(!Vt&&(o=n.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){c=o=o.next;do{var f=c,g=f.destroy;f=f.tag,g!==void 0&&(f&2||f&4)&&F1(n,t,g),c=c.next}while(c!==o)}Un(e,t,n);break;case 1:if(!Vt&&(us(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=n.memoizedProps,o.state=n.memoizedState,o.componentWillUnmount()}catch(x){at(n,t,x)}Un(e,t,n);break;case 21:Un(e,t,n);break;case 22:n.mode&1?(Vt=(o=Vt)||n.memoizedState!==null,Un(e,t,n),Vt=o):Un(e,t,n);break;default:Un(e,t,n)}}function jp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new KI),t.forEach(function(o){var c=s9.bind(null,e,o);n.has(o)||(n.add(o),o.then(c,c))})}}function Fr(e,t){var n=t.deletions;if(n!==null)for(var o=0;o<n.length;o++){var c=n[o];try{var f=e,g=t,x=g;e:for(;x!==null;){switch(x.tag){case 5:Lt=x.stateNode,Wr=!1;break e;case 3:Lt=x.stateNode.containerInfo,Wr=!0;break e;case 4:Lt=x.stateNode.containerInfo,Wr=!0;break e}x=x.return}if(Lt===null)throw Error(q(160));dv(f,g,c),Lt=null,Wr=!1;var w=c.alternate;w!==null&&(w.return=null),c.return=null}catch(m){at(c,t,m)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)hv(t,e),t=t.sibling}function hv(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Fr(t,e),nn(e),o&4){try{Ro(3,e,e.return),zc(3,e)}catch(D){at(e,e.return,D)}try{Ro(5,e,e.return)}catch(D){at(e,e.return,D)}}break;case 1:Fr(t,e),nn(e),o&512&&n!==null&&us(n,n.return);break;case 5:if(Fr(t,e),nn(e),o&512&&n!==null&&us(n,n.return),e.flags&32){var c=e.stateNode;try{jo(c,"")}catch(D){at(e,e.return,D)}}if(o&4&&(c=e.stateNode,c!=null)){var f=e.memoizedProps,g=n!==null?n.memoizedProps:f,x=e.type,w=e.updateQueue;if(e.updateQueue=null,w!==null)try{x==="input"&&f.type==="radio"&&f.name!=null&&Px(c,f),f1(x,g);var m=f1(x,f);for(g=0;g<w.length;g+=2){var C=w[g],y=w[g+1];C==="style"?jx(c,y):C==="dangerouslySetInnerHTML"?Fx(c,y):C==="children"?jo(c,y):Zd(c,C,y,m)}switch(x){case"input":o1(c,f);break;case"textarea":Lx(c,f);break;case"select":var S=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!f.multiple;var _=f.value;_!=null?ms(c,!!f.multiple,_,!1):S!==!!f.multiple&&(f.defaultValue!=null?ms(c,!!f.multiple,f.defaultValue,!0):ms(c,!!f.multiple,f.multiple?[]:"",!1))}c[Ko]=f}catch(D){at(e,e.return,D)}}break;case 6:if(Fr(t,e),nn(e),o&4){if(e.stateNode===null)throw Error(q(162));c=e.stateNode,f=e.memoizedProps;try{c.nodeValue=f}catch(D){at(e,e.return,D)}}break;case 3:if(Fr(t,e),nn(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{Vo(t.containerInfo)}catch(D){at(e,e.return,D)}break;case 4:Fr(t,e),nn(e);break;case 13:Fr(t,e),nn(e),c=e.child,c.flags&8192&&(f=c.memoizedState!==null,c.stateNode.isHidden=f,!f||c.alternate!==null&&c.alternate.memoizedState!==null||(_0=ut())),o&4&&jp(e);break;case 22:if(C=n!==null&&n.memoizedState!==null,e.mode&1?(Vt=(m=Vt)||C,Fr(t,e),Vt=m):Fr(t,e),nn(e),o&8192){if(m=e.memoizedState!==null,(e.stateNode.isHidden=m)&&!C&&e.mode&1)for(oe=e,C=e.child;C!==null;){for(y=oe=C;oe!==null;){switch(S=oe,_=S.child,S.tag){case 0:case 11:case 14:case 15:Ro(4,S,S.return);break;case 1:us(S,S.return);var k=S.stateNode;if(typeof k.componentWillUnmount=="function"){o=S,n=S.return;try{t=o,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(D){at(o,n,D)}}break;case 5:us(S,S.return);break;case 22:if(S.memoizedState!==null){zp(y);continue}}_!==null?(_.return=S,oe=_):zp(y)}C=C.sibling}e:for(C=null,y=e;;){if(y.tag===5){if(C===null){C=y;try{c=y.stateNode,m?(f=c.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none"):(x=y.stateNode,w=y.memoizedProps.style,g=w!=null&&w.hasOwnProperty("display")?w.display:null,x.style.display=Ux("display",g))}catch(D){at(e,e.return,D)}}}else if(y.tag===6){if(C===null)try{y.stateNode.nodeValue=m?"":y.memoizedProps}catch(D){at(e,e.return,D)}}else if((y.tag!==22&&y.tag!==23||y.memoizedState===null||y===e)&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===e)break e;for(;y.sibling===null;){if(y.return===null||y.return===e)break e;C===y&&(C=null),y=y.return}C===y&&(C=null),y.sibling.return=y.return,y=y.sibling}}break;case 19:Fr(t,e),nn(e),o&4&&jp(e);break;case 21:break;default:Fr(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(fv(n)){var o=n;break e}n=n.return}throw Error(q(160))}switch(o.tag){case 5:var c=o.stateNode;o.flags&32&&(jo(c,""),o.flags&=-33);var f=Up(e);W1(e,f,c);break;case 3:case 4:var g=o.stateNode.containerInfo,x=Up(e);j1(e,x,g);break;default:throw Error(q(161))}}catch(w){at(e,e.return,w)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function QI(e,t,n){oe=e,gv(e)}function gv(e,t,n){for(var o=(e.mode&1)!==0;oe!==null;){var c=oe,f=c.child;if(c.tag===22&&o){var g=c.memoizedState!==null||nl;if(!g){var x=c.alternate,w=x!==null&&x.memoizedState!==null||Vt;x=nl;var m=Vt;if(nl=g,(Vt=w)&&!m)for(oe=c;oe!==null;)g=oe,w=g.child,g.tag===22&&g.memoizedState!==null?$p(c):w!==null?(w.return=g,oe=w):$p(c);for(;f!==null;)oe=f,gv(f),f=f.sibling;oe=c,nl=x,Vt=m}Wp(e)}else c.subtreeFlags&8772&&f!==null?(f.return=c,oe=f):Wp(e)}}function Wp(e){for(;oe!==null;){var t=oe;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Vt||zc(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!Vt)if(n===null)o.componentDidMount();else{var c=t.elementType===t.type?n.memoizedProps:jr(t.type,n.memoizedProps);o.componentDidUpdate(c,n.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var f=t.updateQueue;f!==null&&Sp(t,f,o);break;case 3:var g=t.updateQueue;if(g!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Sp(t,g,n)}break;case 5:var x=t.stateNode;if(n===null&&t.flags&4){n=x;var w=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":w.autoFocus&&n.focus();break;case"img":w.src&&(n.src=w.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var m=t.alternate;if(m!==null){var C=m.memoizedState;if(C!==null){var y=C.dehydrated;y!==null&&Vo(y)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}Vt||t.flags&512&&U1(t)}catch(S){at(t,t.return,S)}}if(t===e){oe=null;break}if(n=t.sibling,n!==null){n.return=t.return,oe=n;break}oe=t.return}}function zp(e){for(;oe!==null;){var t=oe;if(t===e){oe=null;break}var n=t.sibling;if(n!==null){n.return=t.return,oe=n;break}oe=t.return}}function $p(e){for(;oe!==null;){var t=oe;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{zc(4,t)}catch(w){at(t,n,w)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var c=t.return;try{o.componentDidMount()}catch(w){at(t,c,w)}}var f=t.return;try{U1(t)}catch(w){at(t,f,w)}break;case 5:var g=t.return;try{U1(t)}catch(w){at(t,g,w)}}}catch(w){at(t,t.return,w)}if(t===e){oe=null;break}var x=t.sibling;if(x!==null){x.return=t.return,oe=x;break}oe=t.return}}var qI=Math.ceil,sc=Nn.ReactCurrentDispatcher,T0=Nn.ReactCurrentOwner,Or=Nn.ReactCurrentBatchConfig,ke=0,_t=null,mt=null,Ft=0,mr=0,fs=li(0),At=0,ta=null,Di=0,$c=0,R0=0,_o=null,ar=null,_0=0,ks=1/0,mn=null,oc=!1,z1=null,ei=null,il=!1,Yn=null,ac=0,No=0,$1=null,Tl=-1,Rl=0;function Zt(){return ke&6?ut():Tl!==-1?Tl:Tl=ut()}function ti(e){return e.mode&1?ke&2&&Ft!==0?Ft&-Ft:PI.transition!==null?(Rl===0&&(Rl=qx()),Rl):(e=Be,e!==0||(e=window.event,e=e===void 0?16:sw(e.type)),e):1}function Hr(e,t,n,o){if(50<No)throw No=0,$1=null,Error(q(185));fa(e,n,o),(!(ke&2)||e!==_t)&&(e===_t&&(!(ke&2)&&($c|=n),At===4&&Vn(e,Ft)),fr(e,o),n===1&&ke===0&&!(t.mode&1)&&(ks=ut()+500,Uc&&ci()))}function fr(e,t){var n=e.callbackNode;P5(e,t);var o=Vl(e,e===_t?Ft:0);if(o===0)n!==null&&qg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(n!=null&&qg(n),t===1)e.tag===0?MI(Vp.bind(null,e)):Aw(Vp.bind(null,e)),NI(function(){!(ke&6)&&ci()}),n=null;else{switch(Jx(o)){case 1:n=t0;break;case 4:n=Zx;break;case 16:n=$l;break;case 536870912:n=Qx;break;default:n=$l}n=bv(n,pv.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function pv(e,t){if(Tl=-1,Rl=0,ke&6)throw Error(q(327));var n=e.callbackNode;if(Es()&&e.callbackNode!==n)return null;var o=Vl(e,e===_t?Ft:0);if(o===0)return null;if(o&30||o&e.expiredLanes||t)t=lc(e,o);else{t=o;var c=ke;ke|=2;var f=xv();(_t!==e||Ft!==t)&&(mn=null,ks=ut()+500,Ii(e,t));do try{t9();break}catch(x){mv(e,x)}while(!0);g0(),sc.current=f,ke=c,mt!==null?t=0:(_t=null,Ft=0,t=At)}if(t!==0){if(t===2&&(c=m1(e),c!==0&&(o=c,t=V1(e,c))),t===1)throw n=ta,Ii(e,0),Vn(e,o),fr(e,ut()),n;if(t===6)Vn(e,o);else{if(c=e.current.alternate,!(o&30)&&!JI(c)&&(t=lc(e,o),t===2&&(f=m1(e),f!==0&&(o=f,t=V1(e,f))),t===1))throw n=ta,Ii(e,0),Vn(e,o),fr(e,ut()),n;switch(e.finishedWork=c,e.finishedLanes=o,t){case 0:case 1:throw Error(q(345));case 2:yi(e,ar,mn);break;case 3:if(Vn(e,o),(o&130023424)===o&&(t=_0+500-ut(),10<t)){if(Vl(e,0)!==0)break;if(c=e.suspendedLanes,(c&o)!==o){Zt(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=A1(yi.bind(null,e,ar,mn),t);break}yi(e,ar,mn);break;case 4:if(Vn(e,o),(o&4194240)===o)break;for(t=e.eventTimes,c=-1;0<o;){var g=31-Vr(o);f=1<<g,g=t[g],g>c&&(c=g),o&=~f}if(o=c,o=ut()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*qI(o/1960))-o,10<o){e.timeoutHandle=A1(yi.bind(null,e,ar,mn),o);break}yi(e,ar,mn);break;case 5:yi(e,ar,mn);break;default:throw Error(q(329))}}}return fr(e,ut()),e.callbackNode===n?pv.bind(null,e):null}function V1(e,t){var n=_o;return e.current.memoizedState.isDehydrated&&(Ii(e,t).flags|=256),e=lc(e,t),e!==2&&(t=ar,ar=n,t!==null&&H1(t)),e}function H1(e){ar===null?ar=e:ar.push.apply(ar,e)}function JI(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var o=0;o<n.length;o++){var c=n[o],f=c.getSnapshot;c=c.value;try{if(!Gr(f(),c))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vn(e,t){for(t&=~R0,t&=~$c,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Vr(t),o=1<<n;e[n]=-1,t&=~o}}function Vp(e){if(ke&6)throw Error(q(327));Es();var t=Vl(e,0);if(!(t&1))return fr(e,ut()),null;var n=lc(e,t);if(e.tag!==0&&n===2){var o=m1(e);o!==0&&(t=o,n=V1(e,o))}if(n===1)throw n=ta,Ii(e,0),Vn(e,t),fr(e,ut()),n;if(n===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yi(e,ar,mn),fr(e,ut()),null}function N0(e,t){var n=ke;ke|=1;try{return e(t)}finally{ke=n,ke===0&&(ks=ut()+500,Uc&&ci())}}function Mi(e){Yn!==null&&Yn.tag===0&&!(ke&6)&&Es();var t=ke;ke|=1;var n=Or.transition,o=Be;try{if(Or.transition=null,Be=1,e)return e()}finally{Be=o,Or.transition=n,ke=t,!(ke&6)&&ci()}}function O0(){mr=fs.current,Ye(fs)}function Ii(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,_I(n)),mt!==null)for(n=mt.return;n!==null;){var o=n;switch(f0(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&Kl();break;case 3:Ns(),Ye(cr),Ye(Ht),y0();break;case 5:v0(o);break;case 4:Ns();break;case 13:Ye(et);break;case 19:Ye(et);break;case 10:p0(o.type._context);break;case 22:case 23:O0()}n=n.return}if(_t=e,mt=e=ri(e.current,null),Ft=mr=t,At=0,ta=null,R0=$c=Di=0,ar=_o=null,Ci!==null){for(t=0;t<Ci.length;t++)if(n=Ci[t],o=n.interleaved,o!==null){n.interleaved=null;var c=o.next,f=n.pending;if(f!==null){var g=f.next;f.next=c,o.next=g}n.pending=o}Ci=null}return e}function mv(e,t){do{var n=mt;try{if(g0(),Al.current=ic,nc){for(var o=tt.memoizedState;o!==null;){var c=o.queue;c!==null&&(c.pending=null),o=o.next}nc=!1}if(ki=0,Rt=Ct=tt=null,To=!1,qo=0,T0.current=null,n===null||n.return===null){At=1,ta=t,mt=null;break}e:{var f=e,g=n.return,x=n,w=t;if(t=Ft,x.flags|=32768,w!==null&&typeof w=="object"&&typeof w.then=="function"){var m=w,C=x,y=C.tag;if(!(C.mode&1)&&(y===0||y===11||y===15)){var S=C.alternate;S?(C.updateQueue=S.updateQueue,C.memoizedState=S.memoizedState,C.lanes=S.lanes):(C.updateQueue=null,C.memoizedState=null)}var _=Op(g);if(_!==null){_.flags&=-257,kp(_,g,x,f,t),_.mode&1&&Np(f,m,t),t=_,w=m;var k=t.updateQueue;if(k===null){var D=new Set;D.add(w),t.updateQueue=D}else k.add(w);break e}else{if(!(t&1)){Np(f,m,t),k0();break e}w=Error(q(426))}}else if(Qe&&x.mode&1){var X=Op(g);if(X!==null){!(X.flags&65536)&&(X.flags|=256),kp(X,g,x,f,t),d0(Os(w,x));break e}}f=w=Os(w,x),At!==4&&(At=2),_o===null?_o=[f]:_o.push(f),f=g;do{switch(f.tag){case 3:f.flags|=65536,t&=-t,f.lanes|=t;var O=Jw(f,w,t);Ap(f,O);break e;case 1:x=w;var I=f.type,R=f.stateNode;if(!(f.flags&128)&&(typeof I.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(ei===null||!ei.has(R)))){f.flags|=65536,t&=-t,f.lanes|=t;var U=ev(f,x,t);Ap(f,U);break e}}f=f.return}while(f!==null)}vv(n)}catch(G){t=G,mt===n&&n!==null&&(mt=n=n.return);continue}break}while(!0)}function xv(){var e=sc.current;return sc.current=ic,e===null?ic:e}function k0(){(At===0||At===3||At===2)&&(At=4),_t===null||!(Di&268435455)&&!($c&268435455)||Vn(_t,Ft)}function lc(e,t){var n=ke;ke|=2;var o=xv();(_t!==e||Ft!==t)&&(mn=null,Ii(e,t));do try{e9();break}catch(c){mv(e,c)}while(!0);if(g0(),ke=n,sc.current=o,mt!==null)throw Error(q(261));return _t=null,Ft=0,At}function e9(){for(;mt!==null;)wv(mt)}function t9(){for(;mt!==null&&!I5();)wv(mt)}function wv(e){var t=Ev(e.alternate,e,mr);e.memoizedProps=e.pendingProps,t===null?vv(e):mt=t,T0.current=null}function vv(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=YI(n,t),n!==null){n.flags&=32767,mt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{At=6,mt=null;return}}else if(n=XI(n,t,mr),n!==null){mt=n;return}if(t=t.sibling,t!==null){mt=t;return}mt=t=e}while(t!==null);At===0&&(At=5)}function yi(e,t,n){var o=Be,c=Or.transition;try{Or.transition=null,Be=1,r9(e,t,n,o)}finally{Or.transition=c,Be=o}return null}function r9(e,t,n,o){do Es();while(Yn!==null);if(ke&6)throw Error(q(327));n=e.finishedWork;var c=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(q(177));e.callbackNode=null,e.callbackPriority=0;var f=n.lanes|n.childLanes;if(L5(e,f),e===_t&&(mt=_t=null,Ft=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||il||(il=!0,bv($l,function(){return Es(),null})),f=(n.flags&15990)!==0,n.subtreeFlags&15990||f){f=Or.transition,Or.transition=null;var g=Be;Be=1;var x=ke;ke|=4,T0.current=null,ZI(e,n),hv(n,e),bI(b1),Hl=!!E1,b1=E1=null,e.current=n,QI(n),T5(),ke=x,Be=g,Or.transition=f}else e.current=n;if(il&&(il=!1,Yn=e,ac=c),f=e.pendingLanes,f===0&&(ei=null),N5(n.stateNode),fr(e,ut()),t!==null)for(o=e.onRecoverableError,n=0;n<t.length;n++)c=t[n],o(c.value,{componentStack:c.stack,digest:c.digest});if(oc)throw oc=!1,e=z1,z1=null,e;return ac&1&&e.tag!==0&&Es(),f=e.pendingLanes,f&1?e===$1?No++:(No=0,$1=e):No=0,ci(),null}function Es(){if(Yn!==null){var e=Jx(ac),t=Or.transition,n=Be;try{if(Or.transition=null,Be=16>e?16:e,Yn===null)var o=!1;else{if(e=Yn,Yn=null,ac=0,ke&6)throw Error(q(331));var c=ke;for(ke|=4,oe=e.current;oe!==null;){var f=oe,g=f.child;if(oe.flags&16){var x=f.deletions;if(x!==null){for(var w=0;w<x.length;w++){var m=x[w];for(oe=m;oe!==null;){var C=oe;switch(C.tag){case 0:case 11:case 15:Ro(8,C,f)}var y=C.child;if(y!==null)y.return=C,oe=y;else for(;oe!==null;){C=oe;var S=C.sibling,_=C.return;if(uv(C),C===m){oe=null;break}if(S!==null){S.return=_,oe=S;break}oe=_}}}var k=f.alternate;if(k!==null){var D=k.child;if(D!==null){k.child=null;do{var X=D.sibling;D.sibling=null,D=X}while(D!==null)}}oe=f}}if(f.subtreeFlags&2064&&g!==null)g.return=f,oe=g;else e:for(;oe!==null;){if(f=oe,f.flags&2048)switch(f.tag){case 0:case 11:case 15:Ro(9,f,f.return)}var O=f.sibling;if(O!==null){O.return=f.return,oe=O;break e}oe=f.return}}var I=e.current;for(oe=I;oe!==null;){g=oe;var R=g.child;if(g.subtreeFlags&2064&&R!==null)R.return=g,oe=R;else e:for(g=I;oe!==null;){if(x=oe,x.flags&2048)try{switch(x.tag){case 0:case 11:case 15:zc(9,x)}}catch(G){at(x,x.return,G)}if(x===g){oe=null;break e}var U=x.sibling;if(U!==null){U.return=x.return,oe=U;break e}oe=x.return}}if(ke=c,ci(),an&&typeof an.onPostCommitFiberRoot=="function")try{an.onPostCommitFiberRoot(Mc,e)}catch{}o=!0}return o}finally{Be=n,Or.transition=t}}return!1}function Hp(e,t,n){t=Os(n,t),t=Jw(e,t,1),e=Jn(e,t,1),t=Zt(),e!==null&&(fa(e,1,t),fr(e,t))}function at(e,t,n){if(e.tag===3)Hp(e,e,n);else for(;t!==null;){if(t.tag===3){Hp(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ei===null||!ei.has(o))){e=Os(n,e),e=ev(t,e,1),t=Jn(t,e,1),e=Zt(),t!==null&&(fa(t,1,e),fr(t,e));break}}t=t.return}}function n9(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),t=Zt(),e.pingedLanes|=e.suspendedLanes&n,_t===e&&(Ft&n)===n&&(At===4||At===3&&(Ft&130023424)===Ft&&500>ut()-_0?Ii(e,0):R0|=n),fr(e,t)}function yv(e,t){t===0&&(e.mode&1?(t=Ya,Ya<<=1,!(Ya&130023424)&&(Ya=4194304)):t=1);var n=Zt();e=In(e,t),e!==null&&(fa(e,t,n),fr(e,n))}function i9(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yv(e,n)}function s9(e,t){var n=0;switch(e.tag){case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(n=c.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(q(314))}o!==null&&o.delete(t),yv(e,n)}var Ev;Ev=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||cr.current)lr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return lr=!1,GI(e,t,n);lr=!!(e.flags&131072)}else lr=!1,Qe&&t.flags&1048576&&Sw(t,ql,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Il(e,t),e=t.pendingProps;var c=Ts(t,Ht.current);ys(t,n),c=b0(null,t,o,e,c,n);var f=C0();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ur(o)?(f=!0,Zl(t)):f=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,x0(t),c.updater=Wc,t.stateNode=c,c._reactInternals=t,O1(t,o,e,n),t=M1(null,t,o,!0,f,n)):(t.tag=0,Qe&&f&&u0(t),Kt(null,t,c,n),t=t.child),t;case 16:o=t.elementType;e:{switch(Il(e,t),e=t.pendingProps,c=o._init,o=c(o._payload),t.type=o,c=t.tag=a9(o),e=jr(o,e),c){case 0:t=D1(null,t,o,e,n);break e;case 1:t=Pp(null,t,o,e,n);break e;case 11:t=Dp(null,t,o,e,n);break e;case 14:t=Mp(null,t,o,jr(o.type,e),n);break e}throw Error(q(306,o,""))}return t;case 0:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:jr(o,c),D1(e,t,o,c,n);case 1:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:jr(o,c),Pp(e,t,o,c,n);case 3:e:{if(iv(t),e===null)throw Error(q(387));o=t.pendingProps,f=t.memoizedState,c=f.element,Ow(e,t),tc(t,o,null,n);var g=t.memoizedState;if(o=g.element,f.isDehydrated)if(f={element:o,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){c=Os(Error(q(423)),t),t=Lp(e,t,o,n,c);break e}else if(o!==c){c=Os(Error(q(424)),t),t=Lp(e,t,o,n,c);break e}else for(xr=qn(t.stateNode.containerInfo.firstChild),wr=t,Qe=!0,$r=null,n=_w(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Rs(),o===c){t=Tn(e,t,n);break e}Kt(e,t,o,n)}t=t.child}return t;case 5:return kw(t),e===null&&R1(t),o=t.type,c=t.pendingProps,f=e!==null?e.memoizedProps:null,g=c.children,C1(o,c)?g=null:f!==null&&C1(o,f)&&(t.flags|=32),nv(e,t),Kt(e,t,g,n),t.child;case 6:return e===null&&R1(t),null;case 13:return sv(e,t,n);case 4:return w0(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=_s(t,null,o,n):Kt(e,t,o,n),t.child;case 11:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:jr(o,c),Dp(e,t,o,c,n);case 7:return Kt(e,t,t.pendingProps,n),t.child;case 8:return Kt(e,t,t.pendingProps.children,n),t.child;case 12:return Kt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(o=t.type._context,c=t.pendingProps,f=t.memoizedProps,g=c.value,He(Jl,o._currentValue),o._currentValue=g,f!==null)if(Gr(f.value,g)){if(f.children===c.children&&!cr.current){t=Tn(e,t,n);break e}}else for(f=t.child,f!==null&&(f.return=t);f!==null;){var x=f.dependencies;if(x!==null){g=f.child;for(var w=x.firstContext;w!==null;){if(w.context===o){if(f.tag===1){w=En(-1,n&-n),w.tag=2;var m=f.updateQueue;if(m!==null){m=m.shared;var C=m.pending;C===null?w.next=w:(w.next=C.next,C.next=w),m.pending=w}}f.lanes|=n,w=f.alternate,w!==null&&(w.lanes|=n),_1(f.return,n,t),x.lanes|=n;break}w=w.next}}else if(f.tag===10)g=f.type===t.type?null:f.child;else if(f.tag===18){if(g=f.return,g===null)throw Error(q(341));g.lanes|=n,x=g.alternate,x!==null&&(x.lanes|=n),_1(g,n,t),g=f.sibling}else g=f.child;if(g!==null)g.return=f;else for(g=f;g!==null;){if(g===t){g=null;break}if(f=g.sibling,f!==null){f.return=g.return,g=f;break}g=g.return}f=g}Kt(e,t,c.children,n),t=t.child}return t;case 9:return c=t.type,o=t.pendingProps.children,ys(t,n),c=kr(c),o=o(c),t.flags|=1,Kt(e,t,o,n),t.child;case 14:return o=t.type,c=jr(o,t.pendingProps),c=jr(o.type,c),Mp(e,t,o,c,n);case 15:return tv(e,t,t.type,t.pendingProps,n);case 17:return o=t.type,c=t.pendingProps,c=t.elementType===o?c:jr(o,c),Il(e,t),t.tag=1,ur(o)?(e=!0,Zl(t)):e=!1,ys(t,n),qw(t,o,c),O1(t,o,c,n),M1(null,t,o,!0,e,n);case 19:return ov(e,t,n);case 22:return rv(e,t,n)}throw Error(q(156,t.tag))};function bv(e,t){return Kx(e,t)}function o9(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nr(e,t,n,o){return new o9(e,t,n,o)}function D0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function a9(e){if(typeof e=="function")return D0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===qd)return 11;if(e===Jd)return 14}return 2}function ri(e,t){var n=e.alternate;return n===null?(n=Nr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function _l(e,t,n,o,c,f){var g=2;if(o=e,typeof e=="function")D0(e)&&(g=1);else if(typeof e=="string")g=5;else e:switch(e){case ts:return Ti(n.children,c,f,t);case Qd:g=8,c|=8;break;case t1:return e=Nr(12,n,t,c|2),e.elementType=t1,e.lanes=f,e;case r1:return e=Nr(13,n,t,c),e.elementType=r1,e.lanes=f,e;case n1:return e=Nr(19,n,t,c),e.elementType=n1,e.lanes=f,e;case kx:return Vc(n,c,f,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Nx:g=10;break e;case Ox:g=9;break e;case qd:g=11;break e;case Jd:g=14;break e;case jn:g=16,o=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=Nr(g,n,t,c),t.elementType=e,t.type=o,t.lanes=f,t}function Ti(e,t,n,o){return e=Nr(7,e,o,t),e.lanes=n,e}function Vc(e,t,n,o){return e=Nr(22,e,o,t),e.elementType=kx,e.lanes=n,e.stateNode={isHidden:!1},e}function Af(e,t,n){return e=Nr(6,e,null,t),e.lanes=n,e}function Sf(e,t,n){return t=Nr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function l9(e,t,n,o,c){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sf(0),this.expirationTimes=sf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sf(0),this.identifierPrefix=o,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function M0(e,t,n,o,c,f,g,x,w){return e=new l9(e,t,n,x,w),t===1?(t=1,f===!0&&(t|=8)):t=0,f=Nr(3,null,null,t),e.current=f,f.stateNode=e,f.memoizedState={element:o,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},x0(f),e}function c9(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:es,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}function Cv(e){if(!e)return ii;e=e._reactInternals;e:{if(Fi(e)!==e||e.tag!==1)throw Error(q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ur(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(q(171))}if(e.tag===1){var n=e.type;if(ur(n))return Cw(e,n,t)}return t}function Av(e,t,n,o,c,f,g,x,w){return e=M0(n,o,!0,e,c,f,g,x,w),e.context=Cv(null),n=e.current,o=Zt(),c=ti(n),f=En(o,c),f.callback=t??null,Jn(n,f,c),e.current.lanes=c,fa(e,c,o),fr(e,o),e}function Hc(e,t,n,o){var c=t.current,f=Zt(),g=ti(c);return n=Cv(n),t.context===null?t.context=n:t.pendingContext=n,t=En(f,g),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=Jn(c,t,g),e!==null&&(Hr(e,c,g,f),Cl(e,c,g)),g}function cc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Gp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function P0(e,t){Gp(e,t),(e=e.alternate)&&Gp(e,t)}function u9(){return null}var Sv=typeof reportError=="function"?reportError:function(e){console.error(e)};function L0(e){this._internalRoot=e}Gc.prototype.render=L0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));Hc(e,t,null,null)};Gc.prototype.unmount=L0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Mi(function(){Hc(null,e,null,null)}),t[Sn]=null}};function Gc(e){this._internalRoot=e}Gc.prototype.unstable_scheduleHydration=function(e){if(e){var t=rw();e={blockedOn:null,target:e,priority:t};for(var n=0;n<$n.length&&t!==0&&t<$n[n].priority;n++);$n.splice(n,0,e),n===0&&iw(e)}};function B0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Xc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Xp(){}function f9(e,t,n,o,c){if(c){if(typeof o=="function"){var f=o;o=function(){var m=cc(g);f.call(m)}}var g=Av(t,o,e,0,null,!1,!1,"",Xp);return e._reactRootContainer=g,e[Sn]=g.current,Xo(e.nodeType===8?e.parentNode:e),Mi(),g}for(;c=e.lastChild;)e.removeChild(c);if(typeof o=="function"){var x=o;o=function(){var m=cc(w);x.call(m)}}var w=M0(e,0,!1,null,null,!1,!1,"",Xp);return e._reactRootContainer=w,e[Sn]=w.current,Xo(e.nodeType===8?e.parentNode:e),Mi(function(){Hc(t,w,n,o)}),w}function Yc(e,t,n,o,c){var f=n._reactRootContainer;if(f){var g=f;if(typeof c=="function"){var x=c;c=function(){var w=cc(g);x.call(w)}}Hc(t,g,e,c)}else g=f9(n,t,e,c,o);return cc(g)}ew=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=mo(t.pendingLanes);n!==0&&(r0(t,n|1),fr(t,ut()),!(ke&6)&&(ks=ut()+500,ci()))}break;case 13:Mi(function(){var o=In(e,1);if(o!==null){var c=Zt();Hr(o,e,1,c)}}),P0(e,1)}};n0=function(e){if(e.tag===13){var t=In(e,134217728);if(t!==null){var n=Zt();Hr(t,e,134217728,n)}P0(e,134217728)}};tw=function(e){if(e.tag===13){var t=ti(e),n=In(e,t);if(n!==null){var o=Zt();Hr(n,e,t,o)}P0(e,t)}};rw=function(){return Be};nw=function(e,t){var n=Be;try{return Be=e,t()}finally{Be=n}};h1=function(e,t,n){switch(t){case"input":if(o1(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var c=Fc(o);if(!c)throw Error(q(90));Mx(o),o1(o,c)}}}break;case"textarea":Lx(e,n);break;case"select":t=n.value,t!=null&&ms(e,!!n.multiple,t,!1)}};$x=N0;Vx=Mi;var d9={usingClientEntryPoint:!1,Events:[ha,ss,Fc,Wx,zx,N0]},co={findFiberByHostInstance:bi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},h9={bundleType:co.bundleType,version:co.version,rendererPackageName:co.rendererPackageName,rendererConfig:co.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Nn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Xx(e),e===null?null:e.stateNode},findFiberByHostInstance:co.findFiberByHostInstance||u9,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sl.isDisabled&&sl.supportsFiber)try{Mc=sl.inject(h9),an=sl}catch{}}br.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=d9;br.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!B0(t))throw Error(q(200));return c9(e,t,null,n)};br.createRoot=function(e,t){if(!B0(e))throw Error(q(299));var n=!1,o="",c=Sv;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=M0(e,1,!1,null,null,n,!1,o,c),e[Sn]=t.current,Xo(e.nodeType===8?e.parentNode:e),new L0(t)};br.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=Xx(t),e=e===null?null:e.stateNode,e};br.flushSync=function(e){return Mi(e)};br.hydrate=function(e,t,n){if(!Xc(t))throw Error(q(200));return Yc(null,e,t,!0,n)};br.hydrateRoot=function(e,t,n){if(!B0(e))throw Error(q(405));var o=n!=null&&n.hydratedSources||null,c=!1,f="",g=Sv;if(n!=null&&(n.unstable_strictMode===!0&&(c=!0),n.identifierPrefix!==void 0&&(f=n.identifierPrefix),n.onRecoverableError!==void 0&&(g=n.onRecoverableError)),t=Av(t,null,e,1,n??null,c,!1,f,g),e[Sn]=t.current,Xo(e),o)for(e=0;e<o.length;e++)n=o[e],c=n._getVersion,c=c(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,c]:t.mutableSourceEagerHydrationData.push(n,c);return new Gc(t)};br.render=function(e,t,n){if(!Xc(t))throw Error(q(200));return Yc(null,e,t,!1,n)};br.unmountComponentAtNode=function(e){if(!Xc(e))throw Error(q(40));return e._reactRootContainer?(Mi(function(){Yc(null,null,e,!1,function(){e._reactRootContainer=null,e[Sn]=null})}),!0):!1};br.unstable_batchedUpdates=N0;br.unstable_renderSubtreeIntoContainer=function(e,t,n,o){if(!Xc(n))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return Yc(e,t,n,!1,o)};br.version="18.3.1-next-f1338f8080-20240426";function Iv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Iv)}catch(e){console.error(e)}}Iv(),Ix.exports=br;var ds=Ix.exports;function g9({message:e,showGuidance:t,windows:n,onClose:o}){const c=me.useRef(null);return me.useEffect(()=>{var f;(f=c.current)==null||f.showModal()},[]),ds.createPortal(P.jsx("dialog",{ref:c,"aria-label":"远程桌面提醒",onCancel:o,onClick:f=>{f.target===f.currentTarget&&o()},style:{margin:"auto",inset:0,width:"min(370px, calc(100vw - 32px))",maxHeight:"calc(100dvh - 32px)",overflowY:"auto",padding:0,borderRadius:12,border:"1px solid var(--border-default)",background:"var(--bg-surface, white)",color:"var(--text-primary)",fontSize:14,lineHeight:1.7},children:P.jsxs("div",{style:{padding:20},children:[P.jsx("strong",{children:"远程桌面提醒"}),P.jsx("p",{children:e}),t&&P.jsxs(P.Fragment,{children:[P.jsx("p",{children:"请在电脑上打开远程桌面授权页面,点击“远程授权”(盾牌图标)。"}),P.jsx("p",{children:n?"在 Windows 电脑上点击“开启共享”,并保持用户已登录、桌面未锁定。完成后此处会自动更新。":"在系统设置中为 AgentRoam Remote Desktop 开启“屏幕录制”和“辅助功能”权限,然后点击“开启共享”。完成后此处会自动更新。"})]}),P.jsx("button",{type:"button",className:"ui-quiet-button",onClick:o,autoFocus:!0,children:"知道了"})]})}),document.body)}function p9(){const[e,t]=me.useState(null),[n,o]=me.useState(!1),[c,f]=me.useState(!1),[g,x]=me.useState(""),w=["127.0.0.1","localhost","[::1]"].includes(location.hostname),m=!/Android|iPhone|iPad|iPod/i.test(navigator.userAgent);me.useEffect(()=>{let S=!0;const _=async()=>{try{const D=await fetch(m&&w?"/api/remote-authorization":"/api/remote-authorization/status",{credentials:"same-origin",cache:"no-store"});if(!D.ok)return;const X=await D.json();S&&t(X)}catch{}};_();const k=setInterval(_,2e3);return()=>{S=!1,clearInterval(k)}},[m,w]);const C=(e==null?void 0:e.platform)==="win32";if(!m){if(!e||e.online&&e.accessibility)return null;const S=e.supported?e.installed?e.enabled?C&&e.locked&&e.unlock==="available"?"Windows 已锁屏。打开「远程桌面」并选择本机桌面,即可唤醒屏幕或输入密码/PIN 解锁。":C&&e.locked?"Windows 已锁屏,但远程解锁服务尚未安装。请在电脑上运行 agentroam unlock-service install。":e.locked?"macOS 已锁屏。打开「远程桌面」并选择本机桌面会自动唤醒屏幕,随后可在锁屏画面输入密码。":!e.screen||!e.accessibility?C?"Windows 桌面暂不可用,请检查 UAC 提示或登录状态。":"电脑的远程桌面授权尚未完成。":"电脑桌面正在连接,请稍候。":"电脑尚未开启桌面共享,请在电脑上完成授权并开启共享。":"电脑缺少远程桌面组件,请在电脑上升级 CLI。":"这台电脑暂不支持远程桌面。";return P.jsxs("div",{className:"remote-desktop-guidance",children:[P.jsx("button",{type:"button",className:"ui-icon-button","aria-label":"查看远程桌面提醒","aria-haspopup":"dialog","aria-expanded":n,onClick:()=>o(!0),style:{color:"var(--warning, #d97706)",minWidth:44,minHeight:44},children:P.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[P.jsx("circle",{cx:"12",cy:"12",r:"9"}),P.jsx("path",{d:"M12 7v6m0 4h.01"})]})}),n&&P.jsx(g9,{windows:C,message:S,showGuidance:e.supported&&e.installed&&(!e.enabled||!e.screen||!e.accessibility),onClose:()=>o(!1)})]})}if(!w)return P.jsxs("div",{style:{position:"relative",marginLeft:12},children:[P.jsx("button",{type:"button",className:"ui-icon-button",onClick:()=>o(!n),"aria-expanded":n,"aria-label":"远程授权",title:"远程授权",children:P.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[P.jsx("path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11Z"}),P.jsx("path",{d:"m9 12 2 2 4-4"})]})}),n&&P.jsxs("section",{"aria-label":"远程授权设置",style:{position:"absolute",top:40,left:0,width:"min(370px, 70vw)",zIndex:30,padding:18,borderRadius:12,background:"var(--bg-surface, white)",border:"1px solid var(--border-default)",boxShadow:"0 10px 40px #0003",fontSize:13},children:[P.jsx("strong",{children:"远程授权"}),P.jsx("p",{style:{lineHeight:1.6},children:"请在运行 CLI 的电脑上打开终端显示的本机地址,完成配对并开启桌面共享。"}),P.jsxs("p",{children:["在电脑终端运行 ",P.jsx("code",{children:"agentroam service status"})," 查看本机地址。"]}),P.jsx("p",{style:{lineHeight:1.6},children:"如果你正在另一台电脑上查看,请到运行 CLI 的电脑操作。授权完成后,可回到当前页面查看画面。"})]})]});if(!(e!=null&&e.local))return null;const y=async(S,_)=>{f(!0),x("");try{const k=await fetch("/api/remote-authorization",{method:"POST",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({action:S,permission:_})}),D=await k.json();if(!k.ok)throw new Error(D.error||"操作失败");t(D)}catch(k){x(k instanceof Error?k.message:"操作失败")}finally{f(!1)}};return P.jsxs("div",{style:{position:"relative",marginLeft:12},children:[P.jsx("button",{type:"button",className:"ui-icon-button",onClick:()=>o(!n),"aria-expanded":n,"aria-label":"远程授权",title:"远程授权",children:P.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[P.jsx("path",{d:"M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11Z"}),P.jsx("path",{d:"m9 12 2 2 4-4"})]})}),n&&P.jsxs("section",{"aria-label":"远程授权设置",style:{position:"absolute",top:40,left:0,width:"min(370px, 70vw)",zIndex:30,padding:18,borderRadius:12,background:"var(--bg-surface, white)",color:"var(--text-primary)",border:"1px solid var(--border-default)",boxShadow:"0 10px 40px #0003",fontSize:13},children:[P.jsx("strong",{children:"远程授权"}),P.jsx("p",{style:{lineHeight:1.6,margin:"10px 0"},children:C?"开启后,已配对设备可查看桌面;接管后可使用鼠标和键盘。":"在系统设置中允许「AgentRoam Remote Desktop」。屏幕录制用于手机查看,辅助功能用于鼠标键盘控制。"}),e.component&&P.jsxs("div",{"aria-label":"远控组件信息",style:{fontSize:12,lineHeight:1.6,overflowWrap:"anywhere"},children:[P.jsxs("div",{children:["组件版本:",e.component.version==="legacy"?`旧版(${e.component.fingerprint??"未记录版本"})`:e.component.version]}),P.jsxs("div",{children:[C?"组件位置":"授权应用位置",":",P.jsx("code",{children:e.component.path})]}),e.component.installed===!1&&P.jsx("p",{children:"点击“重新检测”后会安装到此位置。"}),e.component.updatePending&&P.jsx("p",{role:"status",children:"旧版组件仍在使用。结束其他 AgentRoam 的桌面共享后,点击“重新检测”更新。"})]}),e.supported?e.installed?P.jsxs(P.Fragment,{children:[!C&&["screen","accessibility"].map(S=>P.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:10,margin:"12px 0"},children:[P.jsxs("span",{children:[S==="screen"?"屏幕录制":"辅助功能",":",e[S]?"已授权":"待授权"]}),P.jsx("button",{type:"button",className:"ui-icon-button ui-icon-button--auto",disabled:c,onClick:()=>void y("authorize",S),children:"去授权"})]},S)),P.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:[P.jsx("button",{type:"button",className:"ui-icon-button ui-icon-button--auto",disabled:c,onClick:()=>void y(e.enabled?"disable":"enable"),children:e.enabled?"停止共享":"开启共享"}),P.jsx("button",{type:"button",className:"ui-icon-button ui-icon-button--auto",disabled:c,onClick:()=>void y("recheck"),children:"重新检测"}),P.jsx("button",{type:"button",className:"ui-icon-button ui-icon-button--auto",disabled:c,onClick:()=>void y("restart"),children:"重启授权组件"})]}),C&&P.jsxs("p",{style:{fontSize:12,lineHeight:1.6},children:["远程解锁服务:",e.unlock==="available"?"已安装,可在锁屏后远程唤醒和解锁。":"未安装;在 Windows 终端运行 agentroam unlock-service install 后可启用。"]}),P.jsx("p",{role:"status",style:{marginTop:12},children:e.online?"共享已开启,已配对手机可在直播列表选择本机桌面。":e.enabled?"等待桌面可用或首帧画面…":"尚未开启共享。"}),P.jsx("p",{style:{fontSize:12,lineHeight:1.6},children:C?"Windows 锁屏后直播入口会保留,可唤醒屏幕或远程解锁;UAC 安全桌面和未登录状态仍不支持控制。":"授权后会自动继续。系统要求重新打开应用时,点击“重启授权组件”。"})]}):P.jsx("p",{children:"当前 CLI 未包含远程授权组件,请升级 CLI。"}):P.jsx("p",{children:"目前支持 Windows 10/11 x64 和 macOS 14 及以上的 Apple Silicon 电脑。"}),(g||e.error)&&P.jsx("p",{role:"alert",style:{color:"var(--danger, #c33)"},children:g||e.error})]})]})}var Tv,Yp=ds;Tv=Yp.createRoot,Yp.hydrateRoot;class m9 extends Error{constructor(){super("未登录或会话已过期"),this.name="UnauthorizedError"}}class x9 extends Error{constructor(t,n,o){super(n),this.status=t,this.code=o,this.name="ApiError"}}class w9{constructor(t=(...o)=>fetch(...o),n=""){this.transport=t,this.baseUrl=n}setBaseUrl(t){this.baseUrl=t.replace(/\/+$/,"")}resolve(t){return this.baseUrl+t}async get(t,n){return this.request(t,{method:"GET",headers:n==null?void 0:n.headers})}async post(t,n,o){return this.request(t,{method:"POST",headers:{"content-type":"application/json",...o==null?void 0:o.headers},body:n===void 0?void 0:JSON.stringify(n)})}async patch(t,n,o){return this.request(t,{method:"PATCH",headers:{"content-type":"application/json",...o==null?void 0:o.headers},body:n===void 0?void 0:JSON.stringify(n)})}async put(t,n,o){return this.request(t,{method:"PUT",headers:{"content-type":"application/json",...o==null?void 0:o.headers},body:n===void 0?void 0:JSON.stringify(n)})}async delete(t,n){return this.request(t,{method:"DELETE",headers:n==null?void 0:n.headers})}async request(t,n){var c;const o=await this.transport(this.resolve(t),{credentials:"same-origin",cache:"no-store",...n});if(o.status===401||o.status===423)throw window.dispatchEvent(new CustomEvent("webapp:unauthorized")),new m9;if(!o.ok){let f=`请求失败 (${o.status})`,g;try{const x=await o.json();typeof x.error=="string"?f=x.error:(c=x.error)!=null&&c.message&&(f=x.error.message),typeof x.code=="string"&&(g=x.code)}catch{}throw new x9(o.status,f,g)}if(o.status!==204)return await o.json()}}const v9=30,y9=20,E9=2e3;function Kp(e){var t,n;if(e instanceof Error)return{name:e.name,message:e.message,stack:(t=e.stack)==null?void 0:t.slice(0,8e3)};if(typeof e=="string")return{name:"Error",message:e};try{return{name:"NonError",message:((n=JSON.stringify(e))==null?void 0:n.slice(0,2e3))??String(e)}}catch{return{name:"NonError",message:String(e)}}}function b9(e={}){const t=e.source??"webapp",n=()=>((typeof e.baseUrl=="function"?e.baseUrl():e.baseUrl)??"").replace(/\/+$/,""),o=[];let c=null,f=!1,g=!1;const x=()=>{if(g||f||o.length===0)return;const S=o.splice(0,y9);f=!0;const _=JSON.stringify({entries:S});fetch(`${n()}/api/client-logs`,{method:"POST",headers:{"content-type":"application/json"},body:_,keepalive:!0}).catch(()=>{}).finally(()=>{f=!1,o.length>0&&w()})},w=()=>{c!==null||g||(c=setTimeout(()=>{c=null,x()},E9))},m=S=>{g||(o.length>=v9&&o.shift(),o.push(S),w())},C=S=>{var _;m({level:"error",message:S.message||"window error",source:t,error:{name:"Error",message:S.message||"window error",stack:[S.filename?`${S.filename}:${S.lineno}:${S.colno}`:"",((_=S.error)==null?void 0:_.stack)??""].filter(Boolean).join(`
|
|
58
|
-
`).slice(0,8e3)||void 0},data:{filename:S.filename,lineno:S.lineno,colno:S.colno}})},y=S=>{const _=Kp(S.reason);m({level:"error",message:`unhandledRejection: ${_.message}`,source:t,error:_})};return window.addEventListener("error",C),window.addEventListener("unhandledrejection",y),{reportError:(S,_)=>{const k=Kp(S);m({level:"error",message:k.message,source:t,error:k,data:_})},reportWarning:(S,_)=>{m({level:"warn",message:S,source:t,data:_})},uninstall:()=>{g=!0,c!==null&&(clearTimeout(c),c=null),window.removeEventListener("error",C),window.removeEventListener("unhandledrejection",y)}}}const If="<think>",Tf="</think>";function Zp(e,t){const n=Math.min(t.length-1,e.length);for(let o=n;o>0;o--)if(e.endsWith(t.slice(0,o)))return o;return 0}function uo(e){return e.replace(/<think>[\s\S]*?<\/think>/g,"")}class C9{constructor(){this.buffer="",this.dropping=!1}push(t){this.buffer+=t;let n="";for(;;){if(this.dropping){const c=this.buffer.indexOf(Tf);if(c===-1){const f=Zp(this.buffer,Tf);return this.buffer=this.buffer.slice(this.buffer.length-f),n}this.buffer=this.buffer.slice(c+Tf.length),this.dropping=!1;continue}const o=this.buffer.indexOf(If);if(o===-1){const c=Zp(this.buffer,If);return n+=this.buffer.slice(0,this.buffer.length-c),this.buffer=this.buffer.slice(this.buffer.length-c),n}n+=this.buffer.slice(0,o),this.buffer=this.buffer.slice(o+If.length),this.dropping=!0}}flush(){const t=this.buffer;return this.buffer="",t}}const A9=/^(?:load failed|failed to fetch|network request failed|networkerror when attempting to fetch resource\.?|the network connection was lost\.?|fetch failed)$/i,S9=50,I9=1e3,T9=2e3;function Qp(e){return e instanceof Error&&e.name!=="AbortError"&&A9.test(e.message.trim())}class R9{constructor(t,n,o,c=x=>new EventSource(x),f,g){this.http=t,this.settings=n,this.projectBridge=o,this.createEventSource=c,this.dictation=f,this.speechOutput=g,this.streams=new Map,this.nativeStreamCursors=new Map,this.nativeFinalAnswerSnapshots=new Map,this.pendingRuns=new Map,this.listeners=new Set,this.thinkFilters=new Map,this.bufferedStreamText=new Map,this.ordinaryRunRecoveryTimers=new Map,this.ordinaryRunStreamText=new Map,this.nativeRunRecoveries=new Map,this.nativeRunIdentities=new Map}dictationStart(){var t;return((t=this.dictation)==null?void 0:t.dictationStart())??Promise.resolve({ok:!1,reason:"语音输入尚未初始化"})}dictationStop(){var t;return((t=this.dictation)==null?void 0:t.dictationStop())??Promise.resolve({ok:!0})}onDictation(t){var n;return((n=this.dictation)==null?void 0:n.onDictation(t))??(()=>{})}onDictationError(t){var n;return((n=this.dictation)==null?void 0:n.onDictationError(t))??(()=>{})}fileWorkspaceRequest(t,n={}){return t!=="fs:preview-open"&&t!=="fs:preview-close"?Promise.reject(new Error("消息区仅支持媒体预览操作")):this.requireProjectBridge().request(t,n)}requireProjectBridge(){if(this.projectBridge)return this.projectBridge;throw Object.assign(new Error("请从 AgentRoam Web 控制台打开项目"),{code:"WEB_SHELL_REQUIRED"})}async collaboration(t){return this.http.post("/api/collaboration",t)}onEvent(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}async run(t,n,o,c,f,g){var _,k;const x=n.startsWith("runtime:"),w=this.streams.has(n),m=this.pendingRuns.has(n),C=this.nativeStreamCursors.get(n);x&&!m&&this.beginNativeRunRecovery(n,void 0,!0);let y=null,S=null;try{x||await this.openStream(n,this.nativeStreamCursors.get(n)),S=m?null:new Promise(X=>{y=X,this.pendingRuns.set(n,X)}),x||this.ordinaryRunStreamText.set(n,"");const D=await this.http.post("/api/agent/run",{input:t,sessionId:n,...f!=null&&f.length?{images:f}:{},...o!=null&&o.length?{agentIds:o}:{},...!x&&(g!=null&&g.profileId)?{profileId:g.profileId}:{},...(_=g==null?void 0:g.model)!=null&&_.id?{nativeModel:g.model}:{},...g!=null&&g.reasoningEffort?{nativeReasoningEffort:g.reasoningEffort}:{}});if(x||this.startOrdinaryRunRecovery(n),x){const X=this.nativeRunRecoveries.get(n);X&&(X.awaitingAdmission=!1,X.runId=typeof D.runId=="string"?D.runId:void 0);const O=typeof D.runId=="string"&&(C==null?void 0:C.runId)!==D.runId?{sequence:0,runId:D.runId}:C??{sequence:0,...typeof D.runId=="string"?{runId:D.runId}:{}};await this.openStream(n,O,{waitForOpen:!1})}this.dispatch(n,{type:"run_admitted",...typeof D.runId=="string"?{_nativeRunId:D.runId}:{}}),S&&await S}catch(D){const X=!m&&x&&Qp(D)?await this.recoverNativeAdmission(n,C):null;if(X){const U=this.nativeRunRecoveries.get(n);return U&&(U.awaitingAdmission=!1,U.runId=X.runId),await this.openStream(n,X,{waitForOpen:!1}),S&&await S,[]}const O=D.code,I=typeof O=="string"?O:D.status===409?"SESSION_OCCUPIED":void 0;x&&I==="SESSION_ALREADY_RUNNING"&&await this.openStream(n,C??{sequence:0},{waitForOpen:!1});const R=w||m||I==="SESSION_ALREADY_RUNNING";if(x&&R){const U=this.nativeRunRecoveries.get(n);U&&(U.awaitingAdmission=!1),this.startNativeRunRecovery(n,(k=this.nativeStreamCursors.get(n))==null?void 0:k.runId)}this.dispatch(n,{type:"error",message:Qp(D)?"网络连接中断,消息未确认发送,请重试":D instanceof Error?D.message:"无法启动运行",...I?{code:I}:{},...R?{_preserveActiveRun:!0}:{}}),R?y&&this.pendingRuns.get(n)===y&&this.pendingRuns.delete(n):(this.closeStream(n),this.settle(n))}return[]}async recoverNativeAdmission(t,n){const o=this.nativeStreamCursors.get(t);if(o!=null&&o.runId&&o.runId!==(n==null?void 0:n.runId))return this.dispatchRecoveredAdmission(t,o),o;try{const c=await this.http.get(`/api/sessions/${encodeURIComponent(t)}?limit=1`),f=typeof c.snapshotRunId=="string"?c.snapshotRunId:void 0,g=typeof c.snapshotRevision=="number"?c.snapshotRevision:0,x=!!(f&&(n!=null&&n.runId)&&f!==n.runId),w=!!(f&&!(n!=null&&n.runId)&&c.status==="running");return!x&&!w?null:(this.dispatchRecoveredAdmission(t,{runId:f,sequence:g}),{runId:f,sequence:0})}catch{return null}}dispatchRecoveredAdmission(t,n){this.dispatch(t,{type:"run_admitted",...n.runId?{_nativeRunId:n.runId}:{}})}async steer(t,n,o){return(await this.http.post("/api/agent/steer",{input:t,sessionId:n})).steered||this.run(t,n).catch(()=>{}),!0}async steerSessionMessage(t,n){const o=await this.http.post("/api/agent/steer",{sessionId:t,messageId:n});if(!o.steered)throw new Error("当前运行不支持插队消息");return o.state}async abort(t){try{await this.http.post("/api/agent/abort",t?{sessionId:t}:{})}finally{for(const n of[...this.pendingRuns.keys()])this.settle(n);for(const n of[...this.streams.keys()])this.closeStream(n);for(const n of[...this.nativeRunRecoveries.keys()])this.stopNativeRunRecovery(n)}}async answerQuestion(t,n,o){try{return await this.http.post("/api/agent/answer",{questionId:t,answer:n,selectedIndices:o}),!0}catch{return!1}}async listSessions(t){const n=t?`?projectId=${encodeURIComponent(t)}`:"";return this.http.get(`/api/sessions${n}`)}async listAgentWorkspaces(t,n={}){const o=new URLSearchParams({agentType:t});return n.cursor&&o.set("cursor",n.cursor),n.limit!==void 0&&o.set("limit",String(n.limit)),n.refresh&&o.set("refresh","1"),n.since&&o.set("since",n.since),this.http.get(`/api/agent-workspaces?${o.toString()}`)}async importAgentWorkspace(t,n,o){return this.http.post("/api/agent-workspaces",{agentType:t,path:n,...o?{name:o}:{}})}async removeInvalidAgentWorkspace(t,n){const o=new URLSearchParams({agentType:t,workspaceId:n});await this.http.delete(`/api/agent-workspaces?${o.toString()}`)}async listAgentWorkspaceSessions(t,n,o={}){const c=new URLSearchParams({agentType:t});return o.cursor&&c.set("cursor",o.cursor),o.limit!==void 0&&c.set("limit",String(o.limit)),o.refresh&&c.set("refresh","1"),this.http.get(`/api/agent-workspaces/${encodeURIComponent(n)}/sessions?${c.toString()}`)}async refreshSessions(t){const n=t?`?refresh=1&projectId=${encodeURIComponent(t)}`:"?refresh=1";return this.http.get(`/api/sessions${n}`)}async listChildSessions(t){return[]}async getSession(t,n,o={}){var g;const c=this.nativeRunRecoveries.get(t),f=c==null?void 0:c.runId;try{const x=new URLSearchParams;n!=null&&n.before&&x.set("before",n.before),n!=null&&n.after&&x.set("after",n.after),n!=null&&n.anchor&&x.set("anchor",n.anchor),(n==null?void 0:n.limit)!==void 0&&x.set("limit",String(n.limit)),n!=null&&n.view&&x.set("view",n.view),n!=null&&n.revision&&x.set("revision",n.revision),n!=null&&n.turnId&&x.set("turnId",n.turnId);const w=x.size>0?`?${x.toString()}`:"",m=await this.http.get(`/api/sessions/${encodeURIComponent(t)}${w}`);Array.isArray(m.messages)&&(m.messages=m.messages.map(y=>typeof y.content=="string"?{...y,content:uo(y.content)}:y)),Array.isArray(m.events)&&(m.events=m.events.map(y=>typeof y.text=="string"&&y.text.includes("<think>")?{...y,text:uo(y.text)}:typeof y.finalText=="string"&&y.finalText.includes("<think>")?{...y,finalText:uo(y.finalText)}:y));const C=c===this.nativeRunRecoveries.get(t)&&f===(c==null?void 0:c.runId);if(t.startsWith("runtime:")&&C&&typeof m.snapshotRevision=="number"){const y=typeof m.snapshotRunId=="string"?m.snapshotRunId:void 0;if(y&&((g=this.nativeRunIdentities.get(t))!=null&&g.retired.has(y)))return m;const S=m.history,_=(S==null?void 0:S.delivery)==="core"||(S==null?void 0:S.delivery)==="trace";if((S==null?void 0:S.delivery)==="core"&&!o.lifecycleOnly&&y&&this.coreSnapshotContainsTailFinalAnswer(m.messages)&&this.rememberNativeFinalAnswerSnapshot(t,m.snapshotRevision,y),_||this.rememberNativeStreamCursor(t,m.snapshotRevision,y),m.status==="running"&&m.occupancy!=="owned-externally"){const k=this.nativeStreamCursors.get(t),D=_&&y&&(k==null?void 0:k.runId)!==y?{sequence:0,runId:y}:k??(_?{sequence:0,...y?{runId:y}:{}}:void 0);this.openStream(t,D).catch(()=>{})}c&&!(n!=null&&n.before)&&!(n!=null&&n.after)&&!(n!=null&&n.anchor)&&(n==null?void 0:n.view)!=="trace"&&await this.reconcileNativeRun(t,c,f,m)}else if(!t.startsWith("runtime:")&&m.status==="active"){const y=m.activeRun;(y==null?void 0:y.running)===!0&&typeof y.eventId=="number"&&this.openStream(t,{sequence:y.eventId}).catch(()=>{})}return m}catch(x){if(x.status===404)return null;throw x}}async getSessionToolResult(t,n){const o=new URLSearchParams(n);return this.http.get(`/api/sessions/${encodeURIComponent(t)}/tool-result?${o.toString()}`)}async getSessionQueryIndex(t){return this.http.get(`/api/sessions/${encodeURIComponent(t)}/query-index`)}observeSession(t,n,o){const c=this.createEventSource(`/api/sessions/${encodeURIComponent(t)}/changes`);let f=!1;return c.onmessage=g=>{if(g.data)try{const x=JSON.parse(g.data);x.type==="session_history_changed"&&typeof x.revision=="number"&&n({type:x.type,revision:x.revision})}catch{}},c.onerror=()=>{f||(f=!0,c.close(),o==null||o())},()=>{f||(f=!0,c.close())}}async setSessionPermissionMode(t,n){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}`,{permissionMode:n})}async setSessionNativeMode(t,n){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}`,{nativeMode:n})}async setSessionNativePermissionPreset(t,n){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}`,{nativePermissionPreset:n})}async getSessionNativeGoal(t){return(await this.http.get(`/api/sessions/${encodeURIComponent(t)}/native-goal`)).goal}async listSessionBackgroundJobs(t){return(await this.http.get(`/api/sessions/${encodeURIComponent(t)}/background-jobs`)).jobs}async getSessionBackgroundJobOutput(t,n){return this.http.get(`/api/sessions/${encodeURIComponent(t)}/background-jobs/${encodeURIComponent(n)}`)}async stopSessionBackgroundJob(t,n){return this.http.post(`/api/sessions/${encodeURIComponent(t)}/background-jobs/${encodeURIComponent(n)}/stop`,{})}async mutateSessionNativeGoal(t,n){return(await this.http.post(`/api/sessions/${encodeURIComponent(t)}/native-goal`,n)).goal}async getSessionGoals(t){const n=await this.http.get(`/api/sessions/${encodeURIComponent(t)}/goals`);return n.active&&this.openStream(t,this.nativeStreamCursors.get(t)).catch(()=>{}),n}async enqueueSessionGoal(t,n,o){var f;await this.openStream(t,this.nativeStreamCursors.get(t));const c=await this.http.post(`/api/sessions/${encodeURIComponent(t)}/goals`,{objective:n,sourceMessageId:o});return typeof((f=c.started)==null?void 0:f.snapshotRevision)=="number"&&this.dispatch(t,{type:"run_admitted",...c.started.runId?{_nativeRunId:c.started.runId}:{}}),c.state}async reorderSessionGoals(t,n){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}/goals`,{orderedIds:n})}async cancelSessionGoal(t,n){return this.http.delete(`/api/sessions/${encodeURIComponent(t)}/goals?goalId=${encodeURIComponent(n)}`)}async getThreadGoal(t){return(await this.http.get(`/api/sessions/${encodeURIComponent(t)}/thread-goal`)).goal??null}async setThreadGoal(t,n,o){const c=await this.http.put(`/api/sessions/${encodeURIComponent(t)}/thread-goal`,{objective:n,tokenBudget:o??null});return this.openStream(t,this.nativeStreamCursors.get(t)).catch(()=>{}),c.goal}async updateThreadGoal(t,n){return(await this.http.patch(`/api/sessions/${encodeURIComponent(t)}/thread-goal`,{action:n})).goal}async clearThreadGoal(t){return(await this.http.delete(`/api/sessions/${encodeURIComponent(t)}/thread-goal`)).cleared}async enqueueSessionMessage(t,n){var c;await this.openStream(t,this.nativeStreamCursors.get(t));const o=await this.http.post(`/api/sessions/${encodeURIComponent(t)}/goals`,{kind:"message",objective:n.content,sourceMessageId:n.sourceMessageId,messagePayload:{images:n.images,agentIds:n.agentIds,agentName:n.agentName}});return typeof((c=o.started)==null?void 0:c.snapshotRevision)=="number"&&this.dispatch(t,{type:"run_admitted",...o.started.runId?{_nativeRunId:o.started.runId}:{}}),o.state}async updateSessionMessage(t,n,o){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}/goals`,{kind:"message",messageId:n,objective:o})}async reorderSessionMessages(t,n){return this.http.patch(`/api/sessions/${encodeURIComponent(t)}/goals`,{kind:"message",orderedIds:n})}async cancelSessionMessage(t,n){return this.http.delete(`/api/sessions/${encodeURIComponent(t)}/goals?kind=message&goalId=${encodeURIComponent(n)}`)}async createSession(t,n,o,c){return this.http.post("/api/sessions",{title:t,...n?{projectId:n}:{},...o&&o!=="customer-agent"?{agentType:o}:{},...c?{cwd:c}:{}})}async forkSession(t,n){return this.http.post(`/api/sessions/${encodeURIComponent(t)}/${n?"fork-at":"fork"}`,n?{point:n}:{})}async releaseCodexSession(t){await this.http.post(`/api/sessions/${encodeURIComponent(t)}/release`,{})}async deleteSession(t){await this.http.delete(`/api/sessions/${encodeURIComponent(t)}`)}async getRuntimeHealth(){return this.http.get("/api/agent/runtime-health")}getUpdateStatus(){return this.http.get("/api/update/status")}checkForUpdate(){return this.http.post("/api/update/check",{})}installUpdate(){return this.http.post("/api/update/install",{})}onUpdateStatus(t){return()=>{}}async listAgentModels(t){return this.http.get(`/api/agent/models?agentType=${encodeURIComponent(t)}`)}async listProjects(){return this.projectBridge?(await this.requireProjectBridge().request("project:list")).projects??[]:this.http.get("/api/projects")}async getProject(t){return this.projectBridge?(await this.requireProjectBridge().request("project:get",{projectId:t})).project??null:this.http.get(`/api/projects/${encodeURIComponent(t)}`)}async createProject(t,n){return this.projectBridge?(await this.requireProjectBridge().request("project:create",{name:t,path:n??""})).project:this.http.post("/api/projects",{name:t,path:n??""})}async updateProject(t,n){return this.projectBridge?(await this.requireProjectBridge().request("project:rename",{projectId:t,name:n.name})).project:this.http.patch(`/api/projects/${encodeURIComponent(t)}`,n)}async deleteProject(t){if(!this.projectBridge){await this.http.delete(`/api/projects/${encodeURIComponent(t)}`);return}await this.requireProjectBridge().request("project:delete",{projectId:t})}async checkProjectPath(t){return this.projectBridge?(await this.requireProjectBridge().request("project:check",{path:t})).valid===!0:(await this.http.get(`/api/projects/check?path=${encodeURIComponent(t)}`)).valid===!0}async listProjectRoots(){return this.projectBridge?(await this.requireProjectBridge().request("project:roots")).roots??[]:this.http.get("/api/projects/roots")}async getProjectPickerLocation(){return this.projectBridge?this.requireProjectBridge().request("project:roots"):this.http.get("/api/projects/roots?picker=1")}async listProjectDirectories(t){return this.projectBridge?(await this.requireProjectBridge().request("project:directories",{path:t})).entries??[]:this.http.get(`/api/projects/directories?path=${encodeURIComponent(t)}`)}async setProjectWorkingDir(t){return await this.saveSettings({workingDirectory:t}),{ok:!0,path:t}}async getSettings(){return this.http.get("/api/settings")}async setSetting(t,n){const o=await this.getSettings();if(!(t in o)||t==="revision"||t==="settingsSpaceId")throw new Error("Unsupported setting");const c=typeof o[t]=="number"?Number(n):Array.isArray(o[t])?JSON.parse(n):n;await this.saveSettings({[t]:c,revision:o.revision})}async subscribe(){}async handoffSession(t){return this.http.post(`/api/sessions/${encodeURIComponent(t)}/handoff`,{})}async saveSettings(t){return this.http.post("/api/settings",t)}async setActiveProfile(t){return this.http.post("/api/settings",{activeProfileId:t})}async refreshServerModel(){const t=await this.getSettings(),n=`webapp.sharedMigration.${t.settingsSpaceId}`;if(!t.settingsSpaceId||localStorage.getItem(n))return;const o=(f,g)=>{try{return JSON.parse(localStorage.getItem(f)||"null")??g}catch{return g}},c=o("webapp.settings.v1",{});await this.business("importLegacy",[{profiles:c.profiles||[],agents:o("webapp.agentDefs",[]),lsp:o("webapp.lspServers",[])}]),localStorage.setItem(n,"1")}business(t,n){return this.http.post("/api/business",{method:t,args:n})}async listMemories(){return this.business("listMemories",[])}async searchMemories(t){return this.business("searchMemories",[t])}async getMemory(t){return this.business("getMemory",[t])}async setMemory(t){return this.business("setMemory",[t])}async deleteMemory(t){return this.business("deleteMemory",[t])}async mcpList(){return this.business("mcpList",[])}async mcpSave(t){return this.business("mcpSave",[t])}async mcpDelete(t){return this.business("mcpDelete",[t])}async mcpSetEnabled(t,n){return this.business("mcpSetEnabled",[t,n])}async mcpProbe(t){return this.business("mcpProbe",[t])}async listSkills(){return this.business("listSkills",[])}async saveSkill(t){return this.business("saveSkill",[t])}async deleteSkill(t){return this.business("deleteSkill",[t])}async setSkillEnabled(t,n){return this.business("setSkillEnabled",[t,n])}async listAgentDefs(){return this.business("listAgentDefs",[])}async getAgentDef(t){return this.business("getAgentDef",[t])}async createAgentDef(t){return this.business("createAgentDef",[t])}async updateAgentDef(t,n){return this.business("updateAgentDef",[t,n])}async deleteAgentDef(t){return this.business("deleteAgentDef",[t])}async setActiveAgentDef(t){return this.business("setActiveAgentDef",[t])}async lspList(){return this.business("lspList",[])}async lspSave(t){return this.business("lspSave",[t])}async lspDelete(t){return this.business("lspDelete",[t])}async lspSetEnabled(t,n){return this.business("lspSetEnabled",[t,n])}async listUploads(){return this.business("listUploads",[])}async getUpload(t){return this.business("getUpload",[t])}async saveUpload(t){return this.business("saveUpload",[t])}async deleteUpload(t){return this.business("deleteUpload",[t])}async importSkill(){return null}async cronCreate(t,n,o){return this.business("cronCreate",[t,n,o])}async cronPause(t){return this.business("cronPause",[t])}async cronResume(t){return this.business("cronResume",[t])}async cronDelete(t){return this.business("cronDelete",[t])}async cronDeleteAll(){return this.business("cronDeleteAll",[])}async cronList(){return this.business("cronList",[])}async openFileDialog(){return null}async readFile(){throw new Error("Web 端不支持直接读取本地文件")}async writeFile(){throw new Error("Web 端不支持直接写入本地文件")}async hideWindow(){}async showWindow(){}async isWindowVisible(){return!0}async wakeStop(){return{ok:!0}}async wakeConversation(t){return{ok:!0,conversation:t}}async ttsSpeak(t){if(!this.speechOutput)throw new Error("语音播报尚未初始化");return this.speechOutput.ttsSpeak(t)}async ttsStop(){var t;return((t=this.speechOutput)==null?void 0:t.ttsStop())??{ok:!0}}async ttsPlaybackEnded(t){var n;return((n=this.speechOutput)==null?void 0:n.ttsPlaybackEnded(t))??{ok:!0}}onTtsStart(t){var n;return((n=this.speechOutput)==null?void 0:n.onTtsStart(t))??(()=>{})}onTtsPcm(t){var n;return((n=this.speechOutput)==null?void 0:n.onTtsPcm(t))??(()=>{})}onTtsStreamEnd(t){var n;return((n=this.speechOutput)==null?void 0:n.onTtsStreamEnd(t))??(()=>{})}onTtsFlush(t){var n;return((n=this.speechOutput)==null?void 0:n.onTtsFlush(t))??(()=>{})}onTtsEnd(t){var n;return((n=this.speechOutput)==null?void 0:n.onTtsEnd(t))??(()=>{})}onWake(){return()=>{}}onWakeCommand(){return()=>{}}dispatch(t,n){const o={...n,_sid:t};for(const c of this.listeners)try{c(o)}catch{}}dispatchStreamEvent(t,n){if(!(t.startsWith("runtime:codex:")&&n.type==="text_chunk"&&n.messagePhase==="commentary"&&typeof n.text=="string")){this.flushBufferedStreamText(t),this.dispatch(t,n);return}const c=this.bufferedStreamText.get(t);if(c&&c.event._nativeRunId===n._nativeRunId&&c.event.turnId===n.turnId&&c.event.itemId===n.itemId){c.event={...c.event,...n,text:String(c.event.text??"")+n.text};return}this.flushBufferedStreamText(t);const g=setTimeout(()=>this.flushBufferedStreamText(t),S9);this.bufferedStreamText.set(t,{event:{...n},timer:g})}flushBufferedStreamText(t){const n=this.bufferedStreamText.get(t);n&&(this.bufferedStreamText.delete(t),clearTimeout(n.timer),this.dispatch(t,n.event))}settle(t){this.stopOrdinaryRunRecovery(t),this.stopNativeRunRecovery(t);const n=this.pendingRuns.get(t);n&&(this.pendingRuns.delete(t),n())}beginNativeRunRecovery(t,n,o=!1){this.stopNativeRunRecovery(t);const c={runId:n,awaitingAdmission:o,inFlight:!1};return this.nativeRunRecoveries.set(t,c),c}startNativeRunRecovery(t,n){let o=this.nativeRunRecoveries.get(t);if(o!=null&&o.awaitingAdmission)return;if(n){const f=this.nativeRunIdentities.get(t);if(f!=null&&f.retired.has(n))return;f&&f.current!==n?(f.retired.add(f.current),f.current=n):f||this.nativeRunIdentities.set(t,{current:n,retired:new Set})}if((!o||n&&o.runId!==n)&&(o=this.beginNativeRunRecovery(t,n)),o.timer)return;const c=o;o.timer=setInterval(()=>{this.recoverNativeRun(t,c)},T9)}stopNativeRunRecovery(t){const n=this.nativeRunRecoveries.get(t);n!=null&&n.timer&&clearInterval(n.timer),this.nativeRunRecoveries.delete(t)}async recoverNativeRun(t,n){if(!(n.inFlight||n.awaitingAdmission||this.nativeRunRecoveries.get(t)!==n)){n.inFlight=!0;try{await this.getSession(t,{limit:1,view:"core"},{lifecycleOnly:!0})}catch{}finally{n.inFlight=!1}}}async reconcileNativeRun(t,n,o,c){var k;if(n.awaitingAdmission||this.nativeRunRecoveries.get(t)!==n||n.runId!==o||!o&&this.pendingRuns.has(t)||o&&typeof c.snapshotRunId!="string"&&c.snapshotRunId!==null||!["idle","completed","failed","aborted"].includes(String(c.status)))return;let f=n,g=o;if(typeof c.snapshotRunId=="string"&&c.snapshotRunId!==o){if((k=this.nativeRunIdentities.get(t))!=null&&k.retired.has(c.snapshotRunId))return;this.startNativeRunRecovery(t,c.snapshotRunId);const D=this.nativeRunRecoveries.get(t);if(!D||D.runId!==c.snapshotRunId)return;f=D,g=c.snapshotRunId}let x=Array.isArray(c.events)?c.events:[],w=c.status,m=[...x].reverse().find(D=>D.type==="done"||D.type==="error"||D.type==="turn_aborted");if(!m&&typeof c.snapshotRunId=="string")try{const D=await this.http.get(`/api/sessions/${encodeURIComponent(t)}?limit=1`);if(D.snapshotRunId!==c.snapshotRunId||!["idle","completed","failed","aborted"].includes(String(D.status)))return;w=D.status,x=Array.isArray(D.events)?D.events:[],m=[...x].reverse().find(X=>X.type==="done"||X.type==="error"||X.type==="turn_aborted")}catch{return}if(this.nativeRunRecoveries.get(t)!==f||f.runId!==g||f.awaitingAdmission)return;const C=(m==null?void 0:m.type)??(w==="failed"?"error":w==="aborted"?"turn_aborted":"done"),{_nativeSequence:y,_nativeRunId:S,..._}=m??{};this.closeStream(t),this.settle(t),this.dispatch(t,{..._,type:C,...C==="error"?{message:(m==null?void 0:m.message)||"运行失败,但未记录具体错误"}:{},...C==="done"?{finalText:"",...(m==null?void 0:m.durationMs)===void 0?{}:{durationMs:m.durationMs}}:{},...g??c.snapshotRunId?{_nativeRunId:g??c.snapshotRunId}:{},_nativeRecoveredFromSnapshot:!0})}startOrdinaryRunRecovery(t){const n=this.ordinaryRunRecoveryTimers.get(t);n&&clearInterval(n);const o=setInterval(()=>{this.recoverSettledOrdinaryRun(t)},I9);this.ordinaryRunRecoveryTimers.set(t,o)}stopOrdinaryRunRecovery(t){const n=this.ordinaryRunRecoveryTimers.get(t);n&&clearInterval(n),this.ordinaryRunRecoveryTimers.delete(t),this.ordinaryRunStreamText.delete(t)}async recoverSettledOrdinaryRun(t){var n;if(!this.pendingRuns.has(t)){this.stopOrdinaryRunRecovery(t);return}try{const o=await this.getSession(t,{limit:50});if(!o||o.status==="active"||o.status==="running"||o.status!=="completed"&&o.status!=="failed"&&o.status!=="aborted")return;const c=o.messages??[],f=c.map(m=>m.role).lastIndexOf("user"),g=uo(c.slice(f+1).filter(m=>m.role==="assistant"&&(m.content??"").trim()).map(m=>m.content.trim()).join(`
|
|
59
|
-
|
|
60
|
-
`)),x=this.ordinaryRunStreamText.get(t)??"",w=g.startsWith(x)?g.slice(x.length):g;if(w&&this.dispatch(t,{type:"text_chunk",text:w}),o.status==="completed")this.dispatch(t,{type:"done",finalText:""});else{const m=(n=[...o.events??[]].reverse().find(C=>{var y;return C.type==="error"&&((y=C.message)==null?void 0:y.trim())}))==null?void 0:n.message;this.dispatch(t,{type:"error",message:m||(o.status==="aborted"?"运行已中止":"运行失败,但未记录具体错误")})}this.closeStream(t),this.settle(t)}catch{}}openStream(t,n,o={}){if(t.startsWith("runtime:")&&this.startNativeRunRecovery(t,n==null?void 0:n.runId),this.streams.has(t))return Promise.resolve();this.thinkFilters.set(t,new C9);const c=new URLSearchParams({sessionId:t});Number.isSafeInteger(n==null?void 0:n.sequence)&&c.set(t.startsWith("runtime:")?"afterSequence":"afterEventId",String(n.sequence)),t.startsWith("runtime:")&&(n!=null&&n.runId)&&c.set("afterRunId",n.runId);const f=this.createEventSource(`/api/agent/stream?${c.toString()}`);let g=!1;this.streams.set(t,f);const x=o.waitForOpen!==!1;let w=x,m=null,C=null,y=null;const S=x?new Promise((_,k)=>{C=_,y=k,m=setTimeout(()=>{w=!1,k(new Error("事件流连接超时"))},8e3)}):Promise.resolve();return f.onopen=()=>{w&&(w=!1,m&&clearTimeout(m),C==null||C())},f.onmessage=_=>{var D,X;if(this.streams.get(t)!==f||!_.data)return;let k;try{k=JSON.parse(_.data)}catch{return}if(typeof k._nativeSequence=="number"){const O=typeof k._nativeRunId=="string"?k._nativeRunId:void 0,I=this.nativeRunRecoveries.get(t),R=k.type==="done"||k.type==="error"||k.type==="turn_aborted";if(O&&((D=this.nativeRunIdentities.get(t))!=null&&D.retired.has(O))||O&&(I!=null&&I.runId)&&I.runId!==O&&this.pendingRuns.has(t)||R&&O&&(I!=null&&I.runId)&&I.runId!==O||!this.acceptNativeStreamEvent(t,k._nativeSequence,O)||R&&(I!=null&&I.awaitingAdmission)||(this.startNativeRunRecovery(t,O),this.isNativeFinalAnswerCoveredBySnapshot(t,k,k._nativeSequence,O)))return}if(k.type==="text_chunk"&&typeof k.text=="string"&&(k.text=this.thinkFilters.get(t).push(k.text),!t.startsWith("runtime:")&&k.text&&this.ordinaryRunStreamText.set(t,(this.ordinaryRunStreamText.get(t)??"")+k.text)),k.type==="done"||k.type==="error"||k.type==="turn_aborted"){const O=((X=this.thinkFilters.get(t))==null?void 0:X.flush())??"";O&&k.type==="done"&&typeof k.finalText=="string"&&(k.finalText=k.finalText+O),g=!0}k.type==="text_chunk"&&k.text===""||(this.dispatchStreamEvent(t,k),(k.type==="done"||k.type==="error"||k.type==="turn_aborted")&&(this.closeStream(t),this.settle(t)))},f.onerror=()=>{if(this.streams.get(t)===f){if(t.startsWith("runtime:")){const _=this.nativeRunRecoveries.get(t);f.readyState===EventSource.CLOSED&&(w&&(w=!1,m&&clearTimeout(m),y==null||y(new Error("事件流连接失败"))),this.closeStream(t)),_&&this.recoverNativeRun(t,_);return}if(w&&f.readyState===EventSource.CLOSED){w=!1,m&&clearTimeout(m),y==null||y(new Error("事件流连接失败"));return}if(f.readyState===EventSource.CLOSED){if(this.closeStream(t),g){this.settle(t);return}(async()=>{let _="";for(let k=0;k<8&&!_;k++){k>0&&await new Promise(D=>setTimeout(D,750));try{const D=await this.getSession(t,{limit:50}),X=(D==null?void 0:D.messages)??[],O=X.map(R=>R.role).lastIndexOf("user"),I=X.slice(O+1).filter(R=>R.role==="assistant"&&(R.content??"").trim()).map(R=>R.content.trim()).join(`
|
|
61
|
-
|
|
62
|
-
`);_=uo(I).trim()}catch{}}_?this.dispatch(t,{type:"text_chunk",text:_}):this.dispatch(t,{type:"error",message:"连接中断,回复未能恢复,请重试"}),this.dispatch(t,{type:"done",finalText:""}),this.settle(t)})()}}},S}rememberNativeStreamCursor(t,n,o){const c=this.nativeStreamCursors.get(t);if(c&&(c.runId===o||!o)&&n<c.sequence)return;const g=o??(c==null?void 0:c.runId);this.nativeStreamCursors.set(t,{sequence:n,...g?{runId:g}:{}})}acceptNativeStreamEvent(t,n,o){const c=this.nativeStreamCursors.get(t);return c&&(c.runId===o||!o)&&n<=c.sequence?!1:(this.rememberNativeStreamCursor(t,n,o),!0)}coreSnapshotContainsTailFinalAnswer(t){if(!Array.isArray(t))return!1;let n=-1;for(let o=t.length-1;o>=0;o-=1){const c=t[o];if(typeof c=="object"&&c!==null&&c.role==="user"){n=o;break}}return t.slice(n+1).some(o=>{var f;if(typeof o!="object"||o===null)return!1;const c=o;return c.role==="assistant"&&((f=c.presentation)==null?void 0:f.agentMessagePhase)==="final_answer"})}rememberNativeFinalAnswerSnapshot(t,n,o){const c=this.nativeFinalAnswerSnapshots.get(t);(c==null?void 0:c.runId)===o&&c.sequence>=n||this.nativeFinalAnswerSnapshots.set(t,{runId:o,sequence:n})}isNativeFinalAnswerCoveredBySnapshot(t,n,o,c){const f=this.nativeFinalAnswerSnapshots.get(t);return!f||!c?!1:n.type==="text_chunk"&&n.messagePhase==="final_answer"&&f.runId===c&&o<=f.sequence}closeStream(t){this.flushBufferedStreamText(t);const n=this.streams.get(t);n&&(n.close(),this.streams.delete(t),this.thinkFilters.delete(t))}}class _9{constructor(t,n){this.emit=n,this.sum=0,this.weight=0,this.frame=new Float32Array(1600),this.offset=0,this.ratio=t/16e3}push(t){if(t.length)for(let n=0;n<t[0].length;n++){let o=0;for(const f of t)o+=f[n]/t.length;let c=1;for(;c>1e-9;){const f=Math.min(c,this.ratio-this.weight);this.sum+=o*f,this.weight+=f,c-=f,this.weight>=this.ratio-1e-9&&(this.frame[this.offset++]=this.sum/this.ratio,this.weight=0,this.sum=0,this.offset===this.frame.length&&this.flush())}}}flush(){this.offset&&(this.emit(this.frame.slice(0,this.offset).buffer),this.offset=0)}}class N9{constructor(t){this.environment=t,this.active=null,this.generation=0,this.results=new Set,this.errors=new Set,window.addEventListener("pagehide",()=>this.complete(this.active)),document.addEventListener("visibilitychange",()=>{document.hidden&&this.complete(this.active)})}onDictation(t){return this.results.add(t),()=>{this.results.delete(t)}}onDictationError(t){return this.errors.add(t),()=>{this.errors.delete(t)}}async dictationStart(){var n,o,c,f,g;if(this.active)return{ok:!1,reason:"语音输入尚未结束"};if(!window.isSecureContext||!((n=navigator.mediaDevices)!=null&&n.getUserMedia))return{ok:!1,reason:"语音输入需要 HTTPS 地址和麦克风权限"};const t={state:"starting",sessionId:crypto.randomUUID(),generation:++this.generation,committed:"",interim:"",utterances:new Set};this.active=t;try{const x=((c=(o=this.environment).createContext)==null?void 0:c.call(o))??new AudioContext;t.context=x;const w=(((g=(f=this.environment).getUserMedia)==null?void 0:g.call(f))??navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}})).then(C=>{if(this.active!==t){for(const y of C.getTracks())y.stop();throw new Error("语音输入已取消")}t.stream=C}),m=Promise.all([w,this.connect(t),x.resume().then(()=>this.prepareProcessor(t))]);return await Promise.race([m,new Promise(C=>{t.cancelStartup=C}),new Promise((C,y)=>{t.startupTimer=setTimeout(()=>y(new Error("麦克风启动超时,请检查权限后重试")),1e4)})]),clearTimeout(t.startupTimer),this.active!==t?{ok:!1}:(t.source=x.createMediaStreamSource(t.stream),t.source.connect(t.node),t.node.connect(x.destination),t.state="capturing",{ok:!0})}catch(x){if(this.active!==t)return{ok:!1};const w=x instanceof Error&&x.name==="NotAllowedError"?"麦克风权限未开启,请在浏览器网站设置中允许麦克风":x instanceof Error?x.message:"无法启动语音输入";return this.release(t),{ok:!1,reason:w}}}async dictationStop(){var n,o,c;const t=this.active;if(!t)return{ok:!0};if(t.state==="starting")return this.complete(t),{ok:!0};if(t.state==="draining")return await t.stopped,{ok:!0};t.state="draining",t.stopped=new Promise(f=>{t.resolveStopped=f});for(const f of((n=t.stream)==null?void 0:n.getTracks())??[])f.stop();(o=t.source)==null||o.disconnect(),clearTimeout(t.timer),t.timer=setTimeout(()=>this.fail(t,"语音识别收尾超时,已保留当前文字"),12e3);try{await((c=t.flushAudio)==null?void 0:c.call(t)),this.releaseMicrophone(t),this.active===t&&t.socket.send(JSON.stringify({type:"finish",sessionId:t.sessionId,generation:t.generation}))}catch{this.fail(t,"语音输入收尾失败,已保留当前文字")}return await t.stopped,{ok:!0}}async prepareProcessor(t){var x,w;const n=t.context;let o;const c=n.audioWorklet&&await Promise.race([n.audioWorklet.addModule(new URL("./dictation-audio-worklet.js",location.href).href).then(()=>!0,()=>!1),new Promise(m=>{o=setTimeout(()=>m(!1),1500)})]);if(clearTimeout(o),this.active!==t)return;if(c){const m=((w=(x=this.environment).createWorklet)==null?void 0:w.call(x,n))??new AudioWorkletNode(n,"dictation-capture");t.node=m;let C;m.port.onmessage=({data:y})=>{this.active===t&&(y.type==="pcm"&&y.pcm instanceof ArrayBuffer&&this.sendPcm(t,y.pcm),y.type==="flushed"&&(C==null||C()))},t.flushAudio=()=>new Promise((y,S)=>{const _=setTimeout(()=>S(new Error("Audio flush timed out")),500);C=()=>{clearTimeout(_),y()},t.cancelFlush=C,m.port.postMessage({type:"flush"})}),m.onprocessorerror=()=>this.fail(t,"麦克风音频处理失败,请重新开始"),t.clearProcessor=()=>{m.port.onmessage=null,m.onprocessorerror=null};return}const f=n.createScriptProcessor(2048,1,1),g=new _9(n.sampleRate,m=>this.sendPcm(t,m));f.onaudioprocess=m=>{m.outputBuffer.getChannelData(0).fill(0),g.push([m.inputBuffer.getChannelData(0)])},t.node=f,t.flushAudio=async()=>{f.onaudioprocess=null,g.flush()},t.clearProcessor=()=>{f.onaudioprocess=null}}sendPcm(t,n){var o;if(this.active===t){if(((o=t.socket)==null?void 0:o.readyState)!==WebSocket.OPEN){this.fail(t,"语音连接已断开");return}if(t.socket.bufferedAmount>128*1024){this.fail(t,"网络过慢,语音输入已停止");return}t.socket.send(n)}}async connect(t){const n=await this.environment.openSocket();if(this.active!==t){n.close();return}return t.socket=n,new Promise((o,c)=>{t.ready=o,t.rejectReady=c,t.timer=setTimeout(()=>c(new Error("本机语音服务连接超时")),8e3);const f=()=>n.send(JSON.stringify({type:"start",mode:"dictation",sampleRate:16e3,sessionId:t.sessionId,generation:t.generation}));n.addEventListener("open",f,{once:!0}),n.addEventListener("message",({data:x})=>{if(this.active!==t)return;let w;try{w=JSON.parse(String(x))}catch{this.fail(t,"语音服务返回无效数据");return}if(w.type==="error"){this.fail(t,typeof w.message=="string"?w.message:"语音识别失败");return}if(!(w.sessionId!==t.sessionId||w.generation!==t.generation)){if(w.type==="ready"){clearTimeout(t.timer),o();return}(w.type==="partial"||w.type==="final")&&typeof w.text=="string"&&(w.type==="partial"?t.interim=w.text:Number.isSafeInteger(w.utteranceId)&&!t.utterances.has(Number(w.utteranceId))&&(t.utterances.add(Number(w.utteranceId)),t.committed=this.join(t.committed,w.text),t.interim=""),this.emit({text:this.join(t.committed,t.interim),isFinal:!1})),w.type==="finished"&&this.complete(t)}});const g=()=>this.fail(t,"语音连接已断开,已保留当前文字");n.addEventListener("error",g),n.addEventListener("close",g),n.readyState===WebSocket.OPEN&&f()})}join(t,n){return t+(/[a-z0-9]$/i.test(t)&&/^[a-z0-9]/i.test(n)?" ":"")+n}emit(t){for(const n of this.results)n(t)}complete(t){if(!t||this.active!==t)return;const n=this.join(t.committed,t.interim);this.release(t),this.emit({text:n,isFinal:!0})}fail(t,n){var o;if(this.active===t){(o=t.rejectReady)==null||o.call(t,new Error(n)),this.release(t);for(const c of this.errors)c(n)}}releaseMicrophone(t){var n,o,c,f,g;if(!t.microphoneReleased){if(t.microphoneReleased=!0,t.state!=="draining")for(const x of((n=t.stream)==null?void 0:n.getTracks())??[])x.stop();(o=t.clearProcessor)==null||o.call(t),(c=t.source)==null||c.disconnect(),(f=t.node)==null||f.disconnect(),(g=t.context)==null||g.close().catch(()=>{})}}release(t){var n,o,c,f,g;this.active===t&&(this.active=null),clearTimeout(t.timer),clearTimeout(t.startupTimer),(n=t.cancelStartup)==null||n.call(t),(o=t.cancelFlush)==null||o.call(t),(c=t.resolveStopped)==null||c.call(t),(f=t.ready)==null||f.call(t),this.releaseMicrophone(t),(g=t.socket)==null||g.close()}}class O9{constructor(t){this.openSocket=t,this.generation=0,this.playing=null,this.active=null,this.starts=new Set,this.pcm=new Set,this.finishes=new Set,this.flushes=new Set,this.ends=new Set,window.addEventListener("pagehide",()=>{this.ttsStop()})}async ttsSpeak(t){var f;if(await this.ttsStop(),(f=this.active)==null||f.cancel(),!t.trim())throw new Error("播报内容不能为空");const n={sessionId:crypto.randomUUID(),generation:++this.generation,socket:void 0,cancel:()=>{}};this.active=n;let o,c=!1;return new Promise((g,x)=>{const w=C=>{var y;if(clearTimeout(o),this.active===n)if(this.active=null,(y=n.socket)==null||y.close(),C){this.playing===n.generation&&(this.playing=null);for(const S of this.flushes)S(n);for(const S of this.ends)S(n);x(C)}else g({ok:!0})};n.cancel=()=>{var C;((C=n.socket)==null?void 0:C.readyState)===WebSocket.OPEN&&n.socket.send(JSON.stringify({type:"cancel",sessionId:n.sessionId,generation:n.generation})),this.playing===n.generation&&(this.playing=null);for(const y of this.flushes)y(n);for(const y of this.ends)y(n);w()};const m=()=>{clearTimeout(o),o=setTimeout(()=>w(new Error("语音播报超时,请重试")),35e3)};m(),this.openSocket().then(C=>{if(this.active!==n){C.close();return}n.socket=C,C.binaryType="arraybuffer";const y=()=>C.send(JSON.stringify({type:"start",sessionId:n.sessionId,generation:n.generation,text:t.trim().slice(0,600),speed:1}));C.addEventListener("open",y,{once:!0}),C.addEventListener("error",()=>w(new Error("语音播报连接失败"))),C.addEventListener("close",()=>w(new Error("语音播报连接已断开"))),C.addEventListener("message",({data:S})=>{if(this.active!==n)return;if(m(),S instanceof ArrayBuffer){if(!c||S.byteLength%2!==0){w(new Error("语音播报音频无效"));return}for(const k of this.pcm)k({generation:n.generation,pcm:S});return}let _;try{_=JSON.parse(String(S))}catch{w(new Error("语音播报数据无效"));return}if(_.type==="error"){w(new Error(typeof _.message=="string"?_.message:"语音播报失败"));return}if(!(_.sessionId!==n.sessionId||_.generation!==n.generation))if(_.type==="started"){if(c||_.sampleRate!==24e3||_.channels!==1||_.sampleFormat!=="s16le"){w(new Error("语音播报格式无效"));return}c=!0,this.playing=n.generation;for(const k of this.starts)k({sessionId:n.sessionId,generation:n.generation,sampleRate:24e3,channels:1,sampleFormat:"s16le"})}else if(_.type==="finished"&&c){for(const k of this.finishes)k(n);w()}else _.type==="cancelled"&&n.cancel()}),C.readyState===WebSocket.OPEN&&y()}).catch(C=>w(C instanceof Error?C:new Error("语音播报连接失败")))})}async ttsStop(){var t;if((t=this.active)==null||t.cancel(),this.playing!==null){const n=this.playing;this.playing=null;for(const o of this.flushes)o({generation:n});for(const o of this.ends)o({generation:n})}return{ok:!0}}async ttsPlaybackEnded(t){if(t===this.playing){this.playing=null;for(const n of this.ends)n({generation:t})}return{ok:!0}}onTtsStart(t){return this.starts.add(t),()=>{this.starts.delete(t)}}onTtsPcm(t){return this.pcm.add(t),()=>{this.pcm.delete(t)}}onTtsStreamEnd(t){return this.finishes.add(t),()=>{this.finishes.delete(t)}}onTtsFlush(t){return this.flushes.add(t),()=>{this.flushes.delete(t)}}onTtsEnd(t){return this.ends.add(t),()=>{this.ends.delete(t)}}}const ol="webapp.settings.v1";class k9{constructor(){this.cached=null}get(){if(this.cached)return this.cached;let t={};try{t=JSON.parse(localStorage.getItem(ol)??"{}")}catch{t={}}return this.cached={...this.defaults(),...t},this.cached}save(t){const n=this.get();this.cached={...n,...t},t.profiles&&!t.activeProfileId&&(this.cached.activeProfileId=n.activeProfileId),localStorage.setItem(ol,JSON.stringify(this.cached))}setActiveProfile(t){const n=this.get();this.cached={...n,activeProfileId:t},localStorage.setItem(ol,JSON.stringify(this.cached))}reflectServerModel(t){if(!(t!=null&&t.modelId))return;const n=this.get(),o=n.profiles.find(x=>x.id==="server-managed");if(!o||o.apiKey!=="managed"||o.modelId===t.modelId&&o.provider===(t.provider||"openai"))return;const c=t.modelId,f=t.provider||"openai",g=t.baseUrl||"";this.cached={...n,profiles:n.profiles.map(x=>x.id==="server-managed"?{...x,name:`服务端 · ${c}`,provider:f,modelId:c,baseUrl:g}:x),modelProvider:f,modelId:c,baseUrl:g||n.baseUrl},localStorage.setItem(ol,JSON.stringify(this.cached))}getModelOverride(){const t=this.get(),n=t.profiles.find(x=>x.id===t.activeProfileId)??null,o=(n==null?void 0:n.provider)??t.modelProvider,c=(n==null?void 0:n.apiKey)??t.apiKey,f=(n==null?void 0:n.modelId)??t.modelId,g=(n==null?void 0:n.baseUrl)??t.baseUrl;return!c||c==="managed"||!f||f==="server"?null:{provider:o,apiKey:c,modelId:f,...g?{baseUrl:g}:{},...(n==null?void 0:n.requestTimeoutSeconds)===void 0?{}:{requestTimeoutSeconds:n.requestTimeoutSeconds}}}getReasoningEffort(){const t=this.get().reasoningEffort;return["off","low","medium","high"].includes(t)?t:"off"}getRunLimits(){const t=this.get(),n=Number(t.maxIterations),o=Number.isFinite(n)&&n>=0?Math.trunc(n):10,c=Math.min(2e3,Math.max(8,Math.trunc(Number(t.contextWindow)||100)));return{maxIterations:o,maxTokens:c*1e3}}defaults(){const t={id:"server-managed",name:"服务端托管",provider:"openai",modelId:"server",apiKey:"managed",baseUrl:""};return{modelProvider:t.provider,modelId:t.modelId,apiKey:t.apiKey,baseUrl:"",maxIterations:10,contextWindow:100,workingDirectory:"/",profiles:[t],activeProfileId:t.id,reasoningEffort:"off"}}}function D9(e){return e.toString(16).padStart(2,"0")}function M9(e){const t=e.getRandomValues(new Uint8Array(16));t[6]=t[6]&15|64,t[8]=t[8]&63|128;const n=Array.from(t,D9);return[n.slice(0,4).join(""),n.slice(4,6).join(""),n.slice(6,8).join(""),n.slice(8,10).join(""),n.slice(10,16).join("")].join("-")}function P9(e=globalThis.crypto){typeof e.randomUUID!="function"&&Object.defineProperty(e,"randomUUID",{configurable:!0,writable:!0,value:()=>M9(e)})}const Rf="agent-webapp:tab-swipe:v1",L9=["input","textarea","select","button","a[href]","[contenteditable='true']","[role='button']","[data-tab-swipe-ignore]"].join(","),qp=24;function B9(e){return!e||typeof e.closest!="function"?!1:!!e.closest(L9)}function F9(e){let t=null;const n=o=>t!==null&&o.pointerType==="touch"&&o.pointerId===t.pointerId;return{pointerDown(o){o.pointerType!=="touch"||!o.isPrimary||o.interactive||!(o.clientX<=qp||o.clientX>=o.viewportWidth-qp)||(t={pointerId:o.pointerId,startX:o.clientX,startY:o.clientY,axis:"pending"})},pointerMove(o){if(!n(o)||!t)return!1;const c=o.clientX-t.startX,f=o.clientY-t.startY;if(t.axis==="pending"){if(Math.max(Math.abs(c),Math.abs(f))<=8)return!1;if(Math.abs(f)>=Math.abs(c)*1.2)return t=null,!1;t.axis="horizontal"}return e({type:Rf,phase:"move",deltaX:c}),!0},pointerUp(o){if(!n(o)||!t)return!1;const c=t.axis==="horizontal";return c&&e({type:Rf,phase:"end",deltaX:o.clientX-t.startX}),t=null,c},pointerCancel(o){if(!n(o)||!t)return!1;const c=t.axis==="horizontal";return c&&e({type:Rf,phase:"cancel",deltaX:0}),t=null,c}}}function U9(){if(window.parent===window)return()=>{};const e=F9(g=>{window.parent.postMessage(g,window.location.origin)}),t=g=>({pointerId:g.pointerId,pointerType:g.pointerType,isPrimary:g.isPrimary,clientX:g.clientX,clientY:g.clientY,viewportWidth:window.innerWidth}),n=g=>{e.pointerDown({...t(g),interactive:B9(g.target)})},o=g=>{e.pointerMove(t(g))&&g.preventDefault()},c=g=>{e.pointerUp(t(g))&&g.preventDefault()},f=g=>{e.pointerCancel(t(g))};return document.addEventListener("pointerdown",n,{capture:!0}),document.addEventListener("pointermove",o,{capture:!0,passive:!1}),document.addEventListener("pointerup",c,{capture:!0,passive:!1}),document.addEventListener("pointercancel",f,{capture:!0}),()=>{document.removeEventListener("pointerdown",n,{capture:!0}),document.removeEventListener("pointermove",o,{capture:!0}),document.removeEventListener("pointerup",c,{capture:!0}),document.removeEventListener("pointercancel",f,{capture:!0})}}const j9="agent-web-shell:skin:v1",W9=["pearl","scifi","noir","mist","pine","graphite","glass"];function z9(){if(window.parent===window)return()=>{};const e=t=>{if(t.origin!==window.location.origin||t.source!==window.parent)return;const n=t.data;!n||typeof n!="object"||n.type!==j9||typeof n.skin!="string"||!W9.includes(n.skin)||Fo.getState().setSkin(n.skin)};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)}function $9(){if(window.parent===window)return()=>{};const e=t=>{if(t.origin!==window.location.origin||t.source!==window.parent)return;const n=a5(t.data);n&&(document.body.dataset.webShellEmbedded="1",Fo.getState().setNavigationLayout(n))};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e),delete document.body.dataset.webShellEmbedded}}const V9="agentroam:open-browser-live",G1="agent-web-shell:open-browser-live:v1";function H9(e){return!e||typeof e!="object"||e.type!==G1?null:{type:G1}}function m_(e,t,n){return e.origin!==t||e.source!==n?null:H9(e.data)}function G9(){if(window.parent===window)return()=>{};const e=t=>{if(t.origin!==window.location.origin||t.source!==window.parent)return;const n=t.data;!n||typeof n!="object"||n.type!==G1||window.dispatchEvent(new CustomEvent(V9))};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)}const X9="agent-webapp:ready:v1";function Y9(){window.parent!==window&&window.parent.postMessage({type:X9},window.location.origin)}const Rv="agent-webapp:project-request:v1",K9="agent-web-shell:project-response:v1",Z9=["project:list","project:get","project:create","project:rename","project:delete","project:roots","project:directories","project:check"],Q9=new Set([...Z9,"fs:preview-open","fs:preview-close"]);function q9(e){if(!e||typeof e!="object")return null;const t=e;return t.type!==Rv||!Number.isSafeInteger(t.id)||Number(t.id)<1||typeof t.method!="string"||!Q9.has(t.method)||!t.payload||typeof t.payload!="object"||Array.isArray(t.payload)?null:t}function x_(e,t,n){return e.origin!==t||e.source!==n?null:q9(e.data)}function J9(e){if(!e||typeof e!="object")return null;const t=e;return t.type!==K9||!Number.isSafeInteger(t.id)||Number(t.id)<1||typeof t.ok!="boolean"||!t.ok&&typeof t.error!="string"?null:t}class eT{constructor(t=window,n=15e3){this.context=t,this.timeoutMs=n,this.sequence=0,this.pending=new Map,this.onMessage=o=>{if(o.origin!==this.context.location.origin||o.source!==this.context.parent)return;const c=J9(o.data);if(!c)return;const f=this.pending.get(c.id);f&&(this.pending.delete(c.id),clearTimeout(f.timer),c.ok?f.resolve(c.result):f.reject(Object.assign(new Error(c.error||"项目操作失败"),{code:c.code})))},this.context.addEventListener("message",this.onMessage)}request(t,n={}){if(this.context.parent===this.context)return Promise.reject(Object.assign(new Error("请从 AgentRoam Web 控制台打开项目"),{code:"WEB_SHELL_REQUIRED"}));const o=++this.sequence;return new Promise((c,f)=>{const g=setTimeout(()=>{this.pending.delete(o),f(Object.assign(new Error("项目操作超时"),{code:"WEB_SHELL_TIMEOUT"}))},this.timeoutMs);this.pending.set(o,{resolve:c,reject:f,timer:g}),this.context.parent.postMessage({type:Rv,id:o,method:t,payload:n},this.context.location.origin)})}dispose(){this.context.removeEventListener("message",this.onMessage);for(const t of this.pending.values())clearTimeout(t.timer),t.reject(Object.assign(new Error("项目桥已关闭"),{code:"WEB_SHELL_CLOSED"}));this.pending.clear()}}const _v="agent-webapp:browser-request:v1",tT="agent-web-shell:browser-response:v1",rT="agent-web-shell:browser-event:v1",nT="agent-web-shell:browser-frame:v1",iT=["browser:list","browser:watch","browser:unwatch","browser:takeover","browser:return","browser:input","browser:set-display","browser:ping","browser:webrtc","browser:system"],sT=new Set(iT);function oT(e){if(!e||typeof e!="object")return null;const t=e;return t.type!==_v||!Number.isSafeInteger(t.id)||Number(t.id)<1||typeof t.method!="string"||!sT.has(t.method)||!t.payload||typeof t.payload!="object"||Array.isArray(t.payload)?null:t}function w_(e,t,n){return e.origin!==t||e.source!==n?null:oT(e.data)}function aT(e){if(!e||typeof e!="object")return null;const t=e;return t.type!==tT||!Number.isSafeInteger(t.id)||Number(t.id)<1||typeof t.ok!="boolean"||!t.ok&&typeof t.error!="string"?null:t}function lT(e){if(!e||typeof e!="object")return null;const t=e;if(t.type!==rT||!t.event||typeof t.event!="object")return null;const n=t.event;return typeof n.type!="string"||!n.type.startsWith("browser:")?null:t}function cT(e){if(!e||typeof e!="object")return null;const t=e;return t.type!==nT||!Number.isSafeInteger(t.channelId)||Number(t.channelId)<1||!Number.isSafeInteger(t.sequence)||Number(t.sequence)<0||!(t.data instanceof ArrayBuffer)?null:t}class uT{constructor(t=window,n=15e3){this.context=t,this.timeoutMs=n,this.sequence=0,this.pending=new Map,this.listeners=new Set,this.sessionsByChannel=new Map,this.pendingFramesByChannel=new Map,this.onMessage=o=>{var w;if(o.origin!==this.context.location.origin||o.source!==this.context.parent)return;const c=cT(o.data);if(c){const m=this.sessionsByChannel.get(c.channelId);if(!m){this.pendingFramesByChannel.set(c.channelId,c);return}this.emitBinaryFrame(c,m);return}const f=lT(o.data);if(f){if(f.event.type==="browser:connection"){this.sessionsByChannel.clear(),this.pendingFramesByChannel.clear();for(const m of this.pending.values())clearTimeout(m.timer),m.reject(Object.assign(new Error("远程连接已变化,请重新接管"),{code:"EOFFLINE"}));this.pending.clear()}for(const m of this.listeners)m(f.event);return}const g=aT(o.data);if(!g)return;const x=this.pending.get(g.id);if(x)if(this.pending.delete(g.id),clearTimeout(x.timer),g.ok){if(x.method==="browser:watch"&&g.result&&typeof g.result=="object"){const m=g.result;if(Number.isSafeInteger(m.channelId)&&typeof((w=m.session)==null?void 0:w.id)=="string"){const C=Number(m.channelId);this.sessionsByChannel.set(C,m.session.id);const y=this.pendingFramesByChannel.get(C);y&&(this.pendingFramesByChannel.delete(C),this.emitBinaryFrame(y,m.session.id))}}x.resolve(g.result)}else x.reject(Object.assign(new Error(g.error||"浏览器操作失败"),{code:g.code}))},this.context.addEventListener("message",this.onMessage)}emitBinaryFrame(t,n){for(const o of this.listeners)o({type:"browser:frame",sessionId:n,sequence:t.sequence,data:t.data,mime:"image/jpeg",timestamp:Date.now()})}request(t,n={}){if(this.context.parent===this.context)return Promise.reject(Object.assign(new Error("请从 AgentRoam Web 控制台打开浏览器直播"),{code:"WEB_SHELL_REQUIRED"}));const o=++this.sequence;return new Promise((c,f)=>{const g=setTimeout(()=>{this.pending.delete(o),f(Object.assign(new Error("浏览器操作超时"),{code:"WEB_SHELL_TIMEOUT"}))},this.timeoutMs);this.pending.set(o,{resolve:c,reject:f,timer:g,method:t}),this.context.parent.postMessage({type:_v,id:o,method:t,payload:n},this.context.location.origin)})}onEvent(t){return this.listeners.add(t),()=>this.listeners.delete(t)}dispose(){this.context.removeEventListener("message",this.onMessage);for(const t of this.pending.values())clearTimeout(t.timer),t.reject(Object.assign(new Error("浏览器桥已关闭"),{code:"WEB_SHELL_CLOSED"}));this.pending.clear(),this.listeners.clear(),this.sessionsByChannel.clear(),this.pendingFramesByChannel.clear()}}class un{constructor(t){this.url=t}static parse(t){const n=t.trim();if(!n)return null;const o=/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(n)?n:`http://${n}`;let c;try{c=new URL(o)}catch{return null}return c.protocol!=="http:"&&c.protocol!=="https:"||!c.hostname?null:new un(`${c.protocol}//${c.host}`)}toString(){return this.url}api(t){return`${this.url}${t.startsWith("/")?t:`/${t}`}`}}class fT{constructor(t,n,o){this.environment=t,this.storage=n,this.probe=o}async planStartup(){if(!this.environment.isNativeApp())return{mode:"same-origin"};const t=this.launchEndpoint();if(t)return{mode:"ready",endpoint:t};const n=this.storage.load();if(n){const o=await this.probe.probe(n);return o.ok?{mode:"ready",endpoint:n}:{mode:"setup",endpoint:n,failure:o.reason}}return{mode:"setup",endpoint:null}}async connect(t){const n=un.parse(t);if(!n)return{ok:!1,reason:"地址无效,请输入 http(s)://host:port 形式的服务器地址"};const o=await this.probe.probe(n);return o.ok?(this.storage.save(n),{ok:!0,endpoint:n}):{ok:!1,reason:`无法连接服务器:${o.reason}`}}disconnect(){this.storage.clear()}launchEndpoint(){const t=this.environment.launchServerUrl();return t?un.parse(t):null}}function Jp(){return window.Capacitor??null}class dT{isNativeApp(){var t,n;return((n=(t=Jp())==null?void 0:t.isNativePlatform)==null?void 0:n.call(t))??!1}platform(){var n,o;const t=(o=(n=Jp())==null?void 0:n.getPlatform)==null?void 0:o.call(n);return t==="ios"||t==="android"?t:"web"}launchServerUrl(){const t=new URLSearchParams(window.location.search).get("server");return t&&t.trim()?t.trim():null}}const _f="webapp.mobile.serverEndpoint.v1";class Nv{load(){try{const t=localStorage.getItem(_f);return t?un.parse(t):null}catch{return null}}save(t){localStorage.setItem(_f,t.toString())}clear(){localStorage.removeItem(_f)}}const hT=6e3;class gT{constructor(t=(...n)=>fetch(...n)){this.transport=t}async probe(t,n=hT){const o=new AbortController,c=setTimeout(()=>o.abort(),n);try{const f=await this.transport(t.api("/api/agent/model"),{method:"GET",cache:"no-store",signal:o.signal});return f.ok?{ok:!0,modelId:(await f.json()).modelId??null}:{ok:!1,reason:f.status===401?"此 App 尚未授权,请扫描电脑上的授权二维码。":f.status===423?"电脑已锁定远程访问,请先在电脑上解锁。":`HTTP ${f.status}`}}catch(f){return{ok:!1,reason:f instanceof DOMException&&f.name==="AbortError"?"连接超时":pT(f)}}finally{clearTimeout(c)}}}function pT(e){return(e instanceof Error?e.message:String(e))||"网络错误"}/**
|
|
63
|
-
* @license lucide-react v0.468.0 - ISC
|
|
64
|
-
*
|
|
65
|
-
* This source code is licensed under the ISC license.
|
|
66
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const mT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ov=(...e)=>e.filter((t,n,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===n).join(" ").trim();/**
|
|
68
|
-
* @license lucide-react v0.468.0 - ISC
|
|
69
|
-
*
|
|
70
|
-
* This source code is licensed under the ISC license.
|
|
71
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/var xT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
73
|
-
* @license lucide-react v0.468.0 - ISC
|
|
74
|
-
*
|
|
75
|
-
* This source code is licensed under the ISC license.
|
|
76
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const wT=me.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:c="",children:f,iconNode:g,...x},w)=>me.createElement("svg",{ref:w,...xT,width:t,height:t,stroke:e,strokeWidth:o?Number(n)*24/Number(t):n,className:Ov("lucide",c),...x},[...g.map(([m,C])=>me.createElement(m,C)),...Array.isArray(f)?f:[f]]));/**
|
|
78
|
-
* @license lucide-react v0.468.0 - ISC
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the ISC license.
|
|
81
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const xt=(e,t)=>{const n=me.forwardRef(({className:o,...c},f)=>me.createElement(wT,{ref:f,iconNode:t,className:Ov(`lucide-${mT(e)}`,o),...c}));return n.displayName=`${e}`,n};/**
|
|
83
|
-
* @license lucide-react v0.468.0 - ISC
|
|
84
|
-
*
|
|
85
|
-
* This source code is licensed under the ISC license.
|
|
86
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const vT=xt("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
88
|
-
* @license lucide-react v0.468.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const yT=xt("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
93
|
-
* @license lucide-react v0.468.0 - ISC
|
|
94
|
-
*
|
|
95
|
-
* This source code is licensed under the ISC license.
|
|
96
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const kv=xt("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
98
|
-
* @license lucide-react v0.468.0 - ISC
|
|
99
|
-
*
|
|
100
|
-
* This source code is licensed under the ISC license.
|
|
101
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const ET=xt("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
|
|
103
|
-
* @license lucide-react v0.468.0 - ISC
|
|
104
|
-
*
|
|
105
|
-
* This source code is licensed under the ISC license.
|
|
106
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const bT=xt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
108
|
-
* @license lucide-react v0.468.0 - ISC
|
|
109
|
-
*
|
|
110
|
-
* This source code is licensed under the ISC license.
|
|
111
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const CT=xt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
113
|
-
* @license lucide-react v0.468.0 - ISC
|
|
114
|
-
*
|
|
115
|
-
* This source code is licensed under the ISC license.
|
|
116
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const Dv=xt("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
|
|
118
|
-
* @license lucide-react v0.468.0 - ISC
|
|
119
|
-
*
|
|
120
|
-
* This source code is licensed under the ISC license.
|
|
121
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const Mv=xt("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
|
|
123
|
-
* @license lucide-react v0.468.0 - ISC
|
|
124
|
-
*
|
|
125
|
-
* This source code is licensed under the ISC license.
|
|
126
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const Nf=xt("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
128
|
-
* @license lucide-react v0.468.0 - ISC
|
|
129
|
-
*
|
|
130
|
-
* This source code is licensed under the ISC license.
|
|
131
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const AT=xt("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
|
|
133
|
-
* @license lucide-react v0.468.0 - ISC
|
|
134
|
-
*
|
|
135
|
-
* This source code is licensed under the ISC license.
|
|
136
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const ST=xt("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
|
|
138
|
-
* @license lucide-react v0.468.0 - ISC
|
|
139
|
-
*
|
|
140
|
-
* This source code is licensed under the ISC license.
|
|
141
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const IT=xt("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
|
|
143
|
-
* @license lucide-react v0.468.0 - ISC
|
|
144
|
-
*
|
|
145
|
-
* This source code is licensed under the ISC license.
|
|
146
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const TT=xt("MonitorUp",[["path",{d:"m9 10 3-3 3 3",key:"11gsxs"}],["path",{d:"M12 13V7",key:"h0r20n"}],["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}]]);/**
|
|
148
|
-
* @license lucide-react v0.468.0 - ISC
|
|
149
|
-
*
|
|
150
|
-
* This source code is licensed under the ISC license.
|
|
151
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const RT=xt("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
|
|
153
|
-
* @license lucide-react v0.468.0 - ISC
|
|
154
|
-
*
|
|
155
|
-
* This source code is licensed under the ISC license.
|
|
156
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const _T=xt("PanelRight",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
158
|
-
* @license lucide-react v0.468.0 - ISC
|
|
159
|
-
*
|
|
160
|
-
* This source code is licensed under the ISC license.
|
|
161
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const NT=xt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
163
|
-
* @license lucide-react v0.468.0 - ISC
|
|
164
|
-
*
|
|
165
|
-
* This source code is licensed under the ISC license.
|
|
166
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const Pv=xt("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
168
|
-
* @license lucide-react v0.468.0 - ISC
|
|
169
|
-
*
|
|
170
|
-
* This source code is licensed under the ISC license.
|
|
171
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const OT=xt("UsersRound",[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]]);/**
|
|
173
|
-
* @license lucide-react v0.468.0 - ISC
|
|
174
|
-
*
|
|
175
|
-
* This source code is licensed under the ISC license.
|
|
176
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const kT=xt("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
|
|
178
|
-
* @license lucide-react v0.468.0 - ISC
|
|
179
|
-
*
|
|
180
|
-
* This source code is licensed under the ISC license.
|
|
181
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/const DT=xt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function MT(e){const t=e.toolWidths.flatMap((g,x)=>g>0?[x]:[]),n=g=>g.reduce((x,w)=>x+e.toolWidths[w],0)+g.length*e.gap,o=n(t)+e.avatarWidth<=e.fullAvailableWidth;if(o)return{fullFits:o,inlineIndices:t,overflowIndices:[]};if(!e.expanded)return{fullFits:o,inlineIndices:[],overflowIndices:t};const c=e.availableWidth-e.avatarWidth-e.toggleWidth;if(n(t)<=c)return{fullFits:o,inlineIndices:t,overflowIndices:[]};const f=[];for(const g of t){if(n([...f,g])>c-e.toggleWidth)break;f.push(g)}return{fullFits:o,inlineIndices:f,overflowIndices:t.slice(f.length)}}function Lv(e){return e.map(t=>t.compactItems??[t]).filter(t=>t.length>0)}function PT(e){return Lv(e).flat().filter(t=>t.id!=="files")}function LT({items:e,avatar:t,glass:n=!1,compact:o=!1}){const[c,f]=me.useState(!1),g=n&&c,x=n&&!c;me.useEffect(()=>{R(!1)},[g,o,c]),me.useEffect(()=>{const K=window.matchMedia("(max-width: 899px)"),le=()=>f(K.matches);return le(),K.addEventListener("change",le),()=>K.removeEventListener("change",le)},[]);const w=me.useRef(null),m=me.useRef(null),C=me.useRef(null),y=me.useRef(null),S=me.useRef(null),_=me.useRef(new Map),[k,D]=me.useState(null),[X,O]=me.useState(!1),[I,R]=me.useState(!1),[U,G]=me.useState({top:-1e3,left:0}),[W,B]=me.useState({fullFits:!1,inlineIndices:[],overflowIndices:[]}),Y=new Set(W.inlineIndices),$=W.fullFits||X,ae=$&&W.overflowIndices.length>0,Ee=Lv(e);me.useEffect(()=>{var K;D(((K=w.current)==null?void 0:K.closest(".web-root"))??document.body)},[]),me.useLayoutEffect(()=>{var Pe,Ae;const K=(Pe=w.current)==null?void 0:Pe.closest(".terminal-tabs"),le=K==null?void 0:K.querySelector(".terminal-tab-list"),j=(Ae=w.current)==null?void 0:Ae.closest(".terminal-connection");if(!K||!le||!j||!k||n||o)return;let ve=0;const he=()=>{var Nt,ui,_e;const wt=getComputedStyle(K),ze=getComputedStyle(j),dn=getComputedStyle(le),ce=Array.from(le.children),Mr=ce.reduce((hr,Gt)=>hr+Gt.offsetWidth,0)+Math.max(0,ce.length-1)*(parseFloat(dn.columnGap)||0),ht=(parseFloat(wt.paddingLeft)||0)+(parseFloat(wt.paddingRight)||0)+(parseFloat(ze.paddingLeft)||0)+(parseFloat(ze.paddingRight)||0)+2*(parseFloat(wt.columnGap)||0)+(((Nt=K.querySelector(".terminal-add"))==null?void 0:Nt.offsetWidth)??30),On=K.clientWidth-ht,Kr=MT({toolWidths:e.map(hr=>{var Gt;return((Gt=_.current.get(hr.id))==null?void 0:Gt.offsetWidth)??0}),fullAvailableWidth:On-Mr,availableWidth:On-Math.min(Mr,Math.max(64,Math.min(130,K.clientWidth/4))),avatarWidth:((ui=m.current)==null?void 0:ui.offsetWidth)??44,toggleWidth:((_e=C.current)==null?void 0:_e.offsetWidth)??40,gap:0,expanded:X});B(hr=>JSON.stringify(hr)===JSON.stringify(Kr)?hr:Kr),(Kr.fullFits||!X||Kr.overflowIndices.length===0)&&R(!1)},re=()=>{cancelAnimationFrame(ve),ve=requestAnimationFrame(he)},fe=new ResizeObserver(re);for(const wt of[K,le,w.current,y.current,..._.current.values()])wt&&fe.observe(wt);const ge=new MutationObserver(re);return ge.observe(le,{childList:!0,subtree:!0,characterData:!0}),y.current&&ge.observe(y.current,{childList:!0,subtree:!0}),he(),()=>{cancelAnimationFrame(ve),fe.disconnect(),ge.disconnect()}},[X,k,e.map(K=>K.id).join(","),W.inlineIndices.join(","),n,o]),me.useLayoutEffect(()=>{if(!I)return;const K=()=>{var re,fe,ge,Pe;const j=(re=S.current)==null?void 0:re.getBoundingClientRect();if(!j)return;const ve=x||o?((fe=y.current)==null?void 0:fe.getBoundingClientRect().width)??Math.min(292,innerWidth-16):Math.min(292,innerWidth-16),he=((Pe=(ge=w.current)==null?void 0:ge.closest(".terminal-tabs"))==null?void 0:Pe.getBoundingClientRect().bottom)??j.bottom;G({top:Math.max(j.bottom,he)+6,left:Math.max(8,Math.min(innerWidth-ve-8,j.right-ve))})};K();const le=new ResizeObserver(K);return x&&y.current&&le.observe(y.current),o&&y.current&&le.observe(y.current),window.addEventListener("resize",K),window.addEventListener("scroll",K,!0),()=>{le.disconnect(),window.removeEventListener("resize",K),window.removeEventListener("scroll",K,!0)}},[I,x,o,W.inlineIndices.join(",")]),me.useEffect(()=>{if(!I)return;const K=j=>{var he,re;const ve=j.target;(he=w.current)!=null&&he.contains(ve)||(re=y.current)!=null&&re.contains(ve)||ve instanceof Element&&ve.closest("[data-toolbar-overlay]")||R(!1)},le=j=>{var ve;j.key==="Escape"&&(R(!1),(ve=S.current)==null||ve.focus())};return document.addEventListener("pointerdown",K),document.addEventListener("keydown",le),()=>{document.removeEventListener("pointerdown",K),document.removeEventListener("keydown",le)}},[I]);const ne=K=>P.jsx("div",{className:"toolbar-slot","data-toolbar-item":K.id,ref:le=>{le?_.current.set(K.id,le):_.current.delete(K.id)},children:K.content},K.id);if(o)return P.jsxs("div",{ref:w,className:"responsive-toolbar compact-toolbar",children:[Ee.length>0&&P.jsx("button",{ref:S,type:"button",className:"file-drawer-toggle compact-toolbar-trigger","aria-label":"更多功能",title:"更多功能","aria-haspopup":"dialog","aria-expanded":I,onClick:()=>R(K=>!K),children:P.jsx(Nf,{size:20,"aria-hidden":"true"})}),P.jsx("div",{className:"toolbar-avatar",onPointerDown:()=>R(!1),children:t}),k&&ds.createPortal(P.jsx("div",{className:c?"compact-tools-backdrop":"compact-tools-overlay",hidden:!I,onClick:K=>{K.target===K.currentTarget&&R(!1)},children:P.jsxs("div",{ref:y,className:`compact-tools-panel${c?" is-mobile":""}`,role:"dialog","aria-label":"更多功能","data-toolbar-overlay":!0,style:c?void 0:{position:"fixed",...U},children:[c&&P.jsx("header",{children:P.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":"关闭更多功能",title:"关闭更多功能",onClick:()=>{var K;R(!1),(K=S.current)==null||K.focus()},children:P.jsx(DT,{size:20,"aria-hidden":"true"})})}),P.jsx("div",{className:"compact-tools-grid",children:Ee.map(K=>K.length===1?ne(K[0]):P.jsx("div",{className:"compact-tools-group",children:K.map(ne)},K[0].id))})]})}),k)]});if(x){const K=["files","remote"].flatMap(j=>e.filter(ve=>ve.id===j)),le=e.filter(j=>!["files","remote"].includes(j.id));return P.jsxs("div",{ref:w,className:"responsive-toolbar glass-desktop-toolbar",children:[P.jsxs("div",{className:"glass-desktop-actions",children:[K.map(ne),le.length>0&&P.jsx("button",{ref:S,type:"button",className:"file-drawer-toggle","aria-label":"更多功能",title:"更多功能","aria-haspopup":"dialog","aria-expanded":I,onClick:()=>R(j=>!j),children:P.jsx(Nf,{size:20})})]}),P.jsx("div",{className:"toolbar-avatar",onPointerDown:()=>R(!1),children:t}),I&&k&&ds.createPortal(P.jsx("div",{ref:y,className:"glass-desktop-menu",role:"dialog","aria-label":"更多功能","data-toolbar-overlay":!0,style:{position:"fixed",top:U.top,left:U.left,zIndex:200},children:le.map(ne)}),k)]})}if(g){const K={refresh:"刷新页面",collaboration:"群聊看板",install:"安装应用",remote:"远程桌面","ai-hub":"AI Hub",flow:"数字人",theme:"皮肤","navigation-layout":"切换布局",files:"我的文件"},le=P.jsx("div",{className:"glass-mobile-actions",style:{display:"flex",alignItems:"center",gap:4},children:P.jsx("button",{type:"button",className:"file-drawer-toggle ui-icon-button","aria-label":"更多功能","aria-expanded":I,onClick:()=>R(j=>!j),children:P.jsx(Nf,{size:20})})});return P.jsxs("div",{ref:w,className:"responsive-toolbar glass-mobile-toolbar",children:[e.filter(j=>j.id==="files").map(ne),le,P.jsx("div",{className:"toolbar-avatar",children:t}),I&&k&&ds.createPortal(P.jsx("div",{className:"glass-tools-backdrop",onClick:()=>R(!1),children:P.jsxs("section",{className:"glass-tools-sheet",role:"dialog","aria-label":"更多功能","data-toolbar-overlay":!0,onClick:j=>j.stopPropagation(),children:[P.jsxs("header",{children:[P.jsx("strong",{children:"更多功能"}),P.jsx("button",{type:"button","aria-label":"关闭更多功能",onClick:()=>R(!1),children:"×"})]}),P.jsx("div",{className:"glass-tools-grid",children:PT(e).map(j=>P.jsx("div",{className:"glass-tool-cell",title:K[j.id]??j.id,onClick:ve=>{var he;ve.target instanceof Element&&ve.target.closest("button")||(he=ve.currentTarget.querySelector("button"))==null||he.click()},children:j.content},j.id))})]})}),k)]})}return P.jsxs("div",{ref:w,className:"responsive-toolbar","data-toolbar-expanded":$,children:[P.jsx("span",{ref:C,className:"file-drawer-toggle toolbar-size-measure","aria-hidden":"true"}),ae&&P.jsx("button",{ref:S,type:"button",className:"file-drawer-toggle toolbar-overflow-toggle","aria-label":"更多工具",title:"更多工具","aria-haspopup":"dialog","aria-expanded":I,onClick:()=>R(K=>!K),children:P.jsx(bT,{size:17,"aria-hidden":"true"})}),W.inlineIndices.length>0&&P.jsx("div",{className:"toolbar-tools toolbar-tools-inline",children:e.filter((K,le)=>Y.has(le)).map(ne)}),e.length>0&&!W.fullFits&&P.jsx("button",{type:"button",className:"file-drawer-toggle toolbar-more","aria-label":X?"收起顶部工具":"展开顶部工具",title:X?"收起工具":"展开工具","aria-expanded":X,onClick:()=>{O(K=>!K),R(!1)},children:X?P.jsx(Mv,{size:17,"aria-hidden":"true"}):P.jsx(Dv,{size:17,"aria-hidden":"true"})}),P.jsx("div",{ref:m,className:"toolbar-avatar",onPointerDown:()=>R(!1),children:t}),k&&ds.createPortal(P.jsx("div",{ref:y,className:"toolbar-overflow theme-popover",role:"dialog","aria-label":"更多工具菜单","data-toolbar-overlay":!0,"aria-hidden":!I,style:{position:"fixed",top:I?U.top:-1e3,left:I?U.left:0,zIndex:200,width:Math.min(292,innerWidth-16),visibility:I?"visible":"hidden",boxSizing:"border-box",maxHeight:"calc(100dvh - 60px)",overflowY:"auto",padding:8,borderRadius:10,border:"1px solid var(--ui-tabbar-border, #282b36)",background:"var(--ui-tab-active-bg, #262b38)",boxShadow:"0 10px 28px rgba(0,0,0,.45)"},children:P.jsx("div",{className:"toolbar-tools toolbar-tools-expanded",children:e.filter((K,le)=>!Y.has(le)).map(ne)})}),k)]})}function BT(e,t){return Math.max(0,Math.floor((t-e)/1e3))}function F0({ready:e=!1,error:t,onRetry:n}){const[o]=me.useState(Date.now),[c,f]=me.useState(Date.now);me.useEffect(()=>{if(e||t)return;const x=setInterval(()=>f(Date.now()),1e3);return()=>clearInterval(x)},[e,t]);const g=t||"数字人核心正在就绪";return P.jsxs("main",{className:`neural-boot${e?" is-ready":""}${t?" is-error":""}`,role:t?"alert":"status","aria-live":"polite","aria-busy":!e&&!t,"aria-hidden":e,children:[P.jsx("div",{className:"neural-grid","aria-hidden":"true"}),P.jsx("div",{className:"neural-rail neural-rail-left","aria-hidden":"true"}),P.jsx("div",{className:"neural-rail neural-rail-right","aria-hidden":"true"}),P.jsxs("section",{className:"neural-content",children:[P.jsxs("div",{className:"neural-brand","aria-hidden":"true",children:[P.jsx("span",{className:"neural-brand-signal"}),P.jsx("span",{children:"AgentRoam"}),P.jsx("small",{children:"NEURAL LINK"})]}),P.jsxs("div",{className:"neural-portrait","aria-hidden":"true",children:[P.jsx("span",{className:"neural-ring neural-ring-outer"}),P.jsx("span",{className:"neural-ring neural-ring-inner"}),P.jsx("span",{className:"neural-axis neural-axis-x"}),P.jsx("span",{className:"neural-axis neural-axis-y"}),P.jsx("span",{className:"neural-node neural-node-one"}),P.jsx("span",{className:"neural-node neural-node-two"}),P.jsx("span",{className:"neural-node neural-node-three"}),P.jsx("span",{className:"neural-node neural-node-four"}),P.jsx("div",{className:"neural-avatar-frame",children:P.jsxs("div",{className:"neural-avatar",children:[P.jsx(kv,{className:"neural-avatar-icon",size:66,strokeWidth:1.3}),P.jsx("span",{className:"neural-visor"})]})})]}),P.jsxs("div",{className:"neural-copy",children:[P.jsx("strong",{children:"正在唤醒工作区"}),P.jsx("span",{children:g})]}),P.jsx("div",{className:"neural-progress","aria-hidden":"true",children:P.jsx("span",{})}),P.jsxs("div",{className:"neural-meta","aria-hidden":"true",children:[P.jsx("span",{children:"AGENT CORE"}),P.jsxs("span",{className:"neural-meta-time",children:["T+",BT(o,c).toString().padStart(2,"0"),"S"]})]}),t&&P.jsx("button",{type:"button",className:"neural-retry","aria-label":"重试连接",title:"重试连接",onClick:()=>n==null?void 0:n(),children:P.jsx(Pv,{size:18,"aria-hidden":"true"})})]})]})}const FT=`
|
|
183
|
-
.web-appearance-controls { display: flex; align-items: center; gap: 4px; }
|
|
184
|
-
.web-root.is-remote-fullscreen > .terminal-tabs { display: none; }
|
|
185
|
-
.web-root.is-remote-fullscreen .tree-col,
|
|
186
|
-
.web-root.is-remote-fullscreen .preview-col { display: none; }
|
|
187
|
-
|
|
188
|
-
html, body { width:100%; height:100%; margin:0; overflow:hidden; background:var(--ui-root-bg, #0b0b10); overscroll-behavior:none; color:var(--ui-text, #e8e8ee); }
|
|
189
|
-
* { -webkit-tap-highlight-color: transparent; }
|
|
190
|
-
.terminal-tabs { display:flex; align-items:end; gap:4px; min-height:38px; padding:0 8px; background:var(--ui-tabbar-bg, #12141b); border-bottom:0; flex-shrink:0; }
|
|
191
|
-
.terminal-tab-list[hidden],.terminal-add[hidden]{display:none}
|
|
192
|
-
.computer-page-heading{display:flex;align-items:center;gap:4px;flex:1;min-width:0;color:var(--ui-text,#e8e8ee);font-size:13px}.computer-page-heading>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.computer-page-heading a{text-decoration:none;display:grid;place-items:center;flex-shrink:0}
|
|
193
|
-
.computer-page-pane{position:relative;flex:1;min-height:0;background:var(--ui-root-bg,#0b0b10)}.computer-page-pane>iframe{width:100%;height:100%;border:0;display:block}.computer-page-fallback{position:absolute;bottom:32px;left:50%;transform:translateX(-50%);color:var(--ui-tab-accent,#7aa2f7);font-size:13px;z-index:2}
|
|
194
|
-
.computer-page-blocked{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;text-align:center;padding:24px;color:var(--ui-text,#e8e8ee)}.computer-page-blocked h2{font-size:20px;margin:0}.computer-page-blocked p{max-width:420px;line-height:1.7;color:var(--ui-muted-text,#999dab);margin:0}.computer-page-blocked a{display:flex;align-items:center;gap:8px;padding:12px 18px;border-radius:8px;background:var(--ui-tab-accent,#7aa2f7);color:var(--ui-root-bg,#0b0b10);text-decoration:none}
|
|
195
|
-
.terminal-tab-list { position:relative; display:flex; align-items:end; gap:4px; flex:0 1 auto; min-width:0; height:100%; overflow-x:auto; overflow-y:hidden; touch-action:pan-x; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; scroll-behavior:smooth; scrollbar-width:none; }
|
|
196
|
-
.terminal-tab { display:flex; align-items:center; flex-shrink:0; gap:7px; min-width:74px; max-width:130px; height:32px; padding:0 7px 0 10px; border-radius:7px 7px 0 0; background:var(--ui-tab-bg, #1b1e28); color:var(--ui-tab-text, #8f93a4); font-size:11px; cursor:pointer; box-sizing:border-box; transition:color .2s ease,box-shadow .2s ease; }
|
|
197
|
-
.terminal-tab.active { color:var(--ui-tab-active-text, #edf0f7); background:var(--ui-active-content-bg, var(--ui-tab-active-bg, #262b38)); box-shadow:inset 0 2px var(--ui-tab-accent, #7aa2f7); }
|
|
198
|
-
.terminal-tab span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
|
|
199
|
-
.terminal-tab button { width:18px; height:18px; border:0; border-radius:4px; background:transparent; color:var(--ui-tab-text, #707586); padding:0; }
|
|
200
|
-
.terminal-add { flex-shrink:0; min-width:30px; height:28px; margin-bottom:2px; border:1px solid var(--ui-tabbar-border, #303442); border-radius:6px; background:var(--ui-tab-bg, #1b1e28); color:var(--ui-tab-text, #9da2b2); }
|
|
201
|
-
.terminal-connection { align-self:stretch; display:flex; align-items:center; margin-left:auto; padding:0 9px; background:var(--ui-connection-bg, #12141b); color:var(--ui-connection-text, #777b8c); font-size:10.5px; flex-shrink:0; z-index:5; }
|
|
202
|
-
.file-drawer-toggle { display:grid; place-items:center; width:28px; height:28px; padding:0; border:0; border-radius:6px; background:transparent; color:var(--ui-connection-text, #777b8c); cursor:pointer; flex-shrink:0; touch-action:manipulation; }
|
|
203
|
-
.file-drawer-toggle:hover, .file-drawer-toggle[aria-expanded="true"] { background:color-mix(in srgb, var(--ui-tab-accent, #7aa2f7) 12%, transparent); color:var(--ui-tab-active-text, #edf0f7); }
|
|
204
|
-
.file-drawer-toggle:focus-visible { outline:2px solid var(--ui-tab-accent, #7aa2f7); outline-offset:-2px; }
|
|
205
|
-
.theme-avatar-with-status { position:relative; display:flex; flex-shrink:0; }
|
|
206
|
-
.theme-avatar-status { position:absolute; right:-2px; bottom:-2px; z-index:7; width:6px; height:6px; box-sizing:border-box; border:1px solid var(--ui-connection-bg, #12141b); border-radius:50%; background:var(--ui-error); pointer-events:none; }
|
|
207
|
-
.theme-avatar-status[data-connected="true"] { background:var(--ui-success); }
|
|
208
|
-
.theme-picker { position:relative; display:flex; align-items:center; flex-shrink:0; }
|
|
209
|
-
.responsive-toolbar { position:relative; display:flex; align-items:center; flex-shrink:0; gap:0; z-index:6; }
|
|
210
|
-
.compact-toolbar .compact-toolbar-trigger { border-radius:12px; }
|
|
211
|
-
.compact-tools-backdrop[hidden], .compact-tools-overlay[hidden] { display:none; }
|
|
212
|
-
.compact-tools-panel { z-index:200; box-sizing:border-box; width:max-content; max-width:calc(100vw - 16px); max-height:calc(100dvh - 60px); overflow-y:auto; padding:10px; border:1px solid var(--ui-tabbar-border); border-radius:18px; background:color-mix(in srgb, var(--ui-tab-active-bg) 88%, transparent); color:var(--ui-text); backdrop-filter:blur(22px) saturate(1.2); -webkit-backdrop-filter:blur(22px) saturate(1.2); box-shadow:0 8px 28px #29434e26; }
|
|
213
|
-
.compact-tools-grid { display:flex; flex-wrap:wrap; gap:6px; max-width:244px; }
|
|
214
|
-
.compact-tools-group { display:flex; gap:6px; }
|
|
215
|
-
.compact-tools-grid .file-drawer-toggle { width:44px; height:44px; border-radius:12px; }
|
|
216
|
-
.compact-tools-grid .file-drawer-toggle svg { width:20px; height:20px; }
|
|
217
|
-
.compact-tools-backdrop { position:fixed; inset:0; z-index:199; display:flex; align-items:flex-end; background:#101c2838; }
|
|
218
|
-
.compact-tools-panel.is-mobile { width:100%; max-width:none; max-height:80dvh; padding:12px 18px max(24px, env(safe-area-inset-bottom)); border-radius:26px 26px 0 0; }
|
|
219
|
-
.compact-tools-panel.is-mobile header { display:flex; justify-content:flex-end; margin-bottom:8px; }
|
|
220
|
-
.compact-tools-panel.is-mobile .compact-tools-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); grid-auto-flow:row dense; gap:8px; max-width:none; }
|
|
221
|
-
.compact-tools-panel.is-mobile .compact-tools-group { display:grid; grid-column:span 2; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
|
|
222
|
-
.compact-tools-panel.is-mobile .toolbar-slot { min-width:0; border:1px solid var(--ui-tabbar-border); border-radius:16px; background:color-mix(in srgb, var(--ui-tab-active-bg) 75%, transparent); }
|
|
223
|
-
.compact-tools-panel.is-mobile .toolbar-slot > *, .compact-tools-panel.is-mobile .theme-picker { width:100%; }
|
|
224
|
-
.compact-tools-panel.is-mobile .file-drawer-toggle { width:100%; height:64px; }
|
|
225
|
-
.compact-tools-panel.is-mobile header .file-drawer-toggle { width:44px; height:44px; }
|
|
226
|
-
.toolbar-avatar, .toolbar-slot { display:flex; align-items:center; flex-shrink:0; }
|
|
227
|
-
.toolbar-size-measure { position:fixed; top:-1000px; visibility:hidden; pointer-events:none; }
|
|
228
|
-
.toolbar-tools { display:flex; align-items:center; flex-shrink:0; gap:0; }
|
|
229
|
-
.toolbar-tools-expanded { flex-wrap:wrap; padding:4px; }
|
|
230
|
-
.theme-avatar { position:relative; display:flex; align-items:center; justify-content:center; width:18px; height:18px; padding:0; border-radius:99px; font-size:9px; font-weight:700; cursor:pointer; flex-shrink:0; touch-action:manipulation; -webkit-tap-highlight-color:transparent; transition:transform .12s ease, filter .12s ease; }
|
|
231
|
-
/* Hit-area padding keeps the compact visual circle easy to target. */
|
|
232
|
-
.theme-avatar::after { content:""; position:absolute; inset:-6px; border-radius:99px; }
|
|
233
|
-
.theme-avatar:active { transform:scale(.9); filter:brightness(1.15); }
|
|
234
|
-
.theme-popover-item { display:flex; align-items:center; gap:8px; padding:7px 8px; border:none; border-radius:8px; cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
|
|
235
|
-
.theme-popover-item:active { background:color-mix(in srgb, var(--ui-tab-accent, #7aa2f7) 22%, transparent); }
|
|
236
|
-
/* Touch devices: keep hit areas tall while packing icons horizontally.
|
|
237
|
-
The tab bar must grow in step — it clips overflow-y, so an expanded
|
|
238
|
-
hit area taller than the bar would get cut off. */
|
|
239
|
-
@media (pointer: coarse) {
|
|
240
|
-
.terminal-tabs { min-height:44px; }
|
|
241
|
-
.theme-avatar-with-status { width:36px; height:44px; align-items:center; justify-content:center; }
|
|
242
|
-
.theme-avatar::after { inset:-13px -9px; }
|
|
243
|
-
.theme-avatar-status { right:6px; bottom:10px; }
|
|
244
|
-
.toolbar-tools .file-drawer-toggle, .responsive-toolbar .file-drawer-toggle { width:32px; height:40px; }
|
|
245
|
-
.theme-popover-item { padding-top:11px; padding-bottom:11px; }
|
|
246
|
-
}
|
|
247
|
-
@media (prefers-reduced-motion: reduce) { .theme-avatar { transition:none; } }
|
|
248
|
-
.terminal-track { display:flex; width:100%; height:100%; will-change:transform; }
|
|
249
|
-
.terminal-slide { position:relative; flex:0 0 100%; width:100%; height:100%; min-width:0; overflow:hidden; }
|
|
250
|
-
.webapp-frame { display:block; width:100%; height:100%; border:0; background:var(--ui-term-col-bg, #101014); }
|
|
251
|
-
.terminal-surface { position:relative; flex:1; min-height:90px; overflow:hidden; }
|
|
252
|
-
.terminal-screen { display:flex; flex-direction:column; width:100%; min-height:0; overflow:hidden; box-sizing:border-box; }
|
|
253
|
-
.terminal-screen .xterm { flex:1; height:100%; background:var(--ui-terminal-bg, #101014); }
|
|
254
|
-
.terminal-screen .xterm .xterm-viewport { background-color:var(--ui-terminal-bg, #101014); }
|
|
255
|
-
.terminal-screen .xterm-scrollable-element { touch-action:pan-y; -webkit-overflow-scrolling:touch; }
|
|
256
|
-
.terminal-boot { position:absolute; inset:0; z-index:46; display:flex; align-items:center; justify-content:center; gap:9px; pointer-events:auto; font-size:12px; line-height:1.4; letter-spacing:0; }
|
|
257
|
-
.terminal-boot-spinner { width:16px; height:16px; box-sizing:border-box; border:2px solid color-mix(in srgb,currentColor 24%,transparent); border-top-color:currentColor; border-radius:50%; animation:terminal-boot-spin .8s linear infinite; }
|
|
258
|
-
.terminal-boot-warning { position:absolute; top:9px; left:50%; z-index:45; transform:translateX(-50%); max-width:calc(100% - 24px); padding:5px 8px; border:1px solid; border-radius:6px; pointer-events:none; font-size:11px; line-height:1.35; letter-spacing:0; white-space:normal; text-align:center; }
|
|
259
|
-
@keyframes terminal-boot-spin { to { transform:rotate(360deg); } }
|
|
260
|
-
@media (prefers-reduced-motion: reduce) { .terminal-track,.terminal-tab { transition:none !important; } .terminal-boot-spinner { animation:none !important; } }
|
|
261
|
-
.web-root {
|
|
262
|
-
position: fixed;
|
|
263
|
-
top: var(--vv-top, 0px);
|
|
264
|
-
left: var(--vv-left, 0px);
|
|
265
|
-
width: var(--vv-width, 100vw);
|
|
266
|
-
height: var(--vv-height, 100dvh) !important;
|
|
267
|
-
}
|
|
268
|
-
.tree-scroll {
|
|
269
|
-
flex: 1;
|
|
270
|
-
min-height: 0;
|
|
271
|
-
overflow-y: auto;
|
|
272
|
-
overflow-x: hidden;
|
|
273
|
-
overscroll-behavior: contain;
|
|
274
|
-
touch-action: pan-y;
|
|
275
|
-
-webkit-overflow-scrolling: touch;
|
|
276
|
-
padding: 6px;
|
|
277
|
-
}
|
|
278
|
-
.tree-location {
|
|
279
|
-
position: sticky;
|
|
280
|
-
top: -6px;
|
|
281
|
-
z-index: 3;
|
|
282
|
-
display: flex;
|
|
283
|
-
align-items: center;
|
|
284
|
-
gap: 5px;
|
|
285
|
-
margin: -1px -1px 0;
|
|
286
|
-
padding: 7px 7px 5px;
|
|
287
|
-
background: color-mix(in srgb, var(--ui-tree-bg, #121218) 98%, transparent);
|
|
288
|
-
}
|
|
289
|
-
.tree-location input {
|
|
290
|
-
flex: 1;
|
|
291
|
-
min-width: 0;
|
|
292
|
-
height: 28px;
|
|
293
|
-
border: 1px solid var(--ui-panel-input-border, #30303b);
|
|
294
|
-
border-radius: 6px;
|
|
295
|
-
outline: none;
|
|
296
|
-
padding: 0 8px;
|
|
297
|
-
background: var(--ui-panel-input-bg, #0f0f15);
|
|
298
|
-
color: var(--ui-panel-input-text, #d8d8df);
|
|
299
|
-
font-family: "SF Mono", Menlo, monospace;
|
|
300
|
-
font-size: 10.5px;
|
|
301
|
-
}
|
|
302
|
-
.tree-location input:focus { border-color: var(--ui-tab-accent, #536b9e); }
|
|
303
|
-
.tree-location button {
|
|
304
|
-
width: 28px;
|
|
305
|
-
height: 28px;
|
|
306
|
-
flex-shrink: 0;
|
|
307
|
-
border: 1px solid var(--ui-panel-input-border, #30303a);
|
|
308
|
-
border-radius: 6px;
|
|
309
|
-
background: var(--ui-tab-bg, #202029);
|
|
310
|
-
color: var(--ui-tab-text, #aaaab8);
|
|
311
|
-
font-size: 12px;
|
|
312
|
-
}
|
|
313
|
-
.tree-location button[data-active="1"] {
|
|
314
|
-
border-color: var(--ui-success, #4f6f58);
|
|
315
|
-
color: var(--ui-success, #9ece6a);
|
|
316
|
-
background: color-mix(in srgb, var(--ui-success, #9ece6a) 12%, var(--ui-tree-bg, #18221b));
|
|
317
|
-
}
|
|
318
|
-
.tree-head button { height:26px; padding:0 10px; border:0; border-radius:6px 6px 0 0; background:transparent; color:var(--ui-drawer-tab-text, #74798a); font-size:11px; }
|
|
319
|
-
.tree-head button.drawer-tab-active { color:var(--ui-drawer-tab-active, #e4e7ef); box-shadow:inset 0 -2px var(--ui-tab-accent, #7aa2f7); }
|
|
320
|
-
.history-panel { flex:1; min-height:0; overflow:auto; padding:7px; }
|
|
321
|
-
.pinned-commands { position:sticky; top:0; z-index:3; margin:-1px -1px 7px; border:1px solid var(--ui-tabbar-border, #252832); border-radius:6px; background:var(--ui-tree-bg, #121218); box-shadow:0 7px 12px color-mix(in srgb, var(--ui-root-bg, #0b0b10) 58%, transparent); overflow:hidden; }
|
|
322
|
-
.pinned-command-head { display:flex; align-items:center; min-height:30px; padding:0 6px 0 10px; border-bottom:1px solid var(--ui-tabbar-border, #252832); color:var(--ui-history-meta, #74798a); font-size:10px; }
|
|
323
|
-
.pinned-command-head span { flex:1; }
|
|
324
|
-
.pinned-command-row { display:flex; align-items:center; min-height:34px; border-bottom:1px solid color-mix(in srgb, var(--ui-tabbar-border, #252832) 76%, transparent); cursor:pointer; outline:none; }
|
|
325
|
-
.pinned-command-row:last-child { border-bottom:0; }
|
|
326
|
-
.pinned-command-row:hover,.pinned-command-row:focus-visible { background:color-mix(in srgb, var(--ui-tab-active-bg, #1f2430) 76%, transparent); }
|
|
327
|
-
.pinned-command-row:focus-visible { box-shadow:inset 2px 0 var(--ui-tab-accent, #7aa2f7); }
|
|
328
|
-
.pinned-command-dragging { opacity:.66; background:var(--ui-tab-active-bg, #1f2430); }
|
|
329
|
-
.pinned-command-row code { flex:1; min-width:0; padding:0 5px; overflow:hidden; color:var(--ui-history-item-text, #d3d6df); font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
|
|
330
|
-
.pinned-command-grip { display:inline-flex; align-items:center; justify-content:center; width:28px; height:32px; padding:0; border:0; background:transparent; color:var(--ui-history-meta, #626777); cursor:grab; touch-action:none; }
|
|
331
|
-
.pinned-command-grip:active { cursor:grabbing; }
|
|
332
|
-
.pinned-command-actions { display:flex; align-items:center; padding-right:3px; opacity:.42; transition:opacity .15s ease; }
|
|
333
|
-
.pinned-command-row:hover .pinned-command-actions,.pinned-command-row:focus-within .pinned-command-actions { opacity:1; }
|
|
334
|
-
.pinned-command-editor { display:grid; grid-template-columns:minmax(0,1fr) 27px 27px; gap:4px; align-items:center; min-height:39px; padding:4px 5px 4px 8px; border-bottom:1px solid var(--ui-tabbar-border, #252832); }
|
|
335
|
-
.pinned-command-editor input { min-width:0; height:27px; box-sizing:border-box; border:1px solid var(--ui-tab-accent, #536b9e); border-radius:5px; outline:none; padding:0 7px; background:var(--ui-panel-input-bg, #0f0f15); color:var(--ui-panel-input-text, #ddd); font-family:"SF Mono",Menlo,monospace; font-size:10.5px; }
|
|
336
|
-
.pinned-command-editor small { grid-column:1 / -1; color:var(--ui-danger, #e06c75); font-size:9px; }
|
|
337
|
-
.terminal-clipboard-notice { padding:4px 8px; flex-shrink:0; font-size:12px; }
|
|
338
|
-
.terminal-native-touch, .terminal-native-touch .xterm-screen, .terminal-native-touch .terminal-native-rows, .terminal-native-touch .terminal-native-rows * { -webkit-user-select:text !important; user-select:text !important; -webkit-touch-callout:default; }
|
|
339
|
-
.terminal-native-touch .terminal-native-rows { position:absolute; top:0; left:0; z-index:4; pointer-events:auto !important; }
|
|
340
|
-
.terminal-native-touch .xterm-rows:not(.terminal-native-rows) { -webkit-user-select:none !important; user-select:none !important; }
|
|
341
|
-
.terminal-native-touch .terminal-native-rows span { display:inline !important; }
|
|
342
|
-
.terminal-native-touch .xterm-helper-textarea { opacity:1; background:transparent; color:transparent; -webkit-text-fill-color:transparent; caret-color:transparent; outline:none; text-shadow:none; -webkit-appearance:none; appearance:none; -webkit-user-select:text; user-select:text; -webkit-touch-callout:default; font-size:16px !important; left:var(--native-input-left, 0px) !important; top:var(--native-input-top, 0px) !important; width:var(--native-input-width, 80px) !important; height:var(--native-input-height, 32px) !important; z-index:10 !important; pointer-events:var(--native-input-events, none); }
|
|
343
|
-
.history-search { display:flex; gap:5px; padding:5px; background:var(--ui-tree-bg, #121218); }
|
|
344
|
-
.history-search input { flex:1; min-width:0; height:28px; border:1px solid var(--ui-panel-input-border, #30303a); border-radius:6px; padding:0 8px; background:var(--ui-panel-input-bg, #0f0f15); color:var(--ui-panel-input-text, #ddd); font-size:11px; }
|
|
345
|
-
.history-icon-button { display:inline-flex; align-items:center; justify-content:center; width:27px; min-width:27px; height:27px; padding:0; border:1px solid var(--ui-panel-input-border, #30303a); border-radius:5px; background:var(--ui-tab-bg, #202029); color:var(--ui-connection-text, #999dab); }
|
|
346
|
-
.history-icon-button:hover:not(:disabled) { color:var(--ui-drawer-tab-active, #e4e7ef); border-color:var(--ui-tab-accent, #536b9e); }
|
|
347
|
-
.history-icon-button:disabled { cursor:not-allowed; opacity:.32; }
|
|
348
|
-
.history-icon-danger:hover:not(:disabled) { color:var(--ui-danger, #e06c75); border-color:color-mix(in srgb, var(--ui-danger, #e06c75) 60%, var(--ui-panel-input-border, #30303a)); }
|
|
349
|
-
.history-item { padding:9px 7px; border-bottom:1px solid var(--ui-tabbar-border, #242731); cursor:pointer; border-radius:6px; }
|
|
350
|
-
.history-item:hover { background:color-mix(in srgb, var(--ui-tab-active-bg, #181b24) 80%, transparent); }
|
|
351
|
-
.history-item:active { background:var(--ui-tab-active-bg, #1f2430); }
|
|
352
|
-
.history-item-disabled { cursor:not-allowed; opacity:.55; }
|
|
353
|
-
.history-item-disabled:hover { background:transparent; }
|
|
354
|
-
.history-item:focus-visible { outline:1px solid var(--ui-tab-accent, #536b9e); outline-offset:-1px; }
|
|
355
|
-
.history-item code { display:block; color:var(--ui-history-item-text, #d3d6df); font-size:11px; overflow-wrap:anywhere; }
|
|
356
|
-
.history-item small { display:block; margin:4px 0 7px; color:var(--ui-history-meta, #656a79); font-size:9.5px; }
|
|
357
|
-
.history-item-actions { display:flex; gap:5px; }
|
|
358
|
-
.history-empty { padding:18px; color:#5d6270; font-size:11px; text-align:center; }
|
|
359
|
-
@media (pointer:coarse) { .pinned-command-actions { opacity:.78; } }
|
|
360
|
-
.keybar-scroll { scrollbar-width:none; }
|
|
361
|
-
.keybar-scroll::-webkit-scrollbar { display:none; }
|
|
362
|
-
.tree-filter {
|
|
363
|
-
position: sticky;
|
|
364
|
-
top: 34px;
|
|
365
|
-
z-index: 2;
|
|
366
|
-
display: flex;
|
|
367
|
-
align-items: center;
|
|
368
|
-
gap: 6px;
|
|
369
|
-
margin: -1px -1px 7px;
|
|
370
|
-
padding: 7px 8px;
|
|
371
|
-
border-bottom: 1px solid var(--ui-tabbar-border, #25252e);
|
|
372
|
-
background: color-mix(in srgb, var(--ui-tree-bg, #121218) 97%, transparent);
|
|
373
|
-
color: var(--ui-history-meta, #666678);
|
|
374
|
-
backdrop-filter: blur(8px);
|
|
375
|
-
}
|
|
376
|
-
.tree-filter input {
|
|
377
|
-
flex: 1;
|
|
378
|
-
min-width: 0;
|
|
379
|
-
height: 27px;
|
|
380
|
-
border: 1px solid var(--ui-panel-input-border, #30303a);
|
|
381
|
-
border-radius: 6px;
|
|
382
|
-
outline: none;
|
|
383
|
-
padding: 0 8px;
|
|
384
|
-
background: var(--ui-panel-input-bg, #0f0f15);
|
|
385
|
-
color: var(--ui-panel-input-text, #d8d8df);
|
|
386
|
-
font-size: 11px;
|
|
387
|
-
}
|
|
388
|
-
.tree-filter input:focus { border-color: var(--ui-tab-accent, #536b9e); }
|
|
389
|
-
@media (max-width:768px), (pointer:coarse) {
|
|
390
|
-
.pinned-command-editor input, .history-search input, .tree-filter input { font-size:16px; }
|
|
391
|
-
.terminal-screen .xterm-helper-textarea { font-size:16px !important; }
|
|
392
|
-
}
|
|
393
|
-
.tree-filter button {
|
|
394
|
-
width: 25px;
|
|
395
|
-
height: 25px;
|
|
396
|
-
padding: 0;
|
|
397
|
-
border: 0;
|
|
398
|
-
border-radius: 5px;
|
|
399
|
-
background: var(--ui-tab-bg, #24242d);
|
|
400
|
-
color: var(--ui-connection-text, #9999a6);
|
|
401
|
-
font-size: 10px;
|
|
402
|
-
}
|
|
403
|
-
.tree-row {
|
|
404
|
-
display: flex;
|
|
405
|
-
align-items: center;
|
|
406
|
-
gap: 6px;
|
|
407
|
-
min-height: 31px;
|
|
408
|
-
padding-right: 7px;
|
|
409
|
-
border-radius: 6px;
|
|
410
|
-
font-size: 12px;
|
|
411
|
-
white-space: nowrap;
|
|
412
|
-
cursor: pointer;
|
|
413
|
-
}
|
|
414
|
-
.tree-disclosure {
|
|
415
|
-
width: 13px;
|
|
416
|
-
min-width: 13px;
|
|
417
|
-
height: 16px;
|
|
418
|
-
display: inline-flex;
|
|
419
|
-
align-items: center;
|
|
420
|
-
justify-content: center;
|
|
421
|
-
color: var(--ui-history-meta, #777785);
|
|
422
|
-
}
|
|
423
|
-
.tree-entry-icon {
|
|
424
|
-
width: 17px;
|
|
425
|
-
min-width: 17px;
|
|
426
|
-
height: 17px;
|
|
427
|
-
display: inline-flex;
|
|
428
|
-
align-items: center;
|
|
429
|
-
justify-content: center;
|
|
430
|
-
}
|
|
431
|
-
.tree-folder-icon { color: var(--ui-tab-accent, #7aa2f7); }
|
|
432
|
-
.tree-entry-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
433
|
-
.tree-spin { animation:tree-spin .8s linear infinite; }
|
|
434
|
-
@keyframes tree-spin { to { transform:rotate(360deg); } }
|
|
435
|
-
@media (prefers-reduced-motion: reduce) { .tree-spin { animation:none; } }
|
|
436
|
-
.tree-row[data-selected="1"] { background: color-mix(in srgb, var(--ui-tab-accent, #26304a) 24%, transparent); }
|
|
437
|
-
.tree-error { margin: 2px 8px 6px; padding: 7px 8px; border-left: 2px solid #f7768e; color: #f7768e; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
|
|
438
|
-
.tree-size { margin-left: auto; color: var(--ui-history-meta, #555); font-size: 10px; flex-shrink: 0; }
|
|
439
|
-
|
|
440
|
-
/* phone-first: terminal is THE screen */
|
|
441
|
-
.workspace { display: grid !important; grid-template-columns: 1fr; }
|
|
442
|
-
.workspace[hidden] { display:none !important; }
|
|
443
|
-
.tree-col {
|
|
444
|
-
display: flex;
|
|
445
|
-
position: fixed;
|
|
446
|
-
top: var(--vv-top, 0px);
|
|
447
|
-
height: var(--vv-height, 100dvh);
|
|
448
|
-
right: calc(100vw - var(--vv-left, 0px) - var(--vv-width, 100vw));
|
|
449
|
-
width: min(82vw, 320px); z-index: 40;
|
|
450
|
-
transform: translateX(102%); transition: transform .22s ease;
|
|
451
|
-
}
|
|
452
|
-
.tree-col-open { transform: translateX(0); box-shadow: -12px 0 32px rgba(0,0,0,.5); }
|
|
453
|
-
.drawer-mask { position:fixed; top:var(--vv-top, 0px); left:var(--vv-left, 0px); width:var(--vv-width, 100vw); height:var(--vv-height, 100dvh); background:rgba(0,0,0,.45); z-index:39; }
|
|
454
|
-
.preview-col {
|
|
455
|
-
position: fixed;
|
|
456
|
-
top: var(--vv-top, 0px);
|
|
457
|
-
left: var(--vv-left, 0px);
|
|
458
|
-
width: var(--vv-width, 100vw);
|
|
459
|
-
height: var(--vv-height, 100dvh);
|
|
460
|
-
z-index: 50;
|
|
461
|
-
background: var(--ui-term-col-bg, #101014);
|
|
462
|
-
}
|
|
463
|
-
.cwd-hint { max-width: 40vw; }
|
|
464
|
-
|
|
465
|
-
@media (min-width: 900px) {
|
|
466
|
-
.workspace.show-tree.has-preview { grid-template-columns: 46% 20% 34%; }
|
|
467
|
-
.workspace.show-tree:not(.has-preview) { grid-template-columns: 80% 20%; }
|
|
468
|
-
.workspace.has-preview:not(.show-tree) { grid-template-columns: 66% 34%; }
|
|
469
|
-
/* desktop: the tree becomes a right column only while the drawer is open */
|
|
470
|
-
.tree-col {
|
|
471
|
-
position: static; top: auto; height: auto; width: auto; transform: none;
|
|
472
|
-
box-shadow: none; border-left: 1px solid var(--ui-tree-border, #1e1e26);
|
|
473
|
-
}
|
|
474
|
-
.workspace:not(.show-tree) .tree-col { display: none; }
|
|
475
|
-
.preview-col { position: relative; inset: auto; width: auto; height: auto; border-left: 1px solid var(--ui-tree-border, #1e1e26); }
|
|
476
|
-
.drawer-mask { display: none; }
|
|
477
|
-
}
|
|
478
|
-
.web-root.is-remote-fullscreen .workspace { grid-template-columns: minmax(0, 1fr); }
|
|
479
|
-
`,xi=e=>e,UT=[xi({id:"pearl",label:"珍珠白",swatch:"#f5f6fa",preview:["#f5f6fa","#4f6ef7"],cssVars:{"--ui-color-scheme":"light","--ui-root-bg":"#f5f6fa","--ui-text":"#111827","--ui-tabbar-bg":"#eef0f6","--ui-tabbar-border":"#dfe3ee","--ui-tab-bg":"#e6e9f4","--ui-tab-text":"#5b6472","--ui-tab-active-bg":"#ffffff","--ui-tab-active-text":"#111827","--ui-tab-accent":"#4f6ef7","--ui-connection-bg":"#eef0f6","--ui-connection-text":"#9ca3af","--ui-tree-bg":"#fbfcfe","--ui-tree-border":"#e5e8f0","--ui-term-col-bg":"#f5f6fa","--ui-fab-bg":"#ffffff","--ui-fab-border":"#d8dcea","--ui-muted-surface":"#eef0f6","--ui-muted-border":"#d8dcea","--ui-muted-text":"#6b7280","--ui-panel-input-bg":"#ffffff","--ui-panel-input-text":"#111827","--ui-panel-input-border":"#d8dcea","--ui-drawer-tab-text":"#6b7280","--ui-drawer-tab-active":"#111827","--ui-history-item-text":"#1f2937","--ui-history-meta":"#9ca3af","--ui-success":"#059669","--ui-error":"#dc2626"},termHostBg:"#ffffff",keybar:{bg:"#eef0f6",border:"#dfe3ee",keyBg:"#ffffff",keyBorder:"#d8dcea",keyText:"#4b5563",accent:"#4f6ef7",accentText:"#ffffff",drag:"#a5b4fc"},xterm:{background:"#ffffff",foreground:"#1f2937",cursor:"#4f6ef7",selectionBackground:"#c7d2fe",black:"#24292e",red:"#d73a49",green:"#22863a",yellow:"#b08800",blue:"#005cc5",magenta:"#6f42c1",cyan:"#1b7c83",white:"#6a737d",brightBlack:"#959da5",brightWhite:"#fafbfc"}}),xi({id:"scifi",label:"科幻霓虹",swatch:"#050a14",preview:["#050a14","#22d3ee"],cssVars:{"--ui-color-scheme":"dark","--ui-root-bg":"#050a14","--ui-text":"#e2f3ff","--ui-tabbar-bg":"#0a1220","--ui-tabbar-border":"#10263c","--ui-tab-bg":"#0d1626","--ui-tab-text":"#5c7893","--ui-tab-active-bg":"#122036","--ui-tab-active-text":"#e2f3ff","--ui-tab-accent":"#22d3ee","--ui-connection-bg":"#0a1220","--ui-connection-text":"#5c7893","--ui-tree-bg":"#0d1626","--ui-tree-border":"#10263c","--ui-term-col-bg":"#050a14","--ui-fab-bg":"#122036","--ui-fab-border":"#155e75","--ui-muted-surface":"#0d1626","--ui-muted-border":"#164e63","--ui-muted-text":"#9fb8d0","--ui-panel-input-bg":"#0a1220","--ui-panel-input-text":"#e2f3ff","--ui-panel-input-border":"#164e63","--ui-drawer-tab-text":"#5c7893","--ui-drawer-tab-active":"#e2f3ff","--ui-history-item-text":"#d5ecfb","--ui-history-meta":"#5c7893","--ui-success":"#34d399","--ui-error":"#fb7185"},termHostBg:"#0a1220",keybar:{bg:"#0a1220",border:"#10263c",keyBg:"#0d1626",keyBorder:"#164e63",keyText:"#9fb8d0",accent:"#22d3ee",accentText:"#04121a",drag:"#155e75"},xterm:{background:"#0a1220",foreground:"#e2f3ff",cursor:"#22d3ee",selectionBackground:"#164e63",black:"#0d1626",red:"#fb7185",green:"#34d399",yellow:"#fbbf24",blue:"#38bdf8",magenta:"#e879f9",cyan:"#22d3ee",white:"#e2f3ff",brightBlack:"#5c7893",brightWhite:"#ffffff"}}),xi({id:"noir",label:"暗夜黑",swatch:"#0f1115",preview:["#0f1115","#a78bfa"],cssVars:{"--ui-color-scheme":"dark","--ui-root-bg":"#0f1115","--ui-text":"#eceff4","--ui-tabbar-bg":"#14171d","--ui-tabbar-border":"#232833","--ui-tab-bg":"#191d24","--ui-tab-text":"#6b7280","--ui-tab-active-bg":"#1f242d","--ui-tab-active-text":"#eceff4","--ui-tab-accent":"#a78bfa","--ui-connection-bg":"#14171d","--ui-connection-text":"#6b7280","--ui-tree-bg":"#191d24","--ui-tree-border":"#232833","--ui-term-col-bg":"#0f1115","--ui-fab-bg":"#1f242d","--ui-fab-border":"#2a3040","--ui-muted-surface":"#191d24","--ui-muted-border":"#2a3040","--ui-muted-text":"#aab2bf","--ui-panel-input-bg":"#14171d","--ui-panel-input-text":"#eceff4","--ui-panel-input-border":"#2a3040","--ui-drawer-tab-text":"#6b7280","--ui-drawer-tab-active":"#eceff4","--ui-history-item-text":"#d7dce4","--ui-history-meta":"#6b7280","--ui-success":"#4ade80","--ui-error":"#f87171"},termHostBg:"#14171d",keybar:{bg:"#14171d",border:"#232833",keyBg:"#191d24",keyBorder:"#2a3040",keyText:"#aab2bf",accent:"#a78bfa",accentText:"#0f1115",drag:"#4b4470"},xterm:{background:"#14171d",foreground:"#eceff4",cursor:"#a78bfa",selectionBackground:"#3b3654",black:"#191d24",red:"#f87171",green:"#4ade80",yellow:"#fbbf24",blue:"#60a5fa",magenta:"#c084fc",cyan:"#67e8f9",white:"#eceff4",brightBlack:"#6b7280",brightWhite:"#ffffff"}}),xi({id:"mist",label:"雾白靛蓝",swatch:"#f7f8fb",preview:["#f7f8fb","#4258c4"],cssVars:{"--ui-color-scheme":"light","--ui-root-bg":"#f7f8fb","--ui-text":"#252d3d","--ui-tabbar-bg":"#e4e9f2","--ui-tabbar-border":"#dce3ef","--ui-tab-bg":"#e9edf5","--ui-tab-text":"#5b687f","--ui-tab-active-bg":"#f7f8fb","--ui-tab-active-text":"#252d3d","--ui-tab-accent":"#4258c4","--ui-connection-bg":"#e4e9f2","--ui-connection-text":"#5b687f","--ui-tree-bg":"#e9edf5","--ui-tree-border":"#dce3ef","--ui-term-col-bg":"#f7f8fb","--ui-fab-bg":"#ffffff","--ui-fab-border":"#dce3ef","--ui-muted-surface":"#e9edf5","--ui-muted-border":"#dce3ef","--ui-muted-text":"#5b687f","--ui-panel-input-bg":"#ffffff","--ui-panel-input-text":"#252d3d","--ui-panel-input-border":"#dce3ef","--ui-drawer-tab-text":"#5b687f","--ui-drawer-tab-active":"#252d3d","--ui-history-item-text":"#252d3d","--ui-history-meta":"#5b687f","--ui-success":"#247860","--ui-error":"#be3d50"},termHostBg:"#ffffff",keybar:{bg:"#e4e9f2",border:"#dce3ef",keyBg:"#ffffff",keyBorder:"#dce3ef",keyText:"#5b687f",accent:"#4258c4",accentText:"#ffffff",drag:"#8a9ac5"},xterm:{background:"#ffffff",foreground:"#252d3d",cursor:"#4258c4",selectionBackground:"#d6dcf4",black:"#252d3d",red:"#be3d50",green:"#247860",yellow:"#956018",blue:"#346faa",magenta:"#7456a6",cyan:"#277784",white:"#5b687f",brightBlack:"#5b687f",brightWhite:"#f7f8fb"}}),xi({id:"glass",label:"毛玻璃",swatch:"#c3dbee",preview:["#c3dbee","#357b88"],cssVars:{"--ui-color-scheme":"light","--ui-root-bg":"#edf3f4","--ui-text":"#263e48","--ui-tabbar-bg":"#e0ebee","--ui-tabbar-border":"#d3e1e5","--ui-tab-bg":"#e5eef1","--ui-tab-text":"#58727c","--ui-tab-active-bg":"#edf3f4","--ui-tab-active-text":"#263e48","--ui-tab-accent":"#357b88","--ui-connection-bg":"#e0ebee","--ui-connection-text":"#58727c","--ui-tree-bg":"#e5eef1","--ui-tree-border":"#d3e1e5","--ui-term-col-bg":"#edf3f4","--ui-fab-bg":"#ffffff","--ui-fab-border":"#d3e1e5","--ui-muted-surface":"#e5eef1","--ui-muted-border":"#d3e1e5","--ui-muted-text":"#58727c","--ui-panel-input-bg":"#ffffff","--ui-panel-input-text":"#263e48","--ui-panel-input-border":"#d3e1e5","--ui-drawer-tab-text":"#58727c","--ui-drawer-tab-active":"#263e48","--ui-history-item-text":"#263e48","--ui-history-meta":"#58727c","--ui-success":"#247860","--ui-error":"#be3d50"},termHostBg:"#ffffff",keybar:{bg:"#e0ebee",border:"#d3e1e5",keyBg:"#ffffff",keyBorder:"#d3e1e5",keyText:"#58727c",accent:"#357b88",accentText:"#ffffff",drag:"#8a9ac5"},xterm:{background:"#ffffff",foreground:"#263e48",cursor:"#357b88",selectionBackground:"#d6dcf4",black:"#263e48",red:"#be3d50",green:"#247860",yellow:"#956018",blue:"#346faa",magenta:"#7456a6",cyan:"#277784",white:"#58727c",brightBlack:"#58727c",brightWhite:"#edf3f4"}}),xi({id:"pine",label:"暖灰松绿",swatch:"#f6f7f3",preview:["#f6f7f3","#356c55"],cssVars:{"--ui-color-scheme":"light","--ui-root-bg":"#f6f7f3","--ui-text":"#2d382f","--ui-tabbar-bg":"#e2e7df","--ui-tabbar-border":"#d9e1d6","--ui-tab-bg":"#e8ece5","--ui-tab-text":"#5b6e61","--ui-tab-active-bg":"#f6f7f3","--ui-tab-active-text":"#2d382f","--ui-tab-accent":"#356c55","--ui-connection-bg":"#e2e7df","--ui-connection-text":"#5b6e61","--ui-tree-bg":"#e8ece5","--ui-tree-border":"#d9e1d6","--ui-term-col-bg":"#f6f7f3","--ui-fab-bg":"#ffffff","--ui-fab-border":"#d9e1d6","--ui-muted-surface":"#e8ece5","--ui-muted-border":"#d9e1d6","--ui-muted-text":"#5b6e61","--ui-panel-input-bg":"#ffffff","--ui-panel-input-text":"#2d382f","--ui-panel-input-border":"#d9e1d6","--ui-drawer-tab-text":"#5b6e61","--ui-drawer-tab-active":"#2d382f","--ui-history-item-text":"#2d382f","--ui-history-meta":"#5b6e61","--ui-success":"#357450","--ui-error":"#b6454d"},termHostBg:"#ffffff",keybar:{bg:"#e2e7df",border:"#d9e1d6",keyBg:"#ffffff",keyBorder:"#d9e1d6",keyText:"#5b6e61",accent:"#356c55",accentText:"#ffffff",drag:"#86a38b"},xterm:{background:"#ffffff",foreground:"#2d382f",cursor:"#356c55",selectionBackground:"#d4e1d9",black:"#2d382f",red:"#b6454d",green:"#357450",yellow:"#8c641e",blue:"#3d7189",magenta:"#805e88",cyan:"#317c74",white:"#5b6e61",brightBlack:"#5b6e61",brightWhite:"#f6f7f3"}}),xi({id:"graphite",label:"石墨夜色",swatch:"#202630",preview:["#202630","#a4bad2"],cssVars:{"--ui-color-scheme":"dark","--ui-root-bg":"#202630","--ui-text":"#e4ebf4","--ui-tabbar-bg":"#161c25","--ui-tabbar-border":"#384859","--ui-tab-bg":"#161c25","--ui-tab-text":"#b0bfd3","--ui-tab-active-bg":"#202630","--ui-tab-active-text":"#e4ebf4","--ui-tab-accent":"color-mix(in srgb, #386a9a 40%, #ecf0f8)","--ui-connection-bg":"#161c25","--ui-connection-text":"#b0bfd3","--ui-tree-bg":"#161c25","--ui-tree-border":"#384859","--ui-term-col-bg":"#202630","--ui-fab-bg":"#293440","--ui-fab-border":"#384859","--ui-muted-surface":"#161c25","--ui-muted-border":"#384859","--ui-muted-text":"#b0bfd3","--ui-panel-input-bg":"#293440","--ui-panel-input-text":"#e4ebf4","--ui-panel-input-border":"#384859","--ui-drawer-tab-text":"#b0bfd3","--ui-drawer-tab-active":"#e4ebf4","--ui-history-item-text":"#e4ebf4","--ui-history-meta":"#b0bfd3","--ui-success":"#89d3af","--ui-error":"#f097a2"},termHostBg:"#202630",keybar:{bg:"#161c25",border:"#384859",keyBg:"#293440",keyBorder:"#384859",keyText:"#b0bfd3",accent:"#a4bad2",accentText:"#14212b",drag:"#61778c"},xterm:{background:"#202630",foreground:"#e4ebf4",cursor:"#a4bad2",selectionBackground:"#2a3e53",black:"#161c25",red:"#f097a2",green:"#89d3af",yellow:"#e5c58a",blue:"#9accf0",magenta:"#c4b3e1",cyan:"#91cfd6",white:"#e4ebf4",brightBlack:"#b0bfd3",brightWhite:"#ffffff"}})],jT="pearl",al=Object.fromEntries(UT.map(e=>[e.id,e])),WT={dark:"noir",black:"noir",gray:"noir",blue:"noir",red:"noir",yellow:"noir",green:"noir",white:"pearl"};function zT(e){if(e&&e in al)return al[e];const t=e?WT[e]:void 0;return t?al[t]:al[jT]}const U0={"customer-agent":"Customer Agent",codex:"Codex","claude-code":"Claude Code",opencode:"OpenCode","deepseek-harness":"DeepSeek Harness",qoder:"Qoder",zcode:"ZCode",workbuddy:"WorkBuddy"},$T=[{prompt:"带我熟悉这个项目",Icon:yT},{prompt:"帮我排查一个问题",Icon:kT},{prompt:"一起实现一个新想法",Icon:ST}];function VT(e){return e>=5&&e<9?{title:"早啊。",prompt:"新的一天,想做点什么?"}:e>=9&&e<12?{title:"上午好。",prompt:"今天想一起做点什么?"}:e>=12&&e<14?{title:"中午好。",prompt:"想趁午休推进点什么?"}:e>=14&&e<18?{title:"下午好。",prompt:"这个下午,想做点什么?"}:e>=18&&e<23?{title:"晚上好。",prompt:"今晚想一起做点什么?"}:{title:"夜深了。",prompt:"注意休息,重要的事可以先留给我。"}}function HT({agentType:e,ready:t,connectionRequired:n=!1,now:o,onSelectPrompt:c}){const f=U0[e],g=VT((o??new Date).getHours());return P.jsxs("section",{className:"empty-session-welcome","aria-labelledby":"empty-session-welcome-title",children:[P.jsxs("div",{className:"empty-session-welcome__core","aria-hidden":"true",children:[P.jsx("span",{className:"empty-session-welcome__glow"}),P.jsxs("svg",{viewBox:"0 0 120 120",role:"presentation",children:[P.jsx("circle",{className:"empty-session-welcome__orbit empty-session-welcome__orbit--outer",cx:"60",cy:"60",r:"44"}),P.jsx("circle",{className:"empty-session-welcome__orbit empty-session-welcome__orbit--inner",cx:"60",cy:"60",r:"33"}),P.jsx("rect",{className:"empty-session-welcome__diamond",x:"43",y:"43",width:"34",height:"34",rx:"2"}),P.jsx("circle",{className:"empty-session-welcome__pulse",cx:"60",cy:"60",r:"3"})]})]}),P.jsxs("div",{className:"empty-session-welcome__copy",children:[P.jsx("p",{className:"empty-session-welcome__status",children:n?`${f} · 等待连接`:t?`${f} · 已准备好`:`${f} · 等待配置`}),P.jsx("h2",{id:"empty-session-welcome-title",children:g.title}),P.jsx("p",{className:"empty-session-welcome__prompt",children:n?"扫码连接电脑后,就能开始。":t?g.prompt:"配置好 API Key 后,我就能开始。"})]}),P.jsx("div",{className:"empty-session-welcome__starters","aria-label":"开始一个任务",children:$T.map(({prompt:x,Icon:w})=>P.jsxs("button",{type:"button","data-prompt":x,disabled:!t,onClick:()=>c(x),children:[P.jsx(w,{size:16,strokeWidth:1.8,"aria-hidden":"true"}),P.jsx("span",{children:x})]},x))})]})}const GT={qoder:{src:new URL(""+new URL("qoder-CGHn7M84.png",import.meta.url).href,import.meta.url).href,viewBox:"14 14 100 100"},zcode:{src:new URL(""+new URL("zcode-CsXrmDtX.png",import.meta.url).href,import.meta.url).href,viewBox:"12 12 104 104"},workbuddy:{src:new URL(""+new URL("workbuddy-hEyEE8dU.png",import.meta.url).href,import.meta.url).href,viewBox:"13 13 102 102"}},XT="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z",YT="M75.91 73.628V62.232c0-.96.36-1.68 1.199-2.16l22.912-13.194c3.119-1.8 6.838-2.639 10.676-2.639 14.394 0 23.511 11.157 23.511 23.032 0 .839 0 1.799-.12 2.758l-23.752-13.914c-1.439-.84-2.879-.84-4.318 0L75.91 73.627Zm53.499 44.383v-27.23c0-1.68-.72-2.88-2.159-3.719L97.142 69.55l9.836-5.638c.839-.48 1.559-.48 2.399 0l22.912 13.195c6.598 3.839 11.035 11.995 11.035 19.912 0 9.116-5.397 17.513-13.915 20.992v.001Zm-60.577-23.99-9.836-5.758c-.84-.48-1.2-1.2-1.2-2.16v-26.39c0-12.834 9.837-22.55 23.152-22.55 5.039 0 9.716 1.679 13.676 4.678L70.993 55.516c-1.44.84-2.16 2.039-2.16 3.719v34.787-.002Zm21.173 12.234L75.91 98.339V81.546l14.095-7.917 14.094 7.917v16.793l-14.094 7.916Zm9.056 36.467c-5.038 0-9.716-1.68-13.675-4.678l23.631-13.676c1.439-.839 2.159-2.038 2.159-3.718V85.863l9.956 5.757c.84.48 1.2 1.2 1.2 2.16v26.389c0 12.835-9.957 22.552-23.27 22.552v.001Zm-28.43-26.75L47.72 102.778c-6.599-3.84-11.036-11.996-11.036-19.913 0-9.236 5.518-17.513 14.034-20.992v27.35c0 1.68.72 2.879 2.16 3.718l29.989 17.393-9.837 5.638c-.84.48-1.56.48-2.399 0Zm-1.318 19.673c-13.555 0-23.512-10.196-23.512-22.792 0-.959.12-1.919.24-2.879l23.63 13.675c1.44.84 2.88.84 4.32 0l30.108-17.392v11.395c0 .96-.361 1.68-1.2 2.16l-22.912 13.194c-3.119 1.8-6.837 2.639-10.675 2.639Zm29.748 14.274c14.515 0 26.63-10.316 29.39-23.991 13.434-3.479 22.071-16.074 22.071-28.91 0-8.396-3.598-16.553-10.076-22.43.6-2.52.96-5.039.96-7.557 0-17.153-13.915-29.99-29.989-29.99-3.239 0-6.358.48-9.477 1.56-5.398-5.278-12.835-8.637-20.992-8.637-14.515 0-26.63 10.316-29.39 23.991-13.434 3.48-22.07 16.074-22.07 28.91 0 8.396 3.598 16.553 10.075 22.431-.6 2.519-.96 5.038-.96 7.556 0 17.154 13.915 29.989 29.99 29.989 3.238 0 6.357-.479 9.476-1.559 5.397 5.278 12.835 8.637 20.992 8.637Z";function KT({agentType:e,size:t=16,className:n}){const o=GT[e];return o?P.jsx("svg",{className:n,"data-agent-icon":e,width:t,height:t,viewBox:o.viewBox,"aria-hidden":"true",children:P.jsx("image",{href:o.src,width:"128",height:"128"})}):e==="customer-agent"?P.jsxs("svg",{className:n,"data-agent-icon":e,width:t,height:t,viewBox:"50 48 180 180",fill:"none","aria-hidden":"true",children:[P.jsx("path",{d:"M76 187V90Q76 74 92 74H188Q204 74 204 90V187",stroke:"currentColor",strokeWidth:"18",strokeLinecap:"round"}),P.jsx("path",{d:"m108 116 26 24-26 24m47 0h22M100 207h80",stroke:"currentColor",strokeWidth:"14",strokeLinecap:"round",strokeLinejoin:"round"}),P.jsx("circle",{cx:"204",cy:"207",r:"11",fill:"currentColor"})]}):e==="codex"?P.jsx("svg",{className:n,"data-agent-icon":e,width:t,height:t,viewBox:"29.487 29.964 121.035 119.954","aria-hidden":"true",children:P.jsx("path",{fill:"currentColor",d:YT})}):e==="claude-code"?P.jsx("svg",{className:n,"data-agent-icon":e,width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:P.jsx("path",{fill:"currentColor",d:XT})}):e==="deepseek-harness"?P.jsx("svg",{className:n,"data-agent-icon":e,width:t,height:t,viewBox:"0 0 50 50","aria-hidden":"true",children:P.jsx("path",{fill:"currentColor",d:"M48.8354 10.0479C48.3232 9.79199 48.1025 10.2798 47.8032 10.5278C47.7007 10.6079 47.6143 10.7119 47.5273 10.8076C46.7793 11.624 45.9048 12.1597 44.7622 12.0957C43.0923 12 41.666 12.5356 40.4058 13.8398C40.1377 12.2319 39.2476 11.272 37.8926 10.6558C37.1836 10.3359 36.4668 10.0156 35.9702 9.31982C35.6235 8.82373 35.5293 8.27197 35.356 7.72754C35.2456 7.3999 35.1353 7.06396 34.7651 7.00781C34.3633 6.94385 34.2056 7.2876 34.0479 7.57568C33.418 8.75195 33.1733 10.0479 33.1973 11.3599C33.2524 14.312 34.4736 16.6641 36.8999 18.3359C37.1758 18.5278 37.2466 18.7197 37.1597 19C36.9946 19.5757 36.7974 20.1357 36.624 20.7119C36.5137 21.0801 36.3486 21.1597 35.9624 21C34.6309 20.4321 33.481 19.5918 32.4644 18.5757C30.7393 16.8721 29.1792 14.9917 27.2334 13.52C26.7764 13.1758 26.3193 12.856 25.8467 12.5518C23.8618 10.584 26.1069 8.96777 26.627 8.77588C27.1704 8.57568 26.8159 7.8877 25.0591 7.896C23.3022 7.90381 21.6953 8.50391 19.647 9.30371C19.3477 9.42383 19.0322 9.51172 18.7095 9.58398C16.8501 9.22363 14.9199 9.14355 12.9033 9.37598C9.10596 9.80762 6.07275 11.6396 3.84326 14.7681C1.16455 18.5278 0.53418 22.7998 1.30664 27.2559C2.11768 31.9521 4.46582 35.8398 8.07373 38.8799C11.8159 42.0322 16.1255 43.5762 21.041 43.2803C24.0269 43.104 27.3516 42.6963 31.1016 39.4561C32.0469 39.936 33.0396 40.1279 34.686 40.272C35.9546 40.3921 37.1758 40.208 38.1211 40.0078C39.6021 39.688 39.4995 38.2881 38.9639 38.0322C34.623 35.9678 35.5762 36.8081 34.71 36.1279C36.9155 33.4639 40.2402 30.6958 41.54 21.728C41.6426 21.0161 41.5557 20.5679 41.54 19.9917C41.5322 19.6396 41.6108 19.5039 42.0049 19.4639C43.0923 19.3359 44.1479 19.0317 45.1167 18.4878C47.9292 16.9199 49.064 14.3438 49.3315 11.2559C49.3711 10.7837 49.3237 10.2959 48.8354 10.0479ZM24.3262 37.8398C20.1196 34.4639 18.0791 33.3521 17.2358 33.3999C16.4482 33.4482 16.5898 34.3682 16.7632 34.9678C16.9443 35.5601 17.1812 35.9683 17.5117 36.4878C17.7402 36.832 17.8979 37.3442 17.2832 37.728C15.9282 38.584 13.5728 37.4399 13.4624 37.3838C10.7207 35.7358 8.42822 33.5601 6.81348 30.584C5.25342 27.7197 4.34766 24.6479 4.19775 21.3677C4.1582 20.5757 4.38672 20.2959 5.15869 20.1519C6.17529 19.96 7.22314 19.9199 8.23926 20.0718C12.5327 20.7119 16.1885 22.6719 19.2529 25.7759C21.002 27.5439 22.3252 29.6558 23.6885 31.7202C25.1377 33.9121 26.6978 36 28.6831 37.7119C29.3843 38.312 29.9434 38.7681 30.479 39.104C28.8643 39.2881 26.1699 39.3281 24.3262 37.8398ZM26.3433 24.6001C26.3433 24.248 26.6191 23.9678 26.9658 23.9678C27.0444 23.9678 27.1152 23.9839 27.1782 24.0078C27.2651 24.04 27.3438 24.0879 27.4067 24.1602C27.5171 24.272 27.5801 24.4321 27.5801 24.6001C27.5801 24.9521 27.3042 25.2319 26.9575 25.2319C26.6108 25.2319 26.3433 24.9521 26.3433 24.6001ZM32.6064 27.8799C32.2046 28.0479 31.8027 28.1919 31.4165 28.208C30.8179 28.2397 30.1641 27.9922 29.8096 27.688C29.2583 27.2158 28.8643 26.9521 28.6987 26.1279C28.6279 25.7759 28.6675 25.2319 28.7305 24.9199C28.8721 24.248 28.7144 23.8159 28.2495 23.4238C27.8716 23.104 27.3911 23.0161 26.8633 23.0161C26.666 23.0161 26.4849 22.9277 26.3511 22.856C26.1304 22.7441 25.9492 22.4639 26.1226 22.1201C26.1777 22.0078 26.4458 21.7358 26.5088 21.688C27.2256 21.272 28.0527 21.4077 28.8169 21.7197C29.5259 22.0161 30.0615 22.5601 30.834 23.3281C31.6216 24.2559 31.7632 24.5117 32.2124 25.208C32.5669 25.752 32.8901 26.312 33.1104 26.9521C33.2446 27.3521 33.0713 27.6802 32.6064 27.8799Z"})}):P.jsx("svg",{className:n,"data-agent-icon":e,width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:P.jsx("path",{fill:"currentColor",d:"M22 24H2V0h20zM17 4.8H7v14.4h10z",fillRule:"evenodd"})})}const j0=["customer-agent","codex","claude-code","opencode","deepseek-harness","qoder","zcode","workbuddy"];j0.filter(e=>e!=="customer-agent");function ZT(e){return typeof e=="string"&&j0.some(t=>t===e)}function v_(e){return ZT(e)&&e!=="customer-agent"}function QT(e,t){const n=t.find(c=>c.agentType===e);if(n!=null&&n.available||e==="customer-agent"&&!n)return;const o=U0[e];return n?/not installed|not found|ENOENT|未安装|找不到/i.test(n.error??"")?`远程未安装 ${o}`:`远程 ${o} 暂不可用`:`正在检查远程 ${o},请稍后重试`}const qT=j0.map(e=>({agentType:e,label:U0[e]}));function JT({value:e,health:t,onChange:n,onUnavailable:o,vertical:c=!1,onPreview:f}){const g=me.useRef(null),[x,w]=me.useState(!1);return me.useEffect(()=>{if(c)return;const m=g.current,C=()=>{const S=m==null?void 0:m.querySelector('[aria-selected="true"]');if(!m||!S)return;const _=S.offsetLeft;_<m.scrollLeft?m.scrollTo({left:_,behavior:"smooth"}):_+S.offsetWidth>m.scrollLeft+m.clientWidth&&m.scrollTo({left:_+S.offsetWidth-m.clientWidth,behavior:"smooth"})};C();const y=typeof ResizeObserver>"u"?null:new ResizeObserver(C);return m&&(y==null||y.observe(m)),()=>y==null?void 0:y.disconnect()},[e,c]),P.jsxs("div",{className:`agent-workspace-switcher${c?" is-vertical":""}`,children:[P.jsx("div",{ref:g,className:"agent-workspace-track",role:"tablist","aria-label":"切换 Agent","aria-orientation":c?"vertical":"horizontal",onScroll:m=>w(m.currentTarget.scrollLeft>1),children:qT.map(m=>{const C=QT(m.agentType,t),y=C!==void 0;return P.jsx("button",{type:"button",role:"tab","aria-selected":e===m.agentType,"aria-label":m.label,"aria-disabled":y,title:y?C:m.label,className:[e===m.agentType?"is-active":"",y?"is-unavailable":""].filter(Boolean).join(" "),onPointerEnter:S=>f==null?void 0:f(m.agentType,m.label,S.currentTarget.getBoundingClientRect(),y?C:void 0),onFocus:S=>f==null?void 0:f(m.agentType,m.label,S.currentTarget.getBoundingClientRect(),y?C:void 0),onClick:()=>{if(y){o(C);return}n(m.agentType)},children:P.jsx(KT,{agentType:m.agentType,size:22})},m.agentType)})}),P.jsx("button",{type:"button",className:"agent-workspace-more","aria-label":x?"前面的 Agent":"更多 Agent",title:`${x?"前面的 Agent":"更多 Agent"} · 手机可左右滑动`,onClick:()=>{const m=g.current;if(!m)return;const C=m.scrollWidth-m.clientWidth;m.scrollTo({left:x?0:C,behavior:"smooth"})},children:x?P.jsx(Dv,{size:20,strokeWidth:1.8,"aria-hidden":"true"}):P.jsx(Mv,{size:20,strokeWidth:1.8,"aria-hidden":"true"})})]})}const eR="请点击扫码按钮扫码",tR=[["刷新页面",Pv],["打开群聊看板",OT],["打开远程桌面",TT],["打开 AI Hub",AT],["打开数字人",kv],["皮肤",RT],["打开我的文件",_T]];function rR({onScan:e,initialFailure:t=""}){const[n,o]=me.useState(!1),[c,f]=me.useState(t),[g,x]=me.useState(!1),w=me.useRef();me.useEffect(()=>{const _=setTimeout(()=>x(!0),650);return()=>{clearTimeout(_),clearTimeout(w.current)}},[]);const m=()=>{f(eR),clearTimeout(w.current),w.current=setTimeout(()=>f(""),3e3)},C=_=>{_.target.closest("[data-pairing-action]")||(_.preventDefault(),_.stopPropagation(),m())},y=async()=>{if(!n){clearTimeout(w.current),o(!0),f("");try{await e()}catch(_){f(_ instanceof Error?_.message:"扫码连接失败,请重试。")}finally{o(!1)}}},S=zT("pearl");return P.jsxs("div",{className:"web-root unpaired-home",style:S.cssVars,onClickCapture:C,onKeyDownCapture:_=>{(_.key==="Enter"||_.key===" ")&&C(_)},children:[P.jsx("style",{dangerouslySetInnerHTML:{__html:FT}}),P.jsxs("div",{className:"terminal-tabs",children:[P.jsx("div",{className:"terminal-tab-list",children:P.jsx("div",{className:"terminal-tab active",role:"tab","aria-disabled":"true",children:P.jsx("span",{children:"智能助手"})})}),P.jsx("button",{type:"button",className:"terminal-add","aria-label":"新建终端页签","aria-disabled":"true",children:"+"}),P.jsx("div",{className:"terminal-connection",children:P.jsx(LT,{items:tR.map(([_,k])=>({id:_,content:P.jsx("button",{type:"button",className:"file-drawer-toggle","aria-label":_,"aria-disabled":"true",children:P.jsx(k,{size:17})})})),avatar:P.jsxs("button",{type:"button","data-pairing-action":!0,className:"unpaired-scan","aria-label":"扫码连接电脑",title:"扫码连接电脑",disabled:n,onClick:()=>void y(),children:[P.jsx(ET,{size:19}),P.jsx("span",{children:n?"连接中":"扫码"})]})})})]}),P.jsxs("main",{className:"unpaired-workspace","aria-label":"尚未连接电脑的工作区",children:[P.jsxs("header",{className:"unpaired-workspace-header",children:[P.jsx("button",{type:"button",className:"ui-icon-button","aria-label":"会话列表","aria-disabled":"true",children:P.jsx(IT,{size:18})}),P.jsx("span",{children:"智能助手"}),P.jsx("button",{type:"button",className:"ui-icon-button","aria-label":"返回","aria-disabled":"true",children:P.jsx(CT,{size:17})})]}),P.jsx("div",{className:"unpaired-agent-switcher",children:P.jsx(JT,{value:"codex",health:[],onChange:m,onUnavailable:m})}),P.jsx("div",{className:"unpaired-welcome",children:P.jsx(HT,{agentType:"codex",ready:!0,connectionRequired:!0,onSelectPrompt:m})}),P.jsxs("div",{className:"unpaired-composer",children:[P.jsx("span",{children:"发送消息…"}),P.jsxs("div",{children:[P.jsx("button",{type:"button",className:"ui-icon-button","aria-label":"添加附件","aria-disabled":"true",children:P.jsx(NT,{size:19})}),P.jsx("button",{type:"button",className:"ui-icon-button","aria-label":"发送消息","aria-disabled":"true",children:P.jsx(vT,{size:19})})]})]})]}),c&&P.jsx("p",{className:"unpaired-notice",role:"alert",children:c}),P.jsx(F0,{ready:g})]})}let cn=null;function nR(e){cn=e}function y_(){return cn}function iR(){return(cn==null?void 0:cn.origin)??location.origin}function E_(e){return(cn==null?void 0:cn.frameUrl(e))??e}function b_(e){return cn?new URL(e,cn.origin).href:e}function C_(){const e=new URL("/ws",iR());return e.protocol=e.protocol==="https:"?"wss:":"ws:",e.href}const Bv="agentroam.computers.v1",Fv=20,sR=/^[A-Za-z0-9_-]{43}$/;function Uv(e){try{if(typeof e!="string"||e.length>8192)throw new Error;const t=new URL(e.trim().replace(/[,。]+$/,""));if(!["http:","https:"].includes(t.protocol)||t.username||t.password)throw new Error;return t.href}catch{throw new Error("请填写有效的 http(s) 页面地址。")}}function oR(e){if(!Array.isArray(e)||e.length>20)return[];const t=new Map;for(const n of e)if(!(!n||typeof n.id!="string"||!/^[A-Za-z0-9_-]{1,80}$/.test(n.id)||typeof n.name!="string"||!n.name.trim()||!["current","new-tab"].includes(n.openMode)))try{t.set(n.id,{id:n.id,name:n.name.trim().slice(0,60),url:Uv(n.url),openMode:n.openMode})}catch{}return[...t.values()]}function A_(e){try{const t=new URL(Uv(e)).hostname;return t==="qoder.com"||t.endsWith(".qoder.com")?"new-tab":"current"}catch{return"current"}}function Kc(e){try{const t=new URL(e);return!["http:","https:"].includes(t.protocol)||t.username||t.password||t.pathname!=="/"||t.search||t.hash?null:t.origin}catch{return null}}function Zc(e){if(!Array.isArray(e)||e.length>Fv)return[];const t=new Map;for(const n of e){const o=n&&typeof n.origin=="string"?Kc(n.origin):null;if(!o||typeof n.name!="string")continue;const c=n.name.trim().slice(0,60)||new URL(o).hostname,f=oR(n.pages);t.set(o,{origin:o,name:c,...n.pagesMigrated===!0?{pagesMigrated:!0}:Array.isArray(n.pages)?{pages:f}:{}})}return[...t.values()]}function jv(e=localStorage){try{return Zc(JSON.parse(e.getItem(Bv)||"[]"))}catch{return[]}}function aR(...e){const t=new Map;for(const n of e)for(const o of Zc(n)){const f={...t.get(o.origin),...o};f.pagesMigrated&&delete f.pages,t.set(o.origin,f)}if(t.size>Fv)throw new Error("最多可添加 20 台电脑。");return[...t.values()]}function lR(e,t=localStorage){const n=Zc(e);try{t.setItem(Bv,JSON.stringify(n))}catch{throw new Error("浏览器无法保存电脑列表,请检查浏览器存储设置。")}return n}function cR(e,t,n=jv()){var f;const o=Kc(e);if(!o)throw new Error("电脑地址无效。");const c=n.find(g=>g.origin===o);return aR(n,[{origin:o,name:(c==null?void 0:c.name)||new URL(o).hostname,...(f=c==null?void 0:c.pages)!=null&&f.length?{pages:c.pages}:{}}])}function uR(e){try{if(typeof e!="string"||e.length>2048)throw new Error;if(e=e.trim(),e.startsWith("{")){const n=JSON.parse(e),o=Kc(n.server);if(n.type!=="agentroam-pair"||n.version!==1||!o||!sR.test(n.grant))throw new Error;e=o+"/pair#pair="+n.grant}const t=new URL(e);if(!["http:","https:"].includes(t.protocol)||t.username||t.password||t.pathname!=="/pair"||t.search||!/^#pair=[A-Za-z0-9_-]{43}$/.test(t.hash))throw new Error;return t}catch{throw new Error("这不是 AgentRoam 授权二维码,请在电脑上重新生成。")}}function Wv(e,t,n=""){const o=new URLSearchParams(e.hash.slice(1)),c=Zc(t).map(f=>{var g;return{origin:f.origin,name:f.name,...f.pagesMigrated?{pagesMigrated:!0}:{},...f.origin===e.origin&&!f.pagesMigrated&&((g=f.pages)!=null&&g.length)?{pages:f.pages}:{}}});if(o.set("computers",JSON.stringify({version:1,computers:c,name:n.trim().slice(0,60)})),o.toString().length>16383)throw new Error("电脑列表或待导入页面配置过长,请先导入旧页面后再切换电脑。");return e.hash=o.toString(),e.href}function S_(e,t,n=""){return Wv(uR(e),t,n)}function I_(e,t){const n=Kc(e);if(!n)throw new Error("电脑地址无效。");return Wv(new URL(n+"/pair"),t)}/*! Capacitor: https://capacitorjs.com/ - MIT License */var Ds;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(Ds||(Ds={}));class Of extends Error{constructor(t,n,o){super(t),this.message=t,this.code=n,this.data=o}}const fR=e=>{var t,n;return e!=null&&e.androidBridge?"android":!((n=(t=e==null?void 0:e.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},dR=e=>{const t=e.CapacitorCustomPlatform||null,n=e.Capacitor||{},o=n.Plugins=n.Plugins||{},c=()=>t!==null?t.name:fR(e),f=()=>c()!=="web",g=y=>{const S=m.get(y);return!!(S!=null&&S.platforms.has(c())||x(y))},x=y=>{var S;return(S=n.PluginHeaders)===null||S===void 0?void 0:S.find(_=>_.name===y)},w=y=>e.console.error(y),m=new Map,C=(y,S={})=>{const _=m.get(y);if(_)return console.warn(`Capacitor plugin "${y}" already registered. Cannot register plugins twice.`),_.proxy;const k=c(),D=x(y);let X;const O=async()=>(!X&&k in S?X=typeof S[k]=="function"?X=await S[k]():X=S[k]:t!==null&&!X&&"web"in S&&(X=typeof S.web=="function"?X=await S.web():X=S.web),X),I=(Y,$)=>{var ae,Ee;if(D){const ne=D==null?void 0:D.methods.find(K=>$===K.name);if(ne)return ne.rtype==="promise"?K=>n.nativePromise(y,$.toString(),K):(K,le)=>n.nativeCallback(y,$.toString(),K,le);if(Y)return(ae=Y[$])===null||ae===void 0?void 0:ae.bind(Y)}else{if(Y)return(Ee=Y[$])===null||Ee===void 0?void 0:Ee.bind(Y);throw new Of(`"${y}" plugin is not implemented on ${k}`,Ds.Unimplemented)}},R=Y=>{let $;const ae=(...Ee)=>{const ne=O().then(K=>{const le=I(K,Y);if(le){const j=le(...Ee);return $=j==null?void 0:j.remove,j}else throw new Of(`"${y}.${Y}()" is not implemented on ${k}`,Ds.Unimplemented)});return Y==="addListener"&&(ne.remove=async()=>$()),ne};return ae.toString=()=>`${Y.toString()}() { [capacitor code] }`,Object.defineProperty(ae,"name",{value:Y,writable:!1,configurable:!1}),ae},U=R("addListener"),G=R("removeListener"),W=(Y,$)=>{const ae=U({eventName:Y},$),Ee=async()=>{const K=await ae;G({eventName:Y,callbackId:K},$)},ne=new Promise(K=>ae.then(()=>K({remove:Ee})));return ne.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await Ee()},ne},B=new Proxy({},{get(Y,$){switch($){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return D?W:U;case"removeListener":return G;default:return R($)}}});return o[y]=B,m.set(y,{name:y,proxy:B,platforms:new Set([...Object.keys(S),...D?[k]:[]])}),B};return n.convertFileSrc||(n.convertFileSrc=y=>y),n.getPlatform=c,n.handleError=w,n.isNativePlatform=f,n.isPluginAvailable=g,n.registerPlugin=C,n.Exception=Of,n.DEBUG=!!n.DEBUG,n.isLoggingEnabled=!!n.isLoggingEnabled,n},hR=e=>e.Capacitor=dR(e),Ms=hR(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),pa=Ms.registerPlugin;class zv{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(t,n){let o=!1;this.listeners[t]||(this.listeners[t]=[],o=!0),this.listeners[t].push(n);const f=this.windowListeners[t];f&&!f.registered&&this.addWindowListener(f),o&&this.sendRetainedArgumentsForEvent(t);const g=async()=>this.removeListener(t,n);return Promise.resolve({remove:g})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,o){const c=this.listeners[t];if(!c){if(o){let f=this.retainedEventArguments[t];f||(f=[]),f.push(n),this.retainedEventArguments[t]=f}return}c.forEach(f=>f(n))}hasListeners(t){var n;return!!(!((n=this.listeners[t])===null||n===void 0)&&n.length)}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:o=>{this.notifyListeners(n,o)}}}unimplemented(t="not implemented"){return new Ms.Exception(t,Ds.Unimplemented)}unavailable(t="not available"){return new Ms.Exception(t,Ds.Unavailable)}async removeListener(t,n){const o=this.listeners[t];if(!o)return;const c=o.indexOf(n);this.listeners[t].splice(c,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(o=>{this.notifyListeners(t,o)}))}}const e2=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),t2=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class gR extends zv{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(o=>{if(o.length<=0)return;let[c,f]=o.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");c=t2(c).trim(),f=t2(f).trim(),n[c]=f}),n}async setCookie(t){try{const n=e2(t.key),o=e2(t.value),c=t.expires?`; expires=${t.expires.replace("expires=","")}`:"",f=(t.path||"/").replace("path=",""),g=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${o||""}${c}; path=${f}; ${g};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}pa("CapacitorCookies",{web:()=>new gR});const pR=async e=>new Promise((t,n)=>{const o=new FileReader;o.onload=()=>{const c=o.result;t(c.indexOf(",")>=0?c.split(",")[1]:c)},o.onerror=c=>n(c),o.readAsDataURL(e)}),mR=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(c=>c.toLocaleLowerCase()).reduce((c,f,g)=>(c[f]=e[t[g]],c),{})},xR=(e,t=!0)=>e?Object.entries(e).reduce((o,c)=>{const[f,g]=c;let x,w;return Array.isArray(g)?(w="",g.forEach(m=>{x=t?encodeURIComponent(m):m,w+=`${f}=${x}&`}),w.slice(0,-1)):(x=t?encodeURIComponent(g):g,w=`${f}=${x}`),`${o}&${w}`},"").substr(1):null,wR=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),c=mR(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(c.includes("application/x-www-form-urlencoded")){const f=new URLSearchParams;for(const[g,x]of Object.entries(e.data||{}))f.set(g,x);n.body=f.toString()}else if(c.includes("multipart/form-data")||e.data instanceof FormData){const f=new FormData;if(e.data instanceof FormData)e.data.forEach((x,w)=>{f.append(w,x)});else for(const x of Object.keys(e.data))f.append(x,e.data[x]);n.body=f;const g=new Headers(n.headers);g.delete("content-type"),n.headers=g}else(c.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class vR extends zv{async request(t){const n=wR(t,t.webFetchExtra),o=xR(t.params,t.shouldEncodeUrlParams),c=o?`${t.url}?${o}`:t.url,f=await fetch(c,n),g=f.headers.get("content-type")||"";let{responseType:x="text"}=f.ok?t:{};g.includes("application/json")&&(x="json");let w,m;switch(x){case"arraybuffer":case"blob":m=await f.blob(),w=await pR(m);break;case"json":w=await f.json();break;case"document":case"text":default:w=await f.text()}const C={};return f.headers.forEach((y,S)=>{C[S]=y}),{data:w,headers:C,status:f.status,url:f.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}pa("CapacitorHttp",{web:()=>new vR});var ie;(function(e){e[e.QR_CODE=0]="QR_CODE",e[e.AZTEC=1]="AZTEC",e[e.CODABAR=2]="CODABAR",e[e.CODE_39=3]="CODE_39",e[e.CODE_93=4]="CODE_93",e[e.CODE_128=5]="CODE_128",e[e.DATA_MATRIX=6]="DATA_MATRIX",e[e.MAXICODE=7]="MAXICODE",e[e.ITF=8]="ITF",e[e.EAN_13=9]="EAN_13",e[e.EAN_8=10]="EAN_8",e[e.PDF_417=11]="PDF_417",e[e.RSS_14=12]="RSS_14",e[e.RSS_EXPANDED=13]="RSS_EXPANDED",e[e.UPC_A=14]="UPC_A",e[e.UPC_E=15]="UPC_E",e[e.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"})(ie||(ie={}));var r2=new Map([[ie.QR_CODE,"QR_CODE"],[ie.AZTEC,"AZTEC"],[ie.CODABAR,"CODABAR"],[ie.CODE_39,"CODE_39"],[ie.CODE_93,"CODE_93"],[ie.CODE_128,"CODE_128"],[ie.DATA_MATRIX,"DATA_MATRIX"],[ie.MAXICODE,"MAXICODE"],[ie.ITF,"ITF"],[ie.EAN_13,"EAN_13"],[ie.EAN_8,"EAN_8"],[ie.PDF_417,"PDF_417"],[ie.RSS_14,"RSS_14"],[ie.RSS_EXPANDED,"RSS_EXPANDED"],[ie.UPC_A,"UPC_A"],[ie.UPC_E,"UPC_E"],[ie.UPC_EAN_EXTENSION,"UPC_EAN_EXTENSION"]]),n2;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.URL=1]="URL"})(n2||(n2={}));function yR(e){return Object.values(ie).includes(e)}var uc;(function(e){e[e.SCAN_TYPE_CAMERA=0]="SCAN_TYPE_CAMERA",e[e.SCAN_TYPE_FILE=1]="SCAN_TYPE_FILE"})(uc||(uc={}));var ER=function(){function e(){}return e.GITHUB_PROJECT_URL="https://github.com/mebjas/html5-qrcode",e.SCAN_DEFAULT_FPS=2,e.DEFAULT_DISABLE_FLIP=!1,e.DEFAULT_REMEMBER_LAST_CAMERA_USED=!0,e.DEFAULT_SUPPORTED_SCAN_TYPE=[uc.SCAN_TYPE_CAMERA,uc.SCAN_TYPE_FILE],e}(),$v=function(){function e(t,n){this.format=t,this.formatName=n}return e.prototype.toString=function(){return this.formatName},e.create=function(t){if(!r2.has(t))throw"".concat(t," not in html5QrcodeSupportedFormatsTextMap");return new e(t,r2.get(t))},e}(),i2=function(){function e(){}return e.createFromText=function(t){var n={text:t};return{decodedText:t,result:n}},e.createFromQrcodeResult=function(t){return{decodedText:t.text,result:t}},e}(),X1;(function(e){e[e.UNKWOWN_ERROR=0]="UNKWOWN_ERROR",e[e.IMPLEMENTATION_ERROR=1]="IMPLEMENTATION_ERROR",e[e.NO_CODE_FOUND_ERROR=2]="NO_CODE_FOUND_ERROR"})(X1||(X1={}));var bR=function(){function e(){}return e.createFrom=function(t){return{errorMessage:t,type:X1.UNKWOWN_ERROR}},e}(),CR=function(){function e(t){this.verbose=t}return e.prototype.log=function(t){this.verbose&&console.log(t)},e.prototype.warn=function(t){this.verbose&&console.warn(t)},e.prototype.logError=function(t,n){(this.verbose||n===!0)&&console.error(t)},e.prototype.logErrors=function(t){if(t.length===0)throw"Logger#logError called without arguments";this.verbose&&console.error(t)},e}();function gn(e){return typeof e>"u"||e===null}var hs=function(){function e(){}return e.codeParseError=function(t){return"QR code parse error, error = ".concat(t)},e.errorGettingUserMedia=function(t){return"Error getting userMedia, error = ".concat(t)},e.onlyDeviceSupportedError=function(){return"The device doesn't support navigator.mediaDevices , only supported cameraIdOrConfig in this case is deviceId parameter (string)."},e.cameraStreamingNotSupported=function(){return"Camera streaming not supported by the browser."},e.unableToQuerySupportedDevices=function(){return"Unable to query supported devices, unknown error."},e.insecureContextCameraQueryError=function(){return"Camera access is only supported in secure context like https or localhost."},e.scannerPaused=function(){return"Scanner paused"},e}(),Vv=function(){function e(){}return e.isMediaStreamConstraintsValid=function(t,n){if(typeof t!="object"){var o=typeof t;return n.logError("videoConstraints should be of type object, the "+"object passed is of type ".concat(o,"."),!0),!1}for(var c=["autoGainControl","channelCount","echoCancellation","latency","noiseSuppression","sampleRate","sampleSize","volume"],f=new Set(c),g=Object.keys(t),x=0,w=g;x<w.length;x++){var m=w[x];if(f.has(m))return n.logError("".concat(m," is not supported videoConstaints."),!0),!1}return!0},e}(),Y1={exports:{}};(function(e,t){(function(n,o){o(t)})(wn,function(n){function o(E){return E==null}var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,r){E.__proto__=r}||function(E,r){for(var i in r)r.hasOwnProperty(i)&&(E[i]=r[i])};function f(E,r){c(E,r);function i(){this.constructor=E}E.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}function g(E,r){var i=Object.setPrototypeOf;i?i(E,r):E.__proto__=r}function x(E,r){r===void 0&&(r=E.constructor);var i=Error.captureStackTrace;i&&i(E,r)}var w=function(E){f(r,E);function r(i){var s=this.constructor,a=E.call(this,i)||this;return Object.defineProperty(a,"name",{value:s.name,enumerable:!1}),g(a,s.prototype),x(a),a}return r}(Error);class m extends w{constructor(r=void 0){super(r),this.message=r}getKind(){return this.constructor.kind}}m.kind="Exception";class C extends m{}C.kind="ArgumentException";class y extends m{}y.kind="IllegalArgumentException";class S{constructor(r){if(this.binarizer=r,r===null)throw new y("Binarizer must be non-null.")}getWidth(){return this.binarizer.getWidth()}getHeight(){return this.binarizer.getHeight()}getBlackRow(r,i){return this.binarizer.getBlackRow(r,i)}getBlackMatrix(){return(this.matrix===null||this.matrix===void 0)&&(this.matrix=this.binarizer.getBlackMatrix()),this.matrix}isCropSupported(){return this.binarizer.getLuminanceSource().isCropSupported()}crop(r,i,s,a){const l=this.binarizer.getLuminanceSource().crop(r,i,s,a);return new S(this.binarizer.createBinarizer(l))}isRotateSupported(){return this.binarizer.getLuminanceSource().isRotateSupported()}rotateCounterClockwise(){const r=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new S(this.binarizer.createBinarizer(r))}rotateCounterClockwise45(){const r=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new S(this.binarizer.createBinarizer(r))}toString(){try{return this.getBlackMatrix().toString()}catch{return""}}}class _ extends m{static getChecksumInstance(){return new _}}_.kind="ChecksumException";class k{constructor(r){this.source=r}getLuminanceSource(){return this.source}getWidth(){return this.source.getWidth()}getHeight(){return this.source.getHeight()}}class D{static arraycopy(r,i,s,a,l){for(;l--;)s[a++]=r[i++]}static currentTimeMillis(){return Date.now()}}class X extends m{}X.kind="IndexOutOfBoundsException";class O extends X{constructor(r=void 0,i=void 0){super(i),this.index=r,this.message=i}}O.kind="ArrayIndexOutOfBoundsException";class I{static fill(r,i){for(let s=0,a=r.length;s<a;s++)r[s]=i}static fillWithin(r,i,s,a){I.rangeCheck(r.length,i,s);for(let l=i;l<s;l++)r[l]=a}static rangeCheck(r,i,s){if(i>s)throw new y("fromIndex("+i+") > toIndex("+s+")");if(i<0)throw new O(i);if(s>r)throw new O(s)}static asList(...r){return r}static create(r,i,s){return Array.from({length:r}).map(l=>Array.from({length:i}).fill(s))}static createInt32Array(r,i,s){return Array.from({length:r}).map(l=>Int32Array.from({length:i}).fill(s))}static equals(r,i){if(!r||!i||!r.length||!i.length||r.length!==i.length)return!1;for(let s=0,a=r.length;s<a;s++)if(r[s]!==i[s])return!1;return!0}static hashCode(r){if(r===null)return 0;let i=1;for(const s of r)i=31*i+s;return i}static fillUint8Array(r,i){for(let s=0;s!==r.length;s++)r[s]=i}static copyOf(r,i){return r.slice(0,i)}static copyOfUint8Array(r,i){if(r.length<=i){const s=new Uint8Array(i);return s.set(r),s}return r.slice(0,i)}static copyOfRange(r,i,s){const a=s-i,l=new Int32Array(a);return D.arraycopy(r,i,l,0,a),l}static binarySearch(r,i,s){s===void 0&&(s=I.numberComparator);let a=0,l=r.length-1;for(;a<=l;){const u=l+a>>1,d=s(i,r[u]);if(d>0)a=u+1;else if(d<0)l=u-1;else return u}return-a-1}static numberComparator(r,i){return r-i}}class R{static numberOfTrailingZeros(r){let i;if(r===0)return 32;let s=31;return i=r<<16,i!==0&&(s-=16,r=i),i=r<<8,i!==0&&(s-=8,r=i),i=r<<4,i!==0&&(s-=4,r=i),i=r<<2,i!==0&&(s-=2,r=i),s-(r<<1>>>31)}static numberOfLeadingZeros(r){if(r===0)return 32;let i=1;return r>>>16||(i+=16,r<<=16),r>>>24||(i+=8,r<<=8),r>>>28||(i+=4,r<<=4),r>>>30||(i+=2,r<<=2),i-=r>>>31,i}static toHexString(r){return r.toString(16)}static toBinaryString(r){return String(parseInt(String(r),2))}static bitCount(r){return r=r-(r>>>1&1431655765),r=(r&858993459)+(r>>>2&858993459),r=r+(r>>>4)&252645135,r=r+(r>>>8),r=r+(r>>>16),r&63}static truncDivision(r,i){return Math.trunc(r/i)}static parseInt(r,i=void 0){return parseInt(r,i)}}R.MIN_VALUE_32_BITS=-2147483648,R.MAX_VALUE=Number.MAX_SAFE_INTEGER;class U{constructor(r,i){r===void 0?(this.size=0,this.bits=new Int32Array(1)):(this.size=r,i==null?this.bits=U.makeArray(r):this.bits=i)}getSize(){return this.size}getSizeInBytes(){return Math.floor((this.size+7)/8)}ensureCapacity(r){if(r>this.bits.length*32){const i=U.makeArray(r);D.arraycopy(this.bits,0,i,0,this.bits.length),this.bits=i}}get(r){return(this.bits[Math.floor(r/32)]&1<<(r&31))!==0}set(r){this.bits[Math.floor(r/32)]|=1<<(r&31)}flip(r){this.bits[Math.floor(r/32)]^=1<<(r&31)}getNextSet(r){const i=this.size;if(r>=i)return i;const s=this.bits;let a=Math.floor(r/32),l=s[a];l&=~((1<<(r&31))-1);const u=s.length;for(;l===0;){if(++a===u)return i;l=s[a]}const d=a*32+R.numberOfTrailingZeros(l);return d>i?i:d}getNextUnset(r){const i=this.size;if(r>=i)return i;const s=this.bits;let a=Math.floor(r/32),l=~s[a];l&=~((1<<(r&31))-1);const u=s.length;for(;l===0;){if(++a===u)return i;l=~s[a]}const d=a*32+R.numberOfTrailingZeros(l);return d>i?i:d}setBulk(r,i){this.bits[Math.floor(r/32)]=i}setRange(r,i){if(i<r||r<0||i>this.size)throw new y;if(i===r)return;i--;const s=Math.floor(r/32),a=Math.floor(i/32),l=this.bits;for(let u=s;u<=a;u++){const d=u>s?0:r&31,p=(2<<(u<a?31:i&31))-(1<<d);l[u]|=p}}clear(){const r=this.bits.length,i=this.bits;for(let s=0;s<r;s++)i[s]=0}isRange(r,i,s){if(i<r||r<0||i>this.size)throw new y;if(i===r)return!0;i--;const a=Math.floor(r/32),l=Math.floor(i/32),u=this.bits;for(let d=a;d<=l;d++){const h=d>a?0:r&31,v=(2<<(d<l?31:i&31))-(1<<h)&4294967295;if((u[d]&v)!==(s?v:0))return!1}return!0}appendBit(r){this.ensureCapacity(this.size+1),r&&(this.bits[Math.floor(this.size/32)]|=1<<(this.size&31)),this.size++}appendBits(r,i){if(i<0||i>32)throw new y("Num bits must be between 0 and 32");this.ensureCapacity(this.size+i);for(let s=i;s>0;s--)this.appendBit((r>>s-1&1)===1)}appendBitArray(r){const i=r.size;this.ensureCapacity(this.size+i);for(let s=0;s<i;s++)this.appendBit(r.get(s))}xor(r){if(this.size!==r.size)throw new y("Sizes don't match");const i=this.bits;for(let s=0,a=i.length;s<a;s++)i[s]^=r.bits[s]}toBytes(r,i,s,a){for(let l=0;l<a;l++){let u=0;for(let d=0;d<8;d++)this.get(r)&&(u|=1<<7-d),r++;i[s+l]=u}}getBitArray(){return this.bits}reverse(){const r=new Int32Array(this.bits.length),i=Math.floor((this.size-1)/32),s=i+1,a=this.bits;for(let l=0;l<s;l++){let u=a[l];u=u>>1&1431655765|(u&1431655765)<<1,u=u>>2&858993459|(u&858993459)<<2,u=u>>4&252645135|(u&252645135)<<4,u=u>>8&16711935|(u&16711935)<<8,u=u>>16&65535|(u&65535)<<16,r[i-l]=u}if(this.size!==s*32){const l=s*32-this.size;let u=r[0]>>>l;for(let d=1;d<s;d++){const h=r[d];u|=h<<32-l,r[d-1]=u,u=h>>>l}r[s-1]=u}this.bits=r}static makeArray(r){return new Int32Array(Math.floor((r+31)/32))}equals(r){if(!(r instanceof U))return!1;const i=r;return this.size===i.size&&I.equals(this.bits,i.bits)}hashCode(){return 31*this.size+I.hashCode(this.bits)}toString(){let r="";for(let i=0,s=this.size;i<s;i++)i&7||(r+=" "),r+=this.get(i)?"X":".";return r}clone(){return new U(this.size,this.bits.slice())}}var G;(function(E){E[E.OTHER=0]="OTHER",E[E.PURE_BARCODE=1]="PURE_BARCODE",E[E.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",E[E.TRY_HARDER=3]="TRY_HARDER",E[E.CHARACTER_SET=4]="CHARACTER_SET",E[E.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",E[E.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",E[E.ASSUME_GS1=7]="ASSUME_GS1",E[E.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",E[E.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",E[E.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS"})(G||(G={}));var W=G;class B extends m{static getFormatInstance(){return new B}}B.kind="FormatException";var Y;(function(E){E[E.Cp437=0]="Cp437",E[E.ISO8859_1=1]="ISO8859_1",E[E.ISO8859_2=2]="ISO8859_2",E[E.ISO8859_3=3]="ISO8859_3",E[E.ISO8859_4=4]="ISO8859_4",E[E.ISO8859_5=5]="ISO8859_5",E[E.ISO8859_6=6]="ISO8859_6",E[E.ISO8859_7=7]="ISO8859_7",E[E.ISO8859_8=8]="ISO8859_8",E[E.ISO8859_9=9]="ISO8859_9",E[E.ISO8859_10=10]="ISO8859_10",E[E.ISO8859_11=11]="ISO8859_11",E[E.ISO8859_13=12]="ISO8859_13",E[E.ISO8859_14=13]="ISO8859_14",E[E.ISO8859_15=14]="ISO8859_15",E[E.ISO8859_16=15]="ISO8859_16",E[E.SJIS=16]="SJIS",E[E.Cp1250=17]="Cp1250",E[E.Cp1251=18]="Cp1251",E[E.Cp1252=19]="Cp1252",E[E.Cp1256=20]="Cp1256",E[E.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",E[E.UTF8=22]="UTF8",E[E.ASCII=23]="ASCII",E[E.Big5=24]="Big5",E[E.GB18030=25]="GB18030",E[E.EUC_KR=26]="EUC_KR"})(Y||(Y={}));class ${constructor(r,i,s,...a){this.valueIdentifier=r,this.name=s,typeof i=="number"?this.values=Int32Array.from([i]):this.values=i,this.otherEncodingNames=a,$.VALUE_IDENTIFIER_TO_ECI.set(r,this),$.NAME_TO_ECI.set(s,this);const l=this.values;for(let u=0,d=l.length;u!==d;u++){const h=l[u];$.VALUES_TO_ECI.set(h,this)}for(const u of a)$.NAME_TO_ECI.set(u,this)}getValueIdentifier(){return this.valueIdentifier}getName(){return this.name}getValue(){return this.values[0]}static getCharacterSetECIByValue(r){if(r<0||r>=900)throw new B("incorect value");const i=$.VALUES_TO_ECI.get(r);if(i===void 0)throw new B("incorect value");return i}static getCharacterSetECIByName(r){const i=$.NAME_TO_ECI.get(r);if(i===void 0)throw new B("incorect value");return i}equals(r){if(!(r instanceof $))return!1;const i=r;return this.getName()===i.getName()}}$.VALUE_IDENTIFIER_TO_ECI=new Map,$.VALUES_TO_ECI=new Map,$.NAME_TO_ECI=new Map,$.Cp437=new $(Y.Cp437,Int32Array.from([0,2]),"Cp437"),$.ISO8859_1=new $(Y.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),$.ISO8859_2=new $(Y.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),$.ISO8859_3=new $(Y.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),$.ISO8859_4=new $(Y.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),$.ISO8859_5=new $(Y.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),$.ISO8859_6=new $(Y.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),$.ISO8859_7=new $(Y.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),$.ISO8859_8=new $(Y.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),$.ISO8859_9=new $(Y.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),$.ISO8859_10=new $(Y.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),$.ISO8859_11=new $(Y.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),$.ISO8859_13=new $(Y.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),$.ISO8859_14=new $(Y.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),$.ISO8859_15=new $(Y.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),$.ISO8859_16=new $(Y.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),$.SJIS=new $(Y.SJIS,20,"SJIS","Shift_JIS"),$.Cp1250=new $(Y.Cp1250,21,"Cp1250","windows-1250"),$.Cp1251=new $(Y.Cp1251,22,"Cp1251","windows-1251"),$.Cp1252=new $(Y.Cp1252,23,"Cp1252","windows-1252"),$.Cp1256=new $(Y.Cp1256,24,"Cp1256","windows-1256"),$.UnicodeBigUnmarked=new $(Y.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),$.UTF8=new $(Y.UTF8,26,"UTF8","UTF-8"),$.ASCII=new $(Y.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),$.Big5=new $(Y.Big5,28,"Big5"),$.GB18030=new $(Y.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),$.EUC_KR=new $(Y.EUC_KR,30,"EUC_KR","EUC-KR");class ae extends m{}ae.kind="UnsupportedOperationException";class Ee{static decode(r,i){const s=this.encodingName(i);return this.customDecoder?this.customDecoder(r,s):typeof TextDecoder>"u"||this.shouldDecodeOnFallback(s)?this.decodeFallback(r,s):new TextDecoder(s).decode(r)}static shouldDecodeOnFallback(r){return!Ee.isBrowser()&&r==="ISO-8859-1"}static encode(r,i){const s=this.encodingName(i);return this.customEncoder?this.customEncoder(r,s):typeof TextEncoder>"u"?this.encodeFallback(r):new TextEncoder().encode(r)}static isBrowser(){return typeof window<"u"&&{}.toString.call(window)==="[object Window]"}static encodingName(r){return typeof r=="string"?r:r.getName()}static encodingCharacterSet(r){return r instanceof $?r:$.getCharacterSetECIByName(r)}static decodeFallback(r,i){const s=this.encodingCharacterSet(i);if(Ee.isDecodeFallbackSupported(s)){let a="";for(let l=0,u=r.length;l<u;l++){let d=r[l].toString(16);d.length<2&&(d="0"+d),a+="%"+d}return decodeURIComponent(a)}if(s.equals($.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(r.buffer));throw new ae(`Encoding ${this.encodingName(i)} not supported by fallback.`)}static isDecodeFallbackSupported(r){return r.equals($.UTF8)||r.equals($.ISO8859_1)||r.equals($.ASCII)}static encodeFallback(r){const s=btoa(unescape(encodeURIComponent(r))).split(""),a=[];for(let l=0;l<s.length;l++)a.push(s[l].charCodeAt(0));return new Uint8Array(a)}}class ne{static castAsNonUtf8Char(r,i=null){const s=i?i.getName():this.ISO88591;return Ee.decode(new Uint8Array([r]),s)}static guessEncoding(r,i){if(i!=null&&i.get(W.CHARACTER_SET)!==void 0)return i.get(W.CHARACTER_SET).toString();const s=r.length;let a=!0,l=!0,u=!0,d=0,h=0,p=0,v=0,b=0,A=0,N=0,M=0,L=0,F=0,H=0;const J=r.length>3&&r[0]===239&&r[1]===187&&r[2]===191;for(let ee=0;ee<s&&(a||l||u);ee++){const Q=r[ee]&255;u&&(d>0?Q&128?d--:u=!1:Q&128&&(Q&64?(d++,Q&32?(d++,Q&16?(d++,Q&8?u=!1:v++):p++):h++):u=!1)),a&&(Q>127&&Q<160?a=!1:Q>159&&(Q<192||Q===215||Q===247)&&H++),l&&(b>0?Q<64||Q===127||Q>252?l=!1:b--:Q===128||Q===160||Q>239?l=!1:Q>160&&Q<224?(A++,M=0,N++,N>L&&(L=N)):Q>127?(b++,N=0,M++,M>F&&(F=M)):(N=0,M=0))}return u&&d>0&&(u=!1),l&&b>0&&(l=!1),u&&(J||h+p+v>0)?ne.UTF8:l&&(ne.ASSUME_SHIFT_JIS||L>=3||F>=3)?ne.SHIFT_JIS:a&&l?L===2&&A===2||H*10>=s?ne.SHIFT_JIS:ne.ISO88591:a?ne.ISO88591:l?ne.SHIFT_JIS:u?ne.UTF8:ne.PLATFORM_DEFAULT_ENCODING}static format(r,...i){let s=-1;function a(u,d,h,p,v,b){if(u==="%%")return"%";if(i[++s]===void 0)return;u=p?parseInt(p.substr(1)):void 0;let A=v?parseInt(v.substr(1)):void 0,N;switch(b){case"s":N=i[s];break;case"c":N=i[s][0];break;case"f":N=parseFloat(i[s]).toFixed(u);break;case"p":N=parseFloat(i[s]).toPrecision(u);break;case"e":N=parseFloat(i[s]).toExponential(u);break;case"x":N=parseInt(i[s]).toString(A||16);break;case"d":N=parseFloat(parseInt(i[s],A||10).toPrecision(u)).toFixed(0);break}N=typeof N=="object"?JSON.stringify(N):(+N).toString(A);let M=parseInt(h),L=h&&h[0]+""=="0"?"0":" ";for(;N.length<M;)N=d!==void 0?N+L:L+N;return N}let l=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return r.replace(l,a)}static getBytes(r,i){return Ee.encode(r,i)}static getCharCode(r,i=0){return r.charCodeAt(i)}static getCharAt(r){return String.fromCharCode(r)}}ne.SHIFT_JIS=$.SJIS.getName(),ne.GB2312="GB2312",ne.ISO88591=$.ISO8859_1.getName(),ne.EUC_JP="EUC_JP",ne.UTF8=$.UTF8.getName(),ne.PLATFORM_DEFAULT_ENCODING=ne.UTF8,ne.ASSUME_SHIFT_JIS=!1;class K{constructor(r=""){this.value=r}enableDecoding(r){return this.encoding=r,this}append(r){return typeof r=="string"?this.value+=r.toString():this.encoding?this.value+=ne.castAsNonUtf8Char(r,this.encoding):this.value+=String.fromCharCode(r),this}appendChars(r,i,s){for(let a=i;i<i+s;a++)this.append(r[a]);return this}length(){return this.value.length}charAt(r){return this.value.charAt(r)}deleteCharAt(r){this.value=this.value.substr(0,r)+this.value.substring(r+1)}setCharAt(r,i){this.value=this.value.substr(0,r)+i+this.value.substr(r+1)}substring(r,i){return this.value.substring(r,i)}setLengthToZero(){this.value=""}toString(){return this.value}insert(r,i){this.value=this.value.substr(0,r)+i+this.value.substr(r+i.length)}}class le{constructor(r,i,s,a){if(this.width=r,this.height=i,this.rowSize=s,this.bits=a,i==null&&(i=r),this.height=i,r<1||i<1)throw new y("Both dimensions must be greater than 0");s==null&&(s=Math.floor((r+31)/32)),this.rowSize=s,a==null&&(this.bits=new Int32Array(this.rowSize*this.height))}static parseFromBooleanArray(r){const i=r.length,s=r[0].length,a=new le(s,i);for(let l=0;l<i;l++){const u=r[l];for(let d=0;d<s;d++)u[d]&&a.set(d,l)}return a}static parseFromString(r,i,s){if(r===null)throw new y("stringRepresentation cannot be null");const a=new Array(r.length);let l=0,u=0,d=-1,h=0,p=0;for(;p<r.length;)if(r.charAt(p)===`
|
|
480
|
-
`||r.charAt(p)==="\r"){if(l>u){if(d===-1)d=l-u;else if(l-u!==d)throw new y("row lengths do not match");u=l,h++}p++}else if(r.substring(p,p+i.length)===i)p+=i.length,a[l]=!0,l++;else if(r.substring(p,p+s.length)===s)p+=s.length,a[l]=!1,l++;else throw new y("illegal character encountered: "+r.substring(p));if(l>u){if(d===-1)d=l-u;else if(l-u!==d)throw new y("row lengths do not match");h++}const v=new le(d,h);for(let b=0;b<l;b++)a[b]&&v.set(Math.floor(b%d),Math.floor(b/d));return v}get(r,i){const s=i*this.rowSize+Math.floor(r/32);return(this.bits[s]>>>(r&31)&1)!==0}set(r,i){const s=i*this.rowSize+Math.floor(r/32);this.bits[s]|=1<<(r&31)&4294967295}unset(r,i){const s=i*this.rowSize+Math.floor(r/32);this.bits[s]&=~(1<<(r&31)&4294967295)}flip(r,i){const s=i*this.rowSize+Math.floor(r/32);this.bits[s]^=1<<(r&31)&4294967295}xor(r){if(this.width!==r.getWidth()||this.height!==r.getHeight()||this.rowSize!==r.getRowSize())throw new y("input matrix dimensions do not match");const i=new U(Math.floor(this.width/32)+1),s=this.rowSize,a=this.bits;for(let l=0,u=this.height;l<u;l++){const d=l*s,h=r.getRow(l,i).getBitArray();for(let p=0;p<s;p++)a[d+p]^=h[p]}}clear(){const r=this.bits,i=r.length;for(let s=0;s<i;s++)r[s]=0}setRegion(r,i,s,a){if(i<0||r<0)throw new y("Left and top must be nonnegative");if(a<1||s<1)throw new y("Height and width must be at least 1");const l=r+s,u=i+a;if(u>this.height||l>this.width)throw new y("The region must fit inside the matrix");const d=this.rowSize,h=this.bits;for(let p=i;p<u;p++){const v=p*d;for(let b=r;b<l;b++)h[v+Math.floor(b/32)]|=1<<(b&31)&4294967295}}getRow(r,i){i==null||i.getSize()<this.width?i=new U(this.width):i.clear();const s=this.rowSize,a=this.bits,l=r*s;for(let u=0;u<s;u++)i.setBulk(u*32,a[l+u]);return i}setRow(r,i){D.arraycopy(i.getBitArray(),0,this.bits,r*this.rowSize,this.rowSize)}rotate180(){const r=this.getWidth(),i=this.getHeight();let s=new U(r),a=new U(r);for(let l=0,u=Math.floor((i+1)/2);l<u;l++)s=this.getRow(l,s),a=this.getRow(i-1-l,a),s.reverse(),a.reverse(),this.setRow(l,a),this.setRow(i-1-l,s)}getEnclosingRectangle(){const r=this.width,i=this.height,s=this.rowSize,a=this.bits;let l=r,u=i,d=-1,h=-1;for(let p=0;p<i;p++)for(let v=0;v<s;v++){const b=a[p*s+v];if(b!==0){if(p<u&&(u=p),p>h&&(h=p),v*32<l){let A=0;for(;!(b<<31-A&4294967295);)A++;v*32+A<l&&(l=v*32+A)}if(v*32+31>d){let A=31;for(;!(b>>>A);)A--;v*32+A>d&&(d=v*32+A)}}}return d<l||h<u?null:Int32Array.from([l,u,d-l+1,h-u+1])}getTopLeftOnBit(){const r=this.rowSize,i=this.bits;let s=0;for(;s<i.length&&i[s]===0;)s++;if(s===i.length)return null;const a=s/r;let l=s%r*32;const u=i[s];let d=0;for(;!(u<<31-d&4294967295);)d++;return l+=d,Int32Array.from([l,a])}getBottomRightOnBit(){const r=this.rowSize,i=this.bits;let s=i.length-1;for(;s>=0&&i[s]===0;)s--;if(s<0)return null;const a=Math.floor(s/r);let l=Math.floor(s%r)*32;const u=i[s];let d=31;for(;!(u>>>d);)d--;return l+=d,Int32Array.from([l,a])}getWidth(){return this.width}getHeight(){return this.height}getRowSize(){return this.rowSize}equals(r){if(!(r instanceof le))return!1;const i=r;return this.width===i.width&&this.height===i.height&&this.rowSize===i.rowSize&&I.equals(this.bits,i.bits)}hashCode(){let r=this.width;return r=31*r+this.width,r=31*r+this.height,r=31*r+this.rowSize,r=31*r+I.hashCode(this.bits),r}toString(r="X ",i=" ",s=`
|
|
481
|
-
`){return this.buildToString(r,i,s)}buildToString(r,i,s){let a=new K;for(let l=0,u=this.height;l<u;l++){for(let d=0,h=this.width;d<h;d++)a.append(this.get(d,l)?r:i);a.append(s)}return a.toString()}clone(){return new le(this.width,this.height,this.rowSize,this.bits.slice())}}class j extends m{static getNotFoundInstance(){return new j}}j.kind="NotFoundException";class ve extends k{constructor(r){super(r),this.luminances=ve.EMPTY,this.buckets=new Int32Array(ve.LUMINANCE_BUCKETS)}getBlackRow(r,i){const s=this.getLuminanceSource(),a=s.getWidth();i==null||i.getSize()<a?i=new U(a):i.clear(),this.initArrays(a);const l=s.getRow(r,this.luminances),u=this.buckets;for(let h=0;h<a;h++)u[(l[h]&255)>>ve.LUMINANCE_SHIFT]++;const d=ve.estimateBlackPoint(u);if(a<3)for(let h=0;h<a;h++)(l[h]&255)<d&&i.set(h);else{let h=l[0]&255,p=l[1]&255;for(let v=1;v<a-1;v++){const b=l[v+1]&255;(p*4-h-b)/2<d&&i.set(v),h=p,p=b}}return i}getBlackMatrix(){const r=this.getLuminanceSource(),i=r.getWidth(),s=r.getHeight(),a=new le(i,s);this.initArrays(i);const l=this.buckets;for(let h=1;h<5;h++){const p=Math.floor(s*h/5),v=r.getRow(p,this.luminances),b=Math.floor(i*4/5);for(let A=Math.floor(i/5);A<b;A++){const N=v[A]&255;l[N>>ve.LUMINANCE_SHIFT]++}}const u=ve.estimateBlackPoint(l),d=r.getMatrix();for(let h=0;h<s;h++){const p=h*i;for(let v=0;v<i;v++)(d[p+v]&255)<u&&a.set(v,h)}return a}createBinarizer(r){return new ve(r)}initArrays(r){this.luminances.length<r&&(this.luminances=new Uint8ClampedArray(r));const i=this.buckets;for(let s=0;s<ve.LUMINANCE_BUCKETS;s++)i[s]=0}static estimateBlackPoint(r){const i=r.length;let s=0,a=0,l=0;for(let v=0;v<i;v++)r[v]>l&&(a=v,l=r[v]),r[v]>s&&(s=r[v]);let u=0,d=0;for(let v=0;v<i;v++){const b=v-a,A=r[v]*b*b;A>d&&(u=v,d=A)}if(a>u){const v=a;a=u,u=v}if(u-a<=i/16)throw new j;let h=u-1,p=-1;for(let v=u-1;v>a;v--){const b=v-a,A=b*b*(u-v)*(s-r[v]);A>p&&(h=v,p=A)}return h<<ve.LUMINANCE_SHIFT}}ve.LUMINANCE_BITS=5,ve.LUMINANCE_SHIFT=8-ve.LUMINANCE_BITS,ve.LUMINANCE_BUCKETS=1<<ve.LUMINANCE_BITS,ve.EMPTY=Uint8ClampedArray.from([0]);class he extends ve{constructor(r){super(r),this.matrix=null}getBlackMatrix(){if(this.matrix!==null)return this.matrix;const r=this.getLuminanceSource(),i=r.getWidth(),s=r.getHeight();if(i>=he.MINIMUM_DIMENSION&&s>=he.MINIMUM_DIMENSION){const a=r.getMatrix();let l=i>>he.BLOCK_SIZE_POWER;i&he.BLOCK_SIZE_MASK&&l++;let u=s>>he.BLOCK_SIZE_POWER;s&he.BLOCK_SIZE_MASK&&u++;const d=he.calculateBlackPoints(a,l,u,i,s),h=new le(i,s);he.calculateThresholdForBlock(a,l,u,i,s,d,h),this.matrix=h}else this.matrix=super.getBlackMatrix();return this.matrix}createBinarizer(r){return new he(r)}static calculateThresholdForBlock(r,i,s,a,l,u,d){const h=l-he.BLOCK_SIZE,p=a-he.BLOCK_SIZE;for(let v=0;v<s;v++){let b=v<<he.BLOCK_SIZE_POWER;b>h&&(b=h);const A=he.cap(v,2,s-3);for(let N=0;N<i;N++){let M=N<<he.BLOCK_SIZE_POWER;M>p&&(M=p);const L=he.cap(N,2,i-3);let F=0;for(let J=-2;J<=2;J++){const ee=u[A+J];F+=ee[L-2]+ee[L-1]+ee[L]+ee[L+1]+ee[L+2]}const H=F/25;he.thresholdBlock(r,M,b,H,a,d)}}}static cap(r,i,s){return r<i?i:r>s?s:r}static thresholdBlock(r,i,s,a,l,u){for(let d=0,h=s*l+i;d<he.BLOCK_SIZE;d++,h+=l)for(let p=0;p<he.BLOCK_SIZE;p++)(r[h+p]&255)<=a&&u.set(i+p,s+d)}static calculateBlackPoints(r,i,s,a,l){const u=l-he.BLOCK_SIZE,d=a-he.BLOCK_SIZE,h=new Array(s);for(let p=0;p<s;p++){h[p]=new Int32Array(i);let v=p<<he.BLOCK_SIZE_POWER;v>u&&(v=u);for(let b=0;b<i;b++){let A=b<<he.BLOCK_SIZE_POWER;A>d&&(A=d);let N=0,M=255,L=0;for(let H=0,J=v*a+A;H<he.BLOCK_SIZE;H++,J+=a){for(let ee=0;ee<he.BLOCK_SIZE;ee++){const Q=r[J+ee]&255;N+=Q,Q<M&&(M=Q),Q>L&&(L=Q)}if(L-M>he.MIN_DYNAMIC_RANGE)for(H++,J+=a;H<he.BLOCK_SIZE;H++,J+=a)for(let ee=0;ee<he.BLOCK_SIZE;ee++)N+=r[J+ee]&255}let F=N>>he.BLOCK_SIZE_POWER*2;if(L-M<=he.MIN_DYNAMIC_RANGE&&(F=M/2,p>0&&b>0)){const H=(h[p-1][b]+2*h[p][b-1]+h[p-1][b-1])/4;M<H&&(F=H)}h[p][b]=F}}return h}}he.BLOCK_SIZE_POWER=3,he.BLOCK_SIZE=1<<he.BLOCK_SIZE_POWER,he.BLOCK_SIZE_MASK=he.BLOCK_SIZE-1,he.MINIMUM_DIMENSION=he.BLOCK_SIZE*5,he.MIN_DYNAMIC_RANGE=24;class re{constructor(r,i){this.width=r,this.height=i}getWidth(){return this.width}getHeight(){return this.height}isCropSupported(){return!1}crop(r,i,s,a){throw new ae("This luminance source does not support cropping.")}isRotateSupported(){return!1}rotateCounterClockwise(){throw new ae("This luminance source does not support rotation by 90 degrees.")}rotateCounterClockwise45(){throw new ae("This luminance source does not support rotation by 45 degrees.")}toString(){const r=new Uint8ClampedArray(this.width);let i=new K;for(let s=0;s<this.height;s++){const a=this.getRow(s,r);for(let l=0;l<this.width;l++){const u=a[l]&255;let d;u<64?d="#":u<128?d="+":u<192?d=".":d=" ",i.append(d)}i.append(`
|
|
482
|
-
`)}return i.toString()}}class fe extends re{constructor(r){super(r.getWidth(),r.getHeight()),this.delegate=r}getRow(r,i){const s=this.delegate.getRow(r,i),a=this.getWidth();for(let l=0;l<a;l++)s[l]=255-(s[l]&255);return s}getMatrix(){const r=this.delegate.getMatrix(),i=this.getWidth()*this.getHeight(),s=new Uint8ClampedArray(i);for(let a=0;a<i;a++)s[a]=255-(r[a]&255);return s}isCropSupported(){return this.delegate.isCropSupported()}crop(r,i,s,a){return new fe(this.delegate.crop(r,i,s,a))}isRotateSupported(){return this.delegate.isRotateSupported()}invert(){return this.delegate}rotateCounterClockwise(){return new fe(this.delegate.rotateCounterClockwise())}rotateCounterClockwise45(){return new fe(this.delegate.rotateCounterClockwise45())}}class ge extends re{constructor(r){super(r.width,r.height),this.canvas=r,this.tempCanvasElement=null,this.buffer=ge.makeBufferFromCanvasImageData(r)}static makeBufferFromCanvasImageData(r){const i=r.getContext("2d").getImageData(0,0,r.width,r.height);return ge.toGrayscaleBuffer(i.data,r.width,r.height)}static toGrayscaleBuffer(r,i,s){const a=new Uint8ClampedArray(i*s);for(let l=0,u=0,d=r.length;l<d;l+=4,u++){let h;if(r[l+3]===0)h=255;else{const v=r[l],b=r[l+1],A=r[l+2];h=306*v+601*b+117*A+512>>10}a[u]=h}return a}getRow(r,i){if(r<0||r>=this.getHeight())throw new y("Requested row is outside the image: "+r);const s=this.getWidth(),a=r*s;return i===null?i=this.buffer.slice(a,a+s):(i.length<s&&(i=new Uint8ClampedArray(s)),i.set(this.buffer.slice(a,a+s))),i}getMatrix(){return this.buffer}isCropSupported(){return!0}crop(r,i,s,a){return super.crop(r,i,s,a),this}isRotateSupported(){return!0}rotateCounterClockwise(){return this.rotate(-90),this}rotateCounterClockwise45(){return this.rotate(-45),this}getTempCanvasElement(){if(this.tempCanvasElement===null){const r=this.canvas.ownerDocument.createElement("canvas");r.width=this.canvas.width,r.height=this.canvas.height,this.tempCanvasElement=r}return this.tempCanvasElement}rotate(r){const i=this.getTempCanvasElement(),s=i.getContext("2d"),a=r*ge.DEGREE_TO_RADIANS,l=this.canvas.width,u=this.canvas.height,d=Math.ceil(Math.abs(Math.cos(a))*l+Math.abs(Math.sin(a))*u),h=Math.ceil(Math.abs(Math.sin(a))*l+Math.abs(Math.cos(a))*u);return i.width=d,i.height=h,s.translate(d/2,h/2),s.rotate(a),s.drawImage(this.canvas,l/-2,u/-2),this.buffer=ge.makeBufferFromCanvasImageData(i),this}invert(){return new fe(this)}}ge.DEGREE_TO_RADIANS=Math.PI/180;class Pe{constructor(r,i,s){this.deviceId=r,this.label=i,this.kind="videoinput",this.groupId=s||void 0}toJSON(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}}}var Ae=(globalThis||wn||self||window||void 0)&&(globalThis||wn||self||window||void 0).__awaiter||function(E,r,i,s){function a(l){return l instanceof i?l:new i(function(u){u(l)})}return new(i||(i=Promise))(function(l,u){function d(v){try{p(s.next(v))}catch(b){u(b)}}function h(v){try{p(s.throw(v))}catch(b){u(b)}}function p(v){v.done?l(v.value):a(v.value).then(d,h)}p((s=s.apply(E,r||[])).next())})};class wt{constructor(r,i=500,s){this.reader=r,this.timeBetweenScansMillis=i,this._hints=s,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}get hasNavigator(){return typeof navigator<"u"}get isMediaDevicesSuported(){return this.hasNavigator&&!!navigator.mediaDevices}get canEnumerateDevices(){return!!(this.isMediaDevicesSuported&&navigator.mediaDevices.enumerateDevices)}get timeBetweenDecodingAttempts(){return this._timeBetweenDecodingAttempts}set timeBetweenDecodingAttempts(r){this._timeBetweenDecodingAttempts=r<0?0:r}set hints(r){this._hints=r||null}get hints(){return this._hints}listVideoInputDevices(){return Ae(this,void 0,void 0,function*(){if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");const r=yield navigator.mediaDevices.enumerateDevices(),i=[];for(const s of r){const a=s.kind==="video"?"videoinput":s.kind;if(a!=="videoinput")continue;const l=s.deviceId||s.id,u=s.label||`Video device ${i.length+1}`,d=s.groupId,h={deviceId:l,label:u,kind:a,groupId:d};i.push(h)}return i})}getVideoInputDevices(){return Ae(this,void 0,void 0,function*(){return(yield this.listVideoInputDevices()).map(i=>new Pe(i.deviceId,i.label))})}findDeviceById(r){return Ae(this,void 0,void 0,function*(){const i=yield this.listVideoInputDevices();return i?i.find(s=>s.deviceId===r):null})}decodeFromInputVideoDevice(r,i){return Ae(this,void 0,void 0,function*(){return yield this.decodeOnceFromVideoDevice(r,i)})}decodeOnceFromVideoDevice(r,i){return Ae(this,void 0,void 0,function*(){this.reset();let s;r?s={deviceId:{exact:r}}:s={facingMode:"environment"};const a={video:s};return yield this.decodeOnceFromConstraints(a,i)})}decodeOnceFromConstraints(r,i){return Ae(this,void 0,void 0,function*(){const s=yield navigator.mediaDevices.getUserMedia(r);return yield this.decodeOnceFromStream(s,i)})}decodeOnceFromStream(r,i){return Ae(this,void 0,void 0,function*(){this.reset();const s=yield this.attachStreamToVideo(r,i);return yield this.decodeOnce(s)})}decodeFromInputVideoDeviceContinuously(r,i,s){return Ae(this,void 0,void 0,function*(){return yield this.decodeFromVideoDevice(r,i,s)})}decodeFromVideoDevice(r,i,s){return Ae(this,void 0,void 0,function*(){let a;r?a={deviceId:{exact:r}}:a={facingMode:"environment"};const l={video:a};return yield this.decodeFromConstraints(l,i,s)})}decodeFromConstraints(r,i,s){return Ae(this,void 0,void 0,function*(){const a=yield navigator.mediaDevices.getUserMedia(r);return yield this.decodeFromStream(a,i,s)})}decodeFromStream(r,i,s){return Ae(this,void 0,void 0,function*(){this.reset();const a=yield this.attachStreamToVideo(r,i);return yield this.decodeContinuously(a,s)})}stopAsyncDecode(){this._stopAsyncDecode=!0}stopContinuousDecode(){this._stopContinuousDecode=!0}attachStreamToVideo(r,i){return Ae(this,void 0,void 0,function*(){const s=this.prepareVideoElement(i);return this.addVideoSource(s,r),this.videoElement=s,this.stream=r,yield this.playVideoOnLoadAsync(s),s})}playVideoOnLoadAsync(r){return new Promise((i,s)=>this.playVideoOnLoad(r,()=>i()))}playVideoOnLoad(r,i){this.videoEndedListener=()=>this.stopStreams(),this.videoCanPlayListener=()=>this.tryPlayVideo(r),r.addEventListener("ended",this.videoEndedListener),r.addEventListener("canplay",this.videoCanPlayListener),r.addEventListener("playing",i),this.tryPlayVideo(r)}isVideoPlaying(r){return r.currentTime>0&&!r.paused&&!r.ended&&r.readyState>2}tryPlayVideo(r){return Ae(this,void 0,void 0,function*(){if(this.isVideoPlaying(r)){console.warn("Trying to play video that is already playing.");return}try{yield r.play()}catch{console.warn("It was not possible to play the video.")}})}getMediaElement(r,i){const s=document.getElementById(r);if(!s)throw new C(`element with id '${r}' not found`);if(s.nodeName.toLowerCase()!==i.toLowerCase())throw new C(`element with id '${r}' must be an ${i} element`);return s}decodeFromImage(r,i){if(!r&&!i)throw new C("either imageElement with a src set or an url must be provided");return i&&!r?this.decodeFromImageUrl(i):this.decodeFromImageElement(r)}decodeFromVideo(r,i){if(!r&&!i)throw new C("Either an element with a src set or an URL must be provided");return i&&!r?this.decodeFromVideoUrl(i):this.decodeFromVideoElement(r)}decodeFromVideoContinuously(r,i,s){if(r===void 0&&i===void 0)throw new C("Either an element with a src set or an URL must be provided");return i&&!r?this.decodeFromVideoUrlContinuously(i,s):this.decodeFromVideoElementContinuously(r,s)}decodeFromImageElement(r){if(!r)throw new C("An image element must be provided.");this.reset();const i=this.prepareImageElement(r);this.imageElement=i;let s;return this.isImageLoaded(i)?s=this.decodeOnce(i,!1,!0):s=this._decodeOnLoadImage(i),s}decodeFromVideoElement(r){const i=this._decodeFromVideoElementSetup(r);return this._decodeOnLoadVideo(i)}decodeFromVideoElementContinuously(r,i){const s=this._decodeFromVideoElementSetup(r);return this._decodeOnLoadVideoContinuously(s,i)}_decodeFromVideoElementSetup(r){if(!r)throw new C("A video element must be provided.");this.reset();const i=this.prepareVideoElement(r);return this.videoElement=i,i}decodeFromImageUrl(r){if(!r)throw new C("An URL must be provided.");this.reset();const i=this.prepareImageElement();this.imageElement=i;const s=this._decodeOnLoadImage(i);return i.src=r,s}decodeFromVideoUrl(r){if(!r)throw new C("An URL must be provided.");this.reset();const i=this.prepareVideoElement(),s=this.decodeFromVideoElement(i);return i.src=r,s}decodeFromVideoUrlContinuously(r,i){if(!r)throw new C("An URL must be provided.");this.reset();const s=this.prepareVideoElement(),a=this.decodeFromVideoElementContinuously(s,i);return s.src=r,a}_decodeOnLoadImage(r){return new Promise((i,s)=>{this.imageLoadedListener=()=>this.decodeOnce(r,!1,!0).then(i,s),r.addEventListener("load",this.imageLoadedListener)})}_decodeOnLoadVideo(r){return Ae(this,void 0,void 0,function*(){return yield this.playVideoOnLoadAsync(r),yield this.decodeOnce(r)})}_decodeOnLoadVideoContinuously(r,i){return Ae(this,void 0,void 0,function*(){yield this.playVideoOnLoadAsync(r),this.decodeContinuously(r,i)})}isImageLoaded(r){return!(!r.complete||r.naturalWidth===0)}prepareImageElement(r){let i;return typeof r>"u"&&(i=document.createElement("img"),i.width=200,i.height=200),typeof r=="string"&&(i=this.getMediaElement(r,"img")),r instanceof HTMLImageElement&&(i=r),i}prepareVideoElement(r){let i;return!r&&typeof document<"u"&&(i=document.createElement("video"),i.width=200,i.height=200),typeof r=="string"&&(i=this.getMediaElement(r,"video")),r instanceof HTMLVideoElement&&(i=r),i.setAttribute("autoplay","true"),i.setAttribute("muted","true"),i.setAttribute("playsinline","true"),i}decodeOnce(r,i=!0,s=!0){this._stopAsyncDecode=!1;const a=(l,u)=>{if(this._stopAsyncDecode){u(new j("Video stream has ended before any code could be detected.")),this._stopAsyncDecode=void 0;return}try{const d=this.decode(r);l(d)}catch(d){const h=i&&d instanceof j,v=(d instanceof _||d instanceof B)&&s;if(h||v)return setTimeout(a,this._timeBetweenDecodingAttempts,l,u);u(d)}};return new Promise((l,u)=>a(l,u))}decodeContinuously(r,i){this._stopContinuousDecode=!1;const s=()=>{if(this._stopContinuousDecode){this._stopContinuousDecode=void 0;return}try{const a=this.decode(r);i(a,null),setTimeout(s,this.timeBetweenScansMillis)}catch(a){i(null,a);const l=a instanceof _||a instanceof B,u=a instanceof j;(l||u)&&setTimeout(s,this._timeBetweenDecodingAttempts)}};s()}decode(r){const i=this.createBinaryBitmap(r);return this.decodeBitmap(i)}_isHTMLVideoElement(r){return r.videoWidth!==0}drawFrameOnCanvas(r,i,s){i||(i={sx:0,sy:0,sWidth:r.videoWidth,sHeight:r.videoHeight,dx:0,dy:0,dWidth:r.videoWidth,dHeight:r.videoHeight}),s||(s=this.captureCanvasContext),s.drawImage(r,i.sx,i.sy,i.sWidth,i.sHeight,i.dx,i.dy,i.dWidth,i.dHeight)}drawImageOnCanvas(r,i,s=this.captureCanvasContext){i||(i={sx:0,sy:0,sWidth:r.naturalWidth,sHeight:r.naturalHeight,dx:0,dy:0,dWidth:r.naturalWidth,dHeight:r.naturalHeight}),s||(s=this.captureCanvasContext),s.drawImage(r,i.sx,i.sy,i.sWidth,i.sHeight,i.dx,i.dy,i.dWidth,i.dHeight)}createBinaryBitmap(r){this.getCaptureCanvasContext(r),this._isHTMLVideoElement(r)?this.drawFrameOnCanvas(r):this.drawImageOnCanvas(r);const i=this.getCaptureCanvas(r),s=new ge(i),a=new he(s);return new S(a)}getCaptureCanvasContext(r){if(!this.captureCanvasContext){const s=this.getCaptureCanvas(r).getContext("2d");this.captureCanvasContext=s}return this.captureCanvasContext}getCaptureCanvas(r){if(!this.captureCanvas){const i=this.createCaptureCanvas(r);this.captureCanvas=i}return this.captureCanvas}decodeBitmap(r){return this.reader.decode(r,this._hints)}createCaptureCanvas(r){if(typeof document>"u")return this._destroyCaptureCanvas(),null;const i=document.createElement("canvas");let s,a;return typeof r<"u"&&(r instanceof HTMLVideoElement?(s=r.videoWidth,a=r.videoHeight):r instanceof HTMLImageElement&&(s=r.naturalWidth||r.width,a=r.naturalHeight||r.height)),i.style.width=s+"px",i.style.height=a+"px",i.width=s,i.height=a,i}stopStreams(){this.stream&&(this.stream.getVideoTracks().forEach(r=>r.stop()),this.stream=void 0),this._stopAsyncDecode===!1&&this.stopAsyncDecode(),this._stopContinuousDecode===!1&&this.stopContinuousDecode()}reset(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()}_destroyVideoElement(){this.videoElement&&(typeof this.videoEndedListener<"u"&&this.videoElement.removeEventListener("ended",this.videoEndedListener),typeof this.videoPlayingEventListener<"u"&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),typeof this.videoCanPlayListener<"u"&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)}_destroyImageElement(){this.imageElement&&(this.imageLoadedListener!==void 0&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)}_destroyCaptureCanvas(){this.captureCanvasContext=void 0,this.captureCanvas=void 0}addVideoSource(r,i){try{r.srcObject=i}catch{r.src=URL.createObjectURL(i)}}cleanVideoSource(r){try{r.srcObject=null}catch{r.src=""}this.videoElement.removeAttribute("src")}}class ze{constructor(r,i,s=i==null?0:8*i.length,a,l,u=D.currentTimeMillis()){this.text=r,this.rawBytes=i,this.numBits=s,this.resultPoints=a,this.format=l,this.timestamp=u,this.text=r,this.rawBytes=i,s==null?this.numBits=i==null?0:8*i.length:this.numBits=s,this.resultPoints=a,this.format=l,this.resultMetadata=null,u==null?this.timestamp=D.currentTimeMillis():this.timestamp=u}getText(){return this.text}getRawBytes(){return this.rawBytes}getNumBits(){return this.numBits}getResultPoints(){return this.resultPoints}getBarcodeFormat(){return this.format}getResultMetadata(){return this.resultMetadata}putMetadata(r,i){this.resultMetadata===null&&(this.resultMetadata=new Map),this.resultMetadata.set(r,i)}putAllMetadata(r){r!==null&&(this.resultMetadata===null?this.resultMetadata=r:this.resultMetadata=new Map(r))}addResultPoints(r){const i=this.resultPoints;if(i===null)this.resultPoints=r;else if(r!==null&&r.length>0){const s=new Array(i.length+r.length);D.arraycopy(i,0,s,0,i.length),D.arraycopy(r,0,s,i.length,r.length),this.resultPoints=s}}getTimestamp(){return this.timestamp}toString(){return this.text}}var dn;(function(E){E[E.AZTEC=0]="AZTEC",E[E.CODABAR=1]="CODABAR",E[E.CODE_39=2]="CODE_39",E[E.CODE_93=3]="CODE_93",E[E.CODE_128=4]="CODE_128",E[E.DATA_MATRIX=5]="DATA_MATRIX",E[E.EAN_8=6]="EAN_8",E[E.EAN_13=7]="EAN_13",E[E.ITF=8]="ITF",E[E.MAXICODE=9]="MAXICODE",E[E.PDF_417=10]="PDF_417",E[E.QR_CODE=11]="QR_CODE",E[E.RSS_14=12]="RSS_14",E[E.RSS_EXPANDED=13]="RSS_EXPANDED",E[E.UPC_A=14]="UPC_A",E[E.UPC_E=15]="UPC_E",E[E.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"})(dn||(dn={}));var ce=dn,Mr;(function(E){E[E.OTHER=0]="OTHER",E[E.ORIENTATION=1]="ORIENTATION",E[E.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",E[E.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",E[E.ISSUE_NUMBER=4]="ISSUE_NUMBER",E[E.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",E[E.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",E[E.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",E[E.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",E[E.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",E[E.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"})(Mr||(Mr={}));var ht=Mr;class On{constructor(r,i,s,a,l=-1,u=-1){this.rawBytes=r,this.text=i,this.byteSegments=s,this.ecLevel=a,this.structuredAppendSequenceNumber=l,this.structuredAppendParity=u,this.numBits=r==null?0:8*r.length}getRawBytes(){return this.rawBytes}getNumBits(){return this.numBits}setNumBits(r){this.numBits=r}getText(){return this.text}getByteSegments(){return this.byteSegments}getECLevel(){return this.ecLevel}getErrorsCorrected(){return this.errorsCorrected}setErrorsCorrected(r){this.errorsCorrected=r}getErasures(){return this.erasures}setErasures(r){this.erasures=r}getOther(){return this.other}setOther(r){this.other=r}hasStructuredAppend(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0}getStructuredAppendParity(){return this.structuredAppendParity}getStructuredAppendSequenceNumber(){return this.structuredAppendSequenceNumber}}class Kr{exp(r){return this.expTable[r]}log(r){if(r===0)throw new y;return this.logTable[r]}static addOrSubtract(r,i){return r^i}}class Nt{constructor(r,i){if(i.length===0)throw new y;this.field=r;const s=i.length;if(s>1&&i[0]===0){let a=1;for(;a<s&&i[a]===0;)a++;a===s?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(s-a),D.arraycopy(i,a,this.coefficients,0,this.coefficients.length))}else this.coefficients=i}getCoefficients(){return this.coefficients}getDegree(){return this.coefficients.length-1}isZero(){return this.coefficients[0]===0}getCoefficient(r){return this.coefficients[this.coefficients.length-1-r]}evaluateAt(r){if(r===0)return this.getCoefficient(0);const i=this.coefficients;let s;if(r===1){s=0;for(let u=0,d=i.length;u!==d;u++){const h=i[u];s=Kr.addOrSubtract(s,h)}return s}s=i[0];const a=i.length,l=this.field;for(let u=1;u<a;u++)s=Kr.addOrSubtract(l.multiply(r,s),i[u]);return s}addOrSubtract(r){if(!this.field.equals(r.field))throw new y("GenericGFPolys do not have same GenericGF field");if(this.isZero())return r;if(r.isZero())return this;let i=this.coefficients,s=r.coefficients;if(i.length>s.length){const u=i;i=s,s=u}let a=new Int32Array(s.length);const l=s.length-i.length;D.arraycopy(s,0,a,0,l);for(let u=l;u<s.length;u++)a[u]=Kr.addOrSubtract(i[u-l],s[u]);return new Nt(this.field,a)}multiply(r){if(!this.field.equals(r.field))throw new y("GenericGFPolys do not have same GenericGF field");if(this.isZero()||r.isZero())return this.field.getZero();const i=this.coefficients,s=i.length,a=r.coefficients,l=a.length,u=new Int32Array(s+l-1),d=this.field;for(let h=0;h<s;h++){const p=i[h];for(let v=0;v<l;v++)u[h+v]=Kr.addOrSubtract(u[h+v],d.multiply(p,a[v]))}return new Nt(d,u)}multiplyScalar(r){if(r===0)return this.field.getZero();if(r===1)return this;const i=this.coefficients.length,s=this.field,a=new Int32Array(i),l=this.coefficients;for(let u=0;u<i;u++)a[u]=s.multiply(l[u],r);return new Nt(s,a)}multiplyByMonomial(r,i){if(r<0)throw new y;if(i===0)return this.field.getZero();const s=this.coefficients,a=s.length,l=new Int32Array(a+r),u=this.field;for(let d=0;d<a;d++)l[d]=u.multiply(s[d],i);return new Nt(u,l)}divide(r){if(!this.field.equals(r.field))throw new y("GenericGFPolys do not have same GenericGF field");if(r.isZero())throw new y("Divide by 0");const i=this.field;let s=i.getZero(),a=this;const l=r.getCoefficient(r.getDegree()),u=i.inverse(l);for(;a.getDegree()>=r.getDegree()&&!a.isZero();){const d=a.getDegree()-r.getDegree(),h=i.multiply(a.getCoefficient(a.getDegree()),u),p=r.multiplyByMonomial(d,h),v=i.buildMonomial(d,h);s=s.addOrSubtract(v),a=a.addOrSubtract(p)}return[s,a]}toString(){let r="";for(let i=this.getDegree();i>=0;i--){let s=this.getCoefficient(i);if(s!==0){if(s<0?(r+=" - ",s=-s):r.length>0&&(r+=" + "),i===0||s!==1){const a=this.field.log(s);a===0?r+="1":a===1?r+="a":(r+="a^",r+=a)}i!==0&&(i===1?r+="x":(r+="x^",r+=i))}}return r}}class ui extends m{}ui.kind="ArithmeticException";class _e extends Kr{constructor(r,i,s){super(),this.primitive=r,this.size=i,this.generatorBase=s;const a=new Int32Array(i);let l=1;for(let d=0;d<i;d++)a[d]=l,l*=2,l>=i&&(l^=r,l&=i-1);this.expTable=a;const u=new Int32Array(i);for(let d=0;d<i-1;d++)u[a[d]]=d;this.logTable=u,this.zero=new Nt(this,Int32Array.from([0])),this.one=new Nt(this,Int32Array.from([1]))}getZero(){return this.zero}getOne(){return this.one}buildMonomial(r,i){if(r<0)throw new y;if(i===0)return this.zero;const s=new Int32Array(r+1);return s[0]=i,new Nt(this,s)}inverse(r){if(r===0)throw new ui;return this.expTable[this.size-this.logTable[r]-1]}multiply(r,i){return r===0||i===0?0:this.expTable[(this.logTable[r]+this.logTable[i])%(this.size-1)]}getSize(){return this.size}getGeneratorBase(){return this.generatorBase}toString(){return"GF(0x"+R.toHexString(this.primitive)+","+this.size+")"}equals(r){return r===this}}_e.AZTEC_DATA_12=new _e(4201,4096,1),_e.AZTEC_DATA_10=new _e(1033,1024,1),_e.AZTEC_DATA_6=new _e(67,64,1),_e.AZTEC_PARAM=new _e(19,16,1),_e.QR_CODE_FIELD_256=new _e(285,256,0),_e.DATA_MATRIX_FIELD_256=new _e(301,256,1),_e.AZTEC_DATA_8=_e.DATA_MATRIX_FIELD_256,_e.MAXICODE_FIELD_64=_e.AZTEC_DATA_6;class hr extends m{}hr.kind="ReedSolomonException";class Gt extends m{}Gt.kind="IllegalStateException";class js{constructor(r){this.field=r}decode(r,i){const s=this.field,a=new Nt(s,r),l=new Int32Array(i);let u=!0;for(let N=0;N<i;N++){const M=a.evaluateAt(s.exp(N+s.getGeneratorBase()));l[l.length-1-N]=M,M!==0&&(u=!1)}if(u)return;const d=new Nt(s,l),h=this.runEuclideanAlgorithm(s.buildMonomial(i,1),d,i),p=h[0],v=h[1],b=this.findErrorLocations(p),A=this.findErrorMagnitudes(v,b);for(let N=0;N<b.length;N++){const M=r.length-1-s.log(b[N]);if(M<0)throw new hr("Bad error location");r[M]=_e.addOrSubtract(r[M],A[N])}}runEuclideanAlgorithm(r,i,s){if(r.getDegree()<i.getDegree()){const N=r;r=i,i=N}const a=this.field;let l=r,u=i,d=a.getZero(),h=a.getOne();for(;u.getDegree()>=(s/2|0);){let N=l,M=d;if(l=u,d=h,l.isZero())throw new hr("r_{i-1} was zero");u=N;let L=a.getZero();const F=l.getCoefficient(l.getDegree()),H=a.inverse(F);for(;u.getDegree()>=l.getDegree()&&!u.isZero();){const J=u.getDegree()-l.getDegree(),ee=a.multiply(u.getCoefficient(u.getDegree()),H);L=L.addOrSubtract(a.buildMonomial(J,ee)),u=u.addOrSubtract(l.multiplyByMonomial(J,ee))}if(h=L.multiply(d).addOrSubtract(M),u.getDegree()>=l.getDegree())throw new Gt("Division algorithm failed to reduce polynomial?")}const p=h.getCoefficient(0);if(p===0)throw new hr("sigmaTilde(0) was zero");const v=a.inverse(p),b=h.multiplyScalar(v),A=u.multiplyScalar(v);return[b,A]}findErrorLocations(r){const i=r.getDegree();if(i===1)return Int32Array.from([r.getCoefficient(1)]);const s=new Int32Array(i);let a=0;const l=this.field;for(let u=1;u<l.getSize()&&a<i;u++)r.evaluateAt(u)===0&&(s[a]=l.inverse(u),a++);if(a!==i)throw new hr("Error locator degree does not match number of roots");return s}findErrorMagnitudes(r,i){const s=i.length,a=new Int32Array(s),l=this.field;for(let u=0;u<s;u++){const d=l.inverse(i[u]);let h=1;for(let p=0;p<s;p++)if(u!==p){const v=l.multiply(i[p],d),b=v&1?v&-2:v|1;h=l.multiply(h,b)}a[u]=l.multiply(r.evaluateAt(d),l.inverse(h)),l.getGeneratorBase()!==0&&(a[u]=l.multiply(a[u],d))}return a}}var Ot;(function(E){E[E.UPPER=0]="UPPER",E[E.LOWER=1]="LOWER",E[E.MIXED=2]="MIXED",E[E.DIGIT=3]="DIGIT",E[E.PUNCT=4]="PUNCT",E[E.BINARY=5]="BINARY"})(Ot||(Ot={}));class $e{decode(r){this.ddata=r;let i=r.getBits(),s=this.extractBits(i),a=this.correctBits(s),l=$e.convertBoolArrayToByteArray(a),u=$e.getEncodedData(a),d=new On(l,u,null,null);return d.setNumBits(a.length),d}static highLevelDecode(r){return this.getEncodedData(r)}static getEncodedData(r){let i=r.length,s=Ot.UPPER,a=Ot.UPPER,l="",u=0;for(;u<i;)if(a===Ot.BINARY){if(i-u<5)break;let d=$e.readCode(r,u,5);if(u+=5,d===0){if(i-u<11)break;d=$e.readCode(r,u,11)+31,u+=11}for(let h=0;h<d;h++){if(i-u<8){u=i;break}const p=$e.readCode(r,u,8);l+=ne.castAsNonUtf8Char(p),u+=8}a=s}else{let d=a===Ot.DIGIT?4:5;if(i-u<d)break;let h=$e.readCode(r,u,d);u+=d;let p=$e.getCharacter(a,h);p.startsWith("CTRL_")?(s=a,a=$e.getTable(p.charAt(5)),p.charAt(6)==="L"&&(s=a)):(l+=p,a=s)}return l}static getTable(r){switch(r){case"L":return Ot.LOWER;case"P":return Ot.PUNCT;case"M":return Ot.MIXED;case"D":return Ot.DIGIT;case"B":return Ot.BINARY;case"U":default:return Ot.UPPER}}static getCharacter(r,i){switch(r){case Ot.UPPER:return $e.UPPER_TABLE[i];case Ot.LOWER:return $e.LOWER_TABLE[i];case Ot.MIXED:return $e.MIXED_TABLE[i];case Ot.PUNCT:return $e.PUNCT_TABLE[i];case Ot.DIGIT:return $e.DIGIT_TABLE[i];default:throw new Gt("Bad table")}}correctBits(r){let i,s;this.ddata.getNbLayers()<=2?(s=6,i=_e.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(s=8,i=_e.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(s=10,i=_e.AZTEC_DATA_10):(s=12,i=_e.AZTEC_DATA_12);let a=this.ddata.getNbDatablocks(),l=r.length/s;if(l<a)throw new B;let u=r.length%s,d=new Int32Array(l);for(let A=0;A<l;A++,u+=s)d[A]=$e.readCode(r,u,s);try{new js(i).decode(d,l-a)}catch(A){throw new B(A)}let h=(1<<s)-1,p=0;for(let A=0;A<a;A++){let N=d[A];if(N===0||N===h)throw new B;(N===1||N===h-1)&&p++}let v=new Array(a*s-p),b=0;for(let A=0;A<a;A++){let N=d[A];if(N===1||N===h-1)v.fill(N>1,b,b+s-1),b+=s-1;else for(let M=s-1;M>=0;--M)v[b++]=(N&1<<M)!==0}return v}extractBits(r){let i=this.ddata.isCompact(),s=this.ddata.getNbLayers(),a=(i?11:14)+s*4,l=new Int32Array(a),u=new Array(this.totalBitsInLayer(s,i));if(i)for(let d=0;d<l.length;d++)l[d]=d;else{let d=a+1+2*R.truncDivision(R.truncDivision(a,2)-1,15),h=a/2,p=R.truncDivision(d,2);for(let v=0;v<h;v++){let b=v+R.truncDivision(v,15);l[h-v-1]=p-b-1,l[h+v]=p+b+1}}for(let d=0,h=0;d<s;d++){let p=(s-d)*4+(i?9:12),v=d*2,b=a-1-v;for(let A=0;A<p;A++){let N=A*2;for(let M=0;M<2;M++)u[h+N+M]=r.get(l[v+M],l[v+A]),u[h+2*p+N+M]=r.get(l[v+A],l[b-M]),u[h+4*p+N+M]=r.get(l[b-M],l[b-A]),u[h+6*p+N+M]=r.get(l[b-A],l[v+M])}h+=p*8}return u}static readCode(r,i,s){let a=0;for(let l=i;l<i+s;l++)a<<=1,r[l]&&(a|=1);return a}static readByte(r,i){let s=r.length-i;return s>=8?$e.readCode(r,i,8):$e.readCode(r,i,s)<<8-s}static convertBoolArrayToByteArray(r){let i=new Uint8Array((r.length+7)/8);for(let s=0;s<i.length;s++)i[s]=$e.readByte(r,8*s);return i}totalBitsInLayer(r,i){return((i?88:112)+16*r)*r}}$e.UPPER_TABLE=["CTRL_PS"," ","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],$e.LOWER_TABLE=["CTRL_PS"," ","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],$e.MIXED_TABLE=["CTRL_PS"," ","\\1","\\2","\\3","\\4","\\5","\\6","\\7","\b"," ",`
|
|
483
|
-
`,"\\13","\f","\r","\\33","\\34","\\35","\\36","\\37","@","\\","^","_","`","|","~","\\177","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],$e.PUNCT_TABLE=["","\r",`\r
|
|
484
|
-
`,". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],$e.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"];class Ne{constructor(){}static round(r){return r===NaN?0:r<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:r>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:r+(r<0?-.5:.5)|0}static distance(r,i,s,a){const l=r-s,u=i-a;return Math.sqrt(l*l+u*u)}static sum(r){let i=0;for(let s=0,a=r.length;s!==a;s++){const l=r[s];i+=l}return i}}class ma{static floatToIntBits(r){return r}}ma.MAX_VALUE=Number.MAX_SAFE_INTEGER;class ue{constructor(r,i){this.x=r,this.y=i}getX(){return this.x}getY(){return this.y}equals(r){if(r instanceof ue){const i=r;return this.x===i.x&&this.y===i.y}return!1}hashCode(){return 31*ma.floatToIntBits(this.x)+ma.floatToIntBits(this.y)}toString(){return"("+this.x+","+this.y+")"}static orderBestPatterns(r){const i=this.distance(r[0],r[1]),s=this.distance(r[1],r[2]),a=this.distance(r[0],r[2]);let l,u,d;if(s>=i&&s>=a?(u=r[0],l=r[1],d=r[2]):a>=s&&a>=i?(u=r[1],l=r[0],d=r[2]):(u=r[2],l=r[0],d=r[1]),this.crossProductZ(l,u,d)<0){const h=l;l=d,d=h}r[0]=l,r[1]=u,r[2]=d}static distance(r,i){return Ne.distance(r.x,r.y,i.x,i.y)}static crossProductZ(r,i,s){const a=i.x,l=i.y;return(s.x-a)*(r.y-l)-(s.y-l)*(r.x-a)}}class xa{constructor(r,i){this.bits=r,this.points=i}getBits(){return this.bits}getPoints(){return this.points}}class $0 extends xa{constructor(r,i,s,a,l){super(r,i),this.compact=s,this.nbDatablocks=a,this.nbLayers=l}getNbLayers(){return this.nbLayers}getNbDatablocks(){return this.nbDatablocks}isCompact(){return this.compact}}class hn{constructor(r,i,s,a){this.image=r,this.height=r.getHeight(),this.width=r.getWidth(),i==null&&(i=hn.INIT_SIZE),s==null&&(s=r.getWidth()/2|0),a==null&&(a=r.getHeight()/2|0);const l=i/2|0;if(this.leftInit=s-l,this.rightInit=s+l,this.upInit=a-l,this.downInit=a+l,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new j}detect(){let r=this.leftInit,i=this.rightInit,s=this.upInit,a=this.downInit,l=!1,u=!0,d=!1,h=!1,p=!1,v=!1,b=!1;const A=this.width,N=this.height;for(;u;){u=!1;let M=!0;for(;(M||!h)&&i<A;)M=this.containsBlackPoint(s,a,i,!1),M?(i++,u=!0,h=!0):h||i++;if(i>=A){l=!0;break}let L=!0;for(;(L||!p)&&a<N;)L=this.containsBlackPoint(r,i,a,!0),L?(a++,u=!0,p=!0):p||a++;if(a>=N){l=!0;break}let F=!0;for(;(F||!v)&&r>=0;)F=this.containsBlackPoint(s,a,r,!1),F?(r--,u=!0,v=!0):v||r--;if(r<0){l=!0;break}let H=!0;for(;(H||!b)&&s>=0;)H=this.containsBlackPoint(r,i,s,!0),H?(s--,u=!0,b=!0):b||s--;if(s<0){l=!0;break}u&&(d=!0)}if(!l&&d){const M=i-r;let L=null;for(let ee=1;L===null&&ee<M;ee++)L=this.getBlackPointOnSegment(r,a-ee,r+ee,a);if(L==null)throw new j;let F=null;for(let ee=1;F===null&&ee<M;ee++)F=this.getBlackPointOnSegment(r,s+ee,r+ee,s);if(F==null)throw new j;let H=null;for(let ee=1;H===null&&ee<M;ee++)H=this.getBlackPointOnSegment(i,s+ee,i-ee,s);if(H==null)throw new j;let J=null;for(let ee=1;J===null&&ee<M;ee++)J=this.getBlackPointOnSegment(i,a-ee,i-ee,a);if(J==null)throw new j;return this.centerEdges(J,L,H,F)}else throw new j}getBlackPointOnSegment(r,i,s,a){const l=Ne.round(Ne.distance(r,i,s,a)),u=(s-r)/l,d=(a-i)/l,h=this.image;for(let p=0;p<l;p++){const v=Ne.round(r+p*u),b=Ne.round(i+p*d);if(h.get(v,b))return new ue(v,b)}return null}centerEdges(r,i,s,a){const l=r.getX(),u=r.getY(),d=i.getX(),h=i.getY(),p=s.getX(),v=s.getY(),b=a.getX(),A=a.getY(),N=hn.CORR;return l<this.width/2?[new ue(b-N,A+N),new ue(d+N,h+N),new ue(p-N,v-N),new ue(l+N,u-N)]:[new ue(b+N,A+N),new ue(d+N,h-N),new ue(p-N,v+N),new ue(l-N,u-N)]}containsBlackPoint(r,i,s,a){const l=this.image;if(a){for(let u=r;u<=i;u++)if(l.get(u,s))return!0}else for(let u=r;u<=i;u++)if(l.get(s,u))return!0;return!1}}hn.INIT_SIZE=10,hn.CORR=1;class Jc{static checkAndNudgePoints(r,i){const s=r.getWidth(),a=r.getHeight();let l=!0;for(let u=0;u<i.length&&l;u+=2){const d=Math.floor(i[u]),h=Math.floor(i[u+1]);if(d<-1||d>s||h<-1||h>a)throw new j;l=!1,d===-1?(i[u]=0,l=!0):d===s&&(i[u]=s-1,l=!0),h===-1?(i[u+1]=0,l=!0):h===a&&(i[u+1]=a-1,l=!0)}l=!0;for(let u=i.length-2;u>=0&&l;u-=2){const d=Math.floor(i[u]),h=Math.floor(i[u+1]);if(d<-1||d>s||h<-1||h>a)throw new j;l=!1,d===-1?(i[u]=0,l=!0):d===s&&(i[u]=s-1,l=!0),h===-1?(i[u+1]=0,l=!0):h===a&&(i[u+1]=a-1,l=!0)}}}class Pr{constructor(r,i,s,a,l,u,d,h,p){this.a11=r,this.a21=i,this.a31=s,this.a12=a,this.a22=l,this.a32=u,this.a13=d,this.a23=h,this.a33=p}static quadrilateralToQuadrilateral(r,i,s,a,l,u,d,h,p,v,b,A,N,M,L,F){const H=Pr.quadrilateralToSquare(r,i,s,a,l,u,d,h);return Pr.squareToQuadrilateral(p,v,b,A,N,M,L,F).times(H)}transformPoints(r){const i=r.length,s=this.a11,a=this.a12,l=this.a13,u=this.a21,d=this.a22,h=this.a23,p=this.a31,v=this.a32,b=this.a33;for(let A=0;A<i;A+=2){const N=r[A],M=r[A+1],L=l*N+h*M+b;r[A]=(s*N+u*M+p)/L,r[A+1]=(a*N+d*M+v)/L}}transformPointsWithValues(r,i){const s=this.a11,a=this.a12,l=this.a13,u=this.a21,d=this.a22,h=this.a23,p=this.a31,v=this.a32,b=this.a33,A=r.length;for(let N=0;N<A;N++){const M=r[N],L=i[N],F=l*M+h*L+b;r[N]=(s*M+u*L+p)/F,i[N]=(a*M+d*L+v)/F}}static squareToQuadrilateral(r,i,s,a,l,u,d,h){const p=r-s+l-d,v=i-a+u-h;if(p===0&&v===0)return new Pr(s-r,l-s,r,a-i,u-a,i,0,0,1);{const b=s-l,A=d-l,N=a-u,M=h-u,L=b*M-A*N,F=(p*M-A*v)/L,H=(b*v-p*N)/L;return new Pr(s-r+F*s,d-r+H*d,r,a-i+F*a,h-i+H*h,i,F,H,1)}}static quadrilateralToSquare(r,i,s,a,l,u,d,h){return Pr.squareToQuadrilateral(r,i,s,a,l,u,d,h).buildAdjoint()}buildAdjoint(){return new Pr(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)}times(r){return new Pr(this.a11*r.a11+this.a21*r.a12+this.a31*r.a13,this.a11*r.a21+this.a21*r.a22+this.a31*r.a23,this.a11*r.a31+this.a21*r.a32+this.a31*r.a33,this.a12*r.a11+this.a22*r.a12+this.a32*r.a13,this.a12*r.a21+this.a22*r.a22+this.a32*r.a23,this.a12*r.a31+this.a22*r.a32+this.a32*r.a33,this.a13*r.a11+this.a23*r.a12+this.a33*r.a13,this.a13*r.a21+this.a23*r.a22+this.a33*r.a23,this.a13*r.a31+this.a23*r.a32+this.a33*r.a33)}}class V0 extends Jc{sampleGrid(r,i,s,a,l,u,d,h,p,v,b,A,N,M,L,F,H,J,ee){const Q=Pr.quadrilateralToQuadrilateral(a,l,u,d,h,p,v,b,A,N,M,L,F,H,J,ee);return this.sampleGridWithTransform(r,i,s,Q)}sampleGridWithTransform(r,i,s,a){if(i<=0||s<=0)throw new j;const l=new le(i,s),u=new Float32Array(2*i);for(let d=0;d<s;d++){const h=u.length,p=d+.5;for(let v=0;v<h;v+=2)u[v]=v/2+.5,u[v+1]=p;a.transformPoints(u),Jc.checkAndNudgePoints(r,u);try{for(let v=0;v<h;v+=2)r.get(Math.floor(u[v]),Math.floor(u[v+1]))&&l.set(v/2,d)}catch{throw new j}}return l}}class kn{static setGridSampler(r){kn.gridSampler=r}static getInstance(){return kn.gridSampler}}kn.gridSampler=new V0;class Xt{constructor(r,i){this.x=r,this.y=i}toResultPoint(){return new ue(this.getX(),this.getY())}getX(){return this.x}getY(){return this.y}}class H0{constructor(r){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=r}detect(){return this.detectMirror(!1)}detectMirror(r){let i=this.getMatrixCenter(),s=this.getBullsEyeCorners(i);if(r){let u=s[0];s[0]=s[2],s[2]=u}this.extractParameters(s);let a=this.sampleGrid(this.image,s[this.shift%4],s[(this.shift+1)%4],s[(this.shift+2)%4],s[(this.shift+3)%4]),l=this.getMatrixCornerPoints(s);return new $0(a,l,this.compact,this.nbDataBlocks,this.nbLayers)}extractParameters(r){if(!this.isValidPoint(r[0])||!this.isValidPoint(r[1])||!this.isValidPoint(r[2])||!this.isValidPoint(r[3]))throw new j;let i=2*this.nbCenterLayers,s=new Int32Array([this.sampleLine(r[0],r[1],i),this.sampleLine(r[1],r[2],i),this.sampleLine(r[2],r[3],i),this.sampleLine(r[3],r[0],i)]);this.shift=this.getRotation(s,i);let a=0;for(let u=0;u<4;u++){let d=s[(this.shift+u)%4];this.compact?(a<<=7,a+=d>>1&127):(a<<=10,a+=(d>>2&992)+(d>>1&31))}let l=this.getCorrectedParameterData(a,this.compact);this.compact?(this.nbLayers=(l>>6)+1,this.nbDataBlocks=(l&63)+1):(this.nbLayers=(l>>11)+1,this.nbDataBlocks=(l&2047)+1)}getRotation(r,i){let s=0;r.forEach((a,l,u)=>{let d=(a>>i-2<<1)+(a&1);s=(s<<3)+d}),s=((s&1)<<11)+(s>>1);for(let a=0;a<4;a++)if(R.bitCount(s^this.EXPECTED_CORNER_BITS[a])<=2)return a;throw new j}getCorrectedParameterData(r,i){let s,a;i?(s=7,a=2):(s=10,a=4);let l=s-a,u=new Int32Array(s);for(let h=s-1;h>=0;--h)u[h]=r&15,r>>=4;try{new js(_e.AZTEC_PARAM).decode(u,l)}catch{throw new j}let d=0;for(let h=0;h<a;h++)d=(d<<4)+u[h];return d}getBullsEyeCorners(r){let i=r,s=r,a=r,l=r,u=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){let b=this.getFirstDifferent(i,u,1,-1),A=this.getFirstDifferent(s,u,1,1),N=this.getFirstDifferent(a,u,-1,1),M=this.getFirstDifferent(l,u,-1,-1);if(this.nbCenterLayers>2){let L=this.distancePoint(M,b)*this.nbCenterLayers/(this.distancePoint(l,i)*(this.nbCenterLayers+2));if(L<.75||L>1.25||!this.isWhiteOrBlackRectangle(b,A,N,M))break}i=b,s=A,a=N,l=M,u=!u}if(this.nbCenterLayers!==5&&this.nbCenterLayers!==7)throw new j;this.compact=this.nbCenterLayers===5;let d=new ue(i.getX()+.5,i.getY()-.5),h=new ue(s.getX()+.5,s.getY()+.5),p=new ue(a.getX()-.5,a.getY()+.5),v=new ue(l.getX()-.5,l.getY()-.5);return this.expandSquare([d,h,p,v],2*this.nbCenterLayers-3,2*this.nbCenterLayers)}getMatrixCenter(){let r,i,s,a;try{let d=new hn(this.image).detect();r=d[0],i=d[1],s=d[2],a=d[3]}catch{let h=this.image.getWidth()/2,p=this.image.getHeight()/2;r=this.getFirstDifferent(new Xt(h+7,p-7),!1,1,-1).toResultPoint(),i=this.getFirstDifferent(new Xt(h+7,p+7),!1,1,1).toResultPoint(),s=this.getFirstDifferent(new Xt(h-7,p+7),!1,-1,1).toResultPoint(),a=this.getFirstDifferent(new Xt(h-7,p-7),!1,-1,-1).toResultPoint()}let l=Ne.round((r.getX()+a.getX()+i.getX()+s.getX())/4),u=Ne.round((r.getY()+a.getY()+i.getY()+s.getY())/4);try{let d=new hn(this.image,15,l,u).detect();r=d[0],i=d[1],s=d[2],a=d[3]}catch{r=this.getFirstDifferent(new Xt(l+7,u-7),!1,1,-1).toResultPoint(),i=this.getFirstDifferent(new Xt(l+7,u+7),!1,1,1).toResultPoint(),s=this.getFirstDifferent(new Xt(l-7,u+7),!1,-1,1).toResultPoint(),a=this.getFirstDifferent(new Xt(l-7,u-7),!1,-1,-1).toResultPoint()}return l=Ne.round((r.getX()+a.getX()+i.getX()+s.getX())/4),u=Ne.round((r.getY()+a.getY()+i.getY()+s.getY())/4),new Xt(l,u)}getMatrixCornerPoints(r){return this.expandSquare(r,2*this.nbCenterLayers,this.getDimension())}sampleGrid(r,i,s,a,l){let u=kn.getInstance(),d=this.getDimension(),h=d/2-this.nbCenterLayers,p=d/2+this.nbCenterLayers;return u.sampleGrid(r,d,d,h,h,p,h,p,p,h,p,i.getX(),i.getY(),s.getX(),s.getY(),a.getX(),a.getY(),l.getX(),l.getY())}sampleLine(r,i,s){let a=0,l=this.distanceResultPoint(r,i),u=l/s,d=r.getX(),h=r.getY(),p=u*(i.getX()-r.getX())/l,v=u*(i.getY()-r.getY())/l;for(let b=0;b<s;b++)this.image.get(Ne.round(d+b*p),Ne.round(h+b*v))&&(a|=1<<s-b-1);return a}isWhiteOrBlackRectangle(r,i,s,a){let l=3;r=new Xt(r.getX()-l,r.getY()+l),i=new Xt(i.getX()-l,i.getY()-l),s=new Xt(s.getX()+l,s.getY()-l),a=new Xt(a.getX()+l,a.getY()+l);let u=this.getColor(a,r);if(u===0)return!1;let d=this.getColor(r,i);return d!==u||(d=this.getColor(i,s),d!==u)?!1:(d=this.getColor(s,a),d===u)}getColor(r,i){let s=this.distancePoint(r,i),a=(i.getX()-r.getX())/s,l=(i.getY()-r.getY())/s,u=0,d=r.getX(),h=r.getY(),p=this.image.get(r.getX(),r.getY()),v=Math.ceil(s);for(let A=0;A<v;A++)d+=a,h+=l,this.image.get(Ne.round(d),Ne.round(h))!==p&&u++;let b=u/s;return b>.1&&b<.9?0:b<=.1===p?1:-1}getFirstDifferent(r,i,s,a){let l=r.getX()+s,u=r.getY()+a;for(;this.isValid(l,u)&&this.image.get(l,u)===i;)l+=s,u+=a;for(l-=s,u-=a;this.isValid(l,u)&&this.image.get(l,u)===i;)l+=s;for(l-=s;this.isValid(l,u)&&this.image.get(l,u)===i;)u+=a;return u-=a,new Xt(l,u)}expandSquare(r,i,s){let a=s/(2*i),l=r[0].getX()-r[2].getX(),u=r[0].getY()-r[2].getY(),d=(r[0].getX()+r[2].getX())/2,h=(r[0].getY()+r[2].getY())/2,p=new ue(d+a*l,h+a*u),v=new ue(d-a*l,h-a*u);l=r[1].getX()-r[3].getX(),u=r[1].getY()-r[3].getY(),d=(r[1].getX()+r[3].getX())/2,h=(r[1].getY()+r[3].getY())/2;let b=new ue(d+a*l,h+a*u),A=new ue(d-a*l,h-a*u);return[p,b,v,A]}isValid(r,i){return r>=0&&r<this.image.getWidth()&&i>0&&i<this.image.getHeight()}isValidPoint(r){let i=Ne.round(r.getX()),s=Ne.round(r.getY());return this.isValid(i,s)}distancePoint(r,i){return Ne.distance(r.getX(),r.getY(),i.getX(),i.getY())}distanceResultPoint(r,i){return Ne.distance(r.getX(),r.getY(),i.getX(),i.getY())}getDimension(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(R.truncDivision(this.nbLayers-4,8)+1)+15}}class wa{decode(r,i=null){let s=null,a=new H0(r.getBlackMatrix()),l=null,u=null;try{let v=a.detectMirror(!1);l=v.getPoints(),this.reportFoundResultPoints(i,l),u=new $e().decode(v)}catch(v){s=v}if(u==null)try{let v=a.detectMirror(!0);l=v.getPoints(),this.reportFoundResultPoints(i,l),u=new $e().decode(v)}catch(v){throw s??v}let d=new ze(u.getText(),u.getRawBytes(),u.getNumBits(),l,ce.AZTEC,D.currentTimeMillis()),h=u.getByteSegments();h!=null&&d.putMetadata(ht.BYTE_SEGMENTS,h);let p=u.getECLevel();return p!=null&&d.putMetadata(ht.ERROR_CORRECTION_LEVEL,p),d}reportFoundResultPoints(r,i){if(r!=null){let s=r.get(W.NEED_RESULT_POINT_CALLBACK);s!=null&&i.forEach((a,l,u)=>{s.foundPossibleResultPoint(a)})}}reset(){}}class Jv extends wt{constructor(r=500){super(new wa,r)}}class gt{decode(r,i){try{return this.doDecode(r,i)}catch{if(i&&i.get(W.TRY_HARDER)===!0&&r.isRotateSupported()){const l=r.rotateCounterClockwise(),u=this.doDecode(l,i),d=u.getResultMetadata();let h=270;d!==null&&d.get(ht.ORIENTATION)===!0&&(h=h+d.get(ht.ORIENTATION)%360),u.putMetadata(ht.ORIENTATION,h);const p=u.getResultPoints();if(p!==null){const v=l.getHeight();for(let b=0;b<p.length;b++)p[b]=new ue(v-p[b].getY()-1,p[b].getX())}return u}else throw new j}}reset(){}doDecode(r,i){const s=r.getWidth(),a=r.getHeight();let l=new U(s);const u=i&&i.get(W.TRY_HARDER)===!0,d=Math.max(1,a>>(u?8:5));let h;u?h=a:h=15;const p=Math.trunc(a/2);for(let v=0;v<h;v++){const b=Math.trunc((v+1)/2),A=(v&1)===0,N=p+d*(A?b:-b);if(N<0||N>=a)break;try{l=r.getBlackRow(N,l)}catch{continue}for(let M=0;M<2;M++){if(M===1&&(l.reverse(),i&&i.get(W.NEED_RESULT_POINT_CALLBACK)===!0)){const L=new Map;i.forEach((F,H)=>L.set(H,F)),L.delete(W.NEED_RESULT_POINT_CALLBACK),i=L}try{const L=this.decodeRow(N,l,i);if(M===1){L.putMetadata(ht.ORIENTATION,180);const F=L.getResultPoints();F!==null&&(F[0]=new ue(s-F[0].getX()-1,F[0].getY()),F[1]=new ue(s-F[1].getX()-1,F[1].getY()))}return L}catch{}}}throw new j}static recordPattern(r,i,s){const a=s.length;for(let p=0;p<a;p++)s[p]=0;const l=r.getSize();if(i>=l)throw new j;let u=!r.get(i),d=0,h=i;for(;h<l;){if(r.get(h)!==u)s[d]++;else{if(++d===a)break;s[d]=1,u=!u}h++}if(!(d===a||d===a-1&&h===l))throw new j}static recordPatternInReverse(r,i,s){let a=s.length,l=r.get(i);for(;i>0&&a>=0;)r.get(--i)!==l&&(a--,l=!l);if(a>=0)throw new j;gt.recordPattern(r,i+1,s)}static patternMatchVariance(r,i,s){const a=r.length;let l=0,u=0;for(let p=0;p<a;p++)l+=r[p],u+=i[p];if(l<u)return Number.POSITIVE_INFINITY;const d=l/u;s*=d;let h=0;for(let p=0;p<a;p++){const v=r[p],b=i[p]*d,A=v>b?v-b:b-v;if(A>s)return Number.POSITIVE_INFINITY;h+=A}return h/l}}class te extends gt{static findStartPattern(r){const i=r.getSize(),s=r.getNextSet(0);let a=0,l=Int32Array.from([0,0,0,0,0,0]),u=s,d=!1;const h=6;for(let p=s;p<i;p++)if(r.get(p)!==d)l[a]++;else{if(a===h-1){let v=te.MAX_AVG_VARIANCE,b=-1;for(let A=te.CODE_START_A;A<=te.CODE_START_C;A++){const N=gt.patternMatchVariance(l,te.CODE_PATTERNS[A],te.MAX_INDIVIDUAL_VARIANCE);N<v&&(v=N,b=A)}if(b>=0&&r.isRange(Math.max(0,u-(p-u)/2),u,!1))return Int32Array.from([u,p,b]);u+=l[0]+l[1],l=l.slice(2,l.length-1),l[a-1]=0,l[a]=0,a--}else a++;l[a]=1,d=!d}throw new j}static decodeCode(r,i,s){gt.recordPattern(r,s,i);let a=te.MAX_AVG_VARIANCE,l=-1;for(let u=0;u<te.CODE_PATTERNS.length;u++){const d=te.CODE_PATTERNS[u],h=this.patternMatchVariance(i,d,te.MAX_INDIVIDUAL_VARIANCE);h<a&&(a=h,l=u)}if(l>=0)return l;throw new j}decodeRow(r,i,s){const a=s&&s.get(W.ASSUME_GS1)===!0,l=te.findStartPattern(i),u=l[2];let d=0;const h=new Uint8Array(20);h[d++]=u;let p;switch(u){case te.CODE_START_A:p=te.CODE_CODE_A;break;case te.CODE_START_B:p=te.CODE_CODE_B;break;case te.CODE_START_C:p=te.CODE_CODE_C;break;default:throw new B}let v=!1,b=!1,A="",N=l[0],M=l[1];const L=Int32Array.from([0,0,0,0,0,0]);let F=0,H=0,J=u,ee=0,Q=!0,Te=!1,ye=!1;for(;!v;){const Xi=b;switch(b=!1,F=H,H=te.decodeCode(i,L,M),h[d++]=H,H!==te.CODE_STOP&&(Q=!0),H!==te.CODE_STOP&&(ee++,J+=ee*H),N=M,M+=L.reduce((R3,_3)=>R3+_3,0),H){case te.CODE_START_A:case te.CODE_START_B:case te.CODE_START_C:throw new B}switch(p){case te.CODE_CODE_A:if(H<64)ye===Te?A+=String.fromCharCode(32+H):A+=String.fromCharCode(32+H+128),ye=!1;else if(H<96)ye===Te?A+=String.fromCharCode(H-64):A+=String.fromCharCode(H+64),ye=!1;else switch(H!==te.CODE_STOP&&(Q=!1),H){case te.CODE_FNC_1:a&&(A.length===0?A+="]C1":A+="");break;case te.CODE_FNC_2:case te.CODE_FNC_3:break;case te.CODE_FNC_4_A:!Te&&ye?(Te=!0,ye=!1):Te&&ye?(Te=!1,ye=!1):ye=!0;break;case te.CODE_SHIFT:b=!0,p=te.CODE_CODE_B;break;case te.CODE_CODE_B:p=te.CODE_CODE_B;break;case te.CODE_CODE_C:p=te.CODE_CODE_C;break;case te.CODE_STOP:v=!0;break}break;case te.CODE_CODE_B:if(H<96)ye===Te?A+=String.fromCharCode(32+H):A+=String.fromCharCode(32+H+128),ye=!1;else switch(H!==te.CODE_STOP&&(Q=!1),H){case te.CODE_FNC_1:a&&(A.length===0?A+="]C1":A+="");break;case te.CODE_FNC_2:case te.CODE_FNC_3:break;case te.CODE_FNC_4_B:!Te&&ye?(Te=!0,ye=!1):Te&&ye?(Te=!1,ye=!1):ye=!0;break;case te.CODE_SHIFT:b=!0,p=te.CODE_CODE_A;break;case te.CODE_CODE_A:p=te.CODE_CODE_A;break;case te.CODE_CODE_C:p=te.CODE_CODE_C;break;case te.CODE_STOP:v=!0;break}break;case te.CODE_CODE_C:if(H<100)H<10&&(A+="0"),A+=H;else switch(H!==te.CODE_STOP&&(Q=!1),H){case te.CODE_FNC_1:a&&(A.length===0?A+="]C1":A+="");break;case te.CODE_CODE_A:p=te.CODE_CODE_A;break;case te.CODE_CODE_B:p=te.CODE_CODE_B;break;case te.CODE_STOP:v=!0;break}break}Xi&&(p=p===te.CODE_CODE_A?te.CODE_CODE_B:te.CODE_CODE_A)}const nr=M-N;if(M=i.getNextUnset(M),!i.isRange(M,Math.min(i.getSize(),M+(M-N)/2),!1))throw new j;if(J-=ee*F,J%103!==F)throw new _;const Br=A.length;if(Br===0)throw new j;Br>0&&Q&&(p===te.CODE_CODE_C?A=A.substring(0,Br-2):A=A.substring(0,Br-1));const ir=(l[1]+l[0])/2,We=N+nr/2,Mt=h.length,gr=new Uint8Array(Mt);for(let Xi=0;Xi<Mt;Xi++)gr[Xi]=h[Xi];const Gi=[new ue(ir,r),new ue(We,r)];return new ze(A,gr,0,Gi,ce.CODE_128,new Date().getTime())}}te.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],te.MAX_AVG_VARIANCE=.25,te.MAX_INDIVIDUAL_VARIANCE=.7,te.CODE_SHIFT=98,te.CODE_CODE_C=99,te.CODE_CODE_B=100,te.CODE_CODE_A=101,te.CODE_FNC_1=102,te.CODE_FNC_2=97,te.CODE_FNC_3=96,te.CODE_FNC_4_A=101,te.CODE_FNC_4_B=100,te.CODE_START_A=103,te.CODE_START_B=104,te.CODE_START_C=105,te.CODE_STOP=106;class vt extends gt{constructor(r=!1,i=!1){super(),this.usingCheckDigit=r,this.extendedMode=i,this.decodeRowResult="",this.counters=new Int32Array(9)}decodeRow(r,i,s){let a=this.counters;a.fill(0),this.decodeRowResult="";let l=vt.findAsteriskPattern(i,a),u=i.getNextSet(l[1]),d=i.getSize(),h,p;do{vt.recordPattern(i,u,a);let L=vt.toNarrowWidePattern(a);if(L<0)throw new j;h=vt.patternToChar(L),this.decodeRowResult+=h,p=u;for(let F of a)u+=F;u=i.getNextSet(u)}while(h!=="*");this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);let v=0;for(let L of a)v+=L;let b=u-p-v;if(u!==d&&b*2<v)throw new j;if(this.usingCheckDigit){let L=this.decodeRowResult.length-1,F=0;for(let H=0;H<L;H++)F+=vt.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(H));if(this.decodeRowResult.charAt(L)!==vt.ALPHABET_STRING.charAt(F%43))throw new _;this.decodeRowResult=this.decodeRowResult.substring(0,L)}if(this.decodeRowResult.length===0)throw new j;let A;this.extendedMode?A=vt.decodeExtended(this.decodeRowResult):A=this.decodeRowResult;let N=(l[1]+l[0])/2,M=p+v/2;return new ze(A,null,0,[new ue(N,r),new ue(M,r)],ce.CODE_39,new Date().getTime())}static findAsteriskPattern(r,i){let s=r.getSize(),a=r.getNextSet(0),l=0,u=a,d=!1,h=i.length;for(let p=a;p<s;p++)if(r.get(p)!==d)i[l]++;else{if(l===h-1){if(this.toNarrowWidePattern(i)===vt.ASTERISK_ENCODING&&r.isRange(Math.max(0,u-Math.floor((p-u)/2)),u,!1))return[u,p];u+=i[0]+i[1],i.copyWithin(0,2,2+l-1),i[l-1]=0,i[l]=0,l--}else l++;i[l]=1,d=!d}throw new j}static toNarrowWidePattern(r){let i=r.length,s=0,a;do{let l=2147483647;for(let h of r)h<l&&h>s&&(l=h);s=l,a=0;let u=0,d=0;for(let h=0;h<i;h++){let p=r[h];p>s&&(d|=1<<i-1-h,a++,u+=p)}if(a===3){for(let h=0;h<i&&a>0;h++){let p=r[h];if(p>s&&(a--,p*2>=u))return-1}return d}}while(a>3);return-1}static patternToChar(r){for(let i=0;i<vt.CHARACTER_ENCODINGS.length;i++)if(vt.CHARACTER_ENCODINGS[i]===r)return vt.ALPHABET_STRING.charAt(i);if(r===vt.ASTERISK_ENCODING)return"*";throw new j}static decodeExtended(r){let i=r.length,s="";for(let a=0;a<i;a++){let l=r.charAt(a);if(l==="+"||l==="$"||l==="%"||l==="/"){let u=r.charAt(a+1),d="\0";switch(l){case"+":if(u>="A"&&u<="Z")d=String.fromCharCode(u.charCodeAt(0)+32);else throw new B;break;case"$":if(u>="A"&&u<="Z")d=String.fromCharCode(u.charCodeAt(0)-64);else throw new B;break;case"%":if(u>="A"&&u<="E")d=String.fromCharCode(u.charCodeAt(0)-38);else if(u>="F"&&u<="J")d=String.fromCharCode(u.charCodeAt(0)-11);else if(u>="K"&&u<="O")d=String.fromCharCode(u.charCodeAt(0)+16);else if(u>="P"&&u<="T")d=String.fromCharCode(u.charCodeAt(0)+43);else if(u==="U")d="\0";else if(u==="V")d="@";else if(u==="W")d="`";else if(u==="X"||u==="Y"||u==="Z")d="";else throw new B;break;case"/":if(u>="A"&&u<="O")d=String.fromCharCode(u.charCodeAt(0)-32);else if(u==="Z")d=":";else throw new B;break}s+=d,a++}else s+=l}return s}}vt.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",vt.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],vt.ASTERISK_ENCODING=148;class Ue extends gt{constructor(){super(...arguments),this.narrowLineWidth=-1}decodeRow(r,i,s){let a=this.decodeStart(i),l=this.decodeEnd(i),u=new K;Ue.decodeMiddle(i,a[1],l[0],u);let d=u.toString(),h=null;s!=null&&(h=s.get(W.ALLOWED_LENGTHS)),h==null&&(h=Ue.DEFAULT_ALLOWED_LENGTHS);let p=d.length,v=!1,b=0;for(let M of h){if(p===M){v=!0;break}M>b&&(b=M)}if(!v&&p>b&&(v=!0),!v)throw new B;const A=[new ue(a[1],r),new ue(l[0],r)];return new ze(d,null,0,A,ce.ITF,new Date().getTime())}static decodeMiddle(r,i,s,a){let l=new Int32Array(10),u=new Int32Array(5),d=new Int32Array(5);for(l.fill(0),u.fill(0),d.fill(0);i<s;){gt.recordPattern(r,i,l);for(let p=0;p<5;p++){let v=2*p;u[p]=l[v],d[p]=l[v+1]}let h=Ue.decodeDigit(u);a.append(h.toString()),h=this.decodeDigit(d),a.append(h.toString()),l.forEach(function(p){i+=p})}}decodeStart(r){let i=Ue.skipWhiteSpace(r),s=Ue.findGuardPattern(r,i,Ue.START_PATTERN);return this.narrowLineWidth=(s[1]-s[0])/4,this.validateQuietZone(r,s[0]),s}validateQuietZone(r,i){let s=this.narrowLineWidth*10;s=s<i?s:i;for(let a=i-1;s>0&&a>=0&&!r.get(a);a--)s--;if(s!==0)throw new j}static skipWhiteSpace(r){const i=r.getSize(),s=r.getNextSet(0);if(s===i)throw new j;return s}decodeEnd(r){r.reverse();try{let i=Ue.skipWhiteSpace(r),s;try{s=Ue.findGuardPattern(r,i,Ue.END_PATTERN_REVERSED[0])}catch(l){l instanceof j&&(s=Ue.findGuardPattern(r,i,Ue.END_PATTERN_REVERSED[1]))}this.validateQuietZone(r,s[0]);let a=s[0];return s[0]=r.getSize()-s[1],s[1]=r.getSize()-a,s}finally{r.reverse()}}static findGuardPattern(r,i,s){let a=s.length,l=new Int32Array(a),u=r.getSize(),d=!1,h=0,p=i;l.fill(0);for(let v=i;v<u;v++)if(r.get(v)!==d)l[h]++;else{if(h===a-1){if(gt.patternMatchVariance(l,s,Ue.MAX_INDIVIDUAL_VARIANCE)<Ue.MAX_AVG_VARIANCE)return[p,v];p+=l[0]+l[1],D.arraycopy(l,2,l,0,h-1),l[h-1]=0,l[h]=0,h--}else h++;l[h]=1,d=!d}throw new j}static decodeDigit(r){let i=Ue.MAX_AVG_VARIANCE,s=-1,a=Ue.PATTERNS.length;for(let l=0;l<a;l++){let u=Ue.PATTERNS[l],d=gt.patternMatchVariance(r,u,Ue.MAX_INDIVIDUAL_VARIANCE);d<i?(i=d,s=l):d===i&&(s=-1)}if(s>=0)return s%10;throw new j}}Ue.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],Ue.MAX_AVG_VARIANCE=.38,Ue.MAX_INDIVIDUAL_VARIANCE=.5,Ue.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],Ue.START_PATTERN=Int32Array.from([1,1,1,1]),Ue.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])];class nt extends gt{constructor(){super(...arguments),this.decodeRowStringBuffer=""}static findStartGuardPattern(r){let i=!1,s,a=0,l=Int32Array.from([0,0,0]);for(;!i;){l=Int32Array.from([0,0,0]),s=nt.findGuardPattern(r,a,!1,this.START_END_PATTERN,l);let u=s[0];a=s[1];let d=u-(a-u);d>=0&&(i=r.isRange(d,u,!1))}return s}static checkChecksum(r){return nt.checkStandardUPCEANChecksum(r)}static checkStandardUPCEANChecksum(r){let i=r.length;if(i===0)return!1;let s=parseInt(r.charAt(i-1),10);return nt.getStandardUPCEANChecksum(r.substring(0,i-1))===s}static getStandardUPCEANChecksum(r){let i=r.length,s=0;for(let a=i-1;a>=0;a-=2){let l=r.charAt(a).charCodeAt(0)-48;if(l<0||l>9)throw new B;s+=l}s*=3;for(let a=i-2;a>=0;a-=2){let l=r.charAt(a).charCodeAt(0)-48;if(l<0||l>9)throw new B;s+=l}return(1e3-s)%10}static decodeEnd(r,i){return nt.findGuardPattern(r,i,!1,nt.START_END_PATTERN,new Int32Array(nt.START_END_PATTERN.length).fill(0))}static findGuardPatternWithoutCounters(r,i,s,a){return this.findGuardPattern(r,i,s,a,new Int32Array(a.length))}static findGuardPattern(r,i,s,a,l){let u=r.getSize();i=s?r.getNextUnset(i):r.getNextSet(i);let d=0,h=i,p=a.length,v=s;for(let b=i;b<u;b++)if(r.get(b)!==v)l[d]++;else{if(d===p-1){if(gt.patternMatchVariance(l,a,nt.MAX_INDIVIDUAL_VARIANCE)<nt.MAX_AVG_VARIANCE)return Int32Array.from([h,b]);h+=l[0]+l[1];let A=l.slice(2,l.length-1);for(let N=0;N<d-1;N++)l[N]=A[N];l[d-1]=0,l[d]=0,d--}else d++;l[d]=1,v=!v}throw new j}static decodeDigit(r,i,s,a){this.recordPattern(r,s,i);let l=this.MAX_AVG_VARIANCE,u=-1,d=a.length;for(let h=0;h<d;h++){let p=a[h],v=gt.patternMatchVariance(i,p,nt.MAX_INDIVIDUAL_VARIANCE);v<l&&(l=v,u=h)}if(u>=0)return u;throw new j}}nt.MAX_AVG_VARIANCE=.48,nt.MAX_INDIVIDUAL_VARIANCE=.7,nt.START_END_PATTERN=Int32Array.from([1,1,1]),nt.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),nt.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),nt.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])];class Ws{constructor(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}decodeRow(r,i,s){let a=this.decodeRowStringBuffer,l=this.decodeMiddle(i,s,a),u=a.toString(),d=Ws.parseExtensionString(u),h=[new ue((s[0]+s[1])/2,r),new ue(l,r)],p=new ze(u,null,0,h,ce.UPC_EAN_EXTENSION,new Date().getTime());return d!=null&&p.putAllMetadata(d),p}decodeMiddle(r,i,s){let a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;let l=r.getSize(),u=i[1],d=0;for(let p=0;p<5&&u<l;p++){let v=nt.decodeDigit(r,a,u,nt.L_AND_G_PATTERNS);s+=String.fromCharCode(48+v%10);for(let b of a)u+=b;v>=10&&(d|=1<<4-p),p!==4&&(u=r.getNextSet(u),u=r.getNextUnset(u))}if(s.length!==5)throw new j;let h=this.determineCheckDigit(d);if(Ws.extensionChecksum(s.toString())!==h)throw new j;return u}static extensionChecksum(r){let i=r.length,s=0;for(let a=i-2;a>=0;a-=2)s+=r.charAt(a).charCodeAt(0)-48;s*=3;for(let a=i-1;a>=0;a-=2)s+=r.charAt(a).charCodeAt(0)-48;return s*=3,s%10}determineCheckDigit(r){for(let i=0;i<10;i++)if(r===this.CHECK_DIGIT_ENCODINGS[i])return i;throw new j}static parseExtensionString(r){if(r.length!==5)return null;let i=Ws.parseExtension5String(r);return i==null?null:new Map([[ht.SUGGESTED_PRICE,i]])}static parseExtension5String(r){let i;switch(r.charAt(0)){case"0":i="£";break;case"5":i="$";break;case"9":switch(r){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}i="";break;default:i="";break}let s=parseInt(r.substring(1)),a=(s/100).toString(),l=s%100,u=l<10?"0"+l:l.toString();return i+a+"."+u}}class eu{constructor(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}decodeRow(r,i,s){let a=this.decodeRowStringBuffer,l=this.decodeMiddle(i,s,a),u=a.toString(),d=eu.parseExtensionString(u),h=[new ue((s[0]+s[1])/2,r),new ue(l,r)],p=new ze(u,null,0,h,ce.UPC_EAN_EXTENSION,new Date().getTime());return d!=null&&p.putAllMetadata(d),p}decodeMiddle(r,i,s){let a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;let l=r.getSize(),u=i[1],d=0;for(let h=0;h<2&&u<l;h++){let p=nt.decodeDigit(r,a,u,nt.L_AND_G_PATTERNS);s+=String.fromCharCode(48+p%10);for(let v of a)u+=v;p>=10&&(d|=1<<1-h),h!==1&&(u=r.getNextSet(u),u=r.getNextUnset(u))}if(s.length!==2)throw new j;if(parseInt(s.toString())%4!==d)throw new j;return u}static parseExtensionString(r){return r.length!==2?null:new Map([[ht.ISSUE_NUMBER,parseInt(r)]])}}class G0{static decodeRow(r,i,s){let a=nt.findGuardPattern(i,s,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return new Ws().decodeRow(r,i,a)}catch{return new eu().decodeRow(r,i,a)}}}G0.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]);class De extends nt{constructor(){super(),this.decodeRowStringBuffer="",De.L_AND_G_PATTERNS=De.L_PATTERNS.map(r=>Int32Array.from(r));for(let r=10;r<20;r++){let i=De.L_PATTERNS[r-10],s=new Int32Array(i.length);for(let a=0;a<i.length;a++)s[a]=i[i.length-a-1];De.L_AND_G_PATTERNS[r]=s}}decodeRow(r,i,s){let a=De.findStartGuardPattern(i),l=s==null?null:s.get(W.NEED_RESULT_POINT_CALLBACK);if(l!=null){const Q=new ue((a[0]+a[1])/2,r);l.foundPossibleResultPoint(Q)}let u=this.decodeMiddle(i,a,this.decodeRowStringBuffer),d=u.rowOffset,h=u.resultString;if(l!=null){const Q=new ue(d,r);l.foundPossibleResultPoint(Q)}let p=this.decodeEnd(i,d);if(l!=null){const Q=new ue((p[0]+p[1])/2,r);l.foundPossibleResultPoint(Q)}let v=p[1],b=v+(v-p[0]);if(b>=i.getSize()||!i.isRange(v,b,!1))throw new j;let A=h.toString();if(A.length<8)throw new B;if(!De.checkChecksum(A))throw new _;let N=(a[1]+a[0])/2,M=(p[1]+p[0])/2,L=this.getBarcodeFormat(),F=[new ue(N,r),new ue(M,r)],H=new ze(A,null,0,F,L,new Date().getTime()),J=0;try{let Q=G0.decodeRow(r,i,p[1]);H.putMetadata(ht.UPC_EAN_EXTENSION,Q.getText()),H.putAllMetadata(Q.getResultMetadata()),H.addResultPoints(Q.getResultPoints()),J=Q.getText().length}catch{}let ee=s==null?null:s.get(W.ALLOWED_EAN_EXTENSIONS);if(ee!=null){let Q=!1;for(let Te in ee)if(J.toString()===Te){Q=!0;break}if(!Q)throw new j}return H}decodeEnd(r,i){return De.findGuardPattern(r,i,!1,De.START_END_PATTERN,new Int32Array(De.START_END_PATTERN.length).fill(0))}static checkChecksum(r){return De.checkStandardUPCEANChecksum(r)}static checkStandardUPCEANChecksum(r){let i=r.length;if(i===0)return!1;let s=parseInt(r.charAt(i-1),10);return De.getStandardUPCEANChecksum(r.substring(0,i-1))===s}static getStandardUPCEANChecksum(r){let i=r.length,s=0;for(let a=i-1;a>=0;a-=2){let l=r.charAt(a).charCodeAt(0)-48;if(l<0||l>9)throw new B;s+=l}s*=3;for(let a=i-2;a>=0;a-=2){let l=r.charAt(a).charCodeAt(0)-48;if(l<0||l>9)throw new B;s+=l}return(1e3-s)%10}}class fi extends De{constructor(){super(),this.decodeMiddleCounters=Int32Array.from([0,0,0,0])}decodeMiddle(r,i,s){let a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;let l=r.getSize(),u=i[1],d=0;for(let p=0;p<6&&u<l;p++){let v=De.decodeDigit(r,a,u,De.L_AND_G_PATTERNS);s+=String.fromCharCode(48+v%10);for(let b of a)u+=b;v>=10&&(d|=1<<5-p)}s=fi.determineFirstDigit(s,d),u=De.findGuardPattern(r,u,!0,De.MIDDLE_PATTERN,new Int32Array(De.MIDDLE_PATTERN.length).fill(0))[1];for(let p=0;p<6&&u<l;p++){let v=De.decodeDigit(r,a,u,De.L_PATTERNS);s+=String.fromCharCode(48+v);for(let b of a)u+=b}return{rowOffset:u,resultString:s}}getBarcodeFormat(){return ce.EAN_13}static determineFirstDigit(r,i){for(let s=0;s<10;s++)if(i===this.FIRST_DIGIT_ENCODINGS[s])return r=String.fromCharCode(48+s)+r,r;throw new j}}fi.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26];class X0 extends De{constructor(){super(),this.decodeMiddleCounters=Int32Array.from([0,0,0,0])}decodeMiddle(r,i,s){const a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;let l=r.getSize(),u=i[1];for(let h=0;h<4&&u<l;h++){let p=De.decodeDigit(r,a,u,De.L_PATTERNS);s+=String.fromCharCode(48+p);for(let v of a)u+=v}u=De.findGuardPattern(r,u,!0,De.MIDDLE_PATTERN,new Int32Array(De.MIDDLE_PATTERN.length).fill(0))[1];for(let h=0;h<4&&u<l;h++){let p=De.decodeDigit(r,a,u,De.L_PATTERNS);s+=String.fromCharCode(48+p);for(let v of a)u+=v}return{rowOffset:u,resultString:s}}getBarcodeFormat(){return ce.EAN_8}}class Y0 extends De{constructor(){super(...arguments),this.ean13Reader=new fi}getBarcodeFormat(){return ce.UPC_A}decode(r,i){return this.maybeReturnResult(this.ean13Reader.decode(r))}decodeRow(r,i,s){return this.maybeReturnResult(this.ean13Reader.decodeRow(r,i,s))}decodeMiddle(r,i,s){return this.ean13Reader.decodeMiddle(r,i,s)}maybeReturnResult(r){let i=r.getText();if(i.charAt(0)==="0"){let s=new ze(i.substring(1),null,null,r.getResultPoints(),ce.UPC_A);return r.getResultMetadata()!=null&&s.putAllMetadata(r.getResultMetadata()),s}else throw new j}reset(){this.ean13Reader.reset()}}class Lr extends De{constructor(){super(),this.decodeMiddleCounters=new Int32Array(4)}decodeMiddle(r,i,s){const a=this.decodeMiddleCounters.map(p=>p);a[0]=0,a[1]=0,a[2]=0,a[3]=0;const l=r.getSize();let u=i[1],d=0;for(let p=0;p<6&&u<l;p++){const v=Lr.decodeDigit(r,a,u,Lr.L_AND_G_PATTERNS);s+=String.fromCharCode(48+v%10);for(let b of a)u+=b;v>=10&&(d|=1<<5-p)}let h=Lr.determineNumSysAndCheckDigit(s,d);return{rowOffset:u,resultString:h}}decodeEnd(r,i){return Lr.findGuardPatternWithoutCounters(r,i,!0,Lr.MIDDLE_END_PATTERN)}checkChecksum(r){return De.checkChecksum(Lr.convertUPCEtoUPCA(r))}static determineNumSysAndCheckDigit(r,i){for(let s=0;s<=1;s++)for(let a=0;a<10;a++)if(i===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[s][a]){let l=String.fromCharCode(48+s),u=String.fromCharCode(48+a);return l+r+u}throw j.getNotFoundInstance()}getBarcodeFormat(){return ce.UPC_E}static convertUPCEtoUPCA(r){const i=r.slice(1,7).split("").map(l=>l.charCodeAt(0)),s=new K;s.append(r.charAt(0));let a=i[5];switch(a){case 0:case 1:case 2:s.appendChars(i,0,2),s.append(a),s.append("0000"),s.appendChars(i,2,3);break;case 3:s.appendChars(i,0,3),s.append("00000"),s.appendChars(i,3,2);break;case 4:s.appendChars(i,0,4),s.append("00000"),s.append(i[4]);break;default:s.appendChars(i,0,5),s.append("0000"),s.append(a);break}return r.length>=8&&s.append(r.charAt(7)),s.toString()}}Lr.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),Lr.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,26])];class tu extends gt{constructor(r){super();let i=r==null?null:r.get(W.POSSIBLE_FORMATS),s=[];o(i)?(s.push(new fi),s.push(new Y0),s.push(new X0),s.push(new Lr)):(i.indexOf(ce.EAN_13)>-1&&s.push(new fi),i.indexOf(ce.UPC_A)>-1&&s.push(new Y0),i.indexOf(ce.EAN_8)>-1&&s.push(new X0),i.indexOf(ce.UPC_E)>-1&&s.push(new Lr)),this.readers=s}decodeRow(r,i,s){for(let a of this.readers)try{const l=a.decodeRow(r,i,s),u=l.getBarcodeFormat()===ce.EAN_13&&l.getText().charAt(0)==="0",d=s==null?null:s.get(W.POSSIBLE_FORMATS),h=d==null||d.includes(ce.UPC_A);if(u&&h){const p=l.getRawBytes(),v=new ze(l.getText().substring(1),p,p?p.length:null,l.getResultPoints(),ce.UPC_A);return v.putAllMetadata(l.getResultMetadata()),v}return l}catch{}throw new j}reset(){for(let r of this.readers)r.reset()}}class jt extends gt{constructor(){super(),this.decodeFinderCounters=new Int32Array(4),this.dataCharacterCounters=new Int32Array(8),this.oddRoundingErrors=new Array(4),this.evenRoundingErrors=new Array(4),this.oddCounts=new Array(this.dataCharacterCounters.length/2),this.evenCounts=new Array(this.dataCharacterCounters.length/2)}getDecodeFinderCounters(){return this.decodeFinderCounters}getDataCharacterCounters(){return this.dataCharacterCounters}getOddRoundingErrors(){return this.oddRoundingErrors}getEvenRoundingErrors(){return this.evenRoundingErrors}getOddCounts(){return this.oddCounts}getEvenCounts(){return this.evenCounts}parseFinderValue(r,i){for(let s=0;s<i.length;s++)if(gt.patternMatchVariance(r,i[s],jt.MAX_INDIVIDUAL_VARIANCE)<jt.MAX_AVG_VARIANCE)return s;throw new j}static count(r){return Ne.sum(new Int32Array(r))}static increment(r,i){let s=0,a=i[0];for(let l=1;l<r.length;l++)i[l]>a&&(a=i[l],s=l);r[s]++}static decrement(r,i){let s=0,a=i[0];for(let l=1;l<r.length;l++)i[l]<a&&(a=i[l],s=l);r[s]--}static isFinderPattern(r){let i=r[0]+r[1],s=i+r[2]+r[3],a=i/s;if(a>=jt.MIN_FINDER_PATTERN_RATIO&&a<=jt.MAX_FINDER_PATTERN_RATIO){let l=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;for(let d of r)d>u&&(u=d),d<l&&(l=d);return u<10*l}return!1}}jt.MAX_AVG_VARIANCE=.2,jt.MAX_INDIVIDUAL_VARIANCE=.45,jt.MIN_FINDER_PATTERN_RATIO=9.5/12,jt.MAX_FINDER_PATTERN_RATIO=12.5/14;class Ui{constructor(r,i){this.value=r,this.checksumPortion=i}getValue(){return this.value}getChecksumPortion(){return this.checksumPortion}toString(){return this.value+"("+this.checksumPortion+")"}equals(r){if(!(r instanceof Ui))return!1;const i=r;return this.value===i.value&&this.checksumPortion===i.checksumPortion}hashCode(){return this.value^this.checksumPortion}}class va{constructor(r,i,s,a,l){this.value=r,this.startEnd=i,this.value=r,this.startEnd=i,this.resultPoints=new Array,this.resultPoints.push(new ue(s,l)),this.resultPoints.push(new ue(a,l))}getValue(){return this.value}getStartEnd(){return this.startEnd}getResultPoints(){return this.resultPoints}equals(r){if(!(r instanceof va))return!1;const i=r;return this.value===i.value}hashCode(){return this.value}}class Zr{constructor(){}static getRSSvalue(r,i,s){let a=0;for(let h of r)a+=h;let l=0,u=0,d=r.length;for(let h=0;h<d-1;h++){let p;for(p=1,u|=1<<h;p<r[h];p++,u&=~(1<<h)){let v=Zr.combins(a-p-1,d-h-2);if(s&&u===0&&a-p-(d-h-1)>=d-h-1&&(v-=Zr.combins(a-p-(d-h),d-h-2)),d-h-1>1){let b=0;for(let A=a-p-(d-h-2);A>i;A--)b+=Zr.combins(a-p-A-1,d-h-3);v-=b*(d-1-h)}else a-p>i&&v--;l+=v}a-=p}return l}static combins(r,i){let s,a;r-i>i?(a=i,s=r-i):(a=r-i,s=i);let l=1,u=1;for(let d=r;d>s;d--)l*=d,u<=a&&(l/=u,u++);for(;u<=a;)l/=u,u++;return l}}class e3{static buildBitArray(r){let i=r.length*2-1;r[r.length-1].getRightChar()==null&&(i-=1);let s=12*i,a=new U(s),l=0,d=r[0].getRightChar().getValue();for(let h=11;h>=0;--h)d&1<<h&&a.set(l),l++;for(let h=1;h<r.length;++h){let p=r[h],v=p.getLeftChar().getValue();for(let b=11;b>=0;--b)v&1<<b&&a.set(l),l++;if(p.getRightChar()!=null){let b=p.getRightChar().getValue();for(let A=11;A>=0;--A)b&1<<A&&a.set(l),l++}}return a}}class di{constructor(r,i){i?this.decodedInformation=null:(this.finished=r,this.decodedInformation=i)}getDecodedInformation(){return this.decodedInformation}isFinished(){return this.finished}}class ru{constructor(r){this.newPosition=r}getNewPosition(){return this.newPosition}}class er extends ru{constructor(r,i){super(r),this.value=i}getValue(){return this.value}isFNC1(){return this.value===er.FNC1}}er.FNC1="$";class hi extends ru{constructor(r,i,s){super(r),s?(this.remaining=!0,this.remainingValue=this.remainingValue):(this.remaining=!1,this.remainingValue=0),this.newString=i}getNewString(){return this.newString}isRemaining(){return this.remaining}getRemainingValue(){return this.remainingValue}}class Ar extends ru{constructor(r,i,s){if(super(r),i<0||i>10||s<0||s>10)throw new B;this.firstDigit=i,this.secondDigit=s}getFirstDigit(){return this.firstDigit}getSecondDigit(){return this.secondDigit}getValue(){return this.firstDigit*10+this.secondDigit}isFirstDigitFNC1(){return this.firstDigit===Ar.FNC1}isSecondDigitFNC1(){return this.secondDigit===Ar.FNC1}isAnyFNC1(){return this.firstDigit===Ar.FNC1||this.secondDigit===Ar.FNC1}}Ar.FNC1=10;class se{constructor(){}static parseFieldsInGeneralPurpose(r){if(!r)return null;if(r.length<2)throw new j;let i=r.substring(0,2);for(let l of se.TWO_DIGIT_DATA_LENGTH)if(l[0]===i)return l[1]===se.VARIABLE_LENGTH?se.processVariableAI(2,l[2],r):se.processFixedAI(2,l[1],r);if(r.length<3)throw new j;let s=r.substring(0,3);for(let l of se.THREE_DIGIT_DATA_LENGTH)if(l[0]===s)return l[1]===se.VARIABLE_LENGTH?se.processVariableAI(3,l[2],r):se.processFixedAI(3,l[1],r);for(let l of se.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH)if(l[0]===s)return l[1]===se.VARIABLE_LENGTH?se.processVariableAI(4,l[2],r):se.processFixedAI(4,l[1],r);if(r.length<4)throw new j;let a=r.substring(0,4);for(let l of se.FOUR_DIGIT_DATA_LENGTH)if(l[0]===a)return l[1]===se.VARIABLE_LENGTH?se.processVariableAI(4,l[2],r):se.processFixedAI(4,l[1],r);throw new j}static processFixedAI(r,i,s){if(s.length<r)throw new j;let a=s.substring(0,r);if(s.length<r+i)throw new j;let l=s.substring(r,r+i),u=s.substring(r+i),d="("+a+")"+l,h=se.parseFieldsInGeneralPurpose(u);return h==null?d:d+h}static processVariableAI(r,i,s){let a=s.substring(0,r),l;s.length<r+i?l=s.length:l=r+i;let u=s.substring(r,l),d=s.substring(l),h="("+a+")"+u,p=se.parseFieldsInGeneralPurpose(d);return p==null?h:h+p}}se.VARIABLE_LENGTH=[],se.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",se.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",se.VARIABLE_LENGTH,20],["22",se.VARIABLE_LENGTH,29],["30",se.VARIABLE_LENGTH,8],["37",se.VARIABLE_LENGTH,8],["90",se.VARIABLE_LENGTH,30],["91",se.VARIABLE_LENGTH,30],["92",se.VARIABLE_LENGTH,30],["93",se.VARIABLE_LENGTH,30],["94",se.VARIABLE_LENGTH,30],["95",se.VARIABLE_LENGTH,30],["96",se.VARIABLE_LENGTH,30],["97",se.VARIABLE_LENGTH,3],["98",se.VARIABLE_LENGTH,30],["99",se.VARIABLE_LENGTH,30]],se.THREE_DIGIT_DATA_LENGTH=[["240",se.VARIABLE_LENGTH,30],["241",se.VARIABLE_LENGTH,30],["242",se.VARIABLE_LENGTH,6],["250",se.VARIABLE_LENGTH,30],["251",se.VARIABLE_LENGTH,30],["253",se.VARIABLE_LENGTH,17],["254",se.VARIABLE_LENGTH,20],["400",se.VARIABLE_LENGTH,30],["401",se.VARIABLE_LENGTH,30],["402",17],["403",se.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",se.VARIABLE_LENGTH,20],["421",se.VARIABLE_LENGTH,15],["422",3],["423",se.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],se.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",se.VARIABLE_LENGTH,15],["391",se.VARIABLE_LENGTH,18],["392",se.VARIABLE_LENGTH,15],["393",se.VARIABLE_LENGTH,18],["703",se.VARIABLE_LENGTH,30]],se.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",se.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",se.VARIABLE_LENGTH,20],["8003",se.VARIABLE_LENGTH,30],["8004",se.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",se.VARIABLE_LENGTH,30],["8008",se.VARIABLE_LENGTH,12],["8018",18],["8020",se.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",se.VARIABLE_LENGTH,70],["8200",se.VARIABLE_LENGTH,70]];class ji{constructor(r){this.buffer=new K,this.information=r}decodeAllCodes(r,i){let s=i,a=null;do{let l=this.decodeGeneralPurposeField(s,a),u=se.parseFieldsInGeneralPurpose(l.getNewString());if(u!=null&&r.append(u),l.isRemaining()?a=""+l.getRemainingValue():a=null,s===l.getNewPosition())break;s=l.getNewPosition()}while(!0);return r.toString()}isStillNumeric(r){if(r+7>this.information.getSize())return r+4<=this.information.getSize();for(let i=r;i<r+3;++i)if(this.information.get(i))return!0;return this.information.get(r+3)}decodeNumeric(r){if(r+7>this.information.getSize()){let l=this.extractNumericValueFromBitArray(r,4);return l===0?new Ar(this.information.getSize(),Ar.FNC1,Ar.FNC1):new Ar(this.information.getSize(),l-1,Ar.FNC1)}let i=this.extractNumericValueFromBitArray(r,7),s=(i-8)/11,a=(i-8)%11;return new Ar(r+7,s,a)}extractNumericValueFromBitArray(r,i){return ji.extractNumericValueFromBitArray(this.information,r,i)}static extractNumericValueFromBitArray(r,i,s){let a=0;for(let l=0;l<s;++l)r.get(i+l)&&(a|=1<<s-l-1);return a}decodeGeneralPurposeField(r,i){this.buffer.setLengthToZero(),i!=null&&this.buffer.append(i),this.current.setPosition(r);let s=this.parseBlocks();return s!=null&&s.isRemaining()?new hi(this.current.getPosition(),this.buffer.toString(),s.getRemainingValue()):new hi(this.current.getPosition(),this.buffer.toString())}parseBlocks(){let r,i;do{let s=this.current.getPosition();if(this.current.isAlpha()?(i=this.parseAlphaBlock(),r=i.isFinished()):this.current.isIsoIec646()?(i=this.parseIsoIec646Block(),r=i.isFinished()):(i=this.parseNumericBlock(),r=i.isFinished()),!(s!==this.current.getPosition())&&!r)break}while(!r);return i.getDecodedInformation()}parseNumericBlock(){for(;this.isStillNumeric(this.current.getPosition());){let r=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(r.getNewPosition()),r.isFirstDigitFNC1()){let i;return r.isSecondDigitFNC1()?i=new hi(this.current.getPosition(),this.buffer.toString()):i=new hi(this.current.getPosition(),this.buffer.toString(),r.getSecondDigit()),new di(!0,i)}if(this.buffer.append(r.getFirstDigit()),r.isSecondDigitFNC1()){let i=new hi(this.current.getPosition(),this.buffer.toString());return new di(!0,i)}this.buffer.append(r.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new di(!1)}parseIsoIec646Block(){for(;this.isStillIsoIec646(this.current.getPosition());){let r=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(r.getNewPosition()),r.isFNC1()){let i=new hi(this.current.getPosition(),this.buffer.toString());return new di(!0,i)}this.buffer.append(r.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new di(!1)}parseAlphaBlock(){for(;this.isStillAlpha(this.current.getPosition());){let r=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(r.getNewPosition()),r.isFNC1()){let i=new hi(this.current.getPosition(),this.buffer.toString());return new di(!0,i)}this.buffer.append(r.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new di(!1)}isStillIsoIec646(r){if(r+5>this.information.getSize())return!1;let i=this.extractNumericValueFromBitArray(r,5);if(i>=5&&i<16)return!0;if(r+7>this.information.getSize())return!1;let s=this.extractNumericValueFromBitArray(r,7);if(s>=64&&s<116)return!0;if(r+8>this.information.getSize())return!1;let a=this.extractNumericValueFromBitArray(r,8);return a>=232&&a<253}decodeIsoIec646(r){let i=this.extractNumericValueFromBitArray(r,5);if(i===15)return new er(r+5,er.FNC1);if(i>=5&&i<15)return new er(r+5,"0"+(i-5));let s=this.extractNumericValueFromBitArray(r,7);if(s>=64&&s<90)return new er(r+7,""+(s+1));if(s>=90&&s<116)return new er(r+7,""+(s+7));let a=this.extractNumericValueFromBitArray(r,8),l;switch(a){case 232:l="!";break;case 233:l='"';break;case 234:l="%";break;case 235:l="&";break;case 236:l="'";break;case 237:l="(";break;case 238:l=")";break;case 239:l="*";break;case 240:l="+";break;case 241:l=",";break;case 242:l="-";break;case 243:l=".";break;case 244:l="/";break;case 245:l=":";break;case 246:l=";";break;case 247:l="<";break;case 248:l="=";break;case 249:l=">";break;case 250:l="?";break;case 251:l="_";break;case 252:l=" ";break;default:throw new B}return new er(r+8,l)}isStillAlpha(r){if(r+5>this.information.getSize())return!1;let i=this.extractNumericValueFromBitArray(r,5);if(i>=5&&i<16)return!0;if(r+6>this.information.getSize())return!1;let s=this.extractNumericValueFromBitArray(r,6);return s>=16&&s<63}decodeAlphanumeric(r){let i=this.extractNumericValueFromBitArray(r,5);if(i===15)return new er(r+5,er.FNC1);if(i>=5&&i<15)return new er(r+5,"0"+(i-5));let s=this.extractNumericValueFromBitArray(r,6);if(s>=32&&s<58)return new er(r+6,""+(s+33));let a;switch(s){case 58:a="*";break;case 59:a=",";break;case 60:a="-";break;case 61:a=".";break;case 62:a="/";break;default:throw new Gt("Decoding invalid alphanumeric value: "+s)}return new er(r+6,a)}isAlphaTo646ToAlphaLatch(r){if(r+1>this.information.getSize())return!1;for(let i=0;i<5&&i+r<this.information.getSize();++i)if(i===2){if(!this.information.get(r+2))return!1}else if(this.information.get(r+i))return!1;return!0}isAlphaOr646ToNumericLatch(r){if(r+3>this.information.getSize())return!1;for(let i=r;i<r+3;++i)if(this.information.get(i))return!1;return!0}isNumericToAlphaNumericLatch(r){if(r+1>this.information.getSize())return!1;for(let i=0;i<4&&i+r<this.information.getSize();++i)if(this.information.get(r+i))return!1;return!0}}class nu{constructor(r){this.information=r,this.generalDecoder=new ji(r)}getInformation(){return this.information}getGeneralDecoder(){return this.generalDecoder}}class tr extends nu{constructor(r){super(r)}encodeCompressedGtin(r,i){r.append("(01)");let s=r.length();r.append("9"),this.encodeCompressedGtinWithoutAI(r,i,s)}encodeCompressedGtinWithoutAI(r,i,s){for(let a=0;a<4;++a){let l=this.getGeneralDecoder().extractNumericValueFromBitArray(i+10*a,10);l/100===0&&r.append("0"),l/10===0&&r.append("0"),r.append(l)}tr.appendCheckDigit(r,s)}static appendCheckDigit(r,i){let s=0;for(let a=0;a<13;a++){let l=r.charAt(a+i).charCodeAt(0)-48;s+=a&1?l:3*l}s=10-s%10,s===10&&(s=0),r.append(s)}}tr.GTIN_SIZE=40;class Wi extends tr{constructor(r){super(r)}parseInformation(){let r=new K;r.append("(01)");let i=r.length(),s=this.getGeneralDecoder().extractNumericValueFromBitArray(Wi.HEADER_SIZE,4);return r.append(s),this.encodeCompressedGtinWithoutAI(r,Wi.HEADER_SIZE+4,i),this.getGeneralDecoder().decodeAllCodes(r,Wi.HEADER_SIZE+44)}}Wi.HEADER_SIZE=4;class ya extends nu{constructor(r){super(r)}parseInformation(){let r=new K;return this.getGeneralDecoder().decodeAllCodes(r,ya.HEADER_SIZE)}}ya.HEADER_SIZE=5;class Ea extends tr{constructor(r){super(r)}encodeCompressedWeight(r,i,s){let a=this.getGeneralDecoder().extractNumericValueFromBitArray(i,s);this.addWeightCode(r,a);let l=this.checkWeight(a),u=1e5;for(let d=0;d<5;++d)l/u===0&&r.append("0"),u/=10;r.append(l)}}class Qr extends Ea{constructor(r){super(r)}parseInformation(){if(this.getInformation().getSize()!=Qr.HEADER_SIZE+Ea.GTIN_SIZE+Qr.WEIGHT_SIZE)throw new j;let r=new K;return this.encodeCompressedGtin(r,Qr.HEADER_SIZE),this.encodeCompressedWeight(r,Qr.HEADER_SIZE+Ea.GTIN_SIZE,Qr.WEIGHT_SIZE),r.toString()}}Qr.HEADER_SIZE=5,Qr.WEIGHT_SIZE=15;class t3 extends Qr{constructor(r){super(r)}addWeightCode(r,i){r.append("(3103)")}checkWeight(r){return r}}class r3 extends Qr{constructor(r){super(r)}addWeightCode(r,i){i<1e4?r.append("(3202)"):r.append("(3203)")}checkWeight(r){return r<1e4?r:r-1e4}}class qr extends tr{constructor(r){super(r)}parseInformation(){if(this.getInformation().getSize()<qr.HEADER_SIZE+tr.GTIN_SIZE)throw new j;let r=new K;this.encodeCompressedGtin(r,qr.HEADER_SIZE);let i=this.getGeneralDecoder().extractNumericValueFromBitArray(qr.HEADER_SIZE+tr.GTIN_SIZE,qr.LAST_DIGIT_SIZE);r.append("(392"),r.append(i),r.append(")");let s=this.getGeneralDecoder().decodeGeneralPurposeField(qr.HEADER_SIZE+tr.GTIN_SIZE+qr.LAST_DIGIT_SIZE,null);return r.append(s.getNewString()),r.toString()}}qr.HEADER_SIZE=8,qr.LAST_DIGIT_SIZE=2;class Yt extends tr{constructor(r){super(r)}parseInformation(){if(this.getInformation().getSize()<Yt.HEADER_SIZE+tr.GTIN_SIZE)throw new j;let r=new K;this.encodeCompressedGtin(r,Yt.HEADER_SIZE);let i=this.getGeneralDecoder().extractNumericValueFromBitArray(Yt.HEADER_SIZE+tr.GTIN_SIZE,Yt.LAST_DIGIT_SIZE);r.append("(393"),r.append(i),r.append(")");let s=this.getGeneralDecoder().extractNumericValueFromBitArray(Yt.HEADER_SIZE+tr.GTIN_SIZE+Yt.LAST_DIGIT_SIZE,Yt.FIRST_THREE_DIGITS_SIZE);s/100==0&&r.append("0"),s/10==0&&r.append("0"),r.append(s);let a=this.getGeneralDecoder().decodeGeneralPurposeField(Yt.HEADER_SIZE+tr.GTIN_SIZE+Yt.LAST_DIGIT_SIZE+Yt.FIRST_THREE_DIGITS_SIZE,null);return r.append(a.getNewString()),r.toString()}}Yt.HEADER_SIZE=8,Yt.LAST_DIGIT_SIZE=2,Yt.FIRST_THREE_DIGITS_SIZE=10;class Ke extends Ea{constructor(r,i,s){super(r),this.dateCode=s,this.firstAIdigits=i}parseInformation(){if(this.getInformation().getSize()!=Ke.HEADER_SIZE+Ke.GTIN_SIZE+Ke.WEIGHT_SIZE+Ke.DATE_SIZE)throw new j;let r=new K;return this.encodeCompressedGtin(r,Ke.HEADER_SIZE),this.encodeCompressedWeight(r,Ke.HEADER_SIZE+Ke.GTIN_SIZE,Ke.WEIGHT_SIZE),this.encodeCompressedDate(r,Ke.HEADER_SIZE+Ke.GTIN_SIZE+Ke.WEIGHT_SIZE),r.toString()}encodeCompressedDate(r,i){let s=this.getGeneralDecoder().extractNumericValueFromBitArray(i,Ke.DATE_SIZE);if(s==38400)return;r.append("("),r.append(this.dateCode),r.append(")");let a=s%32;s/=32;let l=s%12+1;s/=12;let u=s;u/10==0&&r.append("0"),r.append(u),l/10==0&&r.append("0"),r.append(l),a/10==0&&r.append("0"),r.append(a)}addWeightCode(r,i){r.append("("),r.append(this.firstAIdigits),r.append(i/1e5),r.append(")")}checkWeight(r){return r%1e5}}Ke.HEADER_SIZE=8,Ke.WEIGHT_SIZE=20,Ke.DATE_SIZE=16;function K0(E){try{if(E.get(1))return new Wi(E);if(!E.get(2))return new ya(E);switch(ji.extractNumericValueFromBitArray(E,1,4)){case 4:return new t3(E);case 5:return new r3(E)}switch(ji.extractNumericValueFromBitArray(E,1,5)){case 12:return new qr(E);case 13:return new Yt(E)}switch(ji.extractNumericValueFromBitArray(E,1,7)){case 56:return new Ke(E,"310","11");case 57:return new Ke(E,"320","11");case 58:return new Ke(E,"310","13");case 59:return new Ke(E,"320","13");case 60:return new Ke(E,"310","15");case 61:return new Ke(E,"320","15");case 62:return new Ke(E,"310","17");case 63:return new Ke(E,"320","17")}}catch(r){throw console.log(r),new Gt("unknown decoder: "+E)}}class Dn{constructor(r,i,s,a){this.leftchar=r,this.rightchar=i,this.finderpattern=s,this.maybeLast=a}mayBeLast(){return this.maybeLast}getLeftChar(){return this.leftchar}getRightChar(){return this.rightchar}getFinderPattern(){return this.finderpattern}mustBeLast(){return this.rightchar==null}toString(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(this.finderpattern==null?"null":this.finderpattern.getValue())+" ]"}static equals(r,i){return r instanceof Dn?Dn.equalsOrNull(r.leftchar,i.leftchar)&&Dn.equalsOrNull(r.rightchar,i.rightchar)&&Dn.equalsOrNull(r.finderpattern,i.finderpattern):!1}static equalsOrNull(r,i){return r===null?i===null:Dn.equals(r,i)}hashCode(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()}}class iu{constructor(r,i,s){this.pairs=r,this.rowNumber=i,this.wasReversed=s}getPairs(){return this.pairs}getRowNumber(){return this.rowNumber}isReversed(){return this.wasReversed}isEquivalent(r){return this.checkEqualitity(this,r)}toString(){return"{ "+this.pairs+" }"}equals(r,i){return r instanceof iu?this.checkEqualitity(r,i)&&r.wasReversed===i.wasReversed:!1}checkEqualitity(r,i){if(!r||!i)return;let s;return r.forEach((a,l)=>{i.forEach(u=>{a.getLeftChar().getValue()===u.getLeftChar().getValue()&&a.getRightChar().getValue()===u.getRightChar().getValue()&&a.getFinderPatter().getValue()===u.getFinderPatter().getValue()&&(s=!0)})}),s}}class Z extends jt{constructor(r){super(...arguments),this.pairs=new Array(Z.MAX_PAIRS),this.rows=new Array,this.startEnd=[2],this.verbose=r===!0}decodeRow(r,i,s){this.pairs.length=0,this.startFromEven=!1;try{return Z.constructResult(this.decodeRow2pairs(r,i))}catch(a){this.verbose&&console.log(a)}return this.pairs.length=0,this.startFromEven=!0,Z.constructResult(this.decodeRow2pairs(r,i))}reset(){this.pairs.length=0,this.rows.length=0}decodeRow2pairs(r,i){let s=!1;for(;!s;)try{this.pairs.push(this.retrieveNextPair(i,this.pairs,r))}catch(l){if(l instanceof j){if(!this.pairs.length)throw new j;s=!0}}if(this.checkChecksum())return this.pairs;let a;if(this.rows.length?a=!0:a=!1,this.storeRow(r,!1),a){let l=this.checkRowsBoolean(!1);if(l!=null||(l=this.checkRowsBoolean(!0),l!=null))return l}throw new j}checkRowsBoolean(r){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,r&&(this.rows=this.rows.reverse());let i=null;try{i=this.checkRows(new Array,0)}catch(s){this.verbose&&console.log(s)}return r&&(this.rows=this.rows.reverse()),i}checkRows(r,i){for(let s=i;s<this.rows.length;s++){let a=this.rows[s];this.pairs.length=0;for(let u of r)this.pairs.push(u.getPairs());if(this.pairs.push(a.getPairs()),!Z.isValidSequence(this.pairs))continue;if(this.checkChecksum())return this.pairs;let l=new Array(r);l.push(a);try{return this.checkRows(l,s+1)}catch(u){this.verbose&&console.log(u)}}throw new j}static isValidSequence(r){for(let i of Z.FINDER_PATTERN_SEQUENCES){if(r.length>i.length)continue;let s=!0;for(let a=0;a<r.length;a++)if(r[a].getFinderPattern().getValue()!=i[a]){s=!1;break}if(s)return!0}return!1}storeRow(r,i){let s=0,a=!1,l=!1;for(;s<this.rows.length;){let u=this.rows[s];if(u.getRowNumber()>r){l=u.isEquivalent(this.pairs);break}a=u.isEquivalent(this.pairs),s++}l||a||Z.isPartialRow(this.pairs,this.rows)||(this.rows.push(s,new iu(this.pairs,r,i)),this.removePartialRows(this.pairs,this.rows))}removePartialRows(r,i){for(let s of i)if(s.getPairs().length!==r.length){for(let a of s.getPairs())for(let l of r)if(Dn.equals(a,l))break}}static isPartialRow(r,i){for(let s of i){let a=!0;for(let l of r){let u=!1;for(let d of s.getPairs())if(l.equals(d)){u=!0;break}if(!u){a=!1;break}}if(a)return!0}return!1}getRows(){return this.rows}static constructResult(r){let i=e3.buildBitArray(r),a=K0(i).parseInformation(),l=r[0].getFinderPattern().getResultPoints(),u=r[r.length-1].getFinderPattern().getResultPoints(),d=[l[0],l[1],u[0],u[1]];return new ze(a,null,null,d,ce.RSS_EXPANDED,null)}checkChecksum(){let r=this.pairs.get(0),i=r.getLeftChar(),s=r.getRightChar();if(s==null)return!1;let a=s.getChecksumPortion(),l=2;for(let d=1;d<this.pairs.size();++d){let h=this.pairs.get(d);a+=h.getLeftChar().getChecksumPortion(),l++;let p=h.getRightChar();p!=null&&(a+=p.getChecksumPortion(),l++)}return a%=211,211*(l-4)+a==i.getValue()}static getNextSecondBar(r,i){let s;return r.get(i)?(s=r.getNextUnset(i),s=r.getNextSet(s)):(s=r.getNextSet(i),s=r.getNextUnset(s)),s}retrieveNextPair(r,i,s){let a=i.length%2==0;this.startFromEven&&(a=!a);let l,u=!0,d=-1;do this.findNextPair(r,i,d),l=this.parseFoundFinderPattern(r,s,a),l==null?d=Z.getNextSecondBar(r,this.startEnd[0]):u=!1;while(u);let h=this.decodeDataCharacter(r,l,a,!0);if(!this.isEmptyPair(i)&&i[i.length-1].mustBeLast())throw new j;let p;try{p=this.decodeDataCharacter(r,l,a,!1)}catch(v){p=null,this.verbose&&console.log(v)}return new Dn(h,p,l,!0)}isEmptyPair(r){return r.length===0}findNextPair(r,i,s){let a=this.getDecodeFinderCounters();a[0]=0,a[1]=0,a[2]=0,a[3]=0;let l=r.getSize(),u;s>=0?u=s:this.isEmptyPair(i)?u=0:u=i[i.length-1].getFinderPattern().getStartEnd()[1];let d=i.length%2!=0;this.startFromEven&&(d=!d);let h=!1;for(;u<l&&(h=!r.get(u),!!h);)u++;let p=0,v=u;for(let b=u;b<l;b++)if(r.get(b)!=h)a[p]++;else{if(p==3){if(d&&Z.reverseCounters(a),Z.isFinderPattern(a)){this.startEnd[0]=v,this.startEnd[1]=b;return}d&&Z.reverseCounters(a),v+=a[0]+a[1],a[0]=a[2],a[1]=a[3],a[2]=0,a[3]=0,p--}else p++;a[p]=1,h=!h}throw new j}static reverseCounters(r){let i=r.length;for(let s=0;s<i/2;++s){let a=r[s];r[s]=r[i-s-1],r[i-s-1]=a}}parseFoundFinderPattern(r,i,s){let a,l,u;if(s){let p=this.startEnd[0]-1;for(;p>=0&&!r.get(p);)p--;p++,a=this.startEnd[0]-p,l=p,u=this.startEnd[1]}else l=this.startEnd[0],u=r.getNextUnset(this.startEnd[1]+1),a=u-this.startEnd[1];let d=this.getDecodeFinderCounters();D.arraycopy(d,0,d,1,d.length-1),d[0]=a;let h;try{h=this.parseFinderValue(d,Z.FINDER_PATTERNS)}catch{return null}return new va(h,[l,u],l,u,i)}decodeDataCharacter(r,i,s,a){let l=this.getDataCharacterCounters();for(let We=0;We<l.length;We++)l[We]=0;if(a)Z.recordPatternInReverse(r,i.getStartEnd()[0],l);else{Z.recordPattern(r,i.getStartEnd()[1],l);for(let We=0,Mt=l.length-1;We<Mt;We++,Mt--){let gr=l[We];l[We]=l[Mt],l[Mt]=gr}}let u=17,d=Ne.sum(new Int32Array(l))/u,h=(i.getStartEnd()[1]-i.getStartEnd()[0])/15;if(Math.abs(d-h)/h>.3)throw new j;let p=this.getOddCounts(),v=this.getEvenCounts(),b=this.getOddRoundingErrors(),A=this.getEvenRoundingErrors();for(let We=0;We<l.length;We++){let Mt=1*l[We]/d,gr=Mt+.5;if(gr<1){if(Mt<.3)throw new j;gr=1}else if(gr>8){if(Mt>8.7)throw new j;gr=8}let Gi=We/2;We&1?(v[Gi]=gr,A[Gi]=Mt-gr):(p[Gi]=gr,b[Gi]=Mt-gr)}this.adjustOddEvenCounts(u);let N=4*i.getValue()+(s?0:2)+(a?0:1)-1,M=0,L=0;for(let We=p.length-1;We>=0;We--){if(Z.isNotA1left(i,s,a)){let Mt=Z.WEIGHTS[N][2*We];L+=p[We]*Mt}M+=p[We]}let F=0;for(let We=v.length-1;We>=0;We--)if(Z.isNotA1left(i,s,a)){let Mt=Z.WEIGHTS[N][2*We+1];F+=v[We]*Mt}let H=L+F;if(M&1||M>13||M<4)throw new j;let J=(13-M)/2,ee=Z.SYMBOL_WIDEST[J],Q=9-ee,Te=Zr.getRSSvalue(p,ee,!0),ye=Zr.getRSSvalue(v,Q,!1),nr=Z.EVEN_TOTAL_SUBSET[J],Br=Z.GSUM[J],ir=Te*nr+ye+Br;return new Ui(ir,H)}static isNotA1left(r,i,s){return!(r.getValue()==0&&i&&s)}adjustOddEvenCounts(r){let i=Ne.sum(new Int32Array(this.getOddCounts())),s=Ne.sum(new Int32Array(this.getEvenCounts())),a=!1,l=!1;i>13?l=!0:i<4&&(a=!0);let u=!1,d=!1;s>13?d=!0:s<4&&(u=!0);let h=i+s-r,p=(i&1)==1,v=(s&1)==0;if(h==1)if(p){if(v)throw new j;l=!0}else{if(!v)throw new j;d=!0}else if(h==-1)if(p){if(v)throw new j;a=!0}else{if(!v)throw new j;u=!0}else if(h==0){if(p){if(!v)throw new j;i<s?(a=!0,d=!0):(l=!0,u=!0)}else if(v)throw new j}else throw new j;if(a){if(l)throw new j;Z.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(l&&Z.decrement(this.getOddCounts(),this.getOddRoundingErrors()),u){if(d)throw new j;Z.increment(this.getEvenCounts(),this.getOddRoundingErrors())}d&&Z.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())}}Z.SYMBOL_WIDEST=[7,5,4,3,1],Z.EVEN_TOTAL_SUBSET=[4,20,52,104,204],Z.GSUM=[0,348,1388,2948,3988],Z.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],Z.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],Z.FINDER_PAT_A=0,Z.FINDER_PAT_B=1,Z.FINDER_PAT_C=2,Z.FINDER_PAT_D=3,Z.FINDER_PAT_E=4,Z.FINDER_PAT_F=5,Z.FINDER_PATTERN_SEQUENCES=[[Z.FINDER_PAT_A,Z.FINDER_PAT_A],[Z.FINDER_PAT_A,Z.FINDER_PAT_B,Z.FINDER_PAT_B],[Z.FINDER_PAT_A,Z.FINDER_PAT_C,Z.FINDER_PAT_B,Z.FINDER_PAT_D],[Z.FINDER_PAT_A,Z.FINDER_PAT_E,Z.FINDER_PAT_B,Z.FINDER_PAT_D,Z.FINDER_PAT_C],[Z.FINDER_PAT_A,Z.FINDER_PAT_E,Z.FINDER_PAT_B,Z.FINDER_PAT_D,Z.FINDER_PAT_D,Z.FINDER_PAT_F],[Z.FINDER_PAT_A,Z.FINDER_PAT_E,Z.FINDER_PAT_B,Z.FINDER_PAT_D,Z.FINDER_PAT_E,Z.FINDER_PAT_F,Z.FINDER_PAT_F],[Z.FINDER_PAT_A,Z.FINDER_PAT_A,Z.FINDER_PAT_B,Z.FINDER_PAT_B,Z.FINDER_PAT_C,Z.FINDER_PAT_C,Z.FINDER_PAT_D,Z.FINDER_PAT_D],[Z.FINDER_PAT_A,Z.FINDER_PAT_A,Z.FINDER_PAT_B,Z.FINDER_PAT_B,Z.FINDER_PAT_C,Z.FINDER_PAT_C,Z.FINDER_PAT_D,Z.FINDER_PAT_E,Z.FINDER_PAT_E],[Z.FINDER_PAT_A,Z.FINDER_PAT_A,Z.FINDER_PAT_B,Z.FINDER_PAT_B,Z.FINDER_PAT_C,Z.FINDER_PAT_C,Z.FINDER_PAT_D,Z.FINDER_PAT_E,Z.FINDER_PAT_F,Z.FINDER_PAT_F],[Z.FINDER_PAT_A,Z.FINDER_PAT_A,Z.FINDER_PAT_B,Z.FINDER_PAT_B,Z.FINDER_PAT_C,Z.FINDER_PAT_D,Z.FINDER_PAT_D,Z.FINDER_PAT_E,Z.FINDER_PAT_E,Z.FINDER_PAT_F,Z.FINDER_PAT_F]],Z.MAX_PAIRS=11;class n3 extends Ui{constructor(r,i,s){super(r,i),this.count=0,this.finderPattern=s}getFinderPattern(){return this.finderPattern}getCount(){return this.count}incrementCount(){this.count++}}class it extends jt{constructor(){super(...arguments),this.possibleLeftPairs=[],this.possibleRightPairs=[]}decodeRow(r,i,s){const a=this.decodePair(i,!1,r,s);it.addOrTally(this.possibleLeftPairs,a),i.reverse();let l=this.decodePair(i,!0,r,s);it.addOrTally(this.possibleRightPairs,l),i.reverse();for(let u of this.possibleLeftPairs)if(u.getCount()>1){for(let d of this.possibleRightPairs)if(d.getCount()>1&&it.checkChecksum(u,d))return it.constructResult(u,d)}throw new j}static addOrTally(r,i){if(i==null)return;let s=!1;for(let a of r)if(a.getValue()===i.getValue()){a.incrementCount(),s=!0;break}s||r.push(i)}reset(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0}static constructResult(r,i){let s=4537077*r.getValue()+i.getValue(),a=new String(s).toString(),l=new K;for(let p=13-a.length;p>0;p--)l.append("0");l.append(a);let u=0;for(let p=0;p<13;p++){let v=l.charAt(p).charCodeAt(0)-48;u+=p&1?v:3*v}u=10-u%10,u===10&&(u=0),l.append(u.toString());let d=r.getFinderPattern().getResultPoints(),h=i.getFinderPattern().getResultPoints();return new ze(l.toString(),null,0,[d[0],d[1],h[0],h[1]],ce.RSS_14,new Date().getTime())}static checkChecksum(r,i){let s=(r.getChecksumPortion()+16*i.getChecksumPortion())%79,a=9*r.getFinderPattern().getValue()+i.getFinderPattern().getValue();return a>72&&a--,a>8&&a--,s===a}decodePair(r,i,s,a){try{let l=this.findFinderPattern(r,i),u=this.parseFoundFinderPattern(r,s,i,l),d=a==null?null:a.get(W.NEED_RESULT_POINT_CALLBACK);if(d!=null){let v=(l[0]+l[1])/2;i&&(v=r.getSize()-1-v),d.foundPossibleResultPoint(new ue(v,s))}let h=this.decodeDataCharacter(r,u,!0),p=this.decodeDataCharacter(r,u,!1);return new n3(1597*h.getValue()+p.getValue(),h.getChecksumPortion()+4*p.getChecksumPortion(),u)}catch{return null}}decodeDataCharacter(r,i,s){let a=this.getDataCharacterCounters();for(let F=0;F<a.length;F++)a[F]=0;if(s)gt.recordPatternInReverse(r,i.getStartEnd()[0],a);else{gt.recordPattern(r,i.getStartEnd()[1]+1,a);for(let F=0,H=a.length-1;F<H;F++,H--){let J=a[F];a[F]=a[H],a[H]=J}}let l=s?16:15,u=Ne.sum(new Int32Array(a))/l,d=this.getOddCounts(),h=this.getEvenCounts(),p=this.getOddRoundingErrors(),v=this.getEvenRoundingErrors();for(let F=0;F<a.length;F++){let H=a[F]/u,J=Math.floor(H+.5);J<1?J=1:J>8&&(J=8);let ee=Math.floor(F/2);F&1?(h[ee]=J,v[ee]=H-J):(d[ee]=J,p[ee]=H-J)}this.adjustOddEvenCounts(s,l);let b=0,A=0;for(let F=d.length-1;F>=0;F--)A*=9,A+=d[F],b+=d[F];let N=0,M=0;for(let F=h.length-1;F>=0;F--)N*=9,N+=h[F],M+=h[F];let L=A+3*N;if(s){if(b&1||b>12||b<4)throw new j;let F=(12-b)/2,H=it.OUTSIDE_ODD_WIDEST[F],J=9-H,ee=Zr.getRSSvalue(d,H,!1),Q=Zr.getRSSvalue(h,J,!0),Te=it.OUTSIDE_EVEN_TOTAL_SUBSET[F],ye=it.OUTSIDE_GSUM[F];return new Ui(ee*Te+Q+ye,L)}else{if(M&1||M>10||M<4)throw new j;let F=(10-M)/2,H=it.INSIDE_ODD_WIDEST[F],J=9-H,ee=Zr.getRSSvalue(d,H,!0),Q=Zr.getRSSvalue(h,J,!1),Te=it.INSIDE_ODD_TOTAL_SUBSET[F],ye=it.INSIDE_GSUM[F];return new Ui(Q*Te+ee+ye,L)}}findFinderPattern(r,i){let s=this.getDecodeFinderCounters();s[0]=0,s[1]=0,s[2]=0,s[3]=0;let a=r.getSize(),l=!1,u=0;for(;u<a&&(l=!r.get(u),i!==l);)u++;let d=0,h=u;for(let p=u;p<a;p++)if(r.get(p)!==l)s[d]++;else{if(d===3){if(jt.isFinderPattern(s))return[h,p];h+=s[0]+s[1],s[0]=s[2],s[1]=s[3],s[2]=0,s[3]=0,d--}else d++;s[d]=1,l=!l}throw new j}parseFoundFinderPattern(r,i,s,a){let l=r.get(a[0]),u=a[0]-1;for(;u>=0&&l!==r.get(u);)u--;u++;const d=a[0]-u,h=this.getDecodeFinderCounters(),p=new Int32Array(h.length);D.arraycopy(h,0,p,1,h.length-1),p[0]=d;const v=this.parseFinderValue(p,it.FINDER_PATTERNS);let b=u,A=a[1];return s&&(b=r.getSize()-1-b,A=r.getSize()-1-A),new va(v,[u,a[1]],b,A,i)}adjustOddEvenCounts(r,i){let s=Ne.sum(new Int32Array(this.getOddCounts())),a=Ne.sum(new Int32Array(this.getEvenCounts())),l=!1,u=!1,d=!1,h=!1;r?(s>12?u=!0:s<4&&(l=!0),a>12?h=!0:a<4&&(d=!0)):(s>11?u=!0:s<5&&(l=!0),a>10?h=!0:a<4&&(d=!0));let p=s+a-i,v=(s&1)===(r?1:0),b=(a&1)===1;if(p===1)if(v){if(b)throw new j;u=!0}else{if(!b)throw new j;h=!0}else if(p===-1)if(v){if(b)throw new j;l=!0}else{if(!b)throw new j;d=!0}else if(p===0){if(v){if(!b)throw new j;s<a?(l=!0,h=!0):(u=!0,d=!0)}else if(b)throw new j}else throw new j;if(l){if(u)throw new j;jt.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(u&&jt.decrement(this.getOddCounts(),this.getOddRoundingErrors()),d){if(h)throw new j;jt.increment(this.getEvenCounts(),this.getOddRoundingErrors())}h&&jt.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())}}it.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],it.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],it.OUTSIDE_GSUM=[0,161,961,2015,2715],it.INSIDE_GSUM=[0,336,1036,1516],it.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],it.INSIDE_ODD_WIDEST=[2,4,6,8],it.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])];class zi extends gt{constructor(r,i){super(),this.readers=[],this.verbose=i===!0;const s=r?r.get(W.POSSIBLE_FORMATS):null,a=r&&r.get(W.ASSUME_CODE_39_CHECK_DIGIT)!==void 0;s?((s.includes(ce.EAN_13)||s.includes(ce.UPC_A)||s.includes(ce.EAN_8)||s.includes(ce.UPC_E))&&this.readers.push(new tu(r)),s.includes(ce.CODE_39)&&this.readers.push(new vt(a)),s.includes(ce.CODE_128)&&this.readers.push(new te),s.includes(ce.ITF)&&this.readers.push(new Ue),s.includes(ce.RSS_14)&&this.readers.push(new it),s.includes(ce.RSS_EXPANDED)&&this.readers.push(new Z(this.verbose))):(this.readers.push(new tu(r)),this.readers.push(new vt),this.readers.push(new tu(r)),this.readers.push(new te),this.readers.push(new Ue),this.readers.push(new it),this.readers.push(new Z(this.verbose)))}decodeRow(r,i,s){for(let a=0;a<this.readers.length;a++)try{return this.readers[a].decodeRow(r,i,s)}catch{}throw new j}reset(){this.readers.forEach(r=>r.reset())}}class i3 extends wt{constructor(r=500,i){super(new zi(i),r,i)}}class Le{constructor(r,i,s){this.ecCodewords=r,this.ecBlocks=[i],s&&this.ecBlocks.push(s)}getECCodewords(){return this.ecCodewords}getECBlocks(){return this.ecBlocks}}class Me{constructor(r,i){this.count=r,this.dataCodewords=i}getCount(){return this.count}getDataCodewords(){return this.dataCodewords}}class Re{constructor(r,i,s,a,l,u){this.versionNumber=r,this.symbolSizeRows=i,this.symbolSizeColumns=s,this.dataRegionSizeRows=a,this.dataRegionSizeColumns=l,this.ecBlocks=u;let d=0;const h=u.getECCodewords(),p=u.getECBlocks();for(let v of p)d+=v.getCount()*(v.getDataCodewords()+h);this.totalCodewords=d}getVersionNumber(){return this.versionNumber}getSymbolSizeRows(){return this.symbolSizeRows}getSymbolSizeColumns(){return this.symbolSizeColumns}getDataRegionSizeRows(){return this.dataRegionSizeRows}getDataRegionSizeColumns(){return this.dataRegionSizeColumns}getTotalCodewords(){return this.totalCodewords}getECBlocks(){return this.ecBlocks}static getVersionForDimensions(r,i){if(r&1||i&1)throw new B;for(let s of Re.VERSIONS)if(s.symbolSizeRows===r&&s.symbolSizeColumns===i)return s;throw new B}toString(){return""+this.versionNumber}static buildVersions(){return[new Re(1,10,10,8,8,new Le(5,new Me(1,3))),new Re(2,12,12,10,10,new Le(7,new Me(1,5))),new Re(3,14,14,12,12,new Le(10,new Me(1,8))),new Re(4,16,16,14,14,new Le(12,new Me(1,12))),new Re(5,18,18,16,16,new Le(14,new Me(1,18))),new Re(6,20,20,18,18,new Le(18,new Me(1,22))),new Re(7,22,22,20,20,new Le(20,new Me(1,30))),new Re(8,24,24,22,22,new Le(24,new Me(1,36))),new Re(9,26,26,24,24,new Le(28,new Me(1,44))),new Re(10,32,32,14,14,new Le(36,new Me(1,62))),new Re(11,36,36,16,16,new Le(42,new Me(1,86))),new Re(12,40,40,18,18,new Le(48,new Me(1,114))),new Re(13,44,44,20,20,new Le(56,new Me(1,144))),new Re(14,48,48,22,22,new Le(68,new Me(1,174))),new Re(15,52,52,24,24,new Le(42,new Me(2,102))),new Re(16,64,64,14,14,new Le(56,new Me(2,140))),new Re(17,72,72,16,16,new Le(36,new Me(4,92))),new Re(18,80,80,18,18,new Le(48,new Me(4,114))),new Re(19,88,88,20,20,new Le(56,new Me(4,144))),new Re(20,96,96,22,22,new Le(68,new Me(4,174))),new Re(21,104,104,24,24,new Le(56,new Me(6,136))),new Re(22,120,120,18,18,new Le(68,new Me(6,175))),new Re(23,132,132,20,20,new Le(62,new Me(8,163))),new Re(24,144,144,22,22,new Le(62,new Me(8,156),new Me(2,155))),new Re(25,8,18,6,16,new Le(7,new Me(1,5))),new Re(26,8,32,6,14,new Le(11,new Me(1,10))),new Re(27,12,26,10,24,new Le(14,new Me(1,16))),new Re(28,12,36,10,16,new Le(18,new Me(1,22))),new Re(29,16,36,14,16,new Le(24,new Me(1,32))),new Re(30,16,48,14,22,new Le(28,new Me(1,49)))]}}Re.VERSIONS=Re.buildVersions();class su{constructor(r){const i=r.getHeight();if(i<8||i>144||i&1)throw new B;this.version=su.readVersion(r),this.mappingBitMatrix=this.extractDataRegion(r),this.readMappingMatrix=new le(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}getVersion(){return this.version}static readVersion(r){const i=r.getHeight(),s=r.getWidth();return Re.getVersionForDimensions(i,s)}readCodewords(){const r=new Int8Array(this.version.getTotalCodewords());let i=0,s=4,a=0;const l=this.mappingBitMatrix.getHeight(),u=this.mappingBitMatrix.getWidth();let d=!1,h=!1,p=!1,v=!1;do if(s===l&&a===0&&!d)r[i++]=this.readCorner1(l,u)&255,s-=2,a+=2,d=!0;else if(s===l-2&&a===0&&u&3&&!h)r[i++]=this.readCorner2(l,u)&255,s-=2,a+=2,h=!0;else if(s===l+4&&a===2&&!(u&7)&&!p)r[i++]=this.readCorner3(l,u)&255,s-=2,a+=2,p=!0;else if(s===l-2&&a===0&&(u&7)===4&&!v)r[i++]=this.readCorner4(l,u)&255,s-=2,a+=2,v=!0;else{do s<l&&a>=0&&!this.readMappingMatrix.get(a,s)&&(r[i++]=this.readUtah(s,a,l,u)&255),s-=2,a+=2;while(s>=0&&a<u);s+=1,a+=3;do s>=0&&a<u&&!this.readMappingMatrix.get(a,s)&&(r[i++]=this.readUtah(s,a,l,u)&255),s+=2,a-=2;while(s<l&&a>=0);s+=3,a+=1}while(s<l||a<u);if(i!==this.version.getTotalCodewords())throw new B;return r}readModule(r,i,s,a){return r<0&&(r+=s,i+=4-(s+4&7)),i<0&&(i+=a,r+=4-(a+4&7)),this.readMappingMatrix.set(i,r),this.mappingBitMatrix.get(i,r)}readUtah(r,i,s,a){let l=0;return this.readModule(r-2,i-2,s,a)&&(l|=1),l<<=1,this.readModule(r-2,i-1,s,a)&&(l|=1),l<<=1,this.readModule(r-1,i-2,s,a)&&(l|=1),l<<=1,this.readModule(r-1,i-1,s,a)&&(l|=1),l<<=1,this.readModule(r-1,i,s,a)&&(l|=1),l<<=1,this.readModule(r,i-2,s,a)&&(l|=1),l<<=1,this.readModule(r,i-1,s,a)&&(l|=1),l<<=1,this.readModule(r,i,s,a)&&(l|=1),l}readCorner1(r,i){let s=0;return this.readModule(r-1,0,r,i)&&(s|=1),s<<=1,this.readModule(r-1,1,r,i)&&(s|=1),s<<=1,this.readModule(r-1,2,r,i)&&(s|=1),s<<=1,this.readModule(0,i-2,r,i)&&(s|=1),s<<=1,this.readModule(0,i-1,r,i)&&(s|=1),s<<=1,this.readModule(1,i-1,r,i)&&(s|=1),s<<=1,this.readModule(2,i-1,r,i)&&(s|=1),s<<=1,this.readModule(3,i-1,r,i)&&(s|=1),s}readCorner2(r,i){let s=0;return this.readModule(r-3,0,r,i)&&(s|=1),s<<=1,this.readModule(r-2,0,r,i)&&(s|=1),s<<=1,this.readModule(r-1,0,r,i)&&(s|=1),s<<=1,this.readModule(0,i-4,r,i)&&(s|=1),s<<=1,this.readModule(0,i-3,r,i)&&(s|=1),s<<=1,this.readModule(0,i-2,r,i)&&(s|=1),s<<=1,this.readModule(0,i-1,r,i)&&(s|=1),s<<=1,this.readModule(1,i-1,r,i)&&(s|=1),s}readCorner3(r,i){let s=0;return this.readModule(r-1,0,r,i)&&(s|=1),s<<=1,this.readModule(r-1,i-1,r,i)&&(s|=1),s<<=1,this.readModule(0,i-3,r,i)&&(s|=1),s<<=1,this.readModule(0,i-2,r,i)&&(s|=1),s<<=1,this.readModule(0,i-1,r,i)&&(s|=1),s<<=1,this.readModule(1,i-3,r,i)&&(s|=1),s<<=1,this.readModule(1,i-2,r,i)&&(s|=1),s<<=1,this.readModule(1,i-1,r,i)&&(s|=1),s}readCorner4(r,i){let s=0;return this.readModule(r-3,0,r,i)&&(s|=1),s<<=1,this.readModule(r-2,0,r,i)&&(s|=1),s<<=1,this.readModule(r-1,0,r,i)&&(s|=1),s<<=1,this.readModule(0,i-2,r,i)&&(s|=1),s<<=1,this.readModule(0,i-1,r,i)&&(s|=1),s<<=1,this.readModule(1,i-1,r,i)&&(s|=1),s<<=1,this.readModule(2,i-1,r,i)&&(s|=1),s<<=1,this.readModule(3,i-1,r,i)&&(s|=1),s}extractDataRegion(r){const i=this.version.getSymbolSizeRows(),s=this.version.getSymbolSizeColumns();if(r.getHeight()!==i)throw new y("Dimension of bitMatrix must match the version size");const a=this.version.getDataRegionSizeRows(),l=this.version.getDataRegionSizeColumns(),u=i/a|0,d=s/l|0,h=u*a,p=d*l,v=new le(p,h);for(let b=0;b<u;++b){const A=b*a;for(let N=0;N<d;++N){const M=N*l;for(let L=0;L<a;++L){const F=b*(a+2)+1+L,H=A+L;for(let J=0;J<l;++J){const ee=N*(l+2)+1+J;if(r.get(ee,F)){const Q=M+J;v.set(Q,H)}}}}}return v}}class ou{constructor(r,i){this.numDataCodewords=r,this.codewords=i}static getDataBlocks(r,i){const s=i.getECBlocks();let a=0;const l=s.getECBlocks();for(let L of l)a+=L.getCount();const u=new Array(a);let d=0;for(let L of l)for(let F=0;F<L.getCount();F++){const H=L.getDataCodewords(),J=s.getECCodewords()+H;u[d++]=new ou(H,new Uint8Array(J))}const p=u[0].codewords.length-s.getECCodewords(),v=p-1;let b=0;for(let L=0;L<v;L++)for(let F=0;F<d;F++)u[F].codewords[L]=r[b++];const A=i.getVersionNumber()===24,N=A?8:d;for(let L=0;L<N;L++)u[L].codewords[p-1]=r[b++];const M=u[0].codewords.length;for(let L=p;L<M;L++)for(let F=0;F<d;F++){const H=A?(F+8)%d:F,J=A&&H>7?L-1:L;u[H].codewords[J]=r[b++]}if(b!==r.length)throw new y;return u}getNumDataCodewords(){return this.numDataCodewords}getCodewords(){return this.codewords}}class au{constructor(r){this.bytes=r,this.byteOffset=0,this.bitOffset=0}getBitOffset(){return this.bitOffset}getByteOffset(){return this.byteOffset}readBits(r){if(r<1||r>32||r>this.available())throw new y(""+r);let i=0,s=this.bitOffset,a=this.byteOffset;const l=this.bytes;if(s>0){const u=8-s,d=r<u?r:u,h=u-d,p=255>>8-d<<h;i=(l[a]&p)>>h,r-=d,s+=d,s===8&&(s=0,a++)}if(r>0){for(;r>=8;)i=i<<8|l[a]&255,a++,r-=8;if(r>0){const u=8-r,d=255>>u<<u;i=i<<r|(l[a]&d)>>u,s+=r}}return this.bitOffset=s,this.byteOffset=a,i}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}var yt;(function(E){E[E.PAD_ENCODE=0]="PAD_ENCODE",E[E.ASCII_ENCODE=1]="ASCII_ENCODE",E[E.C40_ENCODE=2]="C40_ENCODE",E[E.TEXT_ENCODE=3]="TEXT_ENCODE",E[E.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",E[E.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",E[E.BASE256_ENCODE=6]="BASE256_ENCODE"})(yt||(yt={}));class Mn{static decode(r){const i=new au(r),s=new K,a=new K,l=new Array;let u=yt.ASCII_ENCODE;do if(u===yt.ASCII_ENCODE)u=this.decodeAsciiSegment(i,s,a);else{switch(u){case yt.C40_ENCODE:this.decodeC40Segment(i,s);break;case yt.TEXT_ENCODE:this.decodeTextSegment(i,s);break;case yt.ANSIX12_ENCODE:this.decodeAnsiX12Segment(i,s);break;case yt.EDIFACT_ENCODE:this.decodeEdifactSegment(i,s);break;case yt.BASE256_ENCODE:this.decodeBase256Segment(i,s,l);break;default:throw new B}u=yt.ASCII_ENCODE}while(u!==yt.PAD_ENCODE&&i.available()>0);return a.length()>0&&s.append(a.toString()),new On(r,s.toString(),l.length===0?null:l,null)}static decodeAsciiSegment(r,i,s){let a=!1;do{let l=r.readBits(8);if(l===0)throw new B;if(l<=128)return a&&(l+=128),i.append(String.fromCharCode(l-1)),yt.ASCII_ENCODE;if(l===129)return yt.PAD_ENCODE;if(l<=229){const u=l-130;u<10&&i.append("0"),i.append(""+u)}else switch(l){case 230:return yt.C40_ENCODE;case 231:return yt.BASE256_ENCODE;case 232:i.append("");break;case 233:case 234:break;case 235:a=!0;break;case 236:i.append("[)>05"),s.insert(0,"");break;case 237:i.append("[)>06"),s.insert(0,"");break;case 238:return yt.ANSIX12_ENCODE;case 239:return yt.TEXT_ENCODE;case 240:return yt.EDIFACT_ENCODE;case 241:break;default:if(l!==254||r.available()!==0)throw new B;break}}while(r.available()>0);return yt.ASCII_ENCODE}static decodeC40Segment(r,i){let s=!1;const a=[];let l=0;do{if(r.available()===8)return;const u=r.readBits(8);if(u===254)return;this.parseTwoBytes(u,r.readBits(8),a);for(let d=0;d<3;d++){const h=a[d];switch(l){case 0:if(h<3)l=h+1;else if(h<this.C40_BASIC_SET_CHARS.length){const p=this.C40_BASIC_SET_CHARS[h];s?(i.append(String.fromCharCode(p.charCodeAt(0)+128)),s=!1):i.append(p)}else throw new B;break;case 1:s?(i.append(String.fromCharCode(h+128)),s=!1):i.append(String.fromCharCode(h)),l=0;break;case 2:if(h<this.C40_SHIFT2_SET_CHARS.length){const p=this.C40_SHIFT2_SET_CHARS[h];s?(i.append(String.fromCharCode(p.charCodeAt(0)+128)),s=!1):i.append(p)}else switch(h){case 27:i.append("");break;case 30:s=!0;break;default:throw new B}l=0;break;case 3:s?(i.append(String.fromCharCode(h+224)),s=!1):i.append(String.fromCharCode(h+96)),l=0;break;default:throw new B}}}while(r.available()>0)}static decodeTextSegment(r,i){let s=!1,a=[],l=0;do{if(r.available()===8)return;const u=r.readBits(8);if(u===254)return;this.parseTwoBytes(u,r.readBits(8),a);for(let d=0;d<3;d++){const h=a[d];switch(l){case 0:if(h<3)l=h+1;else if(h<this.TEXT_BASIC_SET_CHARS.length){const p=this.TEXT_BASIC_SET_CHARS[h];s?(i.append(String.fromCharCode(p.charCodeAt(0)+128)),s=!1):i.append(p)}else throw new B;break;case 1:s?(i.append(String.fromCharCode(h+128)),s=!1):i.append(String.fromCharCode(h)),l=0;break;case 2:if(h<this.TEXT_SHIFT2_SET_CHARS.length){const p=this.TEXT_SHIFT2_SET_CHARS[h];s?(i.append(String.fromCharCode(p.charCodeAt(0)+128)),s=!1):i.append(p)}else switch(h){case 27:i.append("");break;case 30:s=!0;break;default:throw new B}l=0;break;case 3:if(h<this.TEXT_SHIFT3_SET_CHARS.length){const p=this.TEXT_SHIFT3_SET_CHARS[h];s?(i.append(String.fromCharCode(p.charCodeAt(0)+128)),s=!1):i.append(p),l=0}else throw new B;break;default:throw new B}}}while(r.available()>0)}static decodeAnsiX12Segment(r,i){const s=[];do{if(r.available()===8)return;const a=r.readBits(8);if(a===254)return;this.parseTwoBytes(a,r.readBits(8),s);for(let l=0;l<3;l++){const u=s[l];switch(u){case 0:i.append("\r");break;case 1:i.append("*");break;case 2:i.append(">");break;case 3:i.append(" ");break;default:if(u<14)i.append(String.fromCharCode(u+44));else if(u<40)i.append(String.fromCharCode(u+51));else throw new B;break}}}while(r.available()>0)}static parseTwoBytes(r,i,s){let a=(r<<8)+i-1,l=Math.floor(a/1600);s[0]=l,a-=l*1600,l=Math.floor(a/40),s[1]=l,s[2]=a-l*40}static decodeEdifactSegment(r,i){do{if(r.available()<=16)return;for(let s=0;s<4;s++){let a=r.readBits(6);if(a===31){const l=8-r.getBitOffset();l!==8&&r.readBits(l);return}a&32||(a|=64),i.append(String.fromCharCode(a))}}while(r.available()>0)}static decodeBase256Segment(r,i,s){let a=1+r.getByteOffset();const l=this.unrandomize255State(r.readBits(8),a++);let u;if(l===0?u=r.available()/8|0:l<250?u=l:u=250*(l-249)+this.unrandomize255State(r.readBits(8),a++),u<0)throw new B;const d=new Uint8Array(u);for(let h=0;h<u;h++){if(r.available()<8)throw new B;d[h]=this.unrandomize255State(r.readBits(8),a++)}s.push(d);try{i.append(Ee.decode(d,ne.ISO88591))}catch(h){throw new Gt("Platform does not support required encoding: "+h.message)}}static unrandomize255State(r,i){const s=149*i%255+1,a=r-s;return a>=0?a:a+256}}Mn.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Mn.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],Mn.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],Mn.TEXT_SHIFT2_SET_CHARS=Mn.C40_SHIFT2_SET_CHARS,Mn.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",""];class s3{constructor(){this.rsDecoder=new js(_e.DATA_MATRIX_FIELD_256)}decode(r){const i=new su(r),s=i.getVersion(),a=i.readCodewords(),l=ou.getDataBlocks(a,s);let u=0;for(let p of l)u+=p.getNumDataCodewords();const d=new Uint8Array(u),h=l.length;for(let p=0;p<h;p++){const v=l[p],b=v.getCodewords(),A=v.getNumDataCodewords();this.correctErrors(b,A);for(let N=0;N<A;N++)d[N*h+p]=b[N]}return Mn.decode(d)}correctErrors(r,i){const s=new Int32Array(r);try{this.rsDecoder.decode(s,r.length-i)}catch{throw new _}for(let a=0;a<i;a++)r[a]=s[a]}}class ct{constructor(r){this.image=r,this.rectangleDetector=new hn(this.image)}detect(){const r=this.rectangleDetector.detect();let i=this.detectSolid1(r);if(i=this.detectSolid2(i),i[3]=this.correctTopRight(i),!i[3])throw new j;i=this.shiftToModuleCenter(i);const s=i[0],a=i[1],l=i[2],u=i[3];let d=this.transitionsBetween(s,u)+1,h=this.transitionsBetween(l,u)+1;(d&1)===1&&(d+=1),(h&1)===1&&(h+=1),4*d<7*h&&4*h<7*d&&(d=h=Math.max(d,h));let p=ct.sampleGrid(this.image,s,a,l,u,d,h);return new xa(p,[s,a,l,u])}static shiftPoint(r,i,s){let a=(i.getX()-r.getX())/(s+1),l=(i.getY()-r.getY())/(s+1);return new ue(r.getX()+a,r.getY()+l)}static moveAway(r,i,s){let a=r.getX(),l=r.getY();return a<i?a-=1:a+=1,l<s?l-=1:l+=1,new ue(a,l)}detectSolid1(r){let i=r[0],s=r[1],a=r[3],l=r[2],u=this.transitionsBetween(i,s),d=this.transitionsBetween(s,a),h=this.transitionsBetween(a,l),p=this.transitionsBetween(l,i),v=u,b=[l,i,s,a];return v>d&&(v=d,b[0]=i,b[1]=s,b[2]=a,b[3]=l),v>h&&(v=h,b[0]=s,b[1]=a,b[2]=l,b[3]=i),v>p&&(b[0]=a,b[1]=l,b[2]=i,b[3]=s),b}detectSolid2(r){let i=r[0],s=r[1],a=r[2],l=r[3],u=this.transitionsBetween(i,l),d=ct.shiftPoint(s,a,(u+1)*4),h=ct.shiftPoint(a,s,(u+1)*4),p=this.transitionsBetween(d,i),v=this.transitionsBetween(h,l);return p<v?(r[0]=i,r[1]=s,r[2]=a,r[3]=l):(r[0]=s,r[1]=a,r[2]=l,r[3]=i),r}correctTopRight(r){let i=r[0],s=r[1],a=r[2],l=r[3],u=this.transitionsBetween(i,l),d=this.transitionsBetween(s,l),h=ct.shiftPoint(i,s,(d+1)*4),p=ct.shiftPoint(a,s,(u+1)*4);u=this.transitionsBetween(h,l),d=this.transitionsBetween(p,l);let v=new ue(l.getX()+(a.getX()-s.getX())/(u+1),l.getY()+(a.getY()-s.getY())/(u+1)),b=new ue(l.getX()+(i.getX()-s.getX())/(d+1),l.getY()+(i.getY()-s.getY())/(d+1));if(!this.isValid(v))return this.isValid(b)?b:null;if(!this.isValid(b))return v;let A=this.transitionsBetween(h,v)+this.transitionsBetween(p,v),N=this.transitionsBetween(h,b)+this.transitionsBetween(p,b);return A>N?v:b}shiftToModuleCenter(r){let i=r[0],s=r[1],a=r[2],l=r[3],u=this.transitionsBetween(i,l)+1,d=this.transitionsBetween(a,l)+1,h=ct.shiftPoint(i,s,d*4),p=ct.shiftPoint(a,s,u*4);u=this.transitionsBetween(h,l)+1,d=this.transitionsBetween(p,l)+1,(u&1)===1&&(u+=1),(d&1)===1&&(d+=1);let v=(i.getX()+s.getX()+a.getX()+l.getX())/4,b=(i.getY()+s.getY()+a.getY()+l.getY())/4;i=ct.moveAway(i,v,b),s=ct.moveAway(s,v,b),a=ct.moveAway(a,v,b),l=ct.moveAway(l,v,b);let A,N;return h=ct.shiftPoint(i,s,d*4),h=ct.shiftPoint(h,l,u*4),A=ct.shiftPoint(s,i,d*4),A=ct.shiftPoint(A,a,u*4),p=ct.shiftPoint(a,l,d*4),p=ct.shiftPoint(p,s,u*4),N=ct.shiftPoint(l,a,d*4),N=ct.shiftPoint(N,i,u*4),[h,A,p,N]}isValid(r){return r.getX()>=0&&r.getX()<this.image.getWidth()&&r.getY()>0&&r.getY()<this.image.getHeight()}static sampleGrid(r,i,s,a,l,u,d){return kn.getInstance().sampleGrid(r,u,d,.5,.5,u-.5,.5,u-.5,d-.5,.5,d-.5,i.getX(),i.getY(),l.getX(),l.getY(),a.getX(),a.getY(),s.getX(),s.getY())}transitionsBetween(r,i){let s=Math.trunc(r.getX()),a=Math.trunc(r.getY()),l=Math.trunc(i.getX()),u=Math.trunc(i.getY()),d=Math.abs(u-a)>Math.abs(l-s);if(d){let L=s;s=a,a=L,L=l,l=u,u=L}let h=Math.abs(l-s),p=Math.abs(u-a),v=-h/2,b=a<u?1:-1,A=s<l?1:-1,N=0,M=this.image.get(d?a:s,d?s:a);for(let L=s,F=a;L!==l;L+=A){let H=this.image.get(d?F:L,d?L:F);if(H!==M&&(N++,M=H),v+=p,v>0){if(F===u)break;F+=b,v-=h}}return N}}class Pn{constructor(){this.decoder=new s3}decode(r,i=null){let s,a;if(i!=null&&i.has(W.PURE_BARCODE)){const p=Pn.extractPureBits(r.getBlackMatrix());s=this.decoder.decode(p),a=Pn.NO_POINTS}else{const p=new ct(r.getBlackMatrix()).detect();s=this.decoder.decode(p.getBits()),a=p.getPoints()}const l=s.getRawBytes(),u=new ze(s.getText(),l,8*l.length,a,ce.DATA_MATRIX,D.currentTimeMillis()),d=s.getByteSegments();d!=null&&u.putMetadata(ht.BYTE_SEGMENTS,d);const h=s.getECLevel();return h!=null&&u.putMetadata(ht.ERROR_CORRECTION_LEVEL,h),u}reset(){}static extractPureBits(r){const i=r.getTopLeftOnBit(),s=r.getBottomRightOnBit();if(i==null||s==null)throw new j;const a=this.moduleSize(i,r);let l=i[1];const u=s[1];let d=i[0];const p=(s[0]-d+1)/a,v=(u-l+1)/a;if(p<=0||v<=0)throw new j;const b=a/2;l+=b,d+=b;const A=new le(p,v);for(let N=0;N<v;N++){const M=l+N*a;for(let L=0;L<p;L++)r.get(d+L*a,M)&&A.set(L,N)}return A}static moduleSize(r,i){const s=i.getWidth();let a=r[0];const l=r[1];for(;a<s&&i.get(a,l);)a++;if(a===s)throw new j;const u=a-r[0];if(u===0)throw new j;return u}}Pn.NO_POINTS=[];class o3 extends wt{constructor(r=500){super(new Pn,r)}}var $i;(function(E){E[E.L=0]="L",E[E.M=1]="M",E[E.Q=2]="Q",E[E.H=3]="H"})($i||($i={}));class Ve{constructor(r,i,s){this.value=r,this.stringValue=i,this.bits=s,Ve.FOR_BITS.set(s,this),Ve.FOR_VALUE.set(r,this)}getValue(){return this.value}getBits(){return this.bits}static fromString(r){switch(r){case"L":return Ve.L;case"M":return Ve.M;case"Q":return Ve.Q;case"H":return Ve.H;default:throw new C(r+"not available")}}toString(){return this.stringValue}equals(r){if(!(r instanceof Ve))return!1;const i=r;return this.value===i.value}static forBits(r){if(r<0||r>=Ve.FOR_BITS.size)throw new y;return Ve.FOR_BITS.get(r)}}Ve.FOR_BITS=new Map,Ve.FOR_VALUE=new Map,Ve.L=new Ve($i.L,"L",1),Ve.M=new Ve($i.M,"M",0),Ve.Q=new Ve($i.Q,"Q",3),Ve.H=new Ve($i.H,"H",2);class Wt{constructor(r){this.errorCorrectionLevel=Ve.forBits(r>>3&3),this.dataMask=r&7}static numBitsDiffering(r,i){return R.bitCount(r^i)}static decodeFormatInformation(r,i){const s=Wt.doDecodeFormatInformation(r,i);return s!==null?s:Wt.doDecodeFormatInformation(r^Wt.FORMAT_INFO_MASK_QR,i^Wt.FORMAT_INFO_MASK_QR)}static doDecodeFormatInformation(r,i){let s=Number.MAX_SAFE_INTEGER,a=0;for(const l of Wt.FORMAT_INFO_DECODE_LOOKUP){const u=l[0];if(u===r||u===i)return new Wt(l[1]);let d=Wt.numBitsDiffering(r,u);d<s&&(a=l[1],s=d),r!==i&&(d=Wt.numBitsDiffering(i,u),d<s&&(a=l[1],s=d))}return s<=3?new Wt(a):null}getErrorCorrectionLevel(){return this.errorCorrectionLevel}getDataMask(){return this.dataMask}hashCode(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask}equals(r){if(!(r instanceof Wt))return!1;const i=r;return this.errorCorrectionLevel===i.errorCorrectionLevel&&this.dataMask===i.dataMask}}Wt.FORMAT_INFO_MASK_QR=21522,Wt.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])];class z{constructor(r,...i){this.ecCodewordsPerBlock=r,this.ecBlocks=i}getECCodewordsPerBlock(){return this.ecCodewordsPerBlock}getNumBlocks(){let r=0;const i=this.ecBlocks;for(const s of i)r+=s.getCount();return r}getTotalECCodewords(){return this.ecCodewordsPerBlock*this.getNumBlocks()}getECBlocks(){return this.ecBlocks}}class T{constructor(r,i){this.count=r,this.dataCodewords=i}getCount(){return this.count}getDataCodewords(){return this.dataCodewords}}class de{constructor(r,i,...s){this.versionNumber=r,this.alignmentPatternCenters=i,this.ecBlocks=s;let a=0;const l=s[0].getECCodewordsPerBlock(),u=s[0].getECBlocks();for(const d of u)a+=d.getCount()*(d.getDataCodewords()+l);this.totalCodewords=a}getVersionNumber(){return this.versionNumber}getAlignmentPatternCenters(){return this.alignmentPatternCenters}getTotalCodewords(){return this.totalCodewords}getDimensionForVersion(){return 17+4*this.versionNumber}getECBlocksForLevel(r){return this.ecBlocks[r.getValue()]}static getProvisionalVersionForDimension(r){if(r%4!==1)throw new B;try{return this.getVersionForNumber((r-17)/4)}catch{throw new B}}static getVersionForNumber(r){if(r<1||r>40)throw new y;return de.VERSIONS[r-1]}static decodeVersionInformation(r){let i=Number.MAX_SAFE_INTEGER,s=0;for(let a=0;a<de.VERSION_DECODE_INFO.length;a++){const l=de.VERSION_DECODE_INFO[a];if(l===r)return de.getVersionForNumber(a+7);const u=Wt.numBitsDiffering(r,l);u<i&&(s=a+7,i=u)}return i<=3?de.getVersionForNumber(s):null}buildFunctionPattern(){const r=this.getDimensionForVersion(),i=new le(r);i.setRegion(0,0,9,9),i.setRegion(r-8,0,8,9),i.setRegion(0,r-8,9,8);const s=this.alignmentPatternCenters.length;for(let a=0;a<s;a++){const l=this.alignmentPatternCenters[a]-2;for(let u=0;u<s;u++)a===0&&(u===0||u===s-1)||a===s-1&&u===0||i.setRegion(this.alignmentPatternCenters[u]-2,l,5,5)}return i.setRegion(6,9,1,r-17),i.setRegion(9,6,r-17,1),this.versionNumber>6&&(i.setRegion(r-11,0,3,6),i.setRegion(0,r-11,6,3)),i}toString(){return""+this.versionNumber}}de.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),de.VERSIONS=[new de(1,new Int32Array(0),new z(7,new T(1,19)),new z(10,new T(1,16)),new z(13,new T(1,13)),new z(17,new T(1,9))),new de(2,Int32Array.from([6,18]),new z(10,new T(1,34)),new z(16,new T(1,28)),new z(22,new T(1,22)),new z(28,new T(1,16))),new de(3,Int32Array.from([6,22]),new z(15,new T(1,55)),new z(26,new T(1,44)),new z(18,new T(2,17)),new z(22,new T(2,13))),new de(4,Int32Array.from([6,26]),new z(20,new T(1,80)),new z(18,new T(2,32)),new z(26,new T(2,24)),new z(16,new T(4,9))),new de(5,Int32Array.from([6,30]),new z(26,new T(1,108)),new z(24,new T(2,43)),new z(18,new T(2,15),new T(2,16)),new z(22,new T(2,11),new T(2,12))),new de(6,Int32Array.from([6,34]),new z(18,new T(2,68)),new z(16,new T(4,27)),new z(24,new T(4,19)),new z(28,new T(4,15))),new de(7,Int32Array.from([6,22,38]),new z(20,new T(2,78)),new z(18,new T(4,31)),new z(18,new T(2,14),new T(4,15)),new z(26,new T(4,13),new T(1,14))),new de(8,Int32Array.from([6,24,42]),new z(24,new T(2,97)),new z(22,new T(2,38),new T(2,39)),new z(22,new T(4,18),new T(2,19)),new z(26,new T(4,14),new T(2,15))),new de(9,Int32Array.from([6,26,46]),new z(30,new T(2,116)),new z(22,new T(3,36),new T(2,37)),new z(20,new T(4,16),new T(4,17)),new z(24,new T(4,12),new T(4,13))),new de(10,Int32Array.from([6,28,50]),new z(18,new T(2,68),new T(2,69)),new z(26,new T(4,43),new T(1,44)),new z(24,new T(6,19),new T(2,20)),new z(28,new T(6,15),new T(2,16))),new de(11,Int32Array.from([6,30,54]),new z(20,new T(4,81)),new z(30,new T(1,50),new T(4,51)),new z(28,new T(4,22),new T(4,23)),new z(24,new T(3,12),new T(8,13))),new de(12,Int32Array.from([6,32,58]),new z(24,new T(2,92),new T(2,93)),new z(22,new T(6,36),new T(2,37)),new z(26,new T(4,20),new T(6,21)),new z(28,new T(7,14),new T(4,15))),new de(13,Int32Array.from([6,34,62]),new z(26,new T(4,107)),new z(22,new T(8,37),new T(1,38)),new z(24,new T(8,20),new T(4,21)),new z(22,new T(12,11),new T(4,12))),new de(14,Int32Array.from([6,26,46,66]),new z(30,new T(3,115),new T(1,116)),new z(24,new T(4,40),new T(5,41)),new z(20,new T(11,16),new T(5,17)),new z(24,new T(11,12),new T(5,13))),new de(15,Int32Array.from([6,26,48,70]),new z(22,new T(5,87),new T(1,88)),new z(24,new T(5,41),new T(5,42)),new z(30,new T(5,24),new T(7,25)),new z(24,new T(11,12),new T(7,13))),new de(16,Int32Array.from([6,26,50,74]),new z(24,new T(5,98),new T(1,99)),new z(28,new T(7,45),new T(3,46)),new z(24,new T(15,19),new T(2,20)),new z(30,new T(3,15),new T(13,16))),new de(17,Int32Array.from([6,30,54,78]),new z(28,new T(1,107),new T(5,108)),new z(28,new T(10,46),new T(1,47)),new z(28,new T(1,22),new T(15,23)),new z(28,new T(2,14),new T(17,15))),new de(18,Int32Array.from([6,30,56,82]),new z(30,new T(5,120),new T(1,121)),new z(26,new T(9,43),new T(4,44)),new z(28,new T(17,22),new T(1,23)),new z(28,new T(2,14),new T(19,15))),new de(19,Int32Array.from([6,30,58,86]),new z(28,new T(3,113),new T(4,114)),new z(26,new T(3,44),new T(11,45)),new z(26,new T(17,21),new T(4,22)),new z(26,new T(9,13),new T(16,14))),new de(20,Int32Array.from([6,34,62,90]),new z(28,new T(3,107),new T(5,108)),new z(26,new T(3,41),new T(13,42)),new z(30,new T(15,24),new T(5,25)),new z(28,new T(15,15),new T(10,16))),new de(21,Int32Array.from([6,28,50,72,94]),new z(28,new T(4,116),new T(4,117)),new z(26,new T(17,42)),new z(28,new T(17,22),new T(6,23)),new z(30,new T(19,16),new T(6,17))),new de(22,Int32Array.from([6,26,50,74,98]),new z(28,new T(2,111),new T(7,112)),new z(28,new T(17,46)),new z(30,new T(7,24),new T(16,25)),new z(24,new T(34,13))),new de(23,Int32Array.from([6,30,54,78,102]),new z(30,new T(4,121),new T(5,122)),new z(28,new T(4,47),new T(14,48)),new z(30,new T(11,24),new T(14,25)),new z(30,new T(16,15),new T(14,16))),new de(24,Int32Array.from([6,28,54,80,106]),new z(30,new T(6,117),new T(4,118)),new z(28,new T(6,45),new T(14,46)),new z(30,new T(11,24),new T(16,25)),new z(30,new T(30,16),new T(2,17))),new de(25,Int32Array.from([6,32,58,84,110]),new z(26,new T(8,106),new T(4,107)),new z(28,new T(8,47),new T(13,48)),new z(30,new T(7,24),new T(22,25)),new z(30,new T(22,15),new T(13,16))),new de(26,Int32Array.from([6,30,58,86,114]),new z(28,new T(10,114),new T(2,115)),new z(28,new T(19,46),new T(4,47)),new z(28,new T(28,22),new T(6,23)),new z(30,new T(33,16),new T(4,17))),new de(27,Int32Array.from([6,34,62,90,118]),new z(30,new T(8,122),new T(4,123)),new z(28,new T(22,45),new T(3,46)),new z(30,new T(8,23),new T(26,24)),new z(30,new T(12,15),new T(28,16))),new de(28,Int32Array.from([6,26,50,74,98,122]),new z(30,new T(3,117),new T(10,118)),new z(28,new T(3,45),new T(23,46)),new z(30,new T(4,24),new T(31,25)),new z(30,new T(11,15),new T(31,16))),new de(29,Int32Array.from([6,30,54,78,102,126]),new z(30,new T(7,116),new T(7,117)),new z(28,new T(21,45),new T(7,46)),new z(30,new T(1,23),new T(37,24)),new z(30,new T(19,15),new T(26,16))),new de(30,Int32Array.from([6,26,52,78,104,130]),new z(30,new T(5,115),new T(10,116)),new z(28,new T(19,47),new T(10,48)),new z(30,new T(15,24),new T(25,25)),new z(30,new T(23,15),new T(25,16))),new de(31,Int32Array.from([6,30,56,82,108,134]),new z(30,new T(13,115),new T(3,116)),new z(28,new T(2,46),new T(29,47)),new z(30,new T(42,24),new T(1,25)),new z(30,new T(23,15),new T(28,16))),new de(32,Int32Array.from([6,34,60,86,112,138]),new z(30,new T(17,115)),new z(28,new T(10,46),new T(23,47)),new z(30,new T(10,24),new T(35,25)),new z(30,new T(19,15),new T(35,16))),new de(33,Int32Array.from([6,30,58,86,114,142]),new z(30,new T(17,115),new T(1,116)),new z(28,new T(14,46),new T(21,47)),new z(30,new T(29,24),new T(19,25)),new z(30,new T(11,15),new T(46,16))),new de(34,Int32Array.from([6,34,62,90,118,146]),new z(30,new T(13,115),new T(6,116)),new z(28,new T(14,46),new T(23,47)),new z(30,new T(44,24),new T(7,25)),new z(30,new T(59,16),new T(1,17))),new de(35,Int32Array.from([6,30,54,78,102,126,150]),new z(30,new T(12,121),new T(7,122)),new z(28,new T(12,47),new T(26,48)),new z(30,new T(39,24),new T(14,25)),new z(30,new T(22,15),new T(41,16))),new de(36,Int32Array.from([6,24,50,76,102,128,154]),new z(30,new T(6,121),new T(14,122)),new z(28,new T(6,47),new T(34,48)),new z(30,new T(46,24),new T(10,25)),new z(30,new T(2,15),new T(64,16))),new de(37,Int32Array.from([6,28,54,80,106,132,158]),new z(30,new T(17,122),new T(4,123)),new z(28,new T(29,46),new T(14,47)),new z(30,new T(49,24),new T(10,25)),new z(30,new T(24,15),new T(46,16))),new de(38,Int32Array.from([6,32,58,84,110,136,162]),new z(30,new T(4,122),new T(18,123)),new z(28,new T(13,46),new T(32,47)),new z(30,new T(48,24),new T(14,25)),new z(30,new T(42,15),new T(32,16))),new de(39,Int32Array.from([6,26,54,82,110,138,166]),new z(30,new T(20,117),new T(4,118)),new z(28,new T(40,47),new T(7,48)),new z(30,new T(43,24),new T(22,25)),new z(30,new T(10,15),new T(67,16))),new de(40,Int32Array.from([6,30,58,86,114,142,170]),new z(30,new T(19,118),new T(6,119)),new z(28,new T(18,47),new T(31,48)),new z(30,new T(34,24),new T(34,25)),new z(30,new T(20,15),new T(61,16)))];var It;(function(E){E[E.DATA_MASK_000=0]="DATA_MASK_000",E[E.DATA_MASK_001=1]="DATA_MASK_001",E[E.DATA_MASK_010=2]="DATA_MASK_010",E[E.DATA_MASK_011=3]="DATA_MASK_011",E[E.DATA_MASK_100=4]="DATA_MASK_100",E[E.DATA_MASK_101=5]="DATA_MASK_101",E[E.DATA_MASK_110=6]="DATA_MASK_110",E[E.DATA_MASK_111=7]="DATA_MASK_111"})(It||(It={}));class Sr{constructor(r,i){this.value=r,this.isMasked=i}unmaskBitMatrix(r,i){for(let s=0;s<i;s++)for(let a=0;a<i;a++)this.isMasked(s,a)&&r.flip(a,s)}}Sr.values=new Map([[It.DATA_MASK_000,new Sr(It.DATA_MASK_000,(E,r)=>(E+r&1)===0)],[It.DATA_MASK_001,new Sr(It.DATA_MASK_001,(E,r)=>(E&1)===0)],[It.DATA_MASK_010,new Sr(It.DATA_MASK_010,(E,r)=>r%3===0)],[It.DATA_MASK_011,new Sr(It.DATA_MASK_011,(E,r)=>(E+r)%3===0)],[It.DATA_MASK_100,new Sr(It.DATA_MASK_100,(E,r)=>(Math.floor(E/2)+Math.floor(r/3)&1)===0)],[It.DATA_MASK_101,new Sr(It.DATA_MASK_101,(E,r)=>E*r%6===0)],[It.DATA_MASK_110,new Sr(It.DATA_MASK_110,(E,r)=>E*r%6<3)],[It.DATA_MASK_111,new Sr(It.DATA_MASK_111,(E,r)=>(E+r+E*r%3&1)===0)]]);class a3{constructor(r){const i=r.getHeight();if(i<21||(i&3)!==1)throw new B;this.bitMatrix=r}readFormatInformation(){if(this.parsedFormatInfo!==null&&this.parsedFormatInfo!==void 0)return this.parsedFormatInfo;let r=0;for(let l=0;l<6;l++)r=this.copyBit(l,8,r);r=this.copyBit(7,8,r),r=this.copyBit(8,8,r),r=this.copyBit(8,7,r);for(let l=5;l>=0;l--)r=this.copyBit(8,l,r);const i=this.bitMatrix.getHeight();let s=0;const a=i-7;for(let l=i-1;l>=a;l--)s=this.copyBit(8,l,s);for(let l=i-8;l<i;l++)s=this.copyBit(l,8,s);if(this.parsedFormatInfo=Wt.decodeFormatInformation(r,s),this.parsedFormatInfo!==null)return this.parsedFormatInfo;throw new B}readVersion(){if(this.parsedVersion!==null&&this.parsedVersion!==void 0)return this.parsedVersion;const r=this.bitMatrix.getHeight(),i=Math.floor((r-17)/4);if(i<=6)return de.getVersionForNumber(i);let s=0;const a=r-11;for(let u=5;u>=0;u--)for(let d=r-9;d>=a;d--)s=this.copyBit(d,u,s);let l=de.decodeVersionInformation(s);if(l!==null&&l.getDimensionForVersion()===r)return this.parsedVersion=l,l;s=0;for(let u=5;u>=0;u--)for(let d=r-9;d>=a;d--)s=this.copyBit(u,d,s);if(l=de.decodeVersionInformation(s),l!==null&&l.getDimensionForVersion()===r)return this.parsedVersion=l,l;throw new B}copyBit(r,i,s){return(this.isMirror?this.bitMatrix.get(i,r):this.bitMatrix.get(r,i))?s<<1|1:s<<1}readCodewords(){const r=this.readFormatInformation(),i=this.readVersion(),s=Sr.values.get(r.getDataMask()),a=this.bitMatrix.getHeight();s.unmaskBitMatrix(this.bitMatrix,a);const l=i.buildFunctionPattern();let u=!0;const d=new Uint8Array(i.getTotalCodewords());let h=0,p=0,v=0;for(let b=a-1;b>0;b-=2){b===6&&b--;for(let A=0;A<a;A++){const N=u?a-1-A:A;for(let M=0;M<2;M++)l.get(b-M,N)||(v++,p<<=1,this.bitMatrix.get(b-M,N)&&(p|=1),v===8&&(d[h++]=p,v=0,p=0))}u=!u}if(h!==i.getTotalCodewords())throw new B;return d}remask(){if(this.parsedFormatInfo===null)return;const r=Sr.values[this.parsedFormatInfo.getDataMask()],i=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,i)}setMirror(r){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=r}mirror(){const r=this.bitMatrix;for(let i=0,s=r.getWidth();i<s;i++)for(let a=i+1,l=r.getHeight();a<l;a++)r.get(i,a)!==r.get(a,i)&&(r.flip(a,i),r.flip(i,a))}}class lu{constructor(r,i){this.numDataCodewords=r,this.codewords=i}static getDataBlocks(r,i,s){if(r.length!==i.getTotalCodewords())throw new y;const a=i.getECBlocksForLevel(s);let l=0;const u=a.getECBlocks();for(const M of u)l+=M.getCount();const d=new Array(l);let h=0;for(const M of u)for(let L=0;L<M.getCount();L++){const F=M.getDataCodewords(),H=a.getECCodewordsPerBlock()+F;d[h++]=new lu(F,new Uint8Array(H))}const p=d[0].codewords.length;let v=d.length-1;for(;v>=0&&d[v].codewords.length!==p;)v--;v++;const b=p-a.getECCodewordsPerBlock();let A=0;for(let M=0;M<b;M++)for(let L=0;L<h;L++)d[L].codewords[M]=r[A++];for(let M=v;M<h;M++)d[M].codewords[b]=r[A++];const N=d[0].codewords.length;for(let M=b;M<N;M++)for(let L=0;L<h;L++){const F=L<v?M:M+1;d[L].codewords[F]=r[A++]}return d}getNumDataCodewords(){return this.numDataCodewords}getCodewords(){return this.codewords}}var Ir;(function(E){E[E.TERMINATOR=0]="TERMINATOR",E[E.NUMERIC=1]="NUMERIC",E[E.ALPHANUMERIC=2]="ALPHANUMERIC",E[E.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",E[E.BYTE=4]="BYTE",E[E.ECI=5]="ECI",E[E.KANJI=6]="KANJI",E[E.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",E[E.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",E[E.HANZI=9]="HANZI"})(Ir||(Ir={}));class pe{constructor(r,i,s,a){this.value=r,this.stringValue=i,this.characterCountBitsForVersions=s,this.bits=a,pe.FOR_BITS.set(a,this),pe.FOR_VALUE.set(r,this)}static forBits(r){const i=pe.FOR_BITS.get(r);if(i===void 0)throw new y;return i}getCharacterCountBits(r){const i=r.getVersionNumber();let s;return i<=9?s=0:i<=26?s=1:s=2,this.characterCountBitsForVersions[s]}getValue(){return this.value}getBits(){return this.bits}equals(r){if(!(r instanceof pe))return!1;const i=r;return this.value===i.value}toString(){return this.stringValue}}pe.FOR_BITS=new Map,pe.FOR_VALUE=new Map,pe.TERMINATOR=new pe(Ir.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),pe.NUMERIC=new pe(Ir.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),pe.ALPHANUMERIC=new pe(Ir.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),pe.STRUCTURED_APPEND=new pe(Ir.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),pe.BYTE=new pe(Ir.BYTE,"BYTE",Int32Array.from([8,16,16]),4),pe.ECI=new pe(Ir.ECI,"ECI",Int32Array.from([0,0,0]),7),pe.KANJI=new pe(Ir.KANJI,"KANJI",Int32Array.from([8,10,12]),8),pe.FNC1_FIRST_POSITION=new pe(Ir.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),pe.FNC1_SECOND_POSITION=new pe(Ir.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),pe.HANZI=new pe(Ir.HANZI,"HANZI",Int32Array.from([8,10,12]),13);class qe{static decode(r,i,s,a){const l=new au(r);let u=new K;const d=new Array;let h=-1,p=-1;try{let v=null,b=!1,A;do{if(l.available()<4)A=pe.TERMINATOR;else{const N=l.readBits(4);A=pe.forBits(N)}switch(A){case pe.TERMINATOR:break;case pe.FNC1_FIRST_POSITION:case pe.FNC1_SECOND_POSITION:b=!0;break;case pe.STRUCTURED_APPEND:if(l.available()<16)throw new B;h=l.readBits(8),p=l.readBits(8);break;case pe.ECI:const N=qe.parseECIValue(l);if(v=$.getCharacterSetECIByValue(N),v===null)throw new B;break;case pe.HANZI:const M=l.readBits(4),L=l.readBits(A.getCharacterCountBits(i));M===qe.GB2312_SUBSET&&qe.decodeHanziSegment(l,u,L);break;default:const F=l.readBits(A.getCharacterCountBits(i));switch(A){case pe.NUMERIC:qe.decodeNumericSegment(l,u,F);break;case pe.ALPHANUMERIC:qe.decodeAlphanumericSegment(l,u,F,b);break;case pe.BYTE:qe.decodeByteSegment(l,u,F,v,d,a);break;case pe.KANJI:qe.decodeKanjiSegment(l,u,F);break;default:throw new B}break}}while(A!==pe.TERMINATOR)}catch{throw new B}return new On(r,u.toString(),d.length===0?null:d,s===null?null:s.toString(),h,p)}static decodeHanziSegment(r,i,s){if(s*13>r.available())throw new B;const a=new Uint8Array(2*s);let l=0;for(;s>0;){const u=r.readBits(13);let d=u/96<<8&4294967295|u%96;d<959?d+=41377:d+=42657,a[l]=d>>8&255,a[l+1]=d&255,l+=2,s--}try{i.append(Ee.decode(a,ne.GB2312))}catch(u){throw new B(u)}}static decodeKanjiSegment(r,i,s){if(s*13>r.available())throw new B;const a=new Uint8Array(2*s);let l=0;for(;s>0;){const u=r.readBits(13);let d=u/192<<8&4294967295|u%192;d<7936?d+=33088:d+=49472,a[l]=d>>8,a[l+1]=d,l+=2,s--}try{i.append(Ee.decode(a,ne.SHIFT_JIS))}catch(u){throw new B(u)}}static decodeByteSegment(r,i,s,a,l,u){if(8*s>r.available())throw new B;const d=new Uint8Array(s);for(let p=0;p<s;p++)d[p]=r.readBits(8);let h;a===null?h=ne.guessEncoding(d,u):h=a.getName();try{i.append(Ee.decode(d,h))}catch(p){throw new B(p)}l.push(d)}static toAlphaNumericChar(r){if(r>=qe.ALPHANUMERIC_CHARS.length)throw new B;return qe.ALPHANUMERIC_CHARS[r]}static decodeAlphanumericSegment(r,i,s,a){const l=i.length();for(;s>1;){if(r.available()<11)throw new B;const u=r.readBits(11);i.append(qe.toAlphaNumericChar(Math.floor(u/45))),i.append(qe.toAlphaNumericChar(u%45)),s-=2}if(s===1){if(r.available()<6)throw new B;i.append(qe.toAlphaNumericChar(r.readBits(6)))}if(a)for(let u=l;u<i.length();u++)i.charAt(u)==="%"&&(u<i.length()-1&&i.charAt(u+1)==="%"?i.deleteCharAt(u+1):i.setCharAt(u,""))}static decodeNumericSegment(r,i,s){for(;s>=3;){if(r.available()<10)throw new B;const a=r.readBits(10);if(a>=1e3)throw new B;i.append(qe.toAlphaNumericChar(Math.floor(a/100))),i.append(qe.toAlphaNumericChar(Math.floor(a/10)%10)),i.append(qe.toAlphaNumericChar(a%10)),s-=3}if(s===2){if(r.available()<7)throw new B;const a=r.readBits(7);if(a>=100)throw new B;i.append(qe.toAlphaNumericChar(Math.floor(a/10))),i.append(qe.toAlphaNumericChar(a%10))}else if(s===1){if(r.available()<4)throw new B;const a=r.readBits(4);if(a>=10)throw new B;i.append(qe.toAlphaNumericChar(a))}}static parseECIValue(r){const i=r.readBits(8);if(!(i&128))return i&127;if((i&192)===128){const s=r.readBits(8);return(i&63)<<8&4294967295|s}if((i&224)===192){const s=r.readBits(16);return(i&31)<<16&4294967295|s}throw new B}}qe.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",qe.GB2312_SUBSET=1;class Z0{constructor(r){this.mirrored=r}isMirrored(){return this.mirrored}applyMirroredCorrection(r){if(!this.mirrored||r===null||r.length<3)return;const i=r[0];r[0]=r[2],r[2]=i}}class l3{constructor(){this.rsDecoder=new js(_e.QR_CODE_FIELD_256)}decodeBooleanArray(r,i){return this.decodeBitMatrix(le.parseFromBooleanArray(r),i)}decodeBitMatrix(r,i){const s=new a3(r);let a=null;try{return this.decodeBitMatrixParser(s,i)}catch(l){a=l}try{s.remask(),s.setMirror(!0),s.readVersion(),s.readFormatInformation(),s.mirror();const l=this.decodeBitMatrixParser(s,i);return l.setOther(new Z0(!0)),l}catch(l){throw a!==null?a:l}}decodeBitMatrixParser(r,i){const s=r.readVersion(),a=r.readFormatInformation().getErrorCorrectionLevel(),l=r.readCodewords(),u=lu.getDataBlocks(l,s,a);let d=0;for(const v of u)d+=v.getNumDataCodewords();const h=new Uint8Array(d);let p=0;for(const v of u){const b=v.getCodewords(),A=v.getNumDataCodewords();this.correctErrors(b,A);for(let N=0;N<A;N++)h[p++]=b[N]}return qe.decode(h,s,a,i)}correctErrors(r,i){const s=new Int32Array(r);try{this.rsDecoder.decode(s,r.length-i)}catch{throw new _}for(let a=0;a<i;a++)r[a]=s[a]}}class cu extends ue{constructor(r,i,s){super(r,i),this.estimatedModuleSize=s}aboutEquals(r,i,s){if(Math.abs(i-this.getY())<=r&&Math.abs(s-this.getX())<=r){const a=Math.abs(r-this.estimatedModuleSize);return a<=1||a<=this.estimatedModuleSize}return!1}combineEstimate(r,i,s){const a=(this.getX()+i)/2,l=(this.getY()+r)/2,u=(this.estimatedModuleSize+s)/2;return new cu(a,l,u)}}class ba{constructor(r,i,s,a,l,u,d){this.image=r,this.startX=i,this.startY=s,this.width=a,this.height=l,this.moduleSize=u,this.resultPointCallback=d,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}find(){const r=this.startX,i=this.height,s=this.width,a=r+s,l=this.startY+i/2,u=new Int32Array(3),d=this.image;for(let h=0;h<i;h++){const p=l+(h&1?-Math.floor((h+1)/2):Math.floor((h+1)/2));u[0]=0,u[1]=0,u[2]=0;let v=r;for(;v<a&&!d.get(v,p);)v++;let b=0;for(;v<a;){if(d.get(v,p))if(b===1)u[1]++;else if(b===2){if(this.foundPatternCross(u)){const A=this.handlePossibleCenter(u,p,v);if(A!==null)return A}u[0]=u[2],u[1]=1,u[2]=0,b=1}else u[++b]++;else b===1&&b++,u[b]++;v++}if(this.foundPatternCross(u)){const A=this.handlePossibleCenter(u,p,a);if(A!==null)return A}}if(this.possibleCenters.length!==0)return this.possibleCenters[0];throw new j}static centerFromEnd(r,i){return i-r[2]-r[1]/2}foundPatternCross(r){const i=this.moduleSize,s=i/2;for(let a=0;a<3;a++)if(Math.abs(i-r[a])>=s)return!1;return!0}crossCheckVertical(r,i,s,a){const l=this.image,u=l.getHeight(),d=this.crossCheckStateCount;d[0]=0,d[1]=0,d[2]=0;let h=r;for(;h>=0&&l.get(i,h)&&d[1]<=s;)d[1]++,h--;if(h<0||d[1]>s)return NaN;for(;h>=0&&!l.get(i,h)&&d[0]<=s;)d[0]++,h--;if(d[0]>s)return NaN;for(h=r+1;h<u&&l.get(i,h)&&d[1]<=s;)d[1]++,h++;if(h===u||d[1]>s)return NaN;for(;h<u&&!l.get(i,h)&&d[2]<=s;)d[2]++,h++;if(d[2]>s)return NaN;const p=d[0]+d[1]+d[2];return 5*Math.abs(p-a)>=2*a?NaN:this.foundPatternCross(d)?ba.centerFromEnd(d,h):NaN}handlePossibleCenter(r,i,s){const a=r[0]+r[1]+r[2],l=ba.centerFromEnd(r,s),u=this.crossCheckVertical(i,l,2*r[1],a);if(!isNaN(u)){const d=(r[0]+r[1]+r[2])/3;for(const p of this.possibleCenters)if(p.aboutEquals(d,u,l))return p.combineEstimate(u,l,d);const h=new cu(l,u,d);this.possibleCenters.push(h),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(h)}return null}}class uu extends ue{constructor(r,i,s,a){super(r,i),this.estimatedModuleSize=s,this.count=a,a===void 0&&(this.count=1)}getEstimatedModuleSize(){return this.estimatedModuleSize}getCount(){return this.count}aboutEquals(r,i,s){if(Math.abs(i-this.getY())<=r&&Math.abs(s-this.getX())<=r){const a=Math.abs(r-this.estimatedModuleSize);return a<=1||a<=this.estimatedModuleSize}return!1}combineEstimate(r,i,s){const a=this.count+1,l=(this.count*this.getX()+i)/a,u=(this.count*this.getY()+r)/a,d=(this.count*this.estimatedModuleSize+s)/a;return new uu(l,u,d,a)}}class c3{constructor(r){this.bottomLeft=r[0],this.topLeft=r[1],this.topRight=r[2]}getBottomLeft(){return this.bottomLeft}getTopLeft(){return this.topLeft}getTopRight(){return this.topRight}}class Tt{constructor(r,i){this.image=r,this.resultPointCallback=i,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=i}getImage(){return this.image}getPossibleCenters(){return this.possibleCenters}find(r){const i=r!=null&&r.get(W.TRY_HARDER)!==void 0,s=r!=null&&r.get(W.PURE_BARCODE)!==void 0,a=this.image,l=a.getHeight(),u=a.getWidth();let d=Math.floor(3*l/(4*Tt.MAX_MODULES));(d<Tt.MIN_SKIP||i)&&(d=Tt.MIN_SKIP);let h=!1;const p=new Int32Array(5);for(let b=d-1;b<l&&!h;b+=d){p[0]=0,p[1]=0,p[2]=0,p[3]=0,p[4]=0;let A=0;for(let N=0;N<u;N++)if(a.get(N,b))(A&1)===1&&A++,p[A]++;else if(A&1)p[A]++;else if(A===4)if(Tt.foundPatternCross(p)){if(this.handlePossibleCenter(p,b,N,s)===!0)if(d=2,this.hasSkipped===!0)h=this.haveMultiplyConfirmedCenters();else{const L=this.findRowSkip();L>p[2]&&(b+=L-p[2]-d,N=u-1)}else{p[0]=p[2],p[1]=p[3],p[2]=p[4],p[3]=1,p[4]=0,A=3;continue}A=0,p[0]=0,p[1]=0,p[2]=0,p[3]=0,p[4]=0}else p[0]=p[2],p[1]=p[3],p[2]=p[4],p[3]=1,p[4]=0,A=3;else p[++A]++;Tt.foundPatternCross(p)&&this.handlePossibleCenter(p,b,u,s)===!0&&(d=p[0],this.hasSkipped&&(h=this.haveMultiplyConfirmedCenters()))}const v=this.selectBestPatterns();return ue.orderBestPatterns(v),new c3(v)}static centerFromEnd(r,i){return i-r[4]-r[3]-r[2]/2}static foundPatternCross(r){let i=0;for(let l=0;l<5;l++){const u=r[l];if(u===0)return!1;i+=u}if(i<7)return!1;const s=i/7,a=s/2;return Math.abs(s-r[0])<a&&Math.abs(s-r[1])<a&&Math.abs(3*s-r[2])<3*a&&Math.abs(s-r[3])<a&&Math.abs(s-r[4])<a}getCrossCheckStateCount(){const r=this.crossCheckStateCount;return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r}crossCheckDiagonal(r,i,s,a){const l=this.getCrossCheckStateCount();let u=0;const d=this.image;for(;r>=u&&i>=u&&d.get(i-u,r-u);)l[2]++,u++;if(r<u||i<u)return!1;for(;r>=u&&i>=u&&!d.get(i-u,r-u)&&l[1]<=s;)l[1]++,u++;if(r<u||i<u||l[1]>s)return!1;for(;r>=u&&i>=u&&d.get(i-u,r-u)&&l[0]<=s;)l[0]++,u++;if(l[0]>s)return!1;const h=d.getHeight(),p=d.getWidth();for(u=1;r+u<h&&i+u<p&&d.get(i+u,r+u);)l[2]++,u++;if(r+u>=h||i+u>=p)return!1;for(;r+u<h&&i+u<p&&!d.get(i+u,r+u)&&l[3]<s;)l[3]++,u++;if(r+u>=h||i+u>=p||l[3]>=s)return!1;for(;r+u<h&&i+u<p&&d.get(i+u,r+u)&&l[4]<s;)l[4]++,u++;if(l[4]>=s)return!1;const v=l[0]+l[1]+l[2]+l[3]+l[4];return Math.abs(v-a)<2*a&&Tt.foundPatternCross(l)}crossCheckVertical(r,i,s,a){const l=this.image,u=l.getHeight(),d=this.getCrossCheckStateCount();let h=r;for(;h>=0&&l.get(i,h);)d[2]++,h--;if(h<0)return NaN;for(;h>=0&&!l.get(i,h)&&d[1]<=s;)d[1]++,h--;if(h<0||d[1]>s)return NaN;for(;h>=0&&l.get(i,h)&&d[0]<=s;)d[0]++,h--;if(d[0]>s)return NaN;for(h=r+1;h<u&&l.get(i,h);)d[2]++,h++;if(h===u)return NaN;for(;h<u&&!l.get(i,h)&&d[3]<s;)d[3]++,h++;if(h===u||d[3]>=s)return NaN;for(;h<u&&l.get(i,h)&&d[4]<s;)d[4]++,h++;if(d[4]>=s)return NaN;const p=d[0]+d[1]+d[2]+d[3]+d[4];return 5*Math.abs(p-a)>=2*a?NaN:Tt.foundPatternCross(d)?Tt.centerFromEnd(d,h):NaN}crossCheckHorizontal(r,i,s,a){const l=this.image,u=l.getWidth(),d=this.getCrossCheckStateCount();let h=r;for(;h>=0&&l.get(h,i);)d[2]++,h--;if(h<0)return NaN;for(;h>=0&&!l.get(h,i)&&d[1]<=s;)d[1]++,h--;if(h<0||d[1]>s)return NaN;for(;h>=0&&l.get(h,i)&&d[0]<=s;)d[0]++,h--;if(d[0]>s)return NaN;for(h=r+1;h<u&&l.get(h,i);)d[2]++,h++;if(h===u)return NaN;for(;h<u&&!l.get(h,i)&&d[3]<s;)d[3]++,h++;if(h===u||d[3]>=s)return NaN;for(;h<u&&l.get(h,i)&&d[4]<s;)d[4]++,h++;if(d[4]>=s)return NaN;const p=d[0]+d[1]+d[2]+d[3]+d[4];return 5*Math.abs(p-a)>=a?NaN:Tt.foundPatternCross(d)?Tt.centerFromEnd(d,h):NaN}handlePossibleCenter(r,i,s,a){const l=r[0]+r[1]+r[2]+r[3]+r[4];let u=Tt.centerFromEnd(r,s),d=this.crossCheckVertical(i,Math.floor(u),r[2],l);if(!isNaN(d)&&(u=this.crossCheckHorizontal(Math.floor(u),Math.floor(d),r[2],l),!isNaN(u)&&(!a||this.crossCheckDiagonal(Math.floor(d),Math.floor(u),r[2],l)))){const h=l/7;let p=!1;const v=this.possibleCenters;for(let b=0,A=v.length;b<A;b++){const N=v[b];if(N.aboutEquals(h,d,u)){v[b]=N.combineEstimate(d,u,h),p=!0;break}}if(!p){const b=new uu(u,d,h);v.push(b),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(b)}return!0}return!1}findRowSkip(){if(this.possibleCenters.length<=1)return 0;let i=null;for(const s of this.possibleCenters)if(s.getCount()>=Tt.CENTER_QUORUM)if(i==null)i=s;else return this.hasSkipped=!0,Math.floor((Math.abs(i.getX()-s.getX())-Math.abs(i.getY()-s.getY()))/2);return 0}haveMultiplyConfirmedCenters(){let r=0,i=0;const s=this.possibleCenters.length;for(const u of this.possibleCenters)u.getCount()>=Tt.CENTER_QUORUM&&(r++,i+=u.getEstimatedModuleSize());if(r<3)return!1;const a=i/s;let l=0;for(const u of this.possibleCenters)l+=Math.abs(u.getEstimatedModuleSize()-a);return l<=.05*i}selectBestPatterns(){const r=this.possibleCenters.length;if(r<3)throw new j;const i=this.possibleCenters;let s;if(r>3){let a=0,l=0;for(const h of this.possibleCenters){const p=h.getEstimatedModuleSize();a+=p,l+=p*p}s=a/r;let u=Math.sqrt(l/r-s*s);i.sort((h,p)=>{const v=Math.abs(p.getEstimatedModuleSize()-s),b=Math.abs(h.getEstimatedModuleSize()-s);return v<b?-1:v>b?1:0});const d=Math.max(.2*s,u);for(let h=0;h<i.length&&i.length>3;h++){const p=i[h];Math.abs(p.getEstimatedModuleSize()-s)>d&&(i.splice(h,1),h--)}}if(i.length>3){let a=0;for(const l of i)a+=l.getEstimatedModuleSize();s=a/i.length,i.sort((l,u)=>{if(u.getCount()===l.getCount()){const d=Math.abs(u.getEstimatedModuleSize()-s),h=Math.abs(l.getEstimatedModuleSize()-s);return d<h?1:d>h?-1:0}else return u.getCount()-l.getCount()}),i.splice(3)}return[i[0],i[1],i[2]]}}Tt.CENTER_QUORUM=2,Tt.MIN_SKIP=3,Tt.MAX_MODULES=57;class zs{constructor(r){this.image=r}getImage(){return this.image}getResultPointCallback(){return this.resultPointCallback}detect(r){this.resultPointCallback=r==null?null:r.get(W.NEED_RESULT_POINT_CALLBACK);const s=new Tt(this.image,this.resultPointCallback).find(r);return this.processFinderPatternInfo(s)}processFinderPatternInfo(r){const i=r.getTopLeft(),s=r.getTopRight(),a=r.getBottomLeft(),l=this.calculateModuleSize(i,s,a);if(l<1)throw new j("No pattern found in proccess finder.");const u=zs.computeDimension(i,s,a,l),d=de.getProvisionalVersionForDimension(u),h=d.getDimensionForVersion()-7;let p=null;if(d.getAlignmentPatternCenters().length>0){const N=s.getX()-i.getX()+a.getX(),M=s.getY()-i.getY()+a.getY(),L=1-3/h,F=Math.floor(i.getX()+L*(N-i.getX())),H=Math.floor(i.getY()+L*(M-i.getY()));for(let J=4;J<=16;J<<=1)try{p=this.findAlignmentInRegion(l,F,H,J);break}catch(ee){if(!(ee instanceof j))throw ee}}const v=zs.createTransform(i,s,a,p,u),b=zs.sampleGrid(this.image,v,u);let A;return p===null?A=[a,i,s]:A=[a,i,s,p],new xa(b,A)}static createTransform(r,i,s,a,l){const u=l-3.5;let d,h,p,v;return a!==null?(d=a.getX(),h=a.getY(),p=u-3,v=p):(d=i.getX()-r.getX()+s.getX(),h=i.getY()-r.getY()+s.getY(),p=u,v=u),Pr.quadrilateralToQuadrilateral(3.5,3.5,u,3.5,p,v,3.5,u,r.getX(),r.getY(),i.getX(),i.getY(),d,h,s.getX(),s.getY())}static sampleGrid(r,i,s){return kn.getInstance().sampleGridWithTransform(r,s,s,i)}static computeDimension(r,i,s,a){const l=Ne.round(ue.distance(r,i)/a),u=Ne.round(ue.distance(r,s)/a);let d=Math.floor((l+u)/2)+7;switch(d&3){case 0:d++;break;case 2:d--;break;case 3:throw new j("Dimensions could be not found.")}return d}calculateModuleSize(r,i,s){return(this.calculateModuleSizeOneWay(r,i)+this.calculateModuleSizeOneWay(r,s))/2}calculateModuleSizeOneWay(r,i){const s=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(r.getX()),Math.floor(r.getY()),Math.floor(i.getX()),Math.floor(i.getY())),a=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(i.getX()),Math.floor(i.getY()),Math.floor(r.getX()),Math.floor(r.getY()));return isNaN(s)?a/7:isNaN(a)?s/7:(s+a)/14}sizeOfBlackWhiteBlackRunBothWays(r,i,s,a){let l=this.sizeOfBlackWhiteBlackRun(r,i,s,a),u=1,d=r-(s-r);d<0?(u=r/(r-d),d=0):d>=this.image.getWidth()&&(u=(this.image.getWidth()-1-r)/(d-r),d=this.image.getWidth()-1);let h=Math.floor(i-(a-i)*u);return u=1,h<0?(u=i/(i-h),h=0):h>=this.image.getHeight()&&(u=(this.image.getHeight()-1-i)/(h-i),h=this.image.getHeight()-1),d=Math.floor(r+(d-r)*u),l+=this.sizeOfBlackWhiteBlackRun(r,i,d,h),l-1}sizeOfBlackWhiteBlackRun(r,i,s,a){const l=Math.abs(a-i)>Math.abs(s-r);if(l){let N=r;r=i,i=N,N=s,s=a,a=N}const u=Math.abs(s-r),d=Math.abs(a-i);let h=-u/2;const p=r<s?1:-1,v=i<a?1:-1;let b=0;const A=s+p;for(let N=r,M=i;N!==A;N+=p){const L=l?M:N,F=l?N:M;if(b===1===this.image.get(L,F)){if(b===2)return Ne.distance(N,M,r,i);b++}if(h+=d,h>0){if(M===a)break;M+=v,h-=u}}return b===2?Ne.distance(s+p,a,r,i):NaN}findAlignmentInRegion(r,i,s,a){const l=Math.floor(a*r),u=Math.max(0,i-l),d=Math.min(this.image.getWidth()-1,i+l);if(d-u<r*3)throw new j("Alignment top exceeds estimated module size.");const h=Math.max(0,s-l),p=Math.min(this.image.getHeight()-1,s+l);if(p-h<r*3)throw new j("Alignment bottom exceeds estimated module size.");return new ba(this.image,u,h,d-u,p-h,r,this.resultPointCallback).find()}}class Ln{constructor(){this.decoder=new l3}getDecoder(){return this.decoder}decode(r,i){let s,a;if(i!=null&&i.get(W.PURE_BARCODE)!==void 0){const h=Ln.extractPureBits(r.getBlackMatrix());s=this.decoder.decodeBitMatrix(h,i),a=Ln.NO_POINTS}else{const h=new zs(r.getBlackMatrix()).detect(i);s=this.decoder.decodeBitMatrix(h.getBits(),i),a=h.getPoints()}s.getOther()instanceof Z0&&s.getOther().applyMirroredCorrection(a);const l=new ze(s.getText(),s.getRawBytes(),void 0,a,ce.QR_CODE,void 0),u=s.getByteSegments();u!==null&&l.putMetadata(ht.BYTE_SEGMENTS,u);const d=s.getECLevel();return d!==null&&l.putMetadata(ht.ERROR_CORRECTION_LEVEL,d),s.hasStructuredAppend()&&(l.putMetadata(ht.STRUCTURED_APPEND_SEQUENCE,s.getStructuredAppendSequenceNumber()),l.putMetadata(ht.STRUCTURED_APPEND_PARITY,s.getStructuredAppendParity())),l}reset(){}static extractPureBits(r){const i=r.getTopLeftOnBit(),s=r.getBottomRightOnBit();if(i===null||s===null)throw new j;const a=this.moduleSize(i,r);let l=i[1],u=s[1],d=i[0],h=s[0];if(d>=h||l>=u)throw new j;if(u-l!==h-d&&(h=d+(u-l),h>=r.getWidth()))throw new j;const p=Math.round((h-d+1)/a),v=Math.round((u-l+1)/a);if(p<=0||v<=0)throw new j;if(v!==p)throw new j;const b=Math.floor(a/2);l+=b,d+=b;const A=d+Math.floor((p-1)*a)-h;if(A>0){if(A>b)throw new j;d-=A}const N=l+Math.floor((v-1)*a)-u;if(N>0){if(N>b)throw new j;l-=N}const M=new le(p,v);for(let L=0;L<v;L++){const F=l+Math.floor(L*a);for(let H=0;H<p;H++)r.get(d+Math.floor(H*a),F)&&M.set(H,L)}return M}static moduleSize(r,i){const s=i.getHeight(),a=i.getWidth();let l=r[0],u=r[1],d=!0,h=0;for(;l<a&&u<s;){if(d!==i.get(l,u)){if(++h===5)break;d=!d}l++,u++}if(l===a||u===s)throw new j;return(l-r[0])/7}}Ln.NO_POINTS=new Array;class we{PDF417Common(){}static getBitCountSum(r){return Ne.sum(r)}static toIntArray(r){if(r==null||!r.length)return we.EMPTY_INT_ARRAY;const i=new Int32Array(r.length);let s=0;for(const a of r)i[s++]=a;return i}static getCodeword(r){const i=I.binarySearch(we.SYMBOL_TABLE,r&262143);return i<0?-1:(we.CODEWORD_TABLE[i]-1)%we.NUMBER_OF_CODEWORDS}}we.NUMBER_OF_CODEWORDS=929,we.MAX_CODEWORDS_IN_BARCODE=we.NUMBER_OF_CODEWORDS-1,we.MIN_ROWS_IN_BARCODE=3,we.MAX_ROWS_IN_BARCODE=90,we.MODULES_IN_CODEWORD=17,we.MODULES_IN_STOP_PATTERN=18,we.BARS_IN_MODULE=8,we.EMPTY_INT_ARRAY=new Int32Array([]),we.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),we.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]);class u3{constructor(r,i){this.bits=r,this.points=i}getBits(){return this.bits}getPoints(){return this.points}}class be{static detectMultiple(r,i,s){let a=r.getBlackMatrix(),l=be.detect(s,a);return l.length||(a=a.clone(),a.rotate180(),l=be.detect(s,a)),new u3(a,l)}static detect(r,i){const s=new Array;let a=0,l=0,u=!1;for(;a<i.getHeight();){const d=be.findVertices(i,a,l);if(d[0]==null&&d[3]==null){if(!u)break;u=!1,l=0;for(const h of s)h[1]!=null&&(a=Math.trunc(Math.max(a,h[1].getY()))),h[3]!=null&&(a=Math.max(a,Math.trunc(h[3].getY())));a+=be.ROW_STEP;continue}if(u=!0,s.push(d),!r)break;d[2]!=null?(l=Math.trunc(d[2].getX()),a=Math.trunc(d[2].getY())):(l=Math.trunc(d[4].getX()),a=Math.trunc(d[4].getY()))}return s}static findVertices(r,i,s){const a=r.getHeight(),l=r.getWidth(),u=new Array(8);return be.copyToResult(u,be.findRowsWithPattern(r,a,l,i,s,be.START_PATTERN),be.INDEXES_START_PATTERN),u[4]!=null&&(s=Math.trunc(u[4].getX()),i=Math.trunc(u[4].getY())),be.copyToResult(u,be.findRowsWithPattern(r,a,l,i,s,be.STOP_PATTERN),be.INDEXES_STOP_PATTERN),u}static copyToResult(r,i,s){for(let a=0;a<s.length;a++)r[s[a]]=i[a]}static findRowsWithPattern(r,i,s,a,l,u){const d=new Array(4);let h=!1;const p=new Int32Array(u.length);for(;a<i;a+=be.ROW_STEP){let b=be.findGuardPattern(r,l,a,s,!1,u,p);if(b!=null){for(;a>0;){const A=be.findGuardPattern(r,l,--a,s,!1,u,p);if(A!=null)b=A;else{a++;break}}d[0]=new ue(b[0],a),d[1]=new ue(b[1],a),h=!0;break}}let v=a+1;if(h){let b=0,A=Int32Array.from([Math.trunc(d[0].getX()),Math.trunc(d[1].getX())]);for(;v<i;v++){const N=be.findGuardPattern(r,A[0],v,s,!1,u,p);if(N!=null&&Math.abs(A[0]-N[0])<be.MAX_PATTERN_DRIFT&&Math.abs(A[1]-N[1])<be.MAX_PATTERN_DRIFT)A=N,b=0;else{if(b>be.SKIPPED_ROW_COUNT_MAX)break;b++}}v-=b+1,d[2]=new ue(A[0],v),d[3]=new ue(A[1],v)}return v-a<be.BARCODE_MIN_HEIGHT&&I.fill(d,null),d}static findGuardPattern(r,i,s,a,l,u,d){I.fillWithin(d,0,d.length,0);let h=i,p=0;for(;r.get(h,s)&&h>0&&p++<be.MAX_PIXEL_DRIFT;)h--;let v=h,b=0,A=u.length;for(let N=l;v<a;v++)if(r.get(v,s)!==N)d[b]++;else{if(b===A-1){if(be.patternMatchVariance(d,u,be.MAX_INDIVIDUAL_VARIANCE)<be.MAX_AVG_VARIANCE)return new Int32Array([h,v]);h+=d[0]+d[1],D.arraycopy(d,2,d,0,b-1),d[b-1]=0,d[b]=0,b--}else b++;d[b]=1,N=!N}return b===A-1&&be.patternMatchVariance(d,u,be.MAX_INDIVIDUAL_VARIANCE)<be.MAX_AVG_VARIANCE?new Int32Array([h,v-1]):null}static patternMatchVariance(r,i,s){let a=r.length,l=0,u=0;for(let p=0;p<a;p++)l+=r[p],u+=i[p];if(l<u)return 1/0;let d=l/u;s*=d;let h=0;for(let p=0;p<a;p++){let v=r[p],b=i[p]*d,A=v>b?v-b:b-v;if(A>s)return 1/0;h+=A}return h/l}}be.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),be.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),be.MAX_AVG_VARIANCE=.42,be.MAX_INDIVIDUAL_VARIANCE=.8,be.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),be.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),be.MAX_PIXEL_DRIFT=3,be.MAX_PATTERN_DRIFT=5,be.SKIPPED_ROW_COUNT_MAX=25,be.ROW_STEP=5,be.BARCODE_MIN_HEIGHT=10;class kt{constructor(r,i){if(i.length===0)throw new y;this.field=r;let s=i.length;if(s>1&&i[0]===0){let a=1;for(;a<s&&i[a]===0;)a++;a===s?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(s-a),D.arraycopy(i,a,this.coefficients,0,this.coefficients.length))}else this.coefficients=i}getCoefficients(){return this.coefficients}getDegree(){return this.coefficients.length-1}isZero(){return this.coefficients[0]===0}getCoefficient(r){return this.coefficients[this.coefficients.length-1-r]}evaluateAt(r){if(r===0)return this.getCoefficient(0);if(r===1){let a=0;for(let l of this.coefficients)a=this.field.add(a,l);return a}let i=this.coefficients[0],s=this.coefficients.length;for(let a=1;a<s;a++)i=this.field.add(this.field.multiply(r,i),this.coefficients[a]);return i}add(r){if(!this.field.equals(r.field))throw new y("ModulusPolys do not have same ModulusGF field");if(this.isZero())return r;if(r.isZero())return this;let i=this.coefficients,s=r.coefficients;if(i.length>s.length){let u=i;i=s,s=u}let a=new Int32Array(s.length),l=s.length-i.length;D.arraycopy(s,0,a,0,l);for(let u=l;u<s.length;u++)a[u]=this.field.add(i[u-l],s[u]);return new kt(this.field,a)}subtract(r){if(!this.field.equals(r.field))throw new y("ModulusPolys do not have same ModulusGF field");return r.isZero()?this:this.add(r.negative())}multiply(r){return r instanceof kt?this.multiplyOther(r):this.multiplyScalar(r)}multiplyOther(r){if(!this.field.equals(r.field))throw new y("ModulusPolys do not have same ModulusGF field");if(this.isZero()||r.isZero())return new kt(this.field,new Int32Array([0]));let i=this.coefficients,s=i.length,a=r.coefficients,l=a.length,u=new Int32Array(s+l-1);for(let d=0;d<s;d++){let h=i[d];for(let p=0;p<l;p++)u[d+p]=this.field.add(u[d+p],this.field.multiply(h,a[p]))}return new kt(this.field,u)}negative(){let r=this.coefficients.length,i=new Int32Array(r);for(let s=0;s<r;s++)i[s]=this.field.subtract(0,this.coefficients[s]);return new kt(this.field,i)}multiplyScalar(r){if(r===0)return new kt(this.field,new Int32Array([0]));if(r===1)return this;let i=this.coefficients.length,s=new Int32Array(i);for(let a=0;a<i;a++)s[a]=this.field.multiply(this.coefficients[a],r);return new kt(this.field,s)}multiplyByMonomial(r,i){if(r<0)throw new y;if(i===0)return new kt(this.field,new Int32Array([0]));let s=this.coefficients.length,a=new Int32Array(s+r);for(let l=0;l<s;l++)a[l]=this.field.multiply(this.coefficients[l],i);return new kt(this.field,a)}toString(){let r=new K;for(let i=this.getDegree();i>=0;i--){let s=this.getCoefficient(i);s!==0&&(s<0?(r.append(" - "),s=-s):r.length()>0&&r.append(" + "),(i===0||s!==1)&&r.append(s),i!==0&&(i===1?r.append("x"):(r.append("x^"),r.append(i))))}return r.toString()}}class f3{add(r,i){return(r+i)%this.modulus}subtract(r,i){return(this.modulus+r-i)%this.modulus}exp(r){return this.expTable[r]}log(r){if(r===0)throw new y;return this.logTable[r]}inverse(r){if(r===0)throw new ui;return this.expTable[this.modulus-this.logTable[r]-1]}multiply(r,i){return r===0||i===0?0:this.expTable[(this.logTable[r]+this.logTable[i])%(this.modulus-1)]}getSize(){return this.modulus}equals(r){return r===this}}class fu extends f3{constructor(r,i){super(),this.modulus=r,this.expTable=new Int32Array(r),this.logTable=new Int32Array(r);let s=1;for(let a=0;a<r;a++)this.expTable[a]=s,s=s*i%r;for(let a=0;a<r-1;a++)this.logTable[this.expTable[a]]=a;this.zero=new kt(this,new Int32Array([0])),this.one=new kt(this,new Int32Array([1]))}getZero(){return this.zero}getOne(){return this.one}buildMonomial(r,i){if(r<0)throw new y;if(i===0)return this.zero;let s=new Int32Array(r+1);return s[0]=i,new kt(this,s)}}fu.PDF417_GF=new fu(we.NUMBER_OF_CODEWORDS,3);class Q0{constructor(){this.field=fu.PDF417_GF}decode(r,i,s){let a=new kt(this.field,r),l=new Int32Array(i),u=!1;for(let M=i;M>0;M--){let L=a.evaluateAt(this.field.exp(M));l[i-M]=L,L!==0&&(u=!0)}if(!u)return 0;let d=this.field.getOne();if(s!=null)for(const M of s){let L=this.field.exp(r.length-1-M),F=new kt(this.field,new Int32Array([this.field.subtract(0,L),1]));d=d.multiply(F)}let h=new kt(this.field,l),p=this.runEuclideanAlgorithm(this.field.buildMonomial(i,1),h,i),v=p[0],b=p[1],A=this.findErrorLocations(v),N=this.findErrorMagnitudes(b,v,A);for(let M=0;M<A.length;M++){let L=r.length-1-this.field.log(A[M]);if(L<0)throw _.getChecksumInstance();r[L]=this.field.subtract(r[L],N[M])}return A.length}runEuclideanAlgorithm(r,i,s){if(r.getDegree()<i.getDegree()){let A=r;r=i,i=A}let a=r,l=i,u=this.field.getZero(),d=this.field.getOne();for(;l.getDegree()>=Math.round(s/2);){let A=a,N=u;if(a=l,u=d,a.isZero())throw _.getChecksumInstance();l=A;let M=this.field.getZero(),L=a.getCoefficient(a.getDegree()),F=this.field.inverse(L);for(;l.getDegree()>=a.getDegree()&&!l.isZero();){let H=l.getDegree()-a.getDegree(),J=this.field.multiply(l.getCoefficient(l.getDegree()),F);M=M.add(this.field.buildMonomial(H,J)),l=l.subtract(a.multiplyByMonomial(H,J))}d=M.multiply(u).subtract(N).negative()}let h=d.getCoefficient(0);if(h===0)throw _.getChecksumInstance();let p=this.field.inverse(h),v=d.multiply(p),b=l.multiply(p);return[v,b]}findErrorLocations(r){let i=r.getDegree(),s=new Int32Array(i),a=0;for(let l=1;l<this.field.getSize()&&a<i;l++)r.evaluateAt(l)===0&&(s[a]=this.field.inverse(l),a++);if(a!==i)throw _.getChecksumInstance();return s}findErrorMagnitudes(r,i,s){let a=i.getDegree(),l=new Int32Array(a);for(let p=1;p<=a;p++)l[a-p]=this.field.multiply(p,i.getCoefficient(p));let u=new kt(this.field,l),d=s.length,h=new Int32Array(d);for(let p=0;p<d;p++){let v=this.field.inverse(s[p]),b=this.field.subtract(0,r.evaluateAt(v)),A=this.field.inverse(u.evaluateAt(v));h[p]=this.field.multiply(b,A)}return h}}class gi{constructor(r,i,s,a,l){r instanceof gi?this.constructor_2(r):this.constructor_1(r,i,s,a,l)}constructor_1(r,i,s,a,l){const u=i==null||s==null,d=a==null||l==null;if(u&&d)throw new j;u?(i=new ue(0,a.getY()),s=new ue(0,l.getY())):d&&(a=new ue(r.getWidth()-1,i.getY()),l=new ue(r.getWidth()-1,s.getY())),this.image=r,this.topLeft=i,this.bottomLeft=s,this.topRight=a,this.bottomRight=l,this.minX=Math.trunc(Math.min(i.getX(),s.getX())),this.maxX=Math.trunc(Math.max(a.getX(),l.getX())),this.minY=Math.trunc(Math.min(i.getY(),a.getY())),this.maxY=Math.trunc(Math.max(s.getY(),l.getY()))}constructor_2(r){this.image=r.image,this.topLeft=r.getTopLeft(),this.bottomLeft=r.getBottomLeft(),this.topRight=r.getTopRight(),this.bottomRight=r.getBottomRight(),this.minX=r.getMinX(),this.maxX=r.getMaxX(),this.minY=r.getMinY(),this.maxY=r.getMaxY()}static merge(r,i){return r==null?i:i==null?r:new gi(r.image,r.topLeft,r.bottomLeft,i.topRight,i.bottomRight)}addMissingRows(r,i,s){let a=this.topLeft,l=this.bottomLeft,u=this.topRight,d=this.bottomRight;if(r>0){let h=s?this.topLeft:this.topRight,p=Math.trunc(h.getY()-r);p<0&&(p=0);let v=new ue(h.getX(),p);s?a=v:u=v}if(i>0){let h=s?this.bottomLeft:this.bottomRight,p=Math.trunc(h.getY()+i);p>=this.image.getHeight()&&(p=this.image.getHeight()-1);let v=new ue(h.getX(),p);s?l=v:d=v}return new gi(this.image,a,l,u,d)}getMinX(){return this.minX}getMaxX(){return this.maxX}getMinY(){return this.minY}getMaxY(){return this.maxY}getTopLeft(){return this.topLeft}getTopRight(){return this.topRight}getBottomLeft(){return this.bottomLeft}getBottomRight(){return this.bottomRight}}class d3{constructor(r,i,s,a){this.columnCount=r,this.errorCorrectionLevel=a,this.rowCountUpperPart=i,this.rowCountLowerPart=s,this.rowCount=i+s}getColumnCount(){return this.columnCount}getErrorCorrectionLevel(){return this.errorCorrectionLevel}getRowCount(){return this.rowCount}getRowCountUpperPart(){return this.rowCountUpperPart}getRowCountLowerPart(){return this.rowCountLowerPart}}class $s{constructor(){this.buffer=""}static form(r,i){let s=-1;function a(u,d,h,p,v,b){if(u==="%%")return"%";if(i[++s]===void 0)return;u=p?parseInt(p.substr(1)):void 0;let A=v?parseInt(v.substr(1)):void 0,N;switch(b){case"s":N=i[s];break;case"c":N=i[s][0];break;case"f":N=parseFloat(i[s]).toFixed(u);break;case"p":N=parseFloat(i[s]).toPrecision(u);break;case"e":N=parseFloat(i[s]).toExponential(u);break;case"x":N=parseInt(i[s]).toString(A||16);break;case"d":N=parseFloat(parseInt(i[s],A||10).toPrecision(u)).toFixed(0);break}N=typeof N=="object"?JSON.stringify(N):(+N).toString(A);let M=parseInt(h),L=h&&h[0]+""=="0"?"0":" ";for(;N.length<M;)N=d!==void 0?N+L:L+N;return N}let l=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return r.replace(l,a)}format(r,...i){this.buffer+=$s.form(r,i)}toString(){return this.buffer}}class Vs{constructor(r){this.boundingBox=new gi(r),this.codewords=new Array(r.getMaxY()-r.getMinY()+1)}getCodewordNearby(r){let i=this.getCodeword(r);if(i!=null)return i;for(let s=1;s<Vs.MAX_NEARBY_DISTANCE;s++){let a=this.imageRowToCodewordIndex(r)-s;if(a>=0&&(i=this.codewords[a],i!=null)||(a=this.imageRowToCodewordIndex(r)+s,a<this.codewords.length&&(i=this.codewords[a],i!=null)))return i}return null}imageRowToCodewordIndex(r){return r-this.boundingBox.getMinY()}setCodeword(r,i){this.codewords[this.imageRowToCodewordIndex(r)]=i}getCodeword(r){return this.codewords[this.imageRowToCodewordIndex(r)]}getBoundingBox(){return this.boundingBox}getCodewords(){return this.codewords}toString(){const r=new $s;let i=0;for(const s of this.codewords){if(s==null){r.format("%3d: | %n",i++);continue}r.format("%3d: %3d|%3d%n",i++,s.getRowNumber(),s.getValue())}return r.toString()}}Vs.MAX_NEARBY_DISTANCE=5;class Hs{constructor(){this.values=new Map}setValue(r){r=Math.trunc(r);let i=this.values.get(r);i==null&&(i=0),i++,this.values.set(r,i)}getValue(){let r=-1,i=new Array;for(const[s,a]of this.values.entries()){const l={getKey:()=>s,getValue:()=>a};l.getValue()>r?(r=l.getValue(),i=[],i.push(l.getKey())):l.getValue()===r&&i.push(l.getKey())}return we.toIntArray(i)}getConfidence(r){return this.values.get(r)}}class q0 extends Vs{constructor(r,i){super(r),this._isLeft=i}setRowNumbers(){for(let r of this.getCodewords())r!=null&&r.setRowNumberAsRowIndicatorColumn()}adjustCompleteIndicatorColumnRowNumbers(r){let i=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(i,r);let s=this.getBoundingBox(),a=this._isLeft?s.getTopLeft():s.getTopRight(),l=this._isLeft?s.getBottomLeft():s.getBottomRight(),u=this.imageRowToCodewordIndex(Math.trunc(a.getY())),d=this.imageRowToCodewordIndex(Math.trunc(l.getY())),h=-1,p=1,v=0;for(let b=u;b<d;b++){if(i[b]==null)continue;let A=i[b],N=A.getRowNumber()-h;if(N===0)v++;else if(N===1)p=Math.max(p,v),v=1,h=A.getRowNumber();else if(N<0||A.getRowNumber()>=r.getRowCount()||N>b)i[b]=null;else{let M;p>2?M=(p-2)*N:M=N;let L=M>=b;for(let F=1;F<=M&&!L;F++)L=i[b-F]!=null;L?i[b]=null:(h=A.getRowNumber(),v=1)}}}getRowHeights(){let r=this.getBarcodeMetadata();if(r==null)return null;this.adjustIncompleteIndicatorColumnRowNumbers(r);let i=new Int32Array(r.getRowCount());for(let s of this.getCodewords())if(s!=null){let a=s.getRowNumber();if(a>=i.length)continue;i[a]++}return i}adjustIncompleteIndicatorColumnRowNumbers(r){let i=this.getBoundingBox(),s=this._isLeft?i.getTopLeft():i.getTopRight(),a=this._isLeft?i.getBottomLeft():i.getBottomRight(),l=this.imageRowToCodewordIndex(Math.trunc(s.getY())),u=this.imageRowToCodewordIndex(Math.trunc(a.getY())),d=this.getCodewords(),h=-1;for(let p=l;p<u;p++){if(d[p]==null)continue;let v=d[p];v.setRowNumberAsRowIndicatorColumn();let b=v.getRowNumber()-h;b===0||(b===1?h=v.getRowNumber():v.getRowNumber()>=r.getRowCount()?d[p]=null:h=v.getRowNumber())}}getBarcodeMetadata(){let r=this.getCodewords(),i=new Hs,s=new Hs,a=new Hs,l=new Hs;for(let d of r){if(d==null)continue;d.setRowNumberAsRowIndicatorColumn();let h=d.getValue()%30,p=d.getRowNumber();switch(this._isLeft||(p+=2),p%3){case 0:s.setValue(h*3+1);break;case 1:l.setValue(h/3),a.setValue(h%3);break;case 2:i.setValue(h+1);break}}if(i.getValue().length===0||s.getValue().length===0||a.getValue().length===0||l.getValue().length===0||i.getValue()[0]<1||s.getValue()[0]+a.getValue()[0]<we.MIN_ROWS_IN_BARCODE||s.getValue()[0]+a.getValue()[0]>we.MAX_ROWS_IN_BARCODE)return null;let u=new d3(i.getValue()[0],s.getValue()[0],a.getValue()[0],l.getValue()[0]);return this.removeIncorrectCodewords(r,u),u}removeIncorrectCodewords(r,i){for(let s=0;s<r.length;s++){let a=r[s];if(r[s]==null)continue;let l=a.getValue()%30,u=a.getRowNumber();if(u>i.getRowCount()){r[s]=null;continue}switch(this._isLeft||(u+=2),u%3){case 0:l*3+1!==i.getRowCountUpperPart()&&(r[s]=null);break;case 1:(Math.trunc(l/3)!==i.getErrorCorrectionLevel()||l%3!==i.getRowCountLowerPart())&&(r[s]=null);break;case 2:l+1!==i.getColumnCount()&&(r[s]=null);break}}}isLeft(){return this._isLeft}toString(){return"IsLeft: "+this._isLeft+`
|
|
485
|
-
`+super.toString()}}class Gs{constructor(r,i){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=r,this.barcodeColumnCount=r.getColumnCount(),this.boundingBox=i,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}getDetectionResultColumns(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);let r=we.MAX_CODEWORDS_IN_BARCODE,i;do i=r,r=this.adjustRowNumbersAndGetCount();while(r>0&&r<i);return this.detectionResultColumns}adjustIndicatorColumnRowNumbers(r){r!=null&&r.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)}adjustRowNumbersAndGetCount(){let r=this.adjustRowNumbersByRow();if(r===0)return 0;for(let i=1;i<this.barcodeColumnCount+1;i++){let s=this.detectionResultColumns[i].getCodewords();for(let a=0;a<s.length;a++)s[a]!=null&&(s[a].hasValidRowNumber()||this.adjustRowNumbers(i,a,s))}return r}adjustRowNumbersByRow(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()}adjustRowNumbersFromBothRI(){if(this.detectionResultColumns[0]==null||this.detectionResultColumns[this.barcodeColumnCount+1]==null)return;let r=this.detectionResultColumns[0].getCodewords(),i=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords();for(let s=0;s<r.length;s++)if(r[s]!=null&&i[s]!=null&&r[s].getRowNumber()===i[s].getRowNumber())for(let a=1;a<=this.barcodeColumnCount;a++){let l=this.detectionResultColumns[a].getCodewords()[s];l!=null&&(l.setRowNumber(r[s].getRowNumber()),l.hasValidRowNumber()||(this.detectionResultColumns[a].getCodewords()[s]=null))}}adjustRowNumbersFromRRI(){if(this.detectionResultColumns[this.barcodeColumnCount+1]==null)return 0;let r=0,i=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords();for(let s=0;s<i.length;s++){if(i[s]==null)continue;let a=i[s].getRowNumber(),l=0;for(let u=this.barcodeColumnCount+1;u>0&&l<this.ADJUST_ROW_NUMBER_SKIP;u--){let d=this.detectionResultColumns[u].getCodewords()[s];d!=null&&(l=Gs.adjustRowNumberIfValid(a,l,d),d.hasValidRowNumber()||r++)}}return r}adjustRowNumbersFromLRI(){if(this.detectionResultColumns[0]==null)return 0;let r=0,i=this.detectionResultColumns[0].getCodewords();for(let s=0;s<i.length;s++){if(i[s]==null)continue;let a=i[s].getRowNumber(),l=0;for(let u=1;u<this.barcodeColumnCount+1&&l<this.ADJUST_ROW_NUMBER_SKIP;u++){let d=this.detectionResultColumns[u].getCodewords()[s];d!=null&&(l=Gs.adjustRowNumberIfValid(a,l,d),d.hasValidRowNumber()||r++)}}return r}static adjustRowNumberIfValid(r,i,s){return s==null||s.hasValidRowNumber()||(s.isValidRowNumber(r)?(s.setRowNumber(r),i=0):++i),i}adjustRowNumbers(r,i,s){if(!this.detectionResultColumns[r-1])return;let a=s[i],l=this.detectionResultColumns[r-1].getCodewords(),u=l;this.detectionResultColumns[r+1]!=null&&(u=this.detectionResultColumns[r+1].getCodewords());let d=new Array(14);d[2]=l[i],d[3]=u[i],i>0&&(d[0]=s[i-1],d[4]=l[i-1],d[5]=u[i-1]),i>1&&(d[8]=s[i-2],d[10]=l[i-2],d[11]=u[i-2]),i<s.length-1&&(d[1]=s[i+1],d[6]=l[i+1],d[7]=u[i+1]),i<s.length-2&&(d[9]=s[i+2],d[12]=l[i+2],d[13]=u[i+2]);for(let h of d)if(Gs.adjustRowNumber(a,h))return}static adjustRowNumber(r,i){return i==null?!1:i.hasValidRowNumber()&&i.getBucket()===r.getBucket()?(r.setRowNumber(i.getRowNumber()),!0):!1}getBarcodeColumnCount(){return this.barcodeColumnCount}getBarcodeRowCount(){return this.barcodeMetadata.getRowCount()}getBarcodeECLevel(){return this.barcodeMetadata.getErrorCorrectionLevel()}setBoundingBox(r){this.boundingBox=r}getBoundingBox(){return this.boundingBox}setDetectionResultColumn(r,i){this.detectionResultColumns[r]=i}getDetectionResultColumn(r){return this.detectionResultColumns[r]}toString(){let r=this.detectionResultColumns[0];r==null&&(r=this.detectionResultColumns[this.barcodeColumnCount+1]);let i=new $s;for(let s=0;s<r.getCodewords().length;s++){i.format("CW %3d:",s);for(let a=0;a<this.barcodeColumnCount+2;a++){if(this.detectionResultColumns[a]==null){i.format(" | ");continue}let l=this.detectionResultColumns[a].getCodewords()[s];if(l==null){i.format(" | ");continue}i.format(" %3d|%3d",l.getRowNumber(),l.getValue())}i.format("%n")}return i.toString()}}class Xs{constructor(r,i,s,a){this.rowNumber=Xs.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(r),this.endX=Math.trunc(i),this.bucket=Math.trunc(s),this.value=Math.trunc(a)}hasValidRowNumber(){return this.isValidRowNumber(this.rowNumber)}isValidRowNumber(r){return r!==Xs.BARCODE_ROW_UNKNOWN&&this.bucket===r%3*3}setRowNumberAsRowIndicatorColumn(){this.rowNumber=Math.trunc(Math.trunc(this.value/30)*3+Math.trunc(this.bucket/3))}getWidth(){return this.endX-this.startX}getStartX(){return this.startX}getEndX(){return this.endX}getBucket(){return this.bucket}getValue(){return this.value}getRowNumber(){return this.rowNumber}setRowNumber(r){this.rowNumber=r}toString(){return this.rowNumber+"|"+this.value}}Xs.BARCODE_ROW_UNKNOWN=-1;class rr{static initialize(){for(let r=0;r<we.SYMBOL_TABLE.length;r++){let i=we.SYMBOL_TABLE[r],s=i&1;for(let a=0;a<we.BARS_IN_MODULE;a++){let l=0;for(;(i&1)===s;)l+=1,i>>=1;s=i&1,rr.RATIOS_TABLE[r]||(rr.RATIOS_TABLE[r]=new Array(we.BARS_IN_MODULE)),rr.RATIOS_TABLE[r][we.BARS_IN_MODULE-a-1]=Math.fround(l/we.MODULES_IN_CODEWORD)}}this.bSymbolTableReady=!0}static getDecodedValue(r){let i=rr.getDecodedCodewordValue(rr.sampleBitCounts(r));return i!==-1?i:rr.getClosestDecodedValue(r)}static sampleBitCounts(r){let i=Ne.sum(r),s=new Int32Array(we.BARS_IN_MODULE),a=0,l=0;for(let u=0;u<we.MODULES_IN_CODEWORD;u++){let d=i/(2*we.MODULES_IN_CODEWORD)+u*i/we.MODULES_IN_CODEWORD;l+r[a]<=d&&(l+=r[a],a++),s[a]++}return s}static getDecodedCodewordValue(r){let i=rr.getBitValue(r);return we.getCodeword(i)===-1?-1:i}static getBitValue(r){let i=0;for(let s=0;s<r.length;s++)for(let a=0;a<r[s];a++)i=i<<1|(s%2===0?1:0);return Math.trunc(i)}static getClosestDecodedValue(r){let i=Ne.sum(r),s=new Array(we.BARS_IN_MODULE);if(i>1)for(let u=0;u<s.length;u++)s[u]=Math.fround(r[u]/i);let a=ma.MAX_VALUE,l=-1;this.bSymbolTableReady||rr.initialize();for(let u=0;u<rr.RATIOS_TABLE.length;u++){let d=0,h=rr.RATIOS_TABLE[u];for(let p=0;p<we.BARS_IN_MODULE;p++){let v=Math.fround(h[p]-s[p]);if(d+=Math.fround(v*v),d>=a)break}d<a&&(a=d,l=we.SYMBOL_TABLE[u])}return l}}rr.bSymbolTableReady=!1,rr.RATIOS_TABLE=new Array(we.SYMBOL_TABLE.length).map(E=>new Array(we.BARS_IN_MODULE));class J0{constructor(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}getSegmentIndex(){return this.segmentIndex}setSegmentIndex(r){this.segmentIndex=r}getFileId(){return this.fileId}setFileId(r){this.fileId=r}getOptionalData(){return this.optionalData}setOptionalData(r){this.optionalData=r}isLastSegment(){return this.lastSegment}setLastSegment(r){this.lastSegment=r}getSegmentCount(){return this.segmentCount}setSegmentCount(r){this.segmentCount=r}getSender(){return this.sender||null}setSender(r){this.sender=r}getAddressee(){return this.addressee||null}setAddressee(r){this.addressee=r}getFileName(){return this.fileName}setFileName(r){this.fileName=r}getFileSize(){return this.fileSize}setFileSize(r){this.fileSize=r}getChecksum(){return this.checksum}setChecksum(r){this.checksum=r}getTimestamp(){return this.timestamp}setTimestamp(r){this.timestamp=r}}class eh{static parseLong(r,i=void 0){return parseInt(r,i)}}class th extends m{}th.kind="NullPointerException";class h3{writeBytes(r){this.writeBytesOffset(r,0,r.length)}writeBytesOffset(r,i,s){if(r==null)throw new th;if(i<0||i>r.length||s<0||i+s>r.length||i+s<0)throw new X;if(s===0)return;for(let a=0;a<s;a++)this.write(r[i+a])}flush(){}close(){}}class g3 extends m{}class p3 extends h3{constructor(r=32){if(super(),this.count=0,r<0)throw new y("Negative initial size: "+r);this.buf=new Uint8Array(r)}ensureCapacity(r){r-this.buf.length>0&&this.grow(r)}grow(r){let s=this.buf.length<<1;if(s-r<0&&(s=r),s<0){if(r<0)throw new g3;s=R.MAX_VALUE}this.buf=I.copyOfUint8Array(this.buf,s)}write(r){this.ensureCapacity(this.count+1),this.buf[this.count]=r,this.count+=1}writeBytesOffset(r,i,s){if(i<0||i>r.length||s<0||i+s-r.length>0)throw new X;this.ensureCapacity(this.count+s),D.arraycopy(r,i,this.buf,this.count,s),this.count+=s}writeTo(r){r.writeBytesOffset(this.buf,0,this.count)}reset(){this.count=0}toByteArray(){return I.copyOfUint8Array(this.buf,this.count)}size(){return this.count}toString(r){return r?typeof r=="string"?this.toString_string(r):this.toString_number(r):this.toString_void()}toString_void(){return new String(this.buf).toString()}toString_string(r){return new String(this.buf).toString()}toString_number(r){return new String(this.buf).toString()}close(){}}var Fe;(function(E){E[E.ALPHA=0]="ALPHA",E[E.LOWER=1]="LOWER",E[E.MIXED=2]="MIXED",E[E.PUNCT=3]="PUNCT",E[E.ALPHA_SHIFT=4]="ALPHA_SHIFT",E[E.PUNCT_SHIFT=5]="PUNCT_SHIFT"})(Fe||(Fe={}));function rh(){if(typeof window<"u")return window.BigInt||null;if(typeof wn<"u")return wn.BigInt||null;if(typeof self<"u")return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}let Ca;function Bn(E){if(typeof Ca>"u"&&(Ca=rh()),Ca===null)throw new Error("BigInt is not supported!");return Ca(E)}function m3(){let E=[];E[0]=Bn(1);let r=Bn(900);E[1]=r;for(let i=2;i<16;i++)E[i]=E[i-1]*r;return E}class V{static decode(r,i){let s=new K(""),a=$.ISO8859_1;s.enableDecoding(a);let l=1,u=r[l++],d=new J0;for(;l<r[0];){switch(u){case V.TEXT_COMPACTION_MODE_LATCH:l=V.textCompaction(r,l,s);break;case V.BYTE_COMPACTION_MODE_LATCH:case V.BYTE_COMPACTION_MODE_LATCH_6:l=V.byteCompaction(u,r,a,l,s);break;case V.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:s.append(r[l++]);break;case V.NUMERIC_COMPACTION_MODE_LATCH:l=V.numericCompaction(r,l,s);break;case V.ECI_CHARSET:$.getCharacterSetECIByValue(r[l++]);break;case V.ECI_GENERAL_PURPOSE:l+=2;break;case V.ECI_USER_DEFINED:l++;break;case V.BEGIN_MACRO_PDF417_CONTROL_BLOCK:l=V.decodeMacroBlock(r,l,d);break;case V.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case V.MACRO_PDF417_TERMINATOR:throw new B;default:l--,l=V.textCompaction(r,l,s);break}if(l<r.length)u=r[l++];else throw B.getFormatInstance()}if(s.length()===0)throw B.getFormatInstance();let h=new On(null,s.toString(),null,i);return h.setOther(d),h}static decodeMacroBlock(r,i,s){if(i+V.NUMBER_OF_SEQUENCE_CODEWORDS>r[0])throw B.getFormatInstance();let a=new Int32Array(V.NUMBER_OF_SEQUENCE_CODEWORDS);for(let d=0;d<V.NUMBER_OF_SEQUENCE_CODEWORDS;d++,i++)a[d]=r[i];s.setSegmentIndex(R.parseInt(V.decodeBase900toBase10(a,V.NUMBER_OF_SEQUENCE_CODEWORDS)));let l=new K;i=V.textCompaction(r,i,l),s.setFileId(l.toString());let u=-1;for(r[i]===V.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(u=i+1);i<r[0];)switch(r[i]){case V.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(i++,r[i]){case V.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:let d=new K;i=V.textCompaction(r,i+1,d),s.setFileName(d.toString());break;case V.MACRO_PDF417_OPTIONAL_FIELD_SENDER:let h=new K;i=V.textCompaction(r,i+1,h),s.setSender(h.toString());break;case V.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:let p=new K;i=V.textCompaction(r,i+1,p),s.setAddressee(p.toString());break;case V.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:let v=new K;i=V.numericCompaction(r,i+1,v),s.setSegmentCount(R.parseInt(v.toString()));break;case V.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:let b=new K;i=V.numericCompaction(r,i+1,b),s.setTimestamp(eh.parseLong(b.toString()));break;case V.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:let A=new K;i=V.numericCompaction(r,i+1,A),s.setChecksum(R.parseInt(A.toString()));break;case V.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:let N=new K;i=V.numericCompaction(r,i+1,N),s.setFileSize(eh.parseLong(N.toString()));break;default:throw B.getFormatInstance()}break;case V.MACRO_PDF417_TERMINATOR:i++,s.setLastSegment(!0);break;default:throw B.getFormatInstance()}if(u!==-1){let d=i-u;s.isLastSegment()&&d--,s.setOptionalData(I.copyOfRange(r,u,u+d))}return i}static textCompaction(r,i,s){let a=new Int32Array((r[0]-i)*2),l=new Int32Array((r[0]-i)*2),u=0,d=!1;for(;i<r[0]&&!d;){let h=r[i++];if(h<V.TEXT_COMPACTION_MODE_LATCH)a[u]=h/30,a[u+1]=h%30,u+=2;else switch(h){case V.TEXT_COMPACTION_MODE_LATCH:a[u++]=V.TEXT_COMPACTION_MODE_LATCH;break;case V.BYTE_COMPACTION_MODE_LATCH:case V.BYTE_COMPACTION_MODE_LATCH_6:case V.NUMERIC_COMPACTION_MODE_LATCH:case V.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case V.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case V.MACRO_PDF417_TERMINATOR:i--,d=!0;break;case V.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:a[u]=V.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,h=r[i++],l[u]=h,u++;break}}return V.decodeTextCompaction(a,l,u,s),i}static decodeTextCompaction(r,i,s,a){let l=Fe.ALPHA,u=Fe.ALPHA,d=0;for(;d<s;){let h=r[d],p="";switch(l){case Fe.ALPHA:if(h<26)p=String.fromCharCode(65+h);else switch(h){case 26:p=" ";break;case V.LL:l=Fe.LOWER;break;case V.ML:l=Fe.MIXED;break;case V.PS:u=l,l=Fe.PUNCT_SHIFT;break;case V.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:a.append(i[d]);break;case V.TEXT_COMPACTION_MODE_LATCH:l=Fe.ALPHA;break}break;case Fe.LOWER:if(h<26)p=String.fromCharCode(97+h);else switch(h){case 26:p=" ";break;case V.AS:u=l,l=Fe.ALPHA_SHIFT;break;case V.ML:l=Fe.MIXED;break;case V.PS:u=l,l=Fe.PUNCT_SHIFT;break;case V.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:a.append(i[d]);break;case V.TEXT_COMPACTION_MODE_LATCH:l=Fe.ALPHA;break}break;case Fe.MIXED:if(h<V.PL)p=V.MIXED_CHARS[h];else switch(h){case V.PL:l=Fe.PUNCT;break;case 26:p=" ";break;case V.LL:l=Fe.LOWER;break;case V.AL:l=Fe.ALPHA;break;case V.PS:u=l,l=Fe.PUNCT_SHIFT;break;case V.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:a.append(i[d]);break;case V.TEXT_COMPACTION_MODE_LATCH:l=Fe.ALPHA;break}break;case Fe.PUNCT:if(h<V.PAL)p=V.PUNCT_CHARS[h];else switch(h){case V.PAL:l=Fe.ALPHA;break;case V.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:a.append(i[d]);break;case V.TEXT_COMPACTION_MODE_LATCH:l=Fe.ALPHA;break}break;case Fe.ALPHA_SHIFT:if(l=u,h<26)p=String.fromCharCode(65+h);else switch(h){case 26:p=" ";break;case V.TEXT_COMPACTION_MODE_LATCH:l=Fe.ALPHA;break}break;case Fe.PUNCT_SHIFT:if(l=u,h<V.PAL)p=V.PUNCT_CHARS[h];else switch(h){case V.PAL:l=Fe.ALPHA;break;case V.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:a.append(i[d]);break;case V.TEXT_COMPACTION_MODE_LATCH:l=Fe.ALPHA;break}break}p!==""&&a.append(p),d++}}static byteCompaction(r,i,s,a,l){let u=new p3,d=0,h=0,p=!1;switch(r){case V.BYTE_COMPACTION_MODE_LATCH:let v=new Int32Array(6),b=i[a++];for(;a<i[0]&&!p;)switch(v[d++]=b,h=900*h+b,b=i[a++],b){case V.TEXT_COMPACTION_MODE_LATCH:case V.BYTE_COMPACTION_MODE_LATCH:case V.NUMERIC_COMPACTION_MODE_LATCH:case V.BYTE_COMPACTION_MODE_LATCH_6:case V.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case V.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case V.MACRO_PDF417_TERMINATOR:a--,p=!0;break;default:if(d%5===0&&d>0){for(let A=0;A<6;++A)u.write(Number(Bn(h)>>Bn(8*(5-A))));h=0,d=0}break}a===i[0]&&b<V.TEXT_COMPACTION_MODE_LATCH&&(v[d++]=b);for(let A=0;A<d;A++)u.write(v[A]);break;case V.BYTE_COMPACTION_MODE_LATCH_6:for(;a<i[0]&&!p;){let A=i[a++];if(A<V.TEXT_COMPACTION_MODE_LATCH)d++,h=900*h+A;else switch(A){case V.TEXT_COMPACTION_MODE_LATCH:case V.BYTE_COMPACTION_MODE_LATCH:case V.NUMERIC_COMPACTION_MODE_LATCH:case V.BYTE_COMPACTION_MODE_LATCH_6:case V.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case V.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case V.MACRO_PDF417_TERMINATOR:a--,p=!0;break}if(d%5===0&&d>0){for(let N=0;N<6;++N)u.write(Number(Bn(h)>>Bn(8*(5-N))));h=0,d=0}}break}return l.append(Ee.decode(u.toByteArray(),s)),a}static numericCompaction(r,i,s){let a=0,l=!1,u=new Int32Array(V.MAX_NUMERIC_CODEWORDS);for(;i<r[0]&&!l;){let d=r[i++];if(i===r[0]&&(l=!0),d<V.TEXT_COMPACTION_MODE_LATCH)u[a]=d,a++;else switch(d){case V.TEXT_COMPACTION_MODE_LATCH:case V.BYTE_COMPACTION_MODE_LATCH:case V.BYTE_COMPACTION_MODE_LATCH_6:case V.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case V.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case V.MACRO_PDF417_TERMINATOR:i--,l=!0;break}(a%V.MAX_NUMERIC_CODEWORDS===0||d===V.NUMERIC_COMPACTION_MODE_LATCH||l)&&a>0&&(s.append(V.decodeBase900toBase10(u,a)),a=0)}return i}static decodeBase900toBase10(r,i){let s=Bn(0);for(let l=0;l<i;l++)s+=V.EXP900[i-l-1]*Bn(r[l]);let a=s.toString();if(a.charAt(0)!=="1")throw new B;return a.substring(1)}}V.TEXT_COMPACTION_MODE_LATCH=900,V.BYTE_COMPACTION_MODE_LATCH=901,V.NUMERIC_COMPACTION_MODE_LATCH=902,V.BYTE_COMPACTION_MODE_LATCH_6=924,V.ECI_USER_DEFINED=925,V.ECI_GENERAL_PURPOSE=926,V.ECI_CHARSET=927,V.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,V.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,V.MACRO_PDF417_TERMINATOR=922,V.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,V.MAX_NUMERIC_CODEWORDS=15,V.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,V.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,V.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,V.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,V.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,V.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,V.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,V.PL=25,V.LL=27,V.AS=27,V.ML=28,V.AL=28,V.PS=29,V.PAL=29,V.PUNCT_CHARS=`;<>@[\\]_\`~!\r ,:
|
|
486
|
-
-.$/"|*()?{}'`,V.MIXED_CHARS="0123456789&\r ,:#-.$/+%*=^",V.EXP900=rh()?m3():[],V.NUMBER_OF_SEQUENCE_CODEWORDS=2;class Ce{constructor(){}static decode(r,i,s,a,l,u,d){let h=new gi(r,i,s,a,l),p=null,v=null,b;for(let M=!0;;M=!1){if(i!=null&&(p=Ce.getRowIndicatorColumn(r,h,i,!0,u,d)),a!=null&&(v=Ce.getRowIndicatorColumn(r,h,a,!1,u,d)),b=Ce.merge(p,v),b==null)throw j.getNotFoundInstance();let L=b.getBoundingBox();if(M&&L!=null&&(L.getMinY()<h.getMinY()||L.getMaxY()>h.getMaxY()))h=L;else break}b.setBoundingBox(h);let A=b.getBarcodeColumnCount()+1;b.setDetectionResultColumn(0,p),b.setDetectionResultColumn(A,v);let N=p!=null;for(let M=1;M<=A;M++){let L=N?M:A-M;if(b.getDetectionResultColumn(L)!==void 0)continue;let F;L===0||L===A?F=new q0(h,L===0):F=new Vs(h),b.setDetectionResultColumn(L,F);let H=-1,J=H;for(let ee=h.getMinY();ee<=h.getMaxY();ee++){if(H=Ce.getStartColumn(b,L,ee,N),H<0||H>h.getMaxX()){if(J===-1)continue;H=J}let Q=Ce.detectCodeword(r,h.getMinX(),h.getMaxX(),N,H,ee,u,d);Q!=null&&(F.setCodeword(ee,Q),J=H,u=Math.min(u,Q.getWidth()),d=Math.max(d,Q.getWidth()))}}return Ce.createDecoderResult(b)}static merge(r,i){if(r==null&&i==null)return null;let s=Ce.getBarcodeMetadata(r,i);if(s==null)return null;let a=gi.merge(Ce.adjustBoundingBox(r),Ce.adjustBoundingBox(i));return new Gs(s,a)}static adjustBoundingBox(r){if(r==null)return null;let i=r.getRowHeights();if(i==null)return null;let s=Ce.getMax(i),a=0;for(let d of i)if(a+=s-d,d>0)break;let l=r.getCodewords();for(let d=0;a>0&&l[d]==null;d++)a--;let u=0;for(let d=i.length-1;d>=0&&(u+=s-i[d],!(i[d]>0));d--);for(let d=l.length-1;u>0&&l[d]==null;d--)u--;return r.getBoundingBox().addMissingRows(a,u,r.isLeft())}static getMax(r){let i=-1;for(let s of r)i=Math.max(i,s);return i}static getBarcodeMetadata(r,i){let s;if(r==null||(s=r.getBarcodeMetadata())==null)return i==null?null:i.getBarcodeMetadata();let a;return i==null||(a=i.getBarcodeMetadata())==null?s:s.getColumnCount()!==a.getColumnCount()&&s.getErrorCorrectionLevel()!==a.getErrorCorrectionLevel()&&s.getRowCount()!==a.getRowCount()?null:s}static getRowIndicatorColumn(r,i,s,a,l,u){let d=new q0(i,a);for(let h=0;h<2;h++){let p=h===0?1:-1,v=Math.trunc(Math.trunc(s.getX()));for(let b=Math.trunc(Math.trunc(s.getY()));b<=i.getMaxY()&&b>=i.getMinY();b+=p){let A=Ce.detectCodeword(r,0,r.getWidth(),a,v,b,l,u);A!=null&&(d.setCodeword(b,A),a?v=A.getStartX():v=A.getEndX())}}return d}static adjustCodewordCount(r,i){let s=i[0][1],a=s.getValue(),l=r.getBarcodeColumnCount()*r.getBarcodeRowCount()-Ce.getNumberOfECCodeWords(r.getBarcodeECLevel());if(a.length===0){if(l<1||l>we.MAX_CODEWORDS_IN_BARCODE)throw j.getNotFoundInstance();s.setValue(l)}else a[0]!==l&&s.setValue(l)}static createDecoderResult(r){let i=Ce.createBarcodeMatrix(r);Ce.adjustCodewordCount(r,i);let s=new Array,a=new Int32Array(r.getBarcodeRowCount()*r.getBarcodeColumnCount()),l=[],u=new Array;for(let h=0;h<r.getBarcodeRowCount();h++)for(let p=0;p<r.getBarcodeColumnCount();p++){let v=i[h][p+1].getValue(),b=h*r.getBarcodeColumnCount()+p;v.length===0?s.push(b):v.length===1?a[b]=v[0]:(u.push(b),l.push(v))}let d=new Array(l.length);for(let h=0;h<d.length;h++)d[h]=l[h];return Ce.createDecoderResultFromAmbiguousValues(r.getBarcodeECLevel(),a,we.toIntArray(s),we.toIntArray(u),d)}static createDecoderResultFromAmbiguousValues(r,i,s,a,l){let u=new Int32Array(a.length),d=100;for(;d-- >0;){for(let h=0;h<u.length;h++)i[a[h]]=l[h][u[h]];try{return Ce.decodeCodewords(i,r,s)}catch(h){if(!(h instanceof _))throw h}if(u.length===0)throw _.getChecksumInstance();for(let h=0;h<u.length;h++)if(u[h]<l[h].length-1){u[h]++;break}else if(u[h]=0,h===u.length-1)throw _.getChecksumInstance()}throw _.getChecksumInstance()}static createBarcodeMatrix(r){let i=Array.from({length:r.getBarcodeRowCount()},()=>new Array(r.getBarcodeColumnCount()+2));for(let a=0;a<i.length;a++)for(let l=0;l<i[a].length;l++)i[a][l]=new Hs;let s=0;for(let a of r.getDetectionResultColumns()){if(a!=null){for(let l of a.getCodewords())if(l!=null){let u=l.getRowNumber();if(u>=0){if(u>=i.length)continue;i[u][s].setValue(l.getValue())}}}s++}return i}static isValidBarcodeColumn(r,i){return i>=0&&i<=r.getBarcodeColumnCount()+1}static getStartColumn(r,i,s,a){let l=a?1:-1,u=null;if(Ce.isValidBarcodeColumn(r,i-l)&&(u=r.getDetectionResultColumn(i-l).getCodeword(s)),u!=null)return a?u.getEndX():u.getStartX();if(u=r.getDetectionResultColumn(i).getCodewordNearby(s),u!=null)return a?u.getStartX():u.getEndX();if(Ce.isValidBarcodeColumn(r,i-l)&&(u=r.getDetectionResultColumn(i-l).getCodewordNearby(s)),u!=null)return a?u.getEndX():u.getStartX();let d=0;for(;Ce.isValidBarcodeColumn(r,i-l);){i-=l;for(let h of r.getDetectionResultColumn(i).getCodewords())if(h!=null)return(a?h.getEndX():h.getStartX())+l*d*(h.getEndX()-h.getStartX());d++}return a?r.getBoundingBox().getMinX():r.getBoundingBox().getMaxX()}static detectCodeword(r,i,s,a,l,u,d,h){l=Ce.adjustCodewordStartColumn(r,i,s,a,l,u);let p=Ce.getModuleBitCount(r,i,s,a,l,u);if(p==null)return null;let v,b=Ne.sum(p);if(a)v=l+b;else{for(let M=0;M<p.length/2;M++){let L=p[M];p[M]=p[p.length-1-M],p[p.length-1-M]=L}v=l,l=v-b}if(!Ce.checkCodewordSkew(b,d,h))return null;let A=rr.getDecodedValue(p),N=we.getCodeword(A);return N===-1?null:new Xs(l,v,Ce.getCodewordBucketNumber(A),N)}static getModuleBitCount(r,i,s,a,l,u){let d=l,h=new Int32Array(8),p=0,v=a?1:-1,b=a;for(;(a?d<s:d>=i)&&p<h.length;)r.get(d,u)===b?(h[p]++,d+=v):(p++,b=!b);return p===h.length||d===(a?s:i)&&p===h.length-1?h:null}static getNumberOfECCodeWords(r){return 2<<r}static adjustCodewordStartColumn(r,i,s,a,l,u){let d=l,h=a?-1:1;for(let p=0;p<2;p++){for(;(a?d>=i:d<s)&&a===r.get(d,u);){if(Math.abs(l-d)>Ce.CODEWORD_SKEW_SIZE)return l;d+=h}h=-h,a=!a}return d}static checkCodewordSkew(r,i,s){return i-Ce.CODEWORD_SKEW_SIZE<=r&&r<=s+Ce.CODEWORD_SKEW_SIZE}static decodeCodewords(r,i,s){if(r.length===0)throw B.getFormatInstance();let a=1<<i+1,l=Ce.correctErrors(r,s,a);Ce.verifyCodewordCount(r,a);let u=V.decode(r,""+i);return u.setErrorsCorrected(l),u.setErasures(s.length),u}static correctErrors(r,i,s){if(i!=null&&i.length>s/2+Ce.MAX_ERRORS||s<0||s>Ce.MAX_EC_CODEWORDS)throw _.getChecksumInstance();return Ce.errorCorrection.decode(r,s,i)}static verifyCodewordCount(r,i){if(r.length<4)throw B.getFormatInstance();let s=r[0];if(s>r.length)throw B.getFormatInstance();if(s===0)if(i<r.length)r[0]=r.length-i;else throw B.getFormatInstance()}static getBitCountForCodeword(r){let i=new Int32Array(8),s=0,a=i.length-1;for(;!((r&1)!==s&&(s=r&1,a--,a<0));)i[a]++,r>>=1;return i}static getCodewordBucketNumber(r){return r instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(r):this.getCodewordBucketNumber_number(r)}static getCodewordBucketNumber_number(r){return Ce.getCodewordBucketNumber(Ce.getBitCountForCodeword(r))}static getCodewordBucketNumber_Int32Array(r){return(r[0]-r[2]+r[4]-r[6]+9)%9}static toString(r){let i=new $s;for(let s=0;s<r.length;s++){i.format("Row %2d: ",s);for(let a=0;a<r[s].length;a++){let l=r[s][a];l.getValue().length===0?i.format(" ",null):i.format("%4d(%2d)",l.getValue()[0],l.getConfidence(l.getValue()[0]))}i.format("%n")}return i.toString()}}Ce.CODEWORD_SKEW_SIZE=2,Ce.MAX_ERRORS=3,Ce.MAX_EC_CODEWORDS=512,Ce.errorCorrection=new Q0;class Dt{decode(r,i=null){let s=Dt.decode(r,i,!1);if(s==null||s.length===0||s[0]==null)throw j.getNotFoundInstance();return s[0]}decodeMultiple(r,i=null){try{return Dt.decode(r,i,!0)}catch(s){throw s instanceof B||s instanceof _?j.getNotFoundInstance():s}}static decode(r,i,s){const a=new Array,l=be.detectMultiple(r,i,s);for(const u of l.getPoints()){const d=Ce.decode(l.getBits(),u[4],u[5],u[6],u[7],Dt.getMinCodewordWidth(u),Dt.getMaxCodewordWidth(u)),h=new ze(d.getText(),d.getRawBytes(),void 0,u,ce.PDF_417);h.putMetadata(ht.ERROR_CORRECTION_LEVEL,d.getECLevel());const p=d.getOther();p!=null&&h.putMetadata(ht.PDF417_EXTRA_METADATA,p),a.push(h)}return a.map(u=>u)}static getMaxWidth(r,i){return r==null||i==null?0:Math.trunc(Math.abs(r.getX()-i.getX()))}static getMinWidth(r,i){return r==null||i==null?R.MAX_VALUE:Math.trunc(Math.abs(r.getX()-i.getX()))}static getMaxCodewordWidth(r){return Math.floor(Math.max(Math.max(Dt.getMaxWidth(r[0],r[4]),Dt.getMaxWidth(r[6],r[2])*we.MODULES_IN_CODEWORD/we.MODULES_IN_STOP_PATTERN),Math.max(Dt.getMaxWidth(r[1],r[5]),Dt.getMaxWidth(r[7],r[3])*we.MODULES_IN_CODEWORD/we.MODULES_IN_STOP_PATTERN)))}static getMinCodewordWidth(r){return Math.floor(Math.min(Math.min(Dt.getMinWidth(r[0],r[4]),Dt.getMinWidth(r[6],r[2])*we.MODULES_IN_CODEWORD/we.MODULES_IN_STOP_PATTERN),Math.min(Dt.getMinWidth(r[1],r[5]),Dt.getMinWidth(r[7],r[3])*we.MODULES_IN_CODEWORD/we.MODULES_IN_STOP_PATTERN)))}reset(){}}class Aa extends m{}Aa.kind="ReaderException";class nh{constructor(r,i){this.verbose=r===!0,i&&this.setHints(i)}decode(r,i){return i&&this.setHints(i),this.decodeInternal(r)}decodeWithState(r){return(this.readers===null||this.readers===void 0)&&this.setHints(null),this.decodeInternal(r)}setHints(r){this.hints=r;const i=!o(r)&&r.get(W.TRY_HARDER)===!0,s=o(r)?null:r.get(W.POSSIBLE_FORMATS),a=new Array;if(!o(s)){const l=s.some(u=>u===ce.UPC_A||u===ce.UPC_E||u===ce.EAN_13||u===ce.EAN_8||u===ce.CODABAR||u===ce.CODE_39||u===ce.CODE_93||u===ce.CODE_128||u===ce.ITF||u===ce.RSS_14||u===ce.RSS_EXPANDED);l&&!i&&a.push(new zi(r,this.verbose)),s.includes(ce.QR_CODE)&&a.push(new Ln),s.includes(ce.DATA_MATRIX)&&a.push(new Pn),s.includes(ce.AZTEC)&&a.push(new wa),s.includes(ce.PDF_417)&&a.push(new Dt),l&&i&&a.push(new zi(r,this.verbose))}a.length===0&&(i||a.push(new zi(r,this.verbose)),a.push(new Ln),a.push(new Pn),a.push(new wa),a.push(new Dt),i&&a.push(new zi(r,this.verbose))),this.readers=a}reset(){if(this.readers!==null)for(const r of this.readers)r.reset()}decodeInternal(r){if(this.readers===null)throw new Aa("No readers where selected, nothing can be read.");for(const i of this.readers)try{return i.decode(r,this.hints)}catch(s){if(s instanceof Aa)continue}throw new j("No MultiFormat Readers were able to detect the code.")}}class x3 extends wt{constructor(r=null,i=500){const s=new nh;s.setHints(r),super(s,i)}decodeBitmap(r){return this.reader.decodeWithState(r)}}class w3 extends wt{constructor(r=500){super(new Dt,r)}}class v3 extends wt{constructor(r=500){super(new Ln,r)}}var du;(function(E){E[E.ERROR_CORRECTION=0]="ERROR_CORRECTION",E[E.CHARACTER_SET=1]="CHARACTER_SET",E[E.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",E[E.MIN_SIZE=3]="MIN_SIZE",E[E.MAX_SIZE=4]="MAX_SIZE",E[E.MARGIN=5]="MARGIN",E[E.PDF417_COMPACT=6]="PDF417_COMPACT",E[E.PDF417_COMPACTION=7]="PDF417_COMPACTION",E[E.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",E[E.AZTEC_LAYERS=9]="AZTEC_LAYERS",E[E.QR_VERSION=10]="QR_VERSION"})(du||(du={}));var Et=du;class hu{constructor(r){this.field=r,this.cachedGenerators=[],this.cachedGenerators.push(new Nt(r,Int32Array.from([1])))}buildGenerator(r){const i=this.cachedGenerators;if(r>=i.length){let s=i[i.length-1];const a=this.field;for(let l=i.length;l<=r;l++){const u=s.multiply(new Nt(a,Int32Array.from([1,a.exp(l-1+a.getGeneratorBase())])));i.push(u),s=u}}return i[r]}encode(r,i){if(i===0)throw new y("No error correction bytes");const s=r.length-i;if(s<=0)throw new y("No data bytes provided");const a=this.buildGenerator(i),l=new Int32Array(s);D.arraycopy(r,0,l,0,s);let u=new Nt(this.field,l);u=u.multiplyByMonomial(i,1);const h=u.divide(a)[1].getCoefficients(),p=i-h.length;for(let v=0;v<p;v++)r[s+v]=0;D.arraycopy(h,0,r,s+p,h.length)}}class st{constructor(){}static applyMaskPenaltyRule1(r){return st.applyMaskPenaltyRule1Internal(r,!0)+st.applyMaskPenaltyRule1Internal(r,!1)}static applyMaskPenaltyRule2(r){let i=0;const s=r.getArray(),a=r.getWidth(),l=r.getHeight();for(let u=0;u<l-1;u++){const d=s[u];for(let h=0;h<a-1;h++){const p=d[h];p===d[h+1]&&p===s[u+1][h]&&p===s[u+1][h+1]&&i++}}return st.N2*i}static applyMaskPenaltyRule3(r){let i=0;const s=r.getArray(),a=r.getWidth(),l=r.getHeight();for(let u=0;u<l;u++)for(let d=0;d<a;d++){const h=s[u];d+6<a&&h[d]===1&&h[d+1]===0&&h[d+2]===1&&h[d+3]===1&&h[d+4]===1&&h[d+5]===0&&h[d+6]===1&&(st.isWhiteHorizontal(h,d-4,d)||st.isWhiteHorizontal(h,d+7,d+11))&&i++,u+6<l&&s[u][d]===1&&s[u+1][d]===0&&s[u+2][d]===1&&s[u+3][d]===1&&s[u+4][d]===1&&s[u+5][d]===0&&s[u+6][d]===1&&(st.isWhiteVertical(s,d,u-4,u)||st.isWhiteVertical(s,d,u+7,u+11))&&i++}return i*st.N3}static isWhiteHorizontal(r,i,s){i=Math.max(i,0),s=Math.min(s,r.length);for(let a=i;a<s;a++)if(r[a]===1)return!1;return!0}static isWhiteVertical(r,i,s,a){s=Math.max(s,0),a=Math.min(a,r.length);for(let l=s;l<a;l++)if(r[l][i]===1)return!1;return!0}static applyMaskPenaltyRule4(r){let i=0;const s=r.getArray(),a=r.getWidth(),l=r.getHeight();for(let h=0;h<l;h++){const p=s[h];for(let v=0;v<a;v++)p[v]===1&&i++}const u=r.getHeight()*r.getWidth();return Math.floor(Math.abs(i*2-u)*10/u)*st.N4}static getDataMaskBit(r,i,s){let a,l;switch(r){case 0:a=s+i&1;break;case 1:a=s&1;break;case 2:a=i%3;break;case 3:a=(s+i)%3;break;case 4:a=Math.floor(s/2)+Math.floor(i/3)&1;break;case 5:l=s*i,a=(l&1)+l%3;break;case 6:l=s*i,a=(l&1)+l%3&1;break;case 7:l=s*i,a=l%3+(s+i&1)&1;break;default:throw new y("Invalid mask pattern: "+r)}return a===0}static applyMaskPenaltyRule1Internal(r,i){let s=0;const a=i?r.getHeight():r.getWidth(),l=i?r.getWidth():r.getHeight(),u=r.getArray();for(let d=0;d<a;d++){let h=0,p=-1;for(let v=0;v<l;v++){const b=i?u[d][v]:u[v][d];b===p?h++:(h>=5&&(s+=st.N1+(h-5)),h=1,p=b)}h>=5&&(s+=st.N1+(h-5))}return s}}st.N1=3,st.N2=3,st.N3=40,st.N4=10;class Sa{constructor(r,i){this.width=r,this.height=i;const s=new Array(i);for(let a=0;a!==i;a++)s[a]=new Uint8Array(r);this.bytes=s}getHeight(){return this.height}getWidth(){return this.width}get(r,i){return this.bytes[i][r]}getArray(){return this.bytes}setNumber(r,i,s){this.bytes[i][r]=s}setBoolean(r,i,s){this.bytes[i][r]=s?1:0}clear(r){for(const i of this.bytes)I.fill(i,r)}equals(r){if(!(r instanceof Sa))return!1;const i=r;if(this.width!==i.width||this.height!==i.height)return!1;for(let s=0,a=this.height;s<a;++s){const l=this.bytes[s],u=i.bytes[s];for(let d=0,h=this.width;d<h;++d)if(l[d]!==u[d])return!1}return!0}toString(){const r=new K;for(let i=0,s=this.height;i<s;++i){const a=this.bytes[i];for(let l=0,u=this.width;l<u;++l)switch(a[l]){case 0:r.append(" 0");break;case 1:r.append(" 1");break;default:r.append(" ");break}r.append(`
|
|
487
|
-
`)}return r.toString()}}class pi{constructor(){this.maskPattern=-1}getMode(){return this.mode}getECLevel(){return this.ecLevel}getVersion(){return this.version}getMaskPattern(){return this.maskPattern}getMatrix(){return this.matrix}toString(){const r=new K;return r.append(`<<
|
|
488
|
-
`),r.append(" mode: "),r.append(this.mode?this.mode.toString():"null"),r.append(`
|
|
489
|
-
ecLevel: `),r.append(this.ecLevel?this.ecLevel.toString():"null"),r.append(`
|
|
490
|
-
version: `),r.append(this.version?this.version.toString():"null"),r.append(`
|
|
491
|
-
maskPattern: `),r.append(this.maskPattern.toString()),this.matrix?(r.append(`
|
|
492
|
-
matrix:
|
|
493
|
-
`),r.append(this.matrix.toString())):r.append(`
|
|
494
|
-
matrix: null
|
|
495
|
-
`),r.append(`>>
|
|
496
|
-
`),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<pi.NUM_MASK_PATTERNS}}pi.NUM_MASK_PATTERNS=8;class je extends m{}je.kind="WriterException";class xe{constructor(){}static clearMatrix(r){r.clear(255)}static buildMatrix(r,i,s,a,l){xe.clearMatrix(l),xe.embedBasicPatterns(s,l),xe.embedTypeInfo(i,a,l),xe.maybeEmbedVersionInfo(s,l),xe.embedDataBits(r,a,l)}static embedBasicPatterns(r,i){xe.embedPositionDetectionPatternsAndSeparators(i),xe.embedDarkDotAtLeftBottomCorner(i),xe.maybeEmbedPositionAdjustmentPatterns(r,i),xe.embedTimingPatterns(i)}static embedTypeInfo(r,i,s){const a=new U;xe.makeTypeInfoBits(r,i,a);for(let l=0,u=a.getSize();l<u;++l){const d=a.get(a.getSize()-1-l),h=xe.TYPE_INFO_COORDINATES[l],p=h[0],v=h[1];if(s.setBoolean(p,v,d),l<8){const b=s.getWidth()-l-1;s.setBoolean(b,8,d)}else{const A=s.getHeight()-7+(l-8);s.setBoolean(8,A,d)}}}static maybeEmbedVersionInfo(r,i){if(r.getVersionNumber()<7)return;const s=new U;xe.makeVersionInfoBits(r,s);let a=6*3-1;for(let l=0;l<6;++l)for(let u=0;u<3;++u){const d=s.get(a);a--,i.setBoolean(l,i.getHeight()-11+u,d),i.setBoolean(i.getHeight()-11+u,l,d)}}static embedDataBits(r,i,s){let a=0,l=-1,u=s.getWidth()-1,d=s.getHeight()-1;for(;u>0;){for(u===6&&(u-=1);d>=0&&d<s.getHeight();){for(let h=0;h<2;++h){const p=u-h;if(!xe.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,u-=2}if(a!==r.getSize())throw new je("Not all bits consumed: "+a+"/"+r.getSize())}static findMSBSet(r){return 32-R.numberOfLeadingZeros(r)}static calculateBCHCode(r,i){if(i===0)throw new y("0 polynomial");const s=xe.findMSBSet(i);for(r<<=s-1;xe.findMSBSet(r)>=s;)r^=i<<xe.findMSBSet(r)-s;return r}static makeTypeInfoBits(r,i,s){if(!pi.isValidMaskPattern(i))throw new je("Invalid mask pattern");const a=r.getBits()<<3|i;s.appendBits(a,5);const l=xe.calculateBCHCode(a,xe.TYPE_INFO_POLY);s.appendBits(l,10);const u=new U;if(u.appendBits(xe.TYPE_INFO_MASK_PATTERN,15),s.xor(u),s.getSize()!==15)throw new je("should not happen but we got: "+s.getSize())}static makeVersionInfoBits(r,i){i.appendBits(r.getVersionNumber(),6);const s=xe.calculateBCHCode(r.getVersionNumber(),xe.VERSION_INFO_POLY);if(i.appendBits(s,12),i.getSize()!==18)throw new je("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;xe.isEmpty(r.get(i,6))&&r.setNumber(i,6,s),xe.isEmpty(r.get(6,i))&&r.setNumber(6,i,s)}}static embedDarkDotAtLeftBottomCorner(r){if(r.get(8,r.getHeight()-8)===0)throw new je;r.setNumber(8,r.getHeight()-8,1)}static embedHorizontalSeparationPattern(r,i,s){for(let a=0;a<8;++a){if(!xe.isEmpty(s.get(r+a,i)))throw new je;s.setNumber(r+a,i,0)}}static embedVerticalSeparationPattern(r,i,s){for(let a=0;a<7;++a){if(!xe.isEmpty(s.get(r,i+a)))throw new je;s.setNumber(r,i+a,0)}}static embedPositionAdjustmentPattern(r,i,s){for(let a=0;a<5;++a){const l=xe.POSITION_ADJUSTMENT_PATTERN[a];for(let u=0;u<5;++u)s.setNumber(r+u,i+a,l[u])}}static embedPositionDetectionPattern(r,i,s){for(let a=0;a<7;++a){const l=xe.POSITION_DETECTION_PATTERN[a];for(let u=0;u<7;++u)s.setNumber(r+u,i+a,l[u])}}static embedPositionDetectionPatternsAndSeparators(r){const i=xe.POSITION_DETECTION_PATTERN[0].length;xe.embedPositionDetectionPattern(0,0,r),xe.embedPositionDetectionPattern(r.getWidth()-i,0,r),xe.embedPositionDetectionPattern(0,r.getWidth()-i,r);const s=8;xe.embedHorizontalSeparationPattern(0,s-1,r),xe.embedHorizontalSeparationPattern(r.getWidth()-s,s-1,r),xe.embedHorizontalSeparationPattern(0,r.getWidth()-s,r);const a=7;xe.embedVerticalSeparationPattern(a,0,r),xe.embedVerticalSeparationPattern(r.getHeight()-a-1,0,r),xe.embedVerticalSeparationPattern(a,r.getHeight()-a,r)}static maybeEmbedPositionAdjustmentPatterns(r,i){if(r.getVersionNumber()<2)return;const s=r.getVersionNumber()-1,a=xe.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[s];for(let l=0,u=a.length;l!==u;l++){const d=a[l];if(d>=0)for(let h=0;h!==u;h++){const p=a[h];p>=0&&xe.isEmpty(i.get(p,d))&&xe.embedPositionAdjustmentPattern(p-2,d-2,i)}}}}xe.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])]),xe.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])]),xe.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])]),xe.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])]),xe.VERSION_INFO_POLY=7973,xe.TYPE_INFO_POLY=1335,xe.TYPE_INFO_MASK_PATTERN=21522;class y3{constructor(r,i){this.dataBytes=r,this.errorCorrectionBytes=i}getDataBytes(){return this.dataBytes}getErrorCorrectionBytes(){return this.errorCorrectionBytes}}class Ge{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=Ge.DEFAULT_BYTE_MODE_ENCODING;const l=s!==null&&s.get(Et.CHARACTER_SET)!==void 0;l&&(a=s.get(Et.CHARACTER_SET).toString());const u=this.chooseMode(r,a),d=new U;if(u===pe.BYTE&&(l||Ge.DEFAULT_BYTE_MODE_ENCODING!==a)){const ee=$.getCharacterSetECIByName(a);ee!==void 0&&this.appendECI(ee,d)}this.appendModeInfo(u,d);const h=new U;this.appendBytes(r,u,h,a);let p;if(s!==null&&s.get(Et.QR_VERSION)!==void 0){const ee=Number.parseInt(s.get(Et.QR_VERSION).toString(),10);p=de.getVersionForNumber(ee);const Q=this.calculateBitsNeeded(u,d,h,p);if(!this.willFit(Q,p,i))throw new je("Data too big for requested version")}else p=this.recommendVersion(i,u,d,h);const v=new U;v.appendBitArray(d);const b=u===pe.BYTE?h.getSizeInBytes():r.length;this.appendLengthInfo(b,p,u,v),v.appendBitArray(h);const A=p.getECBlocksForLevel(i),N=p.getTotalCodewords()-A.getTotalECCodewords();this.terminateBits(N,v);const M=this.interleaveWithECBytes(v,p.getTotalCodewords(),N,A.getNumBlocks()),L=new pi;L.setECLevel(i),L.setMode(u),L.setVersion(p);const F=p.getDimensionForVersion(),H=new Sa(F,F),J=this.chooseMaskPattern(M,i,p,H);return L.setMaskPattern(J),xe.buildMatrix(M,i,p,J,H),L.setMatrix(H),L}static recommendVersion(r,i,s,a){const l=this.calculateBitsNeeded(i,s,a,de.getVersionForNumber(1)),u=this.chooseVersion(l,r),d=this.calculateBitsNeeded(i,s,a,u);return this.chooseVersion(d,r)}static calculateBitsNeeded(r,i,s,a){return i.getSize()+r.getCharacterCountBits(a)+s.getSize()}static getAlphanumericCode(r){return r<Ge.ALPHANUMERIC_TABLE.length?Ge.ALPHANUMERIC_TABLE[r]:-1}static chooseMode(r,i=null){if($.SJIS.getName()===i&&this.isOnlyDoubleByteKanji(r))return pe.KANJI;let s=!1,a=!1;for(let l=0,u=r.length;l<u;++l){const d=r.charAt(l);if(Ge.isDigit(d))s=!0;else if(this.getAlphanumericCode(d.charCodeAt(0))!==-1)a=!0;else return pe.BYTE}return a?pe.ALPHANUMERIC:s?pe.NUMERIC:pe.BYTE}static isOnlyDoubleByteKanji(r){let i;try{i=Ee.encode(r,$.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,u=-1;for(let d=0;d<pi.NUM_MASK_PATTERNS;d++){xe.buildMatrix(r,i,s,d,a);let h=this.calculateMaskPenalty(a);h<l&&(l=h,u=d)}return u}static chooseVersion(r,i){for(let s=1;s<=40;s++){const a=de.getVersionForNumber(s);if(Ge.willFit(r,a,i))return a}throw new je("Data too big")}static willFit(r,i,s){const a=i.getTotalCodewords(),u=i.getECBlocksForLevel(s).getTotalECCodewords(),d=a-u,h=(r+7)/8;return d>=h}static terminateBits(r,i){const s=r*8;if(i.getSize()>s)throw new je("data bits cannot fit in the QR Code"+i.getSize()+" > "+s);for(let u=0;u<4&&i.getSize()<s;++u)i.appendBit(!1);const a=i.getSize()&7;if(a>0)for(let u=a;u<8;u++)i.appendBit(!1);const l=r-i.getSizeInBytes();for(let u=0;u<l;++u)i.appendBits(u&1?17:236,8);if(i.getSize()!==s)throw new je("Bits size does not equal capacity")}static getNumDataBytesAndNumECBytesForBlockID(r,i,s,a,l,u){if(a>=s)throw new je("Block ID too large");const d=r%s,h=s-d,p=Math.floor(r/s),v=p+1,b=Math.floor(i/s),A=b+1,N=p-b,M=v-A;if(N!==M)throw new je("EC bytes mismatch");if(s!==h+d)throw new je("RS blocks mismatch");if(r!==(b+N)*h+(A+M)*d)throw new je("Total bytes mismatch");a<h?(l[0]=b,u[0]=N):(l[0]=A,u[0]=M)}static interleaveWithECBytes(r,i,s,a){if(r.getSizeInBytes()!==s)throw new je("Number of bits and data bytes does not match");let l=0,u=0,d=0;const h=new Array;for(let v=0;v<a;++v){const b=new Int32Array(1),A=new Int32Array(1);Ge.getNumDataBytesAndNumECBytesForBlockID(i,s,a,v,b,A);const N=b[0],M=new Uint8Array(N);r.toBytes(8*l,M,0,N);const L=Ge.generateECBytes(M,A[0]);h.push(new y3(M,L)),u=Math.max(u,N),d=Math.max(d,L.length),l+=b[0]}if(s!==l)throw new je("Data bytes does not match offset");const p=new U;for(let v=0;v<u;++v)for(const b of h){const A=b.getDataBytes();v<A.length&&p.appendBits(A[v],8)}for(let v=0;v<d;++v)for(const b of h){const A=b.getErrorCorrectionBytes();v<A.length&&p.appendBits(A[v],8)}if(i!==p.getSizeInBytes())throw new je("Interleaving error: "+i+" and "+p.getSizeInBytes()+" differ.");return p}static generateECBytes(r,i){const s=r.length,a=new Int32Array(s+i);for(let u=0;u<s;u++)a[u]=r[u]&255;new hu(_e.QR_CODE_FIELD_256).encode(a,i);const l=new Uint8Array(i);for(let u=0;u<i;u++)l[u]=a[s+u];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 je(r+" is bigger than "+((1<<l)-1));a.appendBits(r,l)}static appendBytes(r,i,s,a){switch(i){case pe.NUMERIC:Ge.appendNumericBytes(r,s);break;case pe.ALPHANUMERIC:Ge.appendAlphanumericBytes(r,s);break;case pe.BYTE:Ge.append8BitBytes(r,s,a);break;case pe.KANJI:Ge.appendKanjiBytes(r,s);break;default:throw new je("Invalid mode: "+i)}}static getDigit(r){return r.charCodeAt(0)-48}static isDigit(r){const i=Ge.getDigit(r);return i>=0&&i<=9}static appendNumericBytes(r,i){const s=r.length;let a=0;for(;a<s;){const l=Ge.getDigit(r.charAt(a));if(a+2<s){const u=Ge.getDigit(r.charAt(a+1)),d=Ge.getDigit(r.charAt(a+2));i.appendBits(l*100+u*10+d,10),a+=3}else if(a+1<s){const u=Ge.getDigit(r.charAt(a+1));i.appendBits(l*10+u,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=Ge.getAlphanumericCode(r.charCodeAt(a));if(l===-1)throw new je;if(a+1<s){const u=Ge.getAlphanumericCode(r.charCodeAt(a+1));if(u===-1)throw new je;i.appendBits(l*45+u,11),a+=2}else i.appendBits(l,6),a++}}static append8BitBytes(r,i,s){let a;try{a=Ee.encode(r,s)}catch(l){throw new je(l)}for(let l=0,u=a.length;l!==u;l++){const d=a[l];i.appendBits(d,8)}}static appendKanjiBytes(r,i){let s;try{s=Ee.encode(r,$.SJIS)}catch(l){throw new je(l)}const a=s.length;for(let l=0;l<a;l+=2){const u=s[l]&255,d=s[l+1]&255,h=u<<8&4294967295|d;let p=-1;if(h>=33088&&h<=40956?p=h-33088:h>=57408&&h<=60351&&(p=h-49472),p===-1)throw new je("Invalid byte sequence");const v=(p>>8)*192+(p&255);i.appendBits(v,13)}}static appendECI(r,i){i.appendBits(pe.ECI.getBits(),4),i.appendBits(r.getValue(),8)}}Ge.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]),Ge.DEFAULT_BYTE_MODE_ENCODING=$.UTF8.getName();class mi{write(r,i,s,a=null){if(r.length===0)throw new y("Found empty contents");if(i<0||s<0)throw new y("Requested dimensions are too small: "+i+"x"+s);let l=Ve.L,u=mi.QUIET_ZONE_SIZE;a!==null&&(a.get(Et.ERROR_CORRECTION)!==void 0&&(l=Ve.fromString(a.get(Et.ERROR_CORRECTION).toString())),a.get(Et.MARGIN)!==void 0&&(u=Number.parseInt(a.get(Et.MARGIN).toString(),10)));const d=Ge.encode(r,l,a);return this.renderResult(d,i,s,u)}writeToDom(r,i,s,a,l=null){typeof r=="string"&&(r=document.querySelector(r));const u=this.write(i,s,a,l);r&&r.appendChild(u)}renderResult(r,i,s,a){const l=r.getMatrix();if(l===null)throw new Gt;const u=l.getWidth(),d=l.getHeight(),h=u+a*2,p=d+a*2,v=Math.max(i,h),b=Math.max(s,p),A=Math.min(Math.floor(v/h),Math.floor(b/p)),N=Math.floor((v-u*A)/2),M=Math.floor((b-d*A)/2),L=this.createSVGElement(v,b);for(let F=0,H=M;F<d;F++,H+=A)for(let J=0,ee=N;J<u;J++,ee+=A)if(l.get(J,F)===1){const Q=this.createSvgRectElement(ee,H,A,A);L.appendChild(Q)}return L}createSVGElement(r,i){const s=document.createElementNS(mi.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(mi.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}}mi.QUIET_ZONE_SIZE=4,mi.SVG_NS="http://www.w3.org/2000/svg";class Vi{encode(r,i,s,a,l){if(r.length===0)throw new y("Found empty contents");if(i!==ce.QR_CODE)throw new y("Can only encode QR_CODE, but got "+i);if(s<0||a<0)throw new y(`Requested dimensions are too small: ${s}x${a}`);let u=Ve.L,d=Vi.QUIET_ZONE_SIZE;l!==null&&(l.get(Et.ERROR_CORRECTION)!==void 0&&(u=Ve.fromString(l.get(Et.ERROR_CORRECTION).toString())),l.get(Et.MARGIN)!==void 0&&(d=Number.parseInt(l.get(Et.MARGIN).toString(),10)));const h=Ge.encode(r,u,l);return Vi.renderResult(h,s,a,d)}static renderResult(r,i,s,a){const l=r.getMatrix();if(l===null)throw new Gt;const u=l.getWidth(),d=l.getHeight(),h=u+a*2,p=d+a*2,v=Math.max(i,h),b=Math.max(s,p),A=Math.min(Math.floor(v/h),Math.floor(b/p)),N=Math.floor((v-u*A)/2),M=Math.floor((b-d*A)/2),L=new le(v,b);for(let F=0,H=M;F<d;F++,H+=A)for(let J=0,ee=N;J<u;J++,ee+=A)l.get(J,F)===1&&L.setRegion(ee,H,A,A);return L}}Vi.QUIET_ZONE_SIZE=4;class E3{encode(r,i,s,a,l){let u;switch(i){case ce.QR_CODE:u=new Vi;break;default:throw new y("No encoder available for format "+i)}return u.encode(r,i,s,a,l)}}class Jr extends re{constructor(r,i,s,a,l,u,d,h){if(super(u,d),this.yuvData=r,this.dataWidth=i,this.dataHeight=s,this.left=a,this.top=l,a+u>i||l+d>s)throw new y("Crop rectangle does not fit within image data.");h&&this.reverseHorizontal(u,d)}getRow(r,i){if(r<0||r>=this.getHeight())throw new y("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 D.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 D.arraycopy(this.yuvData,l,a,0,s),a;for(let u=0;u<i;u++){const d=u*r;D.arraycopy(this.yuvData,l,a,d,r),l+=this.dataWidth}return a}isCropSupported(){return!0}crop(r,i,s,a){return new Jr(this.yuvData,this.dataWidth,this.dataHeight,this.left+r,this.top+i,s,a,!1)}renderThumbnail(){const r=this.getWidth()/Jr.THUMBNAIL_SCALE_FACTOR,i=this.getHeight()/Jr.THUMBNAIL_SCALE_FACTOR,s=new Int32Array(r*i),a=this.yuvData;let l=this.top*this.dataWidth+this.left;for(let u=0;u<i;u++){const d=u*r;for(let h=0;h<r;h++){const p=a[l+h*Jr.THUMBNAIL_SCALE_FACTOR]&255;s[d+h]=4278190080|p*65793}l+=this.dataWidth*Jr.THUMBNAIL_SCALE_FACTOR}return s}getThumbnailWidth(){return this.getWidth()/Jr.THUMBNAIL_SCALE_FACTOR}getThumbnailHeight(){return this.getHeight()/Jr.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 u=l+r/2;for(let d=l,h=l+r-1;d<u;d++,h--){const p=s[d];s[d]=s[h],s[h]=p}}}invert(){return new fe(this)}}Jr.THUMBNAIL_SCALE_FACTOR=2;class gu extends re{constructor(r,i,s,a,l,u,d){if(super(i,s),this.dataWidth=a,this.dataHeight=l,this.left=u,this.top=d,r.BYTES_PER_ELEMENT===4){const h=i*s,p=new Uint8ClampedArray(h);for(let v=0;v<h;v++){const b=r[v],A=b>>16&255,N=b>>7&510,M=b&255;p[v]=(A+N+M)/4&255}this.luminances=p}else this.luminances=r;if(a===void 0&&(this.dataWidth=i),l===void 0&&(this.dataHeight=s),u===void 0&&(this.left=0),d===void 0&&(this.top=0),this.left+i>this.dataWidth||this.top+s>this.dataHeight)throw new y("Crop rectangle does not fit within image data.")}getRow(r,i){if(r<0||r>=this.getHeight())throw new y("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 D.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 D.arraycopy(this.luminances,l,a,0,s),a;for(let u=0;u<i;u++){const d=u*r;D.arraycopy(this.luminances,l,a,d,r),l+=this.dataWidth}return a}isCropSupported(){return!0}crop(r,i,s,a){return new gu(this.luminances,s,a,this.dataWidth,this.dataHeight,this.left+r,this.top+i)}invert(){return new fe(this)}}class ih extends ${static forName(r){return this.getCharacterSetECIByName(r)}}class pu{}pu.ISO_8859_1=$.ISO8859_1;class sh{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 oh{static singletonList(r){return[r]}static min(r,i){return r.sort(i)[0]}}class b3{constructor(r){this.previous=r}getPrevious(){return this.previous}}class Hi extends b3{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 Hi(this,r,i)}addBinaryShift(r,i){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new Hi(this,r,i)}toString(){let r=this.value&(1<<this.bitCount)-1;return r|=1<<this.bitCount,"<"+R.toBinaryString(r|1<<this.bitCount).substring(1)+">"}}class mu extends Hi{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 mu(this,r,i)}toString(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}function C3(E,r,i){return new mu(E,r,i)}function Ys(E,r,i){return new Hi(E,r,i)}const A3=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],Fn=0,Ia=1,Tr=2,ah=3,en=4,S3=new Hi(null,0,0),xu=[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 I3(E){for(let r of E)I.fill(r,-1);return E[Fn][en]=0,E[Ia][en]=0,E[Ia][Fn]=28,E[ah][en]=0,E[Tr][en]=0,E[Tr][Fn]=15,E}const lh=I3(I.createInt32Array(6,6));class tn{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 u=xu[this.mode][r];a=Ys(a,u&65535,u>>16),s+=u>>16}let l=r===Tr?4:5;return a=Ys(a,i,l),new tn(a,r,0,s+l)}shiftAndAppend(r,i){let s=this.token,a=this.mode===Tr?4:5;return s=Ys(s,lh[this.mode][r],a),s=Ys(s,i,5),new tn(s,this.mode,0,this.bitCount+a+5)}addBinaryShiftChar(r){let i=this.token,s=this.mode,a=this.bitCount;if(this.mode===en||this.mode===Tr){let d=xu[s][Fn];i=Ys(i,d&65535,d>>16),a+=d>>16,s=Fn}let l=this.binaryShiftByteCount===0||this.binaryShiftByteCount===31?18:this.binaryShiftByteCount===62?9:8,u=new tn(i,s,this.binaryShiftByteCount+1,a+l);return u.binaryShiftByteCount===2078&&(u=u.endBinaryShift(r+1)),u}endBinaryShift(r){if(this.binaryShiftByteCount===0)return this;let i=this.token;return i=C3(i,r-this.binaryShiftByteCount,this.binaryShiftByteCount),new tn(i,this.mode,0,this.bitCount)}isBetterThanOrEqualTo(r){let i=this.bitCount+(xu[this.mode][r.mode]>>16);return this.binaryShiftByteCount<r.binaryShiftByteCount?i+=tn.calculateBinaryShiftCost(r)-tn.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 U;for(const a of i)a.appendTo(s,r);return s}toString(){return ne.format("%s bits=%d bytes=%d",A3[this.mode],this.bitCount,this.binaryShiftByteCount)}static calculateBinaryShiftCost(r){return r.binaryShiftByteCount>62?21:r.binaryShiftByteCount>31?20:r.binaryShiftByteCount>0?10:0}}tn.INITIAL_STATE=new tn(S3,Fn,0,0);function T3(E){const r=ne.getCharCode(" "),i=ne.getCharCode("."),s=ne.getCharCode(",");E[Fn][r]=1;const a=ne.getCharCode("Z"),l=ne.getCharCode("A");for(let A=l;A<=a;A++)E[Fn][A]=A-l+2;E[Ia][r]=1;const u=ne.getCharCode("z"),d=ne.getCharCode("a");for(let A=d;A<=u;A++)E[Ia][A]=A-d+2;E[Tr][r]=1;const h=ne.getCharCode("9"),p=ne.getCharCode("0");for(let A=p;A<=h;A++)E[Tr][A]=A-p+2;E[Tr][s]=12,E[Tr][i]=13;const v=["\0"," ","","","","","","","\x07","\b"," ",`
|
|
497
|
-
`,"\v","\f","\r","\x1B","","","","","@","\\","^","_","`","|","~",""];for(let A=0;A<v.length;A++)E[ah][ne.getCharCode(v[A])]=A;const b=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(let A=0;A<b.length;A++)ne.getCharCode(b[A])>0&&(E[en][ne.getCharCode(b[A])]=A);return E}const wu=T3(I.createInt32Array(5,256));class Ks{constructor(r){this.text=r}encode(){const r=ne.getCharCode(" "),i=ne.getCharCode(`
|
|
498
|
-
`);let s=oh.singletonList(tn.INITIAL_STATE);for(let l=0;l<this.text.length;l++){let u,d=l+1<this.text.length?this.text[l+1]:0;switch(this.text[l]){case ne.getCharCode("\r"):u=d===i?2:0;break;case ne.getCharCode("."):u=d===r?3:0;break;case ne.getCharCode(","):u=d===r?4:0;break;case ne.getCharCode(":"):u=d===r?5:0;break;default:u=0}u>0?(s=Ks.updateStateListForPair(s,l,u),l++):s=this.updateStateListForChar(s,l)}return oh.min(s,(l,u)=>l.getBitCount()-u.getBitCount()).toBitArray(this.text)}updateStateListForChar(r,i){const s=[];for(let a of r)this.updateStateForChar(a,i,s);return Ks.simplifyStates(s)}updateStateForChar(r,i,s){let a=this.text[i]&255,l=wu[r.getMode()][a]>0,u=null;for(let d=0;d<=en;d++){let h=wu[d][a];if(h>0){if(u==null&&(u=r.endBinaryShift(i)),!l||d===r.getMode()||d===Tr){const p=u.latchAndAppend(d,h);s.push(p)}if(!l&&lh[r.getMode()][d]>=0){const p=u.shiftAndAppend(d,h);s.push(p)}}}if(r.getBinaryShiftByteCount()>0||wu[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(en,s)),r.getMode()!==en&&a.push(l.shiftAndAppend(en,s)),s===3||s===4){let u=l.latchAndAppend(Tr,16-s).latchAndAppend(Tr,1);a.push(u)}if(r.getBinaryShiftByteCount()>0){let u=r.addBinaryShiftChar(i).addBinaryShiftChar(i+1);a.push(u)}}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(u=>u!==l))}a&&i.push(s)}return i}}class Oe{constructor(){}static encodeBytes(r){return Oe.encode(r,Oe.DEFAULT_EC_PERCENT,Oe.DEFAULT_AZTEC_LAYERS)}static encode(r,i,s){let a=new Ks(r).encode(),l=R.truncDivision(a.getSize()*i,100)+11,u=a.getSize()+l,d,h,p,v,b;if(s!==Oe.DEFAULT_AZTEC_LAYERS){if(d=s<0,h=Math.abs(s),h>(d?Oe.MAX_NB_BITS_COMPACT:Oe.MAX_NB_BITS))throw new y(ne.format("Illegal value %s for layers",s));p=Oe.totalBitsInLayer(h,d),v=Oe.WORD_SIZE[h];let Q=p-p%v;if(b=Oe.stuffBits(a,v),b.getSize()+l>Q)throw new y("Data to large for user specified layer");if(d&&b.getSize()>v*64)throw new y("Data to large for user specified layer")}else{v=0,b=null;for(let Q=0;;Q++){if(Q>Oe.MAX_NB_BITS)throw new y("Data too large for an Aztec code");if(d=Q<=3,h=d?Q+1:Q,p=Oe.totalBitsInLayer(h,d),u>p)continue;(b==null||v!==Oe.WORD_SIZE[h])&&(v=Oe.WORD_SIZE[h],b=Oe.stuffBits(a,v));let Te=p-p%v;if(!(d&&b.getSize()>v*64)&&b.getSize()+l<=Te)break}}let A=Oe.generateCheckWords(b,p,v),N=b.getSize()/v,M=Oe.generateModeMessage(d,h,N),L=(d?11:14)+h*4,F=new Int32Array(L),H;if(d){H=L;for(let Q=0;Q<F.length;Q++)F[Q]=Q}else{H=L+1+2*R.truncDivision(R.truncDivision(L,2)-1,15);let Q=R.truncDivision(L,2),Te=R.truncDivision(H,2);for(let ye=0;ye<Q;ye++){let nr=ye+R.truncDivision(ye,15);F[Q-ye-1]=Te-nr-1,F[Q+ye]=Te+nr+1}}let J=new le(H);for(let Q=0,Te=0;Q<h;Q++){let ye=(h-Q)*4+(d?9:12);for(let nr=0;nr<ye;nr++){let Br=nr*2;for(let ir=0;ir<2;ir++)A.get(Te+Br+ir)&&J.set(F[Q*2+ir],F[Q*2+nr]),A.get(Te+ye*2+Br+ir)&&J.set(F[Q*2+nr],F[L-1-Q*2-ir]),A.get(Te+ye*4+Br+ir)&&J.set(F[L-1-Q*2-ir],F[L-1-Q*2-nr]),A.get(Te+ye*6+Br+ir)&&J.set(F[L-1-Q*2-nr],F[Q*2+ir])}Te+=ye*8}if(Oe.drawModeMessage(J,d,H,M),d)Oe.drawBullsEye(J,R.truncDivision(H,2),5);else{Oe.drawBullsEye(J,R.truncDivision(H,2),7);for(let Q=0,Te=0;Q<R.truncDivision(L,2)-1;Q+=15,Te+=16)for(let ye=R.truncDivision(H,2)&1;ye<H;ye+=2)J.set(R.truncDivision(H,2)-Te,ye),J.set(R.truncDivision(H,2)+Te,ye),J.set(ye,R.truncDivision(H,2)-Te),J.set(ye,R.truncDivision(H,2)+Te)}let ee=new sh;return ee.setCompact(d),ee.setSize(H),ee.setLayers(h),ee.setCodeWords(N),ee.setMatrix(J),ee}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 U;return r?(a.appendBits(i-1,2),a.appendBits(s-1,6),a=Oe.generateCheckWords(a,28,4)):(a.appendBits(i-1,5),a.appendBits(s-1,11),a=Oe.generateCheckWords(a,40,4)),a}static drawModeMessage(r,i,s,a){let l=R.truncDivision(s,2);if(i)for(let u=0;u<7;u++){let d=l-3+u;a.get(u)&&r.set(d,l-5),a.get(u+7)&&r.set(l+5,d),a.get(20-u)&&r.set(d,l+5),a.get(27-u)&&r.set(l-5,d)}else for(let u=0;u<10;u++){let d=l-5+u+R.truncDivision(u,5);a.get(u)&&r.set(d,l-7),a.get(u+10)&&r.set(l+7,d),a.get(29-u)&&r.set(d,l+7),a.get(39-u)&&r.set(l-7,d)}}static generateCheckWords(r,i,s){let a=r.getSize()/s,l=new hu(Oe.getGF(s)),u=R.truncDivision(i,s),d=Oe.bitsToWords(r,s,u);l.encode(d,u-a);let h=i%s,p=new U;p.appendBits(0,h);for(const v of Array.from(d))p.appendBits(v,s);return p}static bitsToWords(r,i,s){let a=new Int32Array(s),l,u;for(l=0,u=r.getSize()/i;l<u;l++){let d=0;for(let h=0;h<i;h++)d|=r.get(l*i+h)?1<<i-h-1:0;a[l]=d}return a}static getGF(r){switch(r){case 4:return _e.AZTEC_PARAM;case 6:return _e.AZTEC_DATA_6;case 8:return _e.AZTEC_DATA_8;case 10:return _e.AZTEC_DATA_10;case 12:return _e.AZTEC_DATA_12;default:throw new y("Unsupported word size "+r)}}static stuffBits(r,i){let s=new U,a=r.getSize(),l=(1<<i)-2;for(let u=0;u<a;u+=i){let d=0;for(let h=0;h<i;h++)(u+h>=a||r.get(u+h))&&(d|=1<<i-1-h);(d&l)===l?(s.appendBits(d&l,i),u--):d&l?s.appendBits(d,i):(s.appendBits(d|1,i),u--)}return s}static totalBitsInLayer(r,i){return((i?88:112)+16*r)*r}}Oe.DEFAULT_EC_PERCENT=33,Oe.DEFAULT_AZTEC_LAYERS=0,Oe.MAX_NB_BITS=32,Oe.MAX_NB_BITS_COMPACT=4,Oe.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 Ta{encode(r,i,s,a){return this.encodeWithHints(r,i,s,a,null)}encodeWithHints(r,i,s,a,l){let u=pu.ISO_8859_1,d=Oe.DEFAULT_EC_PERCENT,h=Oe.DEFAULT_AZTEC_LAYERS;return l!=null&&(l.has(Et.CHARACTER_SET)&&(u=ih.forName(l.get(Et.CHARACTER_SET).toString())),l.has(Et.ERROR_CORRECTION)&&(d=R.parseInt(l.get(Et.ERROR_CORRECTION).toString())),l.has(Et.AZTEC_LAYERS)&&(h=R.parseInt(l.get(Et.AZTEC_LAYERS).toString()))),Ta.encodeLayers(r,i,s,a,u,d,h)}static encodeLayers(r,i,s,a,l,u,d){if(i!==ce.AZTEC)throw new y("Can only encode AZTEC, but got "+i);let h=Oe.encode(ne.getBytes(r,l),u,d);return Ta.renderResult(h,s,a)}static renderResult(r,i,s){let a=r.getMatrix();if(a==null)throw new Gt;let l=a.getWidth(),u=a.getHeight(),d=Math.max(i,l),h=Math.max(s,u),p=Math.min(d/l,h/u),v=(d-l*p)/2,b=(h-u*p)/2,A=new le(d,h);for(let N=0,M=b;N<u;N++,M+=p)for(let L=0,F=v;L<l;L++,F+=p)a.get(L,N)&&A.setRegion(F,M,p,p);return A}}n.AbstractExpandedDecoder=nu,n.ArgumentException=C,n.ArithmeticException=ui,n.AztecCode=sh,n.AztecCodeReader=wa,n.AztecCodeWriter=Ta,n.AztecDecoder=$e,n.AztecDetector=H0,n.AztecDetectorResult=$0,n.AztecEncoder=Oe,n.AztecHighLevelEncoder=Ks,n.AztecPoint=Xt,n.BarcodeFormat=ce,n.Binarizer=k,n.BinaryBitmap=S,n.BitArray=U,n.BitMatrix=le,n.BitSource=au,n.BrowserAztecCodeReader=Jv,n.BrowserBarcodeReader=i3,n.BrowserCodeReader=wt,n.BrowserDatamatrixCodeReader=o3,n.BrowserMultiFormatReader=x3,n.BrowserPDF417Reader=w3,n.BrowserQRCodeReader=v3,n.BrowserQRCodeSvgWriter=mi,n.CharacterSetECI=$,n.ChecksumException=_,n.Code128Reader=te,n.Code39Reader=vt,n.DataMatrixDecodedBitStreamParser=Mn,n.DataMatrixReader=Pn,n.DecodeHintType=W,n.DecoderResult=On,n.DefaultGridSampler=V0,n.DetectorResult=xa,n.EAN13Reader=fi,n.EncodeHintType=Et,n.Exception=m,n.FormatException=B,n.GenericGF=_e,n.GenericGFPoly=Nt,n.GlobalHistogramBinarizer=ve,n.GridSampler=Jc,n.GridSamplerInstance=kn,n.HTMLCanvasElementLuminanceSource=ge,n.HybridBinarizer=he,n.ITFReader=Ue,n.IllegalArgumentException=y,n.IllegalStateException=Gt,n.InvertedLuminanceSource=fe,n.LuminanceSource=re,n.MathUtils=Ne,n.MultiFormatOneDReader=zi,n.MultiFormatReader=nh,n.MultiFormatWriter=E3,n.NotFoundException=j,n.OneDReader=gt,n.PDF417DecodedBitStreamParser=V,n.PDF417DecoderErrorCorrection=Q0,n.PDF417Reader=Dt,n.PDF417ResultMetadata=J0,n.PerspectiveTransform=Pr,n.PlanarYUVLuminanceSource=Jr,n.QRCodeByteMatrix=Sa,n.QRCodeDataMask=Sr,n.QRCodeDecodedBitStreamParser=qe,n.QRCodeDecoderErrorCorrectionLevel=Ve,n.QRCodeDecoderFormatInformation=Wt,n.QRCodeEncoder=Ge,n.QRCodeEncoderQRCode=pi,n.QRCodeMaskUtil=st,n.QRCodeMatrixUtil=xe,n.QRCodeMode=pe,n.QRCodeReader=Ln,n.QRCodeVersion=de,n.QRCodeWriter=Vi,n.RGBLuminanceSource=gu,n.RSS14Reader=it,n.RSSExpandedReader=Z,n.ReaderException=Aa,n.ReedSolomonDecoder=js,n.ReedSolomonEncoder=hu,n.ReedSolomonException=hr,n.Result=ze,n.ResultMetadataType=ht,n.ResultPoint=ue,n.StringUtils=ne,n.UnsupportedOperationException=ae,n.VideoInputDevice=Pe,n.WhiteRectangleDetector=hn,n.WriterException=je,n.ZXingArrays=I,n.ZXingCharset=ih,n.ZXingInteger=R,n.ZXingStandardCharsets=pu,n.ZXingStringBuilder=K,n.ZXingStringEncoding=Ee,n.ZXingSystem=D,n.createAbstractExpandedDecoder=K0,Object.defineProperty(n,"__esModule",{value:!0})})})(Y1,Y1.exports);var Je=Y1.exports;const AR=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var s2=function(){function e(t,n,o){if(this.formatMap=new Map([[ie.QR_CODE,Je.BarcodeFormat.QR_CODE],[ie.AZTEC,Je.BarcodeFormat.AZTEC],[ie.CODABAR,Je.BarcodeFormat.CODABAR],[ie.CODE_39,Je.BarcodeFormat.CODE_39],[ie.CODE_93,Je.BarcodeFormat.CODE_93],[ie.CODE_128,Je.BarcodeFormat.CODE_128],[ie.DATA_MATRIX,Je.BarcodeFormat.DATA_MATRIX],[ie.MAXICODE,Je.BarcodeFormat.MAXICODE],[ie.ITF,Je.BarcodeFormat.ITF],[ie.EAN_13,Je.BarcodeFormat.EAN_13],[ie.EAN_8,Je.BarcodeFormat.EAN_8],[ie.PDF_417,Je.BarcodeFormat.PDF_417],[ie.RSS_14,Je.BarcodeFormat.RSS_14],[ie.RSS_EXPANDED,Je.BarcodeFormat.RSS_EXPANDED],[ie.UPC_A,Je.BarcodeFormat.UPC_A],[ie.UPC_E,Je.BarcodeFormat.UPC_E],[ie.UPC_EAN_EXTENSION,Je.BarcodeFormat.UPC_EAN_EXTENSION]]),this.reverseFormatMap=this.createReverseFormatMap(),!AR)throw"Use html5qrcode.min.js without edit, ZXing not found.";this.verbose=n,this.logger=o;var c=this.createZXingFormats(t),f=new Map;f.set(Je.DecodeHintType.POSSIBLE_FORMATS,c),f.set(Je.DecodeHintType.TRY_HARDER,!1),this.hints=f}return e.prototype.decodeAsync=function(t){var n=this;return new Promise(function(o,c){try{o(n.decode(t))}catch(f){c(f)}})},e.prototype.decode=function(t){var n=new Je.MultiFormatReader(this.verbose,this.hints),o=new Je.HTMLCanvasElementLuminanceSource(t),c=new Je.BinaryBitmap(new Je.HybridBinarizer(o)),f=n.decode(c);return{text:f.text,format:$v.create(this.toHtml5QrcodeSupportedFormats(f.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 f=c[o];this.formatMap.has(f)?n.push(this.formatMap.get(f)):this.logger.logError("".concat(f," is not supported by")+"ZXingHtml5QrcodeShim")}return n},e.prototype.createDebugData=function(){return{decoderName:"zxing-js"}},e}(),SR=function(e,t,n,o){function c(f){return f instanceof n?f:new n(function(g){g(f)})}return new(n||(n=Promise))(function(f,g){function x(C){try{m(o.next(C))}catch(y){g(y)}}function w(C){try{m(o.throw(C))}catch(y){g(y)}}function m(C){C.done?f(C.value):c(C.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},IR=function(e,t){var n={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},o,c,f,g;return g={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function x(m){return function(C){return w([m,C])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(f=m[0]&2?c.return:m[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,m[1])).done)return f;switch(c=0,f&&(m=[m[0]&2,f.value]),m[0]){case 0:case 1:f=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(f=n.trys,!(f=f.length>0&&f[f.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!f||m[1]>f[0]&&m[1]<f[3])){n.label=m[1];break}if(m[0]===6&&n.label<f[1]){n.label=f[1],f=m;break}if(f&&n.label<f[2]){n.label=f[2],n.ops.push(m);break}f[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(C){m=[6,C],c=0}finally{o=f=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},o2=function(){function e(t,n,o){if(this.formatMap=new Map([[ie.QR_CODE,"qr_code"],[ie.AZTEC,"aztec"],[ie.CODABAR,"codabar"],[ie.CODE_39,"code_39"],[ie.CODE_93,"code_93"],[ie.CODE_128,"code_128"],[ie.DATA_MATRIX,"data_matrix"],[ie.ITF,"itf"],[ie.EAN_13,"ean_13"],[ie.EAN_8,"ean_8"],[ie.PDF_417,"pdf417"],[ie.UPC_A,"upc_a"],[ie.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 SR(this,void 0,void 0,function(){var n,o;return IR(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:$v.create(this.toHtml5QrcodeSupportedFormats(o.format)),debugData:this.createDebugData()}]}})})},e.prototype.selectLargestBarcode=function(t){for(var n=null,o=0,c=0,f=t;c<f.length;c++){var g=f[c],x=g.boundingBox.width*g.boundingBox.height;x>o&&(o=x,n=g)}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 f=c[o];this.formatMap.has(f)?n.push(this.formatMap.get(f)):this.logger.warn("".concat(f," 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}(),a2=function(e,t,n,o){function c(f){return f instanceof n?f:new n(function(g){g(f)})}return new(n||(n=Promise))(function(f,g){function x(C){try{m(o.next(C))}catch(y){g(y)}}function w(C){try{m(o.throw(C))}catch(y){g(y)}}function m(C){C.done?f(C.value):c(C.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},l2=function(e,t){var n={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},o,c,f,g;return g={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function x(m){return function(C){return w([m,C])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(f=m[0]&2?c.return:m[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,m[1])).done)return f;switch(c=0,f&&(m=[m[0]&2,f.value]),m[0]){case 0:case 1:f=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(f=n.trys,!(f=f.length>0&&f[f.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!f||m[1]>f[0]&&m[1]<f[3])){n.label=m[1];break}if(m[0]===6&&n.label<f[1]){n.label=f[1],f=m;break}if(f&&n.label<f[2]){n.label=f[2],n.ops.push(m);break}f[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(C){m=[6,C],c=0}finally{o=f=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},TR=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&&o2.isSupported()?(this.primaryDecoder=new o2(t,o,c),this.secondaryDecoder=new s2(t,o,c)):this.primaryDecoder=new s2(t,o,c)}return e.prototype.decodeAsync=function(t){return a2(this,void 0,void 0,function(){var n;return l2(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 a2(this,void 0,void 0,function(){var n,o;return l2(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 f=t/this.executionResults.length;console.log("".concat(f," ms for ").concat(this.executionResults.length," last runs.")),this.executions=0,this.executionResults=[]}},e}(),W0=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&(o[f]=c[f])},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)}}(),fc=function(e,t,n,o){function c(f){return f instanceof n?f:new n(function(g){g(f)})}return new(n||(n=Promise))(function(f,g){function x(C){try{m(o.next(C))}catch(y){g(y)}}function w(C){try{m(o.throw(C))}catch(y){g(y)}}function m(C){C.done?f(C.value):c(C.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},dc=function(e,t){var n={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},o,c,f,g;return g={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function x(m){return function(C){return w([m,C])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(f=m[0]&2?c.return:m[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,m[1])).done)return f;switch(c=0,f&&(m=[m[0]&2,f.value]),m[0]){case 0:case 1:f=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(f=n.trys,!(f=f.length>0&&f[f.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!f||m[1]>f[0]&&m[1]<f[3])){n.label=m[1];break}if(m[0]===6&&n.label<f[1]){n.label=f[1],f=m;break}if(f&&n.label<f[2]){n.label=f[2],n.ops.push(m);break}f[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(C){m=[6,C],c=0}finally{o=f=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},Hv=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}(),RR=function(e){W0(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}(Hv),_R=function(e){W0(t,e);function t(n){return e.call(this,"zoom",n)||this}return t}(RR),NR=function(e){W0(t,e);function t(n){return e.call(this,"torch",n)||this}return t}(Hv),OR=function(){function e(t){this.track=t}return e.prototype.zoomFeature=function(){return new _R(this.track)},e.prototype.torchFeature=function(){return new NR(this.track)},e}(),kR=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 fc(this,void 0,void 0,function(){var f,g;return dc(this,function(x){switch(x.label){case 0:return f=new e(t,n,c),o.aspectRatio?(g={aspectRatio:o.aspectRatio},[4,f.getFirstTrackOrFail().applyConstraints(g)]):[3,2];case 1:x.sent(),x.label=2;case 2:return f.setupSurface(),[2,f]}})})},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 fc(this,void 0,void 0,function(){return dc(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(),f=c.length,g=0;t.mediaStream.getVideoTracks().forEach(function(x){t.mediaStream.removeTrack(x),x.stop(),++g,g>=f&&(t.isClosed=!0,t.parentElement.removeChild(t.surface),n())})})},e.prototype.getCapabilities=function(){return new OR(this.getFirstTrackOrFail())},e}(),DR=function(){function e(t){this.mediaStream=t}return e.prototype.render=function(t,n,o){return fc(this,void 0,void 0,function(){return dc(this,function(c){return[2,kR.create(t,this.mediaStream,n,o)]})})},e.create=function(t){return fc(this,void 0,void 0,function(){var n,o;return dc(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}(),c2=function(e,t,n,o){function c(f){return f instanceof n?f:new n(function(g){g(f)})}return new(n||(n=Promise))(function(f,g){function x(C){try{m(o.next(C))}catch(y){g(y)}}function w(C){try{m(o.throw(C))}catch(y){g(y)}}function m(C){C.done?f(C.value):c(C.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},u2=function(e,t){var n={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},o,c,f,g;return g={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function x(m){return function(C){return w([m,C])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(f=m[0]&2?c.return:m[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,m[1])).done)return f;switch(c=0,f&&(m=[m[0]&2,f.value]),m[0]){case 0:case 1:f=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(f=n.trys,!(f=f.length>0&&f[f.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!f||m[1]>f[0]&&m[1]<f[3])){n.label=m[1];break}if(m[0]===6&&n.label<f[1]){n.label=f[1],f=m;break}if(f&&n.label<f[2]){n.label=f[2],n.ops.push(m);break}f[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(C){m=[6,C],c=0}finally{o=f=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},MR=function(){function e(){}return e.failIfNotSupported=function(){return c2(this,void 0,void 0,function(){return u2(this,function(t){if(!navigator.mediaDevices)throw"navigator.mediaDevices not supported";return[2,new e]})})},e.prototype.create=function(t){return c2(this,void 0,void 0,function(){return u2(this,function(n){return[2,DR.create(t)]})})},e}(),PR=function(e,t,n,o){function c(f){return f instanceof n?f:new n(function(g){g(f)})}return new(n||(n=Promise))(function(f,g){function x(C){try{m(o.next(C))}catch(y){g(y)}}function w(C){try{m(o.throw(C))}catch(y){g(y)}}function m(C){C.done?f(C.value):c(C.value).then(x,w)}m((o=o.apply(e,t||[])).next())})},LR=function(e,t){var n={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},o,c,f,g;return g={next:x(0),throw:x(1),return:x(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function x(m){return function(C){return w([m,C])}}function w(m){if(o)throw new TypeError("Generator is already executing.");for(;g&&(g=0,m[0]&&(n=0)),n;)try{if(o=1,c&&(f=m[0]&2?c.return:m[0]?c.throw||((f=c.return)&&f.call(c),0):c.next)&&!(f=f.call(c,m[1])).done)return f;switch(c=0,f&&(m=[m[0]&2,f.value]),m[0]){case 0:case 1:f=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(f=n.trys,!(f=f.length>0&&f[f.length-1])&&(m[0]===6||m[0]===2)){n=0;continue}if(m[0]===3&&(!f||m[1]>f[0]&&m[1]<f[3])){n.label=m[1];break}if(m[0]===6&&n.label<f[1]){n.label=f[1],f=m;break}if(f&&n.label<f[2]){n.label=f[2],n.ops.push(m);break}f[2]&&n.ops.pop(),n.trys.pop();continue}m=t.call(e,n)}catch(C){m=[6,C],c=0}finally{o=f=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}},BR=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=hs.unableToQuerySupportedDevices();return e.isHttpsOrLocalhost()||(t=hs.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 PR(this,void 0,void 0,function(){var t,n,o,c,f,g,x;return LR(this,function(w){switch(w.label){case 0:return t=function(m){for(var C=m.getVideoTracks(),y=0,S=C;y<S.length;y++){var _=S[y];_.enabled=!1,_.stop(),m.removeTrack(_)}},[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=[],f=0,g=o;f<g.length;f++)x=g[f],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(f){for(var g=[],x=0,w=f;x<w.length;x++){var m=w[x];m.kind==="video"&&g.push({id:m.id,label:m.label})}t(g)},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 FR=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 f=c[o];if(t===f)throw"Cannot transition from ".concat(this.state," to ").concat(t)}},e}(),UR=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}(),jR=function(){function e(){}return e.create=function(){return new UR(new FR)},e}(),WR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,c){o.__proto__=c}||function(o,c){for(var f in c)Object.prototype.hasOwnProperty.call(c,f)&&(o[f]=c[f])},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)}}(),pr=function(e){WR(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}(ER),zR=function(){function e(t,n){this.logger=n,this.fps=pr.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=pr.DEFAULT_DISABLE_FLIP}return e.prototype.isMediaStreamConstraintsValid=function(){return this.videoConstraints?Vv.isMediaStreamConstraintsValid(this.videoConstraints,this.logger):(this.logger.logError("Empty videoConstraints",!0),!1)},e.prototype.isShadedBoxEnabled=function(){return!gn(this.qrbox)},e.create=function(t,n){return new e(t,n)},e}(),T_=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 CR(this.verbose),this.qrcode=new TR(this.getSupportedFormats(n),this.getUseBarCodeDetectorIfSupported(o),this.verbose,this.logger),this.foreverScanTimeout,this.shouldScan=!0,this.stateManagerProxy=jR.create()}return e.prototype.start=function(t,n,o,c){var f=this;if(!t)throw"cameraIdOrConfig is required";if(!o||typeof o!="function")throw"qrCodeSuccessCallback is required and should be a function.";var g;c?g=c:g=this.verbose?this.logger.log:function(){};var x=zR.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,C=document.getElementById(this.elementId);C.clientWidth?C.clientWidth:pr.DEFAULT_WIDTH,C.style.position="relative",this.shouldScan=!0,this.element=C;var y=this,S=this.stateManagerProxy.startTransition(ot.SCANNING);return new Promise(function(_,k){var D=m?x.videoConstraints:y.createVideoConstraints(t);if(!D){S.cancel(),k("videoConstraints should be defined");return}var X={};(!m||x.aspectRatio)&&(X.aspectRatio=x.aspectRatio);var O={onRenderSurfaceReady:function(I,R){y.setupUi(I,R,x),y.isScanning=!0,y.foreverScan(x,o,g)}};MR.failIfNotSupported().then(function(I){I.create(D).then(function(R){return R.render(f.element,X,O).then(function(U){y.renderedCamera=U,S.execute(),_(null)}).catch(function(U){S.cancel(),k(U)})}).catch(function(R){S.cancel(),k(hs.errorGettingUserMedia(R))})}).catch(function(I){S.cancel(),k(hs.cameraStreamingNotSupported())})})},e.prototype.pause=function(t){if(!this.stateManagerProxy.isStrictlyScanning())throw"Cannot pause, scanner is not scanning.";this.stateManagerProxy.directTransition(ot.PAUSED),this.showPausedState(),(gn(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 f=document.getElementById(pr.SHADED_REGION_ELEMENT_ID);f&&t.element.removeChild(f)}},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(gn(n)&&(n=!0),!this.stateManagerProxy.canScanFile())throw"Cannot start file scan - ongoing camera scan";return new Promise(function(c,f){o.possiblyCloseLastScanImageFile(),o.clearElement(),o.lastScanImageFile=URL.createObjectURL(t);var g=new Image;g.onload=function(){var x=g.width,w=g.height,m=document.getElementById(o.elementId),C=m.clientWidth?m.clientWidth:pr.DEFAULT_WIDTH,y=Math.max(m.clientHeight?m.clientHeight:w,pr.FILE_SCAN_MIN_HEIGHT),S=o.computeCanvasDrawConfig(x,w,C,y);if(n){var _=o.createCanvasElement(C,y,"qr-canvas-visible");_.style.display="inline-block",m.appendChild(_);var k=_.getContext("2d");if(!k)throw"Unable to get 2d context from canvas";k.canvas.width=C,k.canvas.height=y,k.drawImage(g,0,0,x,w,S.x,S.y,S.width,S.height)}var D=pr.FILE_SCAN_HIDDEN_CANVAS_PADDING,X=Math.max(g.width,S.width),O=Math.max(g.height,S.height),I=X+2*D,R=O+2*D,U=o.createCanvasElement(I,R);m.appendChild(U);var G=U.getContext("2d");if(!G)throw"Unable to get 2d context from canvas";G.canvas.width=I,G.canvas.height=R,G.drawImage(g,0,0,x,w,D,D,X,O);try{o.qrcode.decodeRobustlyAsync(U).then(function(W){c(i2.createFromQrcodeResult(W))}).catch(f)}catch(W){f("QR code parse error, error = ".concat(W))}},g.onerror=f,g.onabort=f,g.onstalled=f,g.onsuspend=f,g.src=URL.createObjectURL(t)})},e.prototype.clear=function(){this.clearElement()},e.getCameras=function(){return BR.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(!Vv.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=[ie.QR_CODE,ie.AZTEC,ie.CODABAR,ie.CODE_39,ie.CODE_93,ie.CODE_128,ie.DATA_MATRIX,ie.MAXICODE,ie.ITF,ie.EAN_13,ie.EAN_8,ie.PDF_417,ie.RSS_14,ie.RSS_EXPANDED,ie.UPC_A,ie.UPC_E,ie.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,f=t.formatsToSupport;c<f.length;c++){var g=f[c];yR(g)?o.push(g):this.logger.warn("Invalid format: ".concat(g," passed in config, ignoring."))}if(o.length===0)throw"None of formatsToSupport match supported values.";return o},e.prototype.getUseBarCodeDetectorIfSupported=function(t){if(gn(t))return!0;if(!gn(t.useBarCodeDetectorIfSupported))return t.useBarCodeDetectorIfSupported!==!1;if(gn(t.experimentalFeatures))return!0;var n=t.experimentalFeatures;return gn(n.useBarCodeDetectorIfSupported)?!0:n.useBarCodeDetectorIfSupported!==!1},e.prototype.validateQrboxSize=function(t,n,o){var c=this,f=o.qrbox;this.validateQrboxConfig(f);var g=this.toQrdimensions(t,n,f),x=function(m){if(m<pr.MIN_QR_BOX_SIZE)throw"minimum size of 'config.qrbox' dimension value is"+" ".concat(pr.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(g.width),x(g.height),g.width=w(g.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=gn(o.qrbox)?{width:t,height:n}:o.qrbox;this.validateQrboxConfig(c);var f=this.toQrdimensions(t,n,c);f.height>n&&this.logger.warn("[Html5Qrcode] config.qrbox has height that isgreater than the height of the video stream. Shading will be ignored");var g=o.isShadedBoxEnabled()&&f.height<=n,x={x:0,y:0,width:t,height:n},w=g?this.getShadedRegionBounds(t,n,f):x,m=this.createCanvasElement(w.width,w.height),C={willReadFrequently:!0},y=m.getContext("2d",C);y.canvas.width=w.width,y.canvas.height=w.height,this.element.append(m),g&&this.possiblyInsertShadingElement(this.element,t,n,f),this.createScannerPausedUiElement(this.element),this.qrRegion=w,this.context=y,this.canvasElement=m},e.prototype.createScannerPausedUiElement=function(t){var n=document.createElement("div");n.innerText=hs.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,i2.createFromQrcodeResult(c)),o.possiblyUpdateShaders(!0),!0}).catch(function(c){o.possiblyUpdateShaders(!1);var f=hs.codeParseError(c);return n(f,bR.createFrom(f)),!1})},e.prototype.foreverScan=function(t,n,o){var c=this;if(this.shouldScan&&this.renderedCamera){var f=this.renderedCamera.getSurface(),g=f.videoWidth/f.clientWidth,x=f.videoHeight/f.clientHeight;if(!this.qrRegion)throw"qrRegion undefined when localMediaStream is ready.";var w=this.qrRegion.width*g,m=this.qrRegion.height*x,C=this.qrRegion.x*g,y=this.qrRegion.y*x;this.context.drawImage(f,C,y,w,m,0,0,this.qrRegion.width,this.qrRegion.height);var S=function(){c.foreverScanTimeout=setTimeout(function(){c.foreverScan(t,n,o)},c.getTimeoutFps(t.fps))};this.scanContext(n,o).then(function(_){!_&&t.disableFlip!==!0?(c.context.translate(c.context.canvas.width,0),c.context.scale(-1,1),c.scanContext(n,o).finally(function(){S()})):S()}).catch(function(_){c.logger.logError("Error happend while scanning context",_),S()})}},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},f="exact",g=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(g(m))return{facingMode:m}}else if(typeof m=="object")if(f in m){if(g(m["".concat(f)]))return{facingMode:{exact:m["".concat(f)]}}}else throw"'facingMode' should be string or object with"+" ".concat(f," as key.");else{var C=typeof m;throw"Invalid type of 'facingMode' = ".concat(C)}}else{var y=t.deviceId;if(typeof y=="string")return{deviceId:y};if(typeof y=="object"){if(f in y)return{deviceId:{exact:y["".concat(f)]}};throw"'deviceId' should be string or object with"+" ".concat(f," as key.")}else{var S=typeof y;throw"Invalid type of 'deviceId' = ".concat(S)}}}var _=typeof t;throw"Invalid type of 'cameraIdOrConfig' = ".concat(_)},e.prototype.computeCanvasDrawConfig=function(t,n,o,c){if(t<=o&&n<=c){var f=(o-t)/2,g=(c-n)/2;return{x:f,y:g,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?pr.BORDER_SHADER_MATCH_COLOR:pr.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,f=n,g=document.createElement("canvas");return g.style.width="".concat(c,"px"),g.style.height="".concat(f,"px"),g.style.display="none",g.id=gn(o)?"qr-canvas":o,g},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 f=document.createElement("div");f.style.position="absolute";var g=(n-c.width)/2,x=(o-c.height)/2;if(f.style.borderLeft="".concat(g,"px solid rgba(0, 0, 0, 0.48)"),f.style.borderRight="".concat(g,"px solid rgba(0, 0, 0, 0.48)"),f.style.borderTop="".concat(x,"px solid rgba(0, 0, 0, 0.48)"),f.style.borderBottom="".concat(x,"px solid rgba(0, 0, 0, 0.48)"),f.style.boxSizing="border-box",f.style.top="0px",f.style.bottom="0px",f.style.left="0px",f.style.right="0px",f.id="".concat(pr.SHADED_REGION_ELEMENT_ID),n-c.width<11||o-c.height<11)this.hasBorderShaders=!1;else{var w=5,m=40;this.insertShaderBorders(f,m,w,-w,null,0,!0),this.insertShaderBorders(f,m,w,-w,null,0,!1),this.insertShaderBorders(f,m,w,null,-w,0,!0),this.insertShaderBorders(f,m,w,null,-w,0,!1),this.insertShaderBorders(f,w,m+w,-w,null,-w,!0),this.insertShaderBorders(f,w,m+w,null,-w,-w,!0),this.insertShaderBorders(f,w,m+w,-w,null,-w,!1),this.insertShaderBorders(f,w,m+w,null,-w,-w,!1),this.hasBorderShaders=!0}t.append(f)}},e.prototype.insertShaderBorders=function(t,n,o,c,f,g,x){var w=document.createElement("div");w.style.position="absolute",w.style.backgroundColor=pr.BORDER_SHADER_DEFAULT_COLOR,w.style.width="".concat(n,"px"),w.style.height="".concat(o,"px"),c!==null&&(w.style.top="".concat(c,"px")),f!==null&&(w.style.bottom="".concat(f,"px")),x?w.style.left="".concat(g,"px"):w.style.right="".concat(g,"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}(),f2;(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"})(f2||(f2={}));var K1;(function(e){e[e.BACK=1]="BACK",e[e.FRONT=2]="FRONT"})(K1||(K1={}));var Z1;(function(e){e[e.PORTRAIT=1]="PORTRAIT",e[e.LANDSCAPE=2]="LANDSCAPE",e[e.ADAPTIVE=3]="ADAPTIVE"})(Z1||(Z1={}));var Q1;(function(e){e[e.ALL=17]="ALL"})(Q1||(Q1={}));const $R=Object.assign(Object.assign({},ie),Q1);var d2;(function(e){e.ZXING="zxing",e.MLKIT="mlkit"})(d2||(d2={}));const VR=[{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 HR(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 GR=pa("CapacitorBarcodeScanner",{web:()=>(HR(VR),zn(()=>import("./web-aLPH3xFw.js"),[],import.meta.url).then(e=>new e.CapacitorBarcodeScannerWeb))});class XR{static async scanBarcode(t){return t.scanInstructions=t.scanInstructions||" ",t.scanButton=t.scanButton||!1,t.scanText=t.scanText||" ",t.cameraDirection=t.cameraDirection||K1.BACK,t.scanOrientation=t.scanOrientation||Z1.ADAPTIVE,GR.scanBarcode(t)}}const kf=pa("SecureStoragePlugin",{web:()=>zn(()=>import("./web-Dzd7NW_F.js"),[],import.meta.url).then(e=>new e.SecureStoragePluginWeb)});function YR(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 f=un.parse(c.origin);if(!f)throw new Error;return{endpoint:f,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=un.parse(t.server);if(!o)throw new Error;return{endpoint:o,grant:t.grant}}catch{throw new Error("这不是 AgentRoam 授权二维码,请扫描电脑终端上新生成的二维码。")}}class Gv{ready(){if(!Ms.isNativePlatform())throw new Error("请在 AgentRoam App 中扫码连接。")}async get(t){this.ready();try{return(await kf.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 kf.set({key:`agentroam-device:${t}`,value:n})}async remove(t){this.ready();try{await kf.remove({key:`agentroam-device:${t}`})}catch(n){if(!String(n).includes("does not exist"))throw n}}}async function Xv(){if(!Ms.isNativePlatform())throw new Error("请在 AgentRoam App 中使用相机扫码。");try{return(await XR.scanBarcode({hint:$R.QR_CODE,scanInstructions:"扫描电脑上的 AgentRoam 授权二维码",cameraDirection:1})).ScanResult||null}catch(e){if(/cancel/i.test(String(e)))return null;throw new Error("无法打开相机,请在系统设置中允许 AgentRoam 使用相机后重试。")}}class Yv{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,f={})=>{const g=this.session,x=new URL(typeof c=="string"?c:c instanceof URL?c.href:c.url),w=new Headers(f.headers??(c instanceof Request?c.headers:void 0));g&&x.origin===g.origin&&w.set("authorization",`Bearer ${g.token}`);const m=await this.transport(c,{...f,headers:w,credentials:"omit",redirect:"error"});if(g&&this.session===g&&x.origin===g.origin&&(m.status===401||m.status===423)){this.session=null;try{await this.storage.remove(g.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}=YR(t),c=new AbortController,f=setTimeout(()=>c.abort(),3e4);let g=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&&(g=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"),C=n.url.startsWith("http://")?"请确认手机与电脑在同一网络,并检查电脑防火墙是否允许 AgentRoam 连接。":"请检查手机网络和电脑的远程连接是否可用。";throw new Error(`${m?"连接电脑超时":"无法连接电脑"}(${n.url})。${C}请在电脑上刷新二维码后重新扫码。`)}if(!x.ok)throw new Error(x.status===423?"电脑已锁定远程访问,请先在电脑上解锁。":x.status===410?"二维码已使用或已过期,请在电脑上重新生成。":"扫码连接失败,请检查服务器地址和网络后重试。")}finally{clearTimeout(f)}if(!g||typeof g.token!="string"||!/^[A-Za-z0-9_-]{43}$/.test(g.token))throw new Error("服务器返回了无效的设备凭证。");try{await this.storage.set(n.url,g.token)}catch{throw await this.transport(n.api("/api/pairing/logout"),{method:"POST",headers:{authorization:`Bearer ${g.token}`},credentials:"omit",redirect:"error",signal:AbortSignal.timeout(5e3)}).catch(()=>{}),new Error("无法安全保存设备凭证,请在电脑上重新生成二维码后重试。")}return this.session={origin:n.url,token:g.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 Kv(e,t,n,o){const c=new URL(t);return(f,g)=>{const x=typeof f=="string"?f:f instanceof URL?f.href:f.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 C=new URL(w.pathname+w.search,e);return n.fetch(f instanceof Request?new Request(C,f):C,g)}return o(f,g)}}function KR(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 q1(e){lR(cR(e.url,void 0,jv())),new Nv().save(e)}async function ZR(e,t,n,o){e.render(P.jsx(F0,{})),window.__agentroamNativeFrame={origin:t.url,fetch:n.fetch},globalThis.fetch=Kv(t.url,location.href,n,o);const c=async g=>{const x=await n.pair(g);q1(x),location.reload()};nR({origin:t.url,frameUrl:g=>KR(g,location.href),pair:c,scan:async()=>{const g=await Xv();g&&await c(g)},switchComputer:async g=>{const x=un.parse(g);if(!x)throw new Error("电脑地址无效,请重新扫码。");const w=new Yv(new Gv,o,()=>{});await w.resume(x);const m=await w.fetch(x.api("/api/web-auth/status"),{signal:AbortSignal.timeout(5e3)}),C=m.ok?await m.json():null;if(!(C!=null&&C.authenticated)||C.locked)throw new Error("这台电脑需要重新授权,请点击扫码添加电脑。");q1(x),location.reload()}});const{default:f}=await zn(async()=>{const{default:g}=await import("./page-Cc56wyOt.js").then(x=>x.p);return{default:g}},__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);e.render(P.jsx(me.StrictMode,{children:P.jsx(f,{})}))}function QR(){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 qR(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 hc;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(hc||(hc={}));var h2;(function(e){e.None="NONE",e.Slide="SLIDE",e.Fade="FADE"})(h2||(h2={}));const Df=pa("StatusBar");function JR(e){const t=/^#([a-f\d]{6})$/i.exec(e.trim());if(!t)return null;const n=[0,2,4].map(c=>{const f=parseInt(t[1].slice(c,c+2),16)/255;return f<=.04045?f/12.92:((f+.055)/1.055)**2.4}),o=.2126*n[0]+.7152*n[1]+.0722*n[2];return{color:`#${t[1]}`,style:o>.179?hc.Light:hc.Dark}}function e_(){if(Ms.getPlatform()!=="android")return()=>{};const e=document.documentElement;e.dataset.skin=Fo.getState().skin;let t=!1,n=Df.setOverlaysWebView({overlay:!1}).catch(()=>{});const o=()=>{const g=JR(getComputedStyle(e).getPropertyValue("--bg-deepest"));g&&(n=n.then(async()=>{t||(await Df.setBackgroundColor({color:g.color}),await Df.setStyle({style:g.style}))}).catch(()=>{console.warn("Unable to update the Android status bar.")}))},c=new MutationObserver(o);c.observe(e,{attributes:!0,attributeFilter:["data-skin"]});const f=()=>{document.hidden||o()};return document.addEventListener("visibilitychange",f),window.addEventListener("focus",o),o(),()=>{t=!0,c.disconnect(),document.removeEventListener("visibilitychange",f),window.removeEventListener("focus",o)}}const t_="/service-worker.js";function r_(){return typeof window<"u"&&window.isSecureContext===!0&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window}function n_(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 f=0;f<o.length;f+=1)c[f]=o.charCodeAt(f);return c}async function g2(e){const{publicKey:t}=await e.get("/api/push/vapid");if(!t)return;const n=await navigator.serviceWorker.register(t_),c=await n.pushManager.getSubscription()??await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:n_(t)});await e.post("/api/push/subscribe",c.toJSON())}function i_(e){r_()&&(async()=>{try{if(Notification.permission==="granted"){await g2(e);return}if(Notification.permission!=="default")return;const t=()=>{(async()=>{try{await Notification.requestPermission()==="granted"&&await g2(e)}catch{}})()};document.addEventListener("pointerdown",t,{once:!0})}catch{}})()}class Mf 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 p2=10,s_=13,wi=32;function Pf(e){}function o_(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=Pf,onError:n=Pf,onRetry:o=Pf,onComment:c,maxBufferSize:f}=e,g=[];let x=0,w=!0,m,C="",y=0,S,_=!1;function k(G){if(_)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,G.charCodeAt(0)===239&&G.charCodeAt(1)===187&&G.charCodeAt(2)===191&&(G=G.slice(3))),g.length===0){const Y=X(G);Y!==""&&(g.push(Y),x=Y.length),D();return}if(G.indexOf(`
|
|
499
|
-
`)===-1&&G.indexOf("\r")===-1){g.push(G),x+=G.length,D();return}g.push(G);const W=g.join("");g.length=0,x=0;const B=X(W);B!==""&&(g.push(B),x=B.length),D()}function D(){f!==void 0&&(x+C.length<=f||(_=!0,g.length=0,x=0,m=void 0,C="",y=0,S=void 0,n(new Mf(`Buffered data exceeded max buffer size of ${f} characters`,{type:"max-buffer-size-exceeded"}))))}function X(G){let W=0;if(G.indexOf("\r")===-1){let B=G.indexOf(`
|
|
500
|
-
`,W);for(;B!==-1;){if(W===B){y>0&&t({id:m,event:S,data:C}),m=void 0,C="",y=0,S=void 0,W=B+1,B=G.indexOf(`
|
|
501
|
-
`,W);continue}const Y=G.charCodeAt(W);if(m2(G,W,Y)){const $=G.charCodeAt(W+5)===wi?W+6:W+5,ae=G.slice($,B);if(y===0&&G.charCodeAt(B+1)===p2){t({id:m,event:S,data:ae}),m=void 0,C="",S=void 0,W=B+2,B=G.indexOf(`
|
|
502
|
-
`,W);continue}C=y===0?ae:`${C}
|
|
503
|
-
${ae}`,y++}else x2(G,W,Y)?S=G.slice(G.charCodeAt(W+6)===wi?W+7:W+6,B)||void 0:O(G,W,B);W=B+1,B=G.indexOf(`
|
|
504
|
-
`,W)}return G.slice(W)}for(;W<G.length;){const B=G.indexOf("\r",W),Y=G.indexOf(`
|
|
505
|
-
`,W);let $=-1;if(B!==-1&&Y!==-1?$=B<Y?B:Y:B!==-1?B===G.length-1?$=-1:$=B:Y!==-1&&($=Y),$===-1)break;O(G,W,$),W=$+1,G.charCodeAt(W-1)===s_&&G.charCodeAt(W)===p2&&W++}return G.slice(W)}function O(G,W,B){if(W===B){R();return}const Y=G.charCodeAt(W);if(m2(G,W,Y)){const le=G.charCodeAt(W+5)===wi?W+6:W+5,j=G.slice(le,B);C=y===0?j:`${C}
|
|
506
|
-
${j}`,y++;return}if(x2(G,W,Y)){S=G.slice(G.charCodeAt(W+6)===wi?W+7:W+6,B)||void 0;return}if(Y===105&&G.charCodeAt(W+1)===100&&G.charCodeAt(W+2)===58){const le=G.slice(G.charCodeAt(W+3)===wi?W+4:W+3,B);le.includes("\0")||(m=le);return}if(Y===58){if(c){const le=G.slice(W,B);c(le.slice(G.charCodeAt(W+1)===wi?2:1))}return}const $=G.slice(W,B),ae=$.indexOf(":");if(ae===-1){I($,"",$);return}const Ee=$.slice(0,ae),ne=$.charCodeAt(ae+1)===wi?2:1,K=$.slice(ae+ne);I(Ee,K,$)}function I(G,W,B){switch(G){case"event":S=W||void 0;break;case"data":C=y===0?W:`${C}
|
|
507
|
-
${W}`,y++;break;case"id":W.includes("\0")||(m=W);break;case"retry":/^\d+$/.test(W)?o(parseInt(W,10)):n(new Mf(`Invalid \`retry\` value: "${W}"`,{type:"invalid-retry",value:W,line:B}));break;default:n(new Mf(`Unknown field "${G.length>20?`${G.slice(0,20)}…`:G}"`,{type:"unknown-field",field:G,value:W,line:B}));break}}function R(){y>0&&t({id:m,event:S,data:C}),m=void 0,C="",y=0,S=void 0}function U(G={}){if(G.consume&&g.length>0){const W=g.join("");O(W,0,W.length)}w=!0,m=void 0,C="",y=0,S=void 0,g.length=0,x=0,_=!1}return{feed:k,reset:U}}function m2(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 x2(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 w2 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(v2(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(v2(this),n)}}function a_(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function J1(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(J1).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${J1(e.cause)}`:e.message:`${e}`}function v2(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var Zv=e=>{throw TypeError(e)},z0=(e,t,n)=>t.has(e)||Zv("Cannot "+n),Se=(e,t,n)=>(z0(e,t,"read from private field"),n?n.call(e):t.get(e)),bt=(e,t,n)=>t.has(e)?Zv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ze=(e,t,n,o)=>(z0(e,t,"write to private field"),t.set(e,n),n),pn=(e,t,n)=>(z0(e,t,"access private method"),n),sr,Ei,Zi,Nl,gc,Oo,gs,ko,Hn,Qi,bs,qi,wo,Ur,ed,td,rd,y2,nd,id,vo,sd,od;let Ol=class extends EventTarget{constructor(t,n){var o,c;super(),bt(this,Ur),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,bt(this,sr),bt(this,Ei),bt(this,Zi),bt(this,Nl),bt(this,gc),bt(this,Oo),bt(this,gs),bt(this,ko,null),bt(this,Hn),bt(this,Qi),bt(this,bs,null),bt(this,qi,null),bt(this,wo,null),bt(this,td,async f=>{var g;Se(this,Qi).reset();const{body:x,redirected:w,status:m,headers:C}=f;if(m===204){pn(this,Ur,vo).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(w?Ze(this,Zi,new URL(f.url)):Ze(this,Zi,void 0),m!==200){pn(this,Ur,vo).call(this,`Non-200 status code (${m})`,m);return}if(!(C.get("content-type")||"").startsWith("text/event-stream")){pn(this,Ur,vo).call(this,'Invalid content type, expected "text/event-stream"',m);return}if(Se(this,sr)===this.CLOSED)return;Ze(this,sr,this.OPEN);const y=new Event("open");if((g=Se(this,wo))==null||g.call(this,y),this.dispatchEvent(y),typeof x!="object"||!x||!("getReader"in x)){pn(this,Ur,vo).call(this,"Invalid response body, expected a web ReadableStream",m),this.close();return}const S=new TextDecoder,_=x.getReader();let k=!0;do{const{done:D,value:X}=await _.read();X&&Se(this,Qi).feed(S.decode(X,{stream:!D})),D&&(k=!1,Se(this,Qi).reset(),pn(this,Ur,sd).call(this))}while(k)}),bt(this,rd,f=>{Ze(this,Hn,void 0),!(f.name==="AbortError"||f.type==="aborted")&&pn(this,Ur,sd).call(this,J1(f))}),bt(this,nd,f=>{typeof f.id=="string"&&Ze(this,ko,f.id);const g=new MessageEvent(f.event||"message",{data:f.data,origin:Se(this,Zi)?Se(this,Zi).origin:Se(this,Ei).origin,lastEventId:f.id||""});Se(this,qi)&&(!f.event||f.event==="message")&&Se(this,qi).call(this,g),this.dispatchEvent(g)}),bt(this,id,f=>{Ze(this,Oo,f)}),bt(this,od,()=>{Ze(this,gs,void 0),Se(this,sr)===this.CONNECTING&&pn(this,Ur,ed).call(this)});try{if(t instanceof URL)Ze(this,Ei,t);else if(typeof t=="string")Ze(this,Ei,new URL(t,l_()));else throw new Error("Invalid URL")}catch{throw a_("An invalid or illegal string was specified")}Ze(this,Qi,o_({onEvent:Se(this,nd),onRetry:Se(this,id)})),Ze(this,sr,this.CONNECTING),Ze(this,Oo,3e3),Ze(this,gc,(o=n==null?void 0:n.fetch)!=null?o:globalThis.fetch),Ze(this,Nl,(c=n==null?void 0:n.withCredentials)!=null?c:!1),pn(this,Ur,ed).call(this)}get readyState(){return Se(this,sr)}get url(){return Se(this,Ei).href}get withCredentials(){return Se(this,Nl)}get onerror(){return Se(this,bs)}set onerror(t){Ze(this,bs,t)}get onmessage(){return Se(this,qi)}set onmessage(t){Ze(this,qi,t)}get onopen(){return Se(this,wo)}set onopen(t){Ze(this,wo,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(){Se(this,gs)&&clearTimeout(Se(this,gs)),Se(this,sr)!==this.CLOSED&&(Se(this,Hn)&&Se(this,Hn).abort(),Ze(this,sr,this.CLOSED),Ze(this,Hn,void 0))}};sr=new WeakMap,Ei=new WeakMap,Zi=new WeakMap,Nl=new WeakMap,gc=new WeakMap,Oo=new WeakMap,gs=new WeakMap,ko=new WeakMap,Hn=new WeakMap,Qi=new WeakMap,bs=new WeakMap,qi=new WeakMap,wo=new WeakMap,Ur=new WeakSet,ed=function(){Ze(this,sr,this.CONNECTING),Ze(this,Hn,new AbortController),Se(this,gc)(Se(this,Ei),pn(this,Ur,y2).call(this)).then(Se(this,td)).catch(Se(this,rd))},td=new WeakMap,rd=new WeakMap,y2=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...Se(this,ko)?{"Last-Event-ID":Se(this,ko)}:void 0},cache:"no-store",signal:(e=Se(this,Hn))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},nd=new WeakMap,id=new WeakMap,vo=function(e,t){var n;Se(this,sr)!==this.CLOSED&&Ze(this,sr,this.CLOSED);const o=new w2("error",{code:t,message:e});(n=Se(this,bs))==null||n.call(this,o),this.dispatchEvent(o)},sd=function(e,t){var n;if(Se(this,sr)===this.CLOSED)return;Ze(this,sr,this.CONNECTING);const o=new w2("error",{code:t,message:e});(n=Se(this,bs))==null||n.call(this,o),this.dispatchEvent(o),Ze(this,gs,setTimeout(Se(this,od),Se(this,Oo)))},od=new WeakMap,Ol.CONNECTING=0,Ol.OPEN=1,Ol.CLOSED=2;function l_(){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}b7();P9();U9();z9();$9();G9();b9({baseUrl:()=>na,source:"webapp"});document.body.dataset.webShell="1";const Qc=new dT,si=QR(),Qv=Qc.isNativeApp()||!!si;Qv&&(document.body.dataset.nativeApp="1");e_();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=zg.find(o=>o.id===Fo.getState().skin)??zg[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(),Fo.subscribe(e)}const qc=globalThis.fetch.bind(globalThis),pt=Qc.isNativeApp()&&!si?new Yv(new Gv,qc):null,ra=si?qR(si):pt==null?void 0:pt.fetch;si&&ra&&(globalThis.fetch=Kv(si.origin,location.href,{fetch:ra},qc));const pc=new w9(ra),c_=window.parent===window?void 0:new eT,u_=window.parent===window?void 0:new uT;let na="";async function E2(e){const{wsNonce:t}=await pc.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 b2=new R9(pc,new k9,c_,e=>ra?new Ol(na+e,{fetch:ra}):new EventSource(na+e),new N9({openSocket:()=>E2("/ws/voice")}),new O9(()=>E2("/ws/voice/tts")));window.browserLiveApi=u_;const qv=document.getElementById("root");if(!qv)throw new Error("#root missing");const Do=Tv(qv);pt&&window.parent===window&&Do.render(P.jsx(F0,{}));function f_(){return me.useEffect(()=>{Y9()},[]),null}(async()=>{pt&&window.addEventListener("webapp:unauthorized",()=>location.reload());const e=new fT(Qc,new Nv,new gT(pt?async(n,o)=>{const c=un.parse(String(n));return c&&await pt.resume(c),pt.fetch(n,o)}:void 0));if(si){await ld(un.parse(si.origin));return}const t=await e.planStartup();if(t.mode==="setup"){ad(t.failure);return}await ld(t.mode==="ready"?t.endpoint:null)})().catch(e=>{pt&&ad(e instanceof Error?e.message:"连接失败,请重新扫码。")});function ad(e=""){globalThis.fetch=qc,delete window.__agentroamNativeFrame,Do.render(P.jsx(rR,{initialFailure:e,onScan:async()=>{const t=await Xv();if(!t||!pt)return;const n=await pt.pair(t);q1(n),await ld(n)}}))}async function ld(e){try{if(e&&(await(pt==null?void 0:pt.resume(e)),pc.setBaseUrl(e.url),na=e.url),pt&&e&&window.parent===window){await ZR(Do,e,pt,qc),setInterval(()=>{pt.checkAuthorization().catch(()=>{})},1e4);return}window.agentApi=b2,await b2.refreshServerModel(),!Qv&&window.parent===window&&i_(pc);const t=new URLSearchParams(location.search).get("view"),{default:n}=t==="collaboration"?await zn(()=>import("./CollaborationPage-Fsvkw8ZM.js").then(o=>o.a),__vite__mapDeps([8,2,6,9,10,11,5,12,13]),import.meta.url):t==="collaboration-dashboard"?await zn(()=>import("./CollaborationDashboard-DIVa26zk.js").then(o=>o.b),__vite__mapDeps([14,5,15,3,10,11,13,6,16,17]),import.meta.url):t==="session-dashboard"?await zn(()=>import("./SessionDashboard-DOWjUIY1.js").then(o=>o.a),__vite__mapDeps([18,6,10,11,16,9,19]),import.meta.url):t==="remote-desktop"?await zn(()=>import("./RemoteDesktopPage-DpoYuKhA.js"),__vite__mapDeps([20,21,12,4,22,7]),import.meta.url):await zn(()=>import("./App-Cs8U1u-X.js"),__vite__mapDeps([23,15,3,4,2,1,8,6,9,10,11,5,12,13,21,22,24,25,18,16,19,14,17,26,27,28,29]),import.meta.url);Do.render(P.jsxs(me.StrictMode,{children:[P.jsx(C7.Provider,{value:P.jsx(p9,{}),children:P.jsx(n,{})}),P.jsx(f_,{})]})),pt&&setInterval(()=>{pt.checkAuthorization().catch(()=>{})},1e4),e||(window.addEventListener("webapp:unauthorized",()=>location.reload()),d_())}catch(t){if(pt&&window.parent===window){ad(t instanceof Error?t.message:"连接失败,请重新扫码。");return}Do.render(P.jsx("div",{style:{minHeight:"100dvh",display:"flex",alignItems:"center",justifyContent:"center",padding:24,background:"#f5f6fa",boxSizing:"border-box"},children:P.jsxs("div",{style:{maxWidth:560,background:"#fff",borderRadius:12,padding:20,boxShadow:"0 4px 16px rgba(0,0,0,0.08)"},children:[P.jsx("h2",{style:{margin:"0 0 8px",fontSize:16,color:"#dc2626"},children:"界面启动失败"}),P.jsx("p",{style:{margin:"0 0 12px",fontSize:13,color:"#374151",wordBreak:"break-all"},children:t instanceof Error?`${t.name}: ${t.message}`:String(t)}),P.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 d_(){const e=[...document.scripts].map(n=>n.src).join(",").match(/index-([^/]+)\.js/),t=e?e[1]:null;t&&setInterval(async()=>{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&&location.reload()}catch{}},6e4)}export{s5 as $,KT as A,C7 as B,Z1 as C,_T as D,kv as E,ET as F,x_ as G,T_ as H,K9 as I,b_ as J,C_ as K,AT as L,IT as M,F0 as N,UT as O,RT as P,o5 as Q,Pv as R,g_ as S,i5 as T,OT as U,Cx as V,zv as W,DT as X,E_ as Y,nT as Z,zT as _,$R as a,rT as a0,FT as a1,LT as a2,jT as a3,m_ as a4,w_ as a5,tT as a6,zn as a7,X3 as a8,U0 as a9,j0 as aa,QT as ab,v_ as ac,Z7 as ad,kT as ae,Nf as af,V9 as ag,HT as ah,G1 as ai,JT as aj,h_ as ak,zg as al,p_ as am,iR as b,xt as c,bT as d,ds as e,NT as f,n5 as g,wn as h,ZT as i,P as j,C2 as k,vT as l,TT as m,A_ as n,Uv as o,jv as p,cR as q,me as r,lR as s,y_ as t,Fo as u,uR as v,S_ as w,aR as x,CT as y,I_ as z};
|