diff --git a/.claude/skills/ci-prep/SKILL.md b/.claude/skills/ci-prep/SKILL.md index 82c46a3..35c558b 100644 --- a/.claude/skills/ci-prep/SKILL.md +++ b/.claude/skills/ci-prep/SKILL.md @@ -3,7 +3,7 @@ name: ci-prep description: Prepares the current branch for CI by running the exact same steps locally and fixing issues. If CI is already failing, fetches the GH Actions logs first to diagnose. Use before pushing, when CI is red, or when the user says "fix ci". argument-hint: "[--failing] [optional job name to focus on]" --- - + # CI Prep @@ -44,10 +44,10 @@ Read **every line** of `--log-failed` output. For each failure note the exact fi 1. Find the CI workflow file. Look in `.github/workflows/` for `ci.yml`, `build.yml`, `test.yml`, `checks.yml`, `main.yml`, `pull_request.yml`, or any workflow triggered on `pull_request` or `push`. 2. Read the workflow file completely. Parse every job and every step. -3. Extract the ordered list of commands the CI actually runs (e.g., `make lint`, `make fmt-check`, `make test`, `make coverage-check`, `make build`, or whatever the workflow specifies — it may use `npm`, `cargo`, `dotnet`, raw shell commands, or anything else). +3. Extract the ordered list of commands the CI actually runs. In a spec-compliant repo this is `make lint → make test → make build` (REPO-STANDARDS-SPEC [MAKE-TARGETS]), but the actual CI may use `npm`, `cargo`, `dotnet`, raw shell commands, or anything else. Extract what is *actually there*. 4. Note any environment variables, matrix strategies, or conditional steps that affect execution. -**Do NOT assume the steps are `make lint`, `make test`, `make coverage-check`, `make build`.** The actual CI may run different commands, in a different order, with different targets. Extract what the CI *actually does*. +**Do NOT assume the steps are `make lint`, `make test`, `make build`.** The actual CI may run different commands, in a different order. Extract what the CI *actually does*. If you find extra targets beyond the 7 in [MAKE-TARGETS] (e.g. `make fmt-check`, `make coverage-check`), flag them in your final report — they should be consolidated by the agent-pmo skill. ## Step 3 — Run each CI step locally, in order diff --git a/.claude/skills/code-dedup/SKILL.md b/.claude/skills/code-dedup/SKILL.md index 21f29ab..f763229 100644 --- a/.claude/skills/code-dedup/SKILL.md +++ b/.claude/skills/code-dedup/SKILL.md @@ -2,7 +2,7 @@ name: code-dedup description: Searches for duplicate code, duplicate tests, and dead code, then safely merges or removes them. Use when the user says "deduplicate", "find duplicates", "remove dead code", "DRY up", or "code dedup". Requires test coverage — refuses to touch untested code. --- - + # Code Dedup @@ -13,10 +13,10 @@ Carefully search for duplicate code, duplicate tests, and dead code across the r Before touching ANY code, verify these conditions. If any fail, stop and report why. 1. Run `make test` — all tests must pass. If tests fail, stop. Do not dedup a broken codebase. -2. Run `make coverage-check` — coverage must meet the repo's threshold. If it doesn't, stop. +2. Run `make test` — tests are fail-fast AND enforce the coverage threshold from `coverage-thresholds.json`. If anything fails, stop and fix it before deduping. 3. Verify the project uses **static typing**. Check for: - C#: typed by default — proceed - - Python: must have type annotations AND a type checker configured (pyright, mypy, or Basilisk in pyproject.toml / Makefile) — proceed + - Python: must have **Basilisk** configured as the primary type checker in `pyproject.toml [tool.basilisk]` (per REPO-STANDARDS-SPEC [LINT-PYTHON-BASILISK]). pyright is acceptable as a secondary check but Basilisk is the primary requirement. - **Untyped Python: STOP. Refuse to dedup.** Print: "This codebase has no static type checking. Deduplication without types is reckless — too high a risk of silent breakage. Add type checking first." ## Steps @@ -37,7 +37,7 @@ Dedup Progress: Before deciding what to touch, understand what is tested. -1. Run `make test` and `make coverage-check` to confirm green baseline +1. Run `make test` to confirm green baseline. `make test` is fail-fast AND enforces the coverage threshold from `coverage-thresholds.json` (REPO-STANDARDS-SPEC [TEST-RULES], [COVERAGE-THRESHOLDS-JSON]). It exits non-zero on any test failure OR coverage shortfall. 2. Note the current coverage percentage — this is the floor. It must not drop. 3. Identify which files/modules have coverage and which do not. Only files WITH coverage are candidates for dedup. @@ -78,28 +78,29 @@ For each change, follow this cycle: **change → test → verify coverage → co #### 5a. Remove dead code - Delete dead code identified in Step 2 -- After each deletion: run `make test` and `make coverage-check` -- If tests fail or coverage drops: **revert immediately** and investigate +- After each deletion: run `make test` (fail-fast + coverage + threshold all in one) +- If `make test` exits non-zero (test failure OR coverage drop): **revert immediately** and investigate - Dead code removal should never break tests or drop coverage #### 5b. Merge duplicate code - For each duplicate pair: extract the shared logic into a single function/module - Update all call sites to use the shared version -- After each merge: run `make test` and `make coverage-check` +- After each merge: run `make test` - If tests fail: **revert immediately**. The duplicates may have subtle differences you missed. - If coverage drops: the shared code must have equivalent test coverage. Add tests if needed before proceeding. #### 5c. Remove duplicate tests - Delete the redundant test (keep the more thorough one) -- After each deletion: run `make coverage-check` -- If coverage drops: **revert immediately**. The "duplicate" test was covering something the other wasn't. +- After each deletion: run `make test` +- If coverage drops below threshold, `make test` exits non-zero — **revert immediately**. The "duplicate" test was covering something the other wasn't. ### Step 6 — Final verification -1. Run `make test` — all tests must still pass -2. Run `make coverage-check` — coverage must be >= the baseline from Step 1 -3. Run `make lint` and `make fmt-check` — code must be clean -4. Report: what was removed, what was merged, final coverage vs baseline +1. Run `make lint` — all linters and the format check must pass +2. Run `make test` — tests must pass AND coverage must remain ≥ the baseline from Step 1 +3. Report: what was removed, what was merged, final coverage vs baseline + +(Only the 7 standard targets exist — `make lint` and `make test` cover formatting and coverage checks respectively.) ## Rules diff --git a/.claude/skills/fix-bug/SKILL.md b/.claude/skills/fix-bug/SKILL.md new file mode 100644 index 0000000..1926eb7 --- /dev/null +++ b/.claude/skills/fix-bug/SKILL.md @@ -0,0 +1,66 @@ +--- +name: fix-bug +description: Fix a bug using test-driven development. Use when the user reports a bug, describes unexpected behavior, wants to fix a defect, or says something is broken. Enforces a strict test-first workflow where a failing test must be written and verified before any fix is attempted. +argument-hint: "[bug description]" +--- + + +# Bug Fix Skill — Test-First Workflow + +You MUST follow this exact workflow. Do NOT skip steps. Do NOT fix the bug before writing a failing test. + +## Step 1: Understand the Bug + +- Read the bug description: $ARGUMENTS +- Investigate the codebase to understand the relevant code +- Identify the root cause (or narrow down candidates) +- Summarize your understanding of the bug to the user before proceeding + +## Step 2: Write a Failing Test + +- Write a test that **directly exercises the buggy behavior** +- The test must assert the **correct/expected** behavior — so it FAILS against the current broken code +- The test name should clearly describe the bug (e.g., `test_orange_color_not_applied_to_head`) +- Use the project's existing test framework and conventions + +## Step 3: Run the Test — Confirm It FAILS + +- Run ONLY the new test (not the full suite) +- **Verify the test FAILS** and that it fails **because of the bug**, not for some other reason (typo, import error, wrong selector, etc.) +- If the test passes: your test does not capture the bug. Go back to Step 2 +- If the test fails for the wrong reason: fix the test, not the code. Go back to Step 2 +- **Repeat until the test fails specifically because of the bug** + +## Step 4: Show Failure to User + +- Show the user the test code and the failure output +- Explicitly ask: "This test fails because of the bug. Can you confirm this captures the issue before I fix it?" +- **STOP and WAIT for user acknowledgment before proceeding** +- Do NOT continue to Step 5 until the user confirms + +## Step 5: Fix the Bug + +- Make the **minimum change** needed to fix the bug +- Do not refactor, clean up, or "improve" surrounding code +- Do not change the test + +## Step 6: Run the Test — Confirm It PASSES + +- Run the new test again +- **Verify it PASSES** +- If it fails: go back to Step 5 and adjust the fix +- **Repeat until the test passes** + +## Step 7: Run the Full Test Suite + +- Run ALL tests to make sure nothing else broke +- If other tests fail: fix the regression without breaking the new test +- Report the final result to the user + +## Rules + +- NEVER fix the bug before the failing test is written and confirmed +- NEVER skip asking the user to acknowledge the test failure +- NEVER modify the test to make it pass — modify the source code +- If you cannot write a test for the bug, explain why and ask the user how to proceed +- Keep the fix minimal — one bug, one fix, one test diff --git a/.claude/skills/spec-check/SKILL.md b/.claude/skills/spec-check/SKILL.md index 683cfb7..1345a83 100644 --- a/.claude/skills/spec-check/SKILL.md +++ b/.claude/skills/spec-check/SKILL.md @@ -3,7 +3,7 @@ name: spec-check description: Audit spec/plan documents against the codebase. Ensures every spec section has implementing code, tests, and matching logic. Use when the user says "check specs", "spec audit", or "verify specs". argument-hint: "[optional spec ID or filename filter]" --- - + # spec-check diff --git a/.claude/skills/submit-pr/SKILL.md b/.claude/skills/submit-pr/SKILL.md index 72526cc..1401bb6 100644 --- a/.claude/skills/submit-pr/SKILL.md +++ b/.claude/skills/submit-pr/SKILL.md @@ -3,7 +3,7 @@ name: submit-pr description: Creates a pull request with a well-structured description after verifying CI passes. Use when the user asks to submit, create, or open a pull request. disable-model-invocation: true --- - + # Submit PR @@ -11,6 +11,8 @@ Create a pull request for the current branch with a well-structured description. ## Steps +*NOTE: if you already ran make ci in this session and it passed, you can skip step 1.* + 1. Run `make ci` — must pass completely before creating PR 2. **Generate the diff against main.** Run `git diff main...HEAD > /tmp/pr-diff.txt` to capture the full diff between the current branch and the head of main. This is the ONLY source of truth for what the PR contains. **Warning:** the diff can be very large. If the diff file exceeds context limits, process it in chunks (e.g., read sections with `head`/`tail` or split by file) rather than trying to load it all at once. 3. **Derive the PR title and description SOLELY from the diff.** Read the diff output and summarize what changed. Ignore commit messages, branch names, and any other metadata — only the actual code/content diff matters. diff --git a/.claude/skills/upgrade-packages/SKILL.md b/.claude/skills/upgrade-packages/SKILL.md index b2eb963..6a7b44a 100644 --- a/.claude/skills/upgrade-packages/SKILL.md +++ b/.claude/skills/upgrade-packages/SKILL.md @@ -3,7 +3,7 @@ name: upgrade-packages description: Upgrade all dependencies/packages to their latest versions for C#/.NET and Python. Use when the user says "upgrade packages", "update dependencies", "bump versions", "update packages", or "upgrade deps". argument-hint: "[--check-only] [--major] [package-name]" --- - + # Upgrade Packages @@ -24,12 +24,15 @@ Inspect the repo for these manifest files: | `*.csproj` / `*.sln` | C# / .NET | NuGet (dotnet) | | `Directory.Build.props` | C# / .NET | NuGet (dotnet) — central version pinning | | `requirements.txt` | Python (ICD10/embedding-service, ICD10/scripts/CreateDb) | pip | +| `package.json` | TypeScript (Dashboard/dashboard-ts) | pnpm (check lockfile) | -This repo uses both. Process .NET first, then Python. +This repo uses all three. Process .NET first, then Python, then TypeScript. + +**If you cannot detect any manifest file, stop and tell the user.** ## Step 2 — List outdated packages -Run the appropriate command BEFORE upgrading anything. Show the user what will change. +Run the appropriate command to list what's outdated BEFORE upgrading anything. Show the user what will change. ### C# / .NET (NuGet) ```bash @@ -55,6 +58,13 @@ python -m venv /tmp/scripts-venv **Read the docs:** https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-U +### TypeScript (pnpm) +```bash +cd Dashboard/dashboard-ts && pnpm outdated +``` + +**Read the docs:** https://pnpm.io/cli/update + If `--check-only` was passed, **stop here** and report the outdated list. ## Step 3 — Read the official upgrade docs @@ -94,6 +104,13 @@ For `requirements.txt`: /tmp/scripts-venv/bin/pip freeze > ICD10/scripts/CreateDb/requirements.txt ``` +### TypeScript (pnpm) +```bash +cd Dashboard/dashboard-ts && pnpm update +# --major flag: +cd Dashboard/dashboard-ts && pnpm update --latest +``` + ## Step 5 — Verify the upgrade After upgrading, run the project's build and test suite to confirm nothing broke: @@ -126,7 +143,7 @@ Provide a summary: - **Always run tests after upgrading** to catch breakage immediately - **Never remove packages** unless they were explicitly deprecated and replaced - **Never downgrade packages** unless rolling back a broken upgrade -- **Never modify lockfiles manually** — let the package manager regenerate them +- **Never modify lockfiles manually** (pnpm-lock.yaml, etc.) — let the package manager regenerate them - **Commit nothing** — leave changes in the working tree for the user to review ## Success criteria diff --git a/.claude/skills/website-audit/SKILL.md b/.claude/skills/website-audit/SKILL.md index 5948cbf..d849a9d 100644 --- a/.claude/skills/website-audit/SKILL.md +++ b/.claude/skills/website-audit/SKILL.md @@ -2,7 +2,7 @@ name: website-audit description: Audits a website for SEO, AI search performance, structured data, mobile usability, broken links, and social media cards. Fixes issues found. Use when the user mentions "audit website", "SEO", "fix search ranking", "AI search", "structured data", "social media cards", or "website performance". --- - + # Website Audit diff --git a/.clinerules/00-read-instructions.md b/.clinerules/00-read-instructions.md index f0ce473..12dd518 100644 --- a/.clinerules/00-read-instructions.md +++ b/.clinerules/00-read-instructions.md @@ -1,10 +1,3 @@ - - -# Single Source of Truth + @CLAUDE.md - -Read the file above in full before writing any code. All project rules, -coding standards, hard constraints, build commands, and architecture -notes live there. Do not add rules to this file -- keep everything in -`CLAUDE.md` so there is exactly one set of instructions to maintain. diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 3d55487..2ffc3cb 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -29,13 +29,6 @@ "Lql" ], "rollForward": false - }, - "h5-compiler": { - "version": "26.3.64893", - "commands": [ - "h5" - ], - "rollForward": false } } -} \ No newline at end of file +} diff --git a/.cursorrules b/.cursorrules index addcc98..12dd518 100644 --- a/.cursorrules +++ b/.cursorrules @@ -1,5 +1,3 @@ -@CLAUDE.md + -All project rules, coding standards, hard constraints, build commands, -and architecture notes live in `CLAUDE.md` at the repository root. -Read that file in full before writing any code. Do not add rules here. +@CLAUDE.md diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b29da70 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +# agent-pmo:2efd847 + +**/bin/ +**/obj/ +**/node_modules/ +**/dist/ +**/.vite/ +**/coverage/ +**/playwright-report/ +**/test-results/ +TestResults/ +.git/ +.too_many_cooks/ +.DS_Store diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 7595149..d3312a5 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,4 +1,4 @@ - + @CLAUDE.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 135e75c..6316006 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,4 @@ - + ## TLDR diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37e8a80..12e02b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# agent-pmo:29b9dcf +# agent-pmo:2efd847 name: CI on: @@ -15,6 +15,7 @@ jobs: ci: name: CI runs-on: ubuntu-latest + # TIMEOUT EXCEPTION: Postgres startup, DB migration, embedding service model load, and 5 test projects with coverage require ~20 min. timeout-minutes: 30 env: DB_PASSWORD: changeme @@ -27,14 +28,18 @@ jobs: with: dotnet-version: '10.0.x' + - uses: actions/setup-node@v4 + with: + node-version: '24' + + - name: Enable pnpm + run: | + corepack enable + corepack prepare pnpm@10.33.0 --activate + - run: dotnet restore - run: dotnet tool restore - # csharpier needs no DB -- run it first so format issues fail - # before paying the cost of docker, codegen, or Playwright. - - name: Format check - run: make fmt-check - - name: Start Postgres (pgvector) via docker compose run: make db-up @@ -44,7 +49,10 @@ jobs: # `make lint` runs the full Release build, which triggers # `dotnet DataProvider postgres` codegen against the live database, # so it has to come after db-up + db-migrate. Still kept ahead of - # the embedding service / Playwright steps to fail fast on warnings. + # the embedding service steps to fail fast on warnings. + - name: Format check + run: make fmt CHECK=1 + - name: Lint run: make lint @@ -64,21 +72,9 @@ jobs: docker compose logs exit 1 - - name: Install Playwright browsers - run: | - dotnet build Dashboard/Dashboard.Integration.Tests/Dashboard.Integration.Tests.csproj --configuration Release - dotnet tool install --global Microsoft.Playwright.CLI || true - export PATH="$PATH:$HOME/.dotnet/tools" - playwright install --with-deps chromium - - name: Test run: make test - # Per-project thresholds live in coverage-thresholds.json (default 80%). - # Bump entries by floor(measured) - 1 whenever real coverage improves. - - name: Coverage check - run: make coverage-check - - name: Upload coverage uses: actions/upload-artifact@v4 if: always() diff --git a/.gitignore b/.gitignore index b1a18a9..08bf8b7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# agent-pmo:29b9dcf +# agent-pmo:2efd847 # ============================================================================= # UNIVERSAL @@ -15,7 +15,9 @@ ehthumbs.db Desktop.ini # IDE / Editor -.vscode/ +.vscode/* +!.vscode/settings.json +!.vscode/extensions.json .idea/ *.swp *.swo @@ -98,4 +100,15 @@ project.lock.json *.nupkg -*.generated.sql \ No newline at end of file +*.generated.sql + +/*.png + +# Dashboard TypeScript rewrite (Dashboard/dashboard-ts/) +Dashboard/dashboard-ts/node_modules/ +Dashboard/dashboard-ts/dist/ +Dashboard/dashboard-ts/.vite/ +Dashboard/dashboard-ts/coverage/ +Dashboard/dashboard-ts/playwright-report/ +Dashboard/dashboard-ts/test-results/ +.ghissues/ diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..1dace60 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + "_agent_pmo": "2efd847", + "recommendations": [ + "nimblesite.commandtree", + "nimblesite.too-many-cooks", + "nimblesite.napper" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..d91bbeb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "_agent_pmo": "2efd847", + "workbench.colorCustomizations": { + "titleBar.activeBackground": "#003fab", + "titleBar.activeForeground": "#ffffff", + "titleBar.inactiveBackground": "#002d7a", + "titleBar.inactiveForeground": "#ffffffcc" + } +} diff --git a/.windsurfrules b/.windsurfrules index addcc98..12dd518 100644 --- a/.windsurfrules +++ b/.windsurfrules @@ -1,5 +1,3 @@ -@CLAUDE.md + -All project rules, coding standards, hard constraints, build commands, -and architecture notes live in `CLAUDE.md` at the repository root. -Read that file in full before writing any code. Do not add rules here. +@CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md index f0ce473..19d5c5a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,4 +1,4 @@ - + # Single Source of Truth diff --git a/CLAUDE.md b/CLAUDE.md index cc4d404..1036b7d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,176 +1,126 @@ -# HealthcareSamples -- Agent Instructions +# Nimblesite Clinical Coding Platform -- Agent Instructions -⚠️ CRITICAL: **Reduce token usage.** Check file size before loading. Write less. Delete fluff and dead code. Alert user when context is loaded with pointless files. ⚠️ +⚠️ CRITICAL: **Reduce token usage.** Check file size before loading. Write less. Delete fluff and dead code. ⚠️ -⚠️ MIGRATING ANY DB WITH ANYTHING OTHER THAN Data Provider Migrations is COMPLETELY ILLEGAL ⚠️ +⚠️ DO NOT ASK THE USER QUESTIONS. USE YOUR JUDGMENT ⚠️ + +⚠️ do not kill vscode processes ever!!! ⚠️ > Read this entire file before writing any code. > These rules are NON-NEGOTIABLE. Violations will be rejected in review. - + ## Project Overview -HealthcareSamples is a comprehensive demonstration of the DataProvider .NET toolkit. It contains three FHIR-compliant microservices (Clinical API, Scheduling API, ICD-10 API) with bidirectional sync workers, semantic search via pgvector embeddings, a React dashboard (H5 transpiler), and Docker configuration. All medical data follows the FHIR R5 specification. +Agentic clinical coding platform built on Nimblesite DataProvider. Four FHIR R5-compliant microservices (Clinical, Scheduling, ICD-10, Gatekeeper) with bidirectional sync, semantic search via pgvector embeddings, passkey auth, and a TypeScript React dashboard. The ICD-10 RAG service is the foundation for AI-assisted clinical coding from patient encounters and notes. -**Primary language(s):** C# (.NET 10.0) -**Build command:** `make ci` -**Test command:** `make test` -**Lint command:** `make lint` +**Primary language:** C# (.NET 10.0) +**Build:** `make ci` | **Test:** `make test` | **Lint:** `make lint` -This repo depends on NuGet packages from MelbourneDeveloper/DataProvider with the `MelbourneDev.` prefix (e.g., MelbourneDev.DataProvider, MelbourneDev.Migration, MelbourneDev.Sync.Postgres, MelbourneDev.Lql.Postgres, MelbourneDev.Selecta). +NuGet packages use the `Nimblesite.` prefix (e.g., Nimblesite.DataProvider.Core, Nimblesite.Sync.Postgres, Nimblesite.Lql.Postgres). -## Too Many Cooks (Multi-Agent Coordination) +## Hard Rules -If the TMC server is available: -1. Register immediately: descriptive name, intent, files you will touch -2. Before editing any file: lock it via TMC -3. Broadcast your plan before starting work -4. Check messages every few minutes -5. Release locks immediately when done -6. Never edit a locked file -- wait or find another approach - -## Hard Rules -- Universal (no exceptions) - -- **DO NOT use git commands.** No `git add`, `git commit`, `git push`, `git checkout`, `git merge`, `git rebase`, or any other git command. CI and GitHub Actions handle git. -- **ZERO DUPLICATION.** Before writing any code, search the codebase for existing implementations. Move code, don't copy it. -- **NO THROWING EXCEPTIONS.** Return `Result`, `Option`, or the language equivalent. Exceptions are only for unrecoverable bugs (panic-level). -- **NO REGEX on structured data.** Never parse JSON, YAML, TOML, code, or any structured format with regex. Use proper parsers, AST tools, or library functions. -- **NO PLACEHOLDERS.** If something isn't implemented, leave a loud compilation error with TODO. Never write code that silently does nothing. -- **Functions < 20 lines.** Refactor aggressively. If a function exceeds 20 lines, split it. -- **Files < 500 lines.** If a file exceeds 500 lines, extract modules. +- **DO NOT use git commands.** CI and GitHub Actions handle git. +- **TOTALL CSS MUST < 1.5K LOC** - CSS is cancer and you are the cure for it +- **MIGRATING ANY DB WITH ANYTHING OTHER THAN DataProvider Migrations is COMPLETELY ILLEGAL** +- **ZERO DUPLICATION.** Search the codebase before writing. Move code, don't copy it. +- **NO THROWING EXCEPTIONS.** Return `Result` or `Option`. Exceptions are only for unrecoverable bugs. +- **NO REGEX on structured data.** Use proper parsers. +- **NO PLACEHOLDERS.** Unimplemented code must leave a compilation error with TODO. +- **Functions < 20 lines. Files < 500 lines.** Refactor aggressively. - **100% test coverage is the goal.** Never delete or skip tests. Never remove assertions. -- **Prefer E2E/integration tests.** Unit tests are acceptable only for isolating problems. -- **Heavy logging everywhere.** See Logging Standards section below. +- **Prefer E2E/integration tests.** Unit tests only for isolating problems. - **No suppressing linter warnings.** Fix the code, not the linter. -- **Pure functions** over statements -- **Every spec section MUST have a unique, hierarchical, non-numeric ID.** Format: `[GROUP-TOPIC]` or `[GROUP-TOPIC-DETAIL]` (e.g., `[AUTH-TOKEN-VERIFY]`, `[CI-TIMEOUT]`). The first word is the **group** -- all sections in the same group MUST be adjacent in the spec's TOC. NEVER use sequential numbers like `[SPEC-001]`. All code, tests, and design docs that implement or relate to a spec section MUST reference its ID in a comment (e.g., `// Implements [AUTH-TOKEN-VERIFY]`). This enables cross-referencing across specs, code, and tests -- grep `[AUTH-` to find every auth spec, its code, and its tests. - -## Logging Standards - -- **Use a structured logging library.** Never use `Console.WriteLine` or `Debug.WriteLine` for diagnostics. Use `Microsoft.Extensions.Logging`. -- **Log at entry/exit of all significant operations.** Use appropriate levels: `error`, `warn`, `info`, `debug`, `trace`. -- **Logging must be throughout the app.** Every service, handler, and non-trivial operation should log. Silent failures are forbidden. -- **SaaS / server apps:** Log to the database for persistence and queryability. Log calls that write to the database or file MUST be async or run on a background thread -- never block the request path with I/O logging. -- **NEVER log personal data.** No names, emails, addresses, phone numbers, IP addresses (unless required for security audit with explicit consent), or any PII. -- **NEVER log secrets.** No API keys, tokens, passwords, connection strings, or credentials. If you need to confirm a key is loaded, log a truncated hash or just `"API key: present"`. -- **Structured fields over string interpolation.** Log `{ "userId": 42, "action": "checkout" }` not `"User 42 performed checkout"`. This enables filtering and aggregation. - -### Logging Libraries - -| Language | Library | Notes | -|----------|---------|-------| -| C# | `Microsoft.Extensions.Logging` | | +- **Pure functions** over statements. +- **Spec section IDs** must be hierarchical and non-numeric: `[GROUP-TOPIC-DETAIL]` (e.g., `[AUTH-TOKEN-VERIFY]`). Code and tests reference these via comments. -## Hard Rules -- C# +## C# Rules -- No throwing exceptions -- return `Result` or `Option` -- No `!` null-forgiving operator -- No `as` casts -- use pattern matching -- No `dynamic` +- No `!` null-forgiving, no `as` casts (use pattern matching), no `dynamic` - Nullable reference types enabled everywhere -- Records for immutable data -- Install common packages in the build props -- Avoid classes. Use static methods as pure functions -- All tables must have a SINGLE primary key -- Primary keys MUST be UUIDs -- No in-memory dbs -- real dbs all the way -- No raw SQL inserts/updates -- use generated extensions -- Use DataProvider Migrations to spin up DBs -- SQL for creating db schema = ILLEGAL -- Use `ImmutableList`, `FrozenSet`, or `ImmutableArray` instead of `List` -- All public members require XMLDOC (except in test projects) -- One type per file (except small records) -- No commented-out code -- delete it +- Records for immutable data. Avoid classes. Use static methods as pure functions. +- `ImmutableList`, `FrozenSet`, or `ImmutableArray` instead of `List` +- All tables: single UUID primary key +- No in-memory DBs. No raw SQL inserts/updates -- use generated extensions. +- DB schemas via DataProvider Migrations only. SQL for schema creation = ILLEGAL. +- All public members require XMLDOC (except test projects) +- One type per file (except small records). No commented-out code. - Medical data must follow [FHIR R5 spec](https://build.fhir.org/resourcelist.html) +- Common packages go in Directory.Build.props -### Mandatory Packages (C# Only) - -Always include these 3 in the Directory.Build.props: -```xml - - - - all - runtime; build; native; contentfiles; analyzers - - - - - - - - all - runtime; build; native; contentfiles; analyzers - - -``` +## Multi-Agent Coordination (TMC) + +If the TMC server is available: +1. Register immediately with descriptive name, intent, and files you will touch +2. Lock files via TMC before editing +3. Broadcast your plan before starting work +4. Release locks immediately when done +5. Never edit a locked file -## Testing Rules +## Logging -- **Never delete a failing test.** Fix the code or fix the test expectation -- never delete. -- **Never skip a test** without a ticket number and expiry date in the skip reason. -- **Assertions must be specific.** `assert True` without a condition is illegal. -- **No try/catch in tests** that swallows the exception and asserts success. -- **Tests must be deterministic.** No sleep(), no relying on timing, no random state. -- **E2E tests: black-box only.** Only interact via public APIs, UI commands, or CLI. Never call internal methods or manipulate internal state from a test. -- **Never use Fluent Assertions.** +- `Microsoft.Extensions.Logging` only. Never `Console.WriteLine`. +- Log entry/exit of significant operations. Silent failures are forbidden. +- Structured fields over string interpolation. +- Never log PII or secrets. -## Build Commands (exact -- cross-platform via GNU Make) +## Testing -All `make` targets work on Linux, macOS, and Windows. The Makefile uses OS detection to select portable commands. On Windows, install GNU Make via `choco install make` or use the one bundled with Git for Windows. +- Never delete a failing test. Fix the code or the expectation. +- Never skip a test without a ticket number and expiry date. +- Assertions must be specific. No try/catch that swallows exceptions. +- Tests must be deterministic. No sleep(), no timing, no random state. +- E2E tests: black-box only via public APIs. Never use Fluent Assertions. + +## Make Targets ```bash +make start-docker # spin up the full stack via docker compose +make start-local # run APIs locally against docker Postgres +make ci # lint + test + build (test includes coverage enforcement) make build # compile everything -make test # run tests with coverage -make lint # run all linters -make fmt # format all code -make fmt-check # check formatting (CI uses this) +make test # run tests with coverage (fails if below threshold) +make lint # run all linters/analyzers (read-only, no formatting) +make fmt # format all code (CHECK=1 for read-only verify) make clean # remove build artifacts -make check # lint + test (pre-commit) -make ci # lint + test + build (full CI simulation) -make coverage # generate and open coverage report -make coverage-check # assert coverage thresholds -make setup # post-create dev environment setup +make setup # restore tools + packages (first time) +make db-up # start Postgres container +make db-down # stop Postgres container +make db-migrate # apply YAML schemas to all databases +make db-reset # destroy DB volume and recreate ``` ## Repo Structure ``` -HealthcareSamples/ -+-- .github/workflows/ # CI/CD pipelines -+-- .claude/skills/ # Claude Code skills -+-- Clinical/ -| +-- Clinical.Api/ # REST API (PostgreSQL) - FHIR Patient, Encounter, Condition, MedicationRequest -| +-- Clinical.Api.Tests/ # E2E tests -| +-- Clinical.Sync/ # Pulls Practitioner data from Scheduling -+-- Scheduling/ -| +-- Scheduling.Api/ # REST API (PostgreSQL) - FHIR Practitioner, Appointment, Schedule, Slot -| +-- Scheduling.Api.Tests/ # E2E tests -| +-- Scheduling.Sync/ # Pulls Patient data from Clinical -+-- ICD10/ -| +-- ICD10.Api/ # REST API (PostgreSQL + pgvector) - ICD-10 codes, ACHI codes, embeddings -| +-- ICD10.Api.Tests/ # E2E tests -| +-- ICD10.Cli/ # Interactive TUI client -| +-- ICD10.Cli.Tests/ # CLI E2E tests -| +-- embedding-service/ # Python FastAPI embedding service -| +-- scripts/ # DB import + embedding generation -+-- Dashboard/ -| +-- Dashboard.Web/ # React UI (H5 transpiler C#->JavaScript) -| +-- Dashboard.Integration.Tests/ # Integration tests -+-- Shared/ -| +-- Authorization/ # Shared authorization library -+-- docker/ # Docker compose and configuration -+-- scripts/ # Startup and cleanup scripts -+-- docs/ -| +-- specs/ # Specification documents -| +-- plans/ # Implementation plans with TODO checklists -+-- .gitignore -+-- CLAUDE.md # Agent instructions (this file) -+-- AGENTS.md # Pointer to CLAUDE.md -+-- Makefile -+-- HealthcareSamples.sln -+-- Directory.Build.props -+-- coverlet.runsettings +Clinical/ + Clinical.Api/ # FHIR Patient, Encounter, Condition, MedicationRequest + Clinical.Api.Tests/ + Clinical.Sync/ # Pulls Practitioner data from Scheduling +Scheduling/ + Scheduling.Api/ # FHIR Practitioner, Appointment, Schedule, Slot + Scheduling.Api.Tests/ + Scheduling.Sync/ # Pulls Patient data from Clinical +ICD10/ + ICD10.Api/ # ICD-10/ACHI codes, pgvector embeddings, RAG search + ICD10.Api.Tests/ + ICD10.Cli/ # Interactive TUI client + ICD10.Cli.Tests/ + embedding-service/ # Python FastAPI embedding service + scripts/ # DB import + embedding generation +Gatekeeper/ + Gatekeeper.Api/ # Passkey auth, RBAC authorization + Gatekeeper.Api.Tests/ +Dashboard/ + dashboard-ts/ # TypeScript + React + Vite dashboard +Shared/ + Authorization/ # Shared authorization library +docker/ # Docker compose and configuration +docs/ + specs/ # Specification documents + plans/ # Implementation plans ``` ## Data Ownership @@ -179,9 +129,4 @@ HealthcareSamples/ |--------|------|-------------------| | Clinical | fhir_Patient, fhir_Encounter, fhir_Condition, fhir_MedicationRequest | sync_Provider | | Scheduling | fhir_Practitioner, fhir_Appointment, fhir_Schedule, fhir_Slot | sync_ScheduledPatient | -| ICD10 | icd10_chapter, icd10_block, icd10_category, icd10_code, achi_block, achi_code | N/A (read-only reference) | - -## Claude Code Skills - -- [Claude Code Skills Overview](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) -- [The Complete Guide to Building Skills for Claude (PDF)](https://resources.anthropic.com/hubfs/The-Complete-Guide-to-Building-Skill-for-Claude.pdf) +| ICD10 | icd10_chapter, icd10_block, icd10_category, icd10_code, achi_block, achi_code | N/A (read-only) | diff --git a/Clinical/Clinical.Api.Tests/AuthorizationTests.cs b/Clinical/Clinical.Api.Tests/AuthorizationTests.cs index 5e46bb9..9a2fa9b 100644 --- a/Clinical/Clinical.Api.Tests/AuthorizationTests.cs +++ b/Clinical/Clinical.Api.Tests/AuthorizationTests.cs @@ -1,6 +1,7 @@ using System.Net; using System.Net.Http.Headers; using System.Net.Http.Json; +using ClinicalCoding.TestSupport; namespace Clinical.Api.Tests; @@ -21,9 +22,7 @@ public sealed class AuthorizationTests : IClassFixture [Fact] public async Task GetPatients_WithoutToken_ReturnsUnauthorized() { - var response = await _client.GetAsync("/fhir/Patient/"); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client.GetAsync("/fhir/Patient/").ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] @@ -32,9 +31,7 @@ public async Task GetPatients_WithInvalidToken_ReturnsUnauthorized() using var request = new HttpRequestMessage(HttpMethod.Get, "/fhir/Patient/"); request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "invalid-token"); - var response = await _client.SendAsync(request); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client.SendAsync(request).ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] @@ -46,9 +43,7 @@ public async Task GetPatients_WithExpiredToken_ReturnsUnauthorized() TestTokenHelper.GenerateExpiredToken() ); - var response = await _client.SendAsync(request); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client.SendAsync(request).ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] @@ -63,10 +58,8 @@ public async Task GetPatients_WithValidToken_SucceedsInDevMode() TestTokenHelper.GenerateNoRoleToken() ); - var response = await _client.SendAsync(request); - // In dev mode, valid tokens succeed without permission checks - Assert.Equal(HttpStatusCode.OK, response.StatusCode); + await _client.SendAsync(request).ShouldHaveStatusAsync(HttpStatusCode.OK); } [Fact] @@ -80,89 +73,81 @@ public async Task CreatePatient_WithoutToken_ReturnsUnauthorized() Gender = "male", }; - var response = await _client.PostAsJsonAsync("/fhir/Patient/", patient); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client + .PostAsJsonAsync("/fhir/Patient/", patient) + .ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] public async Task GetEncounters_WithoutToken_ReturnsUnauthorized() { - var response = await _client.GetAsync("/fhir/Patient/test-patient/Encounter/"); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client + .GetAsync("/fhir/Patient/test-patient/Encounter/") + .ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] public async Task GetConditions_WithoutToken_ReturnsUnauthorized() { - var response = await _client.GetAsync("/fhir/Patient/test-patient/Condition/"); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client + .GetAsync("/fhir/Patient/test-patient/Condition/") + .ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] public async Task GetMedicationRequests_WithoutToken_ReturnsUnauthorized() { - var response = await _client.GetAsync("/fhir/Patient/test-patient/MedicationRequest/"); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client + .GetAsync("/fhir/Patient/test-patient/MedicationRequest/") + .ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] public async Task SyncChanges_WithoutToken_ReturnsUnauthorized() { - var response = await _client.GetAsync("/sync/changes"); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client.GetAsync("/sync/changes").ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] public async Task SyncOrigin_WithoutToken_ReturnsUnauthorized() { - var response = await _client.GetAsync("/sync/origin"); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client.GetAsync("/sync/origin").ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] public async Task SyncStatus_WithoutToken_ReturnsUnauthorized() { - var response = await _client.GetAsync("/sync/status"); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client.GetAsync("/sync/status").ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] public async Task SyncRecords_WithoutToken_ReturnsUnauthorized() { - var response = await _client.GetAsync("/sync/records"); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client.GetAsync("/sync/records").ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] public async Task SyncRetry_WithoutToken_ReturnsUnauthorized() { - var response = await _client.PostAsync("/sync/records/test-id/retry", null); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client + .PostAsync("/sync/records/test-id/retry", null) + .ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] public async Task PatientSearch_WithoutToken_ReturnsUnauthorized() { - var response = await _client.GetAsync("/fhir/Patient/_search?q=test"); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client + .GetAsync("/fhir/Patient/_search?q=test") + .ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] public async Task GetPatientById_WithoutToken_ReturnsUnauthorized() { - var response = await _client.GetAsync("/fhir/Patient/test-patient-id"); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client + .GetAsync("/fhir/Patient/test-patient-id") + .ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] @@ -176,9 +161,9 @@ public async Task UpdatePatient_WithoutToken_ReturnsUnauthorized() Gender = "male", }; - var response = await _client.PutAsJsonAsync("/fhir/Patient/test-id", patient); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client + .PutAsJsonAsync("/fhir/Patient/test-id", patient) + .ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] @@ -196,12 +181,9 @@ public async Task CreateEncounter_WithoutToken_ReturnsUnauthorized() Notes = "Test", }; - var response = await _client.PostAsJsonAsync( - "/fhir/Patient/test-patient/Encounter/", - encounter - ); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client + .PostAsJsonAsync("/fhir/Patient/test-patient/Encounter/", encounter) + .ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] @@ -218,12 +200,9 @@ public async Task CreateCondition_WithoutToken_ReturnsUnauthorized() CodeDisplay = "Test Condition", }; - var response = await _client.PostAsJsonAsync( - "/fhir/Patient/test-patient/Condition/", - condition - ); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client + .PostAsJsonAsync("/fhir/Patient/test-patient/Condition/", condition) + .ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } [Fact] @@ -243,11 +222,8 @@ public async Task CreateMedicationRequest_WithoutToken_ReturnsUnauthorized() Refills = 2, }; - var response = await _client.PostAsJsonAsync( - "/fhir/Patient/test-patient/MedicationRequest/", - medication - ); - - Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); + await _client + .PostAsJsonAsync("/fhir/Patient/test-patient/MedicationRequest/", medication) + .ShouldHaveStatusAsync(HttpStatusCode.Unauthorized); } } diff --git a/Clinical/Clinical.Api.Tests/Clinical.Api.Tests.csproj b/Clinical/Clinical.Api.Tests/Clinical.Api.Tests.csproj index b9fe394..5649ed7 100644 --- a/Clinical/Clinical.Api.Tests/Clinical.Api.Tests.csproj +++ b/Clinical/Clinical.Api.Tests/Clinical.Api.Tests.csproj @@ -25,4 +25,11 @@ + + + + diff --git a/Clinical/Clinical.Api.Tests/PatientEndpointTests.cs b/Clinical/Clinical.Api.Tests/PatientEndpointTests.cs index 7356510..7e960d3 100644 --- a/Clinical/Clinical.Api.Tests/PatientEndpointTests.cs +++ b/Clinical/Clinical.Api.Tests/PatientEndpointTests.cs @@ -2,6 +2,7 @@ using System.Net.Http.Headers; using System.Net.Http.Json; using System.Text.Json; +using ClinicalCoding.TestSupport; namespace Clinical.Api.Tests; @@ -58,14 +59,15 @@ public async Task CreatePatient_ReturnsCreated_WithValidData() Country = "USA", }; - var response = await _client.PostAsJsonAsync("/fhir/Patient/", request); + var response = await _client + .PostAsJsonAsync("/fhir/Patient/", request) + .WithStatusAsync(HttpStatusCode.Created); var content = await response.Content.ReadAsStringAsync(); Assert.True( response.IsSuccessStatusCode, $"Expected success. Got {response.StatusCode}: {content}" ); - Assert.Equal(HttpStatusCode.Created, response.StatusCode); var json = JsonSerializer.Deserialize(content); Assert.True( @@ -100,9 +102,9 @@ public async Task GetPatientById_ReturnsPatient_WhenExists() var created = await createResponse.Content.ReadFromJsonAsync(); var patientId = created.GetProperty("Id").GetString(); - var response = await _client.GetAsync($"/fhir/Patient/{patientId}"); - - Assert.Equal(HttpStatusCode.OK, response.StatusCode); + var response = await _client + .GetAsync($"/fhir/Patient/{patientId}") + .WithStatusAsync(HttpStatusCode.OK); var patient = await response.Content.ReadFromJsonAsync(); Assert.Equal("Jane", patient.GetProperty("GivenName").GetString()); Assert.Equal("Smith", patient.GetProperty("FamilyName").GetString()); @@ -111,9 +113,9 @@ public async Task GetPatientById_ReturnsPatient_WhenExists() [Fact] public async Task GetPatientById_ReturnsNotFound_WhenNotExists() { - var response = await _client.GetAsync("/fhir/Patient/nonexistent-id-12345"); - - Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); + await _client + .GetAsync("/fhir/Patient/nonexistent-id-12345") + .ShouldHaveStatusAsync(HttpStatusCode.NotFound); } [Fact] @@ -129,9 +131,9 @@ public async Task SearchPatients_FindsPatientsByName() await _client.PostAsJsonAsync("/fhir/Patient/", request); - var response = await _client.GetAsync("/fhir/Patient/_search?q=UniqueLastName"); - - Assert.Equal(HttpStatusCode.OK, response.StatusCode); + var response = await _client + .GetAsync("/fhir/Patient/_search?q=UniqueLastName") + .WithStatusAsync(HttpStatusCode.OK); var patients = await response.Content.ReadFromJsonAsync(); Assert.NotNull(patients); Assert.Contains(patients, p => p.GetProperty("FamilyName").GetString() == "UniqueLastName"); @@ -159,8 +161,9 @@ public async Task GetPatients_FiltersByActiveStatus() await _client.PostAsJsonAsync("/fhir/Patient/", activePatient); await _client.PostAsJsonAsync("/fhir/Patient/", inactivePatient); - var activeResponse = await _client.GetAsync("/fhir/Patient/?active=true"); - Assert.Equal(HttpStatusCode.OK, activeResponse.StatusCode); + var activeResponse = await _client + .GetAsync("/fhir/Patient/?active=true") + .WithStatusAsync(HttpStatusCode.OK); var activePatients = await activeResponse.Content.ReadFromJsonAsync(); Assert.NotNull(activePatients); Assert.All(activePatients, p => Assert.Equal(1L, p.GetProperty("Active").GetInt64())); @@ -179,9 +182,9 @@ public async Task GetPatients_FiltersByFamilyName() await _client.PostAsJsonAsync("/fhir/Patient/", patient); - var response = await _client.GetAsync("/fhir/Patient/?familyName=FilterFamilyName"); - - Assert.Equal(HttpStatusCode.OK, response.StatusCode); + var response = await _client + .GetAsync("/fhir/Patient/?familyName=FilterFamilyName") + .WithStatusAsync(HttpStatusCode.OK); var patients = await response.Content.ReadFromJsonAsync(); Assert.NotNull(patients); Assert.Contains( @@ -203,9 +206,9 @@ public async Task GetPatients_FiltersByGivenName() await _client.PostAsJsonAsync("/fhir/Patient/", patient); - var response = await _client.GetAsync("/fhir/Patient/?givenName=UniqueGivenName"); - - Assert.Equal(HttpStatusCode.OK, response.StatusCode); + var response = await _client + .GetAsync("/fhir/Patient/?givenName=UniqueGivenName") + .WithStatusAsync(HttpStatusCode.OK); var patients = await response.Content.ReadFromJsonAsync(); Assert.NotNull(patients); Assert.Contains(patients, p => p.GetProperty("GivenName").GetString() == "UniqueGivenName"); @@ -224,9 +227,9 @@ public async Task GetPatients_FiltersByGender() await _client.PostAsJsonAsync("/fhir/Patient/", malePatient); - var response = await _client.GetAsync("/fhir/Patient/?gender=male"); - - Assert.Equal(HttpStatusCode.OK, response.StatusCode); + var response = await _client + .GetAsync("/fhir/Patient/?gender=male") + .WithStatusAsync(HttpStatusCode.OK); var patients = await response.Content.ReadFromJsonAsync(); Assert.NotNull(patients); Assert.All(patients, p => Assert.Equal("male", p.GetProperty("Gender").GetString())); diff --git a/Dashboard/Dashboard.Integration.Tests/AppointmentE2ETests.cs b/Dashboard/Dashboard.Integration.Tests/AppointmentE2ETests.cs deleted file mode 100644 index 1432be3..0000000 --- a/Dashboard/Dashboard.Integration.Tests/AppointmentE2ETests.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System.Text.RegularExpressions; -using Microsoft.Playwright; - -namespace Dashboard.Integration.Tests; - -/// -/// E2E tests for appointment-related functionality. -/// -[Collection("E2E Tests")] -[Trait("Category", "E2E")] -public sealed class AppointmentE2ETests -{ - private readonly E2EFixture _fixture; - - /// - /// Constructor receives shared fixture. - /// - public AppointmentE2ETests(E2EFixture fixture) => _fixture = fixture; - - /// - /// Dashboard loads and displays appointment data from Scheduling API. - /// - [Fact] - public async Task Dashboard_DisplaysAppointmentData_FromSchedulingApi() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Appointments"); - await page.WaitForSelectorAsync( - "text=Checkup", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("Checkup", content); - - await page.CloseAsync(); - } - - /// - /// Add Appointment button opens modal and creates appointment via API. - /// - [Fact] - public async Task AddAppointmentButton_OpensModal_AndCreatesAppointment() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Appointments"); - await page.WaitForSelectorAsync( - "[data-testid='add-appointment-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.ClickAsync("[data-testid='add-appointment-btn']"); - await page.WaitForSelectorAsync( - ".modal", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - var uniqueServiceType = $"E2EConsult{DateTime.UtcNow.Ticks % 100000}"; - await page.FillAsync("[data-testid='appointment-service-type']", uniqueServiceType); - await page.ClickAsync("[data-testid='submit-appointment']"); - - await page.WaitForSelectorAsync( - $"text={uniqueServiceType}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - using var client = E2EFixture.CreateAuthenticatedClient(); - var response = await client.GetStringAsync($"{E2EFixture.SchedulingUrl}/Appointment"); - Assert.Contains(uniqueServiceType, response); - - await page.CloseAsync(); - } - - /// - /// View Schedule button navigates to appointments view. - /// - [Fact] - public async Task ViewScheduleButton_NavigatesToAppointments() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=View Schedule"); - await page.WaitForSelectorAsync( - "text=Appointments", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - await page.WaitForSelectorAsync( - "text=Checkup", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("Checkup", content); - - await page.CloseAsync(); - } - - /// - /// Edit Appointment button opens edit page and updates appointment via API. - /// - [Fact] - public async Task EditAppointmentButton_OpensEditPage_AndUpdatesAppointment() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var uniqueServiceType = $"EditApptTest{DateTime.UtcNow.Ticks % 100000}"; - var startTime = DateTime.UtcNow.AddDays(7).ToString("yyyy-MM-ddTHH:mm:ss.fffZ"); - var endTime = DateTime - .UtcNow.AddDays(7) - .AddMinutes(30) - .ToString("yyyy-MM-ddTHH:mm:ss.fffZ"); - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Appointment", - new StringContent( - $$$"""{"ServiceCategory": "General", "ServiceType": "{{{uniqueServiceType}}}", "Priority": "routine", "Start": "{{{startTime}}}", "End": "{{{endTime}}}", "PatientReference": "Patient/1", "PractitionerReference": "Practitioner/1"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdAppointmentJson = await createResponse.Content.ReadAsStringAsync(); - - var appointmentIdMatch = Regex.Match(createdAppointmentJson, "\"Id\"\\s*:\\s*\"([^\"]+)\""); - Assert.True(appointmentIdMatch.Success); - var appointmentId = appointmentIdMatch.Groups[1].Value; - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Appointments"); - await page.WaitForSelectorAsync( - $"text={uniqueServiceType}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var editButton = await page.QuerySelectorAsync( - $"tr:has-text('{uniqueServiceType}') .btn-secondary" - ); - Assert.NotNull(editButton); - await editButton.ClickAsync(); - - await page.WaitForSelectorAsync( - "text=Edit Appointment", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - var newServiceType = $"Edited{DateTime.UtcNow.Ticks % 100000}"; - await page.FillAsync("#appointment-service-type", newServiceType); - await page.ClickAsync("button:has-text('Save Changes')"); - - await page.WaitForSelectorAsync( - "text=Appointment updated successfully", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var updatedAppointmentJson = await client.GetStringAsync( - $"{E2EFixture.SchedulingUrl}/Appointment/{appointmentId}" - ); - Assert.Contains(newServiceType, updatedAppointmentJson); - - await page.CloseAsync(); - } -} diff --git a/Dashboard/Dashboard.Integration.Tests/AuthE2ETests.cs b/Dashboard/Dashboard.Integration.Tests/AuthE2ETests.cs deleted file mode 100644 index 84a5458..0000000 --- a/Dashboard/Dashboard.Integration.Tests/AuthE2ETests.cs +++ /dev/null @@ -1,393 +0,0 @@ -using Microsoft.Playwright; - -namespace Dashboard.Integration.Tests; - -/// -/// E2E tests for authentication (login, logout, WebAuthn). -/// -[Collection("E2E Tests")] -[Trait("Category", "E2E")] -public sealed class AuthE2ETests -{ - private readonly E2EFixture _fixture; - - /// - /// Constructor receives shared fixture. - /// - public AuthE2ETests(E2EFixture fixture) => _fixture = fixture; - - /// - /// Login page uses discoverable credentials (no email required). - /// - [Fact] - public async Task LoginPage_DoesNotRequireEmailForSignIn() - { - var page = await _fixture.Browser!.NewPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - await page.GotoAsync(E2EFixture.DashboardUrl); - await page.EvaluateAsync( - "() => { localStorage.removeItem('gatekeeper_token'); localStorage.removeItem('gatekeeper_user'); }" - ); - await page.ReloadAsync(); - await page.WaitForSelectorAsync( - ".login-card", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - var pageContent = await page.ContentAsync(); - Assert.Contains("Healthcare Dashboard", pageContent); - Assert.Contains("Sign in with your passkey", pageContent); - - var emailInputVisible = await page.IsVisibleAsync("input[type='email']"); - Assert.False(emailInputVisible, "Login mode should NOT show email field"); - - var signInButton = page.Locator("button:has-text('Sign in with Passkey')"); - await signInButton.WaitForAsync(new LocatorWaitForOptions { Timeout = 5000 }); - Assert.True(await signInButton.IsVisibleAsync()); - - await page.CloseAsync(); - } - - /// - /// Registration page requires email and display name. - /// - [Fact] - public async Task LoginPage_RegistrationRequiresEmailAndDisplayName() - { - var page = await _fixture.Browser!.NewPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - await page.GotoAsync(E2EFixture.DashboardUrl); - await page.EvaluateAsync( - "() => { localStorage.removeItem('gatekeeper_token'); localStorage.removeItem('gatekeeper_user'); }" - ); - await page.ReloadAsync(); - await page.WaitForSelectorAsync( - ".login-card", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - await page.ClickAsync("button:has-text('Register')"); - await Task.Delay(500); - - var pageContent = await page.ContentAsync(); - Assert.Contains("Create your account", pageContent); - - var emailInput = page.Locator("input[type='email']"); - var displayNameInput = page.Locator("input#displayName"); - - Assert.True(await emailInput.IsVisibleAsync()); - Assert.True(await displayNameInput.IsVisibleAsync()); - - await page.CloseAsync(); - } - - /// - /// Gatekeeper API /auth/login/begin returns valid response for discoverable credentials. - /// - [Fact] - public async Task GatekeeperApi_LoginBegin_ReturnsValidDiscoverableCredentialOptions() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var response = await client.PostAsync( - $"{E2EFixture.GatekeeperUrl}/auth/login/begin", - new StringContent("{}", System.Text.Encoding.UTF8, "application/json") - ); - - Assert.True(response.IsSuccessStatusCode); - - var json = await response.Content.ReadAsStringAsync(); - using var doc = System.Text.Json.JsonDocument.Parse(json); - var root = doc.RootElement; - - Assert.True(root.TryGetProperty("ChallengeId", out var challengeId)); - Assert.False(string.IsNullOrEmpty(challengeId.GetString())); - - Assert.True(root.TryGetProperty("OptionsJson", out var optionsJson)); - var optionsJsonStr = optionsJson.GetString(); - Assert.False(string.IsNullOrEmpty(optionsJsonStr)); - - using var optionsDoc = System.Text.Json.JsonDocument.Parse(optionsJsonStr!); - var options = optionsDoc.RootElement; - Assert.True(options.TryGetProperty("challenge", out _)); - Assert.True(options.TryGetProperty("rpId", out _)); - } - - /// - /// Gatekeeper API /auth/register/begin returns valid response. - /// - [Fact] - public async Task GatekeeperApi_RegisterBegin_ReturnsValidOptions() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var response = await client.PostAsync( - $"{E2EFixture.GatekeeperUrl}/auth/register/begin", - new StringContent( - """{"Email": "test-e2e@example.com", "DisplayName": "E2E Test User"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - - Assert.True(response.IsSuccessStatusCode); - - var json = await response.Content.ReadAsStringAsync(); - using var doc = System.Text.Json.JsonDocument.Parse(json); - var root = doc.RootElement; - - Assert.True(root.TryGetProperty("ChallengeId", out _)); - Assert.True(root.TryGetProperty("OptionsJson", out var optionsJson)); - - using var optionsDoc = System.Text.Json.JsonDocument.Parse(optionsJson.GetString()!); - var options = optionsDoc.RootElement; - Assert.True(options.TryGetProperty("challenge", out _)); - Assert.True(options.TryGetProperty("rp", out _)); - Assert.True(options.TryGetProperty("user", out _)); - } - - /// - /// Dashboard sign-in flow calls API and handles response correctly. - /// - [Fact] - public async Task LoginPage_SignInButton_CallsApiWithoutJsonErrors() - { - var page = await _fixture.Browser!.NewPageAsync(); - var consoleErrors = new List(); - var networkRequests = new List(); - - page.Console += (_, msg) => - { - Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - if (msg.Type == "error") - consoleErrors.Add(msg.Text); - }; - - page.Request += (_, request) => - { - if (request.Url.Contains("/auth/")) - networkRequests.Add($"{request.Method} {request.Url}"); - }; - - await page.GotoAsync(E2EFixture.DashboardUrl); - await page.EvaluateAsync( - "() => { localStorage.removeItem('gatekeeper_token'); localStorage.removeItem('gatekeeper_user'); }" - ); - await page.ReloadAsync(); - await page.WaitForSelectorAsync( - ".login-card", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - await page.ClickAsync("button:has-text('Sign in with Passkey')"); - await Task.Delay(3000); - - Assert.Contains(networkRequests, r => r.Contains("/auth/login/begin")); - - var hasJsonParseError = consoleErrors.Any(e => - e.Contains("undefined") || e.Contains("is not valid JSON") || e.Contains("SyntaxError") - ); - Assert.False(hasJsonParseError); - - await page.CloseAsync(); - } - - /// - /// User menu click shows dropdown with Sign Out. - /// - [Fact] - public async Task UserMenu_ClickShowsDropdownWithSignOut() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - var userMenuButton = await page.QuerySelectorAsync("[data-testid='user-menu-button']"); - Assert.NotNull(userMenuButton); - await userMenuButton.ClickAsync(); - - await page.WaitForSelectorAsync( - "[data-testid='user-dropdown']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - var signOutButton = await page.QuerySelectorAsync("[data-testid='logout-button']"); - Assert.NotNull(signOutButton); - Assert.True(await signOutButton.IsVisibleAsync()); - - await page.CloseAsync(); - } - - /// - /// Sign Out button click shows login page. - /// - [Fact] - public async Task SignOutButton_ClickShowsLoginPage() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - await page.ClickAsync("[data-testid='user-menu-button']"); - await page.WaitForSelectorAsync( - "[data-testid='user-dropdown']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - await page.ClickAsync("[data-testid='logout-button']"); - - await page.WaitForSelectorAsync( - "[data-testid='login-page']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var tokenAfterLogout = await page.EvaluateAsync( - "() => localStorage.getItem('gatekeeper_token')" - ); - Assert.Null(tokenAfterLogout); - - await page.CloseAsync(); - } - - /// - /// Gatekeeper API logout revokes token. - /// - [Fact] - public async Task GatekeeperApi_Logout_RevokesToken() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var logoutResponse = await client.PostAsync( - $"{E2EFixture.GatekeeperUrl}/auth/logout", - new StringContent("{}", System.Text.Encoding.UTF8, "application/json") - ); - Assert.Equal(HttpStatusCode.NoContent, logoutResponse.StatusCode); - - using var unauthClient = new HttpClient(); - var unauthResponse = await unauthClient.PostAsync( - $"{E2EFixture.GatekeeperUrl}/auth/logout", - new StringContent("{}", System.Text.Encoding.UTF8, "application/json") - ); - Assert.Equal(HttpStatusCode.Unauthorized, unauthResponse.StatusCode); - } - - /// - /// User menu displays user initials and name in dropdown. - /// - [Fact] - public async Task UserMenu_DisplaysUserInitialsAndNameInDropdown() - { - var page = await _fixture.Browser!.NewPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - // Generate valid test token for custom user - var testToken = E2EFixture.GenerateTestToken( - userId: "test-user", - displayName: "Alice Smith", - email: "alice@example.com" - ); - - // Set custom user data BEFORE loading - await page.GotoAsync(E2EFixture.DashboardUrl); - await page.EvaluateAsync( - $@"() => {{ - localStorage.setItem('gatekeeper_token', '{testToken}'); - localStorage.setItem('gatekeeper_user', JSON.stringify({{ - userId: 'test-user', displayName: 'Alice Smith', email: 'alice@example.com' - }})); - }}" - ); - // Reload to pick up custom user data - await page.ReloadAsync(); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - var avatarText = await page.TextContentAsync("[data-testid='user-menu-button']"); - Assert.Equal("AS", avatarText?.Trim()); - - await page.ClickAsync("[data-testid='user-menu-button']"); - await page.WaitForSelectorAsync( - "[data-testid='user-dropdown']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - var userNameText = await page.TextContentAsync(".user-dropdown-name"); - Assert.Contains("Alice Smith", userNameText); - - var emailText = await page.TextContentAsync(".user-dropdown-email"); - Assert.Contains("alice@example.com", emailText); - - await page.CloseAsync(); - } - - /// - /// First-time sign-in must work WITHOUT browser refresh. - /// - [Fact] - public async Task FirstTimeSignIn_TransitionsToDashboard_WithoutRefresh() - { - var page = await _fixture.Browser!.NewPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - await page.GotoAsync(E2EFixture.DashboardUrl); - await page.EvaluateAsync( - "() => { localStorage.removeItem('gatekeeper_token'); localStorage.removeItem('gatekeeper_user'); }" - ); - await page.ReloadAsync(); - await page.WaitForSelectorAsync( - "[data-testid='login-page']", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Wait for React to mount and set the __triggerLogin hook - await page.WaitForFunctionAsync( - "() => typeof window.__triggerLogin === 'function'", - new PageWaitForFunctionOptions { Timeout = 10000 } - ); - - // Generate a valid test token - this token is accepted by the APIs - var devToken = E2EFixture.GenerateTestToken( - userId: "test-user-123", - displayName: "Test User", - email: "test@example.com" - ); - await page.EvaluateAsync( - $@"() => {{ - console.log('[TEST] Setting token and triggering login'); - localStorage.setItem('gatekeeper_token', '{devToken}'); - localStorage.setItem('gatekeeper_user', JSON.stringify({{ - userId: 'test-user-123', displayName: 'Test User', email: 'test@example.com' - }})); - window.__triggerLogin({{ userId: 'test-user-123', displayName: 'Test User', email: 'test@example.com' }}); - console.log('[TEST] Login triggered, waiting for React state update'); - }}" - ); - - // Wait longer for React state update and re-render - await Task.Delay(2000); - - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - var loginPageStillVisible = await page.IsVisibleAsync("[data-testid='login-page']"); - Assert.False(loginPageStillVisible, "Login page should be hidden after successful login"); - Assert.True( - await page.IsVisibleAsync(".sidebar"), - "Sidebar should be visible after successful login" - ); - - await page.CloseAsync(); - } -} diff --git a/Dashboard/Dashboard.Integration.Tests/CalendarE2ETests.cs b/Dashboard/Dashboard.Integration.Tests/CalendarE2ETests.cs deleted file mode 100644 index 73cd66c..0000000 --- a/Dashboard/Dashboard.Integration.Tests/CalendarE2ETests.cs +++ /dev/null @@ -1,288 +0,0 @@ -using Microsoft.Playwright; - -namespace Dashboard.Integration.Tests; - -/// -/// E2E tests for calendar-related functionality. -/// -[Collection("E2E Tests")] -[Trait("Category", "E2E")] -public sealed class CalendarE2ETests -{ - private readonly E2EFixture _fixture; - - /// - /// Constructor receives shared fixture. - /// - public CalendarE2ETests(E2EFixture fixture) => _fixture = fixture; - - /// - /// Calendar page displays appointments in calendar grid. - /// - [Fact] - public async Task CalendarPage_DisplaysAppointmentsInCalendarGrid() - { - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#calendar" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER {msg.Type}] {msg.Text}"); - page.PageError += (_, err) => Console.WriteLine($"[PAGE ERROR] {err}"); - - // Debug: Check auth state - var hasToken = await page.EvaluateAsync( - "() => !!localStorage.getItem('gatekeeper_token')" - ); - var hasUser = await page.EvaluateAsync( - "() => !!localStorage.getItem('gatekeeper_user')" - ); - var currentUrl = page.Url; - Console.WriteLine( - $"[DEBUG] Auth state - hasToken: {hasToken}, hasUser: {hasUser}, URL: {currentUrl}" - ); - - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - await page.WaitForSelectorAsync( - ".calendar-grid-container", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("calendar-grid", content); - Assert.Contains("Sun", content); - Assert.Contains("Mon", content); - Assert.Contains("Today", content); - - await page.CloseAsync(); - } - - /// - /// Calendar page allows clicking on a day to view appointments. - /// - [Fact] - public async Task CalendarPage_ClickOnDay_ShowsAppointmentDetails() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var today = DateTime.Now; - var startTime = new DateTime( - today.Year, - today.Month, - today.Day, - 14, - 0, - 0, - DateTimeKind.Local - ).ToString("yyyy-MM-ddTHH:mm:ss.fffZ"); - var endTime = new DateTime( - today.Year, - today.Month, - today.Day, - 14, - 30, - 0, - DateTimeKind.Local - ).ToString("yyyy-MM-ddTHH:mm:ss.fffZ"); - var uniqueServiceType = $"CalTest{DateTime.Now.Ticks % 100000}"; - - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Appointment", - new StringContent( - $$$"""{"ServiceCategory": "General", "ServiceType": "{{{uniqueServiceType}}}", "Priority": "routine", "Start": "{{{startTime}}}", "End": "{{{endTime}}}", "PatientReference": "Patient/1", "PractitionerReference": "Practitioner/1"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Schedule"); - await page.WaitForSelectorAsync( - ".calendar-grid", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.WaitForSelectorAsync( - ".calendar-cell.today.has-appointments", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var todayCell = page.Locator(".calendar-cell.today").First; - await todayCell.ClickAsync(); - - await page.WaitForSelectorAsync( - ".calendar-details-panel h4", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - await page.WaitForSelectorAsync( - $"text={uniqueServiceType}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains(uniqueServiceType, content); - - await page.CloseAsync(); - } - - /// - /// Calendar page Edit button opens edit appointment page. - /// - [Fact] - public async Task CalendarPage_EditButton_OpensEditAppointmentPage() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var today = DateTime.Now; - var startTime = new DateTime( - today.Year, - today.Month, - today.Day, - 15, - 0, - 0, - DateTimeKind.Local - ).ToString("yyyy-MM-ddTHH:mm:ss.fffZ"); - var endTime = new DateTime( - today.Year, - today.Month, - today.Day, - 15, - 30, - 0, - DateTimeKind.Local - ).ToString("yyyy-MM-ddTHH:mm:ss.fffZ"); - var uniqueServiceType = $"CalEdit{DateTime.Now.Ticks % 100000}"; - - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Appointment", - new StringContent( - $$$"""{"ServiceCategory": "General", "ServiceType": "{{{uniqueServiceType}}}", "Priority": "routine", "Start": "{{{startTime}}}", "End": "{{{endTime}}}", "PatientReference": "Patient/1", "PractitionerReference": "Practitioner/1"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Schedule"); - await page.WaitForSelectorAsync( - ".calendar-grid", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.WaitForSelectorAsync( - ".calendar-cell.today.has-appointments", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var todayCell = page.Locator(".calendar-cell.today").First; - await todayCell.ClickAsync(); - await page.WaitForSelectorAsync( - $"text={uniqueServiceType}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var editButton = await page.QuerySelectorAsync( - $".calendar-appointment-item:has-text('{uniqueServiceType}') button:has-text('Edit')" - ); - Assert.NotNull(editButton); - await editButton.ClickAsync(); - - await page.WaitForSelectorAsync( - "text=Edit Appointment", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("Edit Appointment", content); - - await page.CloseAsync(); - } - - /// - /// Calendar navigation (previous/next month) works. - /// - [Fact] - public async Task CalendarPage_NavigationButtons_ChangeMonth() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Schedule"); - await page.WaitForSelectorAsync( - ".calendar-grid", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var currentMonthYear = await page.TextContentAsync(".text-lg.font-semibold"); - Assert.NotNull(currentMonthYear); - - var headerControls = page.Locator(".page-header .flex.items-center.gap-4"); - var nextButton = headerControls.Locator("button.btn-secondary").Nth(1); - await nextButton.ClickAsync(); - await Task.Delay(300); - - var newMonthYear = await page.TextContentAsync(".text-lg.font-semibold"); - Assert.NotEqual(currentMonthYear, newMonthYear); - - var prevButton = headerControls.Locator("button.btn-secondary").First; - await prevButton.ClickAsync(); - await Task.Delay(300); - await prevButton.ClickAsync(); - await Task.Delay(300); - - await page.ClickAsync("button:has-text('Today')"); - await Task.Delay(500); - - var todayContent = await page.ContentAsync(); - Assert.Contains("today", todayContent); - - await page.CloseAsync(); - } - - /// - /// Deep linking to calendar page works. - /// - [Fact] - public async Task CalendarPage_DeepLinkingWorks() - { - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#calendar" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER {msg.Type}] {msg.Text}"); - page.PageError += (_, err) => Console.WriteLine($"[PAGE ERROR] {err}"); - - // Debug: Check auth state and hash - var hasToken = await page.EvaluateAsync( - "() => !!localStorage.getItem('gatekeeper_token')" - ); - var currentHash = await page.EvaluateAsync("() => window.location.hash"); - Console.WriteLine($"[DEBUG] hasToken: {hasToken}, hash: {currentHash}, URL: {page.Url}"); - - await page.WaitForSelectorAsync( - ".calendar-grid", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("Schedule", content); - Assert.Contains("calendar-grid", content); - - await page.CloseAsync(); - } -} diff --git a/Dashboard/Dashboard.Integration.Tests/Dashboard.Integration.Tests.csproj b/Dashboard/Dashboard.Integration.Tests/Dashboard.Integration.Tests.csproj deleted file mode 100644 index beaec13..0000000 --- a/Dashboard/Dashboard.Integration.Tests/Dashboard.Integration.Tests.csproj +++ /dev/null @@ -1,52 +0,0 @@ - - - net10.0 - Library - true - enable - enable - Dashboard.Integration.Tests - CS1591;CA1707;CA1307;CA1062;CA1515;CA2100 - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - diff --git a/Dashboard/Dashboard.Integration.Tests/DashboardApiCorsTests.cs b/Dashboard/Dashboard.Integration.Tests/DashboardApiCorsTests.cs deleted file mode 100644 index bdfbd7d..0000000 --- a/Dashboard/Dashboard.Integration.Tests/DashboardApiCorsTests.cs +++ /dev/null @@ -1,505 +0,0 @@ -using System.Security.Cryptography; -using System.Text; -using System.Text.Json; -using Microsoft.AspNetCore.Hosting; -using Npgsql; - -namespace Dashboard.Integration.Tests; - -/// -/// WebApplicationFactory for Clinical.Api that creates an isolated PostgreSQL test database. -/// -public sealed class ClinicalApiTestFactory : WebApplicationFactory -{ - private readonly string _dbName = $"test_dashboard_clinical_{Guid.NewGuid():N}"; - private readonly string _connectionString; - - private static readonly string BaseConnectionString = - Environment.GetEnvironmentVariable("TEST_POSTGRES_CONNECTION") - ?? "Host=localhost;Database=postgres;Username=postgres;Password=changeme;Timeout=5;Command Timeout=5"; - - public ClinicalApiTestFactory() - { - using (var adminConn = new NpgsqlConnection(BaseConnectionString)) - { - adminConn.Open(); - using var createCmd = adminConn.CreateCommand(); - createCmd.CommandText = $"CREATE DATABASE {_dbName}"; - createCmd.ExecuteNonQuery(); - } - - _connectionString = BaseConnectionString.Replace( - "Database=postgres", - $"Database={_dbName}" - ); - } - - protected override void ConfigureWebHost(IWebHostBuilder builder) - { - builder.UseSetting("ConnectionStrings:Postgres", _connectionString); - - var clinicalApiAssembly = typeof(Clinical.Api.Program).Assembly; - var contentRoot = Path.GetDirectoryName(clinicalApiAssembly.Location)!; - builder.UseContentRoot(contentRoot); - } - - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - if (disposing) - { - try - { - using var adminConn = new NpgsqlConnection(BaseConnectionString); - adminConn.Open(); - - using var terminateCmd = adminConn.CreateCommand(); - terminateCmd.CommandText = - $"SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = '{_dbName}'"; - terminateCmd.ExecuteNonQuery(); - - using var dropCmd = adminConn.CreateCommand(); - dropCmd.CommandText = $"DROP DATABASE IF EXISTS {_dbName}"; - dropCmd.ExecuteNonQuery(); - } - catch - { /* ignore */ - } - } - } -} - -/// -/// WebApplicationFactory for Scheduling.Api that creates an isolated PostgreSQL test database. -/// -public sealed class SchedulingApiTestFactory : WebApplicationFactory -{ - private readonly string _dbName = $"test_dashboard_scheduling_{Guid.NewGuid():N}"; - private readonly string _connectionString; - - private static readonly string BaseConnectionString = - Environment.GetEnvironmentVariable("TEST_POSTGRES_CONNECTION") - ?? "Host=localhost;Database=postgres;Username=postgres;Password=changeme;Timeout=5;Command Timeout=5"; - - public SchedulingApiTestFactory() - { - using (var adminConn = new NpgsqlConnection(BaseConnectionString)) - { - adminConn.Open(); - using var createCmd = adminConn.CreateCommand(); - createCmd.CommandText = $"CREATE DATABASE {_dbName}"; - createCmd.ExecuteNonQuery(); - } - - _connectionString = BaseConnectionString.Replace( - "Database=postgres", - $"Database={_dbName}" - ); - } - - protected override void ConfigureWebHost(IWebHostBuilder builder) => - builder.UseSetting("ConnectionStrings:Postgres", _connectionString); - - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - if (disposing) - { - try - { - using var adminConn = new NpgsqlConnection(BaseConnectionString); - adminConn.Open(); - - using var terminateCmd = adminConn.CreateCommand(); - terminateCmd.CommandText = - $"SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = '{_dbName}'"; - terminateCmd.ExecuteNonQuery(); - - using var dropCmd = adminConn.CreateCommand(); - dropCmd.CommandText = $"DROP DATABASE IF EXISTS {_dbName}"; - dropCmd.ExecuteNonQuery(); - } - catch - { /* ignore */ - } - } - } -} - -/// -/// Tests that verify the Dashboard frontend can communicate with backend APIs. -/// These tests simulate browser requests with CORS headers to ensure the APIs -/// are properly configured for cross-origin requests from the Dashboard. -/// -[Collection("E2E Tests")] -public sealed class DashboardApiCorsTests : IAsyncLifetime -{ - private readonly ClinicalApiTestFactory _clinicalFactory; - private readonly SchedulingApiTestFactory _schedulingFactory; - private HttpClient _clinicalClient = null!; - private HttpClient _schedulingClient = null!; - - // Dashboard origin - this is where the frontend runs - private const string DashboardOrigin = "http://localhost:5173"; - - public DashboardApiCorsTests() - { - _clinicalFactory = new ClinicalApiTestFactory(); - _schedulingFactory = new SchedulingApiTestFactory(); - } - - public Task InitializeAsync() - { - _clinicalClient = _clinicalFactory.CreateClient(); - _schedulingClient = _schedulingFactory.CreateClient(); - - // Add auth headers for all requests (uses dev mode signing key - 32 zeros) - var token = GenerateTestToken(); - _clinicalClient.DefaultRequestHeaders.Authorization = - new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token); - _schedulingClient.DefaultRequestHeaders.Authorization = - new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token); - - return Task.CompletedTask; - } - - private static readonly string[] TestRoles = ["admin", "user"]; - - private static string GenerateTestToken() - { - var signingKey = new byte[32]; // 32 zeros = dev mode key - var header = Base64UrlEncode(Encoding.UTF8.GetBytes("""{"alg":"HS256","typ":"JWT"}""")); - var expiration = DateTimeOffset.UtcNow.AddHours(1).ToUnixTimeSeconds(); - var payload = Base64UrlEncode( - Encoding.UTF8.GetBytes( - JsonSerializer.Serialize( - new - { - sub = "cors-test-user", - name = "CORS Test User", - email = "corstest@example.com", - jti = Guid.NewGuid().ToString(), - exp = expiration, - roles = TestRoles, - } - ) - ) - ); - var signature = ComputeHmacSignature(header, payload, signingKey); - return $"{header}.{payload}.{signature}"; - } - - private static string Base64UrlEncode(byte[] input) => - Convert.ToBase64String(input).TrimEnd('=').Replace('+', '-').Replace('/', '_'); - - private static string ComputeHmacSignature(string header, string payload, byte[] key) - { - var data = Encoding.UTF8.GetBytes($"{header}.{payload}"); - using var hmac = new HMACSHA256(key); - var hash = hmac.ComputeHash(data); - return Base64UrlEncode(hash); - } - - public async Task DisposeAsync() - { - _clinicalClient.Dispose(); - _schedulingClient.Dispose(); - await _clinicalFactory.DisposeAsync(); - await _schedulingFactory.DisposeAsync(); - } - - #region Clinical API CORS Tests - - /// - /// CRITICAL: Dashboard at localhost:5173 must be able to fetch patients from Clinical API. - /// This test verifies CORS is configured to allow the Dashboard origin. - /// - [Fact] - public async Task ClinicalApi_PatientsEndpoint_AllowsCorsFromDashboard() - { - // Arrange - simulate browser preflight request - var request = new HttpRequestMessage(HttpMethod.Options, "/fhir/Patient"); - request.Headers.Add("Origin", DashboardOrigin); - request.Headers.Add("Access-Control-Request-Method", "GET"); - request.Headers.Add("Access-Control-Request-Headers", "Accept"); - - // Act - var response = await _clinicalClient.SendAsync(request); - - // Assert - CORS headers must be present - Assert.True( - response.Headers.Contains("Access-Control-Allow-Origin"), - "Clinical API must return Access-Control-Allow-Origin header for Dashboard origin" - ); - - var allowedOrigin = response - .Headers.GetValues("Access-Control-Allow-Origin") - .FirstOrDefault(); - Assert.True( - allowedOrigin == DashboardOrigin || allowedOrigin == "*", - $"Clinical API must allow Dashboard origin. Got: {allowedOrigin}" - ); - } - - /// - /// CRITICAL: Dashboard must be able to GET /fhir/Patient/ with CORS headers. - /// Note: Trailing slash is required for the Patient list endpoint. - /// - [Fact] - public async Task ClinicalApi_GetPatients_ReturnsDataWithCorsHeaders() - { - // Arrange - simulate browser request with Origin header - // Note: Clinical API uses /fhir/Patient/ (with trailing slash) for list - var request = new HttpRequestMessage(HttpMethod.Get, "/fhir/Patient/"); - request.Headers.Add("Origin", DashboardOrigin); - request.Headers.Add("Accept", "application/json"); - - // Act - var response = await _clinicalClient.SendAsync(request); - var body = await response.Content.ReadAsStringAsync(); - - // Assert - must succeed AND have CORS header - Assert.True( - response.IsSuccessStatusCode, - $"Clinical API GET /fhir/Patient/ failed with {response.StatusCode}. Body: {body}" - ); - - Assert.True( - response.Headers.Contains("Access-Control-Allow-Origin"), - "Clinical API response must include Access-Control-Allow-Origin header" - ); - } - - /// - /// Dashboard fetches encounters for a patient - must work with CORS. - /// Note: Encounters are nested under Patient: /fhir/Patient/{patientId}/Encounter - /// - [Fact] - public async Task ClinicalApi_GetEncounters_ReturnsDataWithCorsHeaders() - { - // Arrange - First create a patient to get encounters for - var createRequest = new HttpRequestMessage(HttpMethod.Post, "/fhir/Patient/"); - createRequest.Headers.Add("Origin", DashboardOrigin); - createRequest.Content = new StringContent( - """{"Active": true, "GivenName": "Test", "FamilyName": "Patient", "Gender": "other"}""", - System.Text.Encoding.UTF8, - "application/json" - ); - var createResponse = await _clinicalClient.SendAsync(createRequest); - var patientJson = await createResponse.Content.ReadAsStringAsync(); - var patientId = System - .Text.Json.JsonDocument.Parse(patientJson) - .RootElement.GetProperty("Id") - .GetString(); - - // Now test the encounters endpoint with CORS - var request = new HttpRequestMessage( - HttpMethod.Get, - $"/fhir/Patient/{patientId}/Encounter" - ); - request.Headers.Add("Origin", DashboardOrigin); - request.Headers.Add("Accept", "application/json"); - - // Act - var response = await _clinicalClient.SendAsync(request); - - // Assert - Assert.True( - response.IsSuccessStatusCode, - $"Clinical API GET /fhir/Patient/{{patientId}}/Encounter failed with {response.StatusCode}" - ); - - Assert.True( - response.Headers.Contains("Access-Control-Allow-Origin"), - "Clinical API response must include Access-Control-Allow-Origin header" - ); - } - - #endregion - - #region Scheduling API CORS Tests - - /// - /// CRITICAL: Dashboard must be able to fetch appointments from Scheduling API. - /// Note: Scheduling API uses /Appointment (no /fhir/ prefix). - /// - [Fact] - public async Task SchedulingApi_AppointmentsEndpoint_AllowsCorsFromDashboard() - { - // Arrange - simulate browser preflight request - // Note: Scheduling API doesn't use /fhir/ prefix - var request = new HttpRequestMessage(HttpMethod.Options, "/Appointment"); - request.Headers.Add("Origin", DashboardOrigin); - request.Headers.Add("Access-Control-Request-Method", "GET"); - request.Headers.Add("Access-Control-Request-Headers", "Accept"); - - // Act - var response = await _schedulingClient.SendAsync(request); - - // Assert - CORS headers must be present - Assert.True( - response.Headers.Contains("Access-Control-Allow-Origin"), - "Scheduling API must return Access-Control-Allow-Origin header for Dashboard origin" - ); - - var allowedOrigin = response - .Headers.GetValues("Access-Control-Allow-Origin") - .FirstOrDefault(); - Assert.True( - allowedOrigin == DashboardOrigin || allowedOrigin == "*", - $"Scheduling API must allow Dashboard origin. Got: {allowedOrigin}" - ); - } - - /// - /// CRITICAL: Dashboard must be able to GET /Appointment with CORS headers. - /// Note: Scheduling API uses /Appointment (no /fhir/ prefix). - /// - [Fact] - public async Task SchedulingApi_GetAppointments_ReturnsDataWithCorsHeaders() - { - // Arrange - Scheduling API doesn't use /fhir/ prefix - var request = new HttpRequestMessage(HttpMethod.Get, "/Appointment"); - request.Headers.Add("Origin", DashboardOrigin); - request.Headers.Add("Accept", "application/json"); - - // Act - var response = await _schedulingClient.SendAsync(request); - - // Assert - Assert.True( - response.IsSuccessStatusCode, - $"Scheduling API GET /Appointment failed with {response.StatusCode}" - ); - - Assert.True( - response.Headers.Contains("Access-Control-Allow-Origin"), - "Scheduling API response must include Access-Control-Allow-Origin header" - ); - } - - /// - /// Dashboard fetches practitioners - must work with CORS. - /// Note: Scheduling API uses /Practitioner (no /fhir/ prefix). - /// - [Fact] - public async Task SchedulingApi_GetPractitioners_ReturnsDataWithCorsHeaders() - { - // Arrange - Scheduling API doesn't use /fhir/ prefix - var request = new HttpRequestMessage(HttpMethod.Get, "/Practitioner"); - request.Headers.Add("Origin", DashboardOrigin); - request.Headers.Add("Accept", "application/json"); - - // Act - var response = await _schedulingClient.SendAsync(request); - - // Assert - Assert.True( - response.IsSuccessStatusCode, - $"Scheduling API GET /Practitioner failed with {response.StatusCode}" - ); - - Assert.True( - response.Headers.Contains("Access-Control-Allow-Origin"), - "Scheduling API response must include Access-Control-Allow-Origin header" - ); - } - - #endregion - - #region Patient Creation Tests - - /// - /// CRITICAL: Proves patient creation API works end-to-end. - /// This tests the actual POST endpoint that the AddPatientModal calls. - /// - [Fact] - public async Task ClinicalApi_CreatePatient_WorksEndToEnd() - { - // Arrange - Create a patient with unique name - var uniqueName = $"IntTest{DateTime.UtcNow.Ticks % 100000}"; - var request = new HttpRequestMessage(HttpMethod.Post, "/fhir/Patient/"); - request.Headers.Add("Origin", DashboardOrigin); - request.Content = new StringContent( - $$$"""{"Active": true, "GivenName": "{{{uniqueName}}}", "FamilyName": "IntegrationCreated", "Gender": "female"}""", - System.Text.Encoding.UTF8, - "application/json" - ); - - // Act - Create patient - var createResponse = await _clinicalClient.SendAsync(request); - createResponse.EnsureSuccessStatusCode(); - - // Verify - Fetch all patients and confirm the new one is there - var listRequest = new HttpRequestMessage(HttpMethod.Get, "/fhir/Patient/"); - listRequest.Headers.Add("Origin", DashboardOrigin); - var listResponse = await _clinicalClient.SendAsync(listRequest); - var listBody = await listResponse.Content.ReadAsStringAsync(); - - Assert.Contains(uniqueName, listBody); - Assert.Contains("IntegrationCreated", listBody); - } - - /// - /// CRITICAL: Proves practitioner creation API works end-to-end. - /// This tests the actual POST endpoint that the AddPractitionerModal would call. - /// - [Fact] - public async Task SchedulingApi_CreatePractitioner_WorksEndToEnd() - { - // Arrange - Create a practitioner with unique identifier - var uniqueId = $"DR{DateTime.UtcNow.Ticks % 100000}"; - var request = new HttpRequestMessage(HttpMethod.Post, "/Practitioner"); - request.Headers.Add("Origin", DashboardOrigin); - request.Content = new StringContent( - $$$"""{"Identifier": "{{{uniqueId}}}", "Active": true, "NameGiven": "IntDoctor", "NameFamily": "TestDoc", "Qualification": "MD", "Specialty": "Testing", "TelecomEmail": "inttest@hospital.org", "TelecomPhone": "+1-555-8888"}""", - System.Text.Encoding.UTF8, - "application/json" - ); - - // Act - Create practitioner - var createResponse = await _schedulingClient.SendAsync(request); - createResponse.EnsureSuccessStatusCode(); - - // Verify - Fetch all practitioners and confirm the new one is there - var listRequest = new HttpRequestMessage(HttpMethod.Get, "/Practitioner"); - listRequest.Headers.Add("Origin", DashboardOrigin); - var listResponse = await _schedulingClient.SendAsync(listRequest); - var listBody = await listResponse.Content.ReadAsStringAsync(); - - Assert.Contains(uniqueId, listBody); - Assert.Contains("IntDoctor", listBody); - } - - /// - /// CRITICAL: Proves appointment creation API works end-to-end. - /// This tests the actual POST endpoint that the AddAppointmentModal calls. - /// - [Fact] - public async Task SchedulingApi_CreateAppointment_WorksEndToEnd() - { - // Arrange - Create an appointment with unique service type - var uniqueService = $"Consult{DateTime.UtcNow.Ticks % 100000}"; - var request = new HttpRequestMessage(HttpMethod.Post, "/Appointment"); - request.Headers.Add("Origin", DashboardOrigin); - request.Content = new StringContent( - $$$"""{"ServiceCategory": "General", "ServiceType": "{{{uniqueService}}}", "Start": "2025-12-25T10:00:00Z", "End": "2025-12-25T11:00:00Z", "PatientReference": "Patient/test", "PractitionerReference": "Practitioner/test", "Priority": "routine"}""", - System.Text.Encoding.UTF8, - "application/json" - ); - - // Act - Create appointment - var createResponse = await _schedulingClient.SendAsync(request); - createResponse.EnsureSuccessStatusCode(); - - // Verify - Fetch all appointments and confirm the new one is there - var listRequest = new HttpRequestMessage(HttpMethod.Get, "/Appointment"); - listRequest.Headers.Add("Origin", DashboardOrigin); - var listResponse = await _schedulingClient.SendAsync(listRequest); - var listBody = await listResponse.Content.ReadAsStringAsync(); - - Assert.Contains(uniqueService, listBody); - } - - #endregion -} diff --git a/Dashboard/Dashboard.Integration.Tests/DashboardE2ETests.cs b/Dashboard/Dashboard.Integration.Tests/DashboardE2ETests.cs deleted file mode 100644 index 718437d..0000000 --- a/Dashboard/Dashboard.Integration.Tests/DashboardE2ETests.cs +++ /dev/null @@ -1,2243 +0,0 @@ -using Microsoft.Playwright; - -namespace Dashboard.Integration.Tests; - -/// -/// Core Dashboard E2E tests. -/// Uses EXACTLY the same ports as the real app. -/// -[Collection("E2E Tests")] -[Trait("Category", "E2E")] -public sealed class DashboardE2ETests -{ - private readonly E2EFixture _fixture; - - /// - /// Constructor receives shared fixture. - /// - public DashboardE2ETests(E2EFixture fixture) => _fixture = fixture; - - /// - /// Dashboard main page shows stats from both APIs. - /// - [Fact] - public async Task Dashboard_MainPage_ShowsStatsFromBothApis() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.WaitForSelectorAsync( - ".metric-card", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var cards = await page.QuerySelectorAllAsync(".metric-card"); - Assert.True(cards.Count > 0, "Dashboard should display metric cards with API data"); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Add Patient button opens modal and creates patient via API. - /// Uses Playwright to load REAL Dashboard, click Add Patient, fill form, and POST to REAL API. - /// - [Fact] - public async Task AddPatientButton_OpensModal_AndCreatesPatient() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Navigate to Patients page - await page.ClickAsync("text=Patients"); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Click Add Patient button - await page.ClickAsync("[data-testid='add-patient-btn']"); - - // Wait for modal to appear - await page.WaitForSelectorAsync( - ".modal", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Fill in patient details - var uniqueName = $"E2ECreated{DateTime.UtcNow.Ticks % 100000}"; - await page.FillAsync("[data-testid='patient-given-name']", uniqueName); - await page.FillAsync("[data-testid='patient-family-name']", "TestCreated"); - await page.SelectOptionAsync("[data-testid='patient-gender']", "male"); - - // Submit the form - await page.ClickAsync("[data-testid='submit-patient']"); - - // Wait for modal to close and patient to appear in list - await page.WaitForSelectorAsync( - $"text={uniqueName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Verify via API that patient was actually created - using var client = E2EFixture.CreateAuthenticatedClient(); - var response = await client.GetStringAsync($"{E2EFixture.ClinicalUrl}/fhir/Patient/"); - Assert.Contains(uniqueName, response); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Add Appointment button opens modal and creates appointment via API. - /// Uses Playwright to load REAL Dashboard, click Add Appointment, fill form, and POST to REAL API. - /// - [Fact] - public async Task AddAppointmentButton_OpensModal_AndCreatesAppointment() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Navigate to Appointments page - await page.ClickAsync("text=Appointments"); - await page.WaitForSelectorAsync( - "[data-testid='add-appointment-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Click Add Appointment button - await page.ClickAsync("[data-testid='add-appointment-btn']"); - - // Wait for modal to appear - await page.WaitForSelectorAsync( - ".modal", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Fill in appointment details - var uniqueServiceType = $"E2EConsult{DateTime.UtcNow.Ticks % 100000}"; - await page.FillAsync("[data-testid='appointment-service-type']", uniqueServiceType); - - // Submit the form - await page.ClickAsync("[data-testid='submit-appointment']"); - - // Wait for modal to close and appointment to appear in list - await page.WaitForSelectorAsync( - $"text={uniqueServiceType}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Verify via API that appointment was actually created - using var client = E2EFixture.CreateAuthenticatedClient(); - var response = await client.GetStringAsync($"{E2EFixture.SchedulingUrl}/Appointment"); - Assert.Contains(uniqueServiceType, response); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Patient Search button navigates to search and finds patients. - /// - [Fact] - public async Task PatientSearchButton_NavigatesToSearch_AndFindsPatients() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Click the Patient Search button - await page.ClickAsync("text=Patient Search"); - - // Should navigate to patients page with search focused - await page.WaitForSelectorAsync( - "input[placeholder*='Search']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Type a search query - await page.FillAsync("input[placeholder*='Search']", "E2ETest"); - - // Wait for filtered results - await page.WaitForSelectorAsync( - "text=TestPatient", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("TestPatient", content); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: View Schedule button navigates to appointments view. - /// - [Fact] - public async Task ViewScheduleButton_NavigatesToAppointments() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Click the View Schedule button - await page.ClickAsync("text=View Schedule"); - - // Should navigate to appointments page - await page.WaitForSelectorAsync( - "text=Appointments", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Should show the seeded appointment - await page.WaitForSelectorAsync( - "text=Checkup", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("Checkup", content); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Proves patient creation API works end-to-end. - /// This test hits the real Clinical API directly without Playwright. - /// - [Fact] - public async Task PatientCreationApi_WorksEndToEnd() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // Create a patient with a unique name - var uniqueName = $"ApiTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - $$$"""{"Active": true, "GivenName": "{{{uniqueName}}}", "FamilyName": "ApiCreated", "Gender": "female"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - - // Verify patient was created by fetching all patients - var listResponse = await client.GetStringAsync($"{E2EFixture.ClinicalUrl}/fhir/Patient/"); - Assert.Contains(uniqueName, listResponse); - Assert.Contains("ApiCreated", listResponse); - } - - /// - /// CRITICAL TEST: Proves practitioner creation API works end-to-end. - /// This test hits the real Scheduling API directly without Playwright. - /// - [Fact] - public async Task PractitionerCreationApi_WorksEndToEnd() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // Create a practitioner with a unique identifier - var uniqueId = $"DR{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner", - new StringContent( - $$$"""{"Identifier": "{{{uniqueId}}}", "Active": true, "NameGiven": "ApiDoctor", "NameFamily": "TestDoc", "Qualification": "MD", "Specialty": "Testing", "TelecomEmail": "test@hospital.org", "TelecomPhone": "+1-555-9999"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - - // Verify practitioner was created - var listResponse = await client.GetStringAsync($"{E2EFixture.SchedulingUrl}/Practitioner"); - Assert.Contains(uniqueId, listResponse); - Assert.Contains("ApiDoctor", listResponse); - } - - /// - /// CRITICAL TEST: Edit Patient button opens edit page and updates patient via API. - /// Uses Playwright to load REAL Dashboard, click Edit, modify form, and PUT to REAL API. - /// - [Fact] - public async Task EditPatientButton_OpensEditPage_AndUpdatesPatient() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // First create a patient to edit - var uniqueName = $"EditTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - $$$"""{"Active": true, "GivenName": "{{{uniqueName}}}", "FamilyName": "ToBeEdited", "Gender": "female"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdPatientJson = await createResponse.Content.ReadAsStringAsync(); - - // Extract patient ID from response - var patientIdMatch = System.Text.RegularExpressions.Regex.Match( - createdPatientJson, - "\"Id\"\\s*:\\s*\"([^\"]+)\"" - ); - Assert.True(patientIdMatch.Success, "Should get patient ID from creation response"); - var patientId = patientIdMatch.Groups[1].Value; - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Navigate to Patients page - await page.ClickAsync("text=Patients"); - - // Wait for the page to load (add-patient-btn is a good indicator) - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Search for the patient to make sure it appears - await page.FillAsync("input[placeholder*='Search']", uniqueName); - - // Wait for the patient to appear in filtered results - await page.WaitForSelectorAsync( - $"text={uniqueName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Click Edit button for the created patient - await page.ClickAsync($"[data-testid='edit-patient-{patientId}']"); - - // Wait for edit page to load - await page.WaitForSelectorAsync( - "[data-testid='edit-patient-page']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Verify we're on the edit page with the correct patient data - await page.WaitForSelectorAsync( - "[data-testid='edit-given-name']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Modify the patient's name - var newFamilyName = $"Edited{DateTime.UtcNow.Ticks % 100000}"; - await page.FillAsync("[data-testid='edit-family-name']", newFamilyName); - - // Submit the form - await page.ClickAsync("[data-testid='save-patient']"); - - // Wait for success message - await page.WaitForSelectorAsync( - "[data-testid='edit-success']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Verify via API that patient was actually updated - var updatedPatientJson = await client.GetStringAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/{patientId}" - ); - Assert.Contains(newFamilyName, updatedPatientJson); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Browser back button navigates to previous view. - /// Proves history.pushState/popstate integration works correctly. - /// - [Fact] - public async Task BrowserBackButton_NavigatesToPreviousView() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Start on dashboard (default) - Assert.Contains("#dashboard", page.Url); - - // Navigate to Patients - await page.ClickAsync("text=Patients"); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#patients", page.Url); - - // Navigate to Appointments - await page.ClickAsync("text=Appointments"); - await page.WaitForSelectorAsync( - "[data-testid='add-appointment-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#appointments", page.Url); - - // Press browser back - should go to Patients - await page.GoBackAsync(); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#patients", page.Url); - - // Press browser back again - should go to Dashboard - await page.GoBackAsync(); - await page.WaitForSelectorAsync( - ".metric-card", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#dashboard", page.Url); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Deep linking works - navigating directly to a hash URL loads correct view. - /// - [Fact] - public async Task DeepLinking_LoadsCorrectView() - { - // Navigate directly to patients page via hash with auth - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#patients" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Verify we're on patients page - var content = await page.ContentAsync(); - Assert.Contains("Patients", content); - - // Navigate directly to appointments via hash - await page.GotoAsync($"{E2EFixture.DashboardUrl}#appointments"); - await page.WaitForSelectorAsync( - "[data-testid='add-appointment-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - content = await page.ContentAsync(); - Assert.Contains("Appointments", content); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Cancel button on edit page uses history.back() - same behavior as browser back. - /// - [Fact] - public async Task EditPatientCancelButton_UsesHistoryBack() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // Create a patient to edit - var uniqueName = $"CancelTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - $$$"""{"Active": true, "GivenName": "{{{uniqueName}}}", "FamilyName": "CancelTestPatient", "Gender": "male"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdJson = await createResponse.Content.ReadAsStringAsync(); - var patientIdMatch = System.Text.RegularExpressions.Regex.Match( - createdJson, - "\"Id\"\\s*:\\s*\"([^\"]+)\"" - ); - var patientId = patientIdMatch.Groups[1].Value; - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Navigate to Patients - await page.ClickAsync("text=Patients"); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#patients", page.Url); - - // Search for and click edit on the patient - await page.FillAsync("input[placeholder*='Search']", uniqueName); - await page.WaitForSelectorAsync( - $"text={uniqueName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.ClickAsync($"[data-testid='edit-patient-{patientId}']"); - - // Wait for edit page - await page.WaitForSelectorAsync( - "[data-testid='edit-patient-page']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - Assert.Contains($"#patients/edit/{patientId}", page.Url); - - // Click Cancel button - should use history.back() and return to patients list - await page.ClickAsync("button:has-text('Cancel')"); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Should be back on patients page - Assert.Contains("#patients", page.Url); - Assert.DoesNotContain("/edit/", page.Url); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Browser back button works from Edit Patient page. - /// This is THE test that proves the original bug is fixed - pressing browser back - /// from an edit page should return to patients list, NOT show a blank page. - /// - [Fact] - public async Task BrowserBackButton_FromEditPage_ReturnsToPatientsPage() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // Create a patient to edit - var uniqueName = $"BackBtnTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - $$$"""{"Active": true, "GivenName": "{{{uniqueName}}}", "FamilyName": "BackButtonTest", "Gender": "female"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdJson = await createResponse.Content.ReadAsStringAsync(); - var patientIdMatch = System.Text.RegularExpressions.Regex.Match( - createdJson, - "\"Id\"\\s*:\\s*\"([^\"]+)\"" - ); - var patientId = patientIdMatch.Groups[1].Value; - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - Assert.Contains("#dashboard", page.Url); - - // Navigate to Patients - await page.ClickAsync("text=Patients"); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#patients", page.Url); - - // Search for the patient - await page.FillAsync("input[placeholder*='Search']", uniqueName); - await page.WaitForSelectorAsync( - $"text={uniqueName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Click edit to go to edit page - await page.ClickAsync($"[data-testid='edit-patient-{patientId}']"); - await page.WaitForSelectorAsync( - "[data-testid='edit-patient-page']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - Assert.Contains($"#patients/edit/{patientId}", page.Url); - - // THE CRITICAL TEST: Press browser back button - // Before the fix, this would show a blank "Guest browsing" page - // After the fix, it should return to the patients list - await page.GoBackAsync(); - - // Should be back on patients page with sidebar visible (NOT a blank page) - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#patients", page.Url); - Assert.DoesNotContain("/edit/", page.Url); - - // Verify the page content is actually the patients page, not blank - var content = await page.ContentAsync(); - Assert.Contains("Patients", content); - Assert.Contains("Add Patient", content); - - // Press back again - should go to dashboard - await page.GoBackAsync(); - await page.WaitForSelectorAsync( - ".metric-card", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#dashboard", page.Url); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Forward button works after going back. - /// Proves full history navigation (back AND forward) works correctly. - /// - [Fact] - public async Task BrowserForwardButton_WorksAfterGoingBack() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Navigate: Dashboard -> Patients -> Practitioners - await page.ClickAsync("text=Patients"); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - await page.ClickAsync("text=Practitioners"); - await page.WaitForSelectorAsync( - ".practitioner-card, .empty-state", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#practitioners", page.Url); - - // Go back to Patients - await page.GoBackAsync(); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#patients", page.Url); - - // Go forward to Practitioners - await page.GoForwardAsync(); - await page.WaitForSelectorAsync( - ".practitioner-card, .empty-state", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#practitioners", page.Url); - - // Verify page content is actually practitioners page - var content = await page.ContentAsync(); - Assert.Contains("Practitioners", content); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Proves patient update API works end-to-end. - /// This test hits the real Clinical API directly without Playwright. - /// - [Fact] - public async Task PatientUpdateApi_WorksEndToEnd() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // Create a patient first - var uniqueName = $"UpdateApiTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - $$$"""{"Active": true, "GivenName": "{{{uniqueName}}}", "FamilyName": "Original", "Gender": "male"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdPatientJson = await createResponse.Content.ReadAsStringAsync(); - - // Extract patient ID - var patientIdMatch = System.Text.RegularExpressions.Regex.Match( - createdPatientJson, - "\"Id\"\\s*:\\s*\"([^\"]+)\"" - ); - Assert.True(patientIdMatch.Success, "Should get patient ID from creation response"); - var patientId = patientIdMatch.Groups[1].Value; - - // Update the patient - var updatedFamilyName = $"Updated{DateTime.UtcNow.Ticks % 100000}"; - var updateResponse = await client.PutAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/{patientId}", - new StringContent( - $$$"""{"Active": true, "GivenName": "{{{uniqueName}}}", "FamilyName": "{{{updatedFamilyName}}}", "Gender": "male", "Email": "updated@test.com"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - updateResponse.EnsureSuccessStatusCode(); - - // Verify patient was updated - var getResponse = await client.GetStringAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/{patientId}" - ); - Assert.Contains(updatedFamilyName, getResponse); - Assert.Contains("updated@test.com", getResponse); - } - - /// - /// CRITICAL TEST: Add Practitioner button opens modal and creates practitioner via API. - /// Uses Playwright to load REAL Dashboard, click Add Practitioner, fill form, and POST to REAL API. - /// - [Fact] - public async Task AddPractitionerButton_OpensModal_AndCreatesPractitioner() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Navigate to Practitioners page - await page.ClickAsync("text=Practitioners"); - await page.WaitForSelectorAsync( - "[data-testid='add-practitioner-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Click Add Practitioner button - await page.ClickAsync("[data-testid='add-practitioner-btn']"); - - // Wait for modal to appear - await page.WaitForSelectorAsync( - ".modal", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Fill in practitioner details - var uniqueIdentifier = $"DR{DateTime.UtcNow.Ticks % 100000}"; - var uniqueGivenName = $"E2EDoc{DateTime.UtcNow.Ticks % 100000}"; - await page.FillAsync("[data-testid='practitioner-identifier']", uniqueIdentifier); - await page.FillAsync("[data-testid='practitioner-given-name']", uniqueGivenName); - await page.FillAsync("[data-testid='practitioner-family-name']", "TestCreated"); - await page.FillAsync("[data-testid='practitioner-specialty']", "E2E Testing"); - - // Submit the form - await page.ClickAsync("[data-testid='submit-practitioner']"); - - // Wait for modal to close and practitioner to appear in list - await page.WaitForSelectorAsync( - $"text={uniqueGivenName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Verify via API that practitioner was actually created - using var client = E2EFixture.CreateAuthenticatedClient(); - var response = await client.GetStringAsync($"{E2EFixture.SchedulingUrl}/Practitioner"); - Assert.Contains(uniqueIdentifier, response); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Edit Practitioner button navigates to edit page and updates practitioner. - /// Uses Playwright to load REAL Dashboard, click Edit, modify data, and PUT to REAL API. - /// - [Fact] - public async Task EditPractitionerButton_OpensEditPage_AndUpdatesPractitioner() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // Create a practitioner to edit - var uniqueIdentifier = $"DREdit{DateTime.UtcNow.Ticks % 100000}"; - var uniqueGivenName = $"EditTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner", - new StringContent( - $$$"""{"Identifier": "{{{uniqueIdentifier}}}", "NameFamily": "OriginalFamily", "NameGiven": "{{{uniqueGivenName}}}", "Qualification": "MD", "Specialty": "Original Specialty"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdJson = await createResponse.Content.ReadAsStringAsync(); - var practitionerIdMatch = System.Text.RegularExpressions.Regex.Match( - createdJson, - "\"Id\"\\s*:\\s*\"([^\"]+)\"" - ); - var practitionerId = practitionerIdMatch.Groups[1].Value; - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Navigate to Practitioners page - await page.ClickAsync("text=Practitioners"); - await page.WaitForSelectorAsync( - "[data-testid='add-practitioner-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Wait for our practitioner to appear - await page.WaitForSelectorAsync( - $"text={uniqueGivenName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Hover over the card to show the edit button, then click it - var editButton = page.Locator($"[data-testid='edit-practitioner-{practitionerId}']"); - await editButton.HoverAsync(); - await editButton.ClickAsync(); - - // Wait for edit page - await page.WaitForSelectorAsync( - "[data-testid='edit-practitioner-page']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - Assert.Contains($"#practitioners/edit/{practitionerId}", page.Url); - - // Update the practitioner's specialty - var newSpecialty = $"Updated Specialty {DateTime.UtcNow.Ticks % 100000}"; - await page.FillAsync("[data-testid='edit-practitioner-specialty']", newSpecialty); - - // Save changes - await page.ClickAsync("[data-testid='save-practitioner']"); - - // Wait for success message - await page.WaitForSelectorAsync( - "[data-testid='edit-practitioner-success']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Verify via API that practitioner was actually updated - var updatedPractitionerJson = await client.GetStringAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner/{practitionerId}" - ); - Assert.Contains(newSpecialty, updatedPractitionerJson); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Proves practitioner update API works end-to-end. - /// This test hits the real Scheduling API directly without Playwright. - /// - [Fact] - public async Task PractitionerUpdateApi_WorksEndToEnd() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // Create a practitioner first - var uniqueIdentifier = $"DRApi{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner", - new StringContent( - $$$"""{"Identifier": "{{{uniqueIdentifier}}}", "NameFamily": "ApiOriginal", "NameGiven": "TestDoc", "Qualification": "MD", "Specialty": "Original"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdPractitionerJson = await createResponse.Content.ReadAsStringAsync(); - - // Extract practitioner ID - var practitionerIdMatch = System.Text.RegularExpressions.Regex.Match( - createdPractitionerJson, - "\"Id\"\\s*:\\s*\"([^\"]+)\"" - ); - Assert.True( - practitionerIdMatch.Success, - "Should get practitioner ID from creation response" - ); - var practitionerId = practitionerIdMatch.Groups[1].Value; - - // Update the practitioner - var updatedSpecialty = $"ApiUpdated{DateTime.UtcNow.Ticks % 100000}"; - var updateResponse = await client.PutAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner/{practitionerId}", - new StringContent( - $$$"""{"Identifier": "{{{uniqueIdentifier}}}", "Active": true, "NameFamily": "ApiUpdated", "NameGiven": "TestDoc", "Qualification": "DO", "Specialty": "{{{updatedSpecialty}}}", "TelecomEmail": "updated@hospital.com", "TelecomPhone": "555-1234"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - updateResponse.EnsureSuccessStatusCode(); - - // Verify practitioner was updated - var getResponse = await client.GetStringAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner/{practitionerId}" - ); - Assert.Contains(updatedSpecialty, getResponse); - Assert.Contains("ApiUpdated", getResponse); - Assert.Contains("DO", getResponse); - Assert.Contains("updated@hospital.com", getResponse); - } - - /// - /// CRITICAL TEST: Browser back button works from Edit Practitioner page. - /// Proves navigation between practitioners list and edit page works correctly. - /// - [Fact] - public async Task BrowserBackButton_FromEditPractitionerPage_ReturnsToPractitionersPage() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // Create a practitioner to edit - var uniqueIdentifier = $"DRBack{DateTime.UtcNow.Ticks % 100000}"; - var uniqueGivenName = $"BackTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner", - new StringContent( - $$$"""{"Identifier": "{{{uniqueIdentifier}}}", "NameFamily": "BackButtonTest", "NameGiven": "{{{uniqueGivenName}}}", "Qualification": "MD", "Specialty": "Testing"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdJson = await createResponse.Content.ReadAsStringAsync(); - var practitionerIdMatch = System.Text.RegularExpressions.Regex.Match( - createdJson, - "\"Id\"\\s*:\\s*\"([^\"]+)\"" - ); - var practitionerId = practitionerIdMatch.Groups[1].Value; - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - Assert.Contains("#dashboard", page.Url); - - // Navigate to Practitioners - await page.ClickAsync("text=Practitioners"); - await page.WaitForSelectorAsync( - "[data-testid='add-practitioner-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#practitioners", page.Url); - - // Wait for our practitioner to appear - await page.WaitForSelectorAsync( - $"text={uniqueGivenName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Click edit to go to edit page - var editButton = page.Locator($"[data-testid='edit-practitioner-{practitionerId}']"); - await editButton.HoverAsync(); - await editButton.ClickAsync(); - await page.WaitForSelectorAsync( - "[data-testid='edit-practitioner-page']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - Assert.Contains($"#practitioners/edit/{practitionerId}", page.Url); - - // Press browser back button - await page.GoBackAsync(); - - // Should be back on practitioners page with sidebar visible - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='add-practitioner-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#practitioners", page.Url); - Assert.DoesNotContain("/edit/", page.Url); - - // Verify the page content is actually the practitioners page - var content = await page.ContentAsync(); - Assert.Contains("Practitioners", content); - Assert.Contains("Add Practitioner", content); - - // Press back again - should go to dashboard - await page.GoBackAsync(); - await page.WaitForSelectorAsync( - ".metric-card", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#dashboard", page.Url); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Sync Dashboard menu item navigates to sync page and displays sync status. - /// Proves the sync dashboard UI is accessible from the sidebar navigation. - /// - [Fact] - public async Task SyncDashboard_NavigatesToSyncPage_AndDisplaysStatus() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Click Sync Dashboard in sidebar - await page.ClickAsync("text=Sync Dashboard"); - - // Wait for sync page to load - await page.WaitForSelectorAsync( - "[data-testid='sync-page']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Verify URL - Assert.Contains("#sync", page.Url); - - // Verify service status cards are displayed - await page.WaitForSelectorAsync( - "[data-testid='service-status-clinical']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='service-status-scheduling']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Verify sync records table is displayed - await page.WaitForSelectorAsync( - "[data-testid='sync-records-table']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Verify filter controls exist (service-filter and action-filter) - await page.WaitForSelectorAsync( - "[data-testid='service-filter']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='action-filter']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Verify page content - var content = await page.ContentAsync(); - Assert.Contains("Sync Dashboard", content); - Assert.Contains("Clinical.Api", content); - Assert.Contains("Scheduling.Api", content); - Assert.Contains("Sync Records", content); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Sync Dashboard filters work correctly. - /// Tests service and action filtering functionality. - /// - [Fact] - public async Task SyncDashboard_FiltersWorkCorrectly() - { - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#sync" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - "[data-testid='sync-page']", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Wait for sync records table to be loaded - await page.WaitForSelectorAsync( - "[data-testid='sync-records-table']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Get initial record count (may be 0 initially) - var initialRows = await page.QuerySelectorAllAsync( - "[data-testid='sync-records-table'] tbody tr" - ); - var initialCount = initialRows.Count; - - // Filter by service - select 'clinical' - await page.SelectOptionAsync("[data-testid='service-filter']", "clinical"); - - // Wait for filter to apply - await Task.Delay(500); - var filteredRows = await page.QuerySelectorAllAsync( - "[data-testid='sync-records-table'] tbody tr" - ); - Assert.True( - filteredRows.Count <= initialCount, - "Filtered results should be <= initial count" - ); - - // Reset filter - await page.SelectOptionAsync("[data-testid='service-filter']", "all"); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Deep linking to sync page works. - /// Navigating directly to #sync loads the sync dashboard. - /// - [Fact] - public async Task SyncDashboard_DeepLinkingWorks() - { - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#sync" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - - // Wait for sync page to load - await page.WaitForSelectorAsync( - "[data-testid='sync-page']", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Verify we're on the sync page - var content = await page.ContentAsync(); - Assert.Contains("Sync Dashboard", content); - Assert.Contains("Monitor and manage sync operations", content); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Edit Appointment button opens edit page and updates appointment via API. - /// Uses Playwright to load REAL Dashboard, click Edit, modify form, and PUT to REAL API. - /// - [Fact] - public async Task EditAppointmentButton_OpensEditPage_AndUpdatesAppointment() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // First create an appointment to edit - var uniqueServiceType = $"EditApptTest{DateTime.UtcNow.Ticks % 100000}"; - var startTime = DateTime.UtcNow.AddDays(7).ToString("yyyy-MM-ddTHH:mm:ss.fffZ"); - var endTime = DateTime - .UtcNow.AddDays(7) - .AddMinutes(30) - .ToString("yyyy-MM-ddTHH:mm:ss.fffZ"); - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Appointment", - new StringContent( - $$$"""{"ServiceCategory": "General", "ServiceType": "{{{uniqueServiceType}}}", "Priority": "routine", "Start": "{{{startTime}}}", "End": "{{{endTime}}}", "PatientReference": "Patient/1", "PractitionerReference": "Practitioner/1"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdAppointmentJson = await createResponse.Content.ReadAsStringAsync(); - - // Extract appointment ID from response - var appointmentIdMatch = System.Text.RegularExpressions.Regex.Match( - createdAppointmentJson, - "\"Id\"\\s*:\\s*\"([^\"]+)\"" - ); - Assert.True(appointmentIdMatch.Success, "Should get appointment ID from creation response"); - var appointmentId = appointmentIdMatch.Groups[1].Value; - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Navigate to Appointments page - await page.ClickAsync("text=Appointments"); - await page.WaitForSelectorAsync( - $"text={uniqueServiceType}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Click Edit button for the created appointment (in the same table row) - var editButton = await page.QuerySelectorAsync( - $"tr:has-text('{uniqueServiceType}') .btn-secondary" - ); - Assert.NotNull(editButton); - await editButton.ClickAsync(); - - // Wait for edit page to load - await page.WaitForSelectorAsync( - "text=Edit Appointment", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Modify the appointment's service type - var newServiceType = $"Edited{DateTime.UtcNow.Ticks % 100000}"; - await page.FillAsync("#appointment-service-type", newServiceType); - - // Submit the form - await page.ClickAsync("button:has-text('Save Changes')"); - - // Wait for success message - await page.WaitForSelectorAsync( - "text=Appointment updated successfully", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Verify via API that appointment was actually updated - var updatedAppointmentJson = await client.GetStringAsync( - $"{E2EFixture.SchedulingUrl}/Appointment/{appointmentId}" - ); - Assert.Contains(newServiceType, updatedAppointmentJson); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Calendar page displays appointments in calendar grid. - /// Uses Playwright to navigate to calendar and verify appointments are shown. - /// - [Fact] - public async Task CalendarPage_DisplaysAppointmentsInCalendarGrid() - { - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#calendar" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Wait for calendar grid container to appear - await page.WaitForSelectorAsync( - ".calendar-grid-container", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Verify calendar grid is displayed - var content = await page.ContentAsync(); - Assert.Contains("calendar-grid", content); - - // Verify day names are displayed - Assert.Contains("Sun", content); - Assert.Contains("Mon", content); - Assert.Contains("Tue", content); - Assert.Contains("Wed", content); - Assert.Contains("Thu", content); - Assert.Contains("Fri", content); - Assert.Contains("Sat", content); - - // Verify navigation controls exist - Assert.Contains("Today", content); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Calendar page allows clicking on a day to view appointments. - /// Uses Playwright to click on a day and verify the details panel shows. - /// - [Fact] - public async Task CalendarPage_ClickOnDay_ShowsAppointmentDetails() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // Create an appointment for today - use LOCAL time since browser calendar uses local timezone - var today = DateTime.Now; - var startTime = new DateTime( - today.Year, - today.Month, - today.Day, - 14, - 0, - 0, - DateTimeKind.Local - ).ToString("yyyy-MM-ddTHH:mm:ss.fffZ"); - var endTime = new DateTime( - today.Year, - today.Month, - today.Day, - 14, - 30, - 0, - DateTimeKind.Local - ).ToString("yyyy-MM-ddTHH:mm:ss.fffZ"); - var uniqueServiceType = $"CalTest{DateTime.Now.Ticks % 100000}"; - - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Appointment", - new StringContent( - $$$"""{"ServiceCategory": "General", "ServiceType": "{{{uniqueServiceType}}}", "Priority": "routine", "Start": "{{{startTime}}}", "End": "{{{endTime}}}", "PatientReference": "Patient/1", "PractitionerReference": "Practitioner/1"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - Console.WriteLine( - $"[TEST] Created appointment with ServiceType: {uniqueServiceType}, Start: {startTime}" - ); - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Navigate to Calendar page - await page.ClickAsync("text=Schedule"); - await page.WaitForSelectorAsync( - ".calendar-grid", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Wait for appointments to load - today's cell should have has-appointments class - await page.WaitForSelectorAsync( - ".calendar-cell.today.has-appointments", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Click on today's cell (it has the "today" class and now has appointments) - var todayCell = page.Locator(".calendar-cell.today").First; - await todayCell.ClickAsync(); - - // Wait for the details panel to update (look for date header) - await page.WaitForSelectorAsync( - ".calendar-details-panel h4", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Debug: output the details panel content - var detailsContent = await page.Locator(".calendar-details-panel").InnerTextAsync(); - Console.WriteLine($"[TEST] Details panel content: {detailsContent}"); - - // Wait for the appointment content to appear in the details panel - await page.WaitForSelectorAsync( - $"text={uniqueServiceType}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Verify the appointment is displayed in the details panel - var content = await page.ContentAsync(); - Assert.Contains(uniqueServiceType, content); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Calendar page Edit button opens edit appointment page. - /// Uses Playwright to click Edit from calendar day details and verify navigation. - /// - [Fact] - public async Task CalendarPage_EditButton_OpensEditAppointmentPage() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // Create an appointment for today using LOCAL time (calendar uses DateTime.Now) - var today = DateTime.Now; - var startTime = new DateTime( - today.Year, - today.Month, - today.Day, - 15, - 0, - 0, - DateTimeKind.Local - ) - .ToUniversalTime() - .ToString("yyyy-MM-ddTHH:mm:ss.fffZ"); - var endTime = new DateTime( - today.Year, - today.Month, - today.Day, - 15, - 30, - 0, - DateTimeKind.Local - ) - .ToUniversalTime() - .ToString("yyyy-MM-ddTHH:mm:ss.fffZ"); - var uniqueServiceType = $"CalEdit{DateTime.UtcNow.Ticks % 100000}"; - - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Appointment", - new StringContent( - $$$"""{"ServiceCategory": "General", "ServiceType": "{{{uniqueServiceType}}}", "Priority": "routine", "Start": "{{{startTime}}}", "End": "{{{endTime}}}", "PatientReference": "Patient/1", "PractitionerReference": "Practitioner/1"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Navigate to Calendar page - await page.ClickAsync("text=Schedule"); - await page.WaitForSelectorAsync( - ".calendar-grid", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Click on today's cell - await page.ClickAsync(".calendar-cell.today"); - - // Wait for the details panel - await page.WaitForSelectorAsync( - ".calendar-details-panel", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Wait for the specific appointment to appear - await page.WaitForSelectorAsync( - $"text={uniqueServiceType}", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Click the Edit button in the calendar appointment item - var editButton = await page.QuerySelectorAsync( - $".calendar-appointment-item:has-text('{uniqueServiceType}') button:has-text('Edit')" - ); - Assert.NotNull(editButton); - await editButton.ClickAsync(); - - // Wait for edit page to load - await page.WaitForSelectorAsync( - "text=Edit Appointment", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Verify we're on the edit page with the correct data - var content = await page.ContentAsync(); - Assert.Contains("Edit Appointment", content); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Calendar navigation (previous/next month) works. - /// Uses Playwright to click navigation buttons and verify month changes. - /// - [Fact] - public async Task CalendarPage_NavigationButtons_ChangeMonth() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Navigate to Calendar page - await page.ClickAsync("text=Schedule"); - await page.WaitForSelectorAsync( - ".calendar-grid", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Get the current month displayed - var currentMonthYear = await page.TextContentAsync(".text-lg.font-semibold"); - Assert.NotNull(currentMonthYear); - - // Click next month button - use locator within the header flex container - var headerControls = page.Locator(".page-header .flex.items-center.gap-4"); - var nextButton = headerControls.Locator("button.btn-secondary").Nth(1); - await nextButton.ClickAsync(); - await Task.Delay(300); - - // Verify month changed - var newMonthYear = await page.TextContentAsync(".text-lg.font-semibold"); - Assert.NotEqual(currentMonthYear, newMonthYear); - - // Click previous month button twice to go back - var prevButton = headerControls.Locator("button.btn-secondary").First; - await prevButton.ClickAsync(); - await Task.Delay(300); - await prevButton.ClickAsync(); - await Task.Delay(300); - - // Verify month changed again - var finalMonthYear = await page.TextContentAsync(".text-lg.font-semibold"); - Assert.NotEqual(newMonthYear, finalMonthYear); - - // Click "Today" button - await page.ClickAsync("button:has-text('Today')"); - await Task.Delay(500); - - // Should be back to current month - var todayContent = await page.ContentAsync(); - Assert.Contains("today", todayContent); // Calendar cell should have "today" class - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Deep linking to calendar page works. - /// Navigating directly to #calendar loads the calendar view. - /// - [Fact] - public async Task CalendarPage_DeepLinkingWorks() - { - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#calendar" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".calendar-grid", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Verify we're on the calendar page - var content = await page.ContentAsync(); - Assert.Contains("Schedule", content); - Assert.Contains("View and manage appointments on the calendar", content); - Assert.Contains("calendar-grid", content); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Login page uses discoverable credentials (no email required). - /// The login page should NOT show an email field for sign-in mode. - /// - [Fact] - public async Task LoginPage_DoesNotRequireEmailForSignIn() - { - var page = await _fixture.Browser!.NewPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - // Navigate to Dashboard without auth - should show login page - await page.GotoAsync(E2EFixture.DashboardUrl); - - // Wait for login page to appear - await page.WaitForSelectorAsync( - ".login-card", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Verify login page is shown - var pageContent = await page.ContentAsync(); - Assert.Contains("Healthcare Dashboard", pageContent); - Assert.Contains("Sign in with your passkey", pageContent); - - // CRITICAL: Login mode should NOT have email input field - // Email is only needed for registration, not for discoverable credential login - var emailInputVisible = await page.IsVisibleAsync("input[type='email']"); - Assert.False( - emailInputVisible, - "Login mode should NOT show email field - discoverable credentials don't need email!" - ); - - // Should have a sign-in button - var signInButton = page.Locator("button:has-text('Sign in with Passkey')"); - await signInButton.WaitForAsync(new LocatorWaitForOptions { Timeout = 5000 }); - Assert.True(await signInButton.IsVisibleAsync()); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Registration page requires email and display name. - /// - [Fact] - public async Task LoginPage_RegistrationRequiresEmailAndDisplayName() - { - var page = await _fixture.Browser!.NewPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - // Navigate to Dashboard without auth - await page.GotoAsync(E2EFixture.DashboardUrl); - - // Wait for login page - await page.WaitForSelectorAsync( - ".login-card", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Click "Register" to switch to registration mode - await page.ClickAsync("button:has-text('Register')"); - await Task.Delay(500); - - // Verify we're in registration mode - var pageContent = await page.ContentAsync(); - Assert.Contains("Create your account", pageContent); - - // Registration mode SHOULD have email and display name fields - var emailInput = page.Locator("input[type='email']"); - var displayNameInput = page.Locator("input#displayName"); - - Assert.True(await emailInput.IsVisibleAsync(), "Registration mode should have email input"); - Assert.True( - await displayNameInput.IsVisibleAsync(), - "Registration mode should have display name input" - ); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Gatekeeper API /auth/login/begin returns valid response for discoverable credentials. - /// This verifies the API contract: empty body should return { ChallengeId, OptionsJson }. - /// - [Fact] - public async Task GatekeeperApi_LoginBegin_ReturnsValidDiscoverableCredentialOptions() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // Call /auth/login/begin with empty body (discoverable credentials flow) - var response = await client.PostAsync( - $"{E2EFixture.GatekeeperUrl}/auth/login/begin", - new StringContent("{}", System.Text.Encoding.UTF8, "application/json") - ); - - // Should return 200 OK - Assert.True( - response.IsSuccessStatusCode, - $"Expected 200 OK but got {response.StatusCode}: {await response.Content.ReadAsStringAsync()}" - ); - - var json = await response.Content.ReadAsStringAsync(); - Console.WriteLine($"[API TEST] Response: {json}"); - - // Parse and verify response structure - using var doc = System.Text.Json.JsonDocument.Parse(json); - var root = doc.RootElement; - - // Must have ChallengeId - Assert.True( - root.TryGetProperty("ChallengeId", out var challengeId), - "Response must have ChallengeId property" - ); - Assert.False( - string.IsNullOrEmpty(challengeId.GetString()), - "ChallengeId must not be empty" - ); - - // Must have OptionsJson (string containing JSON) - Assert.True( - root.TryGetProperty("OptionsJson", out var optionsJson), - "Response must have OptionsJson property" - ); - var optionsJsonStr = optionsJson.GetString(); - Assert.False(string.IsNullOrEmpty(optionsJsonStr), "OptionsJson must not be empty"); - - // OptionsJson should be valid JSON that can be parsed - using var optionsDoc = System.Text.Json.JsonDocument.Parse(optionsJsonStr!); - var options = optionsDoc.RootElement; - - // Verify critical WebAuthn fields - Assert.True(options.TryGetProperty("challenge", out _), "Options must have challenge"); - Assert.True(options.TryGetProperty("rpId", out _), "Options must have rpId"); - - // For discoverable credentials, allowCredentials should be empty array - if (options.TryGetProperty("allowCredentials", out var allowCreds)) - { - Assert.Equal(System.Text.Json.JsonValueKind.Array, allowCreds.ValueKind); - Assert.Equal(0, allowCreds.GetArrayLength()); - Console.WriteLine( - "[API TEST] allowCredentials is empty array - correct for discoverable credentials!" - ); - } - } - - /// - /// CRITICAL TEST: Gatekeeper API /auth/register/begin returns valid response. - /// - [Fact] - public async Task GatekeeperApi_RegisterBegin_ReturnsValidOptions() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // Call /auth/register/begin with email and display name - var response = await client.PostAsync( - $"{E2EFixture.GatekeeperUrl}/auth/register/begin", - new StringContent( - """{"Email": "test-e2e@example.com", "DisplayName": "E2E Test User"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - - // Should return 200 OK - Assert.True( - response.IsSuccessStatusCode, - $"Expected 200 OK but got {response.StatusCode}: {await response.Content.ReadAsStringAsync()}" - ); - - var json = await response.Content.ReadAsStringAsync(); - Console.WriteLine($"[API TEST] Response: {json}"); - - // Parse and verify response structure - using var doc = System.Text.Json.JsonDocument.Parse(json); - var root = doc.RootElement; - - // Must have ChallengeId - Assert.True( - root.TryGetProperty("ChallengeId", out var challengeId), - "Response must have ChallengeId property" - ); - Assert.False( - string.IsNullOrEmpty(challengeId.GetString()), - "ChallengeId must not be empty" - ); - - // Must have OptionsJson - Assert.True( - root.TryGetProperty("OptionsJson", out var optionsJson), - "Response must have OptionsJson property" - ); - var optionsJsonStr = optionsJson.GetString(); - Assert.False(string.IsNullOrEmpty(optionsJsonStr), "OptionsJson must not be empty"); - - // OptionsJson should be valid JSON - using var optionsDoc = System.Text.Json.JsonDocument.Parse(optionsJsonStr!); - var options = optionsDoc.RootElement; - - // Verify critical WebAuthn registration fields - Assert.True(options.TryGetProperty("challenge", out _), "Options must have challenge"); - Assert.True(options.TryGetProperty("rp", out _), "Options must have rp (relying party)"); - Assert.True(options.TryGetProperty("user", out _), "Options must have user"); - Assert.True( - options.TryGetProperty("pubKeyCredParams", out _), - "Options must have pubKeyCredParams" - ); - - // Verify resident key is required for discoverable credentials - if (options.TryGetProperty("authenticatorSelection", out var authSelection)) - { - if (authSelection.TryGetProperty("residentKey", out var residentKey)) - { - Assert.Equal("required", residentKey.GetString()); - Console.WriteLine( - "[API TEST] residentKey is 'required' - correct for discoverable credentials!" - ); - } - } - } - - /// - /// CRITICAL TEST: Dashboard sign-in flow calls API and handles response correctly. - /// Tests the full flow: button click -> API call -> no JSON parse errors. - /// - [Fact] - public async Task LoginPage_SignInButton_CallsApiWithoutJsonErrors() - { - var page = await _fixture.Browser!.NewPageAsync(); - var consoleErrors = new List(); - var networkRequests = new List(); - - page.Console += (_, msg) => - { - Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - if (msg.Type == "error") - consoleErrors.Add(msg.Text); - }; - - page.Request += (_, request) => - { - if (request.Url.Contains("/auth/")) - { - networkRequests.Add($"{request.Method} {request.Url}"); - Console.WriteLine($"[NETWORK] {request.Method} {request.Url}"); - } - }; - - // Navigate to Dashboard without auth - await page.GotoAsync(E2EFixture.DashboardUrl); - - // Wait for login page - await page.WaitForSelectorAsync( - ".login-card", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Click Sign in with Passkey button - await page.ClickAsync("button:has-text('Sign in with Passkey')"); - - // Wait for API call and potential error handling - await Task.Delay(3000); - - // Verify the API was called - Assert.Contains(networkRequests, r => r.Contains("/auth/login/begin")); - - // Check for JSON parse errors in console - var hasJsonParseError = consoleErrors.Any(e => - e.Contains("undefined") || e.Contains("is not valid JSON") || e.Contains("SyntaxError") - ); - - // Check for JSON parse errors in UI - var errorVisible = await page.IsVisibleAsync(".login-error"); - var errorText = errorVisible ? await page.TextContentAsync(".login-error") : null; - - var hasUiJsonError = - errorText?.Contains("undefined") == true - || errorText?.Contains("is not valid JSON") == true - || errorText?.Contains("SyntaxError") == true; - - Assert.False( - hasJsonParseError || hasUiJsonError, - $"Sign-in flow had JSON parse errors! Console: [{string.Join(", ", consoleErrors)}], UI: [{errorText}]" - ); - - // The WebAuthn prompt will fail in headless mode (no authenticator), but that's expected - // The important thing is no JSON parsing errors - Console.WriteLine($"[TEST] API called, no JSON errors. UI error (expected): {errorText}"); - - await page.CloseAsync(); - } - - [Fact] - public async Task UserMenu_ClickShowsDropdownWithSignOut() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // User menu button should be visible in header - var userMenuButton = await page.QuerySelectorAsync("[data-testid='user-menu-button']"); - Assert.NotNull(userMenuButton); - - // Click the user menu button to open dropdown - await userMenuButton.ClickAsync(); - - // Wait for dropdown to appear - await page.WaitForSelectorAsync( - "[data-testid='user-dropdown']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Sign out button should be visible in the dropdown - var signOutButton = await page.QuerySelectorAsync("[data-testid='logout-button']"); - Assert.NotNull(signOutButton); - - var isVisible = await signOutButton.IsVisibleAsync(); - Assert.True(isVisible, "Sign out button should be visible in dropdown menu"); - - await page.CloseAsync(); - } - - [Fact] - public async Task SignOutButton_ClickShowsLoginPage() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - // Wait for the sidebar to appear (authenticated state) - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Click user menu button in header to open dropdown - await page.ClickAsync("[data-testid='user-menu-button']"); - - // Wait for dropdown to appear - await page.WaitForSelectorAsync( - "[data-testid='user-dropdown']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Click sign out button in dropdown - await page.ClickAsync("[data-testid='logout-button']"); - - // Should show login page after sign out - await page.WaitForSelectorAsync( - "[data-testid='login-page']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Verify token was cleared from localStorage - var tokenAfterLogout = await page.EvaluateAsync( - "() => localStorage.getItem('gatekeeper_token')" - ); - Assert.Null(tokenAfterLogout); - - var userAfterLogout = await page.EvaluateAsync( - "() => localStorage.getItem('gatekeeper_user')" - ); - Assert.Null(userAfterLogout); - - await page.CloseAsync(); - } - - [Fact] - public async Task GatekeeperApi_Logout_RevokesToken() - { - // Test 1: Without a Bearer token, should return 401 Unauthorized - using var unauthClient = new HttpClient(); - var unauthResponse = await unauthClient.PostAsync( - $"{E2EFixture.GatekeeperUrl}/auth/logout", - new StringContent("{}", System.Text.Encoding.UTF8, "application/json") - ); - Assert.Equal(HttpStatusCode.Unauthorized, unauthResponse.StatusCode); - - // Test 2: With a valid Bearer token, should return 204 NoContent (logout succeeds) - using var authClient = E2EFixture.CreateAuthenticatedClient(); - var authResponse = await authClient.PostAsync( - $"{E2EFixture.GatekeeperUrl}/auth/logout", - new StringContent("{}", System.Text.Encoding.UTF8, "application/json") - ); - Assert.Equal(HttpStatusCode.NoContent, authResponse.StatusCode); - } - - [Fact] - public async Task UserMenu_DisplaysUserInitialsAndNameInDropdown() - { - // Create page with specific user details - var page = await _fixture.CreateAuthenticatedPageAsync( - userId: "test-user", - displayName: "Alice Smith", - email: "alice@example.com" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Verify initials in header avatar button (should be "AS" for Alice Smith) - var avatarText = await page.TextContentAsync("[data-testid='user-menu-button']"); - Assert.Equal("AS", avatarText?.Trim()); - - // Click the user menu button to open dropdown - await page.ClickAsync("[data-testid='user-menu-button']"); - - // Wait for dropdown to appear - await page.WaitForSelectorAsync( - "[data-testid='user-dropdown']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - // Verify the user's name is displayed in dropdown header - var userNameText = await page.TextContentAsync(".user-dropdown-name"); - Assert.Contains("Alice Smith", userNameText); - - // Verify email is displayed - var emailText = await page.TextContentAsync(".user-dropdown-email"); - Assert.Contains("alice@example.com", emailText); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: First-time sign-in must work WITHOUT browser refresh. - /// This test simulates a successful WebAuthn login by injecting the token and calling - /// the onLogin callback, then verifies the app transitions to dashboard immediately. - /// BUG: Previously, first-time sign-in required a page refresh to work. - /// - [Fact] - public async Task FirstTimeSignIn_TransitionsToDashboard_WithoutRefresh() - { - var page = await _fixture.Browser!.NewPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - // Navigate to Dashboard without auth - should show login page - await page.GotoAsync(E2EFixture.DashboardUrl); - - // Wait for login page to appear - await page.WaitForSelectorAsync( - "[data-testid='login-page']", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Verify we're on the login page - var loginPageVisible = await page.IsVisibleAsync("[data-testid='login-page']"); - Assert.True(loginPageVisible, "Should start on login page"); - - // Wait for React to mount and set the __triggerLogin hook - await page.WaitForFunctionAsync( - "() => typeof window.__triggerLogin === 'function'", - new PageWaitForFunctionOptions { Timeout = 10000 } - ); - - // Simulate what happens after successful WebAuthn authentication: - // 1. Token is stored in localStorage - // 2. onLogin callback is called which sets isAuthenticated=true - // This is what the LoginPage component does after successful auth - var testToken = E2EFixture.GenerateTestToken( - userId: "test-user-123", - displayName: "Test User", - email: "test@example.com" - ); - await page.EvaluateAsync( - $@"() => {{ - console.log('[TEST] Setting token and triggering login'); - // Store a properly-signed token and user (what setAuthToken and setAuthUser do) - localStorage.setItem('gatekeeper_token', '{testToken}'); - localStorage.setItem('gatekeeper_user', JSON.stringify({{ - userId: 'test-user-123', - displayName: 'Test User', - email: 'test@example.com' - }})); - - // Trigger the React state update by calling the exposed login handler - // This simulates what happens when LoginPage calls onLogin after successful auth - window.__triggerLogin({{ - userId: 'test-user-123', - displayName: 'Test User', - email: 'test@example.com' - }}); - console.log('[TEST] Login triggered, waiting for React state update'); - }}" - ); - - // Wait for React state update and re-render - await Task.Delay(2000); - - // Check if sidebar is now visible (indicates successful transition to dashboard) - // If this times out, the bug exists - app didn't transition without refresh - try - { - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Verify login page is gone - var loginPageStillVisible = await page.IsVisibleAsync("[data-testid='login-page']"); - Assert.False( - loginPageStillVisible, - "Login page should be hidden after successful login" - ); - - // Verify sidebar is visible (dashboard state) - var sidebarVisible = await page.IsVisibleAsync(".sidebar"); - Assert.True(sidebarVisible, "Sidebar should be visible after login without refresh"); - } - catch (TimeoutException) - { - // If we get here, the bug exists - first-time sign-in doesn't work without refresh - Assert.Fail( - "FIRST-TIME SIGN-IN BUG: App did not transition to dashboard after login. " - + "User must refresh the browser for login to take effect. " - + "Fix: Expose window.__triggerLogin in App component for testing, " - + "or verify onLogin callback properly triggers React state update." - ); - } - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Clinical Coding page navigates and displays correctly. - /// - [Fact] - public async Task ClinicalCoding_NavigatesToPage_AndDisplaysSearchOptions() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Navigate to Clinical Coding page - await page.ClickAsync("text=Clinical Coding"); - - // Wait for page to load - await page.WaitForSelectorAsync( - ".clinical-coding-page", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - // Verify search tabs are present - var content = await page.ContentAsync(); - Assert.Contains("Keyword Search", content); - Assert.Contains("AI Search", content); - Assert.Contains("Code Lookup", content); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Clinical Coding keyword search returns results with Chapter and Category. - /// - [Fact] - public async Task ClinicalCoding_KeywordSearch_ReturnsResultsWithChapterAndCategory() - { - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#clinical-coding" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - await page.WaitForSelectorAsync( - ".clinical-coding-page", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Ensure Keyword Search tab is active (it's default) - await page.ClickAsync("text=Keyword Search"); - await Task.Delay(500); - - // Enter search query - await page.FillAsync("input[placeholder*='Search by code']", "diabetes"); - - // Click search button - await page.ClickAsync("button:has-text('Search')"); - - // Wait for results table - await page.WaitForSelectorAsync( - ".table", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - // Verify table has Chapter and Category columns - var content = await page.ContentAsync(); - Assert.Contains("Chapter", content); - Assert.Contains("Category", content); - - // Verify we got results (table rows) - var rows = await page.QuerySelectorAllAsync(".table tbody tr"); - Assert.True(rows.Count > 0, "Should return search results for 'diabetes'"); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Clinical Coding AI search returns results with Chapter and Category. - /// Requires ICD-10 API with embedding service running. - /// - [Fact] - public async Task ClinicalCoding_AISearch_ReturnsResultsWithChapterAndCategory() - { - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#clinical-coding" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - await page.WaitForSelectorAsync( - ".clinical-coding-page", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Click AI Search tab - await page.ClickAsync("text=AI Search"); - await Task.Delay(500); - - // Enter semantic search query - await page.FillAsync( - "input[placeholder*='Describe symptoms']", - "chest pain with shortness of breath" - ); - - // Click search button - await page.ClickAsync("button:has-text('Search')"); - - // Wait for results - may take longer due to embedding service - try - { - await page.WaitForSelectorAsync( - ".table", - new PageWaitForSelectorOptions { Timeout = 30000 } - ); - - // Verify table has Chapter and Category columns - var content = await page.ContentAsync(); - Assert.Contains("Chapter", content); - Assert.Contains("Category", content); - - // Verify we got AI-matched results - Assert.Contains("AI-matched results", content); - } - catch (TimeoutException) - { - // AI search requires embedding service - skip if not available - Console.WriteLine("[TEST] AI search timed out - embedding service may not be running"); - } - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Clinical Coding code lookup returns detailed code info. - /// - [Fact] - public async Task ClinicalCoding_CodeLookup_ReturnsDetailedCodeInfo() - { - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#clinical-coding" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - await page.WaitForSelectorAsync( - ".clinical-coding-page", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Click Code Lookup tab - await page.ClickAsync("text=Code Lookup"); - await Task.Delay(500); - - // Enter exact code - await page.FillAsync("input[placeholder*='Enter exact ICD-10 code']", "E11.9"); - - // Click search button - await page.ClickAsync("button:has-text('Search')"); - - // Wait for code detail view - await page.WaitForSelectorAsync( - ".card", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - // Verify code detail is displayed - var content = await page.ContentAsync(); - - // Should show the code and description - Assert.Contains("E11", content); - Assert.Contains("diabetes", content.ToLowerInvariant()); - - await page.CloseAsync(); - } - - /// - /// CRITICAL TEST: Deep linking to clinical coding page works. - /// - [Fact] - public async Task ClinicalCoding_DeepLinkingWorks() - { - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#clinical-coding" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - // Wait for clinical coding page to load - await page.WaitForSelectorAsync( - ".clinical-coding-page", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - // Verify we're on the clinical coding page - var content = await page.ContentAsync(); - Assert.Contains("Clinical Coding", content); - Assert.Contains("ICD-10", content); - - await page.CloseAsync(); - } -} diff --git a/Dashboard/Dashboard.Integration.Tests/E2EFixture.cs b/Dashboard/Dashboard.Integration.Tests/E2EFixture.cs deleted file mode 100644 index 2ebc415..0000000 --- a/Dashboard/Dashboard.Integration.Tests/E2EFixture.cs +++ /dev/null @@ -1,1178 +0,0 @@ -using System.Diagnostics; -using System.Net; -using System.Security.Cryptography; -using System.Text; -using System.Text.Json; -using ICD10.TestSupport; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Hosting.Server; -using Microsoft.AspNetCore.Hosting.Server.Features; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.FileProviders; -using Microsoft.Extensions.Hosting; -using Microsoft.Playwright; -using Npgsql; -using Testcontainers.PostgreSql; - -namespace Dashboard.Integration.Tests; - -/// -/// Shared fixture that starts all services ONCE for all E2E tests. -/// Set E2E_USE_LOCAL=true to skip Testcontainers/process startup and run against -/// an already-running local dev stack (started via `make start-local`). -/// -public sealed class E2EFixture : IAsyncLifetime -{ - /// - /// When true, tests run against an already-running local dev stack - /// instead of spinning up Testcontainers and API processes. - /// - private static readonly bool UseLocalStack = - Environment.GetEnvironmentVariable("E2E_USE_LOCAL") is "true" or "1"; - - private PostgreSqlContainer? _postgresContainer; - private Process? _clinicalProcess; - private Process? _schedulingProcess; - private Process? _gatekeeperProcess; - private Process? _icd10Process; - private Process? _clinicalSyncProcess; - private Process? _schedulingSyncProcess; - private IHost? _dashboardHost; - - /// - /// Playwright instance shared by all tests. - /// - public IPlaywright? Playwright { get; private set; } - - /// - /// Browser instance shared by all tests. - /// - public IBrowser? Browser { get; private set; } - - /// - /// Clinical API URL. Override with E2E_CLINICAL_URL env var. - /// - public static string ClinicalUrl { get; } = - Environment.GetEnvironmentVariable("E2E_CLINICAL_URL") ?? "http://localhost:5080"; - - /// - /// Scheduling API URL. Override with E2E_SCHEDULING_URL env var. - /// - public static string SchedulingUrl { get; } = - Environment.GetEnvironmentVariable("E2E_SCHEDULING_URL") ?? "http://localhost:5001"; - - /// - /// Gatekeeper Auth API URL. Override with E2E_GATEKEEPER_URL env var. - /// - public static string GatekeeperUrl { get; } = - Environment.GetEnvironmentVariable("E2E_GATEKEEPER_URL") ?? "http://localhost:5002"; - - /// - /// ICD-10 API URL. Override with E2E_ICD10_URL env var. - /// - public static string Icd10Url { get; } = - Environment.GetEnvironmentVariable("E2E_ICD10_URL") ?? "http://localhost:5090"; - - /// - /// Dashboard URL - dynamically assigned in container mode, defaults to local in local mode. - /// - public static string DashboardUrl { get; private set; } = "http://localhost:5173"; - - /// - /// Start all services ONCE for all tests. - /// When E2E_USE_LOCAL=true, skips all infrastructure and connects to already-running services. - /// - public async Task InitializeAsync() - { - if (UseLocalStack) - { - Console.WriteLine("[E2E] LOCAL MODE: connecting to already-running services"); - Console.WriteLine($"[E2E] Clinical: {ClinicalUrl}"); - Console.WriteLine($"[E2E] Scheduling: {SchedulingUrl}"); - Console.WriteLine($"[E2E] Gatekeeper: {GatekeeperUrl}"); - Console.WriteLine($"[E2E] ICD-10: {Icd10Url}"); - Console.WriteLine($"[E2E] Dashboard: {DashboardUrl}"); - - await WaitForServiceReachableAsync(ClinicalUrl, "/fhir/Patient/"); - await WaitForServiceReachableAsync(SchedulingUrl, "/Practitioner"); - await WaitForServiceReachableAsync(GatekeeperUrl, "/auth/login/begin"); - - await SeedTestDataAsync(); - - Playwright = await Microsoft.Playwright.Playwright.CreateAsync(); - Browser = await Playwright.Chromium.LaunchAsync( - new BrowserTypeLaunchOptions { Headless = true } - ); - return; - } - - await Task.WhenAll( - KillProcessOnPortAsync(5080), - KillProcessOnPortAsync(5001), - KillProcessOnPortAsync(5002), - KillProcessOnPortAsync(5090) - ); - await Task.Delay(500); - - // Start PostgreSQL container for all APIs (use pgvector for ICD-10 support) - _postgresContainer = new PostgreSqlBuilder() - .WithImage("pgvector/pgvector:pg16") - .WithDatabase("e2e_shared") - .WithUsername("test") - .WithPassword("test") - .Build(); - - await _postgresContainer.StartAsync(); - var baseConnStr = _postgresContainer.GetConnectionString(); - - // Set environment variable so other test factories can connect - // (DashboardApiCorsTests use their own WebApplicationFactory) - Environment.SetEnvironmentVariable("TEST_POSTGRES_CONNECTION", baseConnStr); - - // Create separate databases for each API - var clinicalConnStr = await CreateDatabaseAsync(baseConnStr, "clinical_e2e"); - var schedulingConnStr = await CreateDatabaseAsync(baseConnStr, "scheduling_e2e"); - var gatekeeperConnStr = await CreateDatabaseAsync(baseConnStr, "gatekeeper_e2e"); - var icd10ConnStr = await CreateDatabaseAsync(baseConnStr, "icd10_e2e"); - - Console.WriteLine("[E2E] PostgreSQL container started"); - - var testAssemblyDir = Path.GetDirectoryName(typeof(E2EFixture).Assembly.Location)!; - var samplesDir = Path.GetFullPath( - Path.Combine(testAssemblyDir, "..", "..", "..", "..", "..") - ); - - // Run ICD-10 migration and import official CDC data. - // ICD-10 is optional in the E2E suite (see ICD-10 API skip block below) - if - // setup fails (e.g. embedding service or Python toolchain unavailable), continue - // without it instead of failing the entire fixture. - var icd10Ready = false; - try - { - await SetupIcd10DatabaseAsync(icd10ConnStr, samplesDir); - icd10Ready = true; - } - catch (Exception ex) - { - Console.WriteLine( - $"[E2E] WARNING: ICD-10 database setup failed ({ex.Message}); " - + "ICD-10 dependent tests will be skipped" - ); - } - - var clinicalProjectDir = Path.Combine(samplesDir, "Clinical", "Clinical.Api"); - var schedulingProjectDir = Path.Combine(samplesDir, "Scheduling", "Scheduling.Api"); - var gatekeeperProjectDir = Path.Combine(samplesDir, "Gatekeeper", "Gatekeeper.Api"); - var icd10ProjectDir = Path.Combine(samplesDir, "ICD10", "ICD10.Api"); - var configuration = ResolveBuildConfiguration(testAssemblyDir); - - Console.WriteLine($"[E2E] Test assembly dir: {testAssemblyDir}"); - Console.WriteLine($"[E2E] Build configuration: {configuration}"); - Console.WriteLine($"[E2E] Samples dir: {samplesDir}"); - Console.WriteLine($"[E2E] Clinical dir: {clinicalProjectDir}"); - Console.WriteLine($"[E2E] Gatekeeper dir: {gatekeeperProjectDir}"); - Console.WriteLine($"[E2E] ICD-10 dir: {icd10ProjectDir}"); - - var clinicalDll = Path.Combine( - clinicalProjectDir, - "bin", - configuration, - "net10.0", - "Clinical.Api.dll" - ); - var clinicalEnv = new Dictionary - { - ["ConnectionStrings__Postgres"] = clinicalConnStr, - }; - _clinicalProcess = StartApiFromDll( - clinicalDll, - clinicalProjectDir, - ClinicalUrl, - clinicalEnv - ); - - var schedulingDll = Path.Combine( - schedulingProjectDir, - "bin", - configuration, - "net10.0", - "Scheduling.Api.dll" - ); - var schedulingEnv = new Dictionary - { - ["ConnectionStrings__Postgres"] = schedulingConnStr, - }; - _schedulingProcess = StartApiFromDll( - schedulingDll, - schedulingProjectDir, - SchedulingUrl, - schedulingEnv - ); - - var gatekeeperDll = Path.Combine( - gatekeeperProjectDir, - "bin", - configuration, - "net10.0", - "Gatekeeper.Api.dll" - ); - var gatekeeperEnv = new Dictionary - { - ["ConnectionStrings__Postgres"] = gatekeeperConnStr, - }; - _gatekeeperProcess = StartApiFromDll( - gatekeeperDll, - gatekeeperProjectDir, - GatekeeperUrl, - gatekeeperEnv - ); - - // Start ICD-10 API (requires PostgreSQL with pgvector) - var icd10Dll = Path.Combine( - icd10ProjectDir, - "bin", - configuration, - "net10.0", - "ICD10.Api.dll" - ); - var icd10Env = new Dictionary - { - ["ConnectionStrings__Postgres"] = icd10ConnStr, - ["ConnectionStrings__DefaultConnection"] = icd10ConnStr, - }; - if (icd10Ready && File.Exists(icd10Dll)) - { - _icd10Process = StartApiFromDll(icd10Dll, icd10ProjectDir, Icd10Url, icd10Env); - Console.WriteLine($"[E2E] ICD-10 API starting on {Icd10Url}"); - } - else if (!File.Exists(icd10Dll)) - { - Console.WriteLine($"[E2E] ICD-10 API DLL missing: {icd10Dll}"); - } - - await Task.Delay(2000); - - // Verify API processes didn't crash on startup (e.g., "address already in use") - // If crashed, re-kill port and retry once - _clinicalProcess = await EnsureProcessAliveAsync( - _clinicalProcess, - "Clinical", - clinicalDll, - clinicalProjectDir, - ClinicalUrl, - clinicalEnv - ); - _schedulingProcess = await EnsureProcessAliveAsync( - _schedulingProcess, - "Scheduling", - schedulingDll, - schedulingProjectDir, - SchedulingUrl, - schedulingEnv - ); - _gatekeeperProcess = await EnsureProcessAliveAsync( - _gatekeeperProcess, - "Gatekeeper", - gatekeeperDll, - gatekeeperProjectDir, - GatekeeperUrl, - gatekeeperEnv - ); - if (_icd10Process is not null) - { - _icd10Process = await EnsureProcessAliveAsync( - _icd10Process, - "ICD-10", - icd10Dll, - icd10ProjectDir, - Icd10Url, - icd10Env - ); - } - - await WaitForApiAsync(ClinicalUrl, "/fhir/Patient/"); - await WaitForApiAsync(SchedulingUrl, "/Practitioner"); - await WaitForGatekeeperApiAsync(); - - // ICD-10 API requires embedding service (Docker) - make it optional - if (_icd10Process is not null) - { - try - { - await WaitForApiAsync(Icd10Url, "/api/icd10/chapters"); - } - catch (Exception ex) - { - Console.WriteLine($"[E2E] WARNING: ICD-10 API failed to start: {ex.Message}"); - Console.WriteLine("[E2E] ICD-10 dependent tests will be skipped"); - // Stop the failed ICD-10 process - StopProcess(_icd10Process); - _icd10Process = null; - } - } - - var clinicalSyncDir = Path.Combine(samplesDir, "Clinical", "Clinical.Sync"); - var clinicalSyncDll = Path.Combine( - clinicalSyncDir, - "bin", - configuration, - "net10.0", - "Clinical.Sync.dll" - ); - if (File.Exists(clinicalSyncDll)) - { - var clinicalSyncEnv = new Dictionary - { - ["ConnectionStrings__Postgres"] = clinicalConnStr, - ["SCHEDULING_API_URL"] = SchedulingUrl, - ["POLL_INTERVAL_SECONDS"] = "5", - }; - _clinicalSyncProcess = StartSyncWorker( - clinicalSyncDll, - clinicalSyncDir, - clinicalSyncEnv - ); - } - else - { - Console.WriteLine($"[E2E] Clinical sync worker missing: {clinicalSyncDll}"); - } - - var schedulingSyncDir = Path.Combine(samplesDir, "Scheduling", "Scheduling.Sync"); - var schedulingSyncDll = Path.Combine( - schedulingSyncDir, - "bin", - configuration, - "net10.0", - "Scheduling.Sync.dll" - ); - if (File.Exists(schedulingSyncDll)) - { - var schedulingSyncEnv = new Dictionary - { - ["ConnectionStrings__Postgres"] = schedulingConnStr, - ["CLINICAL_API_URL"] = ClinicalUrl, - ["POLL_INTERVAL_SECONDS"] = "5", - }; - _schedulingSyncProcess = StartSyncWorker( - schedulingSyncDll, - schedulingSyncDir, - schedulingSyncEnv - ); - } - else - { - Console.WriteLine($"[E2E] Scheduling sync worker missing: {schedulingSyncDll}"); - } - - await Task.Delay(2000); - - _dashboardHost = CreateDashboardHost(); - await _dashboardHost.StartAsync(); - - var server = _dashboardHost.Services.GetRequiredService(); - var addressFeature = server.Features.Get(); - DashboardUrl = addressFeature!.Addresses.First(); - Console.WriteLine($"[E2E] Dashboard started on {DashboardUrl}"); - - await SeedTestDataAsync(); - - Playwright = await Microsoft.Playwright.Playwright.CreateAsync(); - Browser = await Playwright.Chromium.LaunchAsync( - new BrowserTypeLaunchOptions { Headless = true } - ); - } - - /// - /// Stop all services ONCE after all tests. - /// Order matters: stop sync workers FIRST to prevent connection errors. - /// In local mode, only Playwright is cleaned up. - /// - public async Task DisposeAsync() - { - try - { - if (Browser is not null) - await Browser.CloseAsync(); - } - catch { } - Playwright?.Dispose(); - - if (UseLocalStack) - return; - - StopProcess(_clinicalSyncProcess); - StopProcess(_schedulingSyncProcess); - await Task.Delay(1000); - - try - { - if (_dashboardHost is not null) - await _dashboardHost.StopAsync(TimeSpan.FromSeconds(5)); - } - catch { } - _dashboardHost?.Dispose(); - - StopProcess(_clinicalProcess); - StopProcess(_schedulingProcess); - StopProcess(_gatekeeperProcess); - - StopProcess(_icd10Process); - - await KillProcessOnPortAsync(5080); - await KillProcessOnPortAsync(5001); - await KillProcessOnPortAsync(5002); - await KillProcessOnPortAsync(5090); - - if (_postgresContainer is not null) - await _postgresContainer.DisposeAsync(); - } - - private static Process StartApiFromDll( - string dllPath, - string contentRoot, - string url, - Dictionary? envVars = null - ) - { - var startInfo = new ProcessStartInfo - { - FileName = "dotnet", - Arguments = $"\"{dllPath}\" --urls \"{url}\" --contentRoot \"{contentRoot}\"", - WorkingDirectory = contentRoot, - UseShellExecute = false, - RedirectStandardOutput = true, - RedirectStandardError = true, - CreateNoWindow = true, - }; - - // Clear ASPNETCORE_URLS inherited from test process - // (Microsoft.AspNetCore.Mvc.Testing sets it to http://127.0.0.1:0) - startInfo.EnvironmentVariables.Remove("ASPNETCORE_URLS"); - - if (envVars is not null) - { - foreach (var kvp in envVars) - startInfo.EnvironmentVariables[kvp.Key] = kvp.Value; - } - - var process = new Process { StartInfo = startInfo, EnableRaisingEvents = true }; - - process.OutputDataReceived += (_, e) => - { - if (!string.IsNullOrEmpty(e.Data)) - Console.WriteLine($"[API {url}] {e.Data}"); - }; - process.ErrorDataReceived += (_, e) => - { - if (!string.IsNullOrEmpty(e.Data)) - Console.WriteLine($"[API {url} ERR] {e.Data}"); - }; - process.Exited += (_, _) => - Console.WriteLine( - $"[API {url}] PROCESS EXITED with code {(process.HasExited ? process.ExitCode : -1)}" - ); - - process.Start(); - process.BeginOutputReadLine(); - process.BeginErrorReadLine(); - return process; - } - - private static Process StartSyncWorker( - string dllPath, - string workingDir, - Dictionary? envVars = null - ) - { - var startInfo = new ProcessStartInfo - { - FileName = "dotnet", - Arguments = $"\"{dllPath}\"", - WorkingDirectory = workingDir, - UseShellExecute = false, - RedirectStandardOutput = true, - RedirectStandardError = true, - CreateNoWindow = true, - }; - - startInfo.EnvironmentVariables.Remove("ASPNETCORE_URLS"); - - if (envVars is not null) - { - foreach (var kvp in envVars) - startInfo.EnvironmentVariables[kvp.Key] = kvp.Value; - } - - var process = new Process { StartInfo = startInfo }; - process.OutputDataReceived += (_, e) => - { - if (!string.IsNullOrEmpty(e.Data)) - Console.WriteLine($"[SYNC] {e.Data}"); - }; - process.ErrorDataReceived += (_, e) => - { - if (!string.IsNullOrEmpty(e.Data)) - Console.WriteLine($"[SYNC ERR] {e.Data}"); - }; - - process.Start(); - process.BeginOutputReadLine(); - process.BeginErrorReadLine(); - return process; - } - - private static void StopProcess(Process? process) - { - if (process is null || process.HasExited) - return; - try - { - process.Kill(entireProcessTree: true); - process.WaitForExit(5000); - } - catch { } - finally - { - process.Dispose(); - } - } - - private static async Task KillProcessOnPortAsync(int port) - { - // Try multiple times to ensure port is released - for (var attempt = 0; attempt < 5; attempt++) - { - try - { - // Use lsof to find ALL pids on this port and kill them - var findPsi = new ProcessStartInfo - { - FileName = "/bin/sh", - Arguments = $"-c \"lsof -ti :{port}\"", - UseShellExecute = false, - RedirectStandardOutput = true, - CreateNoWindow = true, - }; - using var findProc = Process.Start(findPsi); - if (findProc is not null) - { - var pids = await findProc.StandardOutput.ReadToEndAsync(); - await findProc.WaitForExitAsync(); - if (!string.IsNullOrWhiteSpace(pids)) - { - Console.WriteLine( - $"[E2E] Port {port} held by PIDs: {pids.Trim().Replace("\n", ", ")}" - ); - // Kill each PID individually - foreach ( - var pid in pids.Trim() - .Split('\n', StringSplitOptions.RemoveEmptyEntries) - ) - { - try - { - var killPsi = new ProcessStartInfo - { - FileName = "/bin/kill", - Arguments = $"-9 {pid.Trim()}", - UseShellExecute = false, - CreateNoWindow = true, - }; - using var killProc = Process.Start(killPsi); - if (killProc is not null) - await killProc.WaitForExitAsync(); - } - catch { } - } - } - } - } - catch { } - await Task.Delay(500); - - // Verify port is free - if (await IsPortAvailableAsync(port)) - { - Console.WriteLine($"[E2E] Port {port} is now free (attempt {attempt + 1})"); - return; - } - - Console.WriteLine( - $"[E2E] Port {port} still in use after attempt {attempt + 1}, retrying..." - ); - await Task.Delay(1000); - } - - Console.WriteLine($"[E2E] WARNING: Port {port} could not be freed after 5 attempts"); - } - - /// - /// Verifies an API process is still alive after startup. If it crashed (e.g., port already in use), - /// re-kills the port and restarts the process. - /// - private static async Task EnsureProcessAliveAsync( - Process process, - string name, - string dllPath, - string contentRoot, - string url, - Dictionary envVars - ) - { - if (!process.HasExited) - { - Console.WriteLine($"[E2E] {name} API process is alive (PID {process.Id})"); - return process; - } - - Console.WriteLine( - $"[E2E] WARNING: {name} API process crashed with exit code {process.ExitCode}" - ); - process.Dispose(); - - // Extract port from URL and re-kill it - var uri = new Uri(url); - var port = uri.Port; - Console.WriteLine($"[E2E] Re-killing port {port} and restarting {name} API..."); - await KillProcessOnPortAsync(port); - await Task.Delay(1000); - - if (!await IsPortAvailableAsync(port)) - { - throw new InvalidOperationException( - $"{name} API process crashed and port {port} is still in use after cleanup." - ); - } - - // Restart the process - var newProcess = StartApiFromDll(dllPath, contentRoot, url, envVars); - Console.WriteLine($"[E2E] {name} API restarted (PID {newProcess.Id})"); - - // Wait and verify the restart succeeded - await Task.Delay(2000); - if (newProcess.HasExited) - { - throw new InvalidOperationException( - $"{name} API failed to start on retry (exit code {newProcess.ExitCode})." - ); - } - - return newProcess; - } - - private static Task IsPortAvailableAsync(int port) - { - try - { - using var listener = new System.Net.Sockets.TcpListener(IPAddress.Loopback, port); - listener.Start(); - listener.Stop(); - return Task.FromResult(true); - } - catch - { - return Task.FromResult(false); - } - } - - private static async Task CreateDatabaseAsync( - string baseConnectionString, - string dbName - ) - { - await using var conn = new NpgsqlConnection(baseConnectionString); - await conn.OpenAsync(); - await using var cmd = conn.CreateCommand(); - cmd.CommandText = $"CREATE DATABASE \"{dbName}\""; - await cmd.ExecuteNonQueryAsync(); - - var builder = new NpgsqlConnectionStringBuilder(baseConnectionString) { Database = dbName }; - return builder.ConnectionString; - } - - private static string ResolveBuildConfiguration(string testAssemblyDir) - { - var net9Dir = new DirectoryInfo(testAssemblyDir); - var configuration = net9Dir.Parent?.Name; - return string.IsNullOrWhiteSpace(configuration) ? "Debug" : configuration; - } - - private static async Task WaitForApiAsync(string baseUrl, string healthEndpoint) - { - using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(5) }; - var maxRetries = 30; // Reduced from 120 to 30 (15 seconds max instead of 60) - var lastException = (Exception?)null; - - for (var i = 0; i < maxRetries; i++) - { - try - { - var response = await client.GetAsync($"{baseUrl}{healthEndpoint}"); - if ( - response.IsSuccessStatusCode - || response.StatusCode == HttpStatusCode.NotFound - || response.StatusCode == HttpStatusCode.Unauthorized - || response.StatusCode == HttpStatusCode.Forbidden - ) - { - Console.WriteLine( - $"[E2E] API at {baseUrl} started successfully after {i} attempts" - ); - return; - } - - // If we get a non-success status code, log it but continue retrying - Console.WriteLine( - $"[E2E] API at {baseUrl} returned {response.StatusCode} on attempt {i + 1}" - ); - } - catch (Exception ex) - { - lastException = ex; - Console.WriteLine( - $"[E2E] API at {baseUrl} connection failed on attempt {i + 1}: {ex.Message}" - ); - - // If it's a connection refused error early on, fail faster - if (ex.Message.Contains("Connection refused") && i >= 5) - { - throw new TimeoutException( - $"API at {baseUrl} failed to start after {i + 1} attempts: {ex.Message}", - ex - ); - } - } - - if (i < maxRetries - 1) - { - await Task.Delay(500); - } - } - - throw new TimeoutException( - $"API at {baseUrl} did not start after {maxRetries} attempts. Last error: {lastException?.Message}" - ); - } - - private static async Task WaitForGatekeeperApiAsync() - { - using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(5) }; - var maxRetries = 30; // Reduced from 120 to 30 (15 seconds max instead of 60) - var lastException = (Exception?)null; - - for (var i = 0; i < maxRetries; i++) - { - try - { - var response = await client.PostAsync( - $"{GatekeeperUrl}/auth/login/begin", - new StringContent("{}", Encoding.UTF8, "application/json") - ); - if (response.IsSuccessStatusCode) - { - Console.WriteLine( - $"[E2E] Gatekeeper API started successfully after {i} attempts" - ); - return; - } - - Console.WriteLine( - $"[E2E] Gatekeeper API returned {response.StatusCode} on attempt {i + 1}" - ); - } - catch (Exception ex) - { - lastException = ex; - Console.WriteLine( - $"[E2E] Gatekeeper API connection failed on attempt {i + 1}: {ex.Message}" - ); - - // If it's a connection refused error early on, fail faster - if (ex.Message.Contains("Connection refused") && i >= 5) - { - throw new TimeoutException( - $"Gatekeeper API failed to start after {i + 1} attempts: {ex.Message}", - ex - ); - } - } - - if (i < maxRetries - 1) - { - await Task.Delay(500); - } - } - - throw new TimeoutException( - $"Gatekeeper API did not start after {maxRetries} attempts. Last error: {lastException?.Message}" - ); - } - - /// - /// Waits for a service to be reachable (any HTTP response). - /// Used in local mode where services may be running but have DB issues. - /// - private static async Task WaitForServiceReachableAsync(string baseUrl, string endpoint) - { - using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(5) }; - var maxRetries = 30; // Reduced from 60 to 30 (15 seconds max instead of 30) - var lastException = (Exception?)null; - - for (var i = 0; i < maxRetries; i++) - { - try - { - _ = await client.GetAsync($"{baseUrl}{endpoint}"); - Console.WriteLine($"[E2E] Service reachable: {baseUrl} after {i} attempts"); - return; - } - catch (Exception ex) - { - lastException = ex; - Console.WriteLine( - $"[E2E] Service at {baseUrl} connection failed on attempt {i + 1}: {ex.Message}" - ); - - // If it's a connection refused error early on, fail faster - if (ex.Message.Contains("Connection refused") && i >= 5) - { - throw new TimeoutException( - $"Service at {baseUrl} failed to respond after {i + 1} attempts: {ex.Message}", - ex - ); - } - } - - if (i < maxRetries - 1) - { - await Task.Delay(500); - } - } - - throw new TimeoutException( - $"Service at {baseUrl} is not reachable after {maxRetries} attempts. Last error: {lastException?.Message}" - ); - } - - /// - /// Creates an authenticated HTTP client with test JWT token. - /// - public static HttpClient CreateAuthenticatedClient() - { - var client = new HttpClient(); - client.DefaultRequestHeaders.Authorization = - new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", GenerateTestToken()); - return client; - } - - /// - /// Creates a new browser page with authentication already set up via localStorage. - /// This is the proper E2E approach - no testMode backdoor in the frontend. - /// - /// Optional URL to navigate to after auth setup. Defaults to DashboardUrl. - /// User ID for the test token. - /// Display name for the test token. - /// Email for the test token. - public async Task CreateAuthenticatedPageAsync( - string? navigateTo = null, - string userId = "e2e-test-user", - string displayName = "E2E Test User", - string email = "e2etest@example.com" - ) - { - var page = await Browser!.NewPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER {msg.Type}] {msg.Text}"); - page.PageError += (_, err) => Console.WriteLine($"[PAGE ERROR] {err}"); - - var token = GenerateTestToken(userId, displayName, email); - var userJson = JsonSerializer.Serialize( - new - { - userId, - displayName, - email, - } - ); - - // Inject API URL config BEFORE any page script runs - await page.AddInitScriptAsync( - $@"window.dashboardConfig = window.dashboardConfig || {{}}; - window.dashboardConfig.ICD10_API_URL = '{Icd10Url}';" - ); - - // Navigate first to establish the origin for localStorage - await page.GotoAsync(DashboardUrl); - - // Set auth state in localStorage - var escapedUserJson = userJson.Replace("'", "\\'"); - await page.EvaluateAsync( - $@"() => {{ - localStorage.setItem('gatekeeper_token', '{token}'); - localStorage.setItem('gatekeeper_user', '{escapedUserJson}'); - }}" - ); - - // Navigate to target URL (or reload if staying on same page) - var targetUrl = navigateTo ?? DashboardUrl; - - // Always reload first to ensure static files are fully loaded and auth state is picked up - await page.ReloadAsync(); - - // If target URL has a hash fragment, navigate to it after reload - if (targetUrl != DashboardUrl && targetUrl.Contains('#')) - { - var hash = targetUrl.Substring(targetUrl.IndexOf('#')); - await page.EvaluateAsync($"() => window.location.hash = '{hash}'"); - // Give React time to process hash change - await Task.Delay(500); - } - - return page; - } - - /// - /// Generates a test JWT token with the specified user details. - /// Uses the same all-zeros signing key that the APIs use in dev mode. - /// - public static string GenerateTestToken( - string userId = "e2e-test-user", - string displayName = "E2E Test User", - string email = "e2etest@example.com" - ) - { - var signingKey = new byte[32]; - var header = Base64UrlEncode(Encoding.UTF8.GetBytes("""{"alg":"HS256","typ":"JWT"}""")); - var expiration = DateTimeOffset.UtcNow.AddHours(1).ToUnixTimeSeconds(); - var payload = Base64UrlEncode( - Encoding.UTF8.GetBytes( - JsonSerializer.Serialize( - new - { - sub = userId, - name = displayName, - email, - jti = Guid.NewGuid().ToString(), - exp = expiration, - roles = new[] { "admin", "user" }, - } - ) - ) - ); - var signature = ComputeHmacSignature(header, payload, signingKey); - return $"{header}.{payload}.{signature}"; - } - - private static string Base64UrlEncode(byte[] input) => - Convert.ToBase64String(input).Replace("+", "-").Replace("/", "_").TrimEnd('='); - - private static string ComputeHmacSignature(string header, string payload, byte[] key) - { - var data = Encoding.UTF8.GetBytes($"{header}.{payload}"); - using var hmac = new HMACSHA256(key); - return Base64UrlEncode(hmac.ComputeHash(data)); - } - - private static IHost CreateDashboardHost() - { - // Microsoft.AspNetCore.Mvc.Testing sets ASPNETCORE_URLS globally to - // http://127.0.0.1:0 which overrides UseUrls(). Clear it so the - // Dashboard host binds to the expected port. - Environment.SetEnvironmentVariable("ASPNETCORE_URLS", null); - - var wwwrootPath = Path.Combine(AppContext.BaseDirectory, "wwwroot"); - var fileProvider = new PhysicalFileProvider(wwwrootPath); - return Host.CreateDefaultBuilder() - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseUrls("http://127.0.0.1:0"); - webBuilder.Configure(app => - { - // Both middleware must share the same FileProvider so - // UseDefaultFiles can find index.html and rewrite / → /index.html - app.UseDefaultFiles(new DefaultFilesOptions { FileProvider = fileProvider }); - app.UseStaticFiles(new StaticFileOptions { FileProvider = fileProvider }); - }); - }) - .Build(); - } - - private static async Task SeedTestDataAsync() - { - using var client = CreateAuthenticatedClient(); - - await SeedAsync( - client, - $"{ClinicalUrl}/fhir/Patient/", - """{"Active": true, "GivenName": "E2ETest", "FamilyName": "TestPatient", "Gender": "other"}""" - ); - - await SeedAsync( - client, - $"{SchedulingUrl}/Practitioner", - """{"Identifier": "DR001", "Active": true, "NameGiven": "E2EPractitioner", "NameFamily": "DrTest", "Qualification": "MD", "Specialty": "General Practice", "TelecomEmail": "drtest@hospital.org", "TelecomPhone": "+1-555-0123"}""" - ); - - await SeedAsync( - client, - $"{SchedulingUrl}/Practitioner", - """{"Identifier": "DR002", "Active": true, "NameGiven": "Sarah", "NameFamily": "Johnson", "Qualification": "DO", "Specialty": "Cardiology", "TelecomEmail": "sjohnson@hospital.org", "TelecomPhone": "+1-555-0124"}""" - ); - - await SeedAsync( - client, - $"{SchedulingUrl}/Practitioner", - """{"Identifier": "DR003", "Active": true, "NameGiven": "Michael", "NameFamily": "Chen", "Qualification": "MD", "Specialty": "Neurology", "TelecomEmail": "mchen@hospital.org", "TelecomPhone": "+1-555-0125"}""" - ); - - await SeedAsync( - client, - $"{SchedulingUrl}/Appointment", - """{"ServiceCategory": "General", "ServiceType": "Checkup", "Start": "2025-12-20T10:00:00Z", "End": "2025-12-20T11:00:00Z", "PatientReference": "Patient/1", "PractitionerReference": "Practitioner/1", "Priority": "routine"}""" - ); - } - - private static async Task SeedAsync(HttpClient client, string url, string json) - { - try - { - var response = await client.PostAsync( - url, - new StringContent(json, Encoding.UTF8, "application/json") - ); - Console.WriteLine( - $"[E2E] Seed {url}: {(int)response.StatusCode} {response.ReasonPhrase}" - ); - } - catch (Exception ex) - { - Console.WriteLine($"[E2E] Seed {url} failed: {ex.Message}"); - } - } - - /// - /// Sets up the ICD-10 database by running migration and importing official CDC data. - /// Skips import if data already exists in the database. - /// - private static async Task SetupIcd10DatabaseAsync(string connectionString, string samplesDir) - { - Console.WriteLine("[E2E] Setting up ICD-10 database..."); - - var icd10ProjectDir = Path.Combine(samplesDir, "ICD10", "ICD10.Api"); - var schemaPath = Path.Combine(icd10ProjectDir, "icd10-schema.yaml"); - - // Check if schema already exists and has data - if (await Icd10DatabaseHasDataAsync(connectionString)) - { - Console.WriteLine( - "[E2E] ICD-10 database already has data - skipping migration and seed" - ); - return; - } - - // Apply schema and seed deterministic E2E reference data via the shared - // ICD10.TestSupport library. This avoids the ~3-minute Python CDC import - // (44k codes + embeddings) that previously made every dashboard run hang. - Console.WriteLine("[E2E] Applying ICD-10 schema and seeding test data..."); - await Task.Run(() => Icd10TestDatabase.Initialize(connectionString, schemaPath)); - Console.WriteLine("[E2E] ICD-10 database setup complete"); - } - - /// - /// Checks if the ICD-10 database already has the schema and data loaded. - /// - private static async Task Icd10DatabaseHasDataAsync(string connectionString) - { - try - { - await using var conn = new NpgsqlConnection(connectionString); - await conn.OpenAsync(); - await using var cmd = conn.CreateCommand(); - cmd.CommandText = "SELECT COUNT(*) FROM icd10_code"; - var count = Convert.ToInt64( - await cmd.ExecuteScalarAsync(), - System.Globalization.CultureInfo.InvariantCulture - ); - Console.WriteLine($"[E2E] ICD-10 database has {count} codes"); - return count > 0; - } - catch (Exception ex) - { - Console.WriteLine( - $"[E2E] ICD-10 database check failed ({ex.Message}) - will create from scratch" - ); - return false; - } - } - - /// - /// Runs a process and waits for it to complete, streaming output to console. - /// Times out after 5 minutes by default. - /// - private static async Task RunProcessAsync( - string fileName, - string arguments, - string workingDir, - int timeoutMs = 300_000 - ) - { - var startInfo = new ProcessStartInfo - { - FileName = fileName, - Arguments = arguments, - WorkingDirectory = workingDir, - UseShellExecute = false, - RedirectStandardOutput = true, - RedirectStandardError = true, - CreateNoWindow = true, - }; - - var process = new Process { StartInfo = startInfo }; - var output = new StringBuilder(); - var errors = new StringBuilder(); - - process.OutputDataReceived += (_, e) => - { - if (!string.IsNullOrEmpty(e.Data)) - { - Console.WriteLine($"[E2E] {e.Data}"); - output.AppendLine(e.Data); - } - }; - process.ErrorDataReceived += (_, e) => - { - if (!string.IsNullOrEmpty(e.Data)) - { - Console.WriteLine($"[E2E] ERR: {e.Data}"); - errors.AppendLine(e.Data); - } - }; - - process.Start(); - process.BeginOutputReadLine(); - process.BeginErrorReadLine(); - - using var cts = new CancellationTokenSource(timeoutMs); - try - { - await process.WaitForExitAsync(cts.Token); - } - catch (OperationCanceledException) - { - Console.WriteLine($"[E2E] Process timed out after {timeoutMs / 1000}s: {fileName}"); - process.Kill(entireProcessTree: true); - return -1; - } - - return process.ExitCode; - } -} - -/// -/// Single collection definition for ALL E2E tests. -/// All tests share ONE E2EFixture instance to prevent port conflicts. -/// Tests within this collection run sequentially by default. -/// -[CollectionDefinition("E2E Tests")] -public sealed class E2ECollection : ICollectionFixture; diff --git a/Dashboard/Dashboard.Integration.Tests/GlobalUsings.cs b/Dashboard/Dashboard.Integration.Tests/GlobalUsings.cs deleted file mode 100644 index bb30e84..0000000 --- a/Dashboard/Dashboard.Integration.Tests/GlobalUsings.cs +++ /dev/null @@ -1,3 +0,0 @@ -global using System.Net; -global using Microsoft.AspNetCore.Mvc.Testing; -global using Xunit; diff --git a/Dashboard/Dashboard.Integration.Tests/Icd10E2ETests.cs b/Dashboard/Dashboard.Integration.Tests/Icd10E2ETests.cs deleted file mode 100644 index 7cc7635..0000000 --- a/Dashboard/Dashboard.Integration.Tests/Icd10E2ETests.cs +++ /dev/null @@ -1,588 +0,0 @@ -using Microsoft.Playwright; - -namespace Dashboard.Integration.Tests; - -/// -/// E2E tests for ICD-10 Clinical Coding in the Dashboard. -/// Tests keyword search, RAG/AI search, code lookup, and drill-down to code details. -/// Requires ICD-10 API running on port 5090. -/// -[Collection("E2E Tests")] -[Trait("Category", "E2E")] -public sealed class Icd10E2ETests -{ - private readonly E2EFixture _fixture; - - /// - /// Constructor receives shared E2E fixture. - /// - public Icd10E2ETests(E2EFixture fixture) => _fixture = fixture; - - // ========================================================================= - // KEYWORD SEARCH - // ========================================================================= - - /// - /// Keyword search for "diabetes" returns results table with Chapter and Category. - /// - [Fact] - public async Task KeywordSearch_Diabetes_ReturnsResultsWithChapterAndCategory() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=Keyword Search"); - await Task.Delay(500); - - await page.FillAsync("input[placeholder*='Search by code']", "diabetes"); - await page.ClickAsync("button:has-text('Search')"); - - await page.WaitForSelectorAsync( - ".table", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("Chapter", content); - Assert.Contains("Category", content); - Assert.Contains("E11", content); - - var rows = await page.QuerySelectorAllAsync(".table tbody tr"); - Assert.True(rows.Count > 0, "Keyword search for 'diabetes' should return results"); - - await page.CloseAsync(); - } - - /// - /// Keyword search for "pneumonia" returns results with billable status column. - /// - [Fact] - public async Task KeywordSearch_Pneumonia_ShowsBillableStatus() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=Keyword Search"); - await Task.Delay(500); - - await page.FillAsync("input[placeholder*='Search by code']", "pneumonia"); - await page.ClickAsync("button:has-text('Search')"); - - await page.WaitForSelectorAsync( - ".table", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("Status", content); - - var rows = await page.QuerySelectorAllAsync(".table tbody tr"); - Assert.True(rows.Count > 0, "Keyword search for 'pneumonia' should return results"); - - await page.CloseAsync(); - } - - /// - /// Keyword search shows result count text. - /// - [Fact] - public async Task KeywordSearch_ShowsResultCount() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=Keyword Search"); - await Task.Delay(500); - - await page.FillAsync("input[placeholder*='Search by code']", "fracture"); - await page.ClickAsync("button:has-text('Search')"); - - await page.WaitForSelectorAsync( - ".table", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("results found", content); - - await page.CloseAsync(); - } - - // ========================================================================= - // RAG / AI SEARCH - // ========================================================================= - - /// - /// AI search for "chest pain with shortness of breath" returns results - /// with confidence scores and AI-matched label. - /// - [Fact] - public async Task AISearch_ChestPain_ReturnsResultsWithConfidence() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=AI Search"); - await Task.Delay(500); - - await page.FillAsync( - "input[placeholder*='Describe symptoms']", - "chest pain with shortness of breath" - ); - await page.ClickAsync("button:has-text('Search')"); - - try - { - await page.WaitForSelectorAsync( - ".table", - new PageWaitForSelectorOptions { Timeout = 30000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("AI-matched results", content); - Assert.Contains("Confidence", content); - Assert.Contains("Chapter", content); - Assert.Contains("Category", content); - - var rows = await page.QuerySelectorAllAsync(".table tbody tr"); - Assert.True(rows.Count > 0, "AI search should return results"); - } - catch (TimeoutException) - { - Console.WriteLine( - "[TEST] AI search timed out - embedding service may not be running on port 8000" - ); - } - - await page.CloseAsync(); - } - - /// - /// AI search for "heart attack" returns cardiac-related codes. - /// - [Fact] - public async Task AISearch_HeartAttack_ReturnsCardiacCodes() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=AI Search"); - await Task.Delay(500); - - await page.FillAsync("input[placeholder*='Describe symptoms']", "heart attack"); - await page.ClickAsync("button:has-text('Search')"); - - try - { - await page.WaitForSelectorAsync( - ".table", - new PageWaitForSelectorOptions { Timeout = 30000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("AI-matched results", content); - - var rows = await page.QuerySelectorAllAsync(".table tbody tr"); - Assert.True(rows.Count > 0, "AI search for 'heart attack' should return results"); - } - catch (TimeoutException) - { - Console.WriteLine( - "[TEST] AI search timed out - embedding service may not be running on port 8000" - ); - } - - await page.CloseAsync(); - } - - /// - /// AI search shows the "Include ACHI procedure codes" checkbox. - /// - [Fact] - public async Task AISearch_ShowsAchiCheckbox() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=AI Search"); - await Task.Delay(500); - - var content = await page.ContentAsync(); - Assert.Contains("Include ACHI procedure codes", content); - Assert.Contains("medical AI embeddings", content); - - await page.CloseAsync(); - } - - // ========================================================================= - // CODE LOOKUP - // ========================================================================= - - /// - /// Code lookup for "E11.9" shows detailed code info with Chapter, Block, Category. - /// - [Fact] - public async Task CodeLookup_E119_ShowsFullCodeDetail() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=Code Lookup"); - await Task.Delay(500); - - await page.FillAsync("input[placeholder*='Enter exact ICD-10 code']", "E11.9"); - await page.ClickAsync("button:has-text('Search')"); - - await page.WaitForSelectorAsync( - "text=Back to results", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - var content = await page.ContentAsync(); - - Assert.Contains("E11.9", content); - Assert.Contains("diabetes", content.ToLowerInvariant()); - Assert.Contains("Chapter", content); - Assert.Contains("Block", content); - Assert.Contains("Category", content); - - await page.CloseAsync(); - } - - /// - /// Code lookup for "I10" shows hypertension detail with chapter info. - /// - [Fact] - public async Task CodeLookup_I10_ShowsHypertensionDetail() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=Code Lookup"); - await Task.Delay(500); - - await page.FillAsync("input[placeholder*='Enter exact ICD-10 code']", "I10"); - await page.ClickAsync("button:has-text('Search')"); - - await page.WaitForSelectorAsync( - "text=Back to results", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - var content = await page.ContentAsync(); - - Assert.Contains("I10", content); - Assert.Contains("hypertension", content.ToLowerInvariant()); - Assert.Contains("Chapter", content); - Assert.Contains("circulatory", content.ToLowerInvariant()); - - await page.CloseAsync(); - } - - /// - /// Code lookup for "R07.9" shows chest pain detail with billable status. - /// - [Fact] - public async Task CodeLookup_R079_ShowsChestPainWithBillable() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=Code Lookup"); - await Task.Delay(500); - - await page.FillAsync("input[placeholder*='Enter exact ICD-10 code']", "R07.9"); - await page.ClickAsync("button:has-text('Search')"); - - await page.WaitForSelectorAsync( - "text=Back to results", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - var content = await page.ContentAsync(); - - Assert.Contains("R07.9", content); - Assert.Contains("chest pain", content.ToLowerInvariant()); - Assert.Contains("Billable", content); - Assert.Contains("Block", content); - Assert.Contains("Category", content); - - await page.CloseAsync(); - } - - /// - /// Code lookup with prefix "E11" shows multiple matching codes as a list. - /// - [Fact] - public async Task CodeLookup_E11Prefix_ShowsMultipleResults() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=Code Lookup"); - await Task.Delay(500); - - await page.FillAsync("input[placeholder*='Enter exact ICD-10 code']", "E11"); - await page.ClickAsync("button:has-text('Search')"); - - await page.WaitForSelectorAsync( - ".table", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - var rows = await page.QuerySelectorAllAsync(".table tbody tr"); - Assert.True(rows.Count > 1, "Prefix search for 'E11' should return multiple codes"); - - var content = await page.ContentAsync(); - Assert.Contains("E11", content); - - await page.CloseAsync(); - } - - // ========================================================================= - // DRILL-DOWN: KEYWORD SEARCH -> CODE DETAIL - // ========================================================================= - - /// - /// Keyword search then clicking a result row drills down to code detail view - /// showing Chapter, Block, Category, and description. - /// - [Fact] - public async Task DrillDown_KeywordSearch_ClickResult_ShowsCodeDetail() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=Keyword Search"); - await Task.Delay(500); - - await page.FillAsync("input[placeholder*='Search by code']", "hypertension"); - await page.ClickAsync("button:has-text('Search')"); - - await page.WaitForSelectorAsync( - ".table tbody tr", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - // Click the first result row to drill down - await page.ClickAsync(".search-result-row >> nth=0"); - - // Wait for detail view to load (shows "Back to results" button) - await page.WaitForSelectorAsync( - "text=Back to results", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - var content = await page.ContentAsync(); - - // Detail view must show hierarchy - Assert.Contains("Chapter", content); - Assert.Contains("Block", content); - Assert.Contains("Category", content); - - // Must show billable status - Assert.True( - content.Contains("Billable") || content.Contains("Non-billable"), - "Detail view should show billable status" - ); - - // Must show the code badge - Assert.Contains("Copy Code", content); - - await page.CloseAsync(); - } - - /// - /// Drill down to code detail then navigate back to results list. - /// - [Fact] - public async Task DrillDown_BackToResults_RestoresResultsList() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=Keyword Search"); - await Task.Delay(500); - - await page.FillAsync("input[placeholder*='Search by code']", "diabetes"); - await page.ClickAsync("button:has-text('Search')"); - - await page.WaitForSelectorAsync( - ".table tbody tr", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - // Click first result to drill down - await page.ClickAsync(".search-result-row >> nth=0"); - - await page.WaitForSelectorAsync( - "text=Back to results", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - // Click back button - await page.ClickAsync("text=Back to results"); - - // Results table should reappear - await page.WaitForSelectorAsync( - ".table tbody tr", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var rows = await page.QuerySelectorAllAsync(".table tbody tr"); - Assert.True(rows.Count > 0, "Results list should be restored after clicking back"); - - await page.CloseAsync(); - } - - /// - /// Drill down from keyword search shows Full Description section when available. - /// - [Fact] - public async Task DrillDown_ShowsFullDescription() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=Code Lookup"); - await Task.Delay(500); - - // G43.909 has a long description - await page.FillAsync("input[placeholder*='Enter exact ICD-10 code']", "G43.909"); - await page.ClickAsync("button:has-text('Search')"); - - await page.WaitForSelectorAsync( - "text=Back to results", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - var content = await page.ContentAsync(); - - Assert.Contains("G43.909", content); - Assert.Contains("migraine", content.ToLowerInvariant()); - Assert.Contains("Full Description", content); - - await page.CloseAsync(); - } - - // ========================================================================= - // DRILL-DOWN: AI SEARCH -> CODE DETAIL - // ========================================================================= - - /// - /// AI search then clicking a result drills down to the code detail view. - /// - [Fact] - public async Task DrillDown_AISearch_ClickResult_ShowsCodeDetail() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=AI Search"); - await Task.Delay(500); - - await page.FillAsync( - "input[placeholder*='Describe symptoms']", - "type 2 diabetes with kidney complications" - ); - await page.ClickAsync("button:has-text('Search')"); - - try - { - await page.WaitForSelectorAsync( - ".table tbody tr", - new PageWaitForSelectorOptions { Timeout = 30000 } - ); - - // Click first AI search result to drill down - await page.ClickAsync(".search-result-row >> nth=0"); - - // Wait for detail view - await page.WaitForSelectorAsync( - "text=Back to results", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - var content = await page.ContentAsync(); - - // Detail view must show full hierarchy - Assert.Contains("Chapter", content); - Assert.Contains("Block", content); - Assert.Contains("Category", content); - Assert.Contains("Copy Code", content); - } - catch (TimeoutException) - { - Console.WriteLine( - "[TEST] AI search timed out - embedding service may not be running on port 8000" - ); - } - - await page.CloseAsync(); - } - - // ========================================================================= - // EDGE CASES - // ========================================================================= - - /// - /// Code lookup for nonexistent code shows "No codes found" message. - /// - [Fact] - public async Task CodeLookup_NonexistentCode_ShowsNoCodesFound() - { - var page = await NavigateToClinicalCodingAsync(); - - await page.ClickAsync("text=Code Lookup"); - await Task.Delay(500); - - await page.FillAsync("input[placeholder*='Enter exact ICD-10 code']", "ZZZ99.99"); - await page.ClickAsync("button:has-text('Search')"); - - await page.WaitForSelectorAsync( - "text=No codes found", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("No codes found", content); - - await page.CloseAsync(); - } - - /// - /// Switching between search tabs clears previous results. - /// - [Fact] - public async Task SwitchingTabs_ClearsPreviousResults() - { - var page = await NavigateToClinicalCodingAsync(); - - // Do a keyword search first - await page.ClickAsync("text=Keyword Search"); - await Task.Delay(500); - - await page.FillAsync("input[placeholder*='Search by code']", "fracture"); - await page.ClickAsync("button:has-text('Search')"); - - await page.WaitForSelectorAsync( - ".table", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - // Switch to Code Lookup tab - await page.ClickAsync("text=Code Lookup"); - await Task.Delay(500); - - // Results table should be gone - empty state should show - var content = await page.ContentAsync(); - Assert.Contains("Direct Code Lookup", content); - - await page.CloseAsync(); - } - - // ========================================================================= - // HELPER - // ========================================================================= - - private async Task NavigateToClinicalCodingAsync() - { - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#clinical-coding" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - - await page.WaitForSelectorAsync( - ".clinical-coding-page", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - return page; - } -} diff --git a/Dashboard/Dashboard.Integration.Tests/NavigationE2ETests.cs b/Dashboard/Dashboard.Integration.Tests/NavigationE2ETests.cs deleted file mode 100644 index 0b3c7fe..0000000 --- a/Dashboard/Dashboard.Integration.Tests/NavigationE2ETests.cs +++ /dev/null @@ -1,272 +0,0 @@ -using System.Text.RegularExpressions; -using Microsoft.Playwright; - -namespace Dashboard.Integration.Tests; - -/// -/// E2E tests for browser navigation (back/forward, deep linking). -/// -[Collection("E2E Tests")] -[Trait("Category", "E2E")] -public sealed class NavigationE2ETests -{ - private readonly E2EFixture _fixture; - - /// - /// Constructor receives shared fixture. - /// - public NavigationE2ETests(E2EFixture fixture) => _fixture = fixture; - - /// - /// Browser back button navigates to previous view. - /// - [Fact] - public async Task BrowserBackButton_NavigatesToPreviousView() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - Assert.Contains("#dashboard", page.Url); - - await page.ClickAsync("text=Patients"); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#patients", page.Url); - - await page.ClickAsync("text=Appointments"); - await page.WaitForSelectorAsync( - "[data-testid='add-appointment-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#appointments", page.Url); - - await page.GoBackAsync(); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#patients", page.Url); - - await page.GoBackAsync(); - await page.WaitForSelectorAsync( - ".metric-card", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#dashboard", page.Url); - - await page.CloseAsync(); - } - - /// - /// Deep linking works - navigating directly to a hash URL loads correct view. - /// - [Fact] - public async Task DeepLinking_LoadsCorrectView() - { - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#patients" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("Patients", content); - - await page.GotoAsync($"{E2EFixture.DashboardUrl}#appointments"); - await page.WaitForSelectorAsync( - "[data-testid='add-appointment-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - content = await page.ContentAsync(); - Assert.Contains("Appointments", content); - - await page.CloseAsync(); - } - - /// - /// Cancel button on edit page uses history.back(). - /// - [Fact] - public async Task EditPatientCancelButton_UsesHistoryBack() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var uniqueName = $"CancelTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - $$$"""{"Active": true, "GivenName": "{{{uniqueName}}}", "FamilyName": "CancelTestPatient", "Gender": "male"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdJson = await createResponse.Content.ReadAsStringAsync(); - var patientIdMatch = Regex.Match(createdJson, "\"Id\"\\s*:\\s*\"([^\"]+)\""); - var patientId = patientIdMatch.Groups[1].Value; - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Patients"); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - await page.FillAsync("input[placeholder*='Search']", uniqueName); - await page.WaitForSelectorAsync( - $"text={uniqueName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.ClickAsync($"[data-testid='edit-patient-{patientId}']"); - await page.WaitForSelectorAsync( - "[data-testid='edit-patient-page']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - await page.ClickAsync("button:has-text('Cancel')"); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - Assert.Contains("#patients", page.Url); - Assert.DoesNotContain("/edit/", page.Url); - - await page.CloseAsync(); - } - - /// - /// Browser back button from Edit Patient page returns to patients list. - /// - [Fact] - public async Task BrowserBackButton_FromEditPage_ReturnsToPatientsPage() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var uniqueName = $"BackBtnTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - $$$"""{"Active": true, "GivenName": "{{{uniqueName}}}", "FamilyName": "BackButtonTest", "Gender": "female"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdJson = await createResponse.Content.ReadAsStringAsync(); - var patientIdMatch = Regex.Match(createdJson, "\"Id\"\\s*:\\s*\"([^\"]+)\""); - var patientId = patientIdMatch.Groups[1].Value; - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Patients"); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - await page.FillAsync("input[placeholder*='Search']", uniqueName); - await page.WaitForSelectorAsync( - $"text={uniqueName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.ClickAsync($"[data-testid='edit-patient-{patientId}']"); - await page.WaitForSelectorAsync( - "[data-testid='edit-patient-page']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - await page.GoBackAsync(); - - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#patients", page.Url); - - var content = await page.ContentAsync(); - Assert.Contains("Patients", content); - Assert.Contains("Add Patient", content); - - await page.GoBackAsync(); - await page.WaitForSelectorAsync( - ".metric-card", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#dashboard", page.Url); - - await page.CloseAsync(); - } - - /// - /// Forward button works after going back. - /// - [Fact] - public async Task BrowserForwardButton_WorksAfterGoingBack() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - await page.ClickAsync("text=Patients"); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - await page.ClickAsync("text=Practitioners"); - await page.WaitForSelectorAsync( - ".practitioner-card, .empty-state", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#practitioners", page.Url); - - await page.GoBackAsync(); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#patients", page.Url); - - await page.GoForwardAsync(); - await page.WaitForSelectorAsync( - ".practitioner-card, .empty-state", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#practitioners", page.Url); - - var content = await page.ContentAsync(); - Assert.Contains("Practitioners", content); - - await page.CloseAsync(); - } -} diff --git a/Dashboard/Dashboard.Integration.Tests/PatientE2ETests.cs b/Dashboard/Dashboard.Integration.Tests/PatientE2ETests.cs deleted file mode 100644 index 25ad6d8..0000000 --- a/Dashboard/Dashboard.Integration.Tests/PatientE2ETests.cs +++ /dev/null @@ -1,239 +0,0 @@ -using System.Text.RegularExpressions; -using Microsoft.Playwright; - -namespace Dashboard.Integration.Tests; - -/// -/// E2E tests for patient-related functionality. -/// -[Collection("E2E Tests")] -[Trait("Category", "E2E")] -public sealed class PatientE2ETests -{ - private readonly E2EFixture _fixture; - - /// - /// Constructor receives shared fixture. - /// - public PatientE2ETests(E2EFixture fixture) => _fixture = fixture; - - /// - /// Dashboard loads and displays patient data from Clinical API. - /// - [Fact] - public async Task Dashboard_DisplaysPatientData_FromClinicalApi() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Type}: {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Patients"); - await page.WaitForSelectorAsync( - "text=TestPatient", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("TestPatient", content); - Assert.Contains("E2ETest", content); - - await page.CloseAsync(); - } - - /// - /// Add Patient button opens modal and creates patient via API. - /// - [Fact] - public async Task AddPatientButton_OpensModal_AndCreatesPatient() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Patients"); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.ClickAsync("[data-testid='add-patient-btn']"); - await page.WaitForSelectorAsync( - ".modal", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - var uniqueName = $"E2ECreated{DateTime.UtcNow.Ticks % 100000}"; - await page.FillAsync("[data-testid='patient-given-name']", uniqueName); - await page.FillAsync("[data-testid='patient-family-name']", "TestCreated"); - await page.SelectOptionAsync("[data-testid='patient-gender']", "male"); - await page.ClickAsync("[data-testid='submit-patient']"); - - await page.WaitForSelectorAsync( - $"text={uniqueName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - using var client = E2EFixture.CreateAuthenticatedClient(); - var response = await client.GetStringAsync($"{E2EFixture.ClinicalUrl}/fhir/Patient/"); - Assert.Contains(uniqueName, response); - - await page.CloseAsync(); - } - - /// - /// Patient Search button navigates to search and finds patients. - /// - [Fact] - public async Task PatientSearchButton_NavigatesToSearch_AndFindsPatients() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Patient Search"); - await page.WaitForSelectorAsync( - "input[placeholder*='Search']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - await page.FillAsync("input[placeholder*='Search']", "E2ETest"); - await page.WaitForSelectorAsync( - "text=TestPatient", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("TestPatient", content); - - await page.CloseAsync(); - } - - /// - /// Patient creation API works end-to-end. - /// - [Fact] - public async Task PatientCreationApi_WorksEndToEnd() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var uniqueName = $"ApiTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - $$$"""{"Active": true, "GivenName": "{{{uniqueName}}}", "FamilyName": "ApiCreated", "Gender": "female"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - - var listResponse = await client.GetStringAsync($"{E2EFixture.ClinicalUrl}/fhir/Patient/"); - Assert.Contains(uniqueName, listResponse); - } - - /// - /// Edit Patient button opens edit page and updates patient via API. - /// - [Fact] - public async Task EditPatientButton_OpensEditPage_AndUpdatesPatient() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var uniqueName = $"EditTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - $$$"""{"Active": true, "GivenName": "{{{uniqueName}}}", "FamilyName": "ToBeEdited", "Gender": "female"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdPatientJson = await createResponse.Content.ReadAsStringAsync(); - - var patientIdMatch = Regex.Match(createdPatientJson, "\"Id\"\\s*:\\s*\"([^\"]+)\""); - Assert.True(patientIdMatch.Success); - var patientId = patientIdMatch.Groups[1].Value; - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Patients"); - await page.WaitForSelectorAsync( - "[data-testid='add-patient-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.FillAsync("input[placeholder*='Search']", uniqueName); - await page.WaitForSelectorAsync( - $"text={uniqueName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.ClickAsync($"[data-testid='edit-patient-{patientId}']"); - await page.WaitForSelectorAsync( - "[data-testid='edit-patient-page']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - var newFamilyName = $"Edited{DateTime.UtcNow.Ticks % 100000}"; - await page.FillAsync("[data-testid='edit-family-name']", newFamilyName); - await page.ClickAsync("[data-testid='save-patient']"); - await page.WaitForSelectorAsync( - "[data-testid='edit-success']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var updatedPatientJson = await client.GetStringAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/{patientId}" - ); - Assert.Contains(newFamilyName, updatedPatientJson); - - await page.CloseAsync(); - } - - /// - /// Patient update API works end-to-end. - /// - [Fact] - public async Task PatientUpdateApi_WorksEndToEnd() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var uniqueName = $"UpdateApiTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - $$$"""{"Active": true, "GivenName": "{{{uniqueName}}}", "FamilyName": "Original", "Gender": "male"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdPatientJson = await createResponse.Content.ReadAsStringAsync(); - - var patientIdMatch = Regex.Match(createdPatientJson, "\"Id\"\\s*:\\s*\"([^\"]+)\""); - var patientId = patientIdMatch.Groups[1].Value; - - var updatedFamilyName = $"Updated{DateTime.UtcNow.Ticks % 100000}"; - var updateResponse = await client.PutAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/{patientId}", - new StringContent( - $$$"""{"Active": true, "GivenName": "{{{uniqueName}}}", "FamilyName": "{{{updatedFamilyName}}}", "Gender": "male", "Email": "updated@test.com"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - updateResponse.EnsureSuccessStatusCode(); - - var getResponse = await client.GetStringAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/{patientId}" - ); - Assert.Contains(updatedFamilyName, getResponse); - Assert.Contains("updated@test.com", getResponse); - } -} diff --git a/Dashboard/Dashboard.Integration.Tests/PractitionerE2ETests.cs b/Dashboard/Dashboard.Integration.Tests/PractitionerE2ETests.cs deleted file mode 100644 index e67065c..0000000 --- a/Dashboard/Dashboard.Integration.Tests/PractitionerE2ETests.cs +++ /dev/null @@ -1,309 +0,0 @@ -using System.Text.RegularExpressions; -using Microsoft.Playwright; - -namespace Dashboard.Integration.Tests; - -/// -/// E2E tests for practitioner-related functionality. -/// -[Collection("E2E Tests")] -[Trait("Category", "E2E")] -public sealed class PractitionerE2ETests -{ - private readonly E2EFixture _fixture; - - /// - /// Constructor receives shared fixture. - /// - public PractitionerE2ETests(E2EFixture fixture) => _fixture = fixture; - - /// - /// Dashboard loads and displays practitioner data from Scheduling API. - /// - [Fact] - public async Task Dashboard_DisplaysPractitionerData_FromSchedulingApi() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Practitioners"); - await page.WaitForSelectorAsync( - "text=DrTest", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.WaitForSelectorAsync( - ".practitioner-card", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("DrTest", content); - Assert.Contains("E2EPractitioner", content); - Assert.Contains("Johnson", content); - Assert.Contains("MD", content); - Assert.Contains("General Practice", content); - - await page.CloseAsync(); - } - - /// - /// Practitioners page data comes from REAL Scheduling API. - /// - [Fact] - public async Task PractitionersPage_LoadsFromSchedulingApi_WithFhirCompliantData() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - var apiResponse = await client.GetStringAsync($"{E2EFixture.SchedulingUrl}/Practitioner"); - - Assert.Contains("DR001", apiResponse); - Assert.Contains("E2EPractitioner", apiResponse); - Assert.Contains("MD", apiResponse); - - var page = await _fixture.CreateAuthenticatedPageAsync(); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Practitioners"); - await page.WaitForSelectorAsync( - ".practitioner-card", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var cards = await page.QuerySelectorAllAsync(".practitioner-card"); - Assert.True(cards.Count >= 3); - - await page.CloseAsync(); - } - - /// - /// Practitioner creation API works end-to-end. - /// - [Fact] - public async Task PractitionerCreationApi_WorksEndToEnd() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var uniqueId = $"DR{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner", - new StringContent( - $$$"""{"Identifier": "{{{uniqueId}}}", "Active": true, "NameGiven": "ApiDoctor", "NameFamily": "TestDoc", "Qualification": "MD", "Specialty": "Testing", "TelecomEmail": "test@hospital.org", "TelecomPhone": "+1-555-9999"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - - var listResponse = await client.GetStringAsync($"{E2EFixture.SchedulingUrl}/Practitioner"); - Assert.Contains(uniqueId, listResponse); - } - - /// - /// Add Practitioner button opens modal and creates practitioner via API. - /// - [Fact] - public async Task AddPractitionerButton_OpensModal_AndCreatesPractitioner() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Practitioners"); - await page.WaitForSelectorAsync( - "[data-testid='add-practitioner-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.ClickAsync("[data-testid='add-practitioner-btn']"); - await page.WaitForSelectorAsync( - ".modal", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - var uniqueIdentifier = $"DR{DateTime.UtcNow.Ticks % 100000}"; - var uniqueGivenName = $"E2EDoc{DateTime.UtcNow.Ticks % 100000}"; - await page.FillAsync("[data-testid='practitioner-identifier']", uniqueIdentifier); - await page.FillAsync("[data-testid='practitioner-given-name']", uniqueGivenName); - await page.FillAsync("[data-testid='practitioner-family-name']", "TestCreated"); - await page.FillAsync("[data-testid='practitioner-specialty']", "E2E Testing"); - await page.ClickAsync("[data-testid='submit-practitioner']"); - - await page.WaitForSelectorAsync( - $"text={uniqueGivenName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - using var client = E2EFixture.CreateAuthenticatedClient(); - var response = await client.GetStringAsync($"{E2EFixture.SchedulingUrl}/Practitioner"); - Assert.Contains(uniqueIdentifier, response); - - await page.CloseAsync(); - } - - /// - /// Edit Practitioner button navigates to edit page and updates practitioner. - /// - [Fact] - public async Task EditPractitionerButton_OpensEditPage_AndUpdatesPractitioner() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var uniqueIdentifier = $"DREdit{DateTime.UtcNow.Ticks % 100000}"; - var uniqueGivenName = $"EditTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner", - new StringContent( - $$$"""{"Identifier": "{{{uniqueIdentifier}}}", "NameFamily": "OriginalFamily", "NameGiven": "{{{uniqueGivenName}}}", "Qualification": "MD", "Specialty": "Original Specialty"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdJson = await createResponse.Content.ReadAsStringAsync(); - var practitionerIdMatch = Regex.Match(createdJson, "\"Id\"\\s*:\\s*\"([^\"]+)\""); - var practitionerId = practitionerIdMatch.Groups[1].Value; - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Practitioners"); - await page.WaitForSelectorAsync( - $"text={uniqueGivenName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var editButton = page.Locator($"[data-testid='edit-practitioner-{practitionerId}']"); - await editButton.HoverAsync(); - await editButton.ClickAsync(); - - await page.WaitForSelectorAsync( - "[data-testid='edit-practitioner-page']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - var newSpecialty = $"Updated Specialty {DateTime.UtcNow.Ticks % 100000}"; - await page.FillAsync("[data-testid='edit-practitioner-specialty']", newSpecialty); - await page.ClickAsync("[data-testid='save-practitioner']"); - await page.WaitForSelectorAsync( - "[data-testid='edit-practitioner-success']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var updatedPractitionerJson = await client.GetStringAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner/{practitionerId}" - ); - Assert.Contains(newSpecialty, updatedPractitionerJson); - - await page.CloseAsync(); - } - - /// - /// Practitioner update API works end-to-end. - /// - [Fact] - public async Task PractitionerUpdateApi_WorksEndToEnd() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var uniqueIdentifier = $"DRApi{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner", - new StringContent( - $$$"""{"Identifier": "{{{uniqueIdentifier}}}", "NameFamily": "ApiOriginal", "NameGiven": "TestDoc", "Qualification": "MD", "Specialty": "Original"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdPractitionerJson = await createResponse.Content.ReadAsStringAsync(); - - var practitionerIdMatch = Regex.Match( - createdPractitionerJson, - "\"Id\"\\s*:\\s*\"([^\"]+)\"" - ); - var practitionerId = practitionerIdMatch.Groups[1].Value; - - var updatedSpecialty = $"ApiUpdated{DateTime.UtcNow.Ticks % 100000}"; - var updateResponse = await client.PutAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner/{practitionerId}", - new StringContent( - $$$"""{"Identifier": "{{{uniqueIdentifier}}}", "Active": true, "NameFamily": "ApiUpdated", "NameGiven": "TestDoc", "Qualification": "DO", "Specialty": "{{{updatedSpecialty}}}", "TelecomEmail": "updated@hospital.com", "TelecomPhone": "555-1234"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - updateResponse.EnsureSuccessStatusCode(); - - var getResponse = await client.GetStringAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner/{practitionerId}" - ); - Assert.Contains(updatedSpecialty, getResponse); - Assert.Contains("ApiUpdated", getResponse); - } - - /// - /// Browser back button works from Edit Practitioner page. - /// - [Fact] - public async Task BrowserBackButton_FromEditPractitionerPage_ReturnsToPractitionersPage() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var uniqueIdentifier = $"DRBack{DateTime.UtcNow.Ticks % 100000}"; - var uniqueGivenName = $"BackTest{DateTime.UtcNow.Ticks % 100000}"; - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner", - new StringContent( - $$$"""{"Identifier": "{{{uniqueIdentifier}}}", "NameFamily": "BackButtonTest", "NameGiven": "{{{uniqueGivenName}}}", "Qualification": "MD", "Specialty": "Testing"}""", - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var createdJson = await createResponse.Content.ReadAsStringAsync(); - var practitionerIdMatch = Regex.Match(createdJson, "\"Id\"\\s*:\\s*\"([^\"]+)\""); - var practitionerId = practitionerIdMatch.Groups[1].Value; - - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Practitioners"); - await page.WaitForSelectorAsync( - $"text={uniqueGivenName}", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - - var editButton = page.Locator($"[data-testid='edit-practitioner-{practitionerId}']"); - await editButton.HoverAsync(); - await editButton.ClickAsync(); - await page.WaitForSelectorAsync( - "[data-testid='edit-practitioner-page']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - await page.GoBackAsync(); - - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='add-practitioner-btn']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#practitioners", page.Url); - - await page.CloseAsync(); - } -} diff --git a/Dashboard/Dashboard.Integration.Tests/SyncE2ETests.cs b/Dashboard/Dashboard.Integration.Tests/SyncE2ETests.cs deleted file mode 100644 index a02979f..0000000 --- a/Dashboard/Dashboard.Integration.Tests/SyncE2ETests.cs +++ /dev/null @@ -1,741 +0,0 @@ -using Microsoft.Playwright; - -namespace Dashboard.Integration.Tests; - -/// -/// E2E tests for bidirectional sync functionality. -/// -[Collection("E2E Tests")] -[Trait("Category", "E2E")] -public sealed class SyncE2ETests -{ - private readonly E2EFixture _fixture; - - /// - /// Constructor receives shared fixture. - /// - public SyncE2ETests(E2EFixture fixture) => _fixture = fixture; - - /// - /// Sync Dashboard menu item navigates to sync page and displays sync status. - /// - [Fact] - public async Task SyncDashboard_NavigatesToSyncPage_AndDisplaysStatus() - { - var page = await _fixture.CreateAuthenticatedPageAsync(); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - ".sidebar", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.ClickAsync("text=Sync Dashboard"); - - await page.WaitForSelectorAsync( - "[data-testid='sync-page']", - new PageWaitForSelectorOptions { Timeout = 10000 } - ); - Assert.Contains("#sync", page.Url); - - await page.WaitForSelectorAsync( - "[data-testid='service-status-clinical']", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='service-status-scheduling']", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='sync-records-table']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='action-filter']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='service-filter']", - new PageWaitForSelectorOptions { Timeout = 5000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("Sync Dashboard", content); - Assert.Contains("Clinical.Api", content); - Assert.Contains("Scheduling.Api", content); - Assert.Contains("Sync Records", content); - - await page.CloseAsync(); - } - - /// - /// Sync Dashboard service filter shows ONLY records from selected service. - /// This test PROVES the filter works by verifying actual row content. - /// - [Fact] - public async Task SyncDashboard_ServiceFilter_ShowsOnlySelectedService() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#sync" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - - // Create data in both services to ensure we have records from both - var uniqueId = $"FilterTest{DateTime.UtcNow.Ticks % 1000000}"; - - // Create patient in Clinical.Api - var patientRequest = new - { - Active = true, - GivenName = $"FilterPatient{uniqueId}", - FamilyName = "ClinicalTest", - Gender = "other", - }; - await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - System.Text.Json.JsonSerializer.Serialize(patientRequest), - System.Text.Encoding.UTF8, - "application/json" - ) - ); - - // Create practitioner in Scheduling.Api - var practitionerRequest = new - { - Identifier = $"FILTER-DR-{uniqueId}", - Active = true, - NameGiven = $"FilterDoc{uniqueId}", - NameFamily = "SchedulingTest", - Qualification = "MD", - Specialty = "Testing", - }; - await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner", - new StringContent( - System.Text.Json.JsonSerializer.Serialize(practitionerRequest), - System.Text.Encoding.UTF8, - "application/json" - ) - ); - - await page.GotoAsync($"{E2EFixture.DashboardUrl}#sync"); - await page.WaitForSelectorAsync( - "[data-testid='sync-page']", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='service-status-clinical']", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - await Task.Delay(1000); // Allow data to load - - // Get initial count with all services - var allRows = await page.QuerySelectorAllAsync( - "[data-testid='sync-records-table'] tbody tr" - ); - var initialCount = allRows.Count; - Console.WriteLine($"[TEST] Initial row count (all services): {initialCount}"); - - // Filter to Clinical only - await page.SelectOptionAsync("[data-testid='service-filter']", "clinical"); - await Task.Delay(500); - - var clinicalRows = await page.QuerySelectorAllAsync( - "[data-testid='sync-records-table'] tbody tr" - ); - Console.WriteLine($"[TEST] Clinical filter row count: {clinicalRows.Count}"); - - // PROVE: Every visible row must be from Clinical service - foreach (var row in clinicalRows) - { - var serviceAttr = await row.GetAttributeAsync("data-service"); - Assert.Equal("clinical", serviceAttr); - } - - // Filter to Scheduling only - await page.SelectOptionAsync("[data-testid='service-filter']", "scheduling"); - await Task.Delay(500); - - var schedulingRows = await page.QuerySelectorAllAsync( - "[data-testid='sync-records-table'] tbody tr" - ); - Console.WriteLine($"[TEST] Scheduling filter row count: {schedulingRows.Count}"); - - // PROVE: Every visible row must be from Scheduling service - foreach (var row in schedulingRows) - { - var serviceAttr = await row.GetAttributeAsync("data-service"); - Assert.Equal("scheduling", serviceAttr); - } - - // PROVE: Combined counts should equal total (or less if overlap) - Assert.True( - clinicalRows.Count + schedulingRows.Count <= initialCount + 1, - $"Clinical ({clinicalRows.Count}) + Scheduling ({schedulingRows.Count}) should not exceed initial ({initialCount})" - ); - - await page.CloseAsync(); - } - - /// - /// Sync Dashboard action filter shows ONLY records with selected operation. - /// This test PROVES the filter works by verifying actual row content. - /// - [Fact] - public async Task SyncDashboard_ActionFilter_ShowsOnlySelectedOperation() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#sync" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - - // Create a patient (Insert operation = 0) - var uniqueId = $"ActionTest{DateTime.UtcNow.Ticks % 1000000}"; - var patientRequest = new - { - Active = true, - GivenName = $"ActionPatient{uniqueId}", - FamilyName = "InsertTest", - Gender = "female", - }; - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - System.Text.Json.JsonSerializer.Serialize(patientRequest), - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - - await page.GotoAsync($"{E2EFixture.DashboardUrl}#sync"); - await page.WaitForSelectorAsync( - "[data-testid='sync-page']", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='service-status-clinical']", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - await Task.Delay(1000); // Allow data to load - - // Wait for sync records to appear in the table - await page.WaitForFunctionAsync( - @"() => { - const rows = document.querySelectorAll('[data-testid=""sync-records-table""] tbody tr'); - return rows.length > 0; - }", - new PageWaitForFunctionOptions { Timeout = 20000 } - ); - - // Log initial state before filtering - var initialRows = await page.QuerySelectorAllAsync( - "[data-testid='sync-records-table'] tbody tr" - ); - Console.WriteLine($"[TEST] Initial row count before filter: {initialRows.Count}"); - foreach (var row in initialRows.Take(5)) - { - var op = await row.GetAttributeAsync("data-operation"); - Console.WriteLine($"[TEST] Row data-operation: {op}"); - } - - // Filter to Insert operations only (operation = 0) - await page.SelectOptionAsync("[data-testid='action-filter']", "0"); - await Task.Delay(500); // Allow React to start re-rendering - - // Wait for React to apply the filter - wait until ALL visible rows have operation=0 - // OR there are no rows (which is valid if no Insert operations exist) - await page.WaitForFunctionAsync( - @"() => { - const rows = document.querySelectorAll('[data-testid=""sync-records-table""] tbody tr'); - console.log('[Filter] Row count after filter: ' + rows.length); - if (rows.length === 0) return true; - const allMatch = Array.from(rows).every(row => { - const op = row.getAttribute('data-operation'); - console.log('[Filter] Row operation: ' + op); - return op === '0'; - }); - return allMatch; - }", - new PageWaitForFunctionOptions { Timeout = 20000 } - ); - - var insertRows = await page.QuerySelectorAllAsync( - "[data-testid='sync-records-table'] tbody tr" - ); - Console.WriteLine($"[TEST] Insert filter row count: {insertRows.Count}"); - - // PROVE: Every visible row must have Insert operation (0) - foreach (var row in insertRows) - { - var operationAttr = await row.GetAttributeAsync("data-operation"); - Assert.Equal("0", operationAttr); - } - - // Verify filter value is selected - var selectedValue = await page.EvalOnSelectorAsync( - "[data-testid='action-filter']", - "el => el.value" - ); - Assert.Equal("0", selectedValue); - - // Reset filter - await page.SelectOptionAsync("[data-testid='action-filter']", "all"); - - // Wait for React to apply the reset filter - await page.WaitForFunctionAsync( - $"() => document.querySelector('[data-testid=\"action-filter\"]').value === 'all'", - new PageWaitForFunctionOptions { Timeout = 5000 } - ); - await Task.Delay(300); // Small buffer for React re-render - - var allRows = await page.QuerySelectorAllAsync( - "[data-testid='sync-records-table'] tbody tr" - ); - Assert.True(allRows.Count >= insertRows.Count, "All rows should be >= Insert-only rows"); - - await page.CloseAsync(); - } - - /// - /// Sync Dashboard combined filters work correctly. - /// PROVES both service AND action filters can be used together. - /// - [Fact] - public async Task SyncDashboard_CombinedFilters_WorkTogether() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#sync" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - - // Create data in Clinical.Api - var uniqueId = $"ComboTest{DateTime.UtcNow.Ticks % 1000000}"; - var patientRequest = new - { - Active = true, - GivenName = $"ComboPatient{uniqueId}", - FamilyName = "ComboTest", - Gender = "male", - }; - await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - System.Text.Json.JsonSerializer.Serialize(patientRequest), - System.Text.Encoding.UTF8, - "application/json" - ) - ); - - await page.GotoAsync($"{E2EFixture.DashboardUrl}#sync"); - await page.WaitForSelectorAsync( - "[data-testid='sync-page']", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='service-status-clinical']", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - await Task.Delay(1000); - - // Apply both filters: Clinical + Insert - await page.SelectOptionAsync("[data-testid='service-filter']", "clinical"); - await page.SelectOptionAsync("[data-testid='action-filter']", "0"); - - // Wait for React to apply both filters - await page.WaitForFunctionAsync( - @"() => { - const rows = document.querySelectorAll('[data-testid=""sync-records-table""] tbody tr'); - if (rows.length === 0) return true; // No rows = filters applied (or empty) - return Array.from(rows).every(row => - row.getAttribute('data-service') === 'clinical' && - row.getAttribute('data-operation') === '0' - ); - }", - new PageWaitForFunctionOptions { Timeout = 5000 } - ); - - var filteredRows = await page.QuerySelectorAllAsync( - "[data-testid='sync-records-table'] tbody tr" - ); - Console.WriteLine( - $"[TEST] Combined filter (Clinical + Insert) row count: {filteredRows.Count}" - ); - - // PROVE: Every row must satisfy BOTH filters - foreach (var row in filteredRows) - { - var serviceAttr = await row.GetAttributeAsync("data-service"); - var operationAttr = await row.GetAttributeAsync("data-operation"); - Assert.Equal("clinical", serviceAttr); - Assert.Equal("0", operationAttr); - } - - // Try Scheduling + Insert - await page.SelectOptionAsync("[data-testid='service-filter']", "scheduling"); - - // Wait for React to apply the service filter change - await page.WaitForFunctionAsync( - @"() => { - const rows = document.querySelectorAll('[data-testid=""sync-records-table""] tbody tr'); - if (rows.length === 0) return true; - return Array.from(rows).every(row => - row.getAttribute('data-service') === 'scheduling' && - row.getAttribute('data-operation') === '0' - ); - }", - new PageWaitForFunctionOptions { Timeout = 5000 } - ); - - var schedulingInsertRows = await page.QuerySelectorAllAsync( - "[data-testid='sync-records-table'] tbody tr" - ); - foreach (var row in schedulingInsertRows) - { - var serviceAttr = await row.GetAttributeAsync("data-service"); - var operationAttr = await row.GetAttributeAsync("data-operation"); - Assert.Equal("scheduling", serviceAttr); - Assert.Equal("0", operationAttr); - } - - await page.CloseAsync(); - } - - /// - /// Sync Dashboard search filter works correctly. - /// PROVES search by entity ID filters correctly. - /// - [Fact] - public async Task SyncDashboard_SearchFilter_FiltersCorrectly() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - // Create a patient BEFORE loading the sync page so data is fresh - var uniqueId = $"SearchTest{DateTime.UtcNow.Ticks % 1000000}"; - var patientRequest = new - { - Active = true, - GivenName = $"SearchPatient{uniqueId}", - FamilyName = "SearchTest", - Gender = "male", - }; - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - System.Text.Json.JsonSerializer.Serialize(patientRequest), - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var patientJson = await createResponse.Content.ReadAsStringAsync(); - var patientDoc = System.Text.Json.JsonDocument.Parse(patientJson); - var patientId = patientDoc.RootElement.GetProperty("Id").GetString(); - - // Navigate to sync page AFTER patient exists in sync log - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#sync" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - - await page.GotoAsync($"{E2EFixture.DashboardUrl}#sync"); - await page.WaitForSelectorAsync( - "[data-testid='sync-page']", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='service-status-clinical']", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - await Task.Delay(1000); - - // Get initial count - var initialRows = await page.QuerySelectorAllAsync( - "[data-testid='sync-records-table'] tbody tr" - ); - var initialCount = initialRows.Count; - - // Search for the patient ID - await page.FillAsync("[data-testid='sync-search']", patientId!); - await Task.Delay(500); - - var searchRows = await page.QuerySelectorAllAsync( - "[data-testid='sync-records-table'] tbody tr" - ); - Console.WriteLine($"[TEST] Search for '{patientId}' found {searchRows.Count} rows"); - - // PROVE: Search should find at least one matching row - Assert.True( - searchRows.Count >= 1, - $"Search for patient ID '{patientId}' should find at least one row" - ); - Assert.True( - searchRows.Count < initialCount || initialCount <= 1, - "Search should filter down results (unless only 1 row exists)" - ); - - await page.CloseAsync(); - } - - /// - /// Deep linking to sync page works. - /// - [Fact] - public async Task SyncDashboard_DeepLinkingWorks() - { - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#sync" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - await page.WaitForSelectorAsync( - "[data-testid='sync-page']", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("Sync Dashboard", content); - Assert.Contains("Monitor and manage sync operations", content); - - await page.CloseAsync(); - } - - /// - /// Data added to Clinical.Api is synced to Scheduling.Api. - /// - [Fact] - public async Task Sync_ClinicalPatient_AppearsInScheduling_AfterSync() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var uniqueId = $"SyncTest{DateTime.UtcNow.Ticks % 1000000}"; - var patientRequest = new - { - Active = true, - GivenName = $"SyncPatient{uniqueId}", - FamilyName = "ToScheduling", - Gender = "other", - Phone = "+1-555-SYNC", - Email = $"sync{uniqueId}@test.com", - }; - - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - System.Text.Json.JsonSerializer.Serialize(patientRequest), - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var patientJson = await createResponse.Content.ReadAsStringAsync(); - var patientDoc = System.Text.Json.JsonDocument.Parse(patientJson); - var patientId = patientDoc.RootElement.GetProperty("Id").GetString(); - - var clinicalGetResponse = await client.GetAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/{patientId}" - ); - Assert.Equal(HttpStatusCode.OK, clinicalGetResponse.StatusCode); - - var syncedToScheduling = false; - for (var i = 0; i < 18; i++) - { - await Task.Delay(5000); - - var syncPatientsResponse = await client.GetAsync( - $"{E2EFixture.SchedulingUrl}/sync/patients" - ); - if (syncPatientsResponse.IsSuccessStatusCode) - { - var patientsJson = await syncPatientsResponse.Content.ReadAsStringAsync(); - if (patientsJson.Contains(patientId!) || patientsJson.Contains(uniqueId)) - { - syncedToScheduling = true; - break; - } - } - } - - Assert.True( - syncedToScheduling, - $"Patient '{uniqueId}' created in Clinical.Api was not synced to Scheduling.Api within 90 seconds." - ); - } - - /// - /// Data added to Scheduling.Api is synced to Clinical.Api. - /// - [Fact] - public async Task Sync_SchedulingPractitioner_AppearsInClinical_AfterSync() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var uniqueId = $"SyncTest{DateTime.UtcNow.Ticks % 1000000}"; - var practitionerRequest = new - { - Identifier = $"SYNC-DR-{uniqueId}", - Active = true, - NameGiven = $"SyncDoctor{uniqueId}", - NameFamily = "ToClinical", - Qualification = "MD", - Specialty = "Sync Testing", - TelecomEmail = $"syncdoc{uniqueId}@hospital.org", - TelecomPhone = "+1-555-SYNC", - }; - - var createResponse = await client.PostAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner", - new StringContent( - System.Text.Json.JsonSerializer.Serialize(practitionerRequest), - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - var practitionerJson = await createResponse.Content.ReadAsStringAsync(); - var practitionerDoc = System.Text.Json.JsonDocument.Parse(practitionerJson); - var practitionerId = practitionerDoc.RootElement.GetProperty("Id").GetString(); - - var schedulingGetResponse = await client.GetAsync( - $"{E2EFixture.SchedulingUrl}/Practitioner/{practitionerId}" - ); - Assert.Equal(HttpStatusCode.OK, schedulingGetResponse.StatusCode); - - var syncedToClinical = false; - for (var i = 0; i < 30; i++) - { - await Task.Delay(5000); - - var syncProvidersResponse = await client.GetAsync( - $"{E2EFixture.ClinicalUrl}/sync/providers" - ); - if (syncProvidersResponse.IsSuccessStatusCode) - { - var providersJson = await syncProvidersResponse.Content.ReadAsStringAsync(); - if (providersJson.Contains(practitionerId!) || providersJson.Contains(uniqueId)) - { - syncedToClinical = true; - break; - } - } - } - - Assert.True( - syncedToClinical, - $"Practitioner '{uniqueId}' created in Scheduling.Api was not synced to Clinical.Api within 150 seconds." - ); - } - - /// - /// Sync changes appear in Dashboard UI seamlessly. - /// - [Fact] - public async Task Sync_ChangesAppearInDashboardUI_Seamlessly() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - var page = await _fixture.CreateAuthenticatedPageAsync( - navigateTo: $"{E2EFixture.DashboardUrl}#sync" - ); - page.Console += (_, msg) => Console.WriteLine($"[BROWSER] {msg.Text}"); - - var uniqueId = $"DashSync{DateTime.UtcNow.Ticks % 1000000}"; - var patientRequest = new - { - Active = true, - GivenName = $"DashboardSync{uniqueId}", - FamilyName = "TestPatient", - Gender = "male", - }; - - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - System.Text.Json.JsonSerializer.Serialize(patientRequest), - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - - await page.GotoAsync($"{E2EFixture.DashboardUrl}#sync"); - await page.WaitForSelectorAsync( - "[data-testid='sync-page']", - new PageWaitForSelectorOptions { Timeout = 20000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='service-status-clinical']", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - await page.WaitForSelectorAsync( - "[data-testid='service-status-scheduling']", - new PageWaitForSelectorOptions { Timeout = 15000 } - ); - - var content = await page.ContentAsync(); - Assert.Contains("Clinical.Api", content); - Assert.Contains("Scheduling.Api", content); - Assert.Contains("Sync Records", content); - - var clinicalCardVisible = await page.IsVisibleAsync( - "[data-testid='service-status-clinical']" - ); - var schedulingCardVisible = await page.IsVisibleAsync( - "[data-testid='service-status-scheduling']" - ); - Assert.True(clinicalCardVisible); - Assert.True(schedulingCardVisible); - - await page.CloseAsync(); - } - - /// - /// Sync log entries are created when data changes. - /// - [Fact] - public async Task Sync_CreatesLogEntries_WhenDataChanges() - { - using var client = E2EFixture.CreateAuthenticatedClient(); - - var initialClinicalResponse = await client.GetAsync( - $"{E2EFixture.ClinicalUrl}/sync/records" - ); - initialClinicalResponse.EnsureSuccessStatusCode(); - var initialClinicalJson = await initialClinicalResponse.Content.ReadAsStringAsync(); - var initialClinicalDoc = System.Text.Json.JsonDocument.Parse(initialClinicalJson); - var initialClinicalCount = initialClinicalDoc.RootElement.GetProperty("total").GetInt32(); - - var uniqueId = $"LogTest{DateTime.UtcNow.Ticks % 1000000}"; - var patientRequest = new - { - Active = true, - GivenName = $"LogPatient{uniqueId}", - FamilyName = "TestSync", - Gender = "female", - }; - - var createResponse = await client.PostAsync( - $"{E2EFixture.ClinicalUrl}/fhir/Patient/", - new StringContent( - System.Text.Json.JsonSerializer.Serialize(patientRequest), - System.Text.Encoding.UTF8, - "application/json" - ) - ); - createResponse.EnsureSuccessStatusCode(); - - var updatedClinicalResponse = await client.GetAsync( - $"{E2EFixture.ClinicalUrl}/sync/records" - ); - updatedClinicalResponse.EnsureSuccessStatusCode(); - var updatedClinicalJson = await updatedClinicalResponse.Content.ReadAsStringAsync(); - var updatedClinicalDoc = System.Text.Json.JsonDocument.Parse(updatedClinicalJson); - var updatedClinicalCount = updatedClinicalDoc.RootElement.GetProperty("total").GetInt32(); - - Assert.True( - updatedClinicalCount > initialClinicalCount, - $"Sync log count should increase after creating a patient. Initial: {initialClinicalCount}, After: {updatedClinicalCount}" - ); - } -} diff --git a/Dashboard/Dashboard.Integration.Tests/xunit.runner.json b/Dashboard/Dashboard.Integration.Tests/xunit.runner.json deleted file mode 100644 index 34723a8..0000000 --- a/Dashboard/Dashboard.Integration.Tests/xunit.runner.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json", - "parallelizeAssembly": false, - "parallelizeTestCollections": false, - "maxParallelThreads": 1, - "stopOnFail": true, - "diagnosticMessages": true, - "longRunningTestSeconds": 30, - "methodDisplay": "method" -} diff --git a/Dashboard/Dashboard.Web/Api/ApiClient.cs b/Dashboard/Dashboard.Web/Api/ApiClient.cs deleted file mode 100644 index d232a5f..0000000 --- a/Dashboard/Dashboard.Web/Api/ApiClient.cs +++ /dev/null @@ -1,528 +0,0 @@ -using System; -using System.Threading.Tasks; -using Dashboard.Models; -using H5; -using static H5.Core.dom; - -namespace Dashboard.Api -{ - /// - /// HTTP API client for Clinical and Scheduling microservices. - /// - public static class ApiClient - { - private static string _clinicalBaseUrl = "http://localhost:5080"; - private static string _schedulingBaseUrl = "http://localhost:5001"; - private static string _icd10BaseUrl = "http://localhost:5090"; - private static string _clinicalToken = ""; - private static string _schedulingToken = ""; - private static string _icd10Token = ""; - - /// - /// Sets the base URLs for the microservices. - /// - public static void Configure(string clinicalUrl, string schedulingUrl) - { - _clinicalBaseUrl = clinicalUrl; - _schedulingBaseUrl = schedulingUrl; - } - - /// - /// Sets the ICD-10 API base URL. - /// - public static void ConfigureIcd10(string icd10Url) - { - _icd10BaseUrl = icd10Url; - } - - /// - /// Sets the authentication tokens for the microservices. - /// - public static void SetTokens(string clinicalToken, string schedulingToken) - { - _clinicalToken = clinicalToken; - _schedulingToken = schedulingToken; - } - - /// - /// Sets the ICD-10 API authentication token. - /// - public static void SetIcd10Token(string icd10Token) - { - _icd10Token = icd10Token; - } - - // === CLINICAL API === - - /// - /// Fetches all patients from the Clinical API. - /// - public static async Task GetPatientsAsync() - { - var response = await FetchClinicalAsync(_clinicalBaseUrl + "/fhir/Patient"); - return ParseJson(response); - } - - /// - /// Fetches a patient by ID from the Clinical API. - /// - public static async Task GetPatientAsync(string id) - { - var response = await FetchClinicalAsync(_clinicalBaseUrl + "/fhir/Patient/" + id); - return ParseJson(response); - } - - /// - /// Searches patients by query string. - /// - public static async Task SearchPatientsAsync(string query) - { - var response = await FetchClinicalAsync( - _clinicalBaseUrl + "/fhir/Patient/_search?q=" + EncodeUri(query) - ); - return ParseJson(response); - } - - /// - /// Fetches encounters for a patient. - /// - public static async Task GetEncountersAsync(string patientId) - { - var response = await FetchClinicalAsync( - _clinicalBaseUrl + "/fhir/Patient/" + patientId + "/Encounter" - ); - return ParseJson(response); - } - - /// - /// Fetches conditions for a patient. - /// - public static async Task GetConditionsAsync(string patientId) - { - var response = await FetchClinicalAsync( - _clinicalBaseUrl + "/fhir/Patient/" + patientId + "/Condition" - ); - return ParseJson(response); - } - - /// - /// Fetches medications for a patient. - /// - public static async Task GetMedicationsAsync(string patientId) - { - var response = await FetchClinicalAsync( - _clinicalBaseUrl + "/fhir/Patient/" + patientId + "/MedicationRequest" - ); - return ParseJson(response); - } - - /// - /// Creates a new patient. - /// - public static async Task CreatePatientAsync(Patient patient) - { - var response = await PostClinicalAsync(_clinicalBaseUrl + "/fhir/Patient/", patient); - return ParseJson(response); - } - - /// - /// Updates an existing patient. - /// - public static async Task UpdatePatientAsync(string id, Patient patient) - { - var response = await PutClinicalAsync( - _clinicalBaseUrl + "/fhir/Patient/" + id, - patient - ); - return ParseJson(response); - } - - // === SCHEDULING API === - - /// - /// Fetches all practitioners from the Scheduling API. - /// - public static async Task GetPractitionersAsync() - { - var response = await FetchSchedulingAsync(_schedulingBaseUrl + "/Practitioner"); - return ParseJson(response); - } - - /// - /// Fetches a practitioner by ID from the Scheduling API. - /// - public static async Task GetPractitionerAsync(string id) - { - var response = await FetchSchedulingAsync(_schedulingBaseUrl + "/Practitioner/" + id); - return ParseJson(response); - } - - /// - /// Searches practitioners by specialty. - /// - public static async Task SearchPractitionersAsync(string specialty) - { - var response = await FetchSchedulingAsync( - _schedulingBaseUrl + "/Practitioner/_search?specialty=" + EncodeUri(specialty) - ); - return ParseJson(response); - } - - /// - /// Fetches all appointments from the Scheduling API. - /// - public static async Task GetAppointmentsAsync() - { - var response = await FetchSchedulingAsync(_schedulingBaseUrl + "/Appointment"); - return ParseJson(response); - } - - /// - /// Fetches an appointment by ID from the Scheduling API. - /// - public static async Task GetAppointmentAsync(string id) - { - var response = await FetchSchedulingAsync(_schedulingBaseUrl + "/Appointment/" + id); - return ParseJson(response); - } - - /// - /// Updates an existing appointment. - /// - public static async Task UpdateAppointmentAsync(string id, object appointment) - { - var response = await PutSchedulingAsync( - _schedulingBaseUrl + "/Appointment/" + id, - appointment - ); - return ParseJson(response); - } - - /// - /// Fetches appointments for a patient. - /// - public static async Task GetPatientAppointmentsAsync(string patientId) - { - var response = await FetchSchedulingAsync( - _schedulingBaseUrl + "/Patient/" + patientId + "/Appointment" - ); - return ParseJson(response); - } - - /// - /// Fetches appointments for a practitioner. - /// - public static async Task GetPractitionerAppointmentsAsync( - string practitionerId - ) - { - var response = await FetchSchedulingAsync( - _schedulingBaseUrl + "/Practitioner/" + practitionerId + "/Appointment" - ); - return ParseJson(response); - } - - // === ICD-10 API === - - /// - /// Fetches all ICD-10 chapters. - /// - public static async Task GetIcd10ChaptersAsync() - { - var response = await FetchIcd10Async(_icd10BaseUrl + "/api/icd10/chapters"); - return ParseJson(response); - } - - /// - /// Fetches blocks for a chapter. - /// - public static async Task GetIcd10BlocksAsync(string chapterId) - { - var response = await FetchIcd10Async( - _icd10BaseUrl + "/api/icd10/chapters/" + chapterId + "/blocks" - ); - return ParseJson(response); - } - - /// - /// Fetches categories for a block. - /// - public static async Task GetIcd10CategoriesAsync(string blockId) - { - var response = await FetchIcd10Async( - _icd10BaseUrl + "/api/icd10/blocks/" + blockId + "/categories" - ); - return ParseJson(response); - } - - /// - /// Fetches codes for a category. - /// - public static async Task GetIcd10CodesAsync(string categoryId) - { - var response = await FetchIcd10Async( - _icd10BaseUrl + "/api/icd10/categories/" + categoryId + "/codes" - ); - return ParseJson(response); - } - - /// - /// Looks up a specific ICD-10 code. - /// - public static async Task GetIcd10CodeAsync(string code) - { - var response = await FetchIcd10Async( - _icd10BaseUrl + "/api/icd10/codes/" + EncodeUri(code) - ); - return ParseJson(response); - } - - /// - /// Searches ICD-10 codes by keyword. - /// - public static async Task SearchIcd10CodesAsync(string query, int limit = 20) - { - var response = await FetchIcd10Async( - _icd10BaseUrl + "/api/icd10/codes?q=" + EncodeUri(query) + "&limit=" + limit - ); - return ParseJson(response); - } - - /// - /// Searches ACHI procedure codes by keyword. - /// - public static async Task SearchAchiCodesAsync(string query, int limit = 20) - { - var response = await FetchIcd10Async( - _icd10BaseUrl + "/api/achi/codes?q=" + EncodeUri(query) + "&limit=" + limit - ); - return ParseJson(response); - } - - /// - /// Performs semantic search using AI embeddings. - /// - public static async Task SemanticSearchAsync( - string query, - int limit = 10, - bool includeAchi = false - ) - { - var request = new SemanticSearchRequest - { - Query = query, - Limit = limit, - IncludeAchi = includeAchi, - }; - var response = await PostIcd10Async(_icd10BaseUrl + "/api/search", request); - var parsed = ParseJson(response); - return parsed.Results ?? new SemanticSearchResult[0]; - } - - // === HELPER METHODS === - - private static async Task FetchIcd10Async(string url) - { - var response = await Script.Call>( - "fetch", - url, - new - { - method = "GET", - headers = new - { - Accept = "application/json", - Authorization = "Bearer " + _icd10Token, - }, - } - ); - - if (!response.Ok) - { - throw new Exception("HTTP " + response.Status); - } - - return await response.Text(); - } - - private static async Task PostIcd10Async(string url, object data) - { - var response = await Script.Call>( - "fetch", - url, - new - { - method = "POST", - headers = new - { - Accept = "application/json", - ContentType = "application/json", - Authorization = "Bearer " + _icd10Token, - }, - body = Script.Call("JSON.stringify", data), - } - ); - - if (!response.Ok) - { - throw new Exception("HTTP " + response.Status); - } - - return await response.Text(); - } - - private static async Task FetchClinicalAsync(string url) - { - var response = await Script.Call>( - "fetch", - url, - new - { - method = "GET", - headers = new - { - Accept = "application/json", - Authorization = "Bearer " + _clinicalToken, - }, - } - ); - - if (!response.Ok) - { - throw new Exception("HTTP " + response.Status); - } - - return await response.Text(); - } - - private static async Task FetchSchedulingAsync(string url) - { - var response = await Script.Call>( - "fetch", - url, - new - { - method = "GET", - headers = new - { - Accept = "application/json", - Authorization = "Bearer " + _schedulingToken, - }, - } - ); - - if (!response.Ok) - { - throw new Exception("HTTP " + response.Status); - } - - return await response.Text(); - } - - private static async Task PostClinicalAsync(string url, object data) - { - var response = await Script.Call>( - "fetch", - url, - new - { - method = "POST", - headers = new - { - Accept = "application/json", - ContentType = "application/json", - Authorization = "Bearer " + _clinicalToken, - }, - body = Script.Call("JSON.stringify", data), - } - ); - - if (!response.Ok) - { - throw new Exception("HTTP " + response.Status); - } - - return await response.Text(); - } - - private static async Task PutClinicalAsync(string url, object data) - { - var response = await Script.Call>( - "fetch", - url, - new - { - method = "PUT", - headers = new - { - Accept = "application/json", - ContentType = "application/json", - Authorization = "Bearer " + _clinicalToken, - }, - body = Script.Call("JSON.stringify", data), - } - ); - - if (!response.Ok) - { - throw new Exception("HTTP " + response.Status); - } - - return await response.Text(); - } - - private static async Task PutSchedulingAsync(string url, object data) - { - var response = await Script.Call>( - "fetch", - url, - new - { - method = "PUT", - headers = new - { - Accept = "application/json", - ContentType = "application/json", - Authorization = "Bearer " + _schedulingToken, - }, - body = Script.Call("JSON.stringify", data), - } - ); - - if (!response.Ok) - { - throw new Exception("HTTP " + response.Status); - } - - return await response.Text(); - } - - private static T ParseJson(string json) => Script.Call("JSON.parse", json); - - private static string EncodeUri(string value) => - Script.Call("encodeURIComponent", value); - } - - /// - /// Fetch API Response type. - /// - [External] - [Name("Response")] - public class Response - { - /// Whether the response was successful. - public extern bool Ok { get; } - - /// HTTP status code. - public extern int Status { get; } - - /// HTTP status text. - public extern string StatusText { get; } - - /// Gets the response body as text. - public extern Task Text(); - - /// Gets the response body as JSON. - public extern Task Json(); - } -} diff --git a/Dashboard/Dashboard.Web/App.cs b/Dashboard/Dashboard.Web/App.cs deleted file mode 100644 index 91a483d..0000000 --- a/Dashboard/Dashboard.Web/App.cs +++ /dev/null @@ -1,305 +0,0 @@ -using Dashboard.Components; -using Dashboard.Pages; -using Dashboard.React; -using static Dashboard.React.Elements; -using static Dashboard.React.Hooks; - -namespace Dashboard -{ - /// - /// Application state class. - /// - public class AppState - { - /// Active view identifier. - public string ActiveView { get; set; } - - /// Whether sidebar is collapsed. - public bool SidebarCollapsed { get; set; } - - /// Search query string. - public string SearchQuery { get; set; } - - /// Notification count. - public int NotificationCount { get; set; } - - /// Patient ID being edited (null if not editing). - public string EditingPatientId { get; set; } - - /// Appointment ID being edited (null if not editing). - public string EditingAppointmentId { get; set; } - } - - /// - /// Main application component. - /// - public static class App - { - /// - /// Renders the main application. - /// - public static ReactElement Render() - { - var stateResult = UseState( - new AppState - { - ActiveView = "dashboard", - SidebarCollapsed = false, - SearchQuery = "", - NotificationCount = 3, - EditingPatientId = null, - EditingAppointmentId = null, - } - ); - - var state = stateResult.State; - var setState = stateResult.SetState; - - return Div( - className: "app", - children: new[] - { - // Sidebar - Sidebar.Render( - activeView: state.ActiveView, - onNavigate: view => - { - var newState = new AppState - { - ActiveView = view, - SidebarCollapsed = state.SidebarCollapsed, - SearchQuery = state.SearchQuery, - NotificationCount = state.NotificationCount, - EditingPatientId = null, - EditingAppointmentId = null, - }; - setState(newState); - }, - collapsed: state.SidebarCollapsed, - onToggle: () => - { - var newState = new AppState - { - ActiveView = state.ActiveView, - SidebarCollapsed = !state.SidebarCollapsed, - SearchQuery = state.SearchQuery, - NotificationCount = state.NotificationCount, - EditingPatientId = state.EditingPatientId, - EditingAppointmentId = state.EditingAppointmentId, - }; - setState(newState); - } - ), - // Main content wrapper - Div( - className: "main-wrapper", - children: new[] - { - // Header - Components.Header.Render( - title: GetPageTitle(state.ActiveView), - searchQuery: state.SearchQuery, - onSearchChange: query => - { - var newState = new AppState - { - ActiveView = state.ActiveView, - SidebarCollapsed = state.SidebarCollapsed, - SearchQuery = query, - NotificationCount = state.NotificationCount, - EditingPatientId = state.EditingPatientId, - EditingAppointmentId = state.EditingAppointmentId, - }; - setState(newState); - }, - notificationCount: state.NotificationCount - ), - // Main content area - Main( - className: "main-content", - children: new[] { RenderPage(state, setState) } - ), - } - ), - } - ); - } - - private static string GetPageTitle(string view) - { - if (view == "dashboard") - return "Dashboard"; - if (view == "patients") - return "Patients"; - if (view == "clinical-coding") - return "Clinical Coding"; - if (view == "encounters") - return "Encounters"; - if (view == "conditions") - return "Conditions"; - if (view == "medications") - return "Medications"; - if (view == "practitioners") - return "Practitioners"; - if (view == "appointments") - return "Appointments"; - if (view == "calendar") - return "Schedule"; - if (view == "settings") - return "Settings"; - return "Healthcare"; - } - - private static ReactElement RenderPage(AppState state, System.Action setState) - { - var view = state.ActiveView; - - // Handle editing patient - if (view == "patients" && state.EditingPatientId != null) - { - return EditPatientPage.Render( - state.EditingPatientId, - () => - { - var newState = new AppState - { - ActiveView = "patients", - SidebarCollapsed = state.SidebarCollapsed, - SearchQuery = state.SearchQuery, - NotificationCount = state.NotificationCount, - EditingPatientId = null, - EditingAppointmentId = null, - }; - setState(newState); - } - ); - } - - // Handle editing appointment - if ( - (view == "appointments" || view == "calendar") - && state.EditingAppointmentId != null - ) - { - return EditAppointmentPage.Render( - state.EditingAppointmentId, - () => - { - var newState = new AppState - { - ActiveView = view, - SidebarCollapsed = state.SidebarCollapsed, - SearchQuery = state.SearchQuery, - NotificationCount = state.NotificationCount, - EditingPatientId = null, - EditingAppointmentId = null, - }; - setState(newState); - } - ); - } - - if (view == "dashboard") - return DashboardPage.Render(); - if (view == "clinical-coding") - return ClinicalCodingPage.Render(); - if (view == "patients") - { - return PatientsPage.Render(patientId => - { - var newState = new AppState - { - ActiveView = "patients", - SidebarCollapsed = state.SidebarCollapsed, - SearchQuery = state.SearchQuery, - NotificationCount = state.NotificationCount, - EditingPatientId = patientId, - EditingAppointmentId = null, - }; - setState(newState); - }); - } - if (view == "practitioners") - return PractitionersPage.Render(); - if (view == "appointments") - { - return AppointmentsPage.Render(appointmentId => - { - var newState = new AppState - { - ActiveView = "appointments", - SidebarCollapsed = state.SidebarCollapsed, - SearchQuery = state.SearchQuery, - NotificationCount = state.NotificationCount, - EditingPatientId = null, - EditingAppointmentId = appointmentId, - }; - setState(newState); - }); - } - if (view == "calendar") - { - return CalendarPage.Render(appointmentId => - { - var newState = new AppState - { - ActiveView = "calendar", - SidebarCollapsed = state.SidebarCollapsed, - SearchQuery = state.SearchQuery, - NotificationCount = state.NotificationCount, - EditingPatientId = null, - EditingAppointmentId = appointmentId, - }; - setState(newState); - }); - } - if (view == "encounters") - return RenderPlaceholderPage("Encounters", "Manage patient encounters and visits"); - if (view == "conditions") - return RenderPlaceholderPage("Conditions", "View and manage patient conditions"); - if (view == "medications") - return RenderPlaceholderPage("Medications", "Manage medication requests"); - if (view == "settings") - return RenderPlaceholderPage("Settings", "Configure application settings"); - return RenderPlaceholderPage("Page Not Found", "The requested page does not exist"); - } - - private static ReactElement RenderPlaceholderPage(string title, string description) => - Div( - className: "page", - children: new[] - { - Div( - className: "page-header", - children: new[] - { - H(2, className: "page-title", children: new[] { Text(title) }), - P(className: "page-description", children: new[] { Text(description) }), - } - ), - Div( - className: "card", - children: new[] - { - Div( - className: "empty-state", - children: new[] - { - Icons.Clipboard(), - H( - 4, - className: "empty-state-title", - children: new[] { Text("Coming Soon") } - ), - P( - className: "empty-state-description", - children: new[] { Text("This page is under development.") } - ), - } - ), - } - ), - } - ); - } -} diff --git a/Dashboard/Dashboard.Web/Components/DataTable.cs b/Dashboard/Dashboard.Web/Components/DataTable.cs deleted file mode 100644 index c6cf1a5..0000000 --- a/Dashboard/Dashboard.Web/Components/DataTable.cs +++ /dev/null @@ -1,168 +0,0 @@ -using System; -using System.Linq; -using Dashboard.React; -using static Dashboard.React.Elements; - -namespace Dashboard.Components -{ - /// - /// Column definition class. - /// - public class Column - { - /// Column key. - public string Key { get; set; } - - /// Column header text. - public string Header { get; set; } - - /// Optional CSS class name. - public string ClassName { get; set; } - } - - /// - /// Data table component. - /// - public static class DataTable - { - /// - /// Renders a data table. - /// - public static ReactElement Render( - Column[] columns, - T[] data, - Func getKey, - Func renderCell, - Action onRowClick = null - ) => - Div( - className: "table-container", - children: new[] - { - Table( - className: "table", - children: new[] - { - THead( - children: new[] - { - Tr( - children: columns - .Select(col => - Th( - className: col.ClassName, - children: new[] { Text(col.Header) } - ) - ) - .ToArray() - ), - } - ), - TBody( - children: data.Select(row => - Tr( - className: onRowClick != null ? "cursor-pointer" : null, - onClick: onRowClick != null - ? (Action)(() => onRowClick(row)) - : null, - children: columns - .Select(col => - Td( - className: col.ClassName, - children: new[] { renderCell(row, col.Key) } - ) - ) - .ToArray() - ) - ) - .ToArray() - ), - } - ), - } - ); - - /// - /// Renders an empty state for the table. - /// - public static ReactElement RenderEmpty(string message = "No data available") => - Div( - className: "empty-state", - children: new[] - { - Div(className: "empty-state-icon", children: new[] { Icons.Clipboard() }), - H(4, className: "empty-state-title", children: new[] { Text("No Results") }), - P(className: "empty-state-description", children: new[] { Text(message) }), - } - ); - - /// - /// Renders a loading skeleton. - /// - public static ReactElement RenderLoading(int rows = 5, int columns = 4) => - Div( - className: "table-container", - children: new[] - { - Table( - className: "table", - children: new[] - { - THead( - children: new[] - { - Tr( - children: Enumerable - .Range(0, columns) - .Select(i => - Th( - children: new[] - { - Div( - className: "skeleton", - style: new - { - width = "80px", - height = "16px", - } - ), - } - ) - ) - .ToArray() - ), - } - ), - TBody( - children: Enumerable - .Range(0, rows) - .Select(i => - Tr( - children: Enumerable - .Range(0, columns) - .Select(j => - Td( - children: new[] - { - Div( - className: "skeleton", - style: new - { - width = "100%", - height = "16px", - } - ), - } - ) - ) - .ToArray() - ) - ) - .ToArray() - ), - } - ), - } - ); - } -} diff --git a/Dashboard/Dashboard.Web/Components/Header.cs b/Dashboard/Dashboard.Web/Components/Header.cs deleted file mode 100644 index 881d8d3..0000000 --- a/Dashboard/Dashboard.Web/Components/Header.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using Dashboard.React; -using static Dashboard.React.Elements; - -namespace Dashboard.Components -{ - /// - /// Header component with search and actions. - /// - public static class Header - { - /// - /// Renders the header component. - /// - public static ReactElement Render( - string title, - string searchQuery = null, - Action onSearchChange = null, - int notificationCount = 0 - ) => - React.Elements.Header( - className: "header", - children: new[] - { - // Left section - Div( - className: "header-left", - children: new[] - { - H(1, className: "header-title", children: new[] { Text(title) }), - } - ), - // Right section - Div( - className: "header-right", - children: new[] - { - // Search - Div( - className: "header-search", - children: new[] - { - Span( - className: "header-search-icon", - children: new[] { Icons.Search() } - ), - Input( - className: "input", - type: "text", - placeholder: "Search patients, appointments...", - value: searchQuery, - onChange: onSearchChange - ), - } - ), - // Actions - Div( - className: "header-actions", - children: new[] - { - RenderNotificationButton(notificationCount), - RenderUserAvatar(), - } - ), - } - ), - } - ); - - private static ReactElement RenderNotificationButton(int count) - { - ReactElement[] children; - if (count > 0) - { - children = new[] { Icons.Bell(), Span(className: "header-action-badge") }; - } - else - { - children = new[] { Icons.Bell() }; - } - return Button( - className: "header-action-btn", - onClick: () => { /* TODO: Open notifications */ - }, - children: children - ); - } - - private static ReactElement RenderUserAvatar() => - Div(className: "avatar avatar-md", children: new[] { Text("JD") }); - } -} diff --git a/Dashboard/Dashboard.Web/Components/Icons.cs b/Dashboard/Dashboard.Web/Components/Icons.cs deleted file mode 100644 index b7d3f81..0000000 --- a/Dashboard/Dashboard.Web/Components/Icons.cs +++ /dev/null @@ -1,438 +0,0 @@ -using Dashboard.React; -using static Dashboard.React.Elements; - -namespace Dashboard.Components -{ - /// - /// SVG icon components. - /// - public static class Icons - { - /// - /// Home icon. - /// - public static ReactElement Home() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z M9 22V12h6v10", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Users icon. - /// - public static ReactElement Users() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2 M9 7a4 4 0 1 0 0-8 4 4 0 0 0 0 8z M23 21v-2a4 4 0 0 0-3-3.87 M16 3.13a4 4 0 0 1 0 7.75", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// User/Doctor icon. - /// - public static ReactElement UserDoctor() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2 M12 7a4 4 0 1 0 0-8 4 4 0 0 0 0 8z M12 14v7 M9 18h6", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Calendar icon. - /// - public static ReactElement Calendar() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M19 4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z M16 2v4 M8 2v4 M3 10h18", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Clipboard/Encounter icon. - /// - public static ReactElement Clipboard() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2 M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Heart/Condition icon. - /// - public static ReactElement Heart() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Pill/Medication icon. - /// - public static ReactElement Pill() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M10.5 20.5L3.5 13.5a4.95 4.95 0 1 1 7-7l7 7a4.95 4.95 0 1 1-7 7z M8.5 8.5l7 7", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Activity/Heartbeat icon. - /// - public static ReactElement Activity() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M22 12h-4l-3 9L9 3l-3 9H2", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Search icon. - /// - public static ReactElement Search() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16z M21 21l-4.35-4.35", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Bell/Notification icon. - /// - public static ReactElement Bell() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9 M13.73 21a2 2 0 0 1-3.46 0", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Settings icon. - /// - public static ReactElement Settings() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// ChevronLeft icon. - /// - public static ReactElement ChevronLeft() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path(d: "M15 18l-6-6 6-6", stroke: "currentColor", strokeWidth: 2) - ); - - /// - /// ChevronRight icon. - /// - public static ReactElement ChevronRight() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path(d: "M9 18l6-6-6-6", stroke: "currentColor", strokeWidth: 2) - ); - - /// - /// Plus icon. - /// - public static ReactElement Plus() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path(d: "M12 5v14 M5 12h14", stroke: "currentColor", strokeWidth: 2) - ); - - /// - /// Edit/Pencil icon. - /// - public static ReactElement Edit() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7 M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Trash icon. - /// - public static ReactElement Trash() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M3 6h18 M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Eye icon. - /// - public static ReactElement Eye() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Refresh icon. - /// - public static ReactElement Refresh() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M23 4v6h-6 M1 20v-6h6 M3.51 9a9 9 0 0 1 14.85-3.36L23 10 M1 14l4.64 4.36A9 9 0 0 0 20.49 15", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// TrendUp icon. - /// - public static ReactElement TrendUp() => - Svg( - className: "icon", - width: 16, - height: 16, - viewBox: "0 0 24 24", - fill: "none", - children: Path(d: "M23 6l-9.5 9.5-5-5L1 18", stroke: "currentColor", strokeWidth: 2) - ); - - /// - /// TrendDown icon. - /// - public static ReactElement TrendDown() => - Svg( - className: "icon", - width: 16, - height: 16, - viewBox: "0 0 24 24", - fill: "none", - children: Path(d: "M23 18l-9.5-9.5-5 5L1 6", stroke: "currentColor", strokeWidth: 2) - ); - - /// - /// Menu icon (hamburger). - /// - public static ReactElement Menu() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path(d: "M3 12h18M3 6h18M3 18h18", stroke: "currentColor", strokeWidth: 2) - ); - - /// - /// X/Close icon. - /// - public static ReactElement X() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path(d: "M18 6L6 18M6 6l12 12", stroke: "currentColor", strokeWidth: 2) - ); - - /// - /// Code/Book icon for clinical coding. - /// - public static ReactElement Code() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M4 19.5A2.5 2.5 0 0 1 6.5 17H20 M4 4.5A2.5 2.5 0 0 1 6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15z M8 7h8 M8 11h8 M8 15h5", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// FileText icon for documents. - /// - public static ReactElement FileText() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6 M16 13H8 M16 17H8 M10 9H8", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Sparkles icon for AI/semantic search. - /// - public static ReactElement Sparkles() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5L12 3z M19 13l1 3 3 1-3 1-1 3-1-3-3-1 3-1 1-3z M5 17l.5 1.5L7 19l-1.5.5L5 21l-.5-1.5L3 19l1.5-.5L5 17z", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - - /// - /// Check icon for confirmation. - /// - public static ReactElement Check() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path(d: "M20 6L9 17l-5-5", stroke: "currentColor", strokeWidth: 2) - ); - - /// - /// Copy icon for clipboard copy. - /// - public static ReactElement Copy() => - Svg( - className: "icon", - width: 20, - height: 20, - viewBox: "0 0 24 24", - fill: "none", - children: Path( - d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2 M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z", - stroke: "currentColor", - strokeWidth: 2 - ) - ); - } -} diff --git a/Dashboard/Dashboard.Web/Components/MetricCard.cs b/Dashboard/Dashboard.Web/Components/MetricCard.cs deleted file mode 100644 index fdb3f8d..0000000 --- a/Dashboard/Dashboard.Web/Components/MetricCard.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using Dashboard.React; -using static Dashboard.React.Elements; - -namespace Dashboard.Components -{ - /// - /// Trend direction enum. - /// - public enum TrendDirection - { - /// Upward trend. - Up, - - /// Downward trend. - Down, - - /// No change. - Neutral, - } - - /// - /// Metric card props class. - /// - public class MetricCardProps - { - /// Label text. - public string Label { get; set; } - - /// Value text. - public string Value { get; set; } - - /// Icon factory. - public Func Icon { get; set; } - - /// Icon color class. - public string IconColor { get; set; } - - /// Trend value text. - public string TrendValue { get; set; } - - /// Trend direction. - public TrendDirection Trend { get; set; } - } - - /// - /// Metric card component for displaying KPIs. - /// - public static class MetricCard - { - /// - /// Renders a metric card. - /// - public static ReactElement Render(MetricCardProps props) - { - ReactElement trendElement; - if (props.TrendValue != null) - { - trendElement = Div( - className: "metric-trend " + TrendClass(props.Trend), - children: new[] { TrendIcon(props.Trend), Text(props.TrendValue) } - ); - } - else - { - trendElement = Text(""); - } - - return Div( - className: "metric-card", - children: new[] - { - // Icon - Div( - className: "metric-icon " + (props.IconColor ?? "blue"), - children: new[] { props.Icon() } - ), - // Value - Div(className: "metric-value", children: new[] { Text(props.Value) }), - // Label - Div(className: "metric-label", children: new[] { Text(props.Label) }), - // Trend (if provided) - trendElement, - } - ); - } - - private static string TrendClass(TrendDirection trend) - { - if (trend == TrendDirection.Up) - { - return "up"; - } - else if (trend == TrendDirection.Down) - { - return "down"; - } - else - { - return "neutral"; - } - } - - private static ReactElement TrendIcon(TrendDirection trend) - { - if (trend == TrendDirection.Up) - { - return Icons.TrendUp(); - } - else if (trend == TrendDirection.Down) - { - return Icons.TrendDown(); - } - else - { - return Text(""); - } - } - } -} diff --git a/Dashboard/Dashboard.Web/Components/Sidebar.cs b/Dashboard/Dashboard.Web/Components/Sidebar.cs deleted file mode 100644 index 3a44493..0000000 --- a/Dashboard/Dashboard.Web/Components/Sidebar.cs +++ /dev/null @@ -1,285 +0,0 @@ -using System; -using System.Linq; -using Dashboard.React; -using static Dashboard.React.Elements; - -namespace Dashboard.Components -{ - /// - /// Navigation item class. - /// - public class NavItem - { - /// Item identifier. - public string Id { get; set; } - - /// Display label. - public string Label { get; set; } - - /// Icon factory. - public Func Icon { get; set; } - - /// Optional badge count. - public int? Badge { get; set; } - } - - /// - /// Navigation section class. - /// - public class NavSection - { - /// Section title. - public string Title { get; set; } - - /// Navigation items. - public NavItem[] Items { get; set; } - } - - /// - /// Sidebar navigation component. - /// - public static class Sidebar - { - /// - /// Renders the sidebar component. - /// - public static ReactElement Render( - string activeView, - Action onNavigate, - bool collapsed, - Action onToggle - ) - { - var sections = GetNavSections(); - - return Aside( - className: "sidebar " + (collapsed ? "collapsed" : ""), - children: new[] - { - // Header with logo - RenderHeader(collapsed), - // Navigation sections - Nav( - className: "sidebar-nav", - children: sections - .Select(section => RenderSection(section, activeView, onNavigate)) - .ToArray() - ), - // Toggle button - Button( - className: "sidebar-toggle", - onClick: onToggle, - children: new[] { collapsed ? Icons.ChevronRight() : Icons.ChevronLeft() } - ), - // Footer with user - RenderFooter(collapsed), - } - ); - } - - private static NavSection[] GetNavSections() => - new[] - { - new NavSection - { - Title = "Overview", - Items = new[] - { - new NavItem - { - Id = "dashboard", - Label = "Dashboard", - Icon = Icons.Home, - }, - }, - }, - new NavSection - { - Title = "Clinical", - Items = new[] - { - new NavItem - { - Id = "patients", - Label = "Patients", - Icon = Icons.Users, - }, - new NavItem - { - Id = "clinical-coding", - Label = "Clinical Coding", - Icon = Icons.Code, - }, - new NavItem - { - Id = "encounters", - Label = "Encounters", - Icon = Icons.Clipboard, - }, - new NavItem - { - Id = "conditions", - Label = "Conditions", - Icon = Icons.Heart, - }, - new NavItem - { - Id = "medications", - Label = "Medications", - Icon = Icons.Pill, - }, - }, - }, - new NavSection - { - Title = "Scheduling", - Items = new[] - { - new NavItem - { - Id = "practitioners", - Label = "Practitioners", - Icon = Icons.UserDoctor, - }, - new NavItem - { - Id = "appointments", - Label = "Appointments", - Icon = Icons.Clipboard, - Badge = 3, - }, - new NavItem - { - Id = "calendar", - Label = "Schedule", - Icon = Icons.Calendar, - }, - }, - }, - new NavSection - { - Title = "System", - Items = new[] - { - new NavItem - { - Id = "settings", - Label = "Settings", - Icon = Icons.Settings, - }, - }, - }, - }; - - private static ReactElement RenderHeader(bool collapsed) => - Div( - className: "sidebar-header", - children: new[] - { - A( - href: "#", - className: "sidebar-logo", - children: new[] - { - Div( - className: "sidebar-logo-icon", - children: new[] { Icons.Activity() } - ), - Span( - className: "sidebar-logo-text", - children: new[] { Text("HealthCare") } - ), - } - ), - } - ); - - private static ReactElement RenderSection( - NavSection section, - string activeView, - Action onNavigate - ) - { - var items = section - .Items.Select(item => RenderNavItem(item, activeView, onNavigate)) - .ToArray(); - var allChildren = new ReactElement[items.Length + 1]; - allChildren[0] = Div( - className: "nav-section-title", - children: new[] { Text(section.Title) } - ); - for (int i = 0; i < items.Length; i++) - { - allChildren[i + 1] = items[i]; - } - return Div(className: "nav-section", children: allChildren); - } - - private static ReactElement RenderNavItem( - NavItem item, - string activeView, - Action onNavigate - ) - { - var isActive = activeView == item.Id; - ReactElement[] children; - - if (item.Badge.HasValue) - { - children = new ReactElement[] - { - Span(className: "nav-item-icon", children: new[] { item.Icon() }), - Span(className: "nav-item-text", children: new[] { Text(item.Label) }), - Span( - className: "nav-item-badge", - children: new[] { Text(item.Badge.Value.ToString()) } - ), - }; - } - else - { - children = new ReactElement[] - { - Span(className: "nav-item-icon", children: new[] { item.Icon() }), - Span(className: "nav-item-text", children: new[] { Text(item.Label) }), - }; - } - - return A( - href: "#", - className: "nav-item " + (isActive ? "active" : ""), - onClick: () => onNavigate(item.Id), - children: children - ); - } - - private static ReactElement RenderFooter(bool collapsed) => - Div( - className: "sidebar-footer", - children: new[] - { - Div( - className: "sidebar-user", - children: new[] - { - Div(className: "avatar avatar-md", children: new[] { Text("JD") }), - Div( - className: "sidebar-user-info", - children: new[] - { - Div( - className: "sidebar-user-name", - children: new[] { Text("John Doe") } - ), - Div( - className: "sidebar-user-role", - children: new[] { Text("Administrator") } - ), - } - ), - } - ), - } - ); - } -} diff --git a/Dashboard/Dashboard.Web/Dashboard.Web.csproj b/Dashboard/Dashboard.Web/Dashboard.Web.csproj deleted file mode 100644 index 2b019bd..0000000 --- a/Dashboard/Dashboard.Web/Dashboard.Web.csproj +++ /dev/null @@ -1,53 +0,0 @@ - - - Library - netstandard2.1 - 9.0 - enable - Dashboard - false - CS0626;CS1591;CA1812;CA2100;CS8632 - - H5 - true - false - - - - - false - false - false - - - - - - - - - - - - - - - - - - - - - diff --git a/Dashboard/Dashboard.Web/Models/ClinicalModels.cs b/Dashboard/Dashboard.Web/Models/ClinicalModels.cs deleted file mode 100644 index 951436a..0000000 --- a/Dashboard/Dashboard.Web/Models/ClinicalModels.cs +++ /dev/null @@ -1,186 +0,0 @@ -using H5; - -namespace Dashboard.Models -{ - /// - /// FHIR Patient resource model. - /// - [External] - [Name("Object")] - public class Patient - { - /// Patient unique identifier. - public extern string Id { get; set; } - - /// Whether patient record is active. - public extern bool Active { get; set; } - - /// Patient's given name. - public extern string GivenName { get; set; } - - /// Patient's family name. - public extern string FamilyName { get; set; } - - /// Patient's birth date. - public extern string BirthDate { get; set; } - - /// Patient's gender. - public extern string Gender { get; set; } - - /// Patient's phone number. - public extern string Phone { get; set; } - - /// Patient's email address. - public extern string Email { get; set; } - - /// Patient's address line. - public extern string AddressLine { get; set; } - - /// Patient's city. - public extern string City { get; set; } - - /// Patient's state. - public extern string State { get; set; } - - /// Patient's postal code. - public extern string PostalCode { get; set; } - - /// Patient's country. - public extern string Country { get; set; } - - /// Last updated timestamp. - public extern string LastUpdated { get; set; } - - /// Version identifier. - public extern long VersionId { get; set; } - } - - /// - /// FHIR Encounter resource model. - /// - [External] - [Name("Object")] - public class Encounter - { - /// Encounter unique identifier. - public extern string Id { get; set; } - - /// Encounter status. - public extern string Status { get; set; } - - /// Encounter class. - public extern string Class { get; set; } - - /// Patient reference. - public extern string PatientId { get; set; } - - /// Practitioner reference. - public extern string PractitionerId { get; set; } - - /// Service type. - public extern string ServiceType { get; set; } - - /// Reason code. - public extern string ReasonCode { get; set; } - - /// Period start. - public extern string PeriodStart { get; set; } - - /// Period end. - public extern string PeriodEnd { get; set; } - - /// Notes. - public extern string Notes { get; set; } - - /// Last updated timestamp. - public extern string LastUpdated { get; set; } - - /// Version identifier. - public extern long VersionId { get; set; } - } - - /// - /// FHIR Condition resource model. - /// - [External] - [Name("Object")] - public class Condition - { - /// Condition unique identifier. - public extern string Id { get; set; } - - /// Clinical status. - public extern string ClinicalStatus { get; set; } - - /// Verification status. - public extern string VerificationStatus { get; set; } - - /// Condition category. - public extern string Category { get; set; } - - /// Severity. - public extern string Severity { get; set; } - - /// ICD-10 code value. - public extern string CodeValue { get; set; } - - /// Code display name. - public extern string CodeDisplay { get; set; } - - /// Subject reference (patient). - public extern string SubjectReference { get; set; } - - /// Onset date/time. - public extern string OnsetDateTime { get; set; } - - /// Recorded date. - public extern string RecordedDate { get; set; } - - /// Note text. - public extern string NoteText { get; set; } - } - - /// - /// FHIR MedicationRequest resource model. - /// - [External] - [Name("Object")] - public class MedicationRequest - { - /// MedicationRequest unique identifier. - public extern string Id { get; set; } - - /// Status. - public extern string Status { get; set; } - - /// Intent. - public extern string Intent { get; set; } - - /// Patient reference. - public extern string PatientId { get; set; } - - /// Practitioner reference. - public extern string PractitionerId { get; set; } - - /// Medication code (RxNorm). - public extern string MedicationCode { get; set; } - - /// Medication display name. - public extern string MedicationDisplay { get; set; } - - /// Dosage instruction. - public extern string DosageInstruction { get; set; } - - /// Quantity. - public extern double Quantity { get; set; } - - /// Unit. - public extern string Unit { get; set; } - - /// Number of refills. - public extern int Refills { get; set; } - - /// Authored on date. - public extern string AuthoredOn { get; set; } - } -} diff --git a/Dashboard/Dashboard.Web/Models/Icd10Models.cs b/Dashboard/Dashboard.Web/Models/Icd10Models.cs deleted file mode 100644 index c6d7693..0000000 --- a/Dashboard/Dashboard.Web/Models/Icd10Models.cs +++ /dev/null @@ -1,299 +0,0 @@ -using H5; - -namespace Dashboard.Models -{ - /// - /// ICD-10 chapter model. - /// - [External] - [Name("Object")] - public class Icd10Chapter - { - /// Chapter unique identifier. - [Name("Id")] - public extern string Id { get; set; } - - /// Chapter number (1-22). - [Name("ChapterNumber")] - public extern string ChapterNumber { get; set; } - - /// Chapter title. - [Name("Title")] - public extern string Title { get; set; } - - /// Code range start. - [Name("CodeRangeStart")] - public extern string CodeRangeStart { get; set; } - - /// Code range end. - [Name("CodeRangeEnd")] - public extern string CodeRangeEnd { get; set; } - } - - /// - /// ICD-10 block model. - /// - [External] - [Name("Object")] - public class Icd10Block - { - /// Block unique identifier. - [Name("Id")] - public extern string Id { get; set; } - - /// Chapter identifier. - [Name("ChapterId")] - public extern string ChapterId { get; set; } - - /// Block code. - [Name("BlockCode")] - public extern string BlockCode { get; set; } - - /// Block title. - [Name("Title")] - public extern string Title { get; set; } - - /// Code range start. - [Name("CodeRangeStart")] - public extern string CodeRangeStart { get; set; } - - /// Code range end. - [Name("CodeRangeEnd")] - public extern string CodeRangeEnd { get; set; } - } - - /// - /// ICD-10 category model. - /// - [External] - [Name("Object")] - public class Icd10Category - { - /// Category unique identifier. - [Name("Id")] - public extern string Id { get; set; } - - /// Block identifier. - [Name("BlockId")] - public extern string BlockId { get; set; } - - /// Category code. - [Name("CategoryCode")] - public extern string CategoryCode { get; set; } - - /// Category title. - [Name("Title")] - public extern string Title { get; set; } - } - - /// - /// ICD-10 code model. - /// - [External] - [Name("Object")] - public class Icd10Code - { - /// Code unique identifier. - [Name("Id")] - public extern string Id { get; set; } - - /// Category identifier. - [Name("CategoryId")] - public extern string CategoryId { get; set; } - - /// ICD-10 code value. - [Name("Code")] - public extern string Code { get; set; } - - /// Short description. - [Name("ShortDescription")] - public extern string ShortDescription { get; set; } - - /// Long description. - [Name("LongDescription")] - public extern string LongDescription { get; set; } - - /// Inclusion terms. - [Name("InclusionTerms")] - public extern string InclusionTerms { get; set; } - - /// Exclusion terms. - [Name("ExclusionTerms")] - public extern string ExclusionTerms { get; set; } - - /// Code also reference. - [Name("CodeAlso")] - public extern string CodeAlso { get; set; } - - /// Code first reference. - [Name("CodeFirst")] - public extern string CodeFirst { get; set; } - - /// Synonyms for the code. - [Name("Synonyms")] - public extern string Synonyms { get; set; } - - /// Whether code is billable. - [Name("Billable")] - public extern bool Billable { get; set; } - - /// Edition of the code. - [Name("Edition")] - public extern string Edition { get; set; } - - /// Category code. - [Name("CategoryCode")] - public extern string CategoryCode { get; set; } - - /// Category title. - [Name("CategoryTitle")] - public extern string CategoryTitle { get; set; } - - /// Block code. - [Name("BlockCode")] - public extern string BlockCode { get; set; } - - /// Block title. - [Name("BlockTitle")] - public extern string BlockTitle { get; set; } - - /// Chapter number. - [Name("ChapterNumber")] - public extern string ChapterNumber { get; set; } - - /// Chapter title. - [Name("ChapterTitle")] - public extern string ChapterTitle { get; set; } - } - - /// - /// ACHI procedure code model. - /// - [External] - [Name("Object")] - public class AchiCode - { - /// Code unique identifier. - [Name("Id")] - public extern string Id { get; set; } - - /// Block identifier. - [Name("BlockId")] - public extern string BlockId { get; set; } - - /// ACHI code value. - [Name("Code")] - public extern string Code { get; set; } - - /// Short description. - [Name("ShortDescription")] - public extern string ShortDescription { get; set; } - - /// Long description. - [Name("LongDescription")] - public extern string LongDescription { get; set; } - - /// Whether code is billable. - [Name("Billable")] - public extern bool Billable { get; set; } - - /// Block number. - [Name("BlockNumber")] - public extern string BlockNumber { get; set; } - - /// Block title. - [Name("BlockTitle")] - public extern string BlockTitle { get; set; } - } - - /// - /// Semantic search result model. - /// - [External] - [Name("Object")] - public class SemanticSearchResult - { - /// ICD-10 code. - [Name("Code")] - public extern string Code { get; set; } - - /// Code description. - [Name("Description")] - public extern string Description { get; set; } - - /// Long description with clinical details. - [Name("LongDescription")] - public extern string LongDescription { get; set; } - - /// Confidence score (0-1). - [Name("Confidence")] - public extern double Confidence { get; set; } - - /// Code type (ICD10CM or ACHI). - [Name("CodeType")] - public extern string CodeType { get; set; } - - /// Chapter number (e.g., "19"). - [Name("Chapter")] - public extern string Chapter { get; set; } - - /// Chapter title (e.g., "Injury, poisoning and external causes"). - [Name("ChapterTitle")] - public extern string ChapterTitle { get; set; } - - /// Category code (first 3 characters, e.g., "S70"). - [Name("Category")] - public extern string Category { get; set; } - - /// Inclusion terms for the code. - [Name("InclusionTerms")] - public extern string InclusionTerms { get; set; } - - /// Exclusion terms for the code. - [Name("ExclusionTerms")] - public extern string ExclusionTerms { get; set; } - - /// Code also references. - [Name("CodeAlso")] - public extern string CodeAlso { get; set; } - - /// Code first references. - [Name("CodeFirst")] - public extern string CodeFirst { get; set; } - } - - /// - /// Search request model. - /// - public class SemanticSearchRequest - { - /// Search query text. - public string Query { get; set; } - - /// Maximum results to return. - public int Limit { get; set; } - - /// Whether to include ACHI codes. - public bool IncludeAchi { get; set; } - } - - /// - /// Semantic search API response model. - /// - [External] - [Name("Object")] - public class SemanticSearchResponse - { - /// Search results. - [Name("Results")] - public extern SemanticSearchResult[] Results { get; set; } - - /// Original query. - [Name("Query")] - public extern string Query { get; set; } - - /// Model used for embeddings. - [Name("Model")] - public extern string Model { get; set; } - } -} diff --git a/Dashboard/Dashboard.Web/Models/SchedulingModels.cs b/Dashboard/Dashboard.Web/Models/SchedulingModels.cs deleted file mode 100644 index ea7187d..0000000 --- a/Dashboard/Dashboard.Web/Models/SchedulingModels.cs +++ /dev/null @@ -1,141 +0,0 @@ -using H5; - -namespace Dashboard.Models -{ - /// - /// FHIR Practitioner resource model. - /// - [External] - [Name("Object")] - public class Practitioner - { - /// Practitioner unique identifier. - public extern string Id { get; set; } - - /// Practitioner identifier (NPI). - public extern string Identifier { get; set; } - - /// Whether practitioner is active. - public extern bool Active { get; set; } - - /// Family name. - public extern string NameFamily { get; set; } - - /// Given name. - public extern string NameGiven { get; set; } - - /// Qualification. - public extern string Qualification { get; set; } - - /// Specialty. - public extern string Specialty { get; set; } - - /// Email. - public extern string TelecomEmail { get; set; } - - /// Phone. - public extern string TelecomPhone { get; set; } - } - - /// - /// FHIR Appointment resource model. - /// - [External] - [Name("Object")] - public class Appointment - { - /// Appointment unique identifier. - public extern string Id { get; set; } - - /// Appointment status. - public extern string Status { get; set; } - - /// Service category. - public extern string ServiceCategory { get; set; } - - /// Service type. - public extern string ServiceType { get; set; } - - /// Reason code. - public extern string ReasonCode { get; set; } - - /// Priority. - public extern string Priority { get; set; } - - /// Description. - public extern string Description { get; set; } - - /// Start time. - public extern string StartTime { get; set; } - - /// End time. - public extern string EndTime { get; set; } - - /// Duration in minutes. - public extern int MinutesDuration { get; set; } - - /// Patient reference. - public extern string PatientReference { get; set; } - - /// Practitioner reference. - public extern string PractitionerReference { get; set; } - - /// Created timestamp. - public extern string Created { get; set; } - - /// Comment. - public extern string Comment { get; set; } - } - - /// - /// FHIR Schedule resource model. - /// - [External] - [Name("Object")] - public class Schedule - { - /// Schedule unique identifier. - public extern string Id { get; set; } - - /// Whether schedule is active. - public extern bool Active { get; set; } - - /// Practitioner reference. - public extern string PractitionerReference { get; set; } - - /// Planning horizon in days. - public extern int PlanningHorizon { get; set; } - - /// Comment. - public extern string Comment { get; set; } - } - - /// - /// FHIR Slot resource model. - /// - [External] - [Name("Object")] - public class Slot - { - /// Slot unique identifier. - public extern string Id { get; set; } - - /// Schedule reference. - public extern string ScheduleReference { get; set; } - - /// Slot status. - public extern string Status { get; set; } - - /// Start time. - public extern string StartTime { get; set; } - - /// End time. - public extern string EndTime { get; set; } - - /// Whether overbooked. - public extern bool Overbooked { get; set; } - - /// Comment. - public extern string Comment { get; set; } - } -} diff --git a/Dashboard/Dashboard.Web/Pages/AppointmentsPage.cs b/Dashboard/Dashboard.Web/Pages/AppointmentsPage.cs deleted file mode 100644 index 7a02f02..0000000 --- a/Dashboard/Dashboard.Web/Pages/AppointmentsPage.cs +++ /dev/null @@ -1,533 +0,0 @@ -using System; -using System.Linq; -using Dashboard.Api; -using Dashboard.Components; -using Dashboard.Models; -using Dashboard.React; -using static Dashboard.React.Elements; -using static Dashboard.React.Hooks; - -namespace Dashboard.Pages -{ - /// - /// Appointments page state class. - /// - public class AppointmentsState - { - /// List of appointments. - public Appointment[] Appointments { get; set; } - - /// Whether loading. - public bool Loading { get; set; } - - /// Error message if any. - public string Error { get; set; } - - /// Current status filter. - public string StatusFilter { get; set; } - } - - /// - /// Appointments management page. - /// - public static class AppointmentsPage - { - /// - /// Renders the appointments page. - /// - public static ReactElement Render(Action onEditAppointment) => - RenderInternal(onEditAppointment); - - private static ReactElement RenderInternal(Action onEditAppointment) - { - var stateResult = UseState( - new AppointmentsState - { - Appointments = new Appointment[0], - Loading = true, - Error = null, - StatusFilter = null, - } - ); - - var state = stateResult.State; - var setState = stateResult.SetState; - - UseEffect( - () => - { - LoadAppointments(setState); - }, - new object[0] - ); - - ReactElement content; - if (state.Loading) - { - content = RenderLoadingList(); - } - else if (state.Error != null) - { - content = RenderError(state.Error); - } - else if (state.Appointments.Length == 0) - { - content = RenderEmpty(); - } - else - { - content = RenderAppointmentList( - state.Appointments, - state.StatusFilter, - onEditAppointment - ); - } - - return Div( - className: "page", - children: new[] - { - // Page header - Div( - className: "page-header flex justify-between items-center", - children: new[] - { - Div( - children: new[] - { - H( - 2, - className: "page-title", - children: new[] { Text("Appointments") } - ), - P( - className: "page-description", - children: new[] - { - Text( - "Manage scheduled appointments from the Scheduling domain" - ), - } - ), - } - ), - Button( - className: "btn btn-primary", - children: new[] { Icons.Plus(), Text("New Appointment") } - ), - } - ), - // Filters - Div( - className: "card mb-6", - children: new[] - { - Div( - className: "tabs", - children: new[] - { - RenderTab( - "All", - null, - state.StatusFilter, - s => FilterByStatus(s, state, setState) - ), - RenderTab( - "Booked", - "booked", - state.StatusFilter, - s => FilterByStatus(s, state, setState) - ), - RenderTab( - "Arrived", - "arrived", - state.StatusFilter, - s => FilterByStatus(s, state, setState) - ), - RenderTab( - "Fulfilled", - "fulfilled", - state.StatusFilter, - s => FilterByStatus(s, state, setState) - ), - RenderTab( - "Cancelled", - "cancelled", - state.StatusFilter, - s => FilterByStatus(s, state, setState) - ), - } - ), - } - ), - // Content - content, - } - ); - } - - private static async void LoadAppointments(Action setState) - { - try - { - var appointments = await ApiClient.GetAppointmentsAsync(); - setState( - new AppointmentsState - { - Appointments = appointments, - Loading = false, - Error = null, - StatusFilter = null, - } - ); - } - catch (Exception ex) - { - setState( - new AppointmentsState - { - Appointments = new Appointment[0], - Loading = false, - Error = ex.Message, - StatusFilter = null, - } - ); - } - } - - private static void FilterByStatus( - string status, - AppointmentsState currentState, - Action setState - ) => - setState( - new AppointmentsState - { - Appointments = currentState.Appointments, - Loading = currentState.Loading, - Error = currentState.Error, - StatusFilter = status, - } - ); - - private static ReactElement RenderTab( - string label, - string status, - string currentFilter, - Action onSelect - ) - { - var isActive = status == currentFilter; - return Button( - className: "tab " + (isActive ? "active" : ""), - onClick: () => onSelect(status), - children: new[] { Text(label) } - ); - } - - private static ReactElement RenderError(string message) => - Div( - className: "card", - style: new { borderLeft = "4px solid var(--error)" }, - children: new[] - { - Div( - className: "flex items-center gap-3 p-4", - children: new[] - { - Icons.X(), - Text("Error loading appointments: " + message), - } - ), - } - ); - - private static ReactElement RenderEmpty() => - Div( - className: "card", - children: new[] - { - Div( - className: "empty-state", - children: new[] - { - Icons.Calendar(), - H( - 4, - className: "empty-state-title", - children: new[] { Text("No Appointments") } - ), - P( - className: "empty-state-description", - children: new[] - { - Text( - "No appointments scheduled. Create a new appointment to get started." - ), - } - ), - Button( - className: "btn btn-primary mt-4", - children: new[] { Icons.Plus(), Text("New Appointment") } - ), - } - ), - } - ); - - private static ReactElement RenderLoadingList() => - Div( - className: "data-list", - children: Enumerable - .Range(0, 5) - .Select(i => - Div( - className: "card", - children: new[] - { - Div( - className: "flex items-center gap-4", - children: new[] - { - Div( - className: "skeleton", - style: new - { - width = "60px", - height = "60px", - borderRadius = "var(--radius-lg)", - } - ), - Div( - className: "flex-1", - children: new[] - { - Div( - className: "skeleton", - style: new { width = "200px", height = "20px" } - ), - Div( - className: "skeleton mt-2", - style: new { width = "150px", height = "16px" } - ), - } - ), - Div( - className: "skeleton", - style: new { width = "100px", height = "32px" } - ), - } - ), - } - ) - ) - .ToArray() - ); - - private static ReactElement RenderAppointmentList( - Appointment[] appointments, - string statusFilter, - Action onEditAppointment - ) - { - var filtered = - statusFilter == null - ? appointments - : appointments.Where(a => a.Status == statusFilter).ToArray(); - - return Div( - className: "data-list", - children: filtered - .Select(a => RenderAppointmentCard(a, onEditAppointment)) - .ToArray() - ); - } - - private static ReactElement RenderAppointmentCard( - Appointment appointment, - Action onEditAppointment - ) - { - ReactElement descElement; - if (appointment.Description != null) - { - descElement = P( - className: "text-sm mt-2", - children: new[] { Text(appointment.Description) } - ); - } - else - { - descElement = Text(""); - } - - return Div( - className: "card-glass mb-4", - children: new[] - { - Div( - className: "flex items-start gap-4", - children: new[] - { - // Time block - Div( - className: "metric-icon blue", - style: new { width = "60px", height = "60px" }, - children: new[] - { - Div( - className: "text-center", - children: new[] - { - Div( - className: "text-lg font-bold", - children: new[] - { - Text(FormatTime(appointment.StartTime)), - } - ), - Div( - className: "text-xs", - children: new[] - { - Text(appointment.MinutesDuration + "min"), - } - ), - } - ), - } - ), - // Details - Div( - className: "flex-1", - children: new[] - { - Div( - className: "flex items-center gap-2", - children: new[] - { - H( - 4, - className: "font-semibold", - children: new[] - { - Text(appointment.ServiceType ?? "Appointment"), - } - ), - RenderStatusBadge(appointment.Status), - RenderPriorityBadge(appointment.Priority), - } - ), - Div( - className: "text-sm text-gray-600 mt-1", - children: new[] - { - Icons.Users(), - Text( - " Patient: " - + FormatReference(appointment.PatientReference) - ), - } - ), - Div( - className: "text-sm text-gray-600", - children: new[] - { - Icons.UserDoctor(), - Text( - " Provider: " - + FormatReference( - appointment.PractitionerReference - ) - ), - } - ), - descElement, - } - ), - // Actions - Div( - className: "flex flex-col gap-2", - children: new[] - { - Button( - className: "btn btn-primary btn-sm", - children: new[] { Text("Check In") } - ), - Button( - className: "btn btn-secondary btn-sm", - onClick: () => onEditAppointment(appointment.Id), - children: new[] { Icons.Edit() } - ), - } - ), - } - ), - } - ); - } - - private static ReactElement RenderStatusBadge(string status) - { - string badgeClass; - if (status == "booked") - badgeClass = "badge-primary"; - else if (status == "arrived") - badgeClass = "badge-teal"; - else if (status == "fulfilled") - badgeClass = "badge-success"; - else if (status == "cancelled") - badgeClass = "badge-error"; - else if (status == "noshow") - badgeClass = "badge-warning"; - else - badgeClass = "badge-gray"; - - return Span(className: "badge " + badgeClass, children: new[] { Text(status) }); - } - - private static ReactElement RenderPriorityBadge(string priority) - { - if (priority == "routine") - return Text(""); - - string badgeClass; - if (priority == "urgent") - badgeClass = "badge-warning"; - else if (priority == "asap") - badgeClass = "badge-error"; - else if (priority == "stat") - badgeClass = "badge-error"; - else - badgeClass = "badge-gray"; - - return Span( - className: "badge " + badgeClass, - children: new[] { Text(priority.ToUpper()) } - ); - } - - private static string FormatTime(string dateTime) - { - if (string.IsNullOrEmpty(dateTime)) - return "N/A"; - // Simple time extraction - in real app use proper date parsing - if (dateTime.Length > 16) - return dateTime.Substring(11, 5); - return dateTime; - } - - private static string FormatReference(string reference) - { - // Extract ID from reference like "Patient/abc-123" -> "abc-123" - var parts = reference.Split('/'); - if (parts.Length > 1) - { - var id = parts[1]; - var length = Math.Min(8, id.Length); - return id.Substring(0, length) + "..."; - } - return reference; - } - } -} diff --git a/Dashboard/Dashboard.Web/Pages/CalendarPage.cs b/Dashboard/Dashboard.Web/Pages/CalendarPage.cs deleted file mode 100644 index a386294..0000000 --- a/Dashboard/Dashboard.Web/Pages/CalendarPage.cs +++ /dev/null @@ -1,630 +0,0 @@ -using System; -using System.Linq; -using Dashboard.Api; -using Dashboard.Components; -using Dashboard.Models; -using Dashboard.React; -using static Dashboard.React.Elements; -using static Dashboard.React.Hooks; - -namespace Dashboard.Pages -{ - /// - /// Calendar page state class. - /// - public class CalendarState - { - /// List of appointments. - public Appointment[] Appointments { get; set; } - - /// Whether loading. - public bool Loading { get; set; } - - /// Error message if any. - public string Error { get; set; } - - /// Current view year. - public int Year { get; set; } - - /// Current view month (1-12). - public int Month { get; set; } - - /// Selected day for details view. - public int SelectedDay { get; set; } - } - - /// - /// Calendar-based schedule view page. - /// - public static class CalendarPage - { - private static readonly string[] MonthNames = new[] - { - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December", - }; - - private static readonly string[] DayNames = new[] - { - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat", - }; - - /// - /// Renders the calendar page. - /// - public static ReactElement Render(Action onEditAppointment) - { - var now = DateTime.Now; - var stateResult = UseState( - new CalendarState - { - Appointments = new Appointment[0], - Loading = true, - Error = null, - Year = now.Year, - Month = now.Month, - SelectedDay = 0, - } - ); - - var state = stateResult.State; - var setState = stateResult.SetState; - - UseEffect( - () => - { - LoadAppointments(setState, state); - }, - new object[0] - ); - - return Div( - className: "page", - children: new[] - { - RenderHeader(state, setState), - state.Loading ? RenderLoadingState() - : state.Error != null ? RenderError(state.Error) - : RenderCalendarContent(state, setState, onEditAppointment), - } - ); - } - - private static async void LoadAppointments( - Action setState, - CalendarState currentState - ) - { - try - { - var appointments = await ApiClient.GetAppointmentsAsync(); - setState( - new CalendarState - { - Appointments = appointments, - Loading = false, - Error = null, - Year = currentState.Year, - Month = currentState.Month, - SelectedDay = currentState.SelectedDay, - } - ); - } - catch (Exception ex) - { - setState( - new CalendarState - { - Appointments = new Appointment[0], - Loading = false, - Error = ex.Message, - Year = currentState.Year, - Month = currentState.Month, - SelectedDay = currentState.SelectedDay, - } - ); - } - } - - private static ReactElement RenderHeader( - CalendarState state, - Action setState - ) - { - var monthName = MonthNames[state.Month - 1]; - return Div( - className: "page-header flex justify-between items-center mb-6", - children: new[] - { - Div( - children: new[] - { - H(2, className: "page-title", children: new[] { Text("Schedule") }), - P( - className: "page-description", - children: new[] - { - Text("View and manage appointments on the calendar"), - } - ), - } - ), - Div( - className: "flex items-center gap-4", - children: new[] - { - Button( - className: "btn btn-secondary btn-sm", - onClick: () => NavigateMonth(state, setState, -1), - children: new[] { Icons.ChevronLeft() } - ), - Span( - className: "text-lg font-semibold", - children: new[] { Text(monthName + " " + state.Year) } - ), - Button( - className: "btn btn-secondary btn-sm", - onClick: () => NavigateMonth(state, setState, 1), - children: new[] { Icons.ChevronRight() } - ), - Button( - className: "btn btn-primary btn-sm ml-4", - onClick: () => GoToToday(state, setState), - children: new[] { Text("Today") } - ), - } - ), - } - ); - } - - private static void NavigateMonth( - CalendarState state, - Action setState, - int delta - ) - { - var newMonth = state.Month + delta; - var newYear = state.Year; - - if (newMonth < 1) - { - newMonth = 12; - newYear--; - } - else if (newMonth > 12) - { - newMonth = 1; - newYear++; - } - - setState( - new CalendarState - { - Appointments = state.Appointments, - Loading = state.Loading, - Error = state.Error, - Year = newYear, - Month = newMonth, - SelectedDay = 0, - } - ); - } - - private static void GoToToday(CalendarState state, Action setState) - { - var now = DateTime.Now; - setState( - new CalendarState - { - Appointments = state.Appointments, - Loading = state.Loading, - Error = state.Error, - Year = now.Year, - Month = now.Month, - SelectedDay = now.Day, - } - ); - } - - private static ReactElement RenderLoadingState() => - Div( - className: "card", - children: new[] - { - Div( - className: "flex items-center justify-center p-8", - children: new[] { Text("Loading calendar...") } - ), - } - ); - - private static ReactElement RenderError(string message) => - Div( - className: "card", - style: new { borderLeft = "4px solid var(--error)" }, - children: new[] - { - Div( - className: "flex items-center gap-3 p-4", - children: new[] - { - Icons.X(), - Text("Error loading appointments: " + message), - } - ), - } - ); - - private static ReactElement RenderCalendarContent( - CalendarState state, - Action setState, - Action onEditAppointment - ) => - Div( - className: "flex gap-6", - children: new[] - { - Div( - className: "flex-1", - children: new[] { RenderCalendarGrid(state, setState) } - ), - state.SelectedDay > 0 - ? RenderDayDetails(state, setState, onEditAppointment) - : RenderNoSelection(), - } - ); - - private static ReactElement RenderCalendarGrid( - CalendarState state, - Action setState - ) - { - var daysInMonth = DateTime.DaysInMonth(state.Year, state.Month); - var firstDay = new DateTime(state.Year, state.Month, 1); - var startDayOfWeek = (int)firstDay.DayOfWeek; - - var headerCells = DayNames - .Select(day => - Div( - className: "calendar-header-cell text-center font-semibold p-2", - children: new[] { Text(day) } - ) - ) - .ToArray(); - - var dayCells = new ReactElement[42]; // 6 rows * 7 days - var today = DateTime.Now; - - for (var i = 0; i < 42; i++) - { - var dayNum = i - startDayOfWeek + 1; - if (dayNum < 1 || dayNum > daysInMonth) - { - dayCells[i] = Div( - className: "calendar-cell empty", - children: new ReactElement[0] - ); - } - else - { - var appointments = GetAppointmentsForDay( - state.Appointments, - state.Year, - state.Month, - dayNum - ); - var isToday = - state.Year == today.Year - && state.Month == today.Month - && dayNum == today.Day; - var isSelected = dayNum == state.SelectedDay; - var dayNumCaptured = dayNum; - - var cellClasses = "calendar-cell"; - if (isToday) - cellClasses += " today"; - if (isSelected) - cellClasses += " selected"; - if (appointments.Length > 0) - cellClasses += " has-appointments"; - - dayCells[i] = Div( - className: cellClasses, - onClick: () => SelectDay(state, setState, dayNumCaptured), - children: new[] - { - Div( - className: "calendar-day-number", - children: new[] { Text(dayNum.ToString()) } - ), - appointments.Length > 0 - ? Div( - className: "calendar-appointments-preview", - children: appointments - .Take(3) - .Select(a => RenderAppointmentDot(a)) - .ToArray() - ) - : null, - appointments.Length > 3 - ? Span( - className: "calendar-more-indicator", - children: new[] { Text("+" + (appointments.Length - 3)) } - ) - : null, - } - ); - } - } - - return Div( - className: "card calendar-grid-container", - children: new[] - { - Div(className: "calendar-grid-header grid grid-cols-7", children: headerCells), - Div(className: "calendar-grid grid grid-cols-7", children: dayCells), - } - ); - } - - private static ReactElement RenderAppointmentDot(Appointment appointment) - { - var dotClass = "calendar-dot"; - if (appointment.Status == "booked") - dotClass += " blue"; - else if (appointment.Status == "arrived") - dotClass += " teal"; - else if (appointment.Status == "fulfilled") - dotClass += " green"; - else if (appointment.Status == "cancelled") - dotClass += " red"; - else - dotClass += " gray"; - - return Span(className: dotClass); - } - - private static void SelectDay( - CalendarState state, - Action setState, - int day - ) => - setState( - new CalendarState - { - Appointments = state.Appointments, - Loading = state.Loading, - Error = state.Error, - Year = state.Year, - Month = state.Month, - SelectedDay = day, - } - ); - - private static Appointment[] GetAppointmentsForDay( - Appointment[] appointments, - int year, - int month, - int day - ) - { - var targetDate = new DateTime(year, month, day).ToString("yyyy-MM-dd"); - return appointments - .Where(a => a.StartTime != null && a.StartTime.StartsWith(targetDate)) - .OrderBy(a => a.StartTime) - .ToArray(); - } - - private static ReactElement RenderNoSelection() => - Div( - className: "card calendar-details-panel", - style: new { width = "320px", minHeight = "400px" }, - children: new[] - { - Div( - className: "empty-state p-6", - children: new[] - { - Icons.Calendar(), - H( - 4, - className: "empty-state-title mt-4", - children: new[] { Text("Select a Day") } - ), - P( - className: "empty-state-description", - children: new[] { Text("Click on a day to view appointments") } - ), - } - ), - } - ); - - private static ReactElement RenderDayDetails( - CalendarState state, - Action setState, - Action onEditAppointment - ) - { - var appointments = GetAppointmentsForDay( - state.Appointments, - state.Year, - state.Month, - state.SelectedDay - ); - - var monthName = MonthNames[state.Month - 1]; - var dateStr = monthName + " " + state.SelectedDay + ", " + state.Year; - - return Div( - className: "card calendar-details-panel", - style: new { width = "320px", minHeight = "400px" }, - children: new[] - { - Div( - className: "flex justify-between items-center mb-4 p-4 border-b", - children: new[] - { - H(4, className: "font-semibold", children: new[] { Text(dateStr) }), - Button( - className: "btn btn-secondary btn-sm", - onClick: () => SelectDay(state, setState, 0), - children: new[] { Icons.X() } - ), - } - ), - appointments.Length == 0 - ? Div( - className: "empty-state p-6", - children: new[] - { - Icons.Calendar(), - P( - className: "empty-state-description mt-4", - children: new[] { Text("No appointments scheduled") } - ), - } - ) - : Div( - className: "p-4 space-y-3", - children: appointments - .Select(a => RenderDayAppointment(a, onEditAppointment)) - .ToArray() - ), - } - ); - } - - private static ReactElement RenderDayAppointment( - Appointment appointment, - Action onEditAppointment - ) - { - var time = FormatTime(appointment.StartTime); - var endTime = FormatTime(appointment.EndTime); - var statusClass = GetStatusClass(appointment.Status); - - return Div( - className: "calendar-appointment-item p-3 rounded-lg border", - children: new[] - { - Div( - className: "flex justify-between items-start mb-2", - children: new[] - { - Div( - children: new[] - { - Div( - className: "font-semibold", - children: new[] - { - Text(appointment.ServiceType ?? "Appointment"), - } - ), - Div( - className: "text-sm text-gray-500", - children: new[] { Text(time + " - " + endTime) } - ), - } - ), - Span( - className: "badge " + statusClass, - children: new[] { Text(appointment.Status ?? "unknown") } - ), - } - ), - Div( - className: "text-sm text-gray-600 mb-2", - children: new[] - { - Div( - children: new[] - { - Text( - "Patient: " + FormatReference(appointment.PatientReference) - ), - } - ), - Div( - children: new[] - { - Text( - "Provider: " - + FormatReference(appointment.PractitionerReference) - ), - } - ), - } - ), - Div( - className: "flex gap-2", - children: new[] - { - Button( - className: "btn btn-primary btn-sm flex-1", - onClick: () => onEditAppointment(appointment.Id), - children: new[] { Icons.Edit(), Text("Edit") } - ), - } - ), - } - ); - } - - private static string FormatTime(string dateTime) - { - if (string.IsNullOrEmpty(dateTime)) - return "N/A"; - if (dateTime.Length > 16) - return dateTime.Substring(11, 5); - return dateTime; - } - - private static string FormatReference(string reference) - { - if (string.IsNullOrEmpty(reference)) - return "N/A"; - var parts = reference.Split('/'); - if (parts.Length > 1) - { - var id = parts[1]; - var length = Math.Min(8, id.Length); - return id.Substring(0, length) + "..."; - } - return reference; - } - - private static string GetStatusClass(string status) - { - if (status == "booked") - return "badge-primary"; - if (status == "arrived") - return "badge-teal"; - if (status == "fulfilled") - return "badge-success"; - if (status == "cancelled") - return "badge-error"; - if (status == "noshow") - return "badge-warning"; - return "badge-gray"; - } - } -} diff --git a/Dashboard/Dashboard.Web/Pages/ClinicalCodingPage.cs b/Dashboard/Dashboard.Web/Pages/ClinicalCodingPage.cs deleted file mode 100644 index 08eb232..0000000 --- a/Dashboard/Dashboard.Web/Pages/ClinicalCodingPage.cs +++ /dev/null @@ -1,1568 +0,0 @@ -using System; -using Dashboard.Api; -using Dashboard.Components; -using Dashboard.Models; -using Dashboard.React; -using static Dashboard.React.Elements; -using static Dashboard.React.Hooks; - -namespace Dashboard.Pages -{ - /// - /// Clinical coding page state. - /// - public class ClinicalCodingState - { - /// Current search query. - public string SearchQuery { get; set; } - - /// Active search mode (keyword, semantic, lookup). - public string SearchMode { get; set; } - - /// ICD-10 search results. - public Icd10Code[] Icd10Results { get; set; } - - /// ACHI search results. - public AchiCode[] AchiResults { get; set; } - - /// Semantic search results. - public SemanticSearchResult[] SemanticResults { get; set; } - - /// Selected code for detail view. - public Icd10Code SelectedCode { get; set; } - - /// Whether loading. - public bool Loading { get; set; } - - /// Error message if any. - public string Error { get; set; } - - /// Whether to include ACHI in semantic search. - public bool IncludeAchi { get; set; } - - /// Copied code for feedback. - public string CopiedCode { get; set; } - } - - /// - /// Clinical coding page for ICD-10 code lookup and search. - /// - public static class ClinicalCodingPage - { - /// - /// Renders the clinical coding page. - /// - public static ReactElement Render() - { - var stateResult = UseState( - new ClinicalCodingState - { - SearchQuery = "", - SearchMode = "keyword", - Icd10Results = new Icd10Code[0], - AchiResults = new AchiCode[0], - SemanticResults = new SemanticSearchResult[0], - SelectedCode = null, - Loading = false, - Error = null, - IncludeAchi = false, - CopiedCode = null, - } - ); - - var state = stateResult.State; - var setState = stateResult.SetState; - - return Div( - className: "page clinical-coding-page", - children: new[] - { - RenderHeader(), - RenderSearchSection(state, setState), - RenderContent(state, setState), - } - ); - } - - private static ReactElement RenderHeader() => - Div( - className: "page-header", - children: new[] - { - Div( - className: "flex items-center gap-3", - children: new[] - { - Div( - className: "page-header-icon", - style: new - { - background = "linear-gradient(135deg, #3b82f6, #8b5cf6)", - borderRadius = "12px", - padding = "12px", - display = "flex", - alignItems = "center", - justifyContent = "center", - }, - children: new[] { Icons.Code() } - ), - Div( - children: new[] - { - H( - 2, - className: "page-title", - children: new[] { Text("Clinical Coding") } - ), - P( - className: "page-description", - children: new[] - { - Text( - "Search ICD-10-AM diagnosis codes and ACHI procedure codes" - ), - } - ), - } - ), - } - ), - } - ); - - private static ReactElement RenderSearchSection( - ClinicalCodingState state, - Action setState - ) => - Div( - className: "card mb-6", - style: new { padding = "24px" }, - children: new[] - { - RenderSearchTabs(state, setState), - RenderSearchInput(state, setState), - RenderSearchOptions(state, setState), - } - ); - - private static ReactElement RenderSearchTabs( - ClinicalCodingState state, - Action setState - ) => - Div( - className: "flex gap-2 mb-4", - children: new[] - { - RenderTab( - label: "Keyword Search", - icon: Icons.Search, - isActive: state.SearchMode == "keyword", - onClick: () => SetSearchMode(state, setState, mode: "keyword") - ), - RenderTab( - label: "AI Search", - icon: Icons.Sparkles, - isActive: state.SearchMode == "semantic", - onClick: () => SetSearchMode(state, setState, mode: "semantic") - ), - RenderTab( - label: "Code Lookup", - icon: Icons.FileText, - isActive: state.SearchMode == "lookup", - onClick: () => SetSearchMode(state, setState, mode: "lookup") - ), - } - ); - - private static ReactElement RenderTab( - string label, - Func icon, - bool isActive, - Action onClick - ) => - Button( - className: "btn " + (isActive ? "btn-primary" : "btn-secondary"), - onClick: onClick, - children: new[] { icon(), Text(label) } - ); - - private static void SetSearchMode( - ClinicalCodingState state, - Action setState, - string mode - ) - { - setState( - new ClinicalCodingState - { - SearchQuery = state.SearchQuery, - SearchMode = mode, - Icd10Results = new Icd10Code[0], - AchiResults = new AchiCode[0], - SemanticResults = new SemanticSearchResult[0], - SelectedCode = null, - Loading = false, - Error = null, - IncludeAchi = state.IncludeAchi, - CopiedCode = null, - } - ); - } - - private static ReactElement RenderSearchInput( - ClinicalCodingState state, - Action setState - ) - { - var placeholder = GetPlaceholder(state.SearchMode); - - return Div( - className: "flex gap-4", - children: new[] - { - Div( - className: "flex-1 search-input search-input-lg", - children: new[] - { - Span(className: "search-icon", children: new[] { Icons.Search() }), - Input( - className: "input input-lg", - type: "text", - placeholder: placeholder, - value: state.SearchQuery, - onChange: query => UpdateQuery(state, setState, query: query), - onKeyDown: key => - { - if (key == "Enter") - ExecuteSearch(state, setState); - } - ), - } - ), - Button( - className: "btn btn-primary btn-lg", - onClick: () => ExecuteSearch(state, setState), - children: new[] - { - state.Loading ? Icons.Refresh() : Icons.Search(), - Text(state.Loading ? "Searching..." : "Search"), - } - ), - } - ); - } - - private static string GetPlaceholder(string mode) - { - if (mode == "keyword") - return "Search by code, description, or keywords (e.g., 'diabetes', 'fracture')"; - if (mode == "semantic") - return "Describe symptoms or conditions in natural language..."; - return "Enter ICD-10 code or prefix (e.g., 'O9A.', 'E11', 'J18.9')"; - } - - private static void UpdateQuery( - ClinicalCodingState state, - Action setState, - string query - ) - { - setState( - new ClinicalCodingState - { - SearchQuery = query, - SearchMode = state.SearchMode, - Icd10Results = state.Icd10Results, - AchiResults = state.AchiResults, - SemanticResults = state.SemanticResults, - SelectedCode = state.SelectedCode, - Loading = state.Loading, - Error = state.Error, - IncludeAchi = state.IncludeAchi, - CopiedCode = state.CopiedCode, - } - ); - } - - private static ReactElement RenderSearchOptions( - ClinicalCodingState state, - Action setState - ) - { - if (state.SearchMode != "semantic") - return Text(""); - - return Div( - className: "flex items-center gap-4 mt-4", - children: new[] - { - Label( - className: "flex items-center gap-2 cursor-pointer", - children: new[] - { - Input( - className: "checkbox", - type: "checkbox", - value: state.IncludeAchi ? "true" : "", - onChange: _ => ToggleAchi(state, setState) - ), - Span(children: new[] { Text("Include ACHI procedure codes") }), - } - ), - Span( - className: "text-sm text-gray-500", - children: new[] - { - Icons.Sparkles(), - Text(" Powered by medical AI embeddings"), - } - ), - } - ); - } - - private static void ToggleAchi( - ClinicalCodingState state, - Action setState - ) - { - setState( - new ClinicalCodingState - { - SearchQuery = state.SearchQuery, - SearchMode = state.SearchMode, - Icd10Results = state.Icd10Results, - AchiResults = state.AchiResults, - SemanticResults = state.SemanticResults, - SelectedCode = state.SelectedCode, - Loading = state.Loading, - Error = state.Error, - IncludeAchi = !state.IncludeAchi, - CopiedCode = state.CopiedCode, - } - ); - } - - private static async void ExecuteSearch( - ClinicalCodingState state, - Action setState - ) - { - if (string.IsNullOrWhiteSpace(state.SearchQuery)) - return; - - setState( - new ClinicalCodingState - { - SearchQuery = state.SearchQuery, - SearchMode = state.SearchMode, - Icd10Results = new Icd10Code[0], - AchiResults = new AchiCode[0], - SemanticResults = new SemanticSearchResult[0], - SelectedCode = null, - Loading = true, - Error = null, - IncludeAchi = state.IncludeAchi, - CopiedCode = null, - } - ); - - try - { - if (state.SearchMode == "keyword") - { - var results = await ApiClient.SearchIcd10CodesAsync( - query: state.SearchQuery, - limit: 50 - ); - setState( - new ClinicalCodingState - { - SearchQuery = state.SearchQuery, - SearchMode = state.SearchMode, - Icd10Results = results, - AchiResults = new AchiCode[0], - SemanticResults = new SemanticSearchResult[0], - SelectedCode = null, - Loading = false, - Error = null, - IncludeAchi = state.IncludeAchi, - CopiedCode = null, - } - ); - } - else if (state.SearchMode == "semantic") - { - var results = await ApiClient.SemanticSearchAsync( - query: state.SearchQuery, - limit: 20, - includeAchi: state.IncludeAchi - ); - setState( - new ClinicalCodingState - { - SearchQuery = state.SearchQuery, - SearchMode = state.SearchMode, - Icd10Results = new Icd10Code[0], - AchiResults = new AchiCode[0], - SemanticResults = results, - SelectedCode = null, - Loading = false, - Error = null, - IncludeAchi = state.IncludeAchi, - CopiedCode = null, - } - ); - } - else - { - // Code Lookup: Use keyword search with prefix filter - var allResults = await ApiClient.SearchIcd10CodesAsync( - query: state.SearchQuery, - limit: 100 - ); - - // Filter to codes that start with the search query (case-insensitive prefix match) - var query = state.SearchQuery.ToUpper(); - var matchingCodes = new System.Collections.Generic.List(); - foreach (var c in allResults) - { - if (c.Code != null && c.Code.ToUpper().StartsWith(query)) - { - matchingCodes.Add(c); - } - } - - // If exactly one result, show detail view; otherwise show list - if (matchingCodes.Count == 1) - { - var fullCode = await ApiClient.GetIcd10CodeAsync( - code: matchingCodes[0].Code - ); - setState( - new ClinicalCodingState - { - SearchQuery = state.SearchQuery, - SearchMode = state.SearchMode, - Icd10Results = new Icd10Code[0], - AchiResults = new AchiCode[0], - SemanticResults = new SemanticSearchResult[0], - SelectedCode = fullCode, - Loading = false, - Error = null, - IncludeAchi = state.IncludeAchi, - CopiedCode = null, - } - ); - } - else - { - // Multiple matches or no matches - show as list - setState( - new ClinicalCodingState - { - SearchQuery = state.SearchQuery, - SearchMode = state.SearchMode, - Icd10Results = matchingCodes.ToArray(), - AchiResults = new AchiCode[0], - SemanticResults = new SemanticSearchResult[0], - SelectedCode = null, - Loading = false, - Error = null, - IncludeAchi = state.IncludeAchi, - CopiedCode = null, - } - ); - } - } - } - catch (Exception ex) - { - setState( - new ClinicalCodingState - { - SearchQuery = state.SearchQuery, - SearchMode = state.SearchMode, - Icd10Results = new Icd10Code[0], - AchiResults = new AchiCode[0], - SemanticResults = new SemanticSearchResult[0], - SelectedCode = null, - Loading = false, - Error = ex.Message, - IncludeAchi = state.IncludeAchi, - CopiedCode = null, - } - ); - } - } - - private static ReactElement RenderContent( - ClinicalCodingState state, - Action setState - ) - { - if (state.Loading) - return RenderLoading(); - - if (state.Error != null) - return RenderError(state.Error); - - if (state.SelectedCode != null) - return RenderCodeDetail(state, setState); - - if (state.SemanticResults.Length > 0) - return RenderSemanticResults(state, setState); - - if (state.Icd10Results.Length > 0) - return RenderKeywordResults(state, setState); - - // Show "no results" for Code Lookup when search was performed - if ( - state.SearchMode == "lookup" - && !string.IsNullOrWhiteSpace(state.SearchQuery) - && !state.Loading - ) - return RenderNoResults(state.SearchQuery); - - return RenderEmptyState(state); - } - - private static ReactElement RenderNoResults(string query) => - Div( - className: "card", - children: new[] - { - Div( - className: "empty-state", - children: new[] - { - Div( - style: new - { - background = "linear-gradient(135deg, #6b7280, #9ca3af)", - borderRadius = "16px", - padding = "20px", - marginBottom = "16px", - }, - children: new[] { Icons.Search() } - ), - H( - 4, - className: "empty-state-title", - children: new[] { Text("No codes found") } - ), - P( - className: "empty-state-description", - children: new[] - { - Text( - "No ICD-10 codes match '" - + query - + "'. Try a different code or use keyword search." - ), - } - ), - } - ), - } - ); - - private static ReactElement RenderLoading() => - Div( - className: "card", - children: new[] - { - Div( - className: "flex items-center justify-center p-12", - children: new[] - { - Div( - className: "loading-spinner", - style: new - { - width = "48px", - height = "48px", - border = "4px solid #e5e7eb", - borderTop = "4px solid #3b82f6", - borderRadius = "50%", - animation = "spin 1s linear infinite", - } - ), - } - ), - } - ); - - private static ReactElement RenderError(string error) => - Div( - className: "card", - style: new { borderLeft = "4px solid var(--error)" }, - children: new[] - { - Div( - className: "flex items-center gap-3 p-4", - children: new[] - { - Icons.X(), - Div( - children: new[] - { - H( - 4, - className: "font-semibold", - children: new[] { Text("Search Error") } - ), - P( - className: "text-sm text-gray-600", - children: new[] { Text(error) } - ), - P( - className: "text-sm text-gray-500 mt-2", - children: new[] - { - Text( - "Make sure the ICD-10 API (port 5090) is running." - ), - } - ), - } - ), - } - ), - } - ); - - private static ReactElement RenderEmptyState(ClinicalCodingState state) - { - var title = GetEmptyTitle(state.SearchMode); - var description = GetEmptyDescription(state.SearchMode); - - return Div( - className: "card", - children: new[] - { - Div( - className: "empty-state", - children: new[] - { - Div( - style: new - { - background = "linear-gradient(135deg, #3b82f6, #8b5cf6)", - borderRadius = "16px", - padding = "20px", - marginBottom = "16px", - }, - children: new[] { Icons.Code() } - ), - H(4, className: "empty-state-title", children: new[] { Text(title) }), - P( - className: "empty-state-description", - children: new[] { Text(description) } - ), - RenderQuickSearches(state), - } - ), - } - ); - } - - private static string GetEmptyTitle(string mode) - { - if (mode == "semantic") - return "AI-Powered Code Search"; - if (mode == "lookup") - return "Direct Code Lookup"; - return "ICD-10-AM Code Search"; - } - - private static string GetEmptyDescription(string mode) - { - if (mode == "semantic") - return "Describe symptoms in natural language and let AI find the right codes."; - if (mode == "lookup") - return "Enter an ICD-10 code or prefix to find matching codes (e.g., 'O9A.' lists all O9A codes)."; - return "Search diagnosis codes by keyword, description, or code fragment."; - } - - private static ReactElement RenderQuickSearches(ClinicalCodingState state) - { - if (state.SearchMode == "lookup") - return Text(""); - - string[] examples; - if (state.SearchMode == "semantic") - { - examples = new[] - { - "Patient with chest pain and shortness of breath", - "Type 2 diabetes with kidney complications", - "Broken arm from fall", - "Chronic lower back pain", - }; - } - else - { - examples = new[] { "diabetes", "pneumonia", "fracture", "hypertension" }; - } - - var buttons = new ReactElement[examples.Length]; - for (int i = 0; i < examples.Length; i++) - { - var example = examples[i]; - buttons[i] = Button( - className: "btn btn-ghost btn-sm", - onClick: () => { }, - children: new[] { Text(example) } - ); - } - - return Div( - className: "flex flex-wrap gap-2 mt-4", - children: new ReactElement[] - { - Span(className: "text-sm text-gray-500", children: new[] { Text("Try: ") }), - }.Concat(buttons) - ); - } - - private static ReactElement[] Concat(this ReactElement[] arr1, ReactElement[] arr2) - { - var result = new ReactElement[arr1.Length + arr2.Length]; - for (int i = 0; i < arr1.Length; i++) - result[i] = arr1[i]; - for (int i = 0; i < arr2.Length; i++) - result[arr1.Length + i] = arr2[i]; - return result; - } - - private static ReactElement RenderKeywordResults( - ClinicalCodingState state, - Action setState - ) - { - var resultRows = new ReactElement[state.Icd10Results.Length]; - for (int i = 0; i < state.Icd10Results.Length; i++) - { - var code = state.Icd10Results[i]; - resultRows[i] = RenderCodeRow(code, state, setState); - } - - return Div( - children: new[] - { - Div( - className: "flex items-center justify-between mb-4", - children: new[] - { - Span( - className: "text-sm text-gray-600", - children: new[] - { - Text(state.Icd10Results.Length + " results found"), - } - ), - } - ), - Div( - className: "table-container", - children: new[] - { - Table( - className: "table", - children: new[] - { - THead( - Tr( - children: new[] - { - Th(children: new[] { Text("Code") }), - Th(children: new[] { Text("Description") }), - Th(children: new[] { Text("Chapter") }), - Th(children: new[] { Text("Category") }), - Th(children: new[] { Text("Status") }), - Th(children: new[] { Text("") }), - } - ) - ), - TBody(resultRows), - } - ), - } - ), - } - ); - } - - private static ReactElement RenderCodeRow( - Icd10Code code, - ClinicalCodingState state, - Action setState - ) => - Tr( - className: "search-result-row", - onClick: () => SelectCode(code, state, setState), - children: new[] - { - Td( - children: new[] - { - Span( - className: "badge badge-primary", - style: new - { - background = "linear-gradient(135deg, #3b82f6, #8b5cf6)", - color = "white", - fontWeight = "600", - }, - children: new[] { Text(code.Code) } - ), - } - ), - Td( - className: "result-description-cell", - children: new[] - { - Span(children: new[] { Text(code.ShortDescription ?? "") }), - Div( - className: "result-tooltip", - children: new[] - { - H( - 4, - className: "font-semibold mb-2", - children: new[] { Text(code.ShortDescription ?? "") } - ), - P( - className: "text-sm text-gray-600 mb-3", - children: new[] - { - Text( - code.LongDescription ?? code.ShortDescription ?? "" - ), - } - ), - !string.IsNullOrEmpty(code.InclusionTerms) - ? Div( - className: "text-xs text-gray-500 mb-2", - children: new[] - { - Span( - className: "font-semibold", - children: new[] { Text("Includes: ") } - ), - Text(code.InclusionTerms), - } - ) - : Text(""), - !string.IsNullOrEmpty(code.ExclusionTerms) - ? Div( - className: "text-xs text-gray-500", - children: new[] - { - Span( - className: "font-semibold", - children: new[] { Text("Excludes: ") } - ), - Text(code.ExclusionTerms), - } - ) - : Text(""), - } - ), - } - ), - Td( - className: "text-sm text-gray-600", - children: new[] { Text("Ch. " + code.ChapterNumber) } - ), - Td( - className: "text-sm text-gray-600", - children: new[] { Text(code.CategoryCode ?? "") } - ), - Td( - children: new[] - { - code.Billable - ? Span( - className: "badge badge-success", - children: new[] { Text("Billable") } - ) - : Span( - className: "badge badge-gray", - children: new[] { Text("Non-billable") } - ), - } - ), - Td( - children: new[] - { - Button( - className: "btn btn-ghost btn-sm", - onClick: () => CopyCode(code.Code, state, setState), - children: new[] - { - state.CopiedCode == code.Code ? Icons.Check() : Icons.Copy(), - } - ), - } - ), - } - ); - - private static async void SelectCode( - Icd10Code code, - ClinicalCodingState state, - Action setState - ) - { - setState( - new ClinicalCodingState - { - SearchQuery = state.SearchQuery, - SearchMode = state.SearchMode, - Icd10Results = state.Icd10Results, - AchiResults = state.AchiResults, - SemanticResults = state.SemanticResults, - SelectedCode = null, - Loading = true, - Error = null, - IncludeAchi = state.IncludeAchi, - CopiedCode = state.CopiedCode, - } - ); - - try - { - var fullCode = await ApiClient.GetIcd10CodeAsync(code: code.Code); - setState( - new ClinicalCodingState - { - SearchQuery = state.SearchQuery, - SearchMode = state.SearchMode, - Icd10Results = state.Icd10Results, - AchiResults = state.AchiResults, - SemanticResults = state.SemanticResults, - SelectedCode = fullCode, - Loading = false, - Error = null, - IncludeAchi = state.IncludeAchi, - CopiedCode = state.CopiedCode, - } - ); - } - catch (Exception ex) - { - setState( - new ClinicalCodingState - { - SearchQuery = state.SearchQuery, - SearchMode = state.SearchMode, - Icd10Results = state.Icd10Results, - AchiResults = state.AchiResults, - SemanticResults = state.SemanticResults, - SelectedCode = null, - Loading = false, - Error = "Failed to load code details: " + ex.Message, - IncludeAchi = state.IncludeAchi, - CopiedCode = state.CopiedCode, - } - ); - } - } - - private static void CopyCode( - string code, - ClinicalCodingState state, - Action setState - ) - { - H5.Script.Call("navigator.clipboard.writeText", code); - setState( - new ClinicalCodingState - { - SearchQuery = state.SearchQuery, - SearchMode = state.SearchMode, - Icd10Results = state.Icd10Results, - AchiResults = state.AchiResults, - SemanticResults = state.SemanticResults, - SelectedCode = state.SelectedCode, - Loading = state.Loading, - Error = state.Error, - IncludeAchi = state.IncludeAchi, - CopiedCode = code, - } - ); - } - - private static ReactElement RenderSemanticResults( - ClinicalCodingState state, - Action setState - ) - { - var resultRows = new ReactElement[state.SemanticResults.Length]; - for (int i = 0; i < state.SemanticResults.Length; i++) - { - var result = state.SemanticResults[i]; - resultRows[i] = RenderSemanticRow(result, state, setState); - } - - return Div( - children: new[] - { - Div( - className: "flex items-center justify-between mb-4", - children: new[] - { - Div( - className: "flex items-center gap-2", - children: new[] - { - Icons.Sparkles(), - Span( - className: "text-sm text-gray-600", - children: new[] - { - Text( - state.SemanticResults.Length + " AI-matched results" - ), - } - ), - } - ), - } - ), - Div( - className: "table-container", - children: new[] - { - Table( - className: "table", - children: new[] - { - THead( - Tr( - children: new[] - { - Th(children: new[] { Text("Code") }), - Th(children: new[] { Text("Type") }), - Th(children: new[] { Text("Chapter") }), - Th(children: new[] { Text("Category") }), - Th(children: new[] { Text("Description") }), - Th(children: new[] { Text("Confidence") }), - } - ) - ), - TBody(resultRows), - } - ), - } - ), - } - ); - } - - private static ReactElement RenderSemanticRow( - SemanticSearchResult result, - ClinicalCodingState state, - Action setState - ) - { - var confidencePercent = (int)(result.Confidence * 100); - var confidenceColor = - confidencePercent >= 80 ? "#22c55e" - : confidencePercent >= 60 ? "#f59e0b" - : "#ef4444"; - var badgeClass = - confidencePercent >= 80 ? "badge-success" - : confidencePercent >= 60 ? "badge-warning" - : "badge-error"; - - return Tr( - className: "search-result-row", - onClick: () => LookupSemanticCode(result.Code, state, setState), - children: new[] - { - Td( - children: new[] - { - Span( - className: "badge badge-primary", - style: new - { - background = result.CodeType == "ACHI" - ? "linear-gradient(135deg, #14b8a6, #0d9488)" - : "linear-gradient(135deg, #3b82f6, #8b5cf6)", - color = "white", - fontWeight = "600", - }, - children: new[] { Text(result.Code) } - ), - } - ), - Td( - children: new[] - { - Span( - className: result.CodeType == "ACHI" - ? "badge badge-teal" - : "badge badge-violet", - children: new[] { Text(result.CodeType ?? "ICD10CM") } - ), - } - ), - Td( - className: "text-sm text-gray-600", - children: new[] - { - Text( - !string.IsNullOrEmpty(result.Chapter) - ? "Ch. " + result.Chapter - : "-" - ), - } - ), - Td( - className: "text-sm text-gray-600", - children: new[] { Text(result.Category ?? "-") } - ), - Td( - className: "result-description-cell", - children: new[] - { - Span(children: new[] { Text(result.Description ?? "") }), - Div( - className: "result-tooltip", - children: RenderSemanticTooltipContent( - result: result, - confidenceColor: confidenceColor, - confidencePercent: confidencePercent - ) - ), - } - ), - Td( - children: new[] - { - Div( - className: "flex items-center gap-2", - children: new[] - { - Div( - style: new - { - width = "60px", - height = "8px", - background = "#e5e7eb", - borderRadius = "4px", - overflow = "hidden", - }, - children: new[] - { - Div( - style: new - { - width = confidencePercent + "%", - height = "100%", - background = confidenceColor, - } - ), - } - ), - Span( - className: "badge " + badgeClass, - children: new[] { Text(confidencePercent + "%") } - ), - } - ), - } - ), - } - ); - } - - private static ReactElement[] RenderSemanticTooltipContent( - SemanticSearchResult result, - string confidenceColor, - int confidencePercent - ) - { - var elements = new System.Collections.Generic.List - { - H( - 4, - className: "font-semibold mb-2", - children: new[] { Text(result.Code + " - " + (result.Description ?? "")) } - ), - P( - className: "text-sm text-gray-600 mb-3", - children: new[] { Text(result.LongDescription ?? result.Description ?? "") } - ), - }; - - if (!string.IsNullOrEmpty(result.InclusionTerms)) - { - elements.Add( - Div( - className: "text-xs text-green-700 mb-2", - children: new[] - { - Span( - className: "font-semibold", - children: new[] { Text("Includes: ") } - ), - Text(result.InclusionTerms), - } - ) - ); - } - - if (!string.IsNullOrEmpty(result.ExclusionTerms)) - { - elements.Add( - Div( - className: "text-xs text-red-700 mb-2", - children: new[] - { - Span( - className: "font-semibold", - children: new[] { Text("Excludes: ") } - ), - Text(result.ExclusionTerms), - } - ) - ); - } - - if (!string.IsNullOrEmpty(result.CodeAlso)) - { - elements.Add( - Div( - className: "text-xs text-blue-700 mb-2", - children: new[] - { - Span( - className: "font-semibold", - children: new[] { Text("Code also: ") } - ), - Text(result.CodeAlso), - } - ) - ); - } - - if (!string.IsNullOrEmpty(result.CodeFirst)) - { - elements.Add( - Div( - className: "text-xs text-purple-700 mb-2", - children: new[] - { - Span( - className: "font-semibold", - children: new[] { Text("Code first: ") } - ), - Text(result.CodeFirst), - } - ) - ); - } - - var footerChildren = new System.Collections.Generic.List - { - Span(className: "font-semibold", children: new[] { Text("Type: ") }), - Text(result.CodeType ?? "ICD10CM"), - }; - - if (!string.IsNullOrEmpty(result.Chapter)) - { - footerChildren.Add(Text(" | ")); - footerChildren.Add( - Span(className: "font-semibold", children: new[] { Text("Chapter: ") }) - ); - footerChildren.Add(Text(result.Chapter + " - " + (result.ChapterTitle ?? ""))); - } - - if (!string.IsNullOrEmpty(result.Category)) - { - footerChildren.Add(Text(" | ")); - footerChildren.Add( - Span(className: "font-semibold", children: new[] { Text("Category: ") }) - ); - footerChildren.Add(Text(result.Category)); - } - - footerChildren.Add(Text(" | ")); - footerChildren.Add( - Span(className: "font-semibold", children: new[] { Text("Confidence: ") }) - ); - footerChildren.Add( - Span( - style: new { color = confidenceColor }, - children: new[] { Text(confidencePercent + "%") } - ) - ); - - elements.Add( - Div( - className: "text-xs text-gray-500 mt-2 pt-2 border-t border-gray-200", - children: footerChildren.ToArray() - ) - ); - - return elements.ToArray(); - } - - private static async void LookupSemanticCode( - string code, - ClinicalCodingState state, - Action setState - ) - { - setState( - new ClinicalCodingState - { - SearchQuery = code, - SearchMode = "lookup", - Icd10Results = new Icd10Code[0], - AchiResults = new AchiCode[0], - SemanticResults = new SemanticSearchResult[0], - SelectedCode = null, - Loading = true, - Error = null, - IncludeAchi = state.IncludeAchi, - CopiedCode = null, - } - ); - - try - { - var result = await ApiClient.GetIcd10CodeAsync(code: code); - setState( - new ClinicalCodingState - { - SearchQuery = code, - SearchMode = "lookup", - Icd10Results = new Icd10Code[0], - AchiResults = new AchiCode[0], - SemanticResults = new SemanticSearchResult[0], - SelectedCode = result, - Loading = false, - Error = null, - IncludeAchi = state.IncludeAchi, - CopiedCode = null, - } - ); - } - catch (Exception ex) - { - setState( - new ClinicalCodingState - { - SearchQuery = code, - SearchMode = "lookup", - Icd10Results = new Icd10Code[0], - AchiResults = new AchiCode[0], - SemanticResults = new SemanticSearchResult[0], - SelectedCode = null, - Loading = false, - Error = ex.Message, - IncludeAchi = state.IncludeAchi, - CopiedCode = null, - } - ); - } - } - - private static ReactElement RenderCodeDetail( - ClinicalCodingState state, - Action setState - ) - { - var code = state.SelectedCode; - - return Div( - children: new[] - { - Button( - className: "btn btn-ghost mb-4", - onClick: () => ClearSelection(state, setState), - children: new[] { Icons.ChevronLeft(), Text("Back to results") } - ), - Div( - className: "card", - style: new { padding = "32px" }, - children: new[] - { - Div( - className: "flex items-start justify-between mb-6", - children: new[] - { - Div( - children: new[] - { - Div( - className: "flex items-center gap-3 mb-2", - children: new[] - { - Span( - style: new - { - background = "linear-gradient(135deg, #3b82f6, #8b5cf6)", - color = "white", - padding = "8px 20px", - borderRadius = "8px", - fontWeight = "700", - fontSize = "20px", - }, - children: new[] { Text(code.Code) } - ), - code.Billable - ? Span( - className: "badge badge-success", - children: new[] - { - Icons.Check(), - Text("Billable"), - } - ) - : Span( - className: "badge badge-gray", - children: new[] { Text("Non-billable") } - ), - } - ), - H( - 2, - className: "text-xl font-semibold mt-4", - children: new[] - { - Text(code.ShortDescription ?? ""), - } - ), - } - ), - Button( - className: "btn btn-primary", - onClick: () => CopyCode(code.Code, state, setState), - children: new[] - { - state.CopiedCode == code.Code - ? Icons.Check() - : Icons.Copy(), - Text( - state.CopiedCode == code.Code - ? "Copied!" - : "Copy Code" - ), - } - ), - } - ), - Div( - className: "grid grid-cols-3 gap-4 mb-6 p-4", - style: new { background = "#f9fafb", borderRadius = "8px" }, - children: new[] - { - RenderDetailItem( - label: "Chapter", - value: code.ChapterNumber - + " - " - + (code.ChapterTitle ?? "") - ), - RenderDetailItem(label: "Block", value: code.BlockCode ?? ""), - RenderDetailItem( - label: "Category", - value: code.CategoryCode ?? "" - ), - } - ), - RenderDetailSection( - title: "Full Description", - content: code.LongDescription - ), - RenderDetailSection( - title: "Inclusion Terms", - content: code.InclusionTerms - ), - RenderDetailSection( - title: "Exclusion Terms", - content: code.ExclusionTerms - ), - RenderDetailSection(title: "Code Also", content: code.CodeAlso), - RenderDetailSection(title: "Code First", content: code.CodeFirst), - } - ), - } - ); - } - - private static ReactElement RenderDetailItem(string label, string value) => - Div( - children: new[] - { - Span( - className: "text-xs text-gray-500 uppercase tracking-wide", - children: new[] { Text(label) } - ), - P(className: "font-medium", children: new[] { Text(value) }), - } - ); - - private static ReactElement RenderDetailSection(string title, string content) - { - if (string.IsNullOrWhiteSpace(content)) - return Text(""); - - return Div( - className: "mb-4", - children: new[] - { - H( - 4, - className: "font-semibold text-gray-700 mb-2", - children: new[] { Text(title) } - ), - Div( - className: "p-4", - style: new - { - background = "#f9fafb", - borderRadius = "8px", - borderLeft = "4px solid #3b82f6", - }, - children: new[] - { - P( - className: "text-gray-700 whitespace-pre-wrap", - children: new[] { Text(content) } - ), - } - ), - } - ); - } - - private static void ClearSelection( - ClinicalCodingState state, - Action setState - ) - { - setState( - new ClinicalCodingState - { - SearchQuery = state.SearchQuery, - SearchMode = state.SearchMode, - Icd10Results = state.Icd10Results, - AchiResults = state.AchiResults, - SemanticResults = state.SemanticResults, - SelectedCode = null, - Loading = false, - Error = null, - IncludeAchi = state.IncludeAchi, - CopiedCode = null, - } - ); - } - } -} diff --git a/Dashboard/Dashboard.Web/Pages/DashboardPage.cs b/Dashboard/Dashboard.Web/Pages/DashboardPage.cs deleted file mode 100644 index ad7a733..0000000 --- a/Dashboard/Dashboard.Web/Pages/DashboardPage.cs +++ /dev/null @@ -1,361 +0,0 @@ -using System; -using Dashboard.Api; -using Dashboard.Components; -using Dashboard.React; -using static Dashboard.React.Elements; -using static Dashboard.React.Hooks; - -namespace Dashboard.Pages -{ - /// - /// Dashboard state class. - /// - public class DashboardState - { - /// Patient count. - public int PatientCount { get; set; } - - /// Practitioner count. - public int PractitionerCount { get; set; } - - /// Appointment count. - public int AppointmentCount { get; set; } - - /// Encounter count. - public int EncounterCount { get; set; } - - /// Whether loading. - public bool Loading { get; set; } - - /// Error message if any. - public string Error { get; set; } - } - - /// - /// Main dashboard overview page. - /// - public static class DashboardPage - { - /// - /// Renders the dashboard page. - /// - public static ReactElement Render() - { - var stateResult = UseState( - new DashboardState - { - PatientCount = 0, - PractitionerCount = 0, - AppointmentCount = 0, - EncounterCount = 0, - Loading = true, - Error = null, - } - ); - - var state = stateResult.State; - var setState = stateResult.SetState; - - UseEffect( - () => - { - LoadData(setState); - }, - new object[0] - ); - - ReactElement errorElement; - if (state.Error != null) - { - errorElement = RenderError(state.Error); - } - else - { - errorElement = Text(""); - } - - return Div( - className: "page", - children: new[] - { - // Page header - Div( - className: "page-header", - children: new[] - { - H(2, className: "page-title", children: new[] { Text("Dashboard") }), - P( - className: "page-description", - children: new[] { Text("Overview of your healthcare system") } - ), - } - ), - // Error display - errorElement, - // Metrics grid - Div( - className: "dashboard-grid metrics mb-6", - children: new[] - { - MetricCard.Render( - new MetricCardProps - { - Label = "Total Patients", - Value = state.Loading ? "-" : state.PatientCount.ToString(), - Icon = Icons.Users, - IconColor = "blue", - TrendValue = "+12%", - Trend = TrendDirection.Up, - } - ), - MetricCard.Render( - new MetricCardProps - { - Label = "Practitioners", - Value = state.Loading - ? "-" - : state.PractitionerCount.ToString(), - Icon = Icons.UserDoctor, - IconColor = "teal", - } - ), - MetricCard.Render( - new MetricCardProps - { - Label = "Appointments", - Value = state.Loading ? "-" : state.AppointmentCount.ToString(), - Icon = Icons.Calendar, - IconColor = "success", - TrendValue = "+8%", - Trend = TrendDirection.Up, - } - ), - MetricCard.Render( - new MetricCardProps - { - Label = "Encounters", - Value = state.Loading ? "-" : state.EncounterCount.ToString(), - Icon = Icons.Clipboard, - IconColor = "warning", - TrendValue = "-3%", - Trend = TrendDirection.Down, - } - ), - } - ), - // Quick actions and activity - Div( - className: "dashboard-grid mixed", - children: new[] { RenderQuickActions(), RenderRecentActivity() } - ), - } - ); - } - - private static async void LoadData(Action setState) - { - try - { - var patients = await ApiClient.GetPatientsAsync(); - var practitioners = await ApiClient.GetPractitionersAsync(); - var appointments = await ApiClient.GetAppointmentsAsync(); - - setState( - new DashboardState - { - PatientCount = patients.Length, - PractitionerCount = practitioners.Length, - AppointmentCount = appointments.Length, - EncounterCount = 0, - Loading = false, - Error = null, - } - ); - } - catch (Exception ex) - { - setState( - new DashboardState - { - PatientCount = 0, - PractitionerCount = 0, - AppointmentCount = 0, - EncounterCount = 0, - Loading = false, - Error = ex.Message, - } - ); - } - } - - private static ReactElement RenderError(string message) => - Div( - className: "card mb-6", - style: new { borderLeft = "4px solid var(--warning)" }, - children: new[] - { - Div( - className: "flex items-center gap-3", - children: new[] - { - Icons.Bell(), - Div( - children: new[] - { - H( - 4, - className: "font-semibold", - children: new[] { Text("Connection Warning") } - ), - P( - className: "text-sm text-gray-600", - children: new[] - { - Text("Could not connect to API: " + message), - } - ), - P( - className: "text-sm text-gray-500", - children: new[] - { - Text( - "Make sure Clinical API (port 5000) and Scheduling API (port 5001) are running." - ), - } - ), - } - ), - } - ), - } - ); - - private static ReactElement RenderQuickActions() => - Div( - className: "card", - children: new[] - { - Div( - className: "card-header", - children: new[] - { - H( - 3, - className: "card-title", - children: new[] { Text("Quick Actions") } - ), - } - ), - Div( - className: "card-body", - children: new[] - { - Div( - className: "grid grid-cols-2 gap-4", - children: new[] - { - RenderActionButton("New Patient", Icons.Plus, "primary"), - RenderActionButton( - "New Appointment", - Icons.Calendar, - "secondary" - ), - RenderActionButton( - "View Schedule", - Icons.Calendar, - "secondary" - ), - RenderActionButton("Patient Search", Icons.Search, "secondary"), - } - ), - } - ), - } - ); - - private static ReactElement RenderActionButton( - string label, - Func icon, - string variant - ) => - Button( - className: "btn btn-" + variant + " w-full", - children: new[] { icon(), Text(label) } - ); - - private static ReactElement RenderRecentActivity() => - Div( - className: "card", - children: new[] - { - Div( - className: "card-header", - children: new[] - { - H( - 3, - className: "card-title", - children: new[] { Text("Recent Activity") } - ), - Button( - className: "btn btn-ghost btn-sm", - children: new[] { Text("View All") } - ), - } - ), - Div( - className: "card-body", - children: new[] - { - Div( - className: "data-list", - children: new[] - { - RenderActivityItem( - "New patient registered", - "John Smith added to system", - "2 min ago" - ), - RenderActivityItem( - "Appointment completed", - "Dr. Wilson with Jane Doe", - "15 min ago" - ), - RenderActivityItem( - "Lab results available", - "Patient ID: PAT-0042", - "1 hour ago" - ), - } - ), - } - ), - } - ); - - private static ReactElement RenderActivityItem( - string title, - string subtitle, - string time - ) => - Div( - className: "data-list-item", - children: new[] - { - Div(className: "avatar avatar-sm", children: new[] { Icons.Activity() }), - Div( - className: "data-list-item-content", - children: new[] - { - Div(className: "data-list-item-title", children: new[] { Text(title) }), - Div( - className: "data-list-item-subtitle", - children: new[] { Text(subtitle) } - ), - } - ), - Div(className: "data-list-item-meta", children: new[] { Text(time) }), - } - ); - } -} diff --git a/Dashboard/Dashboard.Web/Pages/EditAppointmentPage.cs b/Dashboard/Dashboard.Web/Pages/EditAppointmentPage.cs deleted file mode 100644 index 55f8949..0000000 --- a/Dashboard/Dashboard.Web/Pages/EditAppointmentPage.cs +++ /dev/null @@ -1,777 +0,0 @@ -using System; -using Dashboard.Api; -using Dashboard.Components; -using Dashboard.Models; -using Dashboard.React; -using static Dashboard.React.Elements; -using static Dashboard.React.Hooks; - -namespace Dashboard.Pages -{ - /// - /// Edit appointment page state class. - /// - public class EditAppointmentState - { - /// Appointment being edited. - public Appointment Appointment { get; set; } - - /// Whether loading. - public bool Loading { get; set; } - - /// Whether saving. - public bool Saving { get; set; } - - /// Error message if any. - public string Error { get; set; } - - /// Success message if any. - public string Success { get; set; } - - /// Form field: Service category. - public string ServiceCategory { get; set; } - - /// Form field: Service type. - public string ServiceType { get; set; } - - /// Form field: Reason code. - public string ReasonCode { get; set; } - - /// Form field: Priority. - public string Priority { get; set; } - - /// Form field: Description. - public string Description { get; set; } - - /// Form field: Start date. - public string StartDate { get; set; } - - /// Form field: Start time. - public string StartTime { get; set; } - - /// Form field: End date. - public string EndDate { get; set; } - - /// Form field: End time. - public string EndTime { get; set; } - - /// Form field: Patient reference. - public string PatientReference { get; set; } - - /// Form field: Practitioner reference. - public string PractitionerReference { get; set; } - - /// Form field: Comment. - public string Comment { get; set; } - - /// Form field: Status. - public string Status { get; set; } - } - - /// - /// Edit appointment page component. - /// - public static class EditAppointmentPage - { - /// - /// Renders the edit appointment page. - /// - public static ReactElement Render(string appointmentId, Action onBack) - { - var stateResult = UseState( - new EditAppointmentState - { - Appointment = null, - Loading = true, - Saving = false, - Error = null, - Success = null, - ServiceCategory = "", - ServiceType = "", - ReasonCode = "", - Priority = "routine", - Description = "", - StartDate = "", - StartTime = "", - EndDate = "", - EndTime = "", - PatientReference = "", - PractitionerReference = "", - Comment = "", - Status = "booked", - } - ); - - var state = stateResult.State; - var setState = stateResult.SetState; - - UseEffect( - () => - { - LoadAppointment(appointmentId, setState); - }, - new object[] { appointmentId } - ); - - if (state.Loading) - { - return RenderLoadingState(); - } - - if (state.Error != null && state.Appointment == null) - { - return RenderErrorState(state.Error, onBack); - } - - return Div( - className: "page", - children: new[] - { - RenderHeader(state.Appointment, onBack), - RenderForm(state, setState, onBack), - } - ); - } - - private static async void LoadAppointment( - string appointmentId, - Action setState - ) - { - try - { - var appointment = await ApiClient.GetAppointmentAsync(appointmentId); - var startParts = ParseDateTime(appointment.StartTime); - var endParts = ParseDateTime(appointment.EndTime); - - setState( - new EditAppointmentState - { - Appointment = appointment, - Loading = false, - Saving = false, - Error = null, - Success = null, - ServiceCategory = appointment.ServiceCategory ?? "", - ServiceType = appointment.ServiceType ?? "", - ReasonCode = appointment.ReasonCode ?? "", - Priority = appointment.Priority ?? "routine", - Description = appointment.Description ?? "", - StartDate = startParts.Item1, - StartTime = startParts.Item2, - EndDate = endParts.Item1, - EndTime = endParts.Item2, - PatientReference = appointment.PatientReference ?? "", - PractitionerReference = appointment.PractitionerReference ?? "", - Comment = appointment.Comment ?? "", - Status = appointment.Status ?? "booked", - } - ); - } - catch (Exception ex) - { - setState( - new EditAppointmentState - { - Appointment = null, - Loading = false, - Saving = false, - Error = ex.Message, - Success = null, - ServiceCategory = "", - ServiceType = "", - ReasonCode = "", - Priority = "routine", - Description = "", - StartDate = "", - StartTime = "", - EndDate = "", - EndTime = "", - PatientReference = "", - PractitionerReference = "", - Comment = "", - Status = "booked", - } - ); - } - } - - private static (string, string) ParseDateTime(string isoDateTime) - { - if (string.IsNullOrEmpty(isoDateTime)) - return ("", ""); - - // Parse ISO datetime like "2025-12-20T12:02:00.000Z" - if (isoDateTime.Length >= 16) - { - var datePart = isoDateTime.Substring(0, 10); - var timePart = isoDateTime.Substring(11, 5); - return (datePart, timePart); - } - - return ("", ""); - } - - private static string CombineDateTime(string date, string time) - { - if (string.IsNullOrEmpty(date) || string.IsNullOrEmpty(time)) - return ""; - return date + "T" + time + ":00.000Z"; - } - - private static async void SaveAppointment( - EditAppointmentState state, - Action setState, - Action onBack - ) - { - setState( - new EditAppointmentState - { - Appointment = state.Appointment, - Loading = false, - Saving = true, - Error = null, - Success = null, - ServiceCategory = state.ServiceCategory, - ServiceType = state.ServiceType, - ReasonCode = state.ReasonCode, - Priority = state.Priority, - Description = state.Description, - StartDate = state.StartDate, - StartTime = state.StartTime, - EndDate = state.EndDate, - EndTime = state.EndTime, - PatientReference = state.PatientReference, - PractitionerReference = state.PractitionerReference, - Comment = state.Comment, - Status = state.Status, - } - ); - - try - { - var updateData = new - { - ServiceCategory = state.ServiceCategory, - ServiceType = state.ServiceType, - ReasonCode = string.IsNullOrWhiteSpace(state.ReasonCode) - ? null - : state.ReasonCode, - Priority = state.Priority, - Description = string.IsNullOrWhiteSpace(state.Description) - ? null - : state.Description, - Start = CombineDateTime(state.StartDate, state.StartTime), - End = CombineDateTime(state.EndDate, state.EndTime), - PatientReference = state.PatientReference, - PractitionerReference = state.PractitionerReference, - Comment = string.IsNullOrWhiteSpace(state.Comment) ? null : state.Comment, - Status = state.Status, - }; - - var updatedAppointment = await ApiClient.UpdateAppointmentAsync( - state.Appointment.Id, - updateData - ); - - var startParts = ParseDateTime(updatedAppointment.StartTime); - var endParts = ParseDateTime(updatedAppointment.EndTime); - - setState( - new EditAppointmentState - { - Appointment = updatedAppointment, - Loading = false, - Saving = false, - Error = null, - Success = "Appointment updated successfully!", - ServiceCategory = updatedAppointment.ServiceCategory ?? "", - ServiceType = updatedAppointment.ServiceType ?? "", - ReasonCode = updatedAppointment.ReasonCode ?? "", - Priority = updatedAppointment.Priority ?? "routine", - Description = updatedAppointment.Description ?? "", - StartDate = startParts.Item1, - StartTime = startParts.Item2, - EndDate = endParts.Item1, - EndTime = endParts.Item2, - PatientReference = updatedAppointment.PatientReference ?? "", - PractitionerReference = updatedAppointment.PractitionerReference ?? "", - Comment = updatedAppointment.Comment ?? "", - Status = updatedAppointment.Status ?? "booked", - } - ); - } - catch (Exception ex) - { - setState( - new EditAppointmentState - { - Appointment = state.Appointment, - Loading = false, - Saving = false, - Error = ex.Message, - Success = null, - ServiceCategory = state.ServiceCategory, - ServiceType = state.ServiceType, - ReasonCode = state.ReasonCode, - Priority = state.Priority, - Description = state.Description, - StartDate = state.StartDate, - StartTime = state.StartTime, - EndDate = state.EndDate, - EndTime = state.EndTime, - PatientReference = state.PatientReference, - PractitionerReference = state.PractitionerReference, - Comment = state.Comment, - Status = state.Status, - } - ); - } - } - - private static ReactElement RenderLoadingState() => - Div( - className: "page", - children: new[] - { - Div( - className: "page-header", - children: new[] - { - H( - 2, - className: "page-title", - children: new[] { Text("Edit Appointment") } - ), - P( - className: "page-description", - children: new[] { Text("Loading appointment data...") } - ), - } - ), - Div( - className: "card", - children: new[] - { - Div( - className: "flex items-center justify-center p-8", - children: new[] { Text("Loading...") } - ), - } - ), - } - ); - - private static ReactElement RenderErrorState(string error, Action onBack) => - Div( - className: "page", - children: new[] - { - Div( - className: "page-header flex justify-between items-center", - children: new[] - { - Div( - children: new[] - { - H( - 2, - className: "page-title", - children: new[] { Text("Edit Appointment") } - ), - P( - className: "page-description", - children: new[] { Text("Error loading appointment") } - ), - } - ), - Button( - className: "btn btn-secondary", - onClick: onBack, - children: new[] - { - Icons.ChevronLeft(), - Text("Back to Appointments"), - } - ), - } - ), - Div( - className: "card", - style: new { borderLeft = "4px solid var(--error)" }, - children: new[] - { - Div( - className: "flex items-center gap-3 p-4", - children: new[] - { - Icons.X(), - Text("Error loading appointment: " + error), - } - ), - } - ), - } - ); - - private static ReactElement RenderHeader(Appointment appointment, Action onBack) - { - var title = appointment.ServiceType ?? "Appointment"; - return Div( - className: "page-header flex justify-between items-center", - children: new[] - { - Div( - children: new[] - { - H( - 2, - className: "page-title", - children: new[] { Text("Edit Appointment") } - ), - P( - className: "page-description", - children: new[] { Text("Update details for " + title) } - ), - } - ), - Button( - className: "btn btn-secondary", - onClick: onBack, - children: new[] { Icons.ChevronLeft(), Text("Back to Appointments") } - ), - } - ); - } - - private static ReactElement RenderForm( - EditAppointmentState state, - Action setState, - Action onBack - ) => - Div( - className: "card", - children: new[] - { - state.Error != null - ? Div( - className: "alert alert-error mb-4", - children: new[] { Icons.X(), Text(state.Error) } - ) - : null, - state.Success != null - ? Div( - className: "alert alert-success mb-4", - children: new[] { Text(state.Success) } - ) - : null, - Form( - className: "form", - onSubmit: () => SaveAppointment(state, setState, onBack), - children: new[] - { - RenderFormSection( - "Appointment Details", - new[] - { - RenderInputField( - "Service Category", - "appointment-service-category", - state.ServiceCategory, - "e.g., General Practice", - v => UpdateField(state, setState, "ServiceCategory", v) - ), - RenderInputField( - "Service Type", - "appointment-service-type", - state.ServiceType, - "e.g., Checkup, Follow-up", - v => UpdateField(state, setState, "ServiceType", v) - ), - RenderInputField( - "Reason", - "appointment-reason", - state.ReasonCode, - "Reason for appointment", - v => UpdateField(state, setState, "ReasonCode", v) - ), - RenderSelectField( - "Priority", - "appointment-priority", - state.Priority, - new[] - { - ("routine", "Routine"), - ("urgent", "Urgent"), - ("asap", "ASAP"), - ("stat", "STAT"), - }, - v => UpdateField(state, setState, "Priority", v) - ), - RenderSelectField( - "Status", - "appointment-status", - state.Status, - new[] - { - ("booked", "Booked"), - ("arrived", "Arrived"), - ("fulfilled", "Fulfilled"), - ("cancelled", "Cancelled"), - ("noshow", "No Show"), - }, - v => UpdateField(state, setState, "Status", v) - ), - RenderTextareaField( - "Description", - "appointment-description", - state.Description, - "Additional details", - v => UpdateField(state, setState, "Description", v) - ), - } - ), - RenderFormSection( - "Schedule", - new[] - { - RenderInputField( - "Start Date", - "appointment-start-date", - state.StartDate, - "YYYY-MM-DD", - v => UpdateField(state, setState, "StartDate", v), - "date" - ), - RenderInputField( - "Start Time", - "appointment-start-time", - state.StartTime, - "HH:MM", - v => UpdateField(state, setState, "StartTime", v), - "time" - ), - RenderInputField( - "End Date", - "appointment-end-date", - state.EndDate, - "YYYY-MM-DD", - v => UpdateField(state, setState, "EndDate", v), - "date" - ), - RenderInputField( - "End Time", - "appointment-end-time", - state.EndTime, - "HH:MM", - v => UpdateField(state, setState, "EndTime", v), - "time" - ), - } - ), - RenderFormSection( - "Participants", - new[] - { - RenderInputField( - "Patient Reference", - "appointment-patient", - state.PatientReference, - "Patient/[id]", - v => UpdateField(state, setState, "PatientReference", v) - ), - RenderInputField( - "Practitioner Reference", - "appointment-practitioner", - state.PractitionerReference, - "Practitioner/[id]", - v => - UpdateField(state, setState, "PractitionerReference", v) - ), - } - ), - RenderFormSection( - "Notes", - new[] - { - RenderTextareaField( - "Comment", - "appointment-comment", - state.Comment, - "Any additional comments", - v => UpdateField(state, setState, "Comment", v) - ), - } - ), - RenderFormActions(state, onBack), - } - ), - } - ); - - private static ReactElement RenderFormSection(string title, ReactElement[] fields) => - Div( - className: "form-section mb-6", - children: new[] - { - H(4, className: "form-section-title mb-4", children: new[] { Text(title) }), - Div(className: "grid grid-cols-2 gap-4", children: fields), - } - ); - - private static ReactElement RenderInputField( - string label, - string id, - string value, - string placeholder, - Action onChange, - string type = "text" - ) => - Div( - className: "form-group", - children: new[] - { - Label(htmlFor: id, className: "form-label", children: new[] { Text(label) }), - Input( - className: "input", - type: type, - value: value, - placeholder: placeholder, - onChange: onChange - ), - } - ); - - private static ReactElement RenderTextareaField( - string label, - string id, - string value, - string placeholder, - Action onChange - ) => - Div( - className: "form-group col-span-2", - children: new[] - { - Label(htmlFor: id, className: "form-label", children: new[] { Text(label) }), - TextArea( - className: "input", - value: value, - placeholder: placeholder, - onChange: onChange, - rows: 3 - ), - } - ); - - private static ReactElement RenderSelectField( - string label, - string id, - string value, - (string value, string label)[] options, - Action onChange - ) - { - var optionElements = new ReactElement[options.Length]; - for (var i = 0; i < options.Length; i++) - { - optionElements[i] = Option(options[i].value, options[i].label); - } - - return Div( - className: "form-group", - children: new[] - { - Label(htmlFor: id, className: "form-label", children: new[] { Text(label) }), - Select( - className: "input", - value: value, - onChange: onChange, - children: optionElements - ), - } - ); - } - - private static ReactElement RenderFormActions(EditAppointmentState state, Action onBack) => - Div( - className: "form-actions flex justify-end gap-4 mt-6", - children: new[] - { - Button( - className: "btn btn-secondary", - type: "button", - onClick: onBack, - disabled: state.Saving, - children: new[] { Text("Cancel") } - ), - Button( - className: "btn btn-primary", - type: "submit", - disabled: state.Saving, - children: new[] { Text(state.Saving ? "Saving..." : "Save Changes") } - ), - } - ); - - private static void UpdateField( - EditAppointmentState state, - Action setState, - string field, - string value - ) - { - var newState = new EditAppointmentState - { - Appointment = state.Appointment, - Loading = state.Loading, - Saving = state.Saving, - Error = null, - Success = null, - ServiceCategory = state.ServiceCategory, - ServiceType = state.ServiceType, - ReasonCode = state.ReasonCode, - Priority = state.Priority, - Description = state.Description, - StartDate = state.StartDate, - StartTime = state.StartTime, - EndDate = state.EndDate, - EndTime = state.EndTime, - PatientReference = state.PatientReference, - PractitionerReference = state.PractitionerReference, - Comment = state.Comment, - Status = state.Status, - }; - - if (field == "ServiceCategory") - newState.ServiceCategory = value; - else if (field == "ServiceType") - newState.ServiceType = value; - else if (field == "ReasonCode") - newState.ReasonCode = value; - else if (field == "Priority") - newState.Priority = value; - else if (field == "Description") - newState.Description = value; - else if (field == "StartDate") - newState.StartDate = value; - else if (field == "StartTime") - newState.StartTime = value; - else if (field == "EndDate") - newState.EndDate = value; - else if (field == "EndTime") - newState.EndTime = value; - else if (field == "PatientReference") - newState.PatientReference = value; - else if (field == "PractitionerReference") - newState.PractitionerReference = value; - else if (field == "Comment") - newState.Comment = value; - else if (field == "Status") - newState.Status = value; - - setState(newState); - } - } -} diff --git a/Dashboard/Dashboard.Web/Pages/EditPatientPage.cs b/Dashboard/Dashboard.Web/Pages/EditPatientPage.cs deleted file mode 100644 index 7ffa90b..0000000 --- a/Dashboard/Dashboard.Web/Pages/EditPatientPage.cs +++ /dev/null @@ -1,727 +0,0 @@ -using System; -using Dashboard.Api; -using Dashboard.Components; -using Dashboard.Models; -using Dashboard.React; -using static Dashboard.React.Elements; -using static Dashboard.React.Hooks; - -namespace Dashboard.Pages -{ - /// - /// Edit patient page state class. - /// - public class EditPatientState - { - /// Patient being edited. - public Patient Patient { get; set; } - - /// Whether loading. - public bool Loading { get; set; } - - /// Whether saving. - public bool Saving { get; set; } - - /// Error message if any. - public string Error { get; set; } - - /// Success message if any. - public string Success { get; set; } - - /// Form field: Active status. - public bool Active { get; set; } - - /// Form field: Given name. - public string GivenName { get; set; } - - /// Form field: Family name. - public string FamilyName { get; set; } - - /// Form field: Birth date. - public string BirthDate { get; set; } - - /// Form field: Gender. - public string Gender { get; set; } - - /// Form field: Phone. - public string Phone { get; set; } - - /// Form field: Email. - public string Email { get; set; } - - /// Form field: Address line. - public string AddressLine { get; set; } - - /// Form field: City. - public string City { get; set; } - - /// Form field: State. - public string State { get; set; } - - /// Form field: Postal code. - public string PostalCode { get; set; } - - /// Form field: Country. - public string Country { get; set; } - } - - /// - /// Edit patient page component. - /// - public static class EditPatientPage - { - /// - /// Renders the edit patient page. - /// - public static ReactElement Render(string patientId, Action onBack) - { - var stateResult = UseState( - new EditPatientState - { - Patient = null, - Loading = true, - Saving = false, - Error = null, - Success = null, - Active = true, - GivenName = "", - FamilyName = "", - BirthDate = "", - Gender = "", - Phone = "", - Email = "", - AddressLine = "", - City = "", - State = "", - PostalCode = "", - Country = "", - } - ); - - var state = stateResult.State; - var setState = stateResult.SetState; - - UseEffect( - () => - { - LoadPatient(patientId, setState); - }, - new object[] { patientId } - ); - - if (state.Loading) - { - return RenderLoadingState(); - } - - if (state.Error != null && state.Patient == null) - { - return RenderErrorState(state.Error, onBack); - } - - return Div( - className: "page", - children: new[] - { - RenderHeader(state.Patient, onBack), - RenderForm(state, setState, onBack), - } - ); - } - - private static async void LoadPatient(string patientId, Action setState) - { - try - { - var patient = await ApiClient.GetPatientAsync(patientId); - setState( - new EditPatientState - { - Patient = patient, - Loading = false, - Saving = false, - Error = null, - Success = null, - Active = patient.Active, - GivenName = patient.GivenName ?? "", - FamilyName = patient.FamilyName ?? "", - BirthDate = patient.BirthDate ?? "", - Gender = patient.Gender ?? "", - Phone = patient.Phone ?? "", - Email = patient.Email ?? "", - AddressLine = patient.AddressLine ?? "", - City = patient.City ?? "", - State = patient.State ?? "", - PostalCode = patient.PostalCode ?? "", - Country = patient.Country ?? "", - } - ); - } - catch (Exception ex) - { - setState( - new EditPatientState - { - Patient = null, - Loading = false, - Saving = false, - Error = ex.Message, - Success = null, - Active = true, - GivenName = "", - FamilyName = "", - BirthDate = "", - Gender = "", - Phone = "", - Email = "", - AddressLine = "", - City = "", - State = "", - PostalCode = "", - Country = "", - } - ); - } - } - - private static async void SavePatient( - EditPatientState state, - Action setState, - Action onBack - ) - { - setState( - new EditPatientState - { - Patient = state.Patient, - Loading = false, - Saving = true, - Error = null, - Success = null, - Active = state.Active, - GivenName = state.GivenName, - FamilyName = state.FamilyName, - BirthDate = state.BirthDate, - Gender = state.Gender, - Phone = state.Phone, - Email = state.Email, - AddressLine = state.AddressLine, - City = state.City, - State = state.State, - PostalCode = state.PostalCode, - Country = state.Country, - } - ); - - try - { - var updateData = new Patient - { - Id = state.Patient.Id, - Active = state.Active, - GivenName = state.GivenName, - FamilyName = state.FamilyName, - BirthDate = string.IsNullOrWhiteSpace(state.BirthDate) ? null : state.BirthDate, - Gender = string.IsNullOrWhiteSpace(state.Gender) ? null : state.Gender, - Phone = string.IsNullOrWhiteSpace(state.Phone) ? null : state.Phone, - Email = string.IsNullOrWhiteSpace(state.Email) ? null : state.Email, - AddressLine = string.IsNullOrWhiteSpace(state.AddressLine) - ? null - : state.AddressLine, - City = string.IsNullOrWhiteSpace(state.City) ? null : state.City, - State = string.IsNullOrWhiteSpace(state.State) ? null : state.State, - PostalCode = string.IsNullOrWhiteSpace(state.PostalCode) - ? null - : state.PostalCode, - Country = string.IsNullOrWhiteSpace(state.Country) ? null : state.Country, - }; - - var updatedPatient = await ApiClient.UpdatePatientAsync( - state.Patient.Id, - updateData - ); - - setState( - new EditPatientState - { - Patient = updatedPatient, - Loading = false, - Saving = false, - Error = null, - Success = "Patient updated successfully!", - Active = updatedPatient.Active, - GivenName = updatedPatient.GivenName ?? "", - FamilyName = updatedPatient.FamilyName ?? "", - BirthDate = updatedPatient.BirthDate ?? "", - Gender = updatedPatient.Gender ?? "", - Phone = updatedPatient.Phone ?? "", - Email = updatedPatient.Email ?? "", - AddressLine = updatedPatient.AddressLine ?? "", - City = updatedPatient.City ?? "", - State = updatedPatient.State ?? "", - PostalCode = updatedPatient.PostalCode ?? "", - Country = updatedPatient.Country ?? "", - } - ); - } - catch (Exception ex) - { - setState( - new EditPatientState - { - Patient = state.Patient, - Loading = false, - Saving = false, - Error = ex.Message, - Success = null, - Active = state.Active, - GivenName = state.GivenName, - FamilyName = state.FamilyName, - BirthDate = state.BirthDate, - Gender = state.Gender, - Phone = state.Phone, - Email = state.Email, - AddressLine = state.AddressLine, - City = state.City, - State = state.State, - PostalCode = state.PostalCode, - Country = state.Country, - } - ); - } - } - - private static ReactElement RenderLoadingState() => - Div( - className: "page", - children: new[] - { - Div( - className: "page-header", - children: new[] - { - H(2, className: "page-title", children: new[] { Text("Edit Patient") }), - P( - className: "page-description", - children: new[] { Text("Loading patient data...") } - ), - } - ), - Div( - className: "card", - children: new[] - { - Div( - className: "flex items-center justify-center p-8", - children: new[] { Text("Loading...") } - ), - } - ), - } - ); - - private static ReactElement RenderErrorState(string error, Action onBack) => - Div( - className: "page", - children: new[] - { - Div( - className: "page-header flex justify-between items-center", - children: new[] - { - Div( - children: new[] - { - H( - 2, - className: "page-title", - children: new[] { Text("Edit Patient") } - ), - P( - className: "page-description", - children: new[] { Text("Error loading patient") } - ), - } - ), - Button( - className: "btn btn-secondary", - onClick: onBack, - children: new[] { Icons.ChevronLeft(), Text("Back to Patients") } - ), - } - ), - Div( - className: "card", - style: new { borderLeft = "4px solid var(--error)" }, - children: new[] - { - Div( - className: "flex items-center gap-3 p-4", - children: new[] - { - Icons.X(), - Text("Error loading patient: " + error), - } - ), - } - ), - } - ); - - private static ReactElement RenderHeader(Patient patient, Action onBack) - { - var fullName = patient.GivenName + " " + patient.FamilyName; - return Div( - className: "page-header flex justify-between items-center", - children: new[] - { - Div( - children: new[] - { - H(2, className: "page-title", children: new[] { Text("Edit Patient") }), - P( - className: "page-description", - children: new[] { Text("Update information for " + fullName) } - ), - } - ), - Button( - className: "btn btn-secondary", - onClick: onBack, - children: new[] { Icons.ChevronLeft(), Text("Back to Patients") } - ), - } - ); - } - - private static ReactElement RenderForm( - EditPatientState state, - Action setState, - Action onBack - ) => - Div( - className: "card", - children: new[] - { - state.Error != null - ? Div( - className: "alert alert-error mb-4", - children: new[] { Icons.X(), Text(state.Error) } - ) - : null, - state.Success != null - ? Div( - className: "alert alert-success mb-4", - children: new[] { Text(state.Success) } - ) - : null, - Form( - className: "form", - onSubmit: () => SavePatient(state, setState, onBack), - children: new[] - { - RenderFormSection( - "Personal Information", - new[] - { - RenderInputField( - "Given Name", - "patient-edit-given-name", - state.GivenName, - "Enter first name", - v => UpdateField(state, setState, "GivenName", v) - ), - RenderInputField( - "Family Name", - "patient-edit-family-name", - state.FamilyName, - "Enter last name", - v => UpdateField(state, setState, "FamilyName", v) - ), - RenderInputField( - "Birth Date", - "patient-edit-birth-date", - state.BirthDate, - "YYYY-MM-DD", - v => UpdateField(state, setState, "BirthDate", v), - "date" - ), - RenderSelectField( - "Gender", - "patient-edit-gender", - state.Gender, - new[] - { - ("", "Select gender"), - ("male", "Male"), - ("female", "Female"), - ("other", "Other"), - ("unknown", "Unknown"), - }, - v => UpdateField(state, setState, "Gender", v) - ), - RenderCheckboxField( - "Active", - "patient-edit-active", - state.Active, - v => UpdateActive(state, setState, v) - ), - } - ), - RenderFormSection( - "Contact Information", - new[] - { - RenderInputField( - "Phone", - "patient-edit-phone", - state.Phone, - "Enter phone number", - v => UpdateField(state, setState, "Phone", v), - "tel" - ), - RenderInputField( - "Email", - "patient-edit-email", - state.Email, - "Enter email address", - v => UpdateField(state, setState, "Email", v), - "email" - ), - } - ), - RenderFormSection( - "Address", - new[] - { - RenderInputField( - "Address Line", - "patient-edit-address", - state.AddressLine, - "Enter street address", - v => UpdateField(state, setState, "AddressLine", v) - ), - RenderInputField( - "City", - "patient-edit-city", - state.City, - "Enter city", - v => UpdateField(state, setState, "City", v) - ), - RenderInputField( - "State", - "patient-edit-state", - state.State, - "Enter state/province", - v => UpdateField(state, setState, "State", v) - ), - RenderInputField( - "Postal Code", - "patient-edit-postal-code", - state.PostalCode, - "Enter postal code", - v => UpdateField(state, setState, "PostalCode", v) - ), - RenderInputField( - "Country", - "patient-edit-country", - state.Country, - "Enter country", - v => UpdateField(state, setState, "Country", v) - ), - } - ), - RenderFormActions(state, onBack), - } - ), - } - ); - - private static ReactElement RenderFormSection(string title, ReactElement[] fields) => - Div( - className: "form-section mb-6", - children: new[] - { - H(4, className: "form-section-title mb-4", children: new[] { Text(title) }), - Div(className: "grid grid-cols-2 gap-4", children: fields), - } - ); - - private static ReactElement RenderInputField( - string label, - string id, - string value, - string placeholder, - Action onChange, - string type = "text" - ) => - Div( - className: "form-group", - children: new[] - { - Label(htmlFor: id, className: "form-label", children: new[] { Text(label) }), - Input( - className: "input", - type: type, - value: value, - placeholder: placeholder, - onChange: onChange - ), - } - ); - - private static ReactElement RenderSelectField( - string label, - string id, - string value, - (string value, string label)[] options, - Action onChange - ) - { - var optionElements = new ReactElement[options.Length]; - for (var i = 0; i < options.Length; i++) - { - optionElements[i] = Option(options[i].value, options[i].label); - } - - return Div( - className: "form-group", - children: new[] - { - Label(htmlFor: id, className: "form-label", children: new[] { Text(label) }), - Select( - className: "input", - value: value, - onChange: onChange, - children: optionElements - ), - } - ); - } - - private static ReactElement RenderCheckboxField( - string label, - string id, - bool value, - Action onChange - ) => - Div( - className: "form-group flex items-center gap-2", - children: new[] - { - Div( - className: "flex items-center gap-2", - onClick: () => onChange(!value), - children: new[] - { - Span(className: "status-dot " + (value ? "active" : "inactive")), - Text(label + ": " + (value ? "Active" : "Inactive")), - } - ), - } - ); - - private static ReactElement RenderFormActions(EditPatientState state, Action onBack) => - Div( - className: "form-actions flex justify-end gap-4 mt-6", - children: new[] - { - Button( - className: "btn btn-secondary", - type: "button", - onClick: onBack, - disabled: state.Saving, - children: new[] { Text("Cancel") } - ), - Button( - className: "btn btn-primary", - type: "submit", - disabled: state.Saving, - children: new[] { Text(state.Saving ? "Saving..." : "Save Changes") } - ), - } - ); - - private static void UpdateField( - EditPatientState state, - Action setState, - string field, - string value - ) - { - var newState = new EditPatientState - { - Patient = state.Patient, - Loading = state.Loading, - Saving = state.Saving, - Error = null, - Success = null, - Active = state.Active, - GivenName = state.GivenName, - FamilyName = state.FamilyName, - BirthDate = state.BirthDate, - Gender = state.Gender, - Phone = state.Phone, - Email = state.Email, - AddressLine = state.AddressLine, - City = state.City, - State = state.State, - PostalCode = state.PostalCode, - Country = state.Country, - }; - - if (field == "GivenName") - newState.GivenName = value; - else if (field == "FamilyName") - newState.FamilyName = value; - else if (field == "BirthDate") - newState.BirthDate = value; - else if (field == "Gender") - newState.Gender = value; - else if (field == "Phone") - newState.Phone = value; - else if (field == "Email") - newState.Email = value; - else if (field == "AddressLine") - newState.AddressLine = value; - else if (field == "City") - newState.City = value; - else if (field == "State") - newState.State = value; - else if (field == "PostalCode") - newState.PostalCode = value; - else if (field == "Country") - newState.Country = value; - - setState(newState); - } - - private static void UpdateActive( - EditPatientState state, - Action setState, - bool value - ) => - setState( - new EditPatientState - { - Patient = state.Patient, - Loading = state.Loading, - Saving = state.Saving, - Error = null, - Success = null, - Active = value, - GivenName = state.GivenName, - FamilyName = state.FamilyName, - BirthDate = state.BirthDate, - Gender = state.Gender, - Phone = state.Phone, - Email = state.Email, - AddressLine = state.AddressLine, - City = state.City, - State = state.State, - PostalCode = state.PostalCode, - Country = state.Country, - } - ); - } -} diff --git a/Dashboard/Dashboard.Web/Pages/PatientsPage.cs b/Dashboard/Dashboard.Web/Pages/PatientsPage.cs deleted file mode 100644 index 9ac1731..0000000 --- a/Dashboard/Dashboard.Web/Pages/PatientsPage.cs +++ /dev/null @@ -1,383 +0,0 @@ -using System; -using Dashboard.Api; -using Dashboard.Components; -using Dashboard.Models; -using Dashboard.React; -using static Dashboard.React.Elements; -using static Dashboard.React.Hooks; - -namespace Dashboard.Pages -{ - /// - /// Patients page state class. - /// - public class PatientsState - { - /// List of patients. - public Patient[] Patients { get; set; } - - /// Whether loading. - public bool Loading { get; set; } - - /// Error message if any. - public string Error { get; set; } - - /// Current search query. - public string SearchQuery { get; set; } - - /// Selected patient. - public Patient SelectedPatient { get; set; } - } - - /// - /// Patients list page. - /// - public static class PatientsPage - { - private static Action _onEditPatient; - - /// - /// Renders the patients page. - /// - public static ReactElement Render(Action onEditPatient = null) - { - _onEditPatient = onEditPatient; - var stateResult = UseState( - new PatientsState - { - Patients = new Patient[0], - Loading = true, - Error = null, - SearchQuery = "", - SelectedPatient = null, - } - ); - - var state = stateResult.State; - var setState = stateResult.SetState; - - UseEffect( - () => - { - LoadPatients(setState); - }, - new object[0] - ); - - ReactElement content; - if (state.Loading) - { - content = DataTable.RenderLoading(5, 5); - } - else if (state.Error != null) - { - content = RenderError(state.Error); - } - else if (state.Patients.Length == 0) - { - content = DataTable.RenderEmpty( - "No patients found. Start by adding a new patient." - ); - } - else - { - content = RenderPatientTable(state.Patients, p => SelectPatient(p, setState)); - } - - return Div( - className: "page", - children: new[] - { - // Page header - Div( - className: "page-header flex justify-between items-center", - children: new[] - { - Div( - children: new[] - { - H( - 2, - className: "page-title", - children: new[] { Text("Patients") } - ), - P( - className: "page-description", - children: new[] - { - Text("Manage patient records from the Clinical domain"), - } - ), - } - ), - Button( - className: "btn btn-primary", - children: new[] { Icons.Plus(), Text("Add Patient") } - ), - } - ), - // Search bar - Div( - className: "card mb-6", - children: new[] - { - Div( - className: "flex gap-4", - children: new[] - { - Div( - className: "flex-1 search-input", - children: new[] - { - Span( - className: "search-icon", - children: new[] { Icons.Search() } - ), - Input( - className: "input", - type: "text", - placeholder: "Search patients by name...", - value: state.SearchQuery, - onChange: query => HandleSearch(query, setState) - ), - } - ), - Button( - className: "btn btn-secondary", - onClick: () => LoadPatients(setState), - children: new[] { Icons.Refresh(), Text("Refresh") } - ), - } - ), - } - ), - // Content - content, - } - ); - } - - private static async void LoadPatients(Action setState) - { - try - { - var patients = await ApiClient.GetPatientsAsync(); - setState( - new PatientsState - { - Patients = patients, - Loading = false, - Error = null, - SearchQuery = "", - SelectedPatient = null, - } - ); - } - catch (Exception ex) - { - setState( - new PatientsState - { - Patients = new Patient[0], - Loading = false, - Error = ex.Message, - SearchQuery = "", - SelectedPatient = null, - } - ); - } - } - - private static async void HandleSearch(string query, Action setState) - { - if (string.IsNullOrWhiteSpace(query)) - { - LoadPatients(setState); - return; - } - - try - { - var patients = await ApiClient.SearchPatientsAsync(query); - setState( - new PatientsState - { - Patients = patients, - Loading = false, - Error = null, - SearchQuery = query, - SelectedPatient = null, - } - ); - } - catch (Exception ex) - { - setState( - new PatientsState - { - Patients = new Patient[0], - Loading = false, - Error = ex.Message, - SearchQuery = query, - SelectedPatient = null, - } - ); - } - } - - private static void SelectPatient(Patient patient, Action setState) - { - // TODO: Navigate to patient detail or open modal - } - - private static ReactElement RenderError(string message) => - Div( - className: "card", - style: new { borderLeft = "4px solid var(--error)" }, - children: new[] - { - Div( - className: "flex items-center gap-3 p-4", - children: new[] { Icons.X(), Text("Error loading patients: " + message) } - ), - } - ); - - private static ReactElement RenderPatientTable(Patient[] patients, Action onSelect) - { - var columns = new[] - { - new Column { Key = "name", Header = "Name" }, - new Column { Key = "gender", Header = "Gender" }, - new Column { Key = "birthDate", Header = "Birth Date" }, - new Column { Key = "contact", Header = "Contact" }, - new Column { Key = "status", Header = "Status" }, - new Column - { - Key = "actions", - Header = "Actions", - ClassName = "text-right", - }, - }; - - return DataTable.Render( - columns: columns, - data: patients, - getKey: p => p.Id, - renderCell: (patient, key) => RenderCell(patient, key, onSelect), - onRowClick: onSelect - ); - } - - private static ReactElement RenderCell( - Patient patient, - string key, - Action onSelect - ) - { - if (key == "name") - return RenderPatientName(patient); - if (key == "gender") - return RenderGender(patient.Gender); - if (key == "birthDate") - return Text(patient.BirthDate ?? "N/A"); - if (key == "contact") - return RenderContact(patient); - if (key == "status") - return RenderStatus(patient.Active); - if (key == "actions") - return RenderActions(patient, onSelect); - return Text(""); - } - - private static ReactElement RenderPatientName(Patient patient) - { - var idPrefix = patient.Id.Length > 8 ? patient.Id.Substring(0, 8) : patient.Id; - return Div( - className: "flex items-center gap-3", - children: new[] - { - Div( - className: "avatar avatar-sm", - children: new[] { Text(GetInitials(patient)) } - ), - Div( - children: new[] - { - Div( - className: "font-medium", - children: new[] - { - Text(patient.GivenName + " " + patient.FamilyName), - } - ), - Div( - className: "text-sm text-gray-500", - children: new[] { Text("ID: " + idPrefix + "...") } - ), - } - ), - } - ); - } - - private static ReactElement RenderGender(string gender) => - Span( - className: "badge " + GenderBadgeClass(gender), - children: new[] { Text(gender ?? "Unknown") } - ); - - private static string GenderBadgeClass(string gender) - { - if (gender == "male") - return "badge-primary"; - if (gender == "female") - return "badge-teal"; - return "badge-gray"; - } - - private static ReactElement RenderContact(Patient patient) - { - var contact = patient.Email ?? patient.Phone ?? "No contact"; - return Text(contact); - } - - private static ReactElement RenderStatus(bool active) => - Div( - className: "flex items-center gap-2", - children: new[] - { - Span(className: "status-dot " + (active ? "active" : "inactive")), - Text(active ? "Active" : "Inactive"), - } - ); - - private static ReactElement RenderActions(Patient patient, Action onSelect) => - Div( - className: "table-action", - children: new[] - { - Button( - className: "btn btn-ghost btn-sm", - onClick: () => onSelect(patient), - children: new[] { Icons.Eye() } - ), - Button( - className: "btn btn-ghost btn-sm", - onClick: () => _onEditPatient?.Invoke(patient.Id), - children: new[] { Icons.Edit() } - ), - } - ); - - private static string GetInitials(Patient patient) => - FirstChar(patient.GivenName) + FirstChar(patient.FamilyName); - - private static string FirstChar(string s) - { - if (string.IsNullOrEmpty(s)) - return ""; - return s.Substring(0, 1).ToUpper(); - } - } -} diff --git a/Dashboard/Dashboard.Web/Pages/PractitionersPage.cs b/Dashboard/Dashboard.Web/Pages/PractitionersPage.cs deleted file mode 100644 index de1e92d..0000000 --- a/Dashboard/Dashboard.Web/Pages/PractitionersPage.cs +++ /dev/null @@ -1,432 +0,0 @@ -using System; -using System.Linq; -using Dashboard.Api; -using Dashboard.Components; -using Dashboard.Models; -using Dashboard.React; -using static Dashboard.React.Elements; -using static Dashboard.React.Hooks; - -namespace Dashboard.Pages -{ - /// - /// Practitioners page state class. - /// - public class PractitionersState - { - /// List of practitioners. - public Practitioner[] Practitioners { get; set; } - - /// Whether loading. - public bool Loading { get; set; } - - /// Error message if any. - public string Error { get; set; } - - /// Current specialty filter. - public string SpecialtyFilter { get; set; } - } - - /// - /// Practitioners list page. - /// - public static class PractitionersPage - { - /// - /// Renders the practitioners page. - /// - public static ReactElement Render() - { - var stateResult = UseState( - new PractitionersState - { - Practitioners = new Practitioner[0], - Loading = true, - Error = null, - SpecialtyFilter = null, - } - ); - - var state = stateResult.State; - var setState = stateResult.SetState; - - UseEffect( - () => - { - LoadPractitioners(setState); - }, - new object[0] - ); - - ReactElement content; - if (state.Loading) - { - content = RenderLoadingGrid(); - } - else if (state.Error != null) - { - content = RenderError(state.Error); - } - else if (state.Practitioners.Length == 0) - { - content = RenderEmpty(); - } - else - { - content = RenderPractitionerGrid(state.Practitioners); - } - - return Div( - className: "page", - children: new[] - { - // Page header - Div( - className: "page-header flex justify-between items-center", - children: new[] - { - Div( - children: new[] - { - H( - 2, - className: "page-title", - children: new[] { Text("Practitioners") } - ), - P( - className: "page-description", - children: new[] - { - Text( - "Manage healthcare providers from the Scheduling domain" - ), - } - ), - } - ), - Button( - className: "btn btn-primary", - children: new[] { Icons.Plus(), Text("Add Practitioner") } - ), - } - ), - // Filters - Div( - className: "card mb-6", - children: new[] - { - Div( - className: "flex gap-4", - children: new[] - { - Div( - className: "input-group", - children: new[] - { - Label( - className: "input-label", - children: new[] { Text("Filter by Specialty") } - ), - Select( - className: "input", - value: state.SpecialtyFilter ?? "", - onChange: specialty => - FilterBySpecialty(specialty, setState), - children: new[] - { - Option("", "All Specialties"), - Option("Cardiology", "Cardiology"), - Option("Dermatology", "Dermatology"), - Option("Family Medicine", "Family Medicine"), - Option( - "Internal Medicine", - "Internal Medicine" - ), - Option("Neurology", "Neurology"), - Option("Oncology", "Oncology"), - Option("Pediatrics", "Pediatrics"), - Option("Psychiatry", "Psychiatry"), - Option("Surgery", "Surgery"), - } - ), - } - ), - Div(className: "flex-1"), - Button( - className: "btn btn-secondary", - onClick: () => LoadPractitioners(setState), - children: new[] { Icons.Refresh(), Text("Refresh") } - ), - } - ), - } - ), - // Content - content, - } - ); - } - - private static async void LoadPractitioners(Action setState) - { - try - { - var practitioners = await ApiClient.GetPractitionersAsync(); - setState( - new PractitionersState - { - Practitioners = practitioners, - Loading = false, - Error = null, - SpecialtyFilter = null, - } - ); - } - catch (Exception ex) - { - setState( - new PractitionersState - { - Practitioners = new Practitioner[0], - Loading = false, - Error = ex.Message, - SpecialtyFilter = null, - } - ); - } - } - - private static async void FilterBySpecialty( - string specialty, - Action setState - ) - { - if (string.IsNullOrEmpty(specialty)) - { - LoadPractitioners(setState); - return; - } - - try - { - var practitioners = await ApiClient.SearchPractitionersAsync(specialty); - setState( - new PractitionersState - { - Practitioners = practitioners, - Loading = false, - Error = null, - SpecialtyFilter = specialty, - } - ); - } - catch (Exception ex) - { - setState( - new PractitionersState - { - Practitioners = new Practitioner[0], - Loading = false, - Error = ex.Message, - SpecialtyFilter = specialty, - } - ); - } - } - - private static ReactElement RenderError(string message) => - Div( - className: "card", - style: new { borderLeft = "4px solid var(--error)" }, - children: new[] - { - Div( - className: "flex items-center gap-3 p-4", - children: new[] - { - Icons.X(), - Text("Error loading practitioners: " + message), - } - ), - } - ); - - private static ReactElement RenderEmpty() => - Div( - className: "card", - children: new[] - { - Div( - className: "empty-state", - children: new[] - { - Icons.UserDoctor(), - H( - 4, - className: "empty-state-title", - children: new[] { Text("No Practitioners") } - ), - P( - className: "empty-state-description", - children: new[] - { - Text( - "No practitioners found. Add a new practitioner to get started." - ), - } - ), - Button( - className: "btn btn-primary mt-4", - children: new[] { Icons.Plus(), Text("Add Practitioner") } - ), - } - ), - } - ); - - private static ReactElement RenderLoadingGrid() => - Div( - className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", - children: Enumerable - .Range(0, 6) - .Select(i => - Div( - className: "card", - children: new[] - { - Div( - className: "skeleton", - style: new - { - width = "80px", - height = "80px", - borderRadius = "50%", - } - ), - Div( - className: "skeleton mt-4", - style: new { width = "60%", height = "20px" } - ), - Div( - className: "skeleton mt-2", - style: new { width = "40%", height = "16px" } - ), - Div( - className: "skeleton mt-4", - style: new { width = "100%", height = "16px" } - ), - } - ) - ) - .ToArray() - ); - - private static ReactElement RenderPractitionerGrid(Practitioner[] practitioners) => - Div( - className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", - children: practitioners.Select(RenderPractitionerCard).ToArray() - ); - - private static ReactElement RenderPractitionerCard(Practitioner practitioner) => - Div( - className: "card", - children: new[] - { - // Header - Div( - className: "flex items-start gap-4", - children: new[] - { - Div( - className: "avatar avatar-xl", - children: new[] { Text(GetInitials(practitioner)) } - ), - Div( - className: "flex-1", - children: new[] - { - H( - 4, - className: "font-semibold", - children: new[] - { - Text( - "Dr. " - + practitioner.NameGiven - + " " - + practitioner.NameFamily - ), - } - ), - Span( - className: "badge badge-teal mt-1", - children: new[] - { - Text(practitioner.Specialty ?? "General"), - } - ), - Div( - className: "flex items-center gap-2 mt-2", - children: new[] - { - Span( - className: "status-dot " - + (practitioner.Active ? "active" : "inactive") - ), - Text(practitioner.Active ? "Available" : "Unavailable"), - } - ), - } - ), - } - ), - // Details - Div( - className: "mt-4 pt-4 border-t border-gray-200", - children: new[] - { - RenderDetail("ID", practitioner.Identifier), - RenderDetail("Qualification", practitioner.Qualification ?? "N/A"), - RenderDetail("Email", practitioner.TelecomEmail ?? "N/A"), - RenderDetail("Phone", practitioner.TelecomPhone ?? "N/A"), - } - ), - // Actions - Div( - className: "flex gap-2 mt-4", - children: new[] - { - Button( - className: "btn btn-primary btn-sm flex-1", - children: new[] { Icons.Calendar(), Text("View Schedule") } - ), - Button( - className: "btn btn-secondary btn-sm", - children: new[] { Icons.Edit() } - ), - } - ), - } - ); - - private static ReactElement RenderDetail(string label, string value) => - Div( - className: "flex justify-between py-1", - children: new[] - { - Span(className: "text-sm text-gray-500", children: new[] { Text(label) }), - Span(className: "text-sm font-medium", children: new[] { Text(value) }), - } - ); - - private static string GetInitials(Practitioner p) => - FirstChar(p.NameGiven) + FirstChar(p.NameFamily); - - private static string FirstChar(string s) - { - if (string.IsNullOrEmpty(s)) - return ""; - return s.Substring(0, 1).ToUpper(); - } - } -} diff --git a/Dashboard/Dashboard.Web/Program.cs b/Dashboard/Dashboard.Web/Program.cs deleted file mode 100644 index 933be85..0000000 --- a/Dashboard/Dashboard.Web/Program.cs +++ /dev/null @@ -1,80 +0,0 @@ -using Dashboard.Api; -using Dashboard.React; -using H5; - -namespace Dashboard -{ - /// - /// Application entry point. - /// - public static class Program - { - /// - /// Main entry point - called when H5 script loads. - /// - public static void Main() - { - // Configure API endpoints - // Default to local development URLs - var clinicalUrl = GetConfigValue("CLINICAL_API_URL", "http://localhost:5080"); - var schedulingUrl = GetConfigValue("SCHEDULING_API_URL", "http://localhost:5001"); - - ApiClient.Configure(clinicalUrl, schedulingUrl); - - // Configure ICD-10 API endpoint - var icd10Url = GetConfigValue("ICD10_API_URL", "http://localhost:5090"); - ApiClient.ConfigureIcd10(icd10Url); - - // Set authentication token - single token with both clinician and scheduler roles - // Token is inlined to avoid H5 static initialization timing issues - // All-zeros signing key, expires 2035 - var authToken = GetConfigValue( - "AUTH_TOKEN", - "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkYXNoYm9hcmQtdXNlciIsImp0aSI6IjE1MTMwYTg0LTY4NTktNGNmMy05MjA3LTMyMGJhYWRiNzhjNSIsInJvbGVzIjpbImNsaW5pY2lhbiIsInNjaGVkdWxlciJdLCJleHAiOjIwODE5MjIxMDQsImlhdCI6MTc2NjM4OTMwNH0.mk66XyKaLWukzZOmGNwss74lSlXobt6Em0NoEbXRdKU" - ); - ApiClient.SetTokens(authToken, authToken); - - // Log startup - Log("Healthcare Dashboard starting..."); - Log("Clinical API: " + clinicalUrl); - Log("Scheduling API: " + schedulingUrl); - Log("ICD-10 API: " + icd10Url); - - // Hide loading screen - HideLoadingScreen(); - - // Render the React application - ReactInterop.RenderApp(App.Render()); - - Log("Dashboard initialized successfully!"); - } - - private static string GetConfigValue(string key, string defaultValue) - { - // Try to get from window config object if available - var windowConfig = Script.Get("window", "dashboardConfig"); - if (windowConfig != null) - { - var value = Script.Get(windowConfig, key); - if (!string.IsNullOrEmpty(value)) - { - return value; - } - } - - return defaultValue; - } - - private static void HideLoadingScreen() - { - var loadingScreen = Script.Call("document.getElementById", "loading-screen"); - if (loadingScreen != null) - { - Script.Write("loadingScreen.classList.add('hidden')"); - } - } - - private static void Log(string message) => - Script.Call("console.log", "[Dashboard] " + message); - } -} diff --git a/Dashboard/Dashboard.Web/React/Elements.cs b/Dashboard/Dashboard.Web/React/Elements.cs deleted file mode 100644 index 8db4a49..0000000 --- a/Dashboard/Dashboard.Web/React/Elements.cs +++ /dev/null @@ -1,461 +0,0 @@ -using System; -using H5; - -namespace Dashboard.React -{ - /// - /// HTML element factory methods for React. - /// - public static class Elements - { - /// - /// Creates a div element. - /// - public static ReactElement Div( - string className = null, - string id = null, - object style = null, - Action onClick = null, - params ReactElement[] children - ) => CreateElement("div", className, id, style, onClick, children); - - /// - /// Creates a span element. - /// - public static ReactElement Span( - string className = null, - string id = null, - object style = null, - params ReactElement[] children - ) => CreateElement("span", className, id, style, null, children); - - /// - /// Creates a paragraph element. - /// - public static ReactElement P( - string className = null, - object style = null, - params ReactElement[] children - ) => CreateElement("p", className, null, style, null, children); - - /// - /// Creates a heading element (h1-h6). - /// - public static ReactElement H( - int level, - string className = null, - params ReactElement[] children - ) => CreateElement("h" + level, className, null, null, null, children); - - /// - /// Creates a button element. - /// - public static ReactElement Button( - string className = null, - Action onClick = null, - bool disabled = false, - string type = "button", - params ReactElement[] children - ) - { - Action clickHandler = null; - if (onClick != null) - { - clickHandler = e => - { - Script.Write("e.stopPropagation()"); - onClick(); - }; - } - var props = new - { - className = className, - onClick = clickHandler, - disabled = disabled, - type = type, - }; - return Script.Call("React.createElement", "button", props, children); - } - - /// - /// Creates an input element. - /// - public static ReactElement Input( - string className = null, - string type = "text", - string value = null, - string placeholder = null, - Action onChange = null, - Action onKeyDown = null, - bool disabled = false - ) - { - Action changeHandler = null; - if (onChange != null) - { - changeHandler = e => - onChange(Script.Get(Script.Get(e, "target"), "value")); - } - Action keyDownHandler = null; - if (onKeyDown != null) - { - keyDownHandler = e => onKeyDown(Script.Get(e, "key")); - } - var props = new - { - className = className, - type = type, - value = value, - placeholder = placeholder, - onChange = changeHandler, - onKeyDown = keyDownHandler, - disabled = disabled, - }; - return Script.Call("React.createElement", "input", props); - } - - /// - /// Creates a text node. - /// - public static ReactElement Text(string content) => - Script.Call("React.createElement", "span", null, content); - - /// - /// Creates an image element. - /// - public static ReactElement Img( - string src, - string alt = null, - string className = null, - object style = null - ) - { - var props = new - { - src = src, - alt = alt, - className = className, - style = style, - }; - return Script.Call("React.createElement", "img", props); - } - - /// - /// Creates a link element. - /// - public static ReactElement A( - string href, - string className = null, - string target = null, - Action onClick = null, - params ReactElement[] children - ) - { - Action clickHandler = null; - if (onClick != null) - { - clickHandler = e => - { - Script.Write("e.preventDefault()"); - onClick(); - }; - } - var props = new - { - href = href, - className = className, - target = target, - onClick = clickHandler, - }; - return Script.Call("React.createElement", "a", props, children); - } - - /// - /// Creates a nav element. - /// - public static ReactElement Nav(string className = null, params ReactElement[] children) => - CreateElement("nav", className, null, null, null, children); - - /// - /// Creates a header element. - /// - public static ReactElement Header( - string className = null, - params ReactElement[] children - ) => CreateElement("header", className, null, null, null, children); - - /// - /// Creates a main element. - /// - public static ReactElement Main(string className = null, params ReactElement[] children) => - CreateElement("main", className, null, null, null, children); - - /// - /// Creates an aside element. - /// - public static ReactElement Aside(string className = null, params ReactElement[] children) => - CreateElement("aside", className, null, null, null, children); - - /// - /// Creates a section element. - /// - public static ReactElement Section( - string className = null, - params ReactElement[] children - ) => CreateElement("section", className, null, null, null, children); - - /// - /// Creates an article element. - /// - public static ReactElement Article( - string className = null, - params ReactElement[] children - ) => CreateElement("article", className, null, null, null, children); - - /// - /// Creates a footer element. - /// - public static ReactElement Footer( - string className = null, - params ReactElement[] children - ) => CreateElement("footer", className, null, null, null, children); - - /// - /// Creates a table element. - /// - public static ReactElement Table(string className = null, params ReactElement[] children) => - CreateElement("table", className, null, null, null, children); - - /// - /// Creates a thead element. - /// - public static ReactElement THead(params ReactElement[] children) => - Script.Call("React.createElement", "thead", null, children); - - /// - /// Creates a tbody element. - /// - public static ReactElement TBody(params ReactElement[] children) => - Script.Call("React.createElement", "tbody", null, children); - - /// - /// Creates a tr element. - /// - public static ReactElement Tr( - string className = null, - Action onClick = null, - params ReactElement[] children - ) - { - Action clickHandler = null; - if (onClick != null) - { - clickHandler = _ => onClick(); - } - var props = new { className = className, onClick = clickHandler }; - return Script.Call("React.createElement", "tr", props, children); - } - - /// - /// Creates a th element. - /// - public static ReactElement Th(string className = null, params ReactElement[] children) => - CreateElement("th", className, null, null, null, children); - - /// - /// Creates a td element. - /// - public static ReactElement Td(string className = null, params ReactElement[] children) => - CreateElement("td", className, null, null, null, children); - - /// - /// Creates an unordered list element. - /// - public static ReactElement Ul(string className = null, params ReactElement[] children) => - CreateElement("ul", className, null, null, null, children); - - /// - /// Creates a list item element. - /// - public static ReactElement Li( - string className = null, - Action onClick = null, - params ReactElement[] children - ) => CreateElement("li", className, null, null, onClick, children); - - /// - /// Creates a form element. - /// - public static ReactElement Form( - string className = null, - Action onSubmit = null, - params ReactElement[] children - ) - { - Action submitHandler = null; - if (onSubmit != null) - { - submitHandler = e => - { - Script.Write("e.preventDefault()"); - onSubmit(); - }; - } - var props = new { className = className, onSubmit = submitHandler }; - return Script.Call("React.createElement", "form", props, children); - } - - /// - /// Creates a label element. - /// - public static ReactElement Label( - string htmlFor = null, - string className = null, - params ReactElement[] children - ) - { - var props = new { htmlFor = htmlFor, className = className }; - return Script.Call("React.createElement", "label", props, children); - } - - /// - /// Creates a select element. - /// - public static ReactElement Select( - string className = null, - string value = null, - Action onChange = null, - params ReactElement[] children - ) - { - Action changeHandler = null; - if (onChange != null) - { - changeHandler = e => - onChange(Script.Get(Script.Get(e, "target"), "value")); - } - var props = new - { - className = className, - value = value, - onChange = changeHandler, - }; - return Script.Call("React.createElement", "select", props, children); - } - - /// - /// Creates an option element. - /// - public static ReactElement Option(string value, string label) - { - var props = new { value = value }; - return Script.Call("React.createElement", "option", props, label); - } - - /// - /// Creates a textarea element. - /// - public static ReactElement TextArea( - string className = null, - string value = null, - string placeholder = null, - int rows = 0, - Action onChange = null - ) - { - Action changeHandler = null; - if (onChange != null) - { - changeHandler = e => - onChange(Script.Get(Script.Get(e, "target"), "value")); - } - var props = new - { - className = className, - value = value, - placeholder = placeholder, - rows = rows > 0 ? (object)rows : null, - onChange = changeHandler, - }; - return Script.Call("React.createElement", "textarea", props); - } - - /// - /// Creates an SVG element. - /// - public static ReactElement Svg( - string className = null, - int width = 0, - int height = 0, - string viewBox = null, - string fill = null, - params ReactElement[] children - ) - { - var props = new - { - className = className, - width = width > 0 ? (object)width : null, - height = height > 0 ? (object)height : null, - viewBox = viewBox, - fill = fill, - }; - return Script.Call("React.createElement", "svg", props, children); - } - - /// - /// Creates a path element for SVG. - /// - public static ReactElement Path( - string d, - string fill = null, - string stroke = null, - int strokeWidth = 0 - ) - { - var props = new - { - d = d, - fill = fill, - stroke = stroke, - strokeWidth = strokeWidth > 0 ? (object)strokeWidth : null, - }; - return Script.Call("React.createElement", "path", props); - } - - /// - /// Creates a React Fragment. - /// - public static ReactElement Fragment(params ReactElement[] children) => - Script.Call( - "React.createElement", - Script.Get("React", "Fragment"), - null, - children - ); - - private static ReactElement CreateElement( - string tag, - string className, - string id, - object style, - Action onClick, - ReactElement[] children - ) - { - Action clickHandler = null; - if (onClick != null) - { - clickHandler = _ => onClick(); - } - var props = new - { - className = className, - id = id, - style = style, - onClick = clickHandler, - }; - return Script.Call("React.createElement", tag, props, children); - } - } -} diff --git a/Dashboard/Dashboard.Web/React/Hooks.cs b/Dashboard/Dashboard.Web/React/Hooks.cs deleted file mode 100644 index 1945d9c..0000000 --- a/Dashboard/Dashboard.Web/React/Hooks.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using H5; - -namespace Dashboard.React -{ - /// - /// State tuple for useState hook. - /// - public class StateResult - { - /// Current state value. - public T State { get; set; } - - /// State setter function. - public Action SetState { get; set; } - } - - /// - /// State tuple for useState hook with functional update. - /// - public class StateFuncResult - { - /// Current state value. - public T State { get; set; } - - /// State setter function. - public Action> SetState { get; set; } - } - - /// - /// React hooks wrapper for H5. - /// - public static class Hooks - { - /// - /// React useState hook - manages component state. - /// - public static StateResult UseState(T initialValue) - { - var result = Script.Call("React.useState", initialValue); - var state = (T)result[0]; - var setState = (Action)result[1]; - return new StateResult { State = state, SetState = setState }; - } - - /// - /// React useState hook with functional update. - /// - public static StateFuncResult UseStateFunc(T initialValue) - { - var result = Script.Call("React.useState", initialValue); - var state = (T)result[0]; - var setState = (Action>)result[1]; - return new StateFuncResult { State = state, SetState = setState }; - } - - /// - /// React useEffect hook - manages side effects. - /// - public static void UseEffect(Action effect, object[] deps = null) => - Script.Call( - "React.useEffect", - (Func)( - () => - { - effect(); - return null; - } - ), - deps - ); - - /// - /// React useEffect hook with cleanup function. - /// - public static void UseEffect(Action effect, Func cleanup, object[] deps = null) => - Script.Call( - "React.useEffect", - (Func)( - () => - { - effect(); - return cleanup(); - } - ), - deps - ); - - /// - /// React useRef hook - creates a mutable ref object. - /// - public static RefObject UseRef(T initialValue = default(T)) => - Script.Call>("React.useRef", initialValue); - - /// - /// React useMemo hook - memoizes expensive computations. - /// - public static T UseMemo(Func factory, object[] deps) => - Script.Call("React.useMemo", factory, deps); - - /// - /// React useCallback hook - memoizes callback functions. - /// Note: In C# 7.2, we cannot use Delegate constraint, so callback must be cast appropriately. - /// - public static T UseCallback(T callback, object[] deps) => - Script.Call("React.useCallback", callback, deps); - - /// - /// React useContext hook - consumes a React context. - /// - public static T UseContext(object context) => - Script.Call("React.useContext", context); - } -} diff --git a/Dashboard/Dashboard.Web/React/ReactInterop.cs b/Dashboard/Dashboard.Web/React/ReactInterop.cs deleted file mode 100644 index bca6c9f..0000000 --- a/Dashboard/Dashboard.Web/React/ReactInterop.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using H5; -using static H5.Core.dom; - -namespace Dashboard.React -{ - /// - /// Core React interop types and functions for H5. - /// - public static class ReactInterop - { - /// - /// Creates a React element using React.createElement. - /// - public static ReactElement CreateElement( - string type, - object props = null, - params object[] children - ) => Script.Call("React.createElement", type, props, children); - - /// - /// Creates a React element from a component function. - /// - public static ReactElement CreateElement( - Func component, - object props = null, - params object[] children - ) => Script.Call("React.createElement", component, props, children); - - /// - /// Creates the React root and renders the application. - /// - public static void RenderApp(ReactElement element, string containerId = "root") - { - var container = document.getElementById(containerId); - var root = Script.Call("ReactDOM.createRoot", container); - root.Render(element); - } - } - - /// - /// React element type - represents a virtual DOM node. - /// - [External] - [Name("Object")] - public class ReactElement { } - - /// - /// React root for concurrent rendering. - /// - [External] - public class Root - { - /// - /// Renders a React element into the root. - /// - public extern void Render(ReactElement element); - } - - /// - /// React ref object for accessing DOM elements. - /// - [External] - [Name("Object")] - public class RefObject - { - /// - /// Current value of the ref. - /// - public extern T Current { get; set; } - } -} diff --git a/Dashboard/Dashboard.Web/h5.json b/Dashboard/Dashboard.Web/h5.json deleted file mode 100644 index db17807..0000000 --- a/Dashboard/Dashboard.Web/h5.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "output": "wwwroot/js", - "fileName": "Dashboard", - "generateSourceMap": true, - "combineScripts": true, - "fileNameCasing": "CamelCase", - "html": { - "disabled": true - } -} diff --git a/Dashboard/Dashboard.Web/wwwroot/css/base.css b/Dashboard/Dashboard.Web/wwwroot/css/base.css deleted file mode 100644 index dd0ecd4..0000000 --- a/Dashboard/Dashboard.Web/wwwroot/css/base.css +++ /dev/null @@ -1,636 +0,0 @@ -/* Medical Dashboard - Premium Base Styles */ -/* Inspired by Wellmetrix & CareIQ Designs */ - -*, *::before, *::after { - box-sizing: border-box; - margin: 0; - padding: 0; -} - -html { - font-size: 16px; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - text-rendering: optimizeLegibility; - scroll-behavior: smooth; -} - -body { - font-family: var(--font-family); - font-size: var(--font-size-base); - line-height: var(--line-height-normal); - color: var(--gray-900); - background: var(--gray-50); - background-image: var(--gradient-mesh); - background-attachment: fixed; - min-height: 100vh; - overflow-x: hidden; -} - -/* Premium Background with Animated Mesh */ -body::before { - content: ''; - position: fixed; - top: 0; - left: 0; - right: 0; - bottom: 0; - background: - radial-gradient(ellipse 80% 50% at 20% -20%, rgba(59, 130, 246, 0.12), transparent), - radial-gradient(ellipse 60% 40% at 80% 10%, rgba(20, 184, 166, 0.1), transparent), - radial-gradient(ellipse 50% 50% at 10% 90%, rgba(139, 92, 246, 0.08), transparent); - pointer-events: none; - z-index: -1; -} - -/* Typography */ -h1, h2, h3, h4, h5, h6 { - font-weight: var(--font-weight-semibold); - line-height: var(--line-height-tight); - color: var(--gray-900); - letter-spacing: var(--letter-spacing-tight); -} - -h1 { - font-size: var(--font-size-4xl); - font-weight: var(--font-weight-bold); - letter-spacing: var(--letter-spacing-tighter); -} - -h2 { - font-size: var(--font-size-3xl); - font-weight: var(--font-weight-bold); -} - -h3 { - font-size: var(--font-size-2xl); -} - -h4 { - font-size: var(--font-size-xl); -} - -h5 { - font-size: var(--font-size-lg); -} - -h6 { - font-size: var(--font-size-md); - font-weight: var(--font-weight-medium); -} - -p { - margin-bottom: var(--space-4); - color: var(--gray-600); -} - -a { - color: var(--primary-blue); - text-decoration: none; - transition: color var(--transition-fast); -} - -a:hover { - color: var(--primary-blue-dark); -} - -strong, b { - font-weight: var(--font-weight-semibold); -} - -small { - font-size: var(--font-size-sm); -} - -/* Focus states for accessibility */ -:focus-visible { - outline: 2px solid var(--primary-blue); - outline-offset: 2px; - border-radius: var(--radius-sm); -} - -/* Selection */ -::selection { - background: var(--primary-blue-light); - color: var(--white); -} - -/* Scrollbar styling - Refined */ -::-webkit-scrollbar { - width: 10px; - height: 10px; -} - -::-webkit-scrollbar-track { - background: transparent; -} - -::-webkit-scrollbar-thumb { - background: var(--gray-300); - border-radius: var(--radius-full); - border: 2px solid transparent; - background-clip: content-box; -} - -::-webkit-scrollbar-thumb:hover { - background: var(--gray-400); - border: 2px solid transparent; - background-clip: content-box; -} - -/* Firefox scrollbar */ -* { - scrollbar-width: thin; - scrollbar-color: var(--gray-300) transparent; -} - -/* Utility: screen reader only */ -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border: 0; -} - -/* Utility: truncate text */ -.truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.line-clamp-2 { - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - overflow: hidden; -} - -.line-clamp-3 { - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; -} - -/* Utility: flex layouts */ -.flex { display: flex; } -.inline-flex { display: inline-flex; } -.flex-col { flex-direction: column; } -.flex-row { flex-direction: row; } -.flex-row-reverse { flex-direction: row-reverse; } -.items-center { align-items: center; } -.items-start { align-items: flex-start; } -.items-end { align-items: flex-end; } -.items-stretch { align-items: stretch; } -.justify-center { justify-content: center; } -.justify-between { justify-content: space-between; } -.justify-end { justify-content: flex-end; } -.justify-start { justify-content: flex-start; } -.gap-0 { gap: 0; } -.gap-1 { gap: var(--space-1); } -.gap-2 { gap: var(--space-2); } -.gap-3 { gap: var(--space-3); } -.gap-4 { gap: var(--space-4); } -.gap-5 { gap: var(--space-5); } -.gap-6 { gap: var(--space-6); } -.gap-8 { gap: var(--space-8); } -.gap-10 { gap: var(--space-10); } -.flex-1 { flex: 1; } -.flex-auto { flex: auto; } -.flex-none { flex: none; } -.flex-wrap { flex-wrap: wrap; } -.flex-nowrap { flex-wrap: nowrap; } -.flex-shrink-0 { flex-shrink: 0; } -.flex-grow { flex-grow: 1; } - -/* Utility: grid layouts */ -.grid { display: grid; } -.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } -.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } -.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } -.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } -.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } -.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } -.col-span-2 { grid-column: span 2 / span 2; } -.col-span-3 { grid-column: span 3 / span 3; } -.col-span-full { grid-column: 1 / -1; } - -@media (min-width: 640px) { - .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } -} - -@media (min-width: 768px) { - .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } - .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } - .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } -} - -@media (min-width: 1024px) { - .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } - .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } - .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } - .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } -} - -@media (min-width: 1280px) { - .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } - .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } - .xl\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } -} - -/* Utility: spacing */ -.p-0 { padding: 0; } -.p-1 { padding: var(--space-1); } -.p-2 { padding: var(--space-2); } -.p-3 { padding: var(--space-3); } -.p-4 { padding: var(--space-4); } -.p-5 { padding: var(--space-5); } -.p-6 { padding: var(--space-6); } -.p-8 { padding: var(--space-8); } -.p-10 { padding: var(--space-10); } - -.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); } -.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); } -.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); } -.px-5 { padding-left: var(--space-5); padding-right: var(--space-5); } -.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); } -.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); } - -.py-1 { padding-top: var(--space-1); padding-bottom: var(--space-1); } -.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); } -.py-3 { padding-top: var(--space-3); padding-bottom: var(--space-3); } -.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); } -.py-5 { padding-top: var(--space-5); padding-bottom: var(--space-5); } -.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); } - -.m-0 { margin: 0; } -.m-auto { margin: auto; } -.mx-auto { margin-left: auto; margin-right: auto; } - -.mb-0 { margin-bottom: 0; } -.mb-1 { margin-bottom: var(--space-1); } -.mb-2 { margin-bottom: var(--space-2); } -.mb-3 { margin-bottom: var(--space-3); } -.mb-4 { margin-bottom: var(--space-4); } -.mb-5 { margin-bottom: var(--space-5); } -.mb-6 { margin-bottom: var(--space-6); } -.mb-8 { margin-bottom: var(--space-8); } - -.mt-0 { margin-top: 0; } -.mt-1 { margin-top: var(--space-1); } -.mt-2 { margin-top: var(--space-2); } -.mt-3 { margin-top: var(--space-3); } -.mt-4 { margin-top: var(--space-4); } -.mt-5 { margin-top: var(--space-5); } -.mt-6 { margin-top: var(--space-6); } -.mt-8 { margin-top: var(--space-8); } - -.ml-auto { margin-left: auto; } -.mr-auto { margin-right: auto; } - -/* Utility: text */ -.text-2xs { font-size: var(--font-size-2xs); } -.text-xs { font-size: var(--font-size-xs); } -.text-sm { font-size: var(--font-size-sm); } -.text-base { font-size: var(--font-size-base); } -.text-md { font-size: var(--font-size-md); } -.text-lg { font-size: var(--font-size-lg); } -.text-xl { font-size: var(--font-size-xl); } -.text-2xl { font-size: var(--font-size-2xl); } -.text-3xl { font-size: var(--font-size-3xl); } -.text-4xl { font-size: var(--font-size-4xl); } -.text-5xl { font-size: var(--font-size-5xl); } - -.font-light { font-weight: var(--font-weight-light); } -.font-normal { font-weight: var(--font-weight-normal); } -.font-medium { font-weight: var(--font-weight-medium); } -.font-semibold { font-weight: var(--font-weight-semibold); } -.font-bold { font-weight: var(--font-weight-bold); } -.font-extrabold { font-weight: var(--font-weight-extrabold); } - -.text-center { text-align: center; } -.text-left { text-align: left; } -.text-right { text-align: right; } - -.uppercase { text-transform: uppercase; } -.lowercase { text-transform: lowercase; } -.capitalize { text-transform: capitalize; } - -.tracking-tight { letter-spacing: var(--letter-spacing-tight); } -.tracking-wide { letter-spacing: var(--letter-spacing-wide); } -.tracking-wider { letter-spacing: var(--letter-spacing-wider); } - -.leading-none { line-height: var(--line-height-none); } -.leading-tight { line-height: var(--line-height-tight); } -.leading-normal { line-height: var(--line-height-normal); } -.leading-relaxed { line-height: var(--line-height-relaxed); } - -/* Text colors */ -.text-white { color: var(--white); } -.text-gray-400 { color: var(--gray-400); } -.text-gray-500 { color: var(--gray-500); } -.text-gray-600 { color: var(--gray-600); } -.text-gray-700 { color: var(--gray-700); } -.text-gray-800 { color: var(--gray-800); } -.text-gray-900 { color: var(--gray-900); } -.text-primary { color: var(--primary-blue); } -.text-primary-dark { color: var(--primary-blue-dark); } -.text-teal { color: var(--teal-bold); } -.text-success { color: var(--success); } -.text-warning { color: var(--warning); } -.text-error { color: var(--error); } - -/* Utility: backgrounds */ -.bg-white { background-color: var(--white); } -.bg-transparent { background-color: transparent; } -.bg-gray-25 { background-color: var(--gray-25); } -.bg-gray-50 { background-color: var(--gray-50); } -.bg-gray-100 { background-color: var(--gray-100); } -.bg-gray-200 { background-color: var(--gray-200); } -.bg-primary { background-color: var(--primary-blue); } -.bg-primary-subtle { background-color: var(--primary-blue-subtle); } -.bg-primary-dark { background-color: var(--primary-blue-dark); } -.bg-teal { background-color: var(--teal-bold); } -.bg-teal-soft { background-color: var(--teal-soft); } -.bg-success { background-color: var(--success); } -.bg-success-light { background-color: var(--success-light); } -.bg-warning { background-color: var(--warning); } -.bg-warning-light { background-color: var(--warning-light); } -.bg-error { background-color: var(--error); } -.bg-error-light { background-color: var(--error-light); } - -/* Gradient backgrounds */ -.bg-gradient-primary { background: var(--gradient-primary); } -.bg-gradient-teal { background: var(--gradient-teal); } -.bg-gradient-warm { background: var(--gradient-warm); } -.bg-gradient-subtle { background: var(--gradient-subtle); } - -/* Utility: rounded corners */ -.rounded-none { border-radius: 0; } -.rounded-sm { border-radius: var(--radius-sm); } -.rounded { border-radius: var(--radius-md); } -.rounded-md { border-radius: var(--radius-md); } -.rounded-lg { border-radius: var(--radius-lg); } -.rounded-xl { border-radius: var(--radius-xl); } -.rounded-2xl { border-radius: var(--radius-2xl); } -.rounded-3xl { border-radius: var(--radius-3xl); } -.rounded-full { border-radius: var(--radius-full); } - -/* Utility: shadows */ -.shadow-none { box-shadow: none; } -.shadow-xs { box-shadow: var(--shadow-xs); } -.shadow-sm { box-shadow: var(--shadow-sm); } -.shadow { box-shadow: var(--shadow-md); } -.shadow-md { box-shadow: var(--shadow-md); } -.shadow-lg { box-shadow: var(--shadow-lg); } -.shadow-xl { box-shadow: var(--shadow-xl); } -.shadow-2xl { box-shadow: var(--shadow-2xl); } -.shadow-card { box-shadow: var(--shadow-card); } -.shadow-floating { box-shadow: var(--shadow-floating); } - -/* Utility: borders */ -.border { border: 1px solid var(--border-color); } -.border-0 { border: none; } -.border-t { border-top: 1px solid var(--border-color); } -.border-b { border-bottom: 1px solid var(--border-color); } -.border-l { border-left: 1px solid var(--border-color); } -.border-r { border-right: 1px solid var(--border-color); } -.border-gray-100 { border-color: var(--gray-100); } -.border-gray-200 { border-color: var(--gray-200); } -.border-gray-300 { border-color: var(--gray-300); } -.border-transparent { border-color: transparent; } - -/* Utility: width/height */ -.w-full { width: 100%; } -.w-auto { width: auto; } -.w-fit { width: fit-content; } -.h-full { height: 100%; } -.h-auto { height: auto; } -.h-screen { height: 100vh; } -.min-h-screen { min-height: 100vh; } -.min-w-0 { min-width: 0; } -.max-w-full { max-width: 100%; } - -/* Utility: positioning */ -.relative { position: relative; } -.absolute { position: absolute; } -.fixed { position: fixed; } -.sticky { position: sticky; } -.inset-0 { top: 0; right: 0; bottom: 0; left: 0; } -.top-0 { top: 0; } -.right-0 { right: 0; } -.bottom-0 { bottom: 0; } -.left-0 { left: 0; } - -/* Utility: display */ -.hidden { display: none; } -.block { display: block; } -.inline-block { display: inline-block; } -.inline { display: inline; } - -/* Utility: overflow */ -.overflow-hidden { overflow: hidden; } -.overflow-auto { overflow: auto; } -.overflow-x-auto { overflow-x: auto; } -.overflow-y-auto { overflow-y: auto; } -.overflow-visible { overflow: visible; } - -/* Utility: opacity */ -.opacity-0 { opacity: 0; } -.opacity-50 { opacity: 0.5; } -.opacity-75 { opacity: 0.75; } -.opacity-100 { opacity: 1; } - -/* Utility: visibility */ -.visible { visibility: visible; } -.invisible { visibility: hidden; } - -/* Utility: cursor */ -.cursor-pointer { cursor: pointer; } -.cursor-default { cursor: default; } -.cursor-not-allowed { cursor: not-allowed; } - -/* Utility: pointer events */ -.pointer-events-none { pointer-events: none; } -.pointer-events-auto { pointer-events: auto; } - -/* Utility: user select */ -.select-none { user-select: none; } -.select-text { user-select: text; } -.select-all { user-select: all; } - -/* Animation keyframes */ -@keyframes fadeIn { - from { opacity: 0; } - to { opacity: 1; } -} - -@keyframes fadeInUp { - from { - opacity: 0; - transform: translateY(16px); - } - to { - opacity: 1; - transform: translateY(0); - } -} - -@keyframes fadeInDown { - from { - opacity: 0; - transform: translateY(-16px); - } - to { - opacity: 1; - transform: translateY(0); - } -} - -@keyframes slideInRight { - from { - opacity: 0; - transform: translateX(-20px); - } - to { - opacity: 1; - transform: translateX(0); - } -} - -@keyframes scaleIn { - from { - opacity: 0; - transform: scale(0.95); - } - to { - opacity: 1; - transform: scale(1); - } -} - -@keyframes pulse { - 0%, 100% { opacity: 1; } - 50% { opacity: 0.6; } -} - -@keyframes spin { - from { transform: rotate(0deg); } - to { transform: rotate(360deg); } -} - -@keyframes shimmer { - 0% { background-position: -200% 0; } - 100% { background-position: 200% 0; } -} - -@keyframes float { - 0%, 100% { transform: translateY(0); } - 50% { transform: translateY(-8px); } -} - -@keyframes glow { - 0%, 100% { box-shadow: 0 0 5px var(--primary-blue-glow); } - 50% { box-shadow: 0 0 20px var(--primary-blue-glow), 0 0 30px var(--primary-blue-glow); } -} - -.animate-fadeIn { animation: fadeIn var(--transition-normal) ease-out; } -.animate-fadeInUp { animation: fadeInUp var(--transition-slow) ease-out; } -.animate-fadeInDown { animation: fadeInDown var(--transition-slow) ease-out; } -.animate-slideInRight { animation: slideInRight var(--transition-slow) ease-out; } -.animate-scaleIn { animation: scaleIn var(--transition-normal) ease-out; } -.animate-pulse { animation: pulse 2s ease-in-out infinite; } -.animate-spin { animation: spin 1s linear infinite; } -.animate-shimmer { animation: shimmer 2s linear infinite; } -.animate-float { animation: float 3s ease-in-out infinite; } - -/* Transition utilities */ -.transition-none { transition: none; } -.transition-all { transition: all var(--transition-normal); } -.transition-colors { transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast); } -.transition-opacity { transition: opacity var(--transition-normal); } -.transition-transform { transition: transform var(--transition-normal); } -.transition-shadow { transition: box-shadow var(--transition-normal); } - -/* Transform utilities */ -.transform { transform: translateZ(0); } -.scale-95 { transform: scale(0.95); } -.scale-100 { transform: scale(1); } -.scale-105 { transform: scale(1.05); } -.-translate-y-1 { transform: translateY(-4px); } -.translate-y-0 { transform: translateY(0); } - -/* Hover utilities */ -.hover\:scale-102:hover { transform: scale(1.02); } -.hover\:scale-105:hover { transform: scale(1.05); } -.hover\:-translate-y-1:hover { transform: translateY(-4px); } -.hover\:shadow-lg:hover { box-shadow: var(--shadow-lg); } -.hover\:shadow-xl:hover { box-shadow: var(--shadow-xl); } -.hover\:shadow-card-hover:hover { box-shadow: var(--shadow-card-hover); } - -/* Icons */ -.icon { - width: 20px; - height: 20px; - flex-shrink: 0; - display: inline-flex; - align-items: center; - justify-content: center; -} - -.icon-xs { width: 14px; height: 14px; } -.icon-sm { width: 16px; height: 16px; } -.icon-md { width: 20px; height: 20px; } -.icon-lg { width: 24px; height: 24px; } -.icon-xl { width: 32px; height: 32px; } -.icon-2xl { width: 40px; height: 40px; } -.icon-3xl { width: 48px; height: 48px; } - -/* Google Charts container styling */ -.chart-container { - width: 100%; - min-height: 300px; - position: relative; -} - -.chart-container-sm { - min-height: 200px; -} - -.chart-container-lg { - min-height: 400px; -} - -/* Responsive visibility */ -@media (max-width: 639px) { - .sm\:hidden { display: none; } -} - -@media (max-width: 767px) { - .md\:hidden { display: none; } -} - -@media (max-width: 1023px) { - .lg\:hidden { display: none; } -} - -@media (min-width: 640px) { - .hidden.sm\:block { display: block; } - .hidden.sm\:flex { display: flex; } -} - -@media (min-width: 768px) { - .hidden.md\:block { display: block; } - .hidden.md\:flex { display: flex; } -} - -@media (min-width: 1024px) { - .hidden.lg\:block { display: block; } - .hidden.lg\:flex { display: flex; } -} diff --git a/Dashboard/Dashboard.Web/wwwroot/css/components.css b/Dashboard/Dashboard.Web/wwwroot/css/components.css deleted file mode 100644 index a719b68..0000000 --- a/Dashboard/Dashboard.Web/wwwroot/css/components.css +++ /dev/null @@ -1,1890 +0,0 @@ -/* Medical Dashboard - Premium Component Styles */ -/* Inspired by Wellmetrix & CareIQ Designs */ - -/* === PREMIUM CARD - Glassmorphic === */ -.card { - position: relative; - background: var(--glass-bg-strong); - backdrop-filter: blur(var(--glass-blur)); - -webkit-backdrop-filter: blur(var(--glass-blur)); - border: 1px solid var(--glass-border); - border-radius: var(--radius-2xl); - padding: var(--space-6); - box-shadow: var(--shadow-card); - transition: all var(--transition-normal); - overflow: hidden; -} - -.card::before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - height: 1px; - background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent); - opacity: 0.6; -} - -.card:hover { - transform: translateY(-2px); - box-shadow: var(--shadow-card-hover); - border-color: rgba(255,255,255,0.6); -} - -.card-solid { - background: var(--white); - backdrop-filter: none; - border: 1px solid var(--gray-100); -} - -.card-elevated { - background: var(--white); - backdrop-filter: none; - box-shadow: var(--shadow-lg); -} - -.card-interactive { - cursor: pointer; -} - -.card-interactive:hover { - transform: translateY(-4px); -} - -.card-header { - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: var(--space-5); - padding-bottom: var(--space-4); - border-bottom: 1px solid var(--gray-100); -} - -.card-title { - font-size: var(--font-size-lg); - font-weight: var(--font-weight-semibold); - color: var(--gray-900); - margin: 0; - letter-spacing: var(--letter-spacing-tight); -} - -.card-subtitle { - font-size: var(--font-size-sm); - color: var(--gray-500); - margin-top: var(--space-1); -} - -.card-actions { - display: flex; - align-items: center; - gap: var(--space-2); -} - -.card-body { - flex: 1; -} - -.card-footer { - margin-top: var(--space-5); - padding-top: var(--space-4); - border-top: 1px solid var(--gray-100); -} - -/* === METRIC CARD - Premium Stats === */ -.metric-card { - position: relative; - background: var(--white); - border-radius: var(--radius-2xl); - padding: var(--space-6); - box-shadow: var(--shadow-card); - transition: all var(--transition-normal); - overflow: hidden; - min-height: var(--card-min-height); -} - -.metric-card::before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - height: 4px; - background: var(--gradient-primary); - opacity: 0; - transition: opacity var(--transition-normal); -} - -.metric-card:hover { - transform: translateY(-4px); - box-shadow: var(--shadow-card-hover); -} - -.metric-card:hover::before { - opacity: 1; -} - -.metric-card.accent-blue::before { background: var(--gradient-primary); opacity: 1; } -.metric-card.accent-teal::before { background: var(--gradient-teal); opacity: 1; } -.metric-card.accent-warm::before { background: var(--gradient-warm); opacity: 1; } -.metric-card.accent-cool::before { background: var(--gradient-cool); opacity: 1; } - -.metric-header { - display: flex; - align-items: flex-start; - justify-content: space-between; - margin-bottom: var(--space-4); -} - -.metric-icon { - width: 52px; - height: 52px; - border-radius: var(--radius-xl); - display: flex; - align-items: center; - justify-content: center; - font-size: var(--font-size-2xl); - transition: transform var(--transition-normal); -} - -.metric-card:hover .metric-icon { - transform: scale(1.05); -} - -.metric-icon.blue { - background: linear-gradient(135deg, var(--primary-blue-subtle) 0%, rgba(59, 130, 246, 0.15) 100%); - color: var(--primary-blue); -} - -.metric-icon.teal { - background: linear-gradient(135deg, var(--teal-soft) 0%, rgba(20, 184, 166, 0.15) 100%); - color: var(--teal-dark); -} - -.metric-icon.success { - background: linear-gradient(135deg, var(--success-light) 0%, rgba(34, 197, 94, 0.15) 100%); - color: var(--success); -} - -.metric-icon.warning { - background: linear-gradient(135deg, var(--warning-light) 0%, rgba(245, 158, 11, 0.15) 100%); - color: var(--warning); -} - -.metric-icon.coral { - background: linear-gradient(135deg, var(--accent-coral-light) 0%, rgba(249, 115, 22, 0.15) 100%); - color: var(--accent-coral); -} - -.metric-icon.violet { - background: linear-gradient(135deg, var(--accent-violet-light) 0%, rgba(139, 92, 246, 0.15) 100%); - color: var(--accent-violet); -} - -.metric-content { - flex: 1; -} - -.metric-value { - font-size: var(--font-size-4xl); - font-weight: var(--font-weight-bold); - color: var(--gray-900); - line-height: var(--line-height-none); - letter-spacing: var(--letter-spacing-tight); - margin-bottom: var(--space-1); -} - -.metric-value-sm { - font-size: var(--font-size-3xl); -} - -.metric-label { - font-size: var(--font-size-sm); - color: var(--gray-500); - font-weight: var(--font-weight-medium); - margin-bottom: var(--space-3); -} - -.metric-trend { - display: inline-flex; - align-items: center; - gap: var(--space-1); - font-size: var(--font-size-sm); - font-weight: var(--font-weight-semibold); - padding: var(--space-1) var(--space-2); - border-radius: var(--radius-full); -} - -.metric-trend.up { - color: var(--success); - background: var(--success-light); -} - -.metric-trend.down { - color: var(--error); - background: var(--error-light); -} - -.metric-trend.neutral { - color: var(--gray-500); - background: var(--gray-100); -} - -.metric-mini-chart { - height: 40px; - margin-top: var(--space-3); -} - -/* === STAT CARD - Compact Version === */ -.stat-card { - display: flex; - align-items: center; - gap: var(--space-4); - background: var(--white); - border-radius: var(--radius-xl); - padding: var(--space-4) var(--space-5); - box-shadow: var(--shadow-sm); - transition: all var(--transition-normal); -} - -.stat-card:hover { - box-shadow: var(--shadow-md); - transform: translateY(-2px); -} - -.stat-icon { - width: 44px; - height: 44px; - border-radius: var(--radius-lg); - display: flex; - align-items: center; - justify-content: center; - flex-shrink: 0; -} - -.stat-content { - flex: 1; - min-width: 0; -} - -.stat-value { - font-size: var(--font-size-2xl); - font-weight: var(--font-weight-bold); - color: var(--gray-900); - line-height: var(--line-height-tight); -} - -.stat-label { - font-size: var(--font-size-sm); - color: var(--gray-500); -} - -/* === BUTTONS - Premium Style === */ -.btn { - display: inline-flex; - align-items: center; - justify-content: center; - gap: var(--space-2); - padding: var(--space-2-5) var(--space-5); - font-family: inherit; - font-size: var(--font-size-base); - font-weight: var(--font-weight-medium); - line-height: var(--line-height-tight); - border: none; - border-radius: var(--radius-lg); - cursor: pointer; - transition: all var(--transition-fast); - white-space: nowrap; - text-decoration: none; -} - -.btn:focus-visible { - outline: 2px solid var(--primary-blue); - outline-offset: 2px; -} - -.btn:disabled { - opacity: 0.5; - cursor: not-allowed; - transform: none !important; -} - -.btn-primary { - background: var(--gradient-primary); - color: var(--white); - box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3); -} - -.btn-primary:hover:not(:disabled) { - transform: translateY(-1px); - box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); -} - -.btn-primary:active:not(:disabled) { - transform: translateY(0); -} - -.btn-secondary { - background: var(--gray-100); - color: var(--gray-700); -} - -.btn-secondary:hover:not(:disabled) { - background: var(--gray-200); -} - -.btn-outline { - background: transparent; - border: 1px solid var(--gray-300); - color: var(--gray-700); -} - -.btn-outline:hover:not(:disabled) { - background: var(--gray-50); - border-color: var(--gray-400); -} - -.btn-ghost { - background: transparent; - color: var(--gray-600); -} - -.btn-ghost:hover:not(:disabled) { - background: var(--gray-100); - color: var(--gray-900); -} - -.btn-danger { - background: var(--gradient-warm); - color: var(--white); - box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3); -} - -.btn-danger:hover:not(:disabled) { - transform: translateY(-1px); - box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4); -} - -.btn-success { - background: var(--gradient-teal); - color: var(--white); - box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3); -} - -.btn-success:hover:not(:disabled) { - transform: translateY(-1px); - box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4); -} - -.btn-white { - background: var(--white); - color: var(--gray-700); - box-shadow: var(--shadow-sm); -} - -.btn-white:hover:not(:disabled) { - box-shadow: var(--shadow-md); -} - -.btn-xs { padding: var(--space-1) var(--space-2); font-size: var(--font-size-xs); border-radius: var(--radius-md); } -.btn-sm { padding: var(--space-1-5) var(--space-3); font-size: var(--font-size-sm); } -.btn-lg { padding: var(--space-3) var(--space-6); font-size: var(--font-size-md); } -.btn-xl { padding: var(--space-4) var(--space-8); font-size: var(--font-size-lg); border-radius: var(--radius-xl); } - -.btn-icon { - padding: var(--space-2); - width: 40px; - height: 40px; -} - -.btn-icon.btn-sm { - width: 32px; - height: 32px; - padding: var(--space-1-5); -} - -.btn-icon.btn-lg { - width: 48px; - height: 48px; - padding: var(--space-3); -} - -/* Button Group */ -.btn-group { - display: inline-flex; - border-radius: var(--radius-lg); - overflow: hidden; - box-shadow: var(--shadow-sm); -} - -.btn-group .btn { - border-radius: 0; - border-right: 1px solid rgba(0,0,0,0.1); -} - -.btn-group .btn:last-child { - border-right: none; -} - -/* === INPUTS - Modern Style === */ -.input { - width: 100%; - padding: var(--space-3) var(--space-4); - font-family: inherit; - font-size: var(--font-size-base); - line-height: var(--line-height-tight); - color: var(--gray-900); - background: var(--white); - border: 1px solid var(--gray-200); - border-radius: var(--radius-lg); - transition: all var(--transition-fast); -} - -.input:focus { - outline: none; - border-color: var(--primary-blue); - box-shadow: 0 0 0 4px var(--primary-blue-glow); -} - -.input:disabled { - background: var(--gray-50); - color: var(--gray-400); - cursor: not-allowed; -} - -.input::placeholder { - color: var(--gray-400); -} - -.input-error { - border-color: var(--error); -} - -.input-error:focus { - box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15); -} - -.input-success { - border-color: var(--success); -} - -.input-success:focus { - box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15); -} - -.input-sm { - padding: var(--space-2) var(--space-3); - font-size: var(--font-size-sm); -} - -.input-lg { - padding: var(--space-4) var(--space-5); - font-size: var(--font-size-md); -} - -.input-group { - display: flex; - flex-direction: column; - gap: var(--space-2); -} - -.input-label { - font-size: var(--font-size-sm); - font-weight: var(--font-weight-medium); - color: var(--gray-700); -} - -.input-helper { - font-size: var(--font-size-sm); - color: var(--gray-500); -} - -.input-error-message { - font-size: var(--font-size-sm); - color: var(--error); -} - -/* Input with Icon */ -.input-with-icon { - position: relative; -} - -.input-with-icon .input { - padding-left: var(--space-11); -} - -.input-with-icon .input-icon { - position: absolute; - left: var(--space-4); - top: 50%; - transform: translateY(-50%); - color: var(--gray-400); - pointer-events: none; -} - -.input-with-icon-right .input { - padding-right: var(--space-11); -} - -.input-with-icon-right .input-icon { - left: auto; - right: var(--space-4); -} - -/* === SEARCH INPUT === */ -.search-box { - position: relative; - width: 100%; -} - -.search-box .input { - padding-left: var(--space-11); - background: var(--gray-50); - border-color: transparent; -} - -.search-box .input:focus { - background: var(--white); - border-color: var(--primary-blue); -} - -.search-box .search-icon { - position: absolute; - left: var(--space-4); - top: 50%; - transform: translateY(-50%); - color: var(--gray-400); -} - -.search-input { - position: relative; -} - -.search-input .input { - padding-left: var(--space-10); -} - -.search-input .search-icon { - position: absolute; - left: var(--space-3); - top: 50%; - transform: translateY(-50%); - color: var(--gray-400); -} - -/* === SELECT === */ -.select { - appearance: none; - width: 100%; - padding: var(--space-3) var(--space-10) var(--space-3) var(--space-4); - font-family: inherit; - font-size: var(--font-size-base); - color: var(--gray-900); - background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right var(--space-4) center; - border: 1px solid var(--gray-200); - border-radius: var(--radius-lg); - cursor: pointer; - transition: all var(--transition-fast); -} - -.select:focus { - outline: none; - border-color: var(--primary-blue); - box-shadow: 0 0 0 4px var(--primary-blue-glow); -} - -/* === BADGE === */ -.badge { - display: inline-flex; - align-items: center; - gap: var(--space-1); - padding: var(--space-1) var(--space-2-5); - font-size: var(--font-size-xs); - font-weight: var(--font-weight-semibold); - line-height: var(--line-height-tight); - border-radius: var(--radius-full); - white-space: nowrap; -} - -.badge-primary { - background: var(--primary-blue-subtle); - color: var(--primary-blue-dark); -} - -.badge-secondary { - background: var(--gray-200); - color: var(--gray-700); -} - -.badge-success { - background: var(--success-light); - color: var(--success-dark); -} - -.badge-warning { - background: var(--warning-light); - color: var(--warning-dark); -} - -.badge-error { - background: var(--error-light); - color: var(--error-dark); -} - -.badge-danger { - background: var(--error-light); - color: var(--error-dark); -} - -.badge-info { - background: var(--info-light); - color: var(--info-dark); -} - -.badge-gray { - background: var(--gray-100); - color: var(--gray-700); -} - -.badge-teal { - background: var(--teal-soft); - color: var(--teal-dark); -} - -.badge-violet { - background: var(--accent-violet-light); - color: var(--accent-violet); -} - -.badge-coral { - background: var(--accent-coral-light); - color: var(--accent-coral); -} - -.badge-outline { - background: transparent; - border: 1px solid currentColor; -} - -.badge-lg { - padding: var(--space-1-5) var(--space-3); - font-size: var(--font-size-sm); -} - -.badge-dot { - padding-left: var(--space-2); -} - -.badge-dot::before { - content: ''; - width: 6px; - height: 6px; - border-radius: 50%; - background: currentColor; -} - -/* === STATUS DOT === */ -.status-dot { - display: inline-block; - width: 10px; - height: 10px; - border-radius: 50%; - flex-shrink: 0; -} - -.status-dot.active { - background: var(--success); - box-shadow: 0 0 0 3px var(--success-light); -} - -.status-dot.inactive { - background: var(--gray-400); -} - -.status-dot.pending { - background: var(--warning); - box-shadow: 0 0 0 3px var(--warning-light); -} - -.status-dot.error { - background: var(--error); - box-shadow: 0 0 0 3px var(--error-light); -} - -.status-dot.pulse { - animation: statusPulse 2s ease-in-out infinite; -} - -@keyframes statusPulse { - 0%, 100% { transform: scale(1); opacity: 1; } - 50% { transform: scale(1.1); opacity: 0.8; } -} - -/* === AVATAR === */ -.avatar { - display: inline-flex; - align-items: center; - justify-content: center; - border-radius: 50%; - font-weight: var(--font-weight-semibold); - background: var(--gradient-primary); - color: var(--white); - flex-shrink: 0; - overflow: hidden; -} - -.avatar-xs { width: 24px; height: 24px; font-size: var(--font-size-2xs); } -.avatar-sm { width: 32px; height: 32px; font-size: var(--font-size-xs); } -.avatar-md { width: 40px; height: 40px; font-size: var(--font-size-sm); } -.avatar-lg { width: 48px; height: 48px; font-size: var(--font-size-md); } -.avatar-xl { width: 64px; height: 64px; font-size: var(--font-size-xl); } -.avatar-2xl { width: 80px; height: 80px; font-size: var(--font-size-2xl); } - -.avatar img { - width: 100%; - height: 100%; - object-fit: cover; -} - -.avatar-teal { background: var(--gradient-teal); } -.avatar-warm { background: var(--gradient-warm); } -.avatar-violet { background: linear-gradient(135deg, var(--accent-violet) 0%, #6d28d9 100%); } -.avatar-blue { background: var(--primary-blue-subtle); color: var(--primary-blue-dark); } - -.avatar-group { - display: flex; -} - -.avatar-group .avatar { - border: 2px solid var(--white); - margin-left: -8px; -} - -.avatar-group .avatar:first-child { - margin-left: 0; -} - -/* === TABLE === */ -.table-container { - overflow-x: auto; - border-radius: var(--radius-xl); - background: var(--white); - box-shadow: var(--shadow-card); -} - -.table { - width: 100%; - border-collapse: collapse; -} - -.table th, -.table td { - padding: var(--space-4) var(--space-5); - text-align: left; - border-bottom: 1px solid var(--gray-100); -} - -.table th { - font-size: var(--font-size-sm); - font-weight: var(--font-weight-semibold); - color: var(--gray-600); - background: var(--gray-50); - text-transform: uppercase; - letter-spacing: var(--letter-spacing-wide); -} - -.table th:first-child { - border-radius: var(--radius-xl) 0 0 0; -} - -.table th:last-child { - border-radius: 0 var(--radius-xl) 0 0; -} - -.table tbody tr { - transition: background var(--transition-fast); -} - -.table tbody tr:hover { - background: var(--gray-50); -} - -.table tbody tr:last-child td { - border-bottom: none; -} - -.table tbody tr:last-child td:first-child { - border-radius: 0 0 0 var(--radius-xl); -} - -.table tbody tr:last-child td:last-child { - border-radius: 0 0 var(--radius-xl) 0; -} - -.table-compact th, -.table-compact td { - padding: var(--space-3) var(--space-4); -} - -.table-striped tbody tr:nth-child(even) { - background: var(--gray-25); -} - -.table-action { - display: flex; - gap: var(--space-2); - justify-content: flex-end; -} - -/* === TABS === */ -.tabs { - display: flex; - gap: var(--space-1); - background: var(--gray-100); - padding: var(--space-1); - border-radius: var(--radius-lg); - width: fit-content; -} - -.tab { - padding: var(--space-2) var(--space-4); - font-size: var(--font-size-sm); - font-weight: var(--font-weight-medium); - color: var(--gray-600); - background: transparent; - border: none; - border-radius: var(--radius-md); - cursor: pointer; - transition: all var(--transition-fast); -} - -.tab:hover { - color: var(--gray-900); -} - -.tab.active { - color: var(--gray-900); - background: var(--white); - box-shadow: var(--shadow-sm); -} - -.tabs-underline { - background: transparent; - padding: 0; - border-bottom: 1px solid var(--gray-200); - border-radius: 0; - gap: var(--space-6); -} - -.tabs-underline .tab { - padding: var(--space-3) var(--space-1); - border-radius: 0; - border-bottom: 2px solid transparent; - margin-bottom: -1px; -} - -.tabs-underline .tab.active { - background: transparent; - color: var(--primary-blue); - border-bottom-color: var(--primary-blue); - box-shadow: none; -} - -/* === DROPDOWN === */ -.dropdown { - position: relative; - display: inline-block; -} - -.dropdown-menu { - position: absolute; - top: calc(100% + var(--space-2)); - right: 0; - min-width: 200px; - background: var(--white); - border-radius: var(--radius-xl); - box-shadow: var(--shadow-floating); - padding: var(--space-2); - z-index: var(--z-dropdown); - opacity: 0; - visibility: hidden; - transform: translateY(-8px) scale(0.95); - transition: all var(--transition-fast); -} - -.dropdown.open .dropdown-menu, -.dropdown:focus-within .dropdown-menu { - opacity: 1; - visibility: visible; - transform: translateY(0) scale(1); -} - -.dropdown-item { - display: flex; - align-items: center; - gap: var(--space-3); - padding: var(--space-2-5) var(--space-3); - font-size: var(--font-size-base); - color: var(--gray-700); - border-radius: var(--radius-md); - cursor: pointer; - transition: all var(--transition-fast); -} - -.dropdown-item:hover { - background: var(--gray-100); - color: var(--gray-900); -} - -.dropdown-item.danger { - color: var(--error); -} - -.dropdown-item.danger:hover { - background: var(--error-light); -} - -.dropdown-divider { - height: 1px; - background: var(--gray-100); - margin: var(--space-2) 0; -} - -/* === MODAL === */ -.modal-backdrop { - position: fixed; - inset: 0; - background: rgba(0, 0, 0, 0.4); - backdrop-filter: blur(8px); - z-index: var(--z-modal-backdrop); - display: flex; - align-items: center; - justify-content: center; - padding: var(--space-6); - opacity: 0; - visibility: hidden; - transition: all var(--transition-normal); -} - -.modal-backdrop.open { - opacity: 1; - visibility: visible; -} - -.modal { - background: var(--white); - border-radius: var(--radius-2xl); - box-shadow: var(--shadow-2xl); - max-width: 540px; - width: 100%; - max-height: 90vh; - overflow: hidden; - transform: translateY(20px) scale(0.95); - transition: all var(--transition-normal); -} - -.modal-backdrop.open .modal { - transform: translateY(0) scale(1); -} - -.modal-sm { max-width: 400px; } -.modal-lg { max-width: 720px; } -.modal-xl { max-width: 960px; } -.modal-full { max-width: calc(100vw - var(--space-12)); max-height: calc(100vh - var(--space-12)); } - -.modal-header { - display: flex; - align-items: center; - justify-content: space-between; - padding: var(--space-5) var(--space-6); - border-bottom: 1px solid var(--gray-100); -} - -.modal-title { - font-size: var(--font-size-xl); - font-weight: var(--font-weight-semibold); - color: var(--gray-900); -} - -.modal-close { - width: 36px; - height: 36px; - display: flex; - align-items: center; - justify-content: center; - background: var(--gray-100); - border: none; - border-radius: var(--radius-lg); - cursor: pointer; - color: var(--gray-500); - transition: all var(--transition-fast); -} - -.modal-close:hover { - background: var(--gray-200); - color: var(--gray-700); -} - -.modal-body { - padding: var(--space-6); - overflow-y: auto; - max-height: calc(90vh - 140px); -} - -.modal-footer { - display: flex; - justify-content: flex-end; - gap: var(--space-3); - padding: var(--space-4) var(--space-6); - border-top: 1px solid var(--gray-100); - background: var(--gray-50); -} - -/* === LOADING STATES === */ -.spinner { - width: 24px; - height: 24px; - border: 2px solid var(--gray-200); - border-top-color: var(--primary-blue); - border-radius: 50%; - animation: spin 0.7s linear infinite; -} - -.spinner-sm { width: 16px; height: 16px; border-width: 2px; } -.spinner-lg { width: 40px; height: 40px; border-width: 3px; } -.spinner-xl { width: 56px; height: 56px; border-width: 4px; } - -.spinner-white { - border-color: rgba(255,255,255,0.3); - border-top-color: var(--white); -} - -.skeleton { - background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%); - background-size: 200% 100%; - animation: shimmer 1.5s infinite linear; - border-radius: var(--radius-md); -} - -.skeleton-text { - height: 16px; - margin-bottom: var(--space-2); -} - -.skeleton-title { - height: 24px; - width: 60%; - margin-bottom: var(--space-3); -} - -.skeleton-avatar { - width: 40px; - height: 40px; - border-radius: 50%; -} - -.skeleton-card { - height: 120px; - border-radius: var(--radius-xl); -} - -@keyframes shimmer { - 0% { background-position: 200% 0; } - 100% { background-position: -200% 0; } -} - -/* === EMPTY STATE === */ -.empty-state { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - padding: var(--space-16) var(--space-6); - text-align: center; -} - -.empty-state-icon { - width: 96px; - height: 96px; - margin-bottom: var(--space-6); - color: var(--gray-300); - opacity: 0.8; -} - -.empty-state-icon .icon, -.empty-state-icon svg { - width: 100%; - height: 100%; -} - -.empty-state-title { - font-size: var(--font-size-xl); - font-weight: var(--font-weight-semibold); - color: var(--gray-900); - margin-bottom: var(--space-2); -} - -.empty-state-description { - color: var(--gray-500); - max-width: 360px; - margin-bottom: var(--space-6); -} - -/* === TOOLTIP === */ -.tooltip { - position: relative; - display: inline-block; -} - -.tooltip-content { - position: absolute; - bottom: calc(100% + 8px); - left: 50%; - transform: translateX(-50%); - padding: var(--space-2) var(--space-3); - font-size: var(--font-size-sm); - color: var(--white); - background: var(--gray-900); - border-radius: var(--radius-md); - white-space: nowrap; - z-index: var(--z-tooltip); - opacity: 0; - visibility: hidden; - transition: all var(--transition-fast); - pointer-events: none; -} - -.tooltip-content::after { - content: ''; - position: absolute; - top: 100%; - left: 50%; - transform: translateX(-50%); - border: 6px solid transparent; - border-top-color: var(--gray-900); -} - -.tooltip:hover .tooltip-content { - opacity: 1; - visibility: visible; -} - -/* === PROGRESS BAR === */ -.progress { - width: 100%; - height: 8px; - background: var(--gray-100); - border-radius: var(--radius-full); - overflow: hidden; -} - -.progress-bar { - height: 100%; - background: var(--gradient-primary); - border-radius: var(--radius-full); - transition: width var(--transition-slow); -} - -.progress-bar.success { background: var(--gradient-teal); } -.progress-bar.warning { background: var(--gradient-warm); } -.progress-bar.error { background: linear-gradient(135deg, var(--error) 0%, var(--error-dark) 100%); } - -.progress-sm { height: 4px; } -.progress-lg { height: 12px; } - -/* === ALERT === */ -.alert { - display: flex; - align-items: flex-start; - gap: var(--space-3); - padding: var(--space-4) var(--space-5); - border-radius: var(--radius-lg); - border: 1px solid; -} - -.alert-icon { - flex-shrink: 0; - width: 20px; - height: 20px; -} - -.alert-content { - flex: 1; -} - -.alert-title { - font-weight: var(--font-weight-semibold); - margin-bottom: var(--space-1); -} - -.alert-description { - font-size: var(--font-size-sm); - opacity: 0.9; -} - -.alert-info { - background: var(--info-light); - border-color: var(--info); - color: var(--info-dark); -} - -.alert-success { - background: var(--success-light); - border-color: var(--success); - color: var(--success-dark); -} - -.alert-warning { - background: var(--warning-light); - border-color: var(--warning); - color: var(--warning-dark); -} - -.alert-error { - background: var(--error-light); - border-color: var(--error); - color: var(--error-dark); -} - -/* === TOGGLE === */ -.toggle { - position: relative; - display: inline-flex; - width: 44px; - height: 24px; - cursor: pointer; -} - -.toggle input { - opacity: 0; - width: 0; - height: 0; -} - -.toggle-slider { - position: absolute; - inset: 0; - background: var(--gray-300); - border-radius: var(--radius-full); - transition: all var(--transition-fast); -} - -.toggle-slider::before { - content: ''; - position: absolute; - width: 18px; - height: 18px; - left: 3px; - bottom: 3px; - background: var(--white); - border-radius: 50%; - transition: all var(--transition-fast); - box-shadow: var(--shadow-sm); -} - -.toggle input:checked + .toggle-slider { - background: var(--primary-blue); -} - -.toggle input:checked + .toggle-slider::before { - transform: translateX(20px); -} - -.toggle input:focus-visible + .toggle-slider { - box-shadow: 0 0 0 3px var(--primary-blue-glow); -} - -/* === DIVIDER === */ -.divider { - height: 1px; - background: var(--gray-200); - margin: var(--space-6) 0; -} - -.divider-vertical { - width: 1px; - height: auto; - align-self: stretch; - margin: 0 var(--space-4); -} - -/* === NOTIFICATION DOT === */ -.notification-dot { - position: absolute; - top: -2px; - right: -2px; - width: 10px; - height: 10px; - background: var(--error); - border: 2px solid var(--white); - border-radius: 50%; -} - -.notification-count { - position: absolute; - top: -6px; - right: -6px; - min-width: 18px; - height: 18px; - padding: 0 var(--space-1); - font-size: var(--font-size-2xs); - font-weight: var(--font-weight-bold); - color: var(--white); - background: var(--error); - border: 2px solid var(--white); - border-radius: var(--radius-full); - display: flex; - align-items: center; - justify-content: center; -} - -/* === ACTIVITY/LIST ITEM === */ -.activity-item { - display: flex; - align-items: flex-start; - gap: var(--space-4); - padding: var(--space-4) 0; - border-bottom: 1px solid var(--gray-100); -} - -.activity-item:last-child { - border-bottom: none; -} - -.activity-icon { - width: 40px; - height: 40px; - border-radius: var(--radius-lg); - display: flex; - align-items: center; - justify-content: center; - flex-shrink: 0; -} - -.activity-content { - flex: 1; - min-width: 0; -} - -.activity-title { - font-weight: var(--font-weight-medium); - color: var(--gray-900); - margin-bottom: var(--space-0-5); -} - -.activity-description { - font-size: var(--font-size-sm); - color: var(--gray-500); -} - -.activity-time { - font-size: var(--font-size-sm); - color: var(--gray-400); - white-space: nowrap; -} - -/* === QUICK ACTIONS === */ -.quick-action { - display: flex; - align-items: center; - justify-content: center; - gap: var(--space-2); - padding: var(--space-4) var(--space-5); - background: var(--white); - border: 1px solid var(--gray-200); - border-radius: var(--radius-xl); - font-weight: var(--font-weight-medium); - color: var(--gray-700); - cursor: pointer; - transition: all var(--transition-fast); -} - -.quick-action:hover { - border-color: var(--primary-blue); - color: var(--primary-blue); - box-shadow: var(--shadow-md); -} - -.quick-action-primary { - background: var(--gradient-primary); - border-color: transparent; - color: var(--white); -} - -.quick-action-primary:hover { - transform: translateY(-2px); - box-shadow: var(--shadow-lg); - color: var(--white); -} - -/* === CALENDAR === */ -.calendar-grid-container { - padding: var(--space-4); -} - -.calendar-grid-header { - margin-bottom: var(--space-2); -} - -.calendar-header-cell { - font-size: var(--font-size-sm); - font-weight: var(--font-weight-semibold); - color: var(--gray-500); - text-transform: uppercase; - letter-spacing: var(--letter-spacing-wide); -} - -.calendar-grid { - gap: var(--space-1); -} - -.calendar-cell { - min-height: 100px; - padding: var(--space-2); - background: var(--white); - border: 1px solid var(--gray-100); - border-radius: var(--radius-lg); - cursor: pointer; - transition: all var(--transition-fast); - display: flex; - flex-direction: column; -} - -.calendar-cell:hover { - border-color: var(--primary-blue); - box-shadow: var(--shadow-sm); -} - -.calendar-cell.empty { - background: var(--gray-50); - border-color: transparent; - cursor: default; -} - -.calendar-cell.empty:hover { - border-color: transparent; - box-shadow: none; -} - -.calendar-cell.today { - border-color: var(--primary-blue); - background: var(--primary-blue-subtle); -} - -.calendar-cell.selected { - border-color: var(--primary-blue); - box-shadow: 0 0 0 2px var(--primary-blue-glow); -} - -.calendar-cell.has-appointments .calendar-day-number { - font-weight: var(--font-weight-bold); -} - -.calendar-day-number { - font-size: var(--font-size-sm); - font-weight: var(--font-weight-medium); - color: var(--gray-700); - margin-bottom: var(--space-1); -} - -.calendar-cell.today .calendar-day-number { - color: var(--primary-blue-dark); - font-weight: var(--font-weight-bold); -} - -.calendar-appointments-preview { - display: flex; - flex-wrap: wrap; - gap: var(--space-1); - margin-top: auto; -} - -.calendar-dot { - width: 8px; - height: 8px; - border-radius: 50%; - flex-shrink: 0; -} - -.calendar-dot.blue { - background: var(--primary-blue); -} - -.calendar-dot.teal { - background: var(--teal-dark); -} - -.calendar-dot.green { - background: var(--success); -} - -.calendar-dot.red { - background: var(--error); -} - -.calendar-dot.gray { - background: var(--gray-400); -} - -.calendar-more-indicator { - font-size: var(--font-size-2xs); - color: var(--gray-500); - font-weight: var(--font-weight-medium); -} - -.calendar-details-panel { - padding: 0; - overflow: hidden; -} - -.calendar-appointment-item { - background: var(--gray-50); - transition: all var(--transition-fast); -} - -.calendar-appointment-item:hover { - background: var(--gray-100); -} - -.space-y-3 > * + * { - margin-top: var(--space-3); -} - -/* === LOGIN PAGE === */ -.login-page { - min-height: 100vh; - display: flex; - align-items: center; - justify-content: center; - background: linear-gradient(135deg, var(--primary-blue-subtle) 0%, var(--teal-soft) 50%, var(--white) 100%); - padding: var(--space-4); -} - -.login-card { - background: var(--white); - border-radius: var(--radius-2xl); - box-shadow: var(--shadow-xl); - padding: var(--space-8); - width: 100%; - max-width: 400px; -} - -.login-header { - text-align: center; - margin-bottom: var(--space-8); -} - -.login-logo { - width: 64px; - height: 64px; - background: linear-gradient(135deg, var(--primary-blue) 0%, var(--teal-bold) 100%); - border-radius: var(--radius-xl); - display: flex; - align-items: center; - justify-content: center; - margin: 0 auto var(--space-4); -} - -.login-logo .icon { - width: 32px; - height: 32px; - color: var(--white); -} - -.login-header h1 { - font-size: var(--font-size-xl); - font-weight: var(--font-weight-semibold); - color: var(--gray-900); - margin: 0 0 var(--space-2); -} - -.login-header p { - font-size: var(--font-size-sm); - color: var(--gray-500); - margin: 0; -} - -.login-error { - background: var(--error-bg); - border: 1px solid var(--error); - color: var(--error); - padding: var(--space-3) var(--space-4); - border-radius: var(--radius-lg); - margin-bottom: var(--space-4); - font-size: var(--font-size-sm); -} - -.login-success { - background: var(--success-bg); - border: 1px solid var(--success); - color: var(--success); - padding: var(--space-3) var(--space-4); - border-radius: var(--radius-lg); - margin-bottom: var(--space-4); - font-size: var(--font-size-sm); -} - -.login-btn { - width: 100%; - margin-top: var(--space-4); -} - -.login-footer { - text-align: center; - margin-top: var(--space-6); - padding-top: var(--space-6); - border-top: 1px solid var(--gray-100); -} - -.login-footer p { - font-size: var(--font-size-sm); - color: var(--gray-500); - margin: 0; -} - -.link-btn { - background: none; - border: none; - color: var(--primary-blue); - font-size: var(--font-size-sm); - font-weight: var(--font-weight-medium); - cursor: pointer; - padding: 0; - text-decoration: underline; -} - -.link-btn:hover { - color: var(--primary-blue-dark); -} - - -/* === USER MENU DROPDOWN === */ -.user-menu { - position: relative; -} - -.user-menu-trigger { - cursor: pointer; - border: 2px solid transparent; - transition: all var(--transition-fast); -} - -.user-menu-trigger:hover { - border-color: var(--primary-blue); -} - -.user-dropdown { - position: absolute; - top: calc(100% + var(--space-2)); - right: 0; - min-width: 220px; - background: var(--white); - border: 1px solid var(--gray-200); - border-radius: var(--radius-xl); - box-shadow: var(--shadow-lg); - z-index: 1000; - overflow: hidden; - animation: dropdownFadeIn 0.15s ease-out; -} - -@keyframes dropdownFadeIn { - from { - opacity: 0; - transform: translateY(-8px); - } - to { - opacity: 1; - transform: translateY(0); - } -} - -.user-dropdown-header { - padding: var(--space-4); - border-bottom: 1px solid var(--gray-100); -} - -.user-dropdown-name { - font-weight: var(--font-weight-semibold); - color: var(--gray-900); - font-size: var(--font-size-base); -} - -.user-dropdown-email { - font-size: var(--font-size-sm); - color: var(--gray-500); - margin-top: var(--space-1); -} - -.user-dropdown-divider { - height: 1px; - background: var(--gray-100); -} - -.user-dropdown-item { - display: flex; - align-items: center; - gap: var(--space-3); - width: 100%; - padding: var(--space-3) var(--space-4); - border: none; - background: none; - font-size: var(--font-size-base); - color: var(--gray-700); - cursor: pointer; - transition: all var(--transition-fast); - text-align: left; -} - -.user-dropdown-item:hover { - background: var(--gray-50); -} - -.user-dropdown-item .icon { - width: 18px; - height: 18px; -} - -.user-dropdown-logout { - color: var(--red-600, #dc2626); -} - -.user-dropdown-logout:hover { - background: var(--red-50, #fef2f2); -} - -/* === CLINICAL CODING PAGE === */ -.clinical-coding-page .page-header-icon { - color: var(--white); -} - -.clinical-coding-page .page-header-icon .icon { - width: 28px; - height: 28px; -} - -.search-input-lg { - position: relative; -} - -.search-input-lg .input { - padding-left: var(--space-12); - font-size: var(--font-size-lg); -} - -.search-input-lg .search-icon { - position: absolute; - left: var(--space-4); - top: 50%; - transform: translateY(-50%); - color: var(--gray-400); -} - -.search-input-lg .search-icon .icon { - width: 24px; - height: 24px; -} - -.code-results-grid { - display: grid; - grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); - gap: var(--space-4); -} - -.code-card { - padding: var(--space-5); - transition: all var(--transition-fast); -} - -.code-card:hover { - transform: translateY(-4px); - box-shadow: var(--shadow-lg); -} - -.hover-lift { - transition: transform var(--transition-fast), box-shadow var(--transition-fast); -} - -.hover-lift:hover { - transform: translateY(-2px); -} - -.line-clamp-2 { - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; - overflow: hidden; -} - -.whitespace-pre-wrap { - white-space: pre-wrap; -} - -.checkbox { - width: 18px; - height: 18px; - accent-color: var(--primary-blue); - cursor: pointer; -} - -@keyframes spin { - from { transform: rotate(0deg); } - to { transform: rotate(360deg); } -} - -/* === SEARCH RESULT TABLE ROW WITH HOVER TOOLTIP === */ -.search-result-row { - cursor: pointer; - transition: background var(--transition-fast); -} - -.search-result-row:hover { - background: var(--primary-blue-subtle); -} - -.result-description-cell { - position: relative; - max-width: 400px; -} - -.result-description-cell > span { - display: block; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.result-tooltip { - position: absolute; - left: 0; - top: 100%; - z-index: 100; - min-width: 320px; - max-width: 400px; - padding: var(--space-4); - background: var(--white); - border: 1px solid var(--gray-200); - border-radius: var(--radius-lg); - box-shadow: var(--shadow-lg); - opacity: 0; - visibility: hidden; - transform: translateY(8px); - transition: all var(--transition-fast); - pointer-events: none; -} - -.result-description-cell:hover .result-tooltip { - opacity: 1; - visibility: visible; - transform: translateY(4px); -} - -.result-tooltip::before { - content: ''; - position: absolute; - top: -8px; - left: 24px; - border: 8px solid transparent; - border-bottom-color: var(--white); - border-top: none; -} - diff --git a/Dashboard/Dashboard.Web/wwwroot/css/layout.css b/Dashboard/Dashboard.Web/wwwroot/css/layout.css deleted file mode 100644 index 61db926..0000000 --- a/Dashboard/Dashboard.Web/wwwroot/css/layout.css +++ /dev/null @@ -1,1460 +0,0 @@ -/* Medical Dashboard - Premium Layout Styles */ -/* Inspired by Wellmetrix & CareIQ Designs */ - -/* === APP CONTAINER === */ -.app { - display: flex; - min-height: 100vh; -} - -/* === SIDEBAR === */ -.sidebar { - position: fixed; - left: 0; - top: 0; - bottom: 0; - width: var(--sidebar-width); - background: var(--white); - border-right: 1px solid var(--gray-100); - box-shadow: var(--shadow-lg); - display: flex; - flex-direction: column; - z-index: var(--z-fixed); - transition: all var(--transition-slow); -} - -.sidebar.collapsed { - width: var(--sidebar-collapsed-width); -} - -.sidebar-header { - display: flex; - align-items: center; - gap: var(--space-3); - padding: var(--space-5) var(--space-6); - border-bottom: 1px solid var(--gray-100); - min-height: var(--header-height); -} - -.sidebar-logo { - display: flex; - align-items: center; - gap: var(--space-3); - text-decoration: none; - color: var(--gray-900); -} - -.sidebar-logo-icon { - width: 44px; - height: 44px; - background: var(--gradient-primary); - border-radius: var(--radius-xl); - display: flex; - align-items: center; - justify-content: center; - color: var(--white); - font-size: var(--font-size-xl); - font-weight: var(--font-weight-bold); - flex-shrink: 0; - box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); -} - -.sidebar-logo-text { - font-size: var(--font-size-xl); - font-weight: var(--font-weight-bold); - white-space: nowrap; - overflow: hidden; - letter-spacing: var(--letter-spacing-tight); - background: var(--gradient-primary); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - background-clip: text; -} - -.sidebar.collapsed .sidebar-logo-text { - display: none; -} - -.sidebar-nav { - flex: 1; - padding: var(--space-5) var(--space-4); - overflow-y: auto; -} - -.nav-section { - margin-bottom: var(--space-8); -} - -.nav-section-title { - font-size: var(--font-size-xs); - font-weight: var(--font-weight-semibold); - color: var(--gray-400); - text-transform: uppercase; - letter-spacing: var(--letter-spacing-wider); - padding: 0 var(--space-4); - margin-bottom: var(--space-3); -} - -.sidebar.collapsed .nav-section-title { - display: none; -} - -.nav-item { - position: relative; - display: flex; - align-items: center; - gap: var(--space-3); - padding: var(--space-3) var(--space-4); - border-radius: var(--radius-lg); - color: var(--gray-600); - text-decoration: none; - cursor: pointer; - transition: all var(--transition-fast); - margin-bottom: var(--space-1); - font-weight: var(--font-weight-medium); -} - -.nav-item:hover { - background: var(--gray-50); - color: var(--gray-900); -} - -.nav-item.active { - background: var(--primary-blue-subtle); - color: var(--primary-blue-dark); -} - -.nav-item.active::before { - content: ''; - position: absolute; - left: 0; - top: 50%; - transform: translateY(-50%); - width: 4px; - height: 24px; - background: var(--gradient-primary); - border-radius: 0 var(--radius-full) var(--radius-full) 0; -} - -.nav-item-icon { - width: 22px; - height: 22px; - flex-shrink: 0; - display: flex; - align-items: center; - justify-content: center; -} - -.nav-item-text { - font-size: var(--font-size-base); - white-space: nowrap; - overflow: hidden; -} - -.sidebar.collapsed .nav-item-text { - display: none; -} - -.nav-item-badge { - margin-left: auto; - padding: var(--space-0-5) var(--space-2); - font-size: var(--font-size-xs); - font-weight: var(--font-weight-bold); - background: var(--error); - color: var(--white); - border-radius: var(--radius-full); - min-width: 20px; - text-align: center; -} - -.sidebar.collapsed .nav-item-badge { - display: none; -} - -.sidebar-footer { - padding: var(--space-4); - padding-bottom: var(--space-6); - border-top: 1px solid var(--gray-100); - margin-top: auto; -} - -.sidebar-user { - display: flex; - align-items: center; - gap: var(--space-3); - padding: var(--space-3); - border-radius: var(--radius-xl); - cursor: pointer; - transition: all var(--transition-fast); - background: var(--gray-50); -} - -.sidebar-user:hover { - background: var(--gray-100); -} - -.sidebar-user-info { - flex: 1; - overflow: hidden; -} - -.sidebar.collapsed .sidebar-user-info { - display: none; -} - -.sidebar-user-name { - font-size: var(--font-size-base); - font-weight: var(--font-weight-semibold); - color: var(--gray-900); - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.sidebar-user-role { - font-size: var(--font-size-sm); - color: var(--gray-500); -} - -.sidebar-logout-btn { - margin-top: var(--space-3); - width: 100%; - display: flex; - align-items: center; - justify-content: center; - gap: var(--space-2); - background: var(--red-50, #fef2f2); - color: var(--red-600, #dc2626); - border: 1px solid var(--red-200, #fecaca); - padding: var(--space-2) var(--space-3); - border-radius: var(--radius-lg); - font-weight: var(--font-weight-medium); - cursor: pointer; - transition: all var(--transition-fast); -} - -.sidebar-logout-btn:hover { - background: var(--red-100, #fee2e2); - border-color: var(--red-300, #fca5a5); -} - -.sidebar.collapsed .sidebar-logout-btn span { - display: none; -} - -.sidebar.collapsed .sidebar-logout-btn { - padding: var(--space-2); -} - -.sidebar-toggle { - position: absolute; - right: -14px; - top: 50%; - transform: translateY(-50%); - width: 28px; - height: 28px; - background: var(--white); - border: 1px solid var(--gray-200); - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - box-shadow: var(--shadow-md); - transition: all var(--transition-fast); - z-index: 1; - color: var(--gray-500); -} - -.sidebar-toggle:hover { - background: var(--gray-50); - color: var(--gray-700); - box-shadow: var(--shadow-lg); -} - -/* === MAIN CONTENT === */ -.main-wrapper { - flex: 1; - margin-left: var(--sidebar-width); - min-width: 0; - transition: margin-left var(--transition-slow); - display: flex; - flex-direction: column; -} - -.sidebar.collapsed ~ .main-wrapper { - margin-left: var(--sidebar-collapsed-width); -} - -/* === HEADER === */ -.header { - position: sticky; - top: 0; - height: var(--header-height); - background: var(--glass-bg-strong); - backdrop-filter: blur(var(--glass-blur)); - -webkit-backdrop-filter: blur(var(--glass-blur)); - border-bottom: 1px solid var(--glass-border); - display: flex; - align-items: center; - justify-content: space-between; - padding: 0 var(--space-8); - z-index: var(--z-sticky); -} - -.header-left { - display: flex; - align-items: center; - gap: var(--space-6); -} - -.header-title { - font-size: var(--font-size-xl); - font-weight: var(--font-weight-semibold); - color: var(--gray-900); - letter-spacing: var(--letter-spacing-tight); -} - -.header-breadcrumb { - display: flex; - align-items: center; - gap: var(--space-2); - font-size: var(--font-size-sm); - color: var(--gray-500); -} - -.header-breadcrumb-separator { - color: var(--gray-300); -} - -.header-breadcrumb-link { - color: var(--gray-500); - text-decoration: none; - transition: color var(--transition-fast); -} - -.header-breadcrumb-link:hover { - color: var(--primary-blue); -} - -.header-breadcrumb-current { - color: var(--gray-900); - font-weight: var(--font-weight-medium); -} - -.header-right { - display: flex; - align-items: center; - gap: var(--space-4); -} - -.header-search { - position: relative; - width: 320px; - display: flex; - align-items: center; -} - -.header-search .icon { - position: absolute; - left: var(--space-4); - color: var(--gray-400); - pointer-events: none; - z-index: 1; -} - -.header-search .input { - padding-left: var(--space-11); - background: var(--white); - border: 1px solid var(--gray-200); - border-radius: var(--radius-xl); -} - -.header-search .input:focus { - background: var(--white); - border-color: var(--primary-blue); - box-shadow: 0 0 0 4px var(--primary-blue-glow); -} - -.header-actions { - display: flex; - align-items: center; - gap: var(--space-2); -} - -.header-action-btn { - position: relative; - width: 44px; - height: 44px; - display: flex; - align-items: center; - justify-content: center; - background: var(--white); - border: 1px solid var(--gray-200); - border-radius: var(--radius-xl); - color: var(--gray-600); - cursor: pointer; - transition: all var(--transition-fast); -} - -.header-action-btn:hover { - background: var(--gray-50); - border-color: var(--gray-300); - color: var(--gray-900); -} - -.header-action-badge { - position: absolute; - top: 8px; - right: 8px; - width: 10px; - height: 10px; - background: var(--error); - border-radius: 50%; - border: 2px solid var(--white); -} - -.header-user { - display: flex; - align-items: center; - gap: var(--space-3); - padding: var(--space-2) var(--space-3); - background: var(--white); - border: 1px solid var(--gray-200); - border-radius: var(--radius-xl); - cursor: pointer; - transition: all var(--transition-fast); -} - -.header-user:hover { - background: var(--gray-50); - border-color: var(--gray-300); -} - -/* === MAIN CONTENT AREA === */ -.main-content { - flex: 1; - padding: var(--space-8); - max-width: var(--content-max-width); -} - -.page-header { - margin-bottom: var(--space-8); -} - -.page-title { - font-size: var(--font-size-3xl); - font-weight: var(--font-weight-bold); - color: var(--gray-900); - margin-bottom: var(--space-2); - letter-spacing: var(--letter-spacing-tight); -} - -.page-description { - font-size: var(--font-size-md); - color: var(--gray-500); - margin-bottom: 0; -} - -.page-actions { - display: flex; - align-items: center; - gap: var(--space-3); - margin-top: var(--space-4); -} - -/* === DASHBOARD GRID === */ -.dashboard-grid { - display: grid; - gap: var(--space-6); -} - -.dashboard-grid.metrics { - grid-template-columns: repeat(4, 1fr); -} - -.dashboard-grid.charts { - grid-template-columns: repeat(2, 1fr); -} - -.dashboard-grid.mixed { - grid-template-columns: 2fr 1fr; -} - -.dashboard-grid.practitioners { - grid-template-columns: repeat(3, 1fr); -} - -.dashboard-section { - margin-bottom: var(--space-8); -} - -.dashboard-section-header { - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: var(--space-5); -} - -.dashboard-section-title { - font-size: var(--font-size-xl); - font-weight: var(--font-weight-semibold); - color: var(--gray-900); -} - -.dashboard-section-link { - font-size: var(--font-size-sm); - font-weight: var(--font-weight-medium); - color: var(--primary-blue); - text-decoration: none; - display: flex; - align-items: center; - gap: var(--space-1); - transition: color var(--transition-fast); -} - -.dashboard-section-link:hover { - color: var(--primary-blue-dark); -} - -/* === DASHBOARD PAGE === */ -.dashboard-page { - max-width: var(--content-max-width); -} - -.dashboard-welcome { - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: var(--space-8); -} - -.welcome-title { - font-size: var(--font-size-3xl); - font-weight: var(--font-weight-bold); - color: var(--gray-900); - letter-spacing: var(--letter-spacing-tight); -} - -.welcome-actions { - display: flex; - align-items: center; - gap: var(--space-4); -} - -.date-filter { - display: flex; - align-items: center; - gap: var(--space-2); - padding: var(--space-2-5) var(--space-4); - background: var(--white); - border: 1px solid var(--gray-200); - border-radius: var(--radius-xl); - font-size: var(--font-size-sm); - font-weight: var(--font-weight-medium); - color: var(--gray-700); - cursor: pointer; - transition: all var(--transition-fast); -} - -.date-filter:hover { - border-color: var(--gray-300); - box-shadow: var(--shadow-sm); -} - -/* === DASHBOARD METRICS ROW === */ -.dashboard-metrics-row { - display: grid; - grid-template-columns: repeat(4, 1fr); - gap: var(--space-6); - margin-bottom: var(--space-8); -} - -/* === RICH METRIC CARD === */ -.metric-card-rich { - background: var(--white); - border-radius: var(--radius-2xl); - padding: var(--space-6); - box-shadow: var(--shadow-card); - border: 1px solid var(--gray-100); - transition: all var(--transition-normal); -} - -.metric-card-rich:hover { - box-shadow: var(--shadow-card-hover); - transform: translateY(-2px); -} - -.metric-card-header { - display: flex; - align-items: center; - gap: var(--space-3); - margin-bottom: var(--space-4); -} - -.metric-card-icon { - width: 40px; - height: 40px; - display: flex; - align-items: center; - justify-content: center; - border-radius: var(--radius-lg); -} - -.metric-card-icon.blue { - background: var(--primary-blue-subtle); - color: var(--primary-blue); -} - -.metric-card-icon.teal { - background: var(--teal-soft); - color: var(--teal-dark); -} - -.metric-card-icon.coral { - background: var(--accent-coral-light); - color: var(--accent-coral); -} - -.metric-card-icon.violet { - background: var(--accent-violet-light); - color: var(--accent-violet); -} - -.metric-card-title { - flex: 1; - font-size: var(--font-size-sm); - font-weight: var(--font-weight-medium); - color: var(--gray-600); -} - -.metric-card-link { - font-size: var(--font-size-sm); - font-weight: var(--font-weight-medium); - color: var(--primary-blue); - text-decoration: none; - transition: color var(--transition-fast); -} - -.metric-card-link:hover { - color: var(--primary-blue-dark); -} - -.metric-card-body { - display: flex; - flex-direction: column; - gap: var(--space-3); -} - -.metric-card-value-row { - display: flex; - align-items: baseline; - gap: var(--space-3); -} - -.metric-card-value { - font-size: var(--font-size-4xl); - font-weight: var(--font-weight-bold); - color: var(--gray-900); - line-height: var(--line-height-none); - letter-spacing: var(--letter-spacing-tight); -} - -.metric-card-change { - display: inline-flex; - align-items: center; - gap: var(--space-1); - font-size: var(--font-size-sm); - font-weight: var(--font-weight-semibold); - padding: var(--space-1) var(--space-2); - border-radius: var(--radius-full); -} - -.metric-card-change.up { - background: var(--success-light); - color: var(--success); -} - -.metric-card-change.down { - background: var(--error-light); - color: var(--error); -} - -.metric-card-breakdown { - display: flex; - flex-wrap: wrap; - gap: var(--space-4); -} - -.metric-breakdown-item { - display: flex; - align-items: center; - gap: var(--space-2); - font-size: var(--font-size-sm); - color: var(--gray-600); -} - -.metric-breakdown-dot { - width: 10px; - height: 10px; - border-radius: 50%; -} - -/* === DASHBOARD MAIN GRID === */ -.dashboard-main-grid { - display: grid; - grid-template-columns: 2fr 1fr; - gap: var(--space-6); -} - -/* === CARD HEADER VARIANTS === */ -.card-header-left { - display: flex; - align-items: center; - gap: var(--space-3); -} - -.view-more-link { - font-size: var(--font-size-sm); - font-weight: var(--font-weight-medium); - color: var(--primary-blue); - text-decoration: none; -} - -.view-more-link:hover { - color: var(--primary-blue-dark); -} - -/* === CALENDAR STRIP === */ -.calendar-strip { - display: flex; - align-items: center; - gap: var(--space-2); - padding: var(--space-4) 0; - margin-bottom: var(--space-5); - border-bottom: 1px solid var(--gray-100); - overflow-x: auto; -} - -.calendar-nav { - width: 36px; - height: 36px; - display: flex; - align-items: center; - justify-content: center; - background: var(--white); - border: 1px solid var(--gray-200); - border-radius: 50%; - cursor: pointer; - color: var(--gray-600); - transition: all var(--transition-fast); - flex-shrink: 0; -} - -.calendar-nav:hover { - background: var(--gray-50); - border-color: var(--gray-300); - color: var(--gray-900); -} - -.calendar-day-btn { - width: 44px; - height: 44px; - display: flex; - align-items: center; - justify-content: center; - background: none; - border: none; - border-radius: 50%; - font-size: var(--font-size-sm); - font-weight: var(--font-weight-medium); - color: var(--gray-700); - cursor: pointer; - transition: all var(--transition-fast); - flex-shrink: 0; -} - -.calendar-day-btn:hover { - background: var(--gray-100); -} - -.calendar-day-btn.today { - background: var(--gradient-primary); - color: var(--white); - font-weight: var(--font-weight-semibold); -} - -.calendar-day-btn.selected { - background: var(--primary-blue-subtle); - color: var(--primary-blue-dark); -} - -.calendar-day-btn.has-events { - position: relative; -} - -.calendar-day-btn.has-events::after { - content: ''; - position: absolute; - bottom: 6px; - width: 5px; - height: 5px; - background: var(--primary-blue); - border-radius: 50%; -} - -/* === APPOINTMENT LEGEND === */ -.appointment-legend { - display: flex; - align-items: center; - gap: var(--space-5); - margin-left: auto; -} - -.legend-item { - display: flex; - align-items: center; - gap: var(--space-2); - font-size: var(--font-size-sm); - color: var(--gray-600); -} - -.legend-dot { - width: 10px; - height: 10px; - border-radius: 50%; -} - -.legend-dot.available { - background: var(--teal-soft); - border: 2px solid var(--teal-bold); -} - -.legend-dot.selected { - background: var(--primary-blue); -} - -.legend-dot.unavailable { - background: var(--gray-300); -} - -/* === APPOINTMENTS TABLE === */ -.appointments-table { - width: 100%; - border-collapse: collapse; -} - -.appointments-table th { - text-align: left; - padding: var(--space-4) var(--space-5); - font-size: var(--font-size-xs); - font-weight: var(--font-weight-semibold); - color: var(--gray-500); - text-transform: uppercase; - letter-spacing: var(--letter-spacing-wide); - border-bottom: 1px solid var(--gray-200); -} - -.appointments-table td { - padding: var(--space-4) var(--space-5); - font-size: var(--font-size-sm); - color: var(--gray-700); - border-bottom: 1px solid var(--gray-100); -} - -.appointments-table tbody tr { - transition: background var(--transition-fast); -} - -.appointments-table tbody tr:hover { - background: var(--gray-50); -} - -.patient-cell { - display: flex; - align-items: center; - gap: var(--space-3); - font-weight: var(--font-weight-medium); - color: var(--gray-900); -} - -.status-badge { - display: inline-flex; - align-items: center; - gap: var(--space-1); - padding: var(--space-1) var(--space-3); - border-radius: var(--radius-full); - font-size: var(--font-size-xs); - font-weight: var(--font-weight-semibold); -} - -.status-badge.confirmed { - background: var(--success-light); - color: var(--success); -} - -.status-badge.booked { - background: var(--primary-blue-subtle); - color: var(--primary-blue-dark); -} - -.status-badge.pending { - background: var(--warning-light); - color: var(--warning); -} - -.status-badge.cancelled { - background: var(--error-light); - color: var(--error); -} - -.action-buttons { - display: flex; - align-items: center; - gap: var(--space-2); -} - -.btn-icon-sm { - width: 36px; - height: 36px; - display: flex; - align-items: center; - justify-content: center; - background: var(--gray-100); - border: none; - border-radius: var(--radius-lg); - cursor: pointer; - font-size: var(--font-size-sm); - color: var(--gray-600); - transition: all var(--transition-fast); -} - -.btn-icon-sm:hover { - background: var(--gray-200); - color: var(--gray-900); -} - -.btn-icon-sm.call { - background: var(--primary-blue-subtle); - color: var(--primary-blue); -} - -.btn-icon-sm.call:hover { - background: var(--primary-blue); - color: var(--white); -} - -/* === APPOINTMENT REQUESTS === */ -.requests-list { - display: flex; - flex-direction: column; - gap: var(--space-4); -} - -.appointment-request { - display: flex; - justify-content: space-between; - align-items: center; - padding: var(--space-4); - background: var(--gray-50); - border-radius: var(--radius-xl); - transition: all var(--transition-fast); -} - -.appointment-request:hover { - background: var(--gray-100); -} - -.appointment-request-info { - display: flex; - align-items: center; - gap: var(--space-4); -} - -.appointment-request-details { - display: flex; - flex-direction: column; - gap: var(--space-1); -} - -.appointment-request-name { - font-weight: var(--font-weight-semibold); - color: var(--gray-900); -} - -.appointment-request-type { - font-size: var(--font-size-sm); - color: var(--gray-600); -} - -.appointment-request-time { - display: flex; - align-items: center; - gap: var(--space-1); - font-size: var(--font-size-sm); - color: var(--gray-500); -} - -.appointment-request-actions { - display: flex; - gap: var(--space-2); -} - -.btn-icon-circle { - width: 40px; - height: 40px; - display: flex; - align-items: center; - justify-content: center; - border: none; - border-radius: 50%; - font-size: var(--font-size-lg); - cursor: pointer; - transition: all var(--transition-fast); -} - -.btn-icon-circle.reject { - background: var(--gray-200); - color: var(--gray-600); -} - -.btn-icon-circle.reject:hover { - background: var(--error-light); - color: var(--error); -} - -.btn-icon-circle.accept { - background: var(--gradient-primary); - color: var(--white); -} - -.btn-icon-circle.accept:hover { - transform: scale(1.05); - box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); -} - -/* === QUICK ACTIONS === */ -.quick-actions-card { - margin-top: var(--space-5); -} - -.quick-actions-grid { - display: grid; - grid-template-columns: repeat(2, 1fr); - gap: var(--space-4); -} - -.quick-action-btn { - display: flex; - flex-direction: column; - align-items: center; - gap: var(--space-2); - padding: var(--space-5); - background: var(--white); - border: 1px solid var(--gray-200); - border-radius: var(--radius-xl); - font-size: var(--font-size-sm); - font-weight: var(--font-weight-medium); - color: var(--gray-700); - cursor: pointer; - transition: all var(--transition-fast); -} - -.quick-action-btn:hover { - border-color: var(--primary-blue); - color: var(--primary-blue); - box-shadow: var(--shadow-md); -} - -.quick-action-btn.primary { - background: var(--gradient-primary); - border-color: transparent; - color: var(--white); -} - -.quick-action-btn.primary:hover { - transform: translateY(-2px); - box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4); -} - -.quick-action-btn .icon { - width: 28px; - height: 28px; -} - -/* === DASHBOARD CHARTS SECTION === */ -.dashboard-charts-section { - display: grid; - grid-template-columns: repeat(2, 1fr); - gap: var(--space-6); - margin-top: var(--space-8); -} - -.dashboard-charts-section .card { - background: var(--glass-bg-strong); - backdrop-filter: blur(var(--glass-blur)); -} - -.dashboard-charts-section .card-body { - padding: var(--space-4); -} - -/* Google Charts Container */ -.google-chart-container { - width: 100%; - min-height: 200px; - border-radius: var(--radius-lg); - overflow: hidden; -} - -.google-chart-container svg { - border-radius: var(--radius-lg); -} - -/* === CHART WRAPPER === */ -.chart-wrapper { - background: var(--white); - border-radius: var(--radius-2xl); - padding: var(--space-6); - box-shadow: var(--shadow-card); -} - -.chart-header { - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: var(--space-5); -} - -.chart-title { - font-size: var(--font-size-lg); - font-weight: var(--font-weight-semibold); - color: var(--gray-900); -} - -.chart-subtitle { - font-size: var(--font-size-sm); - color: var(--gray-500); - margin-top: var(--space-1); -} - -.chart-body { - min-height: 300px; -} - -.chart-footer { - margin-top: var(--space-4); - padding-top: var(--space-4); - border-top: 1px solid var(--gray-100); -} - -/* === DONUT CHART === */ -.donut-chart-container { - display: flex; - justify-content: center; - align-items: center; - margin: var(--space-4) 0; -} - -.donut-legend { - display: flex; - flex-wrap: wrap; - gap: var(--space-4); - justify-content: center; - margin-top: var(--space-4); -} - -.donut-legend-item { - display: flex; - flex-direction: column; - align-items: center; - gap: var(--space-1); -} - -.donut-legend-item span { - font-size: var(--font-size-sm); - font-weight: var(--font-weight-semibold); - color: var(--gray-700); -} - -/* === PATIENT BREAKDOWN BARS === */ -.patient-breakdown-bars { - display: flex; - flex-direction: column; - gap: var(--space-3); - margin-top: var(--space-4); -} - -.breakdown-bar-item { - display: flex; - align-items: center; - gap: var(--space-3); -} - -.breakdown-bar-label { - font-size: var(--font-size-sm); - color: var(--gray-600); - min-width: 100px; -} - -.breakdown-bar-value { - font-size: var(--font-size-sm); - font-weight: var(--font-weight-semibold); - color: var(--gray-900); - min-width: 40px; - text-align: right; -} - -.breakdown-bar { - flex: 1; - height: 8px; - background: var(--gray-100); - border-radius: var(--radius-full); - overflow: hidden; -} - -.breakdown-bar-fill { - height: 100%; - border-radius: var(--radius-full); - transition: width var(--transition-slow); -} - -/* === DATA LIST === */ -.data-list { - display: flex; - flex-direction: column; - gap: var(--space-3); -} - -.data-list-item { - display: flex; - align-items: center; - gap: var(--space-4); - padding: var(--space-5); - background: var(--white); - border-radius: var(--radius-xl); - box-shadow: var(--shadow-sm); - transition: all var(--transition-fast); - cursor: pointer; - border: 1px solid var(--gray-100); -} - -.data-list-item:hover { - box-shadow: var(--shadow-md); - transform: translateY(-2px); - border-color: var(--gray-200); -} - -.data-list-item-content { - flex: 1; - min-width: 0; -} - -.data-list-item-title { - font-weight: var(--font-weight-semibold); - color: var(--gray-900); - margin-bottom: var(--space-1); -} - -.data-list-item-subtitle { - font-size: var(--font-size-sm); - color: var(--gray-500); -} - -.data-list-item-meta { - font-size: var(--font-size-sm); - color: var(--gray-400); - text-align: right; -} - -/* === PRACTITIONER CARD === */ -.practitioner-card { - display: flex; - flex-direction: column; - align-items: center; - text-align: center; - padding: var(--space-6); -} - -.practitioner-avatar { - margin-bottom: var(--space-4); -} - -.practitioner-name { - font-size: var(--font-size-lg); - font-weight: var(--font-weight-semibold); - color: var(--gray-900); - margin-bottom: var(--space-1); -} - -.practitioner-specialty { - font-size: var(--font-size-sm); - color: var(--gray-600); - margin-bottom: var(--space-3); -} - -.practitioner-meta { - display: flex; - gap: var(--space-2); - flex-wrap: wrap; - justify-content: center; -} - -.practitioner-edit-btn { - position: absolute; - top: var(--space-3); - right: var(--space-3); - width: 32px; - height: 32px; - display: flex; - align-items: center; - justify-content: center; - background: var(--white); - border: 1px solid var(--gray-200); - border-radius: var(--radius-lg); - cursor: pointer; - color: var(--gray-500); - transition: all var(--transition-fast); - opacity: 0; -} - -.practitioner-card:hover .practitioner-edit-btn { - opacity: 1; -} - -.practitioner-edit-btn:hover { - background: var(--primary-blue-subtle); - border-color: var(--primary-blue); - color: var(--primary-blue); -} - -/* === RESPONSIVE === */ -@media (max-width: 1440px) { - .dashboard-metrics-row { - grid-template-columns: repeat(4, 1fr); - } -} - -@media (max-width: 1280px) { - .dashboard-metrics-row { - grid-template-columns: repeat(2, 1fr); - } - - .dashboard-grid.metrics { - grid-template-columns: repeat(2, 1fr); - } - - .dashboard-grid.charts, - .dashboard-grid.mixed { - grid-template-columns: 1fr; - } - - .dashboard-grid.practitioners { - grid-template-columns: repeat(2, 1fr); - } - - .dashboard-main-grid { - grid-template-columns: 1fr; - } -} - -@media (max-width: 1024px) { - .sidebar { - transform: translateX(-100%); - } - - .sidebar.open { - transform: translateX(0); - } - - .main-wrapper { - margin-left: 0; - } - - .sidebar.collapsed ~ .main-wrapper { - margin-left: 0; - } - - .header { - padding: 0 var(--space-4); - } - - .header-search { - display: none; - } -} - -@media (max-width: 768px) { - .dashboard-metrics-row, - .dashboard-grid.metrics, - .dashboard-grid.practitioners { - grid-template-columns: 1fr; - } - - .dashboard-welcome { - flex-direction: column; - align-items: flex-start; - gap: var(--space-4); - } - - .header { - padding: 0 var(--space-4); - height: 64px; - } - - .main-content { - padding: var(--space-4); - } - - .page-title { - font-size: var(--font-size-2xl); - } - - .quick-actions-grid { - grid-template-columns: 1fr; - } -} - -/* === MOBILE OVERLAY === */ -.sidebar-overlay { - display: none; - position: fixed; - inset: 0; - background: rgba(0, 0, 0, 0.5); - backdrop-filter: blur(4px); - z-index: calc(var(--z-fixed) - 1); - opacity: 0; - visibility: hidden; - transition: all var(--transition-normal); -} - -@media (max-width: 1024px) { - .sidebar-overlay { - display: block; - } - - .sidebar.open ~ .sidebar-overlay { - opacity: 1; - visibility: visible; - } -} - -/* === MOBILE MENU BUTTON === */ -.mobile-menu-btn { - display: none; - width: 44px; - height: 44px; - align-items: center; - justify-content: center; - background: var(--white); - border: 1px solid var(--gray-200); - border-radius: var(--radius-lg); - color: var(--gray-600); - cursor: pointer; -} - -@media (max-width: 1024px) { - .mobile-menu-btn { - display: flex; - } -} diff --git a/Dashboard/Dashboard.Web/wwwroot/css/variables.css b/Dashboard/Dashboard.Web/wwwroot/css/variables.css deleted file mode 100644 index fd6ca9c..0000000 --- a/Dashboard/Dashboard.Web/wwwroot/css/variables.css +++ /dev/null @@ -1,203 +0,0 @@ -/* Medical Dashboard Design System - Premium CSS Variables */ -/* Inspired by Wellmetrix & CareIQ - Modern Healthcare Aesthetic */ - -@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap'); - -:root { - /* === PRIMARY COLORS - Rich Blue Palette === */ - --primary-blue-dark: #1e40af; - --primary-blue: #3b82f6; - --primary-blue-light: #60a5fa; - --primary-blue-subtle: #eff6ff; - --primary-blue-glow: rgba(59, 130, 246, 0.25); - - /* === TEAL ACCENT - Fresh & Medical === */ - --teal-soft: #ccfbf1; - --teal-medium: #2dd4bf; - --teal-bold: #14b8a6; - --teal-dark: #0d9488; - --teal-glow: rgba(20, 184, 166, 0.2); - - /* === ACCENT COLORS - Visual Interest === */ - --accent-coral: #f97316; - --accent-coral-light: #ffedd5; - --accent-violet: #8b5cf6; - --accent-violet-light: #ede9fe; - --accent-rose: #f43f5e; - --accent-rose-light: #ffe4e6; - --accent-amber: #f59e0b; - --accent-amber-light: #fef3c7; - - /* === NEUTRALS - Refined Grays === */ - --white: #ffffff; - --gray-25: #fcfcfd; - --gray-50: #f9fafb; - --gray-100: #f3f4f6; - --gray-200: #e5e7eb; - --gray-300: #d1d5db; - --gray-400: #9ca3af; - --gray-500: #6b7280; - --gray-600: #4b5563; - --gray-700: #374151; - --gray-800: #1f2937; - --gray-900: #111827; - --gray-950: #030712; - --black: #000000; - - /* === SEMANTIC COLORS - Enhanced === */ - --success: #22c55e; - --success-light: #dcfce7; - --success-dark: #16a34a; - --warning: #f59e0b; - --warning-light: #fef3c7; - --warning-dark: #d97706; - --error: #ef4444; - --error-light: #fee2e2; - --error-dark: #dc2626; - --info: #3b82f6; - --info-light: #dbeafe; - --info-dark: #2563eb; - - /* === PREMIUM GRADIENTS === */ - --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%); - --gradient-teal: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%); - --gradient-warm: linear-gradient(135deg, #f97316 0%, #ea580c 100%); - --gradient-cool: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); - --gradient-subtle: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); - --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%); - --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); - --gradient-mesh: - radial-gradient(at 40% 20%, rgba(59, 130, 246, 0.15) 0px, transparent 50%), - radial-gradient(at 80% 0%, rgba(20, 184, 166, 0.1) 0px, transparent 50%), - radial-gradient(at 0% 50%, rgba(139, 92, 246, 0.08) 0px, transparent 50%), - radial-gradient(at 80% 50%, rgba(249, 115, 22, 0.06) 0px, transparent 50%), - radial-gradient(at 0% 100%, rgba(59, 130, 246, 0.1) 0px, transparent 50%); - - /* === GLASSMORPHISM - Premium Effects === */ - --glass-bg: rgba(255, 255, 255, 0.6); - --glass-bg-strong: rgba(255, 255, 255, 0.85); - --glass-bg-subtle: rgba(255, 255, 255, 0.4); - --glass-border: rgba(255, 255, 255, 0.5); - --glass-border-subtle: rgba(255, 255, 255, 0.2); - --glass-shadow: rgba(0, 0, 0, 0.04); - --glass-blur: 20px; - --glass-blur-strong: 40px; - - /* === SHADOWS - Layered Depth === */ - --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04); - --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04); - --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04); - --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04); - --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03); - --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15); - --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.04); - --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.3); - --shadow-glow-teal: 0 0 20px rgba(20, 184, 166, 0.3); - --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 16px rgba(0, 0, 0, 0.06); - --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 28px rgba(0, 0, 0, 0.1); - --shadow-floating: 0 20px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08); - - /* === SPACING (8px base) === */ - --space-0: 0; - --space-px: 1px; - --space-0-5: 0.125rem; /* 2px */ - --space-1: 0.25rem; /* 4px */ - --space-1-5: 0.375rem; /* 6px */ - --space-2: 0.5rem; /* 8px */ - --space-2-5: 0.625rem; /* 10px */ - --space-3: 0.75rem; /* 12px */ - --space-3-5: 0.875rem; /* 14px */ - --space-4: 1rem; /* 16px */ - --space-5: 1.25rem; /* 20px */ - --space-6: 1.5rem; /* 24px */ - --space-7: 1.75rem; /* 28px */ - --space-8: 2rem; /* 32px */ - --space-9: 2.25rem; /* 36px */ - --space-10: 2.5rem; /* 40px */ - --space-11: 2.75rem; /* 44px */ - --space-12: 3rem; /* 48px */ - --space-14: 3.5rem; /* 56px */ - --space-16: 4rem; /* 64px */ - --space-20: 5rem; /* 80px */ - --space-24: 6rem; /* 96px */ - - /* === BORDER RADIUS - Softer Curves === */ - --radius-none: 0; - --radius-sm: 6px; - --radius-md: 10px; - --radius-lg: 14px; - --radius-xl: 18px; - --radius-2xl: 24px; - --radius-3xl: 32px; - --radius-full: 9999px; - - /* === TYPOGRAPHY - Inter Font === */ - --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; - --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', Consolas, monospace; - - --font-size-2xs: 0.625rem; /* 10px */ - --font-size-xs: 0.6875rem; /* 11px */ - --font-size-sm: 0.8125rem; /* 13px */ - --font-size-base: 0.9375rem; /* 15px */ - --font-size-md: 1rem; /* 16px */ - --font-size-lg: 1.125rem; /* 18px */ - --font-size-xl: 1.25rem; /* 20px */ - --font-size-2xl: 1.5rem; /* 24px */ - --font-size-3xl: 1.875rem; /* 30px */ - --font-size-4xl: 2.25rem; /* 36px */ - --font-size-5xl: 3rem; /* 48px */ - --font-size-6xl: 3.75rem; /* 60px */ - - --font-weight-light: 300; - --font-weight-normal: 400; - --font-weight-medium: 500; - --font-weight-semibold: 600; - --font-weight-bold: 700; - --font-weight-extrabold: 800; - - --line-height-none: 1; - --line-height-tight: 1.2; - --line-height-snug: 1.375; - --line-height-normal: 1.5; - --line-height-relaxed: 1.625; - --line-height-loose: 2; - - --letter-spacing-tighter: -0.05em; - --letter-spacing-tight: -0.025em; - --letter-spacing-normal: 0; - --letter-spacing-wide: 0.025em; - --letter-spacing-wider: 0.05em; - --letter-spacing-widest: 0.1em; - - /* === LAYOUT === */ - --sidebar-width: 280px; - --sidebar-collapsed-width: 80px; - --header-height: 72px; - --content-max-width: 1600px; - --card-min-height: 120px; - - /* === TRANSITIONS - Smooth & Refined === */ - --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1); - --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1); - --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1); - --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1); - --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55); - --transition-spring: 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275); - - /* === Z-INDEX === */ - --z-base: 0; - --z-dropdown: 100; - --z-sticky: 200; - --z-fixed: 300; - --z-modal-backdrop: 400; - --z-modal: 500; - --z-popover: 600; - --z-tooltip: 700; - --z-notification: 800; - - /* === BORDERS === */ - --border-width: 1px; - --border-color: var(--gray-200); - --border-color-light: var(--gray-100); - --border-color-dark: var(--gray-300); -} diff --git a/Dashboard/Dashboard.Web/wwwroot/index.html b/Dashboard/Dashboard.Web/wwwroot/index.html deleted file mode 100644 index 2b551b3..0000000 --- a/Dashboard/Dashboard.Web/wwwroot/index.html +++ /dev/null @@ -1,3623 +0,0 @@ - - - - - - - Healthcare Dashboard - - - - - - - - - - - - - - - - - - - - - -
- -
Healthcare Dashboard
-
-
- - -
- - - - - - - - - - - diff --git a/Dashboard/Dashboard.Web/wwwroot/js/Dashboard.js b/Dashboard/Dashboard.Web/wwwroot/js/Dashboard.js deleted file mode 100644 index 8c7b1d9..0000000 --- a/Dashboard/Dashboard.Web/wwwroot/js/Dashboard.js +++ /dev/null @@ -1,57824 +0,0 @@ -/** - * @version : - H5.NET - * @author : Object.NET, Inc., Curiosity GmbH. - * @copyright : Copyright 2008-2019 Object.NET, Inc., Copyright 2019-2026 Curiosity GmbH - * @license : See https://github.com/curiosity-ai/h5/blob/master/LICENSE. - */ - - - // @source Init.js - -(function (globals) { - "use strict"; - - if (typeof module !== "undefined" && module.exports) { - globals = global; - } - - // @source Core.js - - var core = { - global: globals, - - isNode: Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]", - - emptyFn: function () { }, - - identity: function (x) { - return x; - }, - - Deconstruct: function (obj) { - var args = Array.prototype.slice.call(arguments, 1); - - for (var i = 0; i < args.length; i++) { - args[i].v = i == 7 ? obj["Rest"] : obj["Item" + (i + 1)]; - } - }, - - toString: function (instance) { - if (instance == null) { - throw new System.ArgumentNullException(); - } - - var guardItem = H5.$toStringGuard[H5.$toStringGuard.length - 1]; - - if (instance.toString === Object.prototype.toString || guardItem && guardItem === instance) { - return H5.Reflection.getTypeFullName(instance); - } - - H5.$toStringGuard.push(instance); - - var result = instance.toString(); - - H5.$toStringGuard.pop(); - - return result; - }, - - geti: function (scope, name1, name2) { - if (scope[name1] !== undefined) { - return name1; - } - - if (name2 && scope[name2] != undefined) { - return name2; - } - - var name = name2 || name1; - var idx = name.lastIndexOf("$"); - - if (/\$\d+$/g.test(name)) { - idx = name.lastIndexOf("$", idx - 1); - } - - return name.substr(idx + 1); - }, - - box: function (v, T, toStr, hashCode) { - if (v && v.$boxed) { - return v; - } - - if (v == null) { - return v; - } - - if (v.$clone) { - v = v.$clone(); - } - - return { - $boxed: true, - fn: { - toString: toStr, - getHashCode: hashCode - }, - v: v, - type: T, - constructor: T, - getHashCode: function () { - return this.fn.getHashCode ? this.fn.getHashCode(this.v) : H5.getHashCode(this.v); - }, - equals: function (o) { - if (this === o) { - return true; - } - - var eq = this.equals; - this.equals = null; - var r = H5.equals(this.v, o); - this.equals = eq; - - return r; - }, - valueOf: function () { - return this.v; - }, - toString: function () { - return this.fn.toString ? this.fn.toString(this.v) : this.v.toString(); - } - }; - }, - - unbox: function (o, noclone) { - var T; - - if (noclone && H5.isFunction(noclone)) { - T = noclone; - noclone = false; - } - - if (o && o.$boxed) { - var v = o.v, - t = o.type; - - if (T && T.$nullable) { - T = T.$nullableType; - } - - if (T && T.$kind === "enum") { - T = System.Enum.getUnderlyingType(T); - } - - if (t.$nullable) { - t = t.$nullableType; - } - - if (t.$kind === "enum") { - t = System.Enum.getUnderlyingType(t); - } - - if (T && T !== t && !H5.isObject(T)) { - throw new System.InvalidCastException.$ctor1("Specified cast is not valid."); - } - - if (!noclone && v && v.$clone) { - v = v.$clone(); - } - - return v; - } - - if (H5.isArray(o)) { - for (var i = 0; i < o.length; i++) { - var item = o[i]; - - if (item && item.$boxed) { - item = item.v; - - if (item.$clone) { - item = item.$clone(); - } - } else if (!noclone && item && item.$clone) { - item = item.$clone(); - } - - o[i] = item; - } - } - - if (o && !noclone && o.$clone) { - o = o.$clone(); - } - - return o; - }, - - virtualc: function (name) { - return H5.virtual(name, true); - }, - - virtual: function (name, isClass) { - var type = H5.unroll(name); - - if (!type || !H5.isFunction(type)) { - var old = H5.Class.staticInitAllow; - type = isClass ? H5.define(name) : H5.definei(name); - H5.Class.staticInitAllow = true; - - if (type.$staticInit) { - type.$staticInit(); - } - - H5.Class.staticInitAllow = old; - } - - return type; - }, - - safe: function (fn) { - try { - return fn(); - } catch (ex) { - } - - return false; - }, - - literal: function (type, obj) { - obj.$getType = function () { return type }; - - return obj; - }, - - isJSObject: function (value) { - return Object.prototype.toString.call(value) === "[object Object]"; - }, - - isPlainObject: function (obj) { - if (typeof obj == "object" && obj !== null) { - if (typeof Object.getPrototypeOf == "function") { - var proto = Object.getPrototypeOf(obj); - - return proto === Object.prototype || proto === null; - } - - return Object.prototype.toString.call(obj) === "[object Object]"; - } - - return false; - }, - - toPlain: function (o) { - if (!o || H5.isPlainObject(o) || typeof o != "object") { - return o; - } - - if (typeof o.toJSON == "function") { - return o.toJSON(); - } - - if (H5.isArray(o)) { - var arr = []; - - for (var i = 0; i < o.length; i++) { - arr.push(H5.toPlain(o[i])); - } - - return arr; - } - - var newo = {}, - m; - - for (var key in o) { - m = o[key]; - - if (!H5.isFunction(m)) { - newo[key] = m; - } - } - - return newo; - }, - - ref: function (o, n) { - if (H5.isArray(n)) { - n = System.Array.toIndex(o, n); - } - - var proxy = {}; - - Object.defineProperty(proxy, "v", { - get: function () { - if (n == null) { - return o; - } - - return o[n]; - }, - - set: function (value) { - if (n == null) { - if (value && value.$clone) { - value.$clone(o); - } else { - o = value; - } - } - - o[n] = value; - } - }); - - return proxy; - }, - - ensureBaseProperty: function (scope, name, alias) { - var scopeType = H5.getType(scope), - descriptors = scopeType.$descriptors || []; - - scope.$propMap = scope.$propMap || {}; - - if (scope.$propMap[name]) { - return scope; - } - - if ((!scopeType.$descriptors || scopeType.$descriptors.length === 0) && alias) { - var aliasCfg = {}, - aliasName = "$" + alias + "$" + name; - - aliasCfg.get = function () { - return scope[name]; - }; - - aliasCfg.set = function (value) { - scope[name] = value; - }; - - H5.property(scope, aliasName, aliasCfg, false, scopeType, true); - } - else { - for (var j = 0; j < descriptors.length; j++) { - var d = descriptors[j]; - - if (d.name === name) { - var aliasCfg = {}, - aliasName = "$" + H5.getTypeAlias(d.cls) + "$" + name; - - if (d.get) { - aliasCfg.get = d.get; - } - - if (d.set) { - aliasCfg.set = d.set; - } - - H5.property(scope, aliasName, aliasCfg, false, scopeType, true); - } - } - } - - scope.$propMap[name] = true; - - return scope; - }, - - property: function (scope, name, v, statics, cls, alias) { - var cfg = { - enumerable: alias ? false : true, - configurable: true - }; - - if (v && v.get) { - cfg.get = v.get; - } - - if (v && v.set) { - cfg.set = v.set; - } - - if (!v || !(v.get || v.set)) { - var backingField = H5.getTypeAlias(cls) + "$" + name; - - cls.$init = cls.$init || {}; - - if (statics) { - cls.$init[backingField] = v; - } - - (function (cfg, scope, backingField, v) { - cfg.get = function () { - var o = this.$init[backingField]; - - return o === undefined ? v : o; - }; - - cfg.set = function (value) { - this.$init[backingField] = value; - }; - })(cfg, scope, backingField, v); - } - - Object.defineProperty(scope, name, cfg); - - return cfg; - }, - - event: function (scope, name, v, statics) { - scope[name] = v; - - var rs = name.charAt(0) === "$", - cap = rs ? name.slice(1) : name, - addName = "add" + cap, - removeName = "remove" + cap, - lastSep = name.lastIndexOf("$"), - endsNum = lastSep > 0 && ((name.length - lastSep - 1) > 0) && !isNaN(parseInt(name.substr(lastSep + 1))); - - if (endsNum) { - lastSep = name.substring(0, lastSep - 1).lastIndexOf("$"); - } - - if (lastSep > 0 && lastSep !== (name.length - 1)) { - addName = name.substring(0, lastSep) + "add" + name.substr(lastSep + 1); - removeName = name.substring(0, lastSep) + "remove" + name.substr(lastSep + 1); - } - - scope[addName] = (function (name, scope, statics) { - return statics ? function (value) { - scope[name] = H5.fn.combine(scope[name], value); - } : function (value) { - this[name] = H5.fn.combine(this[name], value); - }; - })(name, scope, statics); - - scope[removeName] = (function (name, scope, statics) { - return statics ? function (value) { - scope[name] = H5.fn.remove(scope[name], value); - } : function (value) { - this[name] = H5.fn.remove(this[name], value); - }; - })(name, scope, statics); - }, - - createInstance: function (type, nonPublic, args) { - if (H5.isArray(nonPublic)) { - args = nonPublic; - nonPublic = false; - } - - if (type === System.Decimal) { - return System.Decimal.Zero; - } - - if (type === System.Int64) { - return System.Int64.Zero; - } - - if (type === System.UInt64) { - return System.UInt64.Zero; - } - - if (type === System.Double || - type === System.Single || - type === System.Byte || - type === System.SByte || - type === System.Int16 || - type === System.UInt16 || - type === System.Int32 || - type === System.UInt32 || - type === H5.Int) { - return 0; - } - - if (typeof (type.createInstance) === "function") { - return type.createInstance(); - } else if (typeof (type.getDefaultValue) === "function") { - return type.getDefaultValue(); - } else if (type === Boolean || type === System.Boolean) { - return false; - } else if (type === System.DateTime) { - return System.DateTime.getDefaultValue(); - } else if (type === Date) { - return new Date(); - } else if (type === Number) { - return 0; - } else if (type === String || type === System.String) { - return ""; - } else if (type && type.$literal) { - return type.ctor(); - } else if (args && args.length > 0) { - return H5.Reflection.applyConstructor(type, args); - } - - if (type.$kind === 'interface') { - throw new System.MissingMethodException.$ctor1('Default constructor not found for type ' + H5.getTypeName(type)); - } - - var ctors = H5.Reflection.getMembers(type, 1, 54); - - if (ctors.length > 0) { - var pctors = ctors.filter(function (c) { return !c.isSynthetic && !c.sm; }); - - for (var idx = 0; idx < pctors.length; idx++) { - var c = pctors[idx], - isDefault = (c.pi || []).length === 0; - - if (isDefault) { - if (nonPublic || c.a === 2) { - return H5.Reflection.invokeCI(c, []); - } - throw new System.MissingMethodException.$ctor1('Default constructor not found for type ' + H5.getTypeName(type)); - } - } - - if (type.$$name && !(ctors.length == 1 && ctors[0].isSynthetic)) { - throw new System.MissingMethodException.$ctor1('Default constructor not found for type ' + H5.getTypeName(type)); - } - } - - return new type(); - }, - - clone: function (obj) { - if (obj == null) { - return obj; - } - - if (H5.isArray(obj)) { - return System.Array.clone(obj); - } - - if (H5.isString(obj)) { - return obj; - } - - var name; - - if (H5.isFunction(H5.getProperty(obj, name = "System$ICloneable$clone"))) { - return obj[name](); - } - - if (H5.is(obj, System.ICloneable)) { - return obj.clone(); - } - - if (H5.isFunction(obj.$clone)) { - return obj.$clone(); - } - - return null; - }, - - copy: function (to, from, keys, toIf) { - if (typeof keys === "string") { - keys = keys.split(/[,;\s]+/); - } - - for (var name, i = 0, n = keys ? keys.length : 0; i < n; i++) { - name = keys[i]; - - if (toIf !== true || to[name] == undefined) { - if (H5.is(from[name], System.ICloneable)) { - to[name] = H5.clone(from[name]); - } else { - to[name] = from[name]; - } - } - } - - return to; - }, - - get: function (t) { - if (t && t.$staticInit !== null) { - t.$staticInit(); - } - - return t; - }, - - ns: function (ns, scope) { - var nsParts = ns.split("."), - i = 0; - - if (!scope) { - scope = H5.global; - } - - for (i = 0; i < nsParts.length; i++) { - if (typeof scope[nsParts[i]] === "undefined") { - scope[nsParts[i]] = {}; - } - - scope = scope[nsParts[i]]; - } - - return scope; - }, - - ready: function (fn, scope) { - var delayfn = function () { - if (scope) { - fn.apply(scope); - } else { - fn(); - } - }; - - if (typeof H5.global.jQuery !== "undefined") { - H5.global.jQuery(delayfn); - } else { - if (typeof H5.global.document === "undefined" || - H5.global.document.readyState === "complete" || - H5.global.document.readyState === "loaded" || - H5.global.document.readyState === "interactive") { - delayfn(); - } else { - H5.on("DOMContentLoaded", H5.global.document, delayfn); - } - } - }, - - on: function (event, elem, fn, scope) { - var listenHandler = function (e) { - var ret = fn.apply(scope || this, arguments); - - if (ret === false) { - e.stopPropagation(); - e.preventDefault(); - } - - return (ret); - }; - - var attachHandler = function () { - var ret = fn.call(scope || elem, H5.global.event); - - if (ret === false) { - H5.global.event.returnValue = false; - H5.global.event.cancelBubble = true; - } - - return (ret); - }; - - if (elem.addEventListener) { - elem.addEventListener(event, listenHandler, false); - } else { - elem.attachEvent("on" + event, attachHandler); - } - }, - - addHash: function (v, r, m) { - if (isNaN(r)) { - r = 17; - } - - if (isNaN(m)) { - m = 23; - } - - if (H5.isArray(v)) { - for (var i = 0; i < v.length; i++) { - r = r + ((r * m | 0) + (v[i] == null ? 0 : H5.getHashCode(v[i]))) | 0; - } - - return r; - } - - return r = r + ((r * m | 0) + (v == null ? 0 : H5.getHashCode(v))) | 0; - }, - - getHashCode: function (value, safe, deep) { - // In CLR: mutable object should keep on returning same value - // H5 goals: make it deterministic (to make testing easier) without breaking CLR contracts - // for value types it returns deterministic values (f.e. for int 3 it returns 3) - // for reference types it returns random value - - if (value && value.$boxed && value.type.getHashCode) { - return value.type.getHashCode(H5.unbox(value, true)); - } - - value = H5.unbox(value, true); - - if (H5.isEmpty(value, true)) { - if (safe) { - return 0; - } - - throw new System.InvalidOperationException.$ctor1("HashCode cannot be calculated for empty value"); - } - - if (value.getHashCode && H5.isFunction(value.getHashCode) && !value.__insideHashCode && value.getHashCode.length === 0) { - value.__insideHashCode = true; - var r = value.getHashCode(); - - delete value.__insideHashCode; - - return r; - } - - if (H5.isBoolean(value)) { - return value ? 1 : 0; - } - - if (H5.isDate(value)) { - var val = value.ticks !== undefined ? value.ticks : System.DateTime.getTicks(value); - - return val.toNumber() & 0xFFFFFFFF; - } - - if (value === Number.POSITIVE_INFINITY) { - return 0x7FF00000; - } - - if (value === Number.NEGATIVE_INFINITY) { - return 0xFFF00000; - } - - if (H5.isNumber(value)) { - if (Math.floor(value) === value) { - return value; - } - - value = value.toExponential(); - } - - if (H5.isString(value)) { - if (Math.imul) { - for (var i = 0, h = 0; i < value.length; i++) - h = Math.imul(31, h) + value.charCodeAt(i) | 0; - return h; - } else { - var h = 0, l = value.length, i = 0; - if (l > 0) - while (i < l) - h = (h << 5) - h + value.charCodeAt(i++) | 0; - return h; - } - } - - if (value.$$hashCode) { - return value.$$hashCode; - } - - if (deep !== false && value.hasOwnProperty("Item1") && H5.isPlainObject(value)) { - deep = true; - } - - if (deep && typeof value == "object") { - var result = 0, - temp; - - for (var property in value) { - if (value.hasOwnProperty(property)) { - temp = H5.isEmpty(value[property], true) ? 0 : H5.getHashCode(value[property]); - result = 29 * result + temp; - } - } - - if (result !== 0) { - value.$$hashCode = result; - - return result; - } - } - - value.$$hashCode = (Math.random() * 0x100000000) | 0; - - return value.$$hashCode; - }, - - getDefaultValue: function (type) { - if (type == null) { - throw new System.ArgumentNullException.$ctor1("type"); - } else if ((type.getDefaultValue) && type.getDefaultValue.length === 0) { - return type.getDefaultValue(); - } else if (H5.Reflection.isEnum(type)) { - return System.Enum.parse(type, 0); - } else if (type === Boolean || type === System.Boolean) { - return false; - } else if (type === System.DateTime) { - return System.DateTime.getDefaultValue(); - } else if (type === Date) { - return new Date(); - } else if (type === Number) { - return 0; - } - - return null; - }, - - $$aliasCache: [], - - getTypeAlias: function (obj) { - if (obj.$$alias) { - return obj.$$alias; - } - - var type = (obj.$$name || typeof obj === "function") ? obj : H5.getType(obj), - alias; - - if (type.$$alias) { - return type.$$alias; - } - - alias = H5.$$aliasCache[type]; - if (alias) { - return alias; - } - - if (type.$isArray) { - var elementName = H5.getTypeAlias(type.$elementType); - alias = elementName + "$Array" + (type.$rank > 1 ? ("$" + type.$rank) : ""); - - if (type.$$name) { - type.$$alias = alias; - } else { - H5.$$aliasCache[type] = alias; - } - - return alias; - } - - var name = obj.$$name || H5.getTypeName(obj); - - if (type.$typeArguments && !type.$isGenericTypeDefinition) { - name = type.$genericTypeDefinition.$$name; - - for (var i = 0; i < type.$typeArguments.length; i++) { - var ta = type.$typeArguments[i]; - name += "$" + H5.getTypeAlias(ta); - } - } - - alias = name.replace(/[\.\(\)\,\+]/g, "$"); - - if (type.$module) { - alias = type.$module + "$" + alias; - } - - if (type.$$name) { - type.$$alias = alias; - } else { - H5.$$aliasCache[type] = alias; - } - - return alias; - }, - - getTypeName: function (obj) { - return H5.Reflection.getTypeFullName(obj); - }, - - hasValue: function (obj) { - return H5.unbox(obj, true) != null; - }, - - hasValue$1: function () { - if (arguments.length === 0) { - return false; - } - - var i = 0; - - for (i; i < arguments.length; i++) { - if (H5.unbox(arguments[i], true) == null) { - return false; - } - } - - return true; - }, - - isObject: function (type) { - return type === Object || type === System.Object; - }, - - is: function (obj, type, ignoreFn, allowNull) { - if (obj == null) { - return !!allowNull; - } - - if (type === System.Object) { - type = Object; - } - - var tt = typeof type; - - if (tt === "boolean") { - return type; - } - - if (obj.$boxed) { - if (obj.type.$kind === "enum" && (obj.type.prototype.$utype === type || type === System.Enum || type === System.IFormattable || type === System.IComparable)) { - return true; - } else if (!H5.Reflection.isInterface(type) && !type.$nullable) { - return obj.type === type || H5.isObject(type) || type === System.ValueType && H5.Reflection.isValueType(obj.type); - } - - if (ignoreFn !== true && type.$is) { - return type.$is(H5.unbox(obj, true)); - } - - if (H5.Reflection.isAssignableFrom(type, obj.type)) { - return true; - } - - obj = H5.unbox(obj, true); - } - - var ctor = obj.constructor === Object && obj.$getType ? obj.$getType() : H5.Reflection.convertType(obj.constructor); - - if (type.constructor === Function && obj instanceof type || ctor === type || H5.isObject(type)) { - return true; - } - - var hasObjKind = ctor.$kind || ctor.$$inherits, - hasTypeKind = type.$kind; - - if (hasObjKind || hasTypeKind) { - var isInterface = type.$isInterface; - - if (isInterface) { - if (hasObjKind) { - if (ctor.$isArrayEnumerator) { - return System.Array.is(obj, type); - } - - return type.isAssignableFrom ? type.isAssignableFrom(ctor) : H5.Reflection.getInterfaces(ctor).indexOf(type) >= 0; - } - - if (H5.isArray(obj, ctor)) { - return System.Array.is(obj, type); - } - } - - if (ignoreFn !== true && type.$is) { - return type.$is(obj); - } - - if (type.$literal) { - if (H5.isPlainObject(obj)) { - if (obj.$getType) { - return H5.Reflection.isAssignableFrom(type, obj.$getType()); - } - - return true; - } - } - - return false; - } - - if (tt === "string") { - type = H5.unroll(type); - } - - if (tt === "function" && (H5.getType(obj).prototype instanceof type)) { - return true; - } - - if (ignoreFn !== true) { - if (typeof (type.$is) === "function") { - return type.$is(obj); - } - - if (typeof (type.isAssignableFrom) === "function") { - return type.isAssignableFrom(H5.getType(obj)); - } - } - - if (H5.isArray(obj)) { - return System.Array.is(obj, type); - } - - return tt === "object" && ((ctor === type) || (obj instanceof type)); - }, - - as: function (obj, type, allowNull) { - if (H5.is(obj, type, false, allowNull)) { - return obj != null && obj.$boxed && type !== Object && type !== System.Object ? obj.v : obj; - } - return null; - }, - - cast: function (obj, type, allowNull) { - if (obj == null) { - return obj; - } - - var result = H5.is(obj, type, false, allowNull) ? obj : null; - - if (result === null) { - throw new System.InvalidCastException.$ctor1("Unable to cast type " + (obj ? H5.getTypeName(obj) : "'null'") + " to type " + H5.getTypeName(type)); - } - - if (obj.$boxed && type !== Object && type !== System.Object) { - return obj.v; - } - - return result; - }, - - apply: function (obj, values, callback) { - var names = H5.getPropertyNames(values, true), - i; - - for (i = 0; i < names.length; i++) { - var name = names[i]; - - if (typeof obj[name] === "function" && typeof values[name] !== "function") { - obj[name](values[name]); - } else { - obj[name] = values[name]; - } - } - - if (callback) { - callback.call(obj, obj); - } - - return obj; - }, - - copyProperties: function (to, from) { - var names = H5.getPropertyNames(from, false), - i; - - for (i = 0; i < names.length; i++) { - var name = names[i], - own = from.hasOwnProperty(name), - dcount = name.split("$").length; - - if (own && (dcount === 1 || dcount === 2 && name.match("\$\d+$"))) { - to[name] = from[name]; - } - - } - - return to; - }, - - merge: function (to, from, callback, elemFactory) { - if (to == null) { - return from; - } - - // Maps instance of plain JS value or Object into H5 object. - // Used for deserialization. Proper deserialization requires reflection that is currently not supported in H5. - // It currently is only capable to deserialize: - // -instance of single class or primitive - // -array of primitives - // -array of single class - if (to instanceof System.Decimal && typeof from === "number") { - return new System.Decimal(from); - } - - if (to instanceof System.Int64 && H5.isNumber(from)) { - return new System.Int64(from); - } - - if (to instanceof System.UInt64 && H5.isNumber(from)) { - return new System.UInt64(from); - } - - if (to instanceof Boolean || H5.isBoolean(to) || - typeof to === "number" || - to instanceof String || H5.isString(to) || - to instanceof Function || H5.isFunction(to) || - to instanceof Date || H5.isDate(to) || - H5.getType(to).$number) { - return from; - } - - var key, - i, - value, - toValue, - fn; - - if (H5.isArray(from) && H5.isFunction(to.add || to.push)) { - fn = H5.isArray(to) ? to.push : to.add; - - for (i = 0; i < from.length; i++) { - var item = from[i]; - - if (!H5.isArray(item)) { - item = [typeof elemFactory === "undefined" ? item : H5.merge(elemFactory(), item)]; - } - - fn.apply(to, item); - } - } else { - var t = H5.getType(to), - descriptors = t && t.$descriptors; - - if (from) { - for (key in from) { - value = from[key]; - - var descriptor = null; - - if (descriptors) { - for (var i = descriptors.length - 1; i >= 0; i--) { - if (descriptors[i].name === key) { - descriptor = descriptors[i]; - - break; - } - } - } - - if (descriptor != null) { - if (descriptor.set) { - to[key] = H5.merge(to[key], value); - } else { - H5.merge(to[key], value); - } - } else if (typeof to[key] === "function") { - if (key.match(/^\s*get[A-Z]/)) { - H5.merge(to[key](), value); - } else { - to[key](value); - } - } else { - var setter1 = "set" + key.charAt(0).toUpperCase() + key.slice(1), - setter2 = "set" + key, - getter; - - if (typeof to[setter1] === "function" && typeof value !== "function") { - getter = "g" + setter1.slice(1); - - if (typeof to[getter] === "function") { - to[setter1](H5.merge(to[getter](), value)); - } else { - to[setter1](value); - } - } else if (typeof to[setter2] === "function" && typeof value !== "function") { - getter = "g" + setter2.slice(1); - - if (typeof to[getter] === "function") { - to[setter2](H5.merge(to[getter](), value)); - } else { - to[setter2](value); - } - } else if (value && value.constructor === Object && to[key]) { - toValue = to[key]; - H5.merge(toValue, value); - } else { - var isNumber = H5.isNumber(from); - - if (to[key] instanceof System.Decimal && isNumber) { - return new System.Decimal(from); - } - - if (to[key] instanceof System.Int64 && isNumber) { - return new System.Int64(from); - } - - if (to[key] instanceof System.UInt64 && isNumber) { - return new System.UInt64(from); - } - - to[key] = value; - } - } - } - } else { - if (callback) { - callback.call(to, to); - } - - return from; - } - } - - if (callback) { - callback.call(to, to); - } - - return to; - }, - - getEnumerator: function (obj, fnName, T) { - if (typeof obj === "string") { - obj = System.String.toCharArray(obj); - } - - if (arguments.length === 2 && H5.isFunction(fnName)) { - T = fnName; - fnName = null; - } - - if (fnName && obj && obj[fnName]) { - return obj[fnName].call(obj); - } - - if (!T && obj && obj.GetEnumerator) { - return obj.GetEnumerator(); - } - - var name; - - if (T && H5.isFunction(H5.getProperty(obj, name = "System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(T) + "$GetEnumerator"))) { - return obj[name](); - } - - if (T && H5.isFunction(H5.getProperty(obj, name = "System$Collections$Generic$IEnumerable$1$GetEnumerator"))) { - return obj[name](); - } - - if (H5.isFunction(H5.getProperty(obj, name = "System$Collections$IEnumerable$GetEnumerator"))) { - return obj[name](); - } - - if (T && obj && obj.GetEnumerator) { - return obj.GetEnumerator(); - } - - if ((Object.prototype.toString.call(obj) === "[object Array]") || - (obj && H5.isDefined(obj.length))) { - return new H5.ArrayEnumerator(obj, T); - } - - throw new System.InvalidOperationException.$ctor1("Cannot create Enumerator."); - }, - - getPropertyNames: function (obj, includeFunctions) { - var names = [], - name; - - for (name in obj) { - if (includeFunctions || typeof obj[name] !== "function") { - names.push(name); - } - } - - return names; - }, - - getProperty: function (obj, propertyName) { - if (H5.isHtmlAttributeCollection(obj) && !this.isValidHtmlAttributeName(propertyName)) { - return undefined; - } - - return obj[propertyName]; - }, - - isValidHtmlAttributeName : function (name) { - // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 - - if (!name || !name.length) { - return false; - } - - var r = /^[a-zA-Z_][\w\-]*$/; - - return r.test(name); - }, - - isHtmlAttributeCollection: function (obj) { - return typeof obj !== "undefined" && (Object.prototype.toString.call(obj) === "[object NamedNodeMap]"); - }, - - isDefined: function (value, noNull) { - return typeof value !== "undefined" && (noNull ? value !== null : true); - }, - - isEmpty: function (value, allowEmpty) { - return (typeof value === "undefined" || value === null) || (!allowEmpty ? value === "" : false) || ((!allowEmpty && H5.isArray(value)) ? value.length === 0 : false); - }, - - toArray: function (ienumerable) { - var i, - item, - len, - result = []; - - if (H5.isArray(ienumerable)) { - for (i = 0, len = ienumerable.length; i < len; ++i) { - result.push(ienumerable[i]); - } - } else { - i = H5.getEnumerator(ienumerable); - - while (i.moveNext()) { - item = i.Current; - result.push(item); - } - } - - return result; - }, - - toList: function (ienumerable, T) { - return new (System.Collections.Generic.List$1(T || System.Object).$ctor1)(ienumerable); - }, - - arrayTypes: [globals.Array, globals.Uint8Array, globals.Int8Array, globals.Int16Array, globals.Uint16Array, globals.Int32Array, globals.Uint32Array, globals.Float32Array, globals.Float64Array, globals.Uint8ClampedArray], - - isArray: function (obj, ctor) { - var c = ctor || (obj != null ? obj.constructor : null); - - if (!c) { - return false; - } - - return H5.arrayTypes.indexOf(c) >= 0 || c.$isArray || Array.isArray(obj); - }, - - isFunction: function (obj) { - return typeof (obj) === "function"; - }, - - isDate: function (obj) { - return obj instanceof Date || Object.prototype.toString.call(obj) === "[object Date]"; - }, - - isNull: function (value) { - return (value === null) || (value === undefined); - }, - - isBoolean: function (value) { - return typeof value === "boolean"; - }, - - isNumber: function (value) { - return typeof value === "number" && isFinite(value); - }, - - isString: function (value) { - return typeof value === "string"; - }, - - unroll: function (value, scope) { - if (H5.isArray(value)) { - for (var i = 0; i < value.length; i++) { - var v = value[i]; - - if (H5.isString(v)) { - value[i] = H5.unroll(v, scope); - } - } - - return; - } - - var d = value.split("."), - o = (scope || H5.global)[d[0]], - i = 1; - - for (i; i < d.length; i++) { - if (!o) { - return null; - } - - o = o[d[i]]; - } - - return o; - }, - - referenceEquals: function (a, b) { - return H5.hasValue(a) ? a === b : !H5.hasValue(b); - }, - - rE: function (a, b) { - return H5.hasValue(a) ? a === b : !H5.hasValue(b); - }, - - staticEquals: function (a, b) { - if (!H5.hasValue(a)) { - return !H5.hasValue(b); - } - - return H5.hasValue(b) ? H5.equals(a, b) : false; - }, - - equals: function (a, b) { - if (a == null && b == null) { - return true; - } - - var guardItem = H5.$equalsGuard[H5.$equalsGuard.length - 1]; - - if (guardItem && guardItem.a === a && guardItem.b === b) { - return a === b; - } - - H5.$equalsGuard.push({a: a, b: b}); - - var fn = function (a, b) { - if (a && a.$boxed && a.type.equals && a.type.equals.length === 2) { - return a.type.equals(a, b); - } - - if (b && b.$boxed && b.type.equals && b.type.equals.length === 2) { - return b.type.equals(b, a); - } - - if (a && H5.isFunction(a.equals) && a.equals.length === 1) { - return a.equals(b); - } - - if (b && H5.isFunction(b.equals) && b.equals.length === 1) { - return b.equals(a); - } if (H5.isFunction(a) && H5.isFunction(b)) { - return H5.fn.equals.call(a, b); - } else if (H5.isDate(a) && H5.isDate(b)) { - if (a.kind !== undefined && a.ticks !== undefined && b.kind !== undefined && b.ticks !== undefined) { - return a.ticks.equals(b.ticks); - } - - return a.valueOf() === b.valueOf(); - } else if (H5.isNull(a) && H5.isNull(b)) { - return true; - } else if (H5.isNull(a) !== H5.isNull(b)) { - return false; - } - - var eq = a === b; - - if (!eq && typeof a === "object" && typeof b === "object" && a !== null && b !== null && a.$kind === "struct" && b.$kind === "struct" && a.$$name === b.$$name) { - return H5.getHashCode(a) === H5.getHashCode(b) && H5.objectEquals(a, b); - } - - if (!eq && a && b && a.hasOwnProperty("Item1") && H5.isPlainObject(a) && b.hasOwnProperty("Item1") && H5.isPlainObject(b)) { - return H5.objectEquals(a, b, true); - } - - return eq; - }; - - var result = fn(a, b); - H5.$equalsGuard.pop(); - - return result; - }, - - objectEquals: function (a, b, oneLevel) { - H5.$$leftChain = []; - H5.$$rightChain = []; - - var result = H5.deepEquals(a, b, oneLevel); - - delete H5.$$leftChain; - delete H5.$$rightChain; - - return result; - }, - - deepEquals: function (a, b, oneLevel) { - if (typeof a === "object" && typeof b === "object") { - if (a === b) { - return true; - } - - if (H5.$$leftChain.indexOf(a) > -1 || H5.$$rightChain.indexOf(b) > -1) { - return false; - } - - var p; - - for (p in b) { - if (b.hasOwnProperty(p) !== a.hasOwnProperty(p)) { - return false; - } else if (typeof b[p] !== typeof a[p]) { - return false; - } - } - - for (p in a) { - if (b.hasOwnProperty(p) !== a.hasOwnProperty(p)) { - return false; - } else if (typeof a[p] !== typeof b[p]) { - return false; - } - - if (a[p] === b[p]) { - continue; - } else if (typeof (a[p]) === "object" && !oneLevel) { - H5.$$leftChain.push(a); - H5.$$rightChain.push(b); - - if (!H5.deepEquals(a[p], b[p])) { - return false; - } - - H5.$$leftChain.pop(); - H5.$$rightChain.pop(); - } else { - if (!H5.equals(a[p], b[p])) { - return false; - } - } - } - - return true; - } else { - return H5.equals(a, b); - } - }, - - numberCompare : function (a, b) { - if (a < b) { - return -1; - } - - if (a > b) { - return 1; - } - - if (a == b) { - return 0; - } - - if (!isNaN(a)) { - return 1; - } - - if (!isNaN(b)) { - return -1; - } - - return 0; - }, - - compare: function (a, b, safe, T) { - if (a && a.$boxed) { - a = H5.unbox(a, true); - } - - if (b && b.$boxed) { - b = H5.unbox(b, true); - } - - if (typeof a === "number" && typeof b === "number") { - return H5.numberCompare(a, b); - } - - if (!H5.isDefined(a, true)) { - if (safe) { - return 0; - } - - throw new System.NullReferenceException(); - } else if (H5.isString(a)) { - return System.String.compare(a, b); - } else if (H5.isNumber(a) || H5.isBoolean(a)) { - return a < b ? -1 : (a > b ? 1 : 0); - } else if (H5.isDate(a)) { - if (a.kind !== undefined && a.ticks !== undefined) { - return H5.compare(System.DateTime.getTicks(a), System.DateTime.getTicks(b)); - } - - return H5.compare(a.valueOf(), b.valueOf()); - } - - var name; - - if (T && H5.isFunction(H5.getProperty(a, name = "System$IComparable$1$" + H5.getTypeAlias(T) + "$compareTo"))) { - return a[name](b); - } - - if (T && H5.isFunction(H5.getProperty(a, name = "System$IComparable$1$compareTo"))) { - return a[name](b); - } - - if (H5.isFunction(H5.getProperty(a, name = "System$IComparable$compareTo"))) { - return a[name](b); - } - - if (H5.isFunction(a.compareTo)) { - return a.compareTo(b); - } - - if (T && H5.isFunction(H5.getProperty(b, name = "System$IComparable$1$" + H5.getTypeAlias(T) + "$compareTo"))) { - return -b[name](a); - } - - if (T && H5.isFunction(H5.getProperty(b, name = "System$IComparable$1$compareTo"))) { - return -b[name](a); - } - - if (H5.isFunction(H5.getProperty(b, name = "System$IComparable$compareTo"))) { - return -b[name](a); - } - - if (H5.isFunction(b.compareTo)) { - return -b.compareTo(a); - } - - if (safe) { - return 0; - } - - throw new System.Exception("Cannot compare items"); - }, - - equalsT: function (a, b, T) { - if (a && a.$boxed && a.type.equalsT && a.type.equalsT.length === 2) { - return a.type.equalsT(a, b); - } - - if (b && b.$boxed && b.type.equalsT && b.type.equalsT.length === 2) { - return b.type.equalsT(b, a); - } - - if (!H5.isDefined(a, true)) { - throw new System.NullReferenceException(); - } else if (H5.isNumber(a) || H5.isString(a) || H5.isBoolean(a)) { - return a === b; - } else if (H5.isDate(a)) { - if (a.kind !== undefined && a.ticks !== undefined) { - return System.DateTime.getTicks(a).equals(System.DateTime.getTicks(b)); - } - - return a.valueOf() === b.valueOf(); - } - - var name; - - if (T && a != null && H5.isFunction(H5.getProperty(a, name = "System$IEquatable$1$" + H5.getTypeAlias(T) + "$equalsT"))) { - return a[name](b); - } - - if (T && b != null && H5.isFunction(H5.getProperty(b, name = "System$IEquatable$1$" + H5.getTypeAlias(T) + "$equalsT"))) { - return b[name](a); - } - - if (H5.isFunction(a) && H5.isFunction(b)) { - return H5.fn.equals.call(a, b); - } - - return a.equalsT ? a.equalsT(b) : b.equalsT(a); - }, - - format: function (obj, formatString, provider) { - if (obj && obj.$boxed) { - if (obj.type.$kind === "enum") { - return System.Enum.format(obj.type, obj.v, formatString); - } else if (obj.type === System.Char) { - return System.Char.format(H5.unbox(obj, true), formatString, provider); - } else if (obj.type.format) { - return obj.type.format(H5.unbox(obj, true), formatString, provider); - } - } - - if (H5.isNumber(obj)) { - return H5.Int.format(obj, formatString, provider); - } else if (H5.isDate(obj)) { - return System.DateTime.format(obj, formatString, provider); - } - - var name; - - if (H5.isFunction(H5.getProperty(obj, name = "System$IFormattable$format"))) { - return obj[name](formatString, provider); - } - - return obj.format(formatString, provider); - }, - - getType: function (instance, T) { - if (instance && instance.$boxed) { - return instance.type; - } - - if (instance == null) { - throw new System.NullReferenceException.$ctor1("instance is null"); - } - - if (T) { - var type = H5.getType(instance); - return H5.Reflection.isAssignableFrom(T, type) ? type : T; - } - - if (typeof (instance) === "number") { - if (!isNaN(instance) && isFinite(instance) && Math.floor(instance, 0) === instance) { - return System.Int32; - } else { - return System.Double; - } - } - - if (instance.$type) { - return instance.$type; - } - - if (instance.$getType) { - return instance.$getType(); - } - - var result = null; - - try { - result = instance.constructor; - } catch (ex) { - result = Object; - } - - if (result === Object) { - var str = instance.toString(), - match = (/\[object (.{1,})\]/).exec(str), - name = (match && match.length > 1) ? match[1] : "Object"; - - if (name != "Object") { - result = instance; - } - } - - return H5.Reflection.convertType(result); - }, - - isLower: function (c) { - var s = String.fromCharCode(c); - - return s === s.toLowerCase() && s !== s.toUpperCase(); - }, - - isUpper: function (c) { - var s = String.fromCharCode(c); - - return s !== s.toLowerCase() && s === s.toUpperCase(); - }, - - coalesce: function (a, b) { - return H5.hasValue(a) ? a : b; - }, - - fn: { - equals: function (fn) { - if (this === fn) { - return true; - } - - if (fn == null || (this.constructor !== fn.constructor)) { - return false; - } - - if (this.$invocationList && fn.$invocationList) { - if (this.$invocationList.length !== fn.$invocationList.length) { - return false; - } - - for (var i = 0; i < this.$invocationList.length; i++) { - if (this.$invocationList[i] !== fn.$invocationList[i]) { - return false; - } - } - - return true; - } - - return this.equals && (this.equals === fn.equals) && this.$method && (this.$method === fn.$method) && this.$scope && (this.$scope === fn.$scope); - }, - - call: function (obj, fnName) { - var args = Array.prototype.slice.call(arguments, 2); - - obj = obj || H5.global; - - return obj[fnName].apply(obj, args); - }, - - makeFn: function (fn, length) { - switch (length) { - case 0: - return function () { - return fn.apply(this, arguments); - }; - case 1: - return function (a) { - return fn.apply(this, arguments); - }; - case 2: - return function (a, b) { - return fn.apply(this, arguments); - }; - case 3: - return function (a, b, c) { - return fn.apply(this, arguments); - }; - case 4: - return function (a, b, c, d) { - return fn.apply(this, arguments); - }; - case 5: - return function (a, b, c, d, e) { - return fn.apply(this, arguments); - }; - case 6: - return function (a, b, c, d, e, f) { - return fn.apply(this, arguments); - }; - case 7: - return function (a, b, c, d, e, f, g) { - return fn.apply(this, arguments); - }; - case 8: - return function (a, b, c, d, e, f, g, h) { - return fn.apply(this, arguments); - }; - case 9: - return function (a, b, c, d, e, f, g, h, i) { - return fn.apply(this, arguments); - }; - case 10: - return function (a, b, c, d, e, f, g, h, i, j) { - return fn.apply(this, arguments); - }; - case 11: - return function (a, b, c, d, e, f, g, h, i, j, k) { - return fn.apply(this, arguments); - }; - case 12: - return function (a, b, c, d, e, f, g, h, i, j, k, l) { - return fn.apply(this, arguments); - }; - case 13: - return function (a, b, c, d, e, f, g, h, i, j, k, l, m) { - return fn.apply(this, arguments); - }; - case 14: - return function (a, b, c, d, e, f, g, h, i, j, k, l, m, n) { - return fn.apply(this, arguments); - }; - case 15: - return function (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) { - return fn.apply(this, arguments); - }; - case 16: - return function (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) { - return fn.apply(this, arguments); - }; - case 17: - return function (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) { - return fn.apply(this, arguments); - }; - case 18: - return function (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) { - return fn.apply(this, arguments); - }; - case 19: - return function (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) { - return fn.apply(this, arguments); - }; - default: - return function (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) { - return fn.apply(this, arguments); - }; - } - }, - - cacheBind: function (obj, method, args, appendArgs) { - return H5.fn.bind(obj, method, args, appendArgs, true); - }, - - bind: function (obj, method, args, appendArgs, cache) { - if (method && method.$method === method && method.$scope === obj) { - return method; - } - - if (obj && cache && obj.$$bind) { - for (var i = 0; i < obj.$$bind.length; i++) { - if (obj.$$bind[i].$method === method) { - return obj.$$bind[i]; - } - } - } - - var fn; - - if (arguments.length === 2) { - fn = H5.fn.makeFn(function () { - H5.caller.unshift(this); - - var result = null; - - try { - result = method.apply(obj, arguments); - } finally { - H5.caller.shift(this); - } - - return result; - }, method.length); - } else { - fn = H5.fn.makeFn(function () { - var callArgs = args || arguments; - - if (appendArgs === true) { - callArgs = Array.prototype.slice.call(arguments, 0); - callArgs = callArgs.concat(args); - } else if (typeof appendArgs === "number") { - callArgs = Array.prototype.slice.call(arguments, 0); - - if (appendArgs === 0) { - callArgs.unshift.apply(callArgs, args); - } else if (appendArgs < callArgs.length) { - callArgs.splice.apply(callArgs, [appendArgs, 0].concat(args)); - } else { - callArgs.push.apply(callArgs, args); - } - } - - H5.caller.unshift(this); - - var result = null; - - try { - result = method.apply(obj, callArgs); - } finally { - H5.caller.shift(this); - } - - return result; - }, method.length); - } - - if (obj && cache) { - obj.$$bind = obj.$$bind || []; - obj.$$bind.push(fn); - } - - fn.$method = method; - fn.$scope = obj; - fn.equals = H5.fn.equals; - - return fn; - }, - - bindScope: function (obj, method) { - var fn = H5.fn.makeFn(function () { - var callArgs = Array.prototype.slice.call(arguments, 0); - - callArgs.unshift.apply(callArgs, [obj]); - - H5.caller.unshift(this); - - var result = null; - - try { - result = method.apply(obj, callArgs); - } finally { - H5.caller.shift(this); - } - - return result; - }, method.length); - - fn.$method = method; - fn.$scope = obj; - fn.equals = H5.fn.equals; - - return fn; - }, - - $build: function (handlers) { - if (!handlers || handlers.length === 0) { - return null; - } - - var fn = function () { - var result = null, - i, - handler; - - for (i = 0; i < handlers.length; i++) { - handler = handlers[i]; - result = handler.apply(null, arguments); - } - - return result; - }; - - fn.$invocationList = handlers ? Array.prototype.slice.call(handlers, 0) : []; - handlers = fn.$invocationList.slice(); - - return fn; - }, - - combine: function (fn1, fn2) { - if (!fn1 || !fn2) { - var fn = fn1 || fn2; - - return fn ? H5.fn.$build([fn]) : fn; - } - - var list1 = fn1.$invocationList ? fn1.$invocationList : [fn1], - list2 = fn2.$invocationList ? fn2.$invocationList : [fn2]; - - return H5.fn.$build(list1.concat(list2)); - }, - - getInvocationList: function (fn) { - if (fn == null) { - throw new System.ArgumentNullException(); - } - - if (!fn.$invocationList) { - fn.$invocationList = [fn]; - } - - return fn.$invocationList; - }, - - remove: function (fn1, fn2) { - if (!fn1 || !fn2) { - return fn1 || null; - } - - var list1 = fn1.$invocationList ? fn1.$invocationList.slice(0) : [fn1], - list2 = fn2.$invocationList ? fn2.$invocationList : [fn2], - result = [], - exclude, - i, - j; - - exclude = -1; - - for (i = list1.length - list2.length; i >= 0; i--) { - if (H5.fn.equalInvocationLists(list1, list2, i, list2.length)) { - if (list1.length - list2.length == 0) { - return null; - } else if (list1.length - list2.length == 1) { - return list1[i != 0 ? 0 : list1.length - 1]; - } else { - list1.splice(i, list2.length); - - return H5.fn.$build(list1); - } - } - } - - return fn1; - }, - - equalInvocationLists: function (a, b, start, count) { - for (var i = 0; i < count; i = (i + 1) | 0) { - if (!(H5.equals(a[System.Array.index(((start + i) | 0), a)], b[System.Array.index(i, b)]))) { - return false; - } - } - - return true; - }, - }, - - sleep: function (ms, timeout) { - if (H5.hasValue(timeout)) { - ms = timeout.getTotalMilliseconds(); - } - - if (isNaN(ms) || ms < -1 || ms > 2147483647) { - throw new System.ArgumentOutOfRangeException.$ctor4("timeout", "Number must be either non-negative and less than or equal to Int32.MaxValue or -1"); - } - - if (ms == -1) { - ms = 2147483647; - } - - var start = new Date().getTime(); - - while ((new Date().getTime() - start) < ms) { - if ((new Date().getTime() - start) > 2147483647) { - break; - } - } - }, - - getMetadata: function (t) { - var m = t.$getMetadata ? t.$getMetadata() : t.$metadata; - - return m; - }, - - loadModule: function (config, callback) { - var amd = config.amd, - cjs = config.cjs, - fnName = config.fn; - - var tcs = new System.Threading.Tasks.TaskCompletionSource(), - fn = H5.global[fnName || "require"]; - - if (amd && amd.length > 0) { - fn(amd, function () { - var loads = Array.prototype.slice.call(arguments, 0); - - if (cjs && cjs.length > 0) { - for (var i = 0; i < cjs.length; i++) { - loads.push(fn(cjs[i])); - } - } - - callback.apply(H5.global, loads); - tcs.setResult(); - }); - } else if (cjs && cjs.length > 0) { - var t = new System.Threading.Tasks.Task(); - t.status = System.Threading.Tasks.TaskStatus.ranToCompletion; - - var loads = []; - - for (var j = 0; j < cjs.length; j++) { - loads.push(fn(cjs[j])); - } - - callback.apply(H5.global, loads); - - return t; - } else { - var t = new System.Threading.Tasks.Task(); - t.status = System.Threading.Tasks.TaskStatus.ranToCompletion; - - return t; - } - - return tcs.task; - } - }; - - if (!globals.setImmediate) { - if (typeof window !== "undefined") { - core.setImmediate = (function () { - var head = {}, - tail = head; - - var id = Math.random(); - - function onmessage(e) { - if (e.data != id) { - return; - } - - head = head.next; - var func = head.func; - delete head.func; - func(); - } - - if (typeof window !== "undefined") { - if (window.addEventListener) { - window.addEventListener("message", onmessage); - } else { - window.attachEvent("onmessage", onmessage); - } - } - - return function (func) { - tail = tail.next = {func: func}; - - if (typeof window !== "undefined") { - window.postMessage(id, "*"); - } - }; - }()); - } else if (typeof self !== "undefined"){ - - (function (global, undefined) { - "use strict"; - - if (global.setImmediate) { - return; - } - - var nextHandle = 1; // Spec says greater than zero - var tasksByHandle = {}; - var currentlyRunningATask = false; - var registerImmediate; - - function setImmediate(callback) { - // Callback can either be a function or a string - if (typeof callback !== "function") { - callback = new Function("" + callback); - } - // Copy function arguments - var args = new Array(arguments.length - 1); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i + 1]; - } - // Store and register the task - var task = {callback: callback, args: args}; - tasksByHandle[nextHandle] = task; - registerImmediate(nextHandle); - return nextHandle++; - } - - function clearImmediate(handle) { - delete tasksByHandle[handle]; - } - - function run(task) { - var callback = task.callback; - var args = task.args; - switch (args.length) { - case 0: - callback(); - break; - case 1: - callback(args[0]); - break; - case 2: - callback(args[0], args[1]); - break; - case 3: - callback(args[0], args[1], args[2]); - break; - default: - callback.apply(undefined, args); - break; - } - } - - function runIfPresent(handle) { - // From the spec: "Wait until any invocations of this algorithm started before this one have completed." - // So if we're currently running a task, we'll need to delay this invocation. - if (currentlyRunningATask) { - // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a - // "too much recursion" error. - setTimeout(runIfPresent, 0, handle); - } else { - var task = tasksByHandle[handle]; - if (task) { - currentlyRunningATask = true; - try { - run(task); - } finally { - clearImmediate(handle); - currentlyRunningATask = false; - } - } - } - } - - function installMessageChannelImplementation() { - var channel = new MessageChannel(); - channel.port1.onmessage = function (event) { - var handle = event.data; - runIfPresent(handle); - }; - - registerImmediate = function (handle) { - channel.port2.postMessage(handle); - }; - } - - function installSetTimeoutImplementation() { - registerImmediate = function (handle) { - setTimeout(runIfPresent, 0, handle); - }; - } - - // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live. - var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global); - attachTo = attachTo && attachTo.setTimeout ? attachTo : global; - - // Don't get fooled by e.g. browserify environments. - if (global.MessageChannel) { - // For web workers, where supported - installMessageChannelImplementation(); - - } else { - // For older browsers - installSetTimeoutImplementation(); - } - - attachTo.setImmediate = setImmediate; - attachTo.clearImmediate = clearImmediate; - }(self)); - - core.setImmediate = self.setImmediate.bind(globals); - } - } else { - core.setImmediate = globals.setImmediate.bind(globals); - } - - globals.H5 = core; - globals.H5.caller = []; - globals.H5.$equalsGuard = []; - globals.H5.$toStringGuard = []; - - if (globals.console) { - globals.H5.Console = globals.console; - } - - globals.System = {}; - globals.System.Diagnostics = {}; - globals.System.Diagnostics.Contracts = {}; - globals.System.Threading = {}; - - // @source Browser.js - - var check = function (regex) { - return H5.global.navigator && regex.test(H5.global.navigator.userAgent.toLowerCase()); - }, - - isStrict = H5.global.document && H5.global.document.compatMode === "CSS1Compat", - - version = function (is, regex) { - var m; - - return H5.global.navigator && (is && (m = regex.exec(navigator.userAgent.toLowerCase()))) ? parseFloat(m[1]) : 0; - }, - - docMode = H5.global.document ? H5.global.document.documentMode : null, - isOpera = check(/opera/), - isOpera10_5 = isOpera && check(/version\/10\.5/), - isChrome = check(/\bchrome\b/), - isWebKit = check(/webkit/), - isSafari = !isChrome && check(/safari/), - isSafari2 = isSafari && check(/applewebkit\/4/), - isSafari3 = isSafari && check(/version\/3/), - isSafari4 = isSafari && check(/version\/4/), - isSafari5_0 = isSafari && check(/version\/5\.0/), - isSafari5 = isSafari && check(/version\/5/), - isIE = !isOpera && (check(/msie/) || check(/trident/)), - isIE7 = isIE && ((check(/msie 7/) && docMode !== 8 && docMode !== 9 && docMode !== 10) || docMode === 7), - isIE8 = isIE && ((check(/msie 8/) && docMode !== 7 && docMode !== 9 && docMode !== 10) || docMode === 8), - isIE9 = isIE && ((check(/msie 9/) && docMode !== 7 && docMode !== 8 && docMode !== 10) || docMode === 9), - isIE10 = isIE && ((check(/msie 10/) && docMode !== 7 && docMode !== 8 && docMode !== 9) || docMode === 10), - isIE11 = isIE && ((check(/trident\/7\.0/) && docMode !== 7 && docMode !== 8 && docMode !== 9 && docMode !== 10) || docMode === 11), - isIE6 = isIE && check(/msie 6/), - isGecko = !isWebKit && !isIE && check(/gecko/), - isGecko3 = isGecko && check(/rv:1\.9/), - isGecko4 = isGecko && check(/rv:2\.0/), - isGecko5 = isGecko && check(/rv:5\./), - isGecko10 = isGecko && check(/rv:10\./), - isFF3_0 = isGecko3 && check(/rv:1\.9\.0/), - isFF3_5 = isGecko3 && check(/rv:1\.9\.1/), - isFF3_6 = isGecko3 && check(/rv:1\.9\.2/), - isWindows = check(/windows|win32/), - isMac = check(/macintosh|mac os x/), - isLinux = check(/linux/), - scrollbarSize = null, - chromeVersion = version(true, /\bchrome\/(\d+\.\d+)/), - firefoxVersion = version(true, /\bfirefox\/(\d+\.\d+)/), - ieVersion = version(isIE, /msie (\d+\.\d+)/), - operaVersion = version(isOpera, /version\/(\d+\.\d+)/), - safariVersion = version(isSafari, /version\/(\d+\.\d+)/), - webKitVersion = version(isWebKit, /webkit\/(\d+\.\d+)/), - isSecure = H5.global.location ? /^https/i.test(H5.global.location.protocol) : false, - isiPhone = H5.global.navigator && /iPhone/i.test(H5.global.navigator.platform), - isiPod = H5.global.navigator && /iPod/i.test(H5.global.navigator.platform), - isiPad = H5.global.navigator && /iPad/i.test(H5.global.navigator.userAgent), - isBlackberry = H5.global.navigator && /Blackberry/i.test(H5.global.navigator.userAgent), - isAndroid = H5.global.navigator && /Android/i.test(H5.global.navigator.userAgent), - isDesktop = isMac || isWindows || (isLinux && !isAndroid), - isTablet = isiPad, - isPhone = !isDesktop && !isTablet; - - var browser = { - isStrict: isStrict, - isIEQuirks: isIE && (!isStrict && (isIE6 || isIE7 || isIE8 || isIE9)), - isOpera: isOpera, - isOpera10_5: isOpera10_5, - isWebKit: isWebKit, - isChrome: isChrome, - isSafari: isSafari, - isSafari3: isSafari3, - isSafari4: isSafari4, - isSafari5: isSafari5, - isSafari5_0: isSafari5_0, - isSafari2: isSafari2, - isIE: isIE, - isIE6: isIE6, - isIE7: isIE7, - isIE7m: isIE6 || isIE7, - isIE7p: isIE && !isIE6, - isIE8: isIE8, - isIE8m: isIE6 || isIE7 || isIE8, - isIE8p: isIE && !(isIE6 || isIE7), - isIE9: isIE9, - isIE9m: isIE6 || isIE7 || isIE8 || isIE9, - isIE9p: isIE && !(isIE6 || isIE7 || isIE8), - isIE10: isIE10, - isIE10m: isIE6 || isIE7 || isIE8 || isIE9 || isIE10, - isIE10p: isIE && !(isIE6 || isIE7 || isIE8 || isIE9), - isIE11: isIE11, - isIE11m: isIE6 || isIE7 || isIE8 || isIE9 || isIE10 || isIE11, - isIE11p: isIE && !(isIE6 || isIE7 || isIE8 || isIE9 || isIE10), - isGecko: isGecko, - isGecko3: isGecko3, - isGecko4: isGecko4, - isGecko5: isGecko5, - isGecko10: isGecko10, - isFF3_0: isFF3_0, - isFF3_5: isFF3_5, - isFF3_6: isFF3_6, - isFF4: 4 <= firefoxVersion && firefoxVersion < 5, - isFF5: 5 <= firefoxVersion && firefoxVersion < 6, - isFF10: 10 <= firefoxVersion && firefoxVersion < 11, - isLinux: isLinux, - isWindows: isWindows, - isMac: isMac, - chromeVersion: chromeVersion, - firefoxVersion: firefoxVersion, - ieVersion: ieVersion, - operaVersion: operaVersion, - safariVersion: safariVersion, - webKitVersion: webKitVersion, - isSecure: isSecure, - isiPhone: isiPhone, - isiPod: isiPod, - isiPad: isiPad, - isBlackberry: isBlackberry, - isAndroid: isAndroid, - isDesktop: isDesktop, - isTablet: isTablet, - isPhone: isPhone, - iOS: isiPhone || isiPad || isiPod, - standalone: H5.global.navigator ? !!H5.global.navigator.standalone : false - }; - - H5.Browser = browser; - - // @source Class.js - - var base = { - _initialize: function () { - if (this.$init) { - return; - } - - this.$init = {}; - - if (this.$staticInit) { - this.$staticInit(); - } - - if (this.$initMembers) { - this.$initMembers(); - } - }, - - initConfig: function (extend, base, config, statics, scope, prototype) { - var initFn, - name, - cls = (statics ? scope : scope.ctor), - descriptors = cls.$descriptors, - aliases = cls.$aliases; - - if (config.fields) { - for (name in config.fields) { - scope[name] = config.fields[name]; - } - } - - var props = config.properties; - if (props) { - for (name in props) { - var v = props[name], - d, - cfg; - - if (v != null && H5.isPlainObject(v) && (!v.get || !v.set)) { - for (var k = 0; k < descriptors.length; k++) { - if (descriptors[k].name === name) { - d = descriptors[k]; - } - } - - if (d && d.get && !v.get) { - v.get = d.get; - } - - if (d && d.set && !v.set) { - v.set = d.set; - } - } - - cfg = H5.property(statics ? scope : prototype, name, v, statics, cls); - cfg.name = name; - cfg.cls = cls; - - descriptors.push(cfg); - } - } - - if (config.events) { - for (name in config.events) { - H5.event(scope, name, config.events[name], statics); - } - } - - if (config.alias) { - for (var i = 0; i < config.alias.length; i++) { - (function (obj, name, alias, cls) { - var descriptor = null; - - for (var i = descriptors.length - 1; i >= 0; i--) { - if (descriptors[i].name === name) { - descriptor = descriptors[i]; - - break; - } - } - - var arr = Array.isArray(alias) ? alias : [alias]; - - for (var j = 0; j < arr.length; j++) { - alias = arr[j]; - - if (descriptor != null) { - Object.defineProperty(obj, alias, descriptor); - aliases.push({ alias: alias, descriptor: descriptor }); - } else { - var m; - - if (scope.hasOwnProperty(name) || !prototype) { - m = scope[name]; - - if (m === undefined && prototype) { - m = prototype[name]; - } - } else { - m = prototype[name]; - - if (m === undefined) { - m = scope[name]; - } - } - - if (!H5.isFunction(m)) { - descriptor = { - get: function () { - return this[name]; - }, - - set: function (value) { - this[name] = value; - } - }; - Object.defineProperty(obj, alias, descriptor); - aliases.push({ alias: alias, descriptor: descriptor }); - } else { - obj[alias] = m; - aliases.push({ fn: name, alias: alias }); - } - } - } - })(statics ? scope : prototype, config.alias[i], config.alias[i + 1], cls); - - i++; - } - } - - if (config.init) { - initFn = config.init; - } - - if (initFn || (extend && !statics && base.$initMembers)) { - scope.$initMembers = function () { - if (extend && !statics && base.$initMembers) { - base.$initMembers.call(this); - } - - if (initFn) { - initFn.call(this); - } - }; - } - }, - - convertScheme: function (obj) { - var result = {}, - copy = function (obj, to) { - - var reserved = ["fields", "methods", "events", "props", "properties", "alias", "ctors"], - keys = Object.keys(obj); - - for (var i = 0; i < keys.length; i++) { - var name = keys[i]; - - if (reserved.indexOf(name) === -1) { - to[name] = obj[name]; - } - } - - if (obj.fields) { - H5.apply(to, obj.fields); - } - - if (obj.methods) { - H5.apply(to, obj.methods); - } - - var config = {}, - write = false; - - if (obj.props) { - config.properties = obj.props; - write = true; - } else if (obj.properties) { - config.properties = obj.properties; - write = true; - } - - if (obj.events) { - config.events = obj.events; - write = true; - } - - if (obj.alias) { - config.alias = obj.alias; - write = true; - } - - if (obj.ctors) { - if (obj.ctors.init) { - config.init = obj.ctors.init; - write = true; - delete obj.ctors.init; - } - - H5.apply(to, obj.ctors); - } - - if (write) { - to.$config = config; - } - }; - - if (obj.main) { - result.$main = obj.main; - delete obj.main; - } - - copy(obj, result); - - if (obj.statics || obj.$statics) { - result.$statics = {}; - copy(obj.statics || obj.$statics, result.$statics); - } - - return result; - }, - - definei: function (className, gscope, prop) { - if ((prop === true || !prop) && gscope) { - gscope.$kind = "interface"; - } else if (prop) { - prop.$kind = "interface"; - } else { - gscope = { $kind: "interface" }; - } - - var c = H5.define(className, gscope, prop); - - c.$kind = "interface"; - c.$isInterface = true; - - return c; - }, - - // Create a new Class that inherits from this class - define: function (className, gscope, prop, gCfg) { - var isGenericInstance = false; - - if (prop === true) { - isGenericInstance = true; - prop = gscope; - gscope = H5.global; - } else if (!prop) { - prop = gscope; - gscope = H5.global; - } - - var fn; - - if (H5.isFunction(prop)) { - fn = function () { - var args, - key, - obj, - c; - - key = H5.Class.getCachedType(fn, arguments); - - if (key) { - return key.type; - } - - args = Array.prototype.slice.call(arguments); - obj = prop.apply(null, args); - c = H5.define(H5.Class.genericName(className, args), obj, true, { fn: fn, args: args }); - - if (!H5.Class.staticInitAllow && !H5.Class.queueIsBlocked) { - H5.Class.$queue.push(c); - } - - return H5.get(c); - }; - - fn.$cache = []; - - return H5.Class.generic(className, gscope, fn, prop); - } - - if (!isGenericInstance) { - H5.Class.staticInitAllow = false; - } - - prop = prop || {}; - prop.$kind = prop.$kind || "class"; - - var isNested = false; - - if (prop.$kind.match("^nested ") !== null) { - isNested = true; - prop.$kind = prop.$kind.substr(7); - } - - if (prop.$kind === "enum" && !prop.inherits) { - prop.inherits = [System.IComparable, System.IFormattable]; - } - - var rNames = ["fields", "events", "props", "ctors", "methods"], - defaultScheme = H5.isFunction(prop.main) ? 0 : 1, - check = function (scope) { - if (scope.config && H5.isPlainObject(scope.config) || - scope.$main && H5.isFunction(scope.$main) || - scope.hasOwnProperty("ctor") && H5.isFunction(scope.ctor)) { - defaultScheme = 1; - - return false; - } - - if (scope.alias && H5.isArray(scope.alias) && scope.alias.length > 0 && scope.alias.length % 2 === 0) { - return true; - } - - for (var j = 0; j < rNames.length; j++) { - if (scope[rNames[j]] && H5.isPlainObject(scope[rNames[j]])) { - return true; - } - } - - return false; - }, - alternateScheme = check(prop); - - if (!alternateScheme && prop.statics) { - alternateScheme = check(prop.statics); - } - - if (!alternateScheme) { - alternateScheme = defaultScheme == 0; - } - - if (alternateScheme) { - prop = H5.Class.convertScheme(prop); - } - - var extend = prop.$inherits || prop.inherits, - statics = prop.$statics || prop.statics, - isEntryPoint = prop.$entryPoint, - base, - prototype, - scope = prop.$scope || gscope || H5.global, - objectType = H5.global.System && H5.global.System.Object || Object, - i, - v, - isCtor, - ctorName, - name, - registerT = true; - - if (prop.$kind === "enum") { - extend = [System.Enum]; - } - - if (prop.$noRegister === true) { - registerT = false; - delete prop.$noRegister; - } - - if (prop.$inherits) { - delete prop.$inherits; - } else { - delete prop.inherits; - } - - if (isEntryPoint) { - delete prop.$entryPoint; - } - - if (H5.isFunction(statics)) { - statics = null; - } else if (prop.$statics) { - delete prop.$statics; - } else { - delete prop.statics; - } - - var Class, - cls = prop.hasOwnProperty("ctor") && prop.ctor; - - if (!cls) { - if (prop.$literal) { - Class = function (obj) { - obj = obj || {}; - obj.$getType = function () { return Class }; - - return obj; - }; - } else { - Class = function () { - this.$initialize(); - - if (Class.$base) { - if (Class.$$inherits && Class.$$inherits.length > 0 && Class.$$inherits[0].$staticInit) { - Class.$$inherits[0].$staticInit(); - } - - if (Class.$base.ctor) { - Class.$base.ctor.call(this); - } else if (H5.isFunction(Class.$base.constructor)) { - Class.$base.constructor.call(this); - } - } - }; - } - - prop.ctor = Class; - } else { - Class = cls; - } - - if (prop.$literal) { - if ((!statics || !statics.createInstance)) { - Class.createInstance = function () { - var obj = {}; - - obj.$getType = function () { return Class }; - - return obj; - }; - } - - Class.$literal = true; - delete prop.$literal; - } - - if (!isGenericInstance && registerT) { - scope = H5.Class.set(scope, className, Class); - } - - if (gCfg) { - gCfg.fn.$cache.push({ type: Class, args: gCfg.args }); - } - - Class.$$name = className; - - if (isNested) { - var lastIndex = Class.$$name.lastIndexOf("."); - - Class.$$name = Class.$$name.substr(0, lastIndex) + "+" + Class.$$name.substr(lastIndex + 1) - } - - Class.$kind = prop.$kind; - - if (prop.$module) { - Class.$module = prop.$module; - } - - if (prop.$metadata) { - Class.$metadata = prop.$metadata; - } - - if (gCfg && isGenericInstance) { - Class.$genericTypeDefinition = gCfg.fn; - Class.$typeArguments = gCfg.args; - Class.$assembly = gCfg.fn.$assembly || H5.$currentAssembly; - - var result = H5.Reflection.getTypeFullName(gCfg.fn); - - for (i = 0; i < gCfg.args.length; i++) { - result += (i === 0 ? "[" : ",") + "[" + H5.Reflection.getTypeQName(gCfg.args[i]) + "]"; - } - - result += "]"; - - Class.$$fullname = result; - } else { - Class.$$fullname = Class.$$name; - } - - if (extend && H5.isFunction(extend)) { - extend = extend(); - } - - H5.Class.createInheritors(Class, extend); - - var noBase = extend ? extend[0].$kind === "interface" : true; - - if (noBase) { - extend = null; - } - - base = extend ? extend[0].prototype : this.prototype; - Class.$base = base; - - if (extend && !extend[0].$$initCtor) { - var cls = extend[0]; - var $$initCtor = function () { }; - $$initCtor.prototype = cls.prototype; - $$initCtor.prototype.constructor = cls; - $$initCtor.prototype.$$fullname = H5.Reflection.getTypeFullName(cls); - - prototype = new $$initCtor(); - } - else { - prototype = extend ? new extend[0].$$initCtor() : (objectType.$$initCtor ? new objectType.$$initCtor() : new objectType()); - } - - Class.$$initCtor = function () { }; - Class.$$initCtor.prototype = prototype; - Class.$$initCtor.prototype.constructor = Class; - Class.$$initCtor.prototype.$$fullname = gCfg && isGenericInstance ? Class.$$fullname : Class.$$name; - - if (statics) { - var staticsConfig = statics.$config || statics.config; - - if (staticsConfig && !H5.isFunction(staticsConfig)) { - H5.Class.initConfig(extend, base, staticsConfig, true, Class); - - if (statics.$config) { - delete statics.$config; - } else { - delete statics.config; - } - } - } - - var instanceConfig = prop.$config || prop.config; - - if (instanceConfig && !H5.isFunction(instanceConfig)) { - H5.Class.initConfig(extend, base, instanceConfig, false, prop, prototype); - - if (prop.$config) { - delete prop.$config; - } else { - delete prop.config; - } - } else if (extend && base.$initMembers) { - prop.$initMembers = function () { - base.$initMembers.call(this); - }; - } - - prop.$initialize = H5.Class._initialize; - - var keys = []; - - for (name in prop) { - keys.push(name); - } - - for (i = 0; i < keys.length; i++) { - name = keys[i]; - - v = prop[name]; - isCtor = name === "ctor"; - ctorName = name; - - if (H5.isFunction(v) && (isCtor || name.match("^\\$ctor") !== null)) { - isCtor = true; - } - - var member = prop[name]; - - if (isCtor) { - Class[ctorName] = member; - Class[ctorName].prototype = prototype; - Class[ctorName].prototype.constructor = Class; - prototype[ctorName] = member; - } else { - prototype[ctorName] = member; - } - } - - prototype.$$name = className; - - if (!prototype.toJSON) { - prototype.toJSON = H5.Class.toJSON; - } - - if (statics) { - for (name in statics) { - var member = statics[name]; - - if (name === "ctor") { - Class["$ctor"] = member; - } else { - if (prop.$kind === "enum" && !H5.isFunction(member) && name.charAt(0) !== "$") { - Class.$names = Class.$names || []; - Class.$names.push({name: name, value: member}); - } - - Class[name] = member; - } - } - - if (prop.$kind === "enum" && Class.$names) { - Class.$names = Class.$names.sort(function (i1, i2) { - if (H5.isFunction(i1.value.eq)) { - return i1.value.sub(i2.value).sign(); - } - - return i1.value - i2.value; - }).map(function (i) { - return i.name; - }); - } - } - - if (!extend) { - extend = [objectType].concat(Class.$interfaces); - } - - H5.Class.setInheritors(Class, extend); - - fn = function () { - if (H5.Class.staticInitAllow && !Class.$isGenericTypeDefinition) { - Class.$staticInit = null; - - if (Class.$initMembers) { - Class.$initMembers(); - } - - if (Class.$ctor) { - Class.$ctor(); - } - } - }; - - if (isEntryPoint || H5.isFunction(prototype.$main)) { - if (prototype.$main) { - var entryName = prototype.$main.name || "Main"; - - if (!Class[entryName]) { - Class[entryName] = prototype.$main; - } - } - - H5.Class.$queueEntry.push(Class); - } - - Class.$staticInit = fn; - - if (!isGenericInstance && registerT) { - H5.Class.registerType(className, Class); - } - - if (H5.Reflection) { - Class.$getMetadata = H5.Reflection.getMetadata; - } - - if (Class.$kind === "enum") { - if (!Class.prototype.$utype) { - Class.prototype.$utype = System.Int32; - } - Class.$is = function (instance) { - var utype = Class.prototype.$utype; - - if (utype === String) { - return typeof (instance) == "string"; - } - - if (utype && utype.$is) { - return utype.$is(instance); - } - - return typeof (instance) == "number"; - }; - - Class.getDefaultValue = function () { - var utype = Class.prototype.$utype; - - if (utype === String || utype === System.String) { - return null; - } - - return 0; - }; - } - - if (Class.$kind === "interface") { - if (Class.prototype.$variance) { - Class.isAssignableFrom = H5.Class.varianceAssignable; - } - - Class.$isInterface = true; - } - - return Class; - }, - - toCtorString: function () { - return H5.Reflection.getTypeName(this); - }, - - createInheritors: function (cls, extend) { - var interfaces = [], - baseInterfaces = [], - descriptors = [], - aliases = []; - - if (extend) { - for (var j = 0; j < extend.length; j++) { - var baseType = extend[j], - baseI = (baseType.$interfaces || []).concat(baseType.$baseInterfaces || []), - baseDescriptors = baseType.$descriptors, - baseAliases = baseType.$aliases; - - if (baseDescriptors && baseDescriptors.length > 0) { - for (var d = 0; d < baseDescriptors.length; d++) { - descriptors.push(baseDescriptors[d]); - } - } - - if (baseAliases && baseAliases.length > 0) { - for (var d = 0; d < baseAliases.length; d++) { - aliases.push(baseAliases[d]); - } - } - - if (baseI.length > 0) { - for (var k = 0; k < baseI.length; k++) { - if (baseInterfaces.indexOf(baseI[k]) < 0) { - baseInterfaces.push(baseI[k]); - } - } - } - - if (baseType.$kind === "interface") { - interfaces.push(baseType); - } - } - } - - cls.$descriptors = descriptors; - cls.$aliases = aliases; - cls.$baseInterfaces = baseInterfaces; - cls.$interfaces = interfaces; - cls.$allInterfaces = interfaces.concat(baseInterfaces); - }, - - toJSON: function () { - var obj = {}, - t = H5.getType(this), - descriptors = t.$descriptors || []; - - for (var key in this) { - var own = this.hasOwnProperty(key), - descriptor = null; - - if (!own) { - for (var i = descriptors.length - 1; i >= 0; i--) { - if (descriptors[i].name === key) { - descriptor = descriptors[i]; - - break; - } - } - } - - var dcount = key.split("$").length; - - if ((own || descriptor != null) && (dcount === 1 || dcount === 2 && key.match("\$\d+$"))) { - obj[key] = this[key]; - } - } - - return obj; - }, - - setInheritors: function (cls, extend) { - cls.$$inherits = extend; - - for (var i = 0; i < extend.length; i++) { - var scope = extend[i]; - - if (!scope.$$inheritors) { - scope.$$inheritors = []; - } - - scope.$$inheritors.push(cls); - } - }, - - varianceAssignable: function (source) { - var check = function (target, type) { - if (type.$genericTypeDefinition === target.$genericTypeDefinition && type.$typeArguments.length === target.$typeArguments.length) { - for (var i = 0; i < target.$typeArguments.length; i++) { - var v = target.prototype.$variance[i], t = target.$typeArguments[i], s = type.$typeArguments[i]; - - switch (v) { - case 1: if (!H5.Reflection.isAssignableFrom(t, s)) - return false; - - break; - case 2: if (!H5.Reflection.isAssignableFrom(s, t)) - return false; - - break; - default: if (s !== t) - return false; - } - } - - return true; - } - - return false; - }; - - if (source.$kind === "interface" && check(this, source)) { - return true; - } - - var ifs = H5.Reflection.getInterfaces(source); - - for (var i = 0; i < ifs.length; i++) { - if (ifs[i] === this || check(this, ifs[i])) { - return true; - } - } - - return false; - }, - - registerType: function (className, cls) { - if (H5.$currentAssembly) { - H5.$currentAssembly.$types[className] = cls; - cls.$assembly = H5.$currentAssembly; - } - }, - - addExtend: function (cls, extend) { - var i, - scope; - - Array.prototype.push.apply(cls.$$inherits, extend); - cls.$interfaces = cls.$interfaces || []; - cls.$baseInterfaces = cls.$baseInterfaces || []; - - for (i = 0; i < extend.length; i++) { - scope = extend[i]; - - if (!scope.$$inheritors) { - scope.$$inheritors = []; - } - - scope.$$inheritors.push(cls); - - var baseI = (scope.$interfaces || []).concat(scope.$baseInterfaces || []); - - if (baseI.length > 0) { - for (var k = 0; k < baseI.length; k++) { - if (cls.$baseInterfaces.indexOf(baseI[k]) < 0) { - cls.$baseInterfaces.push(baseI[k]); - } - } - } - - if (scope.$kind === "interface") { - cls.$interfaces.push(scope); - } - } - - cls.$allInterfaces = cls.$interfaces.concat(cls.$baseInterfaces); - }, - - set: function (scope, className, cls, noDefineProp) { - var nameParts = className.split("."), - name, - key, - exists, - i; - - for (i = 0; i < (nameParts.length - 1) ; i++) { - if (typeof scope[nameParts[i]] == "undefined") { - scope[nameParts[i]] = {}; - } - - scope = scope[nameParts[i]]; - } - - name = nameParts[nameParts.length - 1]; - exists = scope[name]; - - if (exists) { - if (exists.$$name === className) { - throw "Class '" + className + "' is already defined"; - } - - for (key in exists) { - var o = exists[key]; - - if (typeof o === "function" && o.$$name) { - (function (cls, key, o) { - Object.defineProperty(cls, key, { - get: function () { - if (H5.Class.staticInitAllow) { - if (o.$staticInit) { - o.$staticInit(); - } - - H5.Class.defineProperty(cls, key, o); - } - - return o; - }, - - set: function (newValue) { - o = newValue; - }, - - enumerable: true, - - configurable: true - }); - })(cls, key, o); - } - } - } - - if (noDefineProp !== true) { - (function (scope, name, cls) { - Object.defineProperty(scope, name, { - get: function () { - if (H5.Class.staticInitAllow) { - if (cls.$staticInit) { - cls.$staticInit(); - } - - H5.Class.defineProperty(scope, name, cls); - } - - return cls; - }, - - set: function (newValue) { - cls = newValue; - }, - - enumerable: true, - - configurable: true - }); - })(scope, name, cls); - } else { - scope[name] = cls; - } - - return scope; - }, - - defineProperty: function (scope, name, cls) { - Object.defineProperty(scope, name, { - value: cls, - enumerable: true, - configurable: true - }); - }, - - genericName: function (name, typeArguments) { - var gName = name; - - for (var i = 0; i < typeArguments.length; i++) { - var ta = typeArguments[i]; - - gName += "$" + (ta.$$name || H5.getTypeName(ta)); - } - - return gName; - }, - - getCachedType: function (fn, args) { - var arr = fn.$cache, - len = arr.length, - key, - found, - i, g; - - for (i = 0; i < len; i++) { - key = arr[i]; - - if (key.args.length === args.length) { - found = true; - - for (g = 0; g < key.args.length; g++) { - if (key.args[g] !== args[g]) { - found = false; - - break; - } - } - - if (found) { - return key; - } - } - } - - return null; - }, - - generic: function (className, scope, fn, prop) { - fn.$$name = className; - fn.$kind = "class"; - - H5.Class.set(scope, className, fn, true); - H5.Class.registerType(className, fn); - - fn.$typeArgumentCount = prop.length; - fn.$isGenericTypeDefinition = true; - fn.$getMetadata = H5.Reflection.getMetadata; - - fn.$staticInit = function () { - fn.$typeArguments = H5.Reflection.createTypeParams(prop); - - var old = H5.Class.staticInitAllow, - oldIsBlocked = H5.Class.queueIsBlocked; - - H5.Class.staticInitAllow = false; - H5.Class.queueIsBlocked = true; - - var cfg = prop.apply(null, fn.$typeArguments), - extend = cfg.$inherits || cfg.inherits; - - H5.Class.staticInitAllow = old; - H5.Class.queueIsBlocked = oldIsBlocked; - - if (extend && H5.isFunction(extend)) { - extend = extend(); - } - - H5.Class.createInheritors(fn, extend); - - var objectType = H5.global.System && H5.global.System.Object || Object; - - if (!extend) { - extend = [objectType].concat(fn.$interfaces); - } - - H5.Class.setInheritors(fn, extend); - - var prototype = extend ? (extend[0].$$initCtor ? new extend[0].$$initCtor() : new extend[0]()) : new objectType(); - - fn.prototype = prototype; - fn.prototype.constructor = fn; - fn.$kind = cfg.$kind || "class"; - - if (cfg.$module) { - fn.$module = cfg.$module; - } - }; - - H5.Class.$queue.push(fn); - - return fn; - }, - - init: function (fn) { - if (H5.Reflection) { - var metas = H5.Reflection.deferredMeta, - len = metas.length; - - if (len > 0) { - H5.Reflection.deferredMeta = []; - - for (var i = 0; i < len; i++) { - var item = metas[i]; - - H5.setMetadata(item.typeName, item.metadata, item.ns); - } - } - } - - if (fn) { - var old = H5.Class.staticInitAllow; - - H5.Class.staticInitAllow = true; - fn(); - H5.Class.staticInitAllow = old; - - return; - } - - H5.Class.staticInitAllow = true; - - var queue = H5.Class.$queue.concat(H5.Class.$queueEntry); - - H5.Class.$queue.length = 0; - H5.Class.$queueEntry.length = 0; - - for (var i = 0; i < queue.length; i++) { - var t = queue[i]; - - if (t.$staticInit) { - t.$staticInit(); - } - - if (t.prototype.$main) { - (function (cls, name) { - H5.ready(function () { - var task = cls[name](); - - if (task && task.continueWith) { - task.continueWith(function () { - setTimeout(function () { - task.getAwaitedResult(); - }, 0); - }); - } - }); - })(t, t.prototype.$main.name || "Main"); - - t.prototype.$main = null; - } - } - } - }; - - H5.Class = base; - H5.Class.$queue = []; - H5.Class.$queueEntry = []; - H5.define = H5.Class.define; - H5.definei = H5.Class.definei; - H5.init = H5.Class.init; - - function TCS() { return new System.Threading.Tasks.TaskCompletionSource(); } - function STEP(steps, currentStep) { return System.Array.min(steps, currentStep); } - - H5.TCS = TCS; - H5.STEP = STEP; - - // @source ReflectionAssembly.js - - H5.assemblyVersion = function (assemblyName, version) { - System.Reflection.Assembly.versions[assemblyName || "H5.$Unknown"] = version; - }; - - H5.assembly = function (assemblyName, res, callback, restore) { - if (!callback) { - callback = res; - res = {}; - } - - assemblyName = assemblyName || "H5.$Unknown"; - - var asm = System.Reflection.Assembly.assemblies[assemblyName]; - - if (!asm) { - asm = new System.Reflection.Assembly(assemblyName, res); - } else { - H5.apply(asm.res, res || {}); - } - - var oldAssembly = H5.$currentAssembly; - - H5.$currentAssembly = asm; - - if (callback) { - var old = H5.Class.staticInitAllow; - H5.Class.staticInitAllow = false; - - callback.call(H5.global, asm, H5.global); - - H5.Class.staticInitAllow = old; - } - - H5.init(); - - if (restore) { - H5.$currentAssembly = oldAssembly; - } - }; - - H5.define("System.Reflection.Assembly", { - statics: { - assemblies: {}, - versions: {} - }, - - ctor: function (name, res) { - this.$initialize(); - this.name = name; - this.res = res || {}; - this.$types = {}; - this.$ = {}; - - System.Reflection.Assembly.assemblies[name] = this; - }, - - toString: function () { - return this.name; - }, - - getVersion: function () { - return System.Reflection.Assembly.versions[this.name] || ""; - }, - - getManifestResourceNames: function () { - return Object.keys(this.res); - }, - - getManifestResourceDataAsBase64: function (type, name) { - if (arguments.length === 1) { - name = type; - type = null; - } - - if (type) { - name = H5.Reflection.getTypeNamespace(type) + "." + name; - } - - return this.res[name] || null; - }, - - getManifestResourceData: function (type, name) { - if (arguments.length === 1) { - name = type; - type = null; - } - - if (type) { - name = H5.Reflection.getTypeNamespace(type) + '.' + name; - } - - var r = this.res[name]; - - return r ? System.Convert.fromBase64String(r) : null; - }, - - getCustomAttributes: function (attributeType) { - if (this.attr && attributeType && !H5.isBoolean(attributeType)) { - return this.attr.filter(function (a) { - return H5.is(a, attributeType); - }); - } - - return this.attr || []; - } - }); - - H5.$currentAssembly = new System.Reflection.Assembly("mscorlib"); - H5.SystemAssembly = H5.$currentAssembly; - H5.SystemAssembly.$types["System.Reflection.Assembly"] = System.Reflection.Assembly; - System.Reflection.Assembly.$assembly = H5.SystemAssembly; - - var $asm = H5.$currentAssembly; - - // @source Object.js - - H5.define("System.Object", { }); - - // @source Void.js - - H5.define("System.Void", { - $kind: "struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - return $;} - } - }, - methods: { - $clone: function (to) { return this; } - } - }); - - // @source SystemAssemblyVersion.js - - H5.init(function () { - H5.SystemAssembly.version = ""; - H5.SystemAssembly.compiler = "26.2.64512+b8dfb02a1b84111ce13a8a540d89c90ad40f4f40"; - }); - - H5.define("H5.Utils.SystemAssemblyVersion"); - - // @source Reflection.js - - H5.Reflection = { - deferredMeta: [], - - setMetadata: function (type, metadata, ns) { - if (H5.isString(type)) { - var typeName = type; - type = H5.unroll(typeName); - - if (type == null) { - H5.Reflection.deferredMeta.push({ typeName: typeName, metadata: metadata, ns: ns }); - return; - } - } - - ns = H5.unroll(ns); - type.$getMetadata = H5.Reflection.getMetadata; - type.$metadata = metadata; - }, - - initMetaData: function (type, metadata) { - if (metadata.m) { - for (var i = 0; i < metadata.m.length; i++) { - var m = metadata.m[i]; - - m.td = type; - - if (m.ad) { - m.ad.td = type; - } - - if (m.r) { - m.r.td = type; - } - - if (m.g) { - m.g.td = type; - } - - if (m.s) { - m.s.td = type; - } - - if (m.tprm && H5.isArray(m.tprm)) { - for (var j = 0; j < m.tprm.length; j++) { - m.tprm[j] = H5.Reflection.createTypeParam(m.tprm[j], type, m, j); - } - } - } - } - - type.$metadata = metadata; - type.$initMetaData = true; - }, - - getMetadata: function () { - if (!this.$metadata && this.$genericTypeDefinition) { - this.$metadata = this.$genericTypeDefinition.$factoryMetadata || this.$genericTypeDefinition.$metadata; - } - - var metadata = this.$metadata; - - if (typeof (metadata) === "function") { - if (this.$isGenericTypeDefinition && !this.$factoryMetadata) { - this.$factoryMetadata = this.$metadata; - } - - if (this.$typeArguments) { - metadata = this.$metadata.apply(null, this.$typeArguments); - } else if (this.$isGenericTypeDefinition) { - var arr = H5.Reflection.createTypeParams(this.$metadata); - this.$typeArguments = arr; - metadata = this.$metadata.apply(null, arr); - } else { - metadata = this.$metadata(); - } - } - - if (!this.$initMetaData && metadata) { - H5.Reflection.initMetaData(this, metadata); - } - - return metadata; - }, - - createTypeParams: function (fn, t) { - var args, - names = [], - fnStr = fn.toString(); - - args = fnStr.slice(fnStr.indexOf("(") + 1, fnStr.indexOf(")")).match(/([^\s,]+)/g) || []; - - for (var i = 0; i < args.length; i++) { - names.push(H5.Reflection.createTypeParam(args[i], t, null, i)); - } - - return names; - }, - - createTypeParam: function (name, t, m, idx) { - var fn = function TypeParameter() { }; - - fn.$$name = name; - fn.$isTypeParameter = true; - - if (t) { - fn.td = t; - } - - if (m) { - fn.md = m; - } - - if (idx != null) { - fn.gPrmPos = idx; - } - - return fn; - }, - - load: function (name) { - return System.Reflection.Assembly.assemblies[name] || require(name); - }, - - getGenericTypeDefinition: function (type) { - if (type.$isGenericTypeDefinition) { - return type; - } - - if (!type.$genericTypeDefinition) { - throw new System.InvalidOperationException.$ctor1("This operation is only valid on generic types."); - } - - return type.$genericTypeDefinition; - }, - - getGenericParameterCount: function (type) { - return type.$typeArgumentCount || 0; - }, - - getGenericArguments: function (type) { - return type.$typeArguments || []; - }, - - getMethodGenericArguments: function (m) { - return m.tprm || []; - }, - - isGenericTypeDefinition: function (type) { - return type.$isGenericTypeDefinition || false; - }, - - isGenericType: function (type) { - return type.$genericTypeDefinition != null || H5.Reflection.isGenericTypeDefinition(type); - }, - - convertType: function (type) { - if (type === Boolean) { - return System.Boolean; - } - - if (type === String) { - return System.String; - } - - if (type === Object) { - return System.Object; - } - - if (type === Date) { - return System.DateTime; - } - - return type; - }, - - getBaseType: function (type) { - if (H5.isObject(type) || H5.Reflection.isInterface(type) || type.prototype == null) { - return null; - } else if (Object.getPrototypeOf) { - return H5.Reflection.convertType(Object.getPrototypeOf(type.prototype).constructor); - } else { - var p = type.prototype; - - if (Object.prototype.hasOwnProperty.call(p, "constructor")) { - var ownValue; - - try { - ownValue = p.constructor; - delete p.constructor; - return H5.Reflection.convertType(p.constructor); - } finally { - p.constructor = ownValue; - } - } - - return H5.Reflection.convertType(p.constructor); - } - }, - - getTypeFullName: function (obj) { - var str; - - if (obj.$$fullname) { - str = obj.$$fullname; - } else if (obj.$$name) { - str = obj.$$name; - } - - if (str) { - var ns = H5.Reflection.getTypeNamespace(obj, str); - - if (ns) { - var idx = str.indexOf("["); - var name = str.substring(ns.length + 1, idx === -1 ? str.length : idx); - - if (new RegExp(/[\.\$]/).test(name)) { - str = ns + "." + name.replace(/\.|\$/g, function (match) { return (match === ".") ? "+" : "`"; }) + (idx === -1 ? "" : str.substring(idx)); - } - } - - return str; - } - - if (obj.constructor === Object) { - str = obj.toString(); - - var match = (/\[object (.{1,})\]/).exec(str); - var name = (match && match.length > 1) ? match[1] : "Object"; - - return name == "Object" ? "System.Object" : name; - } else if (obj.constructor === Function) { - str = obj.toString(); - } else { - str = obj.constructor.toString(); - } - - var results = (/function (.{1,})\(/).exec(str); - - if ((results && results.length > 1)) { - return results[1]; - } - - return "System.Object"; - }, - - _makeQName: function (name, asm) { - return name + (asm ? ", " + asm.name : ""); - }, - - getTypeQName: function (type) { - return H5.Reflection._makeQName(H5.Reflection.getTypeFullName(type), type.$assembly); - }, - - getTypeName: function (type) { - var fullName = H5.Reflection.getTypeFullName(type), - bIndex = fullName.indexOf("["), - pIndex = fullName.lastIndexOf("+", bIndex >= 0 ? bIndex : fullName.length), - nsIndex = pIndex > -1 ? pIndex : fullName.lastIndexOf(".", bIndex >= 0 ? bIndex : fullName.length); - - var name = nsIndex > 0 ? (bIndex >= 0 ? fullName.substring(nsIndex + 1, bIndex) : fullName.substr(nsIndex + 1)) : fullName; - - return type.$isArray ? name + "[]" : name; - }, - - getTypeNamespace: function (type, name) { - var fullName = name || H5.Reflection.getTypeFullName(type), - bIndex = fullName.indexOf("["), - nsIndex = fullName.lastIndexOf(".", bIndex >= 0 ? bIndex : fullName.length), - ns = nsIndex > 0 ? fullName.substr(0, nsIndex) : ""; - - if (type.$assembly) { - var parentType = H5.Reflection._getAssemblyType(type.$assembly, ns); - - if (parentType) { - ns = H5.Reflection.getTypeNamespace(parentType); - } - } - - return ns; - }, - - getTypeAssembly: function (type) { - if (type.$isArray) { - return H5.Reflection.getTypeAssembly(type.$elementType); - } - - if (System.Array.contains([Date, Number, Boolean, String, Function, Array], type)) { - return H5.SystemAssembly; - } - - return type.$assembly || H5.SystemAssembly; - }, - - _extractArrayRank: function (name) { - var rank = -1, - m = (/<(\d+)>$/g).exec(name); - - if (m) { - name = name.substring(0, m.index); - rank = parseInt(m[1]); - } - - m = (/\[(,*)\]$/g).exec(name); - - if (m) { - name = name.substring(0, m.index); - rank = m[1].length + 1; - } - - return { - rank: rank, - name: name - }; - }, - - _getAssemblyType: function (asm, name) { - var noAsm = false, - rank = -1; - - if (new RegExp(/[\+\`]/).test(name)) { - name = name.replace(/\+|\`/g, function (match) { return match === "+" ? "." : "$"}); - } - - if (!asm) { - asm = H5.SystemAssembly; - noAsm = true; - } - - var rankInfo = H5.Reflection._extractArrayRank(name); - rank = rankInfo.rank; - name = rankInfo.name; - - if (asm.$types) { - var t = asm.$types[name] || null; - - if (t) { - return rank > -1 ? System.Array.type(t, rank) : t; - } - - if (asm.name === "mscorlib") { - asm = H5.global; - } else { - return null; - } - } - - var a = name.split("."), - scope = asm; - - for (var i = 0; i < a.length; i++) { - scope = scope[a[i]]; - - if (!scope) { - return null; - } - } - - if (typeof scope !== "function" || !noAsm && scope.$assembly && asm.name !== scope.$assembly.name) { - return null; - } - - return rank > -1 ? System.Array.type(scope, rank) : scope; - }, - - getAssemblyTypes: function (asm) { - var result = []; - - if (asm.$types) { - for (var t in asm.$types) { - if (asm.$types.hasOwnProperty(t)) { - result.push(asm.$types[t]); - } - } - } else { - var traverse = function (s, n) { - for (var c in s) { - if (s.hasOwnProperty(c)) { - traverse(s[c], c); - } - } - - if (typeof (s) === "function" && H5.isUpper(n.charCodeAt(0))) { - result.push(s); - } - }; - - traverse(asm, ""); - } - - return result; - }, - - createAssemblyInstance: function (asm, typeName) { - var t = H5.Reflection.getType(typeName, asm); - - return t ? H5.createInstance(t) : null; - }, - - getInterfaces: function (type) { - var t; - - if (type.$allInterfaces) { - return type.$allInterfaces; - } else if (type === Date) { - return [System.IComparable$1(Date), System.IEquatable$1(Date), System.IComparable, System.IFormattable]; - } else if (type === Number) { - return [System.IComparable$1(H5.Int), System.IEquatable$1(H5.Int), System.IComparable, System.IFormattable]; - } else if (type === Boolean) { - return [System.IComparable$1(Boolean), System.IEquatable$1(Boolean), System.IComparable]; - } else if (type === String) { - return [System.IComparable$1(String), System.IEquatable$1(String), System.IComparable, System.ICloneable, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable$1(System.Char)]; - } else if (type === Array || type.$isArray || (t = System.Array._typedArrays[H5.getTypeName(type)])) { - t = t || type.$elementType || System.Object; - return [System.Collections.IEnumerable, System.Collections.ICollection, System.ICloneable, System.Collections.IList, System.Collections.Generic.IEnumerable$1(t), System.Collections.Generic.ICollection$1(t), System.Collections.Generic.IList$1(t)]; - } else { - return []; - } - }, - - isInstanceOfType: function (instance, type) { - return H5.is(instance, type); - }, - - isAssignableFrom: function (baseType, type) { - if (baseType == null) { - throw new System.NullReferenceException(); - } - - if (type == null) { - return false; - } - - if (baseType === type || H5.isObject(baseType)) { - return true; - } - - if (H5.isFunction(baseType.isAssignableFrom)) { - return baseType.isAssignableFrom(type); - } - - if (type === Array) { - return System.Array.is([], baseType); - } - - if (H5.Reflection.isInterface(baseType) && System.Array.contains(H5.Reflection.getInterfaces(type), baseType)) { - return true; - } - - if (baseType.$elementType && baseType.$isArray && type.$elementType && type.$isArray) { - if (H5.Reflection.isValueType(baseType.$elementType) !== H5.Reflection.isValueType(type.$elementType)) { - return false; - } - - return baseType.$rank === type.$rank && H5.Reflection.isAssignableFrom(baseType.$elementType, type.$elementType); - } - - var inheritors = type.$$inherits, - i, - r; - - if (inheritors) { - for (i = 0; i < inheritors.length; i++) { - r = H5.Reflection.isAssignableFrom(baseType, inheritors[i]); - - if (r) { - return true; - } - } - } else { - return baseType.isPrototypeOf(type); - } - - return false; - }, - - isClass: function (type) { - return (type.$kind === "class" || type.$kind === "nested class" || type === Array || type === Function || type === RegExp || type === String || type === Error || type === Object); - }, - - isEnum: function (type) { - return type.$kind === "enum"; - }, - - isFlags: function (type) { - return !!(type.prototype && type.prototype.$flags); - }, - - isInterface: function (type) { - return type.$kind === "interface" || type.$kind === "nested interface"; - }, - - isAbstract: function (type) { - if (type === Function || type === System.Type) { - return true; - } - return ((H5.Reflection.getMetaValue(type, "att", 0) & 128) != 0); - }, - - _getType: function (typeName, asm, re, noinit) { - var outer = !re; - - if (outer) { - typeName = typeName.replace(/\[(,*)\]/g, function (match, g1) { - return "<" + (g1.length + 1) + ">" - }); - } - - var next = function () { - for (; ;) { - var m = re.exec(typeName); - - if (m && m[0] == "[" && (typeName[m.index + 1] === "]" || typeName[m.index + 1] === ",")) { - continue; - } - - if (m && m[0] == "]" && (typeName[m.index - 1] === "[" || typeName[m.index - 1] === ",")) { - continue; - } - - if (m && m[0] == "," && (typeName[m.index + 1] === "]" || typeName[m.index + 1] === ",")) { - continue; - } - - return m; - } - }; - - re = re || /[[,\]]/g; - - var last = re.lastIndex, - m = next(), - tname, - targs = [], - t, - noasm = !asm; - - //asm = asm || H5.$currentAssembly; - - if (m) { - tname = typeName.substring(last, m.index); - - switch (m[0]) { - case "[": - if (typeName[m.index + 1] !== "[") { - return null; - } - - for (; ;) { - next(); - t = H5.Reflection._getType(typeName, null, re); - - if (!t) { - return null; - } - - targs.push(t); - m = next(); - - if (m[0] === "]") { - break; - } else if (m[0] !== ",") { - return null; - } - } - - var arrMatch = (/^\s*<(\d+)>/g).exec(typeName.substring(m.index + 1)); - - if (arrMatch) { - tname = tname + "<" + parseInt(arrMatch[1]) + ">"; - } - - m = next(); - - if (m && m[0] === ",") { - next(); - - if (!(asm = System.Reflection.Assembly.assemblies[(re.lastIndex > 0 ? typeName.substring(m.index + 1, re.lastIndex - 1) : typeName.substring(m.index + 1)).trim()])) { - return null; - } - } - break; - - case "]": - break; - - case ",": - next(); - - if (!(asm = System.Reflection.Assembly.assemblies[(re.lastIndex > 0 ? typeName.substring(m.index + 1, re.lastIndex - 1) : typeName.substring(m.index + 1)).trim()])) { - return null; - } - - break; - } - } else { - tname = typeName.substring(last); - } - - if (outer && re.lastIndex) { - return null; - } - - tname = tname.trim(); - - var rankInfo = H5.Reflection._extractArrayRank(tname); - var rank = rankInfo.rank; - - tname = rankInfo.name; - - t = H5.Reflection._getAssemblyType(asm, tname); - - if (noinit) { - return t; - } - - if (!t && noasm) { - for (var asmName in System.Reflection.Assembly.assemblies) { - if (System.Reflection.Assembly.assemblies.hasOwnProperty(asmName) && System.Reflection.Assembly.assemblies[asmName] !== asm) { - t = H5.Reflection._getType(typeName, System.Reflection.Assembly.assemblies[asmName], null,true); - - if (t) { - break; - } - } - } - } - - t = targs.length ? t.apply(null, targs) : t; - - if (t && t.$staticInit) { - t.$staticInit(); - } - - if (rank > -1) { - t = System.Array.type(t, rank); - } - - return t; - }, - - getType: function (typeName, asm) { - if (typeName == null) { - throw new System.ArgumentNullException.$ctor1("typeName"); - } - - return typeName ? H5.Reflection._getType(typeName, asm) : null; - }, - - isPrimitive: function (type) { - if (type === System.Int64 || - type === System.UInt64 || - type === System.Double || - type === System.Single || - type === System.Byte || - type === System.SByte || - type === System.Int16 || - type === System.UInt16 || - type === System.Int32 || - type === System.UInt32 || - type === System.Boolean || - type === Boolean || - type === System.Char || - type === Number) { - return true; - } - - return false; - }, - - canAcceptNull: function (type) { - if (type.$kind === "struct" || - type.$kind === "enum" || - type === System.Decimal || - type === System.Int64 || - type === System.UInt64 || - type === System.Double || - type === System.Single || - type === System.Byte || - type === System.SByte || - type === System.Int16 || - type === System.UInt16 || - type === System.Int32 || - type === System.UInt32 || - type === H5.Int || - type === System.Boolean || - type === System.DateTime || - type === Boolean || - type === Date || - type === Number) { - return false; - } - - return true; - }, - - applyConstructor: function (constructor, args) { - if (!args || args.length === 0) { - return new constructor(); - } - - if (constructor.$$initCtor && constructor.$kind !== "anonymous") { - var md = H5.getMetadata(constructor), - count = 0; - - if (md) { - var ctors = H5.Reflection.getMembers(constructor, 1, 28), - found; - - for (var j = 0; j < ctors.length; j++) { - var ctor = ctors[j]; - - if (ctor.p && ctor.p.length === args.length) { - found = true; - - for (var k = 0; k < ctor.p.length; k++) { - var p = ctor.p[k]; - - if (!H5.is(args[k], p) || args[k] == null && !H5.Reflection.canAcceptNull(p)) { - found = false; - - break; - } - } - - if (found) { - constructor = constructor[ctor.sn]; - count++; - } - } - } - } else { - if (H5.isFunction(constructor.ctor) && constructor.ctor.length === args.length) { - constructor = constructor.ctor; - } else { - var name = "$ctor", - i = 1; - - while (H5.isFunction(constructor[name + i])) { - if (constructor[name + i].length === args.length) { - constructor = constructor[name + i]; - count++; - } - - i++; - } - } - } - - if (count > 1) { - throw new System.Exception("The ambiguous constructor call"); - } - } - - var f = function () { - constructor.apply(this, args); - }; - - f.prototype = constructor.prototype; - - return new f(); - }, - - getAttributes: function (type, attrType, inherit) { - var result = [], - i, - t, - a, - md, - type_md; - - if (inherit) { - var b = H5.Reflection.getBaseType(type); - - if (b) { - a = H5.Reflection.getAttributes(b, attrType, true); - - for (i = 0; i < a.length; i++) { - t = H5.getType(a[i]); - md = H5.getMetadata(t); - - if (!md || !md.ni) { - result.push(a[i]); - } - } - } - } - - type_md = H5.getMetadata(type); - - if (type_md && type_md.at) { - for (i = 0; i < type_md.at.length; i++) { - a = type_md.at[i]; - - if (attrType == null || H5.Reflection.isInstanceOfType(a, attrType)) { - t = H5.getType(a); - md = H5.getMetadata(t); - - if (!md || !md.am) { - for (var j = result.length - 1; j >= 0; j--) { - if (H5.Reflection.isInstanceOfType(result[j], t)) { - result.splice(j, 1); - } - } - } - - result.push(a); - } - } - } - - return result; - }, - - getMembers: function (type, memberTypes, bindingAttr, name, params) { - var result = []; - - if ((bindingAttr & 72) === 72 || (bindingAttr & 6) === 4) { - var b = H5.Reflection.getBaseType(type); - - if (b) { - result = H5.Reflection.getMembers(b, memberTypes & ~1, bindingAttr & (bindingAttr & 64 ? 255 : 247) & (bindingAttr & 2 ? 251 : 255), name, params); - } - } - - var idx = 0, - f = function (m) { - if ((memberTypes & m.t) && (((bindingAttr & 4) && !m.is) || ((bindingAttr & 8) && m.is)) && (!name || ((bindingAttr & 1) === 1 ? (m.n.toUpperCase() === name.toUpperCase()) : (m.n === name)))) { - if ((bindingAttr & 16) === 16 && m.a === 2 || - (bindingAttr & 32) === 32 && m.a !== 2) { - if (params) { - if ((m.p || []).length !== params.length) { - return; - } - - for (var i = 0; i < params.length; i++) { - if (params[i] !== m.p[i]) { - return; - } - } - } - - if (m.ov || m.v) { - result = result.filter(function (a) { - return !(a.n == m.n && a.t == m.t); - }); - } - - result.splice(idx++, 0, m); - } - } - }; - - var type_md = H5.getMetadata(type); - - if (type_md && type_md.m) { - var mNames = ["g", "s", "ad", "r"]; - - for (var i = 0; i < type_md.m.length; i++) { - var m = type_md.m[i]; - - f(m); - - for (var j = 0; j < 4; j++) { - var a = mNames[j]; - - if (m[a]) { - f(m[a]); - } - } - } - } - - if (bindingAttr & 256) { - while (type) { - var r = []; - - for (var i = 0; i < result.length; i++) { - if (result[i].td === type) { - r.push(result[i]); - } - } - - if (r.length > 1) { - throw new System.Reflection.AmbiguousMatchException.$ctor1("Ambiguous match"); - } else if (r.length === 1) { - return r[0]; - } - - type = H5.Reflection.getBaseType(type); - } - - return null; - } - - return result; - }, - - createDelegate: function (mi, firstArgument) { - var isStatic = mi.is || mi.sm, - bind = firstArgument != null && !isStatic, - method = H5.Reflection.midel(mi, firstArgument, null, bind); - - if (!bind) { - if (isStatic) { - return function () { - var args = firstArgument != null ? [firstArgument] : []; - - return method.apply(mi.td, args.concat(Array.prototype.slice.call(arguments, 0))); - }; - } else { - return function (target) { - return method.apply(target, Array.prototype.slice.call(arguments, 1)); - }; - } - } - - return method; - }, - - midel: function (mi, target, typeArguments, bind) { - if (bind !== false) { - if (mi.is && !!target) { - throw new System.ArgumentException.$ctor1("Cannot specify target for static method"); - } else if (!mi.is && !target) { - throw new System.ArgumentException.$ctor1("Must specify target for instance method"); - } - } - - var method; - - if (mi.fg) { - method = function () { return (mi.is ? mi.td : this)[mi.fg]; }; - } else if (mi.fs) { - method = function (v) { (mi.is ? mi.td : this)[mi.fs] = v; }; - } else { - method = mi.def || (mi.is || mi.sm ? mi.td[mi.sn] : (target ? target[mi.sn] : mi.td.prototype[mi.sn])); - - if (mi.tpc) { - if (mi.constructed && (!typeArguments || typeArguments.length == 0)) { - typeArguments = mi.tprm; - } - - if (!typeArguments || typeArguments.length !== mi.tpc) { - throw new System.ArgumentException.$ctor1("Wrong number of type arguments"); - } - - var gMethod = method; - - method = function () { - return gMethod.apply(this, typeArguments.concat(Array.prototype.slice.call(arguments))); - } - } else { - if (typeArguments && typeArguments.length) { - throw new System.ArgumentException.$ctor1("Cannot specify type arguments for non-generic method"); - } - } - - if (mi.exp) { - var _m1 = method; - - method = function () { return _m1.apply(this, Array.prototype.slice.call(arguments, 0, arguments.length - 1).concat(arguments[arguments.length - 1])); }; - } - - if (mi.sm) { - var _m2 = method; - - method = function () { return _m2.apply(null, [this].concat(Array.prototype.slice.call(arguments))); }; - } - } - - var orig = method; - - method = function () { - var args = [], - params = mi.pi || [], - v, - p; - - if (!params.length && mi.p && mi.p.length) { - params = mi.p.map(function (t) { - return {pt: t}; - }); - } - - for (var i = 0; i < arguments.length; i++) { - p = params[i] || params[params.length - 1]; - v = arguments[i]; - - args[i] = p && p.pt === System.Object ? v : H5.unbox(arguments[i]); - - if (v == null && p && H5.Reflection.isValueType(p.pt)) { - args[i] = H5.getDefaultValue(p.pt); - } - } - - var v = orig.apply(this, args); - - return v != null && mi.box ? mi.box(v) : v; - }; - - return bind !== false ? H5.fn.bind(target, method) : method; - }, - - invokeCI: function (ci, args) { - if (ci.exp) { - args = args.slice(0, args.length - 1).concat(args[args.length - 1]); - } - - if (ci.def) { - return ci.def.apply(null, args); - } else if (ci.sm) { - return ci.td[ci.sn].apply(null, args); - } else { - if (ci.td.$literal) { - return (ci.sn ? ci.td[ci.sn] : ci.td).apply(ci.td, args); - } - - return H5.Reflection.applyConstructor(ci.sn ? ci.td[ci.sn] : ci.td, args); - } - }, - - fieldAccess: function (fi, obj) { - if (fi.is && !!obj) { - throw new System.ArgumentException.$ctor1("Cannot specify target for static field"); - } else if (!fi.is && !obj) { - throw new System.ArgumentException.$ctor1("Must specify target for instance field"); - } - - obj = fi.is ? fi.td : obj; - - if (arguments.length === 3) { - var v = arguments[2]; - - if (v == null && H5.Reflection.isValueType(fi.rt)) { - v = H5.getDefaultValue(fi.rt); - } - - obj[fi.sn] = v; - } else { - return fi.box ? fi.box(obj[fi.sn]) : obj[fi.sn]; - } - }, - - getMetaValue: function (type, name, dv) { - var md = type.$isTypeParameter ? type : H5.getMetadata(type); - - return md ? (md[name] || dv) : dv; - }, - - isArray: function (type) { - return H5.arrayTypes.indexOf(type) >= 0; - }, - - isValueType: function (type) { - return !H5.Reflection.canAcceptNull(type); - }, - - getNestedTypes: function (type, flags) { - var types = H5.Reflection.getMetaValue(type, "nested", []); - - if (flags) { - var tmp = []; - for (var i = 0; i < types.length; i++) { - var nestedType = types[i], - attrs = H5.Reflection.getMetaValue(nestedType, "att", 0), - access = attrs & 7, - isPublic = access === 1 || access === 2; - - if ((flags & 16) === 16 && isPublic || - (flags & 32) === 32 && !isPublic) { - tmp.push(nestedType); - } - } - - types = tmp; - } - - return types; - }, - - getNestedType: function (type, name, flags) { - var types = H5.Reflection.getNestedTypes(type, flags); - - for (var i = 0; i < types.length; i++) { - if (H5.Reflection.getTypeName(types[i]) === name) { - return types[i]; - } - } - - return null; - }, - - isGenericMethodDefinition: function (mi) { - return H5.Reflection.isGenericMethod(mi) && !mi.constructed; - }, - - isGenericMethod: function (mi) { - return !!mi.tpc; - }, - - containsGenericParameters: function (mi) { - if (mi.$typeArguments) { - for (var i = 0; i < mi.$typeArguments.length; i++) { - if (mi.$typeArguments[i].$isTypeParameter) { - return true; - } - } - } - - var tprm = mi.tprm || []; - - for (var i = 0; i < tprm.length; i++) { - if (tprm[i].$isTypeParameter) { - return true; - } - } - - return false; - }, - - genericParameterPosition: function (type) { - if (!type.$isTypeParameter) { - throw new System.InvalidOperationException.$ctor1("The current type does not represent a type parameter."); - } - return type.gPrmPos || 0; - }, - - makeGenericMethod: function (mi, args) { - var cmi = H5.apply({}, mi); - cmi.tprm = args; - cmi.p = args; - cmi.gd = mi; - cmi.constructed = true; - - return cmi; - }, - - getGenericMethodDefinition: function (mi) { - if (!mi.tpc) { - throw new System.InvalidOperationException.$ctor1("The current method is not a generic method. "); - } - - return mi.gd || mi; - } - }; - - H5.setMetadata = H5.Reflection.setMetadata; - - System.Reflection.ConstructorInfo = { - $is: function (obj) { - return obj != null && obj.t === 1; - } - }; - - System.Reflection.EventInfo = { - $is: function (obj) { - return obj != null && obj.t === 2; - } - }; - - System.Reflection.FieldInfo = { - $is: function (obj) { - return obj != null && obj.t === 4; - } - }; - - System.Reflection.MethodBase = { - $is: function (obj) { - return obj != null && (obj.t === 1 || obj.t === 8); - } - }; - - System.Reflection.MethodInfo = { - $is: function (obj) { - return obj != null && obj.t === 8; - } - }; - - System.Reflection.PropertyInfo = { - $is: function (obj) { - return obj != null && obj.t === 16; - } - }; - - System.AppDomain = { - getAssemblies: function () { - return Object.keys(System.Reflection.Assembly.assemblies).map(function (n) { return System.Reflection.Assembly.assemblies[n]; }); - } - }; - - // @source Interfaces.js - - H5.define("System.IFormattable", { - $kind: "interface", - statics: { - $is: function (obj) { - if (H5.isNumber(obj) || H5.isDate(obj)) { - return true; - } - - return H5.is(obj, System.IFormattable, true); - } - } - }); - - H5.define("System.IComparable", { - $kind: "interface", - - statics: { - $is: function (obj) { - if (H5.isNumber(obj) || H5.isDate(obj) || H5.isBoolean(obj) || H5.isString(obj)) { - return true; - } - - return H5.is(obj, System.IComparable, true); - } - } - }); - - H5.define("System.IFormatProvider", { - $kind: "interface" - }); - - H5.define("System.ICloneable", { - $kind: "interface" - }); - - H5.define("System.IComparable$1", function (T) { - return { - $kind: "interface", - - statics: { - $is: function (obj) { - if (H5.isNumber(obj) && T.$number && T.$is(obj) || H5.isDate(obj) && (T === Date || T === System.DateTime) || H5.isBoolean(obj) && (T === Boolean || T === System.Boolean) || H5.isString(obj) && (T === String || T === System.String)) { - return true; - } - - return H5.is(obj, System.IComparable$1(T), true); - }, - - isAssignableFrom: function (type) { - if (type === System.DateTime && T === Date) { - return true; - } - - return H5.Reflection.getInterfaces(type).indexOf(System.IComparable$1(T)) >= 0; - } - } - }; - }); - - H5.define("System.IEquatable$1", function (T) { - return { - $kind: "interface", - - statics: { - $is: function (obj) { - if (H5.isNumber(obj) && T.$number && T.$is(obj) || H5.isDate(obj) && (T === Date || T === System.DateTime) || H5.isBoolean(obj) && (T === Boolean || T === System.Boolean) || H5.isString(obj) && (T === String || T === System.String)) { - return true; - } - - return H5.is(obj, System.IEquatable$1(T), true); - }, - - isAssignableFrom: function (type) { - if (type === System.DateTime && T === Date) { - return true; - } - - return H5.Reflection.getInterfaces(type).indexOf(System.IEquatable$1(T)) >= 0; - } - } - }; - }); - - H5.define("H5.IPromise", { - $kind: "interface" - }); - - H5.define("System.IDisposable", { - $kind: "interface" - }); - - H5.define("System.IAsyncResult", { - $kind: "interface" - }); - - // @source ValueType.js - -H5.define("System.ValueType", { - statics: { - methods: { - $is: function (obj) { - return H5.Reflection.isValueType(H5.getType(obj)); - } - } - } -}); - - // @source Enum.js - - var enumMethods = { - nameEquals: function (n1, n2, ignoreCase) { - if (ignoreCase) { - return n1.toLowerCase() === n2.toLowerCase(); - } - - return (n1.charAt(0).toLowerCase() + n1.slice(1)) === (n2.charAt(0).toLowerCase() + n2.slice(1)); - }, - - checkEnumType: function (enumType) { - if (!enumType) { - throw new System.ArgumentNullException.$ctor1("enumType"); - } - - if (enumType.prototype && enumType.$kind !== "enum") { - throw new System.ArgumentException.$ctor1("", "enumType"); - } - }, - - getUnderlyingType: function (type) { - System.Enum.checkEnumType(type); - - return type.prototype.$utype || System.Int32; - }, - - toName: function (name) { - return name; - }, - - toObject: function (enumType, value) { - value = H5.unbox(value, true); - - if (value == null) { - return null; - } - - return enumMethods.parse(enumType, value.toString(), false, true); - }, - - parse: function (enumType, s, ignoreCase, silent) { - System.Enum.checkEnumType(enumType); - - if (s != null) { - if (enumType === Number || enumType === System.String || enumType.$number) { - return s; - } - - var intValue = {}; - - if (System.Int32.tryParse(s, intValue)) { - return H5.box(intValue.v, enumType, function (obj) { return System.Enum.toString(enumType, obj); }); - } - - var names = System.Enum.getNames(enumType), - values = enumType; - - if (!enumType.prototype || !enumType.prototype.$flags) { - for (var i = 0; i < names.length; i++) { - var name = names[i]; - - if (enumMethods.nameEquals(name, s, ignoreCase)) { - return H5.box(values[name], enumType, function (obj) { return System.Enum.toString(enumType, obj); }); - } - } - } else { - var parts = s.split(","), - value = 0, - parsed = true; - - for (var i = parts.length - 1; i >= 0; i--) { - var part = parts[i].trim(), - found = false; - - for (var n = 0; n < names.length; n++) { - var name = names[n]; - - if (enumMethods.nameEquals(name, part, ignoreCase)) { - value |= values[name]; - found = true; - - break; - } - } - - if (!found) { - parsed = false; - - break; - } - } - - if (parsed) { - return H5.box(value, enumType, function (obj) { return System.Enum.toString(enumType, obj); }); - } - } - } - - if (silent !== true) { - throw new System.ArgumentException.$ctor3("silent", "Invalid Enumeration Value"); - } - - return null; - }, - - toStringFn: function (type) { - return function (value) { - return System.Enum.toString(type, value); - }; - }, - - toString: function (enumType, value, forceFlags) { - if (arguments.length === 0) { - return "System.Enum"; - } - - if (value && value.$boxed && enumType === System.Enum) { - enumType = value.type; - } - - value = H5.unbox(value, true); - - if (enumType === Number || enumType === System.String || enumType.$number) { - return value.toString(); - } - - System.Enum.checkEnumType(enumType); - - var values = enumType, - names = System.Enum.getNames(enumType), - isLong = System.Int64.is64Bit(value); - - if (((!enumType.prototype || !enumType.prototype.$flags) && forceFlags !== true) || (value === 0)) { - for (var i = 0; i < names.length; i++) { - var name = names[i]; - - if (isLong && System.Int64.is64Bit(values[name]) ? (values[name].eq(value)) : (values[name] === value)) { - return enumMethods.toName(name); - } - } - - return value.toString(); - } else { - var parts = [], - entries = System.Enum.getValuesAndNames(enumType), - index = entries.length - 1, - saveResult = value; - - while (index >= 0) { - var entry = entries[index], - long = isLong && System.Int64.is64Bit(entry.value); - - if ((index == 0) && (long ? entry.value.isZero() : entry.value == 0)) { - break; - } - - if (long ? (value.and(entry.value).eq(entry.value)) : ((value & entry.value) == entry.value)) { - if (long) { - value = value.sub(entry.value); - } else { - value -= entry.value; - } - - parts.unshift(entry.name); - } - - index--; - } - - if (isLong ? !value.isZero() : value !== 0) { - return saveResult.toString(); - } - - if (isLong ? saveResult.isZero() : saveResult === 0) { - var entry = entries[0]; - - if (entry && (System.Int64.is64Bit(entry.value) ? entry.value.isZero() : (entry.value == 0))) { - return entry.name; - } - - return "0"; - } - - return parts.join(", "); - } - }, - - getValuesAndNames: function (enumType) { - System.Enum.checkEnumType(enumType); - - var parts = [], - names = System.Enum.getNames(enumType), - values = enumType; - - for (var i = 0; i < names.length; i++) { - parts.push({ name: names[i], value: values[names[i]] }); - } - - return parts.sort(function (i1, i2) { - return System.Int64.is64Bit(i1.value) ? i1.value.sub(i2.value).sign() : (i1.value - i2.value); - }); - }, - - getValues: function (enumType) { - System.Enum.checkEnumType(enumType); - - var parts = [], - names = System.Enum.getNames(enumType), - values = enumType; - - for (var i = 0; i < names.length; i++) { - parts.push(values[names[i]]); - } - - return parts.sort(function (i1, i2) { - return System.Int64.is64Bit(i1) ? i1.sub(i2).sign() : (i1 - i2); - }); - }, - - format: function (enumType, value, format) { - System.Enum.checkEnumType(enumType); - - var name; - - if (!H5.hasValue(value) && (name = "value") || !H5.hasValue(format) && (name = "format")) { - throw new System.ArgumentNullException.$ctor1(name); - } - - value = H5.unbox(value, true); - - switch (format) { - case "G": - case "g": - return System.Enum.toString(enumType, value); - case "x": - case "X": - return value.toString(16); - case "d": - case "D": - return value.toString(); - case "f": - case "F": - return System.Enum.toString(enumType, value, true); - default: - throw new System.FormatException(); - } - }, - - getNames: function (enumType) { - System.Enum.checkEnumType(enumType); - - var parts = [], - values = enumType; - - if (enumType.$names) { - return enumType.$names.slice(0); - } - - for (var i in values) { - if (values.hasOwnProperty(i) && i.indexOf("$") < 0 && typeof values[i] !== "function") { - parts.push([enumMethods.toName(i), values[i]]); - } - } - - return parts.sort(function (i1, i2) { - return System.Int64.is64Bit(i1[1]) ? i1[1].sub(i2[1]).sign() : (i1[1] - i2[1]); - }).map(function (i) { - return i[0]; - }); - }, - - getName: function (enumType, value) { - value = H5.unbox(value, true); - - if (value == null) { - throw new System.ArgumentNullException.$ctor1("value"); - } - - var isLong = System.Int64.is64Bit(value); - - if (!isLong && !(typeof (value) === "number" && Math.floor(value, 0) === value)) { - throw new System.ArgumentException.$ctor1("Argument must be integer", "value"); - } - - System.Enum.checkEnumType(enumType); - - var names = System.Enum.getNames(enumType), - values = enumType; - - for (var i = 0; i < names.length; i++) { - var name = names[i]; - - if (isLong ? value.eq(values[name]) : (values[name] === value)) { - return name; - } - } - - return null; - }, - - hasFlag: function (value, flag) { - flag = H5.unbox(flag, true); - var isLong = System.Int64.is64Bit(value); - - return flag === 0 || (isLong ? !value.and(flag).isZero() : !!(value & flag)); - }, - - isDefined: function (enumType, value) { - value = H5.unbox(value, true); - - System.Enum.checkEnumType(enumType); - - var values = enumType, - names = System.Enum.getNames(enumType), - isString = H5.isString(value), - isLong = System.Int64.is64Bit(value); - - for (var i = 0; i < names.length; i++) { - var name = names[i]; - - if (isString ? enumMethods.nameEquals(name, value, false) : (isLong ? value.eq(values[name]) : (values[name] === value))) { - return true; - } - } - - return false; - }, - - tryParse: function (enumType, value, result, ignoreCase) { - result.v = H5.unbox(enumMethods.parse(enumType, value, ignoreCase, true), true); - - if (result.v == null) { - result.v = 0; - - return false; - } - - return true; - }, - - equals: function (v1, v2, T) { - if (v2 && v2.$boxed && (v1 && v1.$boxed || T)) { - if (v2.type !== (v1.type || T)) { - return false; - } - } - - return System.Enum.equalsT(v1, v2); - }, - - equalsT: function (v1, v2) { - return H5.equals(H5.unbox(v1, true), H5.unbox(v2, true)); - } - }; - - H5.define("System.Enum", { - inherits: [System.IComparable, System.IFormattable], - statics: { - methods: enumMethods - } - }); - - // @source Nullable.js - - var nullable = { - hasValue: H5.hasValue, - - getValue: function (obj) { - obj = H5.unbox(obj, true); - - if (!H5.hasValue(obj)) { - throw new System.InvalidOperationException.$ctor1("Nullable instance doesn't have a value."); - } - - return obj; - }, - - getValueOrDefault: function (obj, defValue) { - return H5.hasValue(obj) ? obj : defValue; - }, - - add: function (a, b) { - return H5.hasValue$1(a, b) ? a + b : null; - }, - - band: function (a, b) { - return H5.hasValue$1(a, b) ? a & b : null; - }, - - bor: function (a, b) { - return H5.hasValue$1(a, b) ? a | b : null; - }, - - and: function (a, b) { - if (a === true && b === true) { - return true; - } else if (a === false || b === false) { - return false; - } - - return null; - }, - - or: function (a, b) { - if (a === true || b === true) { - return true; - } else if (a === false && b === false) { - return false; - } - - return null; - }, - - div: function (a, b) { - return H5.hasValue$1(a, b) ? a / b : null; - }, - - eq: function (a, b) { - return !H5.hasValue(a) ? !H5.hasValue(b) : (a === b); - }, - - equals: function (a, b, fn) { - return !H5.hasValue(a) ? !H5.hasValue(b) : (fn ? fn(a, b) : H5.equals(a, b)); - }, - - toString: function (a, fn) { - return !H5.hasValue(a) ? "" : (fn ? fn(a) : a.toString()); - }, - - toStringFn: function (fn) { - return function (v) { - return System.Nullable.toString(v, fn); - }; - }, - - getHashCode: function (a, fn) { - return !H5.hasValue(a) ? 0 : (fn ? fn(a) : H5.getHashCode(a)); - }, - - getHashCodeFn: function (fn) { - return function (v) { - return System.Nullable.getHashCode(v, fn); - }; - }, - - xor: function (a, b) { - if (H5.hasValue$1(a, b)) { - if (H5.isBoolean(a) && H5.isBoolean(b)) { - return a != b; - } - - return a ^ b; - } - - return null; - }, - - gt: function (a, b) { - return H5.hasValue$1(a, b) && a > b; - }, - - gte: function (a, b) { - return H5.hasValue$1(a, b) && a >= b; - }, - - neq: function (a, b) { - return !H5.hasValue(a) ? H5.hasValue(b) : (a !== b); - }, - - lt: function (a, b) { - return H5.hasValue$1(a, b) && a < b; - }, - - lte: function (a, b) { - return H5.hasValue$1(a, b) && a <= b; - }, - - mod: function (a, b) { - return H5.hasValue$1(a, b) ? a % b : null; - }, - - mul: function (a, b) { - return H5.hasValue$1(a, b) ? a * b : null; - }, - - imul: function (a, b) { - return H5.hasValue$1(a, b) ? H5.Int.mul(a, b) : null; - }, - - sl: function (a, b) { - return H5.hasValue$1(a, b) ? a << b : null; - }, - - sr: function (a, b) { - return H5.hasValue$1(a, b) ? a >> b : null; - }, - - srr: function (a, b) { - return H5.hasValue$1(a, b) ? a >>> b : null; - }, - - sub: function (a, b) { - return H5.hasValue$1(a, b) ? a - b : null; - }, - - bnot: function (a) { - return H5.hasValue(a) ? ~a : null; - }, - - neg: function (a) { - return H5.hasValue(a) ? -a : null; - }, - - not: function (a) { - return H5.hasValue(a) ? !a : null; - }, - - pos: function (a) { - return H5.hasValue(a) ? +a : null; - }, - - lift: function () { - for (var i = 1; i < arguments.length; i++) { - if (!H5.hasValue(arguments[i])) { - return null; - } - } - - if (arguments[0] == null) { - return null; - } - - if (arguments[0].apply == undefined) { - return arguments[0]; - } - - return arguments[0].apply(null, Array.prototype.slice.call(arguments, 1)); - }, - - lift1: function (f, o) { - return H5.hasValue(o) ? (typeof f === "function" ? f.apply(null, Array.prototype.slice.call(arguments, 1)) : o[f].apply(o, Array.prototype.slice.call(arguments, 2))) : null; - }, - - lift2: function (f, a, b) { - return H5.hasValue$1(a, b) ? (typeof f === "function" ? f.apply(null, Array.prototype.slice.call(arguments, 1)) : a[f].apply(a, Array.prototype.slice.call(arguments, 2))) : null; - }, - - liftcmp: function (f, a, b) { - return H5.hasValue$1(a, b) ? (typeof f === "function" ? f.apply(null, Array.prototype.slice.call(arguments, 1)) : a[f].apply(a, Array.prototype.slice.call(arguments, 2))) : false; - }, - - lifteq: function (f, a, b) { - var va = H5.hasValue(a), - vb = H5.hasValue(b); - - return (!va && !vb) || (va && vb && (typeof f === "function" ? f.apply(null, Array.prototype.slice.call(arguments, 1)) : a[f].apply(a, Array.prototype.slice.call(arguments, 2)))); - }, - - liftne: function (f, a, b) { - var va = H5.hasValue(a), - vb = H5.hasValue(b); - - return (va !== vb) || (va && (typeof f === "function" ? f.apply(null, Array.prototype.slice.call(arguments, 1)) : a[f].apply(a, Array.prototype.slice.call(arguments, 2)))); - }, - - getUnderlyingType: function (nullableType) { - if (!nullableType) { - throw new System.ArgumentNullException.$ctor1("nullableType"); - } - - if (H5.Reflection.isGenericType(nullableType) && - !H5.Reflection.isGenericTypeDefinition(nullableType)) { - var genericType = H5.Reflection.getGenericTypeDefinition(nullableType); - - if (genericType === System.Nullable$1) { - return H5.Reflection.getGenericArguments(nullableType)[0]; - } - } - - return null; - }, - - compare: function (n1, n2) { - return System.Collections.Generic.Comparer$1.$default.compare(n1, n2); - } - }; - - System.Nullable = nullable; - - H5.define("System.Nullable$1", function (T) { - return { - $kind: "struct", - - statics: { - $nullable: true, - $nullableType: T, - getDefaultValue: function () { - return null; - }, - - $is: function (obj) { - return H5.is(obj, T); - } - } - }; - }); - - // @source Char.js - - H5.define("System.Char", { - inherits: [System.IComparable, System.IFormattable], - $kind: "struct", - statics: { - min: 0, - - max: 65535, - - $is: function (instance) { - return typeof (instance) === "number" && Math.round(instance, 0) == instance && instance >= System.Char.min && instance <= System.Char.max; - }, - - getDefaultValue: function () { - return 0; - }, - - parse: function (s) { - if (!H5.hasValue(s)) { - throw new System.ArgumentNullException.$ctor1("s"); - } - - if (s.length !== 1) { - throw new System.FormatException(); - } - - return s.charCodeAt(0); - }, - - tryParse: function (s, result) { - var b = s && s.length === 1; - - result.v = b ? s.charCodeAt(0) : 0; - - return b; - }, - - format: function (number, format, provider) { - return H5.Int.format(number, format, provider); - }, - - charCodeAt: function (str, index) { - if (str == null) { - throw new System.ArgumentNullException(); - } - - if (str.length != 1) { - throw new System.FormatException.$ctor1("String must be exactly one character long"); - } - - return str.charCodeAt(index); - }, - - _isWhiteSpaceMatch: /[^\s\x09-\x0D\x85\xA0]/, - - isWhiteSpace: function (s) { - return !System.Char._isWhiteSpaceMatch.test(s); - }, - - _isDigitMatch: new RegExp(/[0-9\u0030-\u0039\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]/), - - isDigit: function (value) { - if (value < 256) { - return (value >= 48 && value <= 57); - } - - return System.Char._isDigitMatch.test(String.fromCharCode(value)); - }, - - _isLetterMatch: new RegExp(/[A-Za-z\u0061-\u007A\u00B5\u00DF-\u00F6\u00F8-\u00FF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0561-\u0587\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7FA\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A\u0041-\u005A\u00C0-\u00D6\u00D8-\u00DE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA\uFF21-\uFF3A\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5\u06E6\u07F4\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA717-\uA71F\uA770\uA788\uA7F8\uA7F9\uA9CF\uAA70\uAADD\uAAF3\uAAF4\uFF70\uFF9E\uFF9F\u00AA\u00BA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05F0-\u05F2\u0620-\u063F\u0641-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E45\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10D0-\u10FA\u10FD-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A\uA62B\uA66E\uA6A0-\uA6E5\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/), - - isLetter: function (value) { - if (value < 256) { - return (value >= 65 && value <= 90) || (value >= 97 && value <= 122); - } - - return System.Char._isLetterMatch.test(String.fromCharCode(value)); - }, - - _isHighSurrogateMatch: new RegExp(/[\uD800-\uDBFF]/), - - isHighSurrogate: function (value) { - return System.Char._isHighSurrogateMatch.test(String.fromCharCode(value)); - }, - - _isLowSurrogateMatch: new RegExp(/[\uDC00-\uDFFF]/), - - isLowSurrogate: function (value) { - return System.Char._isLowSurrogateMatch.test(String.fromCharCode(value)); - }, - - _isSurrogateMatch: new RegExp(/[\uD800-\uDFFF]/), - - isSurrogate: function (value) { - return System.Char._isSurrogateMatch.test(String.fromCharCode(value)); - }, - - _isNullMatch: new RegExp("\u0000"), - - isNull: function (value) { - return System.Char._isNullMatch.test(String.fromCharCode(value)); - }, - - _isSymbolMatch: new RegExp(/[\u20A0-\u20CF\u20D0-\u20FF\u2100-\u214F\u2150-\u218F\u2190-\u21FF\u2200-\u22FF\u2300-\u23FF\u25A0-\u25FF\u2600-\u26FF\u2700-\u27BF\u27C0-\u27EF\u27F0-\u27FF\u2800-\u28FF\u2900-\u297F\u2980-\u29FF\u2A00-\u2AFF\u2B00-\u2BFF]/), - - isSymbol: function (value) { - if (value < 256) { - return ([36, 43, 60, 61, 62, 94, 96, 124, 126, 162, 163, 164, 165, 166, 167, 168, 169, 172, 174, 175, 176, 177, 180, 182, 184, 215, 247].indexOf(value) != -1); - } - - return System.Char._isSymbolMatch.test(String.fromCharCode(value)); - }, - - _isSeparatorMatch: new RegExp(/[\u2028\u2029\u0020\u00A0\u1680\u180E\u2000-\u200A\u202F\u205F\u3000]/), - - isSeparator: function (value) { - if (value < 256) { - return (value == 32 || value == 160); - } - - return System.Char._isSeparatorMatch.test(String.fromCharCode(value)); - }, - - _isPunctuationMatch: new RegExp(/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65\u002D\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D\u0028\u005B\u007B\u0F3A\u0F3C\u169B\u201A\u201E\u2045\u207D\u208D\u2329\u2768\u276A\u276C\u276E\u2770\u2772\u2774\u27C5\u27E6\u27E8\u27EA\u27EC\u27EE\u2983\u2985\u2987\u2989\u298B\u298D\u298F\u2991\u2993\u2995\u2997\u29D8\u29DA\u29FC\u2E22\u2E24\u2E26\u2E28\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u3018\u301A\u301D\uFD3E\uFE17\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE47\uFE59\uFE5B\uFE5D\uFF08\uFF3B\uFF5B\uFF5F\uFF62\u0029\u005D\u007D\u0F3B\u0F3D\u169C\u2046\u207E\u208E\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E23\u2E25\u2E27\u2E29\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3F\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63\u00AB\u2018\u201B\u201C\u201F\u2039\u2E02\u2E04\u2E09\u2E0C\u2E1C\u2E20\u00BB\u2019\u201D\u203A\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21\u005F\u203F\u2040\u2054\uFE33\uFE34\uFE4D-\uFE4F\uFF3F\u0021-\u0023\u0025-\u0027\u002A\u002C\u002E\u002F\u003A\u003B\u003F\u0040\u005C\u00A1\u00A7\u00B6\u00B7\u00BF\u037E\u0387\u055A-\u055F\u0589\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u166D\u166E\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u1805\u1807-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2016\u2017\u2020-\u2027\u2030-\u2038\u203B-\u203E\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205E\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00\u2E01\u2E06-\u2E08\u2E0B\u2E0E-\u2E16\u2E18\u2E19\u2E1B\u2E1E\u2E1F\u2E2A-\u2E2E\u2E30-\u2E39\u3001-\u3003\u303D\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFE10-\uFE16\uFE19\uFE30\uFE45\uFE46\uFE49-\uFE4C\uFE50-\uFE52\uFE54-\uFE57\uFE5F-\uFE61\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF07\uFF0A\uFF0C\uFF0E\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3C\uFF61\uFF64\uFF65]/), - - isPunctuation: function (value) { - if (value < 256) { - return ([33, 34, 35, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 58, 59, 63, 64, 91, 92, 93, 95, 123, 125, 161, 171, 173, 183, 187, 191].indexOf(value) != -1); - } - - return System.Char._isPunctuationMatch.test(String.fromCharCode(value)); - }, - - _isNumberMatch: new RegExp(/[\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19\u0030-\u0039\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF\u00B2\u00B3\u00B9\u00BC-\u00BE\u09F4-\u09F9\u0B72-\u0B77\u0BF0-\u0BF2\u0C78-\u0C7E\u0D70-\u0D75\u0F2A-\u0F33\u1369-\u137C\u17F0-\u17F9\u19DA\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215F\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA830-\uA835]/), - - isNumber: function (value) { - if (value < 256) { - return ([48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 178, 179, 185, 188, 189, 190].indexOf(value) != -1); - } - - return System.Char._isNumberMatch.test(String.fromCharCode(value)); - }, - - _isControlMatch: new RegExp(/[\u0000-\u001F\u007F\u0080-\u009F]/), - - isControl: function (value) { - if (value < 256) { - return (value >= 0 && value <= 31) || (value >= 127 && value <= 159); - } - - return System.Char._isControlMatch.test(String.fromCharCode(value)); - }, - - isLatin1: function (ch) { - return (ch <= 255); - }, - - isAscii: function (ch) { - return (ch <= 127); - }, - - isUpper: function (s, index) { - if (s == null) { - throw new System.ArgumentNullException.$ctor1("s"); - } - - if ((index >>> 0) >= ((s.length) >>> 0)) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - var c = s.charCodeAt(index); - - if (System.Char.isLatin1(c)) { - if (System.Char.isAscii(c)) { - return (c >= 65 && c <= 90); - } - } - - return H5.isUpper(c); - }, - - equals: function (v1, v2) { - if (H5.is(v1, System.Char) && H5.is(v2, System.Char)) { - return H5.unbox(v1, true) === H5.unbox(v2, true); - } - - return false; - }, - - equalsT: function (v1, v2) { - return H5.unbox(v1, true) === H5.unbox(v2, true); - }, - - getHashCode: function (v) { - return v | (v << 16); - } - } - }); - - H5.Class.addExtend(System.Char, [System.IComparable$1(System.Char), System.IEquatable$1(System.Char)]); - - // @source Ref.js - - H5.define("H5.Ref$1", function (T) { return { - statics: { - methods: { - CreateIn: function (value) { - return new (H5.Ref$1(T))(function () { - return value; - }, $asm.$.H5.Ref$1.f1); - }, - op_Implicit: function (reference) { - return reference.Value; - } - } - }, - fields: { - getter: null, - setter: null - }, - props: { - Value: { - get: function () { - return this.getter(); - }, - set: function (value) { - this.setter(value); - } - }, - v: { - get: function () { - return this.Value; - }, - set: function (value) { - this.Value = value; - } - } - }, - ctors: { - ctor: function (getter, setter) { - this.$initialize(); - this.getter = getter; - this.setter = setter; - } - }, - methods: { - toString: function () { - return H5.toString(this.Value); - }, - valueOf: function () { - return this.Value; - } - } - }; }); - - H5.ns("H5.Ref$1", $asm.$); - - H5.apply($asm.$.H5.Ref$1, { - f1: function (v) { } - }); - - // @source IConvertible.js - - H5.define("System.IConvertible", { - $kind: "interface" - }); - - // @source HResults.js - - H5.define("System.HResults"); - - // @source Exception.js - - H5.define("System.Exception", { - config: { - properties: { - Message: { - get: function () { - return this.message; - } - }, - - InnerException: { - get: function () { - return this.innerException; - } - }, - - StackTrace: { - get: function () { - return this.errorStack.stack; - } - }, - - Data: { - get: function () { - return this.data; - } - }, - - HResult: { - get: function () { - return this._HResult; - }, - set: function (value) { - this._HResult = value; - } - } - } - }, - - ctor: function (message, innerException) { - this.$initialize(); - this.message = message ? message : ("Exception of type '" + H5.getTypeName(this) + "' was thrown."); - this.innerException = innerException ? innerException : null; - this.errorStack = new Error(this.message); - this.data = new (System.Collections.Generic.Dictionary$2(System.Object, System.Object))(); - }, - - getBaseException: function () { - var inner = this.innerException; - var back = this; - - while (inner != null) { - back = inner; - inner = inner.innerException; - } - - return back; - }, - - toString: function () { - var builder = H5.getTypeName(this); - - if (this.Message != null) { - builder += ": " + this.Message + "\n"; - } else { - builder += "\n"; - } - - if (this.StackTrace != null) { - builder += this.StackTrace + "\n"; - } - - return builder; - }, - - statics: { - create: function (error) { - if (H5.is(error, System.Exception)) { - return error; - } - - var ex; - - if (error instanceof TypeError) { - ex = new System.NullReferenceException.$ctor1(error.message); - } else if (error instanceof RangeError) { - ex = new System.ArgumentOutOfRangeException.$ctor1(error.message); - } else if (error instanceof Error) { - return new System.SystemException.$ctor1(error); - } else if (error && error.error && error.error.stack) { - ex = new System.Exception(error.error.stack); - } else { - ex = new System.Exception(error ? error.message ? error.message : error.toString() : null); - } - - ex.errorStack = error; - - return ex; - } - } - }); - - // @source SystemException.js - - H5.define("System.SystemException", { - inherits: [System.Exception], - ctors: { - ctor: function () { - this.$initialize(); - System.Exception.ctor.call(this, "System error."); - this.HResult = -2146233087; - }, - $ctor1: function (message) { - this.$initialize(); - System.Exception.ctor.call(this, message); - this.HResult = -2146233087; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.Exception.ctor.call(this, message, innerException); - this.HResult = -2146233087; - } - } - }); - - // @source OutOfMemoryException.js - - H5.define("System.OutOfMemoryException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Insufficient memory to continue the execution of the program."); - this.HResult = -2147024362; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2147024362; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2147024362; - } - } - }); - - // @source ArrayTypeMismatchException.js - - H5.define("System.ArrayTypeMismatchException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Attempted to access an element as a type incompatible with the array."); - this.HResult = -2146233085; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233085; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2146233085; - } - } - }); - - // @source MissingManifestResourceException.js - - H5.define("System.Resources.MissingManifestResourceException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Unable to find manifest resource."); - this.HResult = -2146233038; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233038; - }, - $ctor2: function (message, inner) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, inner); - this.HResult = -2146233038; - } - } - }); - - // @source TextInfo.js - - H5.define("System.Globalization.TextInfo", { - inherits: [System.ICloneable], - fields: { - listSeparator: null - }, - props: { - ANSICodePage: 0, - CultureName: null, - EBCDICCodePage: 0, - IsReadOnly: false, - IsRightToLeft: false, - LCID: 0, - ListSeparator: { - get: function () { - return this.listSeparator; - }, - set: function (value) { - this.VerifyWritable(); - - this.listSeparator = value; - } - }, - MacCodePage: 0, - OEMCodePage: 0 - }, - alias: ["clone", "System$ICloneable$clone"], - methods: { - clone: function () { - return H5.copy(new System.Globalization.TextInfo(), this, System.Array.init(["ANSICodePage", "CultureName", "EBCDICCodePage", "IsRightToLeft", "LCID", "listSeparator", "MacCodePage", "OEMCodePage", "IsReadOnly"], System.String)); - }, - VerifyWritable: function () { - if (this.IsReadOnly) { - throw new System.InvalidOperationException.$ctor1("Instance is read-only."); - } - } - } - }); - - // @source BidiCategory.js - - H5.define("System.Globalization.BidiCategory", { - $kind: "enum", - statics: { - fields: { - LeftToRight: 0, - LeftToRightEmbedding: 1, - LeftToRightOverride: 2, - RightToLeft: 3, - RightToLeftArabic: 4, - RightToLeftEmbedding: 5, - RightToLeftOverride: 6, - PopDirectionalFormat: 7, - EuropeanNumber: 8, - EuropeanNumberSeparator: 9, - EuropeanNumberTerminator: 10, - ArabicNumber: 11, - CommonNumberSeparator: 12, - NonSpacingMark: 13, - BoundaryNeutral: 14, - ParagraphSeparator: 15, - SegmentSeparator: 16, - Whitespace: 17, - OtherNeutrals: 18, - LeftToRightIsolate: 19, - RightToLeftIsolate: 20, - FirstStrongIsolate: 21, - PopDirectionIsolate: 22 - } - } - }); - - // @source SortVersion.js - - H5.define("System.Globalization.SortVersion", { - inherits: function () { return [System.IEquatable$1(System.Globalization.SortVersion)]; }, - statics: { - methods: { - op_Equality: function (left, right) { - if (left != null) { - return left.equalsT(right); - } - - if (right != null) { - return right.equalsT(left); - } - - return true; - }, - op_Inequality: function (left, right) { - return !(System.Globalization.SortVersion.op_Equality(left, right)); - } - } - }, - fields: { - m_NlsVersion: 0, - m_SortId: null - }, - props: { - FullVersion: { - get: function () { - return this.m_NlsVersion; - } - }, - SortId: { - get: function () { - return this.m_SortId; - } - } - }, - alias: ["equalsT", "System$IEquatable$1$System$Globalization$SortVersion$equalsT"], - ctors: { - init: function () { - this.m_SortId = H5.getDefaultValue(System.Guid); - }, - ctor: function (fullVersion, sortId) { - this.$initialize(); - this.m_SortId = sortId; - this.m_NlsVersion = fullVersion; - }, - $ctor1: function (nlsVersion, effectiveId, customVersion) { - this.$initialize(); - this.m_NlsVersion = nlsVersion; - - if (System.Guid.op_Equality(customVersion, System.Guid.Empty)) { - var b1 = (effectiveId >> 24) & 255; - var b2 = ((effectiveId & 16711680) >> 16) & 255; - var b3 = ((effectiveId & 65280) >> 8) & 255; - var b4 = (effectiveId & 255) & 255; - customVersion = new System.Guid.$ctor2(0, 0, 0, 0, 0, 0, 0, b1, b2, b3, b4); - } - - this.m_SortId = customVersion; - } - }, - methods: { - equals: function (obj) { - var n = H5.as(obj, System.Globalization.SortVersion); - if (System.Globalization.SortVersion.op_Inequality(n, null)) { - return this.equalsT(n); - } - - return false; - }, - equalsT: function (other) { - if (System.Globalization.SortVersion.op_Equality(other, null)) { - return false; - } - - return this.m_NlsVersion === other.m_NlsVersion && System.Guid.op_Equality(this.m_SortId, other.m_SortId); - }, - getHashCode: function () { - return H5.Int.mul(this.m_NlsVersion, 7) | this.m_SortId.getHashCode(); - } - } - }); - - // @source UnicodeCategory.js - - H5.define("System.Globalization.UnicodeCategory", { - $kind: "enum", - statics: { - fields: { - UppercaseLetter: 0, - LowercaseLetter: 1, - TitlecaseLetter: 2, - ModifierLetter: 3, - OtherLetter: 4, - NonSpacingMark: 5, - SpacingCombiningMark: 6, - EnclosingMark: 7, - DecimalDigitNumber: 8, - LetterNumber: 9, - OtherNumber: 10, - SpaceSeparator: 11, - LineSeparator: 12, - ParagraphSeparator: 13, - Control: 14, - Format: 15, - Surrogate: 16, - PrivateUse: 17, - ConnectorPunctuation: 18, - DashPunctuation: 19, - OpenPunctuation: 20, - ClosePunctuation: 21, - InitialQuotePunctuation: 22, - FinalQuotePunctuation: 23, - OtherPunctuation: 24, - MathSymbol: 25, - CurrencySymbol: 26, - ModifierSymbol: 27, - OtherSymbol: 28, - OtherNotAssigned: 29 - } - } - }); - - // @source DaylightTimeStruct.js - - H5.define("System.Globalization.DaylightTimeStruct", { - $kind: "struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.Start = System.DateTime.getDefaultValue(); - $.End = System.DateTime.getDefaultValue(); - $.Delta = H5.getDefaultValue(System.TimeSpan); - return $;} - } - }, - fields: { - Start: null, - End: null, - Delta: null - }, - ctors: { - init: function () { - this.Start = System.DateTime.getDefaultValue(); - this.End = System.DateTime.getDefaultValue(); - this.Delta = H5.getDefaultValue(System.TimeSpan); - }, - $ctor1: function (start, end, delta) { - this.$initialize(); - this.Start = start; - this.End = end; - this.Delta = delta; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - getHashCode: function () { - var h = H5.addHash([7445027511, this.Start, this.End, this.Delta]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Globalization.DaylightTimeStruct)) { - return false; - } - return H5.equals(this.Start, o.Start) && H5.equals(this.End, o.End) && H5.equals(this.Delta, o.Delta); - }, - $clone: function (to) { - var s = to || new System.Globalization.DaylightTimeStruct(); - s.Start = this.Start; - s.End = this.End; - s.Delta = this.Delta; - return s; - } - } - }); - - // @source DaylightTime.js - - H5.define("System.Globalization.DaylightTime", { - fields: { - _start: null, - _end: null, - _delta: null - }, - props: { - Start: { - get: function () { - return this._start; - } - }, - End: { - get: function () { - return this._end; - } - }, - Delta: { - get: function () { - return this._delta; - } - } - }, - ctors: { - init: function () { - this._start = System.DateTime.getDefaultValue(); - this._end = System.DateTime.getDefaultValue(); - this._delta = H5.getDefaultValue(System.TimeSpan); - }, - ctor: function () { - this.$initialize(); - }, - $ctor1: function (start, end, delta) { - this.$initialize(); - this._start = start; - this._end = end; - this._delta = delta; - } - } - }); - - // @source Globalization.js - - H5.define("System.Globalization.DateTimeFormatInfo", { - inherits: [System.IFormatProvider, System.ICloneable], - - config: { - alias: [ - "getFormat", "System$IFormatProvider$getFormat" - ] - }, - - statics: { - $allStandardFormats: { - "d": "shortDatePattern", - "D": "longDatePattern", - "f": "longDatePattern shortTimePattern", - "F": "longDatePattern longTimePattern", - "g": "shortDatePattern shortTimePattern", - "G": "shortDatePattern longTimePattern", - "m": "monthDayPattern", - "M": "monthDayPattern", - "o": "roundtripFormat", - "O": "roundtripFormat", - "r": "rfc1123", - "R": "rfc1123", - "s": "sortableDateTimePattern", - "S": "sortableDateTimePattern1", - "t": "shortTimePattern", - "T": "longTimePattern", - "u": "universalSortableDateTimePattern", - "U": "longDatePattern longTimePattern", - "y": "yearMonthPattern", - "Y": "yearMonthPattern" - }, - - ctor: function () { - this.invariantInfo = H5.merge(new System.Globalization.DateTimeFormatInfo(), { - abbreviatedDayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - abbreviatedMonthGenitiveNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ""], - abbreviatedMonthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ""], - amDesignator: "AM", - dateSeparator: "/", - dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], - firstDayOfWeek: 0, - fullDateTimePattern: "dddd, dd MMMM yyyy HH:mm:ss", - longDatePattern: "dddd, dd MMMM yyyy", - longTimePattern: "HH:mm:ss", - monthDayPattern: "MMMM dd", - monthGenitiveNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ""], - monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ""], - pmDesignator: "PM", - rfc1123: "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'", - shortDatePattern: "MM/dd/yyyy", - shortestDayNames: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], - shortTimePattern: "HH:mm", - sortableDateTimePattern: "yyyy'-'MM'-'dd'T'HH':'mm':'ss", - sortableDateTimePattern1: "yyyy'-'MM'-'dd", - timeSeparator: ":", - universalSortableDateTimePattern: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'", - yearMonthPattern: "yyyy MMMM", - roundtripFormat: "yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffzzz" - }); - } - }, - - getFormat: function (type) { - switch (type) { - case System.Globalization.DateTimeFormatInfo: - return this; - default: - return null; - } - }, - - getAbbreviatedDayName: function (dayofweek) { - if (dayofweek < 0 || dayofweek > 6) { - throw new System.ArgumentOutOfRangeException$ctor1("dayofweek"); - } - - return this.abbreviatedDayNames[dayofweek]; - }, - - getAbbreviatedMonthName: function (month) { - if (month < 1 || month > 13) { - throw new System.ArgumentOutOfRangeException.$ctor1("month"); - } - - return this.abbreviatedMonthNames[month - 1]; - }, - - getAllDateTimePatterns: function (format, returnNull) { - var f = System.Globalization.DateTimeFormatInfo.$allStandardFormats, - formats, - names, - pattern, - i, - result = []; - - if (format) { - if (!f[format]) { - if (returnNull) { - return null; - } - - throw new System.ArgumentException.$ctor3("", "format"); - } - - formats = {}; - formats[format] = f[format]; - } else { - formats = f; - } - - for (f in formats) { - names = formats[f].split(" "); - pattern = ""; - - for (i = 0; i < names.length; i++) { - pattern = (i === 0 ? "" : (pattern + " ")) + this[names[i]]; - } - - result.push(pattern); - } - - return result; - }, - - getDayName: function (dayofweek) { - if (dayofweek < 0 || dayofweek > 6) { - throw new System.ArgumentOutOfRangeException.$ctor1("dayofweek"); - } - - return this.dayNames[dayofweek]; - }, - - getMonthName: function (month) { - if (month < 1 || month > 13) { - throw new System.ArgumentOutOfRangeException.$ctor1("month"); - } - - return this.monthNames[month - 1]; - }, - - getShortestDayName: function (dayOfWeek) { - if (dayOfWeek < 0 || dayOfWeek > 6) { - throw new System.ArgumentOutOfRangeException.$ctor1("dayOfWeek"); - } - - return this.shortestDayNames[dayOfWeek]; - }, - - clone: function () { - return H5.copy(new System.Globalization.DateTimeFormatInfo(), this, [ - "abbreviatedDayNames", - "abbreviatedMonthGenitiveNames", - "abbreviatedMonthNames", - "amDesignator", - "dateSeparator", - "dayNames", - "firstDayOfWeek", - "fullDateTimePattern", - "longDatePattern", - "longTimePattern", - "monthDayPattern", - "monthGenitiveNames", - "monthNames", - "pmDesignator", - "rfc1123", - "shortDatePattern", - "shortestDayNames", - "shortTimePattern", - "sortableDateTimePattern", - "timeSeparator", - "universalSortableDateTimePattern", - "yearMonthPattern", - "roundtripFormat" - ]); - } - }); - - H5.define("System.Globalization.NumberFormatInfo", { - inherits: [System.IFormatProvider, System.ICloneable], - - config: { - alias: [ - "getFormat", "System$IFormatProvider$getFormat" - ] - }, - - statics: { - ctor: function () { - this.numberNegativePatterns = ["(n)", "-n", "- n", "n-", "n -"]; - this.currencyNegativePatterns = ["($n)", "-$n", "$-n", "$n-", "(n$)", "-n$", "n-$", "n$-", "-n $", "-$ n", "n $-", "$ n-", "$ -n", "n- $", "($ n)", "(n $)"]; - this.currencyPositivePatterns = ["$n", "n$", "$ n", "n $"]; - this.percentNegativePatterns = ["-n %", "-n%", "-%n", "%-n", "%n-", "n-%", "n%-", "-% n", "n %-", "% n-", "% -n", "n- %"]; - this.percentPositivePatterns = ["n %", "n%", "%n", "% n"]; - - this.invariantInfo = H5.merge(new System.Globalization.NumberFormatInfo(), { - nanSymbol: "NaN", - negativeSign: "-", - positiveSign: "+", - negativeInfinitySymbol: "-Infinity", - positiveInfinitySymbol: "Infinity", - - percentSymbol: "%", - percentGroupSizes: [3], - percentDecimalDigits: 2, - percentDecimalSeparator: ".", - percentGroupSeparator: ",", - percentPositivePattern: 0, - percentNegativePattern: 0, - - currencySymbol: "¤", - currencyGroupSizes: [3], - currencyDecimalDigits: 2, - currencyDecimalSeparator: ".", - currencyGroupSeparator: ",", - currencyNegativePattern: 0, - currencyPositivePattern: 0, - - numberGroupSizes: [3], - numberDecimalDigits: 2, - numberDecimalSeparator: ".", - numberGroupSeparator: ",", - numberNegativePattern: 1 - }); - } - }, - - getFormat: function (type) { - switch (type) { - case System.Globalization.NumberFormatInfo: - return this; - default: - return null; - } - }, - - clone: function () { - return H5.copy(new System.Globalization.NumberFormatInfo(), this, [ - "nanSymbol", - "negativeSign", - "positiveSign", - "negativeInfinitySymbol", - "positiveInfinitySymbol", - "percentSymbol", - "percentGroupSizes", - "percentDecimalDigits", - "percentDecimalSeparator", - "percentGroupSeparator", - "percentPositivePattern", - "percentNegativePattern", - "currencySymbol", - "currencyGroupSizes", - "currencyDecimalDigits", - "currencyDecimalSeparator", - "currencyGroupSeparator", - "currencyNegativePattern", - "currencyPositivePattern", - "numberGroupSizes", - "numberDecimalDigits", - "numberDecimalSeparator", - "numberGroupSeparator", - "numberNegativePattern" - ]); - } - }); - - H5.define("System.Globalization.CultureInfo", { - inherits: [System.IFormatProvider, System.ICloneable], - - config: { - alias: [ - "getFormat", "System$IFormatProvider$getFormat" - ] - }, - - $entryPoint: true, - - statics: { - ctor: function () { - this.cultures = this.cultures || {}; - - this.invariantCulture = H5.merge(new System.Globalization.CultureInfo("iv", true), { - englishName: "Invariant Language (Invariant Country)", - nativeName: "Invariant Language (Invariant Country)", - numberFormat: System.Globalization.NumberFormatInfo.invariantInfo, - dateTimeFormat: System.Globalization.DateTimeFormatInfo.invariantInfo, - TextInfo: H5.merge(new System.Globalization.TextInfo(), { - ANSICodePage: 1252, - CultureName: "", - EBCDICCodePage: 37, - listSeparator: ",", - IsRightToLeft: false, - LCID: 127, - MacCodePage: 10000, - OEMCodePage: 437, - IsReadOnly: true - }) - }); - - this.setCurrentCulture(System.Globalization.CultureInfo.invariantCulture); - }, - - getCurrentCulture: function () { - return this.currentCulture; - }, - - setCurrentCulture: function (culture) { - this.currentCulture = culture; - - System.Globalization.DateTimeFormatInfo.currentInfo = culture.dateTimeFormat; - System.Globalization.NumberFormatInfo.currentInfo = culture.numberFormat; - }, - - getCultureInfo: function (name) { - if (name == null) { - throw new System.ArgumentNullException.$ctor1("name"); - } else if (name === "") { - return System.Globalization.CultureInfo.invariantCulture; - } - - var c = this.cultures[name]; - - if (c == null) { - throw new System.Globalization.CultureNotFoundException.$ctor5("name", name); - } - - return c; - }, - - getCultures: function () { - var names = H5.getPropertyNames(this.cultures), - result = [], - i; - - for (i = 0; i < names.length; i++) { - result.push(this.cultures[names[i]]); - } - - return result; - } - }, - - ctor: function (name, create) { - this.$initialize(); - this.name = name; - - if (!System.Globalization.CultureInfo.cultures) { - System.Globalization.CultureInfo.cultures = {}; - } - - if (name == null) { - throw new System.ArgumentNullException.$ctor1("name"); - } - - var c; - - if (name === "") { - c = System.Globalization.CultureInfo.invariantCulture; - } else { - c = System.Globalization.CultureInfo.cultures[name]; - } - - if (c == null) { - if (!create) { - throw new System.Globalization.CultureNotFoundException.$ctor5("name", name); - } - - System.Globalization.CultureInfo.cultures[name] = this; - } else { - H5.copy(this, c, [ - "englishName", - "nativeName", - "numberFormat", - "dateTimeFormat", - "TextInfo" - ]); - - this.TextInfo.IsReadOnly = false; - } - }, - - getFormat: function (type) { - switch (type) { - case System.Globalization.NumberFormatInfo: - return this.numberFormat; - case System.Globalization.DateTimeFormatInfo: - return this.dateTimeFormat; - default: - return null; - } - }, - - clone: function () { - return new System.Globalization.CultureInfo(this.name); - } - }); - - // @source Environment.js - - H5.define("System.Environment", { - statics: { - fields: { - Variables: null - }, - props: { - Location: { - get: function () { - var g = H5.global; - - if (g && g.location) { - return g.location; - } - - return null; - } - }, - CommandLine: { - get: function () { - return (System.Environment.GetCommandLineArgs()).join(" "); - } - }, - CurrentDirectory: { - get: function () { - var l = System.Environment.Location; - - return l ? l.pathname : ""; - }, - set: function (value) { - var l = System.Environment.Location; - - if (l) { - l.pathname = value; - } - } - }, - ExitCode: 0, - Is64BitOperatingSystem: { - get: function () { - var n = H5.global ? H5.global.navigator : null; - - if (n && (!H5.referenceEquals(n.userAgent.indexOf("WOW64"), -1) || !H5.referenceEquals(n.userAgent.indexOf("Win64"), -1))) { - return true; - } - - return false; - } - }, - ProcessorCount: { - get: function () { - var n = H5.global ? H5.global.navigator : null; - - if (n && n.hardwareConcurrency) { - return n.hardwareConcurrency; - } - - return 1; - } - }, - StackTrace: { - get: function () { - var err = new Error(); - var s = err.stack; - - if (!System.String.isNullOrEmpty(s)) { - if (System.String.indexOf(s, "at") >= 0) { - return s.substr(System.String.indexOf(s, "at")); - } - } - - return ""; - } - }, - Version: { - get: function () { - var s = H5.SystemAssembly.compiler; - - var v = { }; - - if (System.Version.tryParse(s, v)) { - return v.v; - } - - return new System.Version.ctor(); - } - } - }, - ctors: { - init: function () { - this.ExitCode = 0; - }, - ctor: function () { - System.Environment.Variables = new (System.Collections.Generic.Dictionary$2(System.String,System.String)).ctor(); - System.Environment.PatchDictionary(System.Environment.Variables); - } - }, - methods: { - GetResourceString: function (key) { - return key; - }, - GetResourceString$1: function (key, values) { - if (values === void 0) { values = []; } - var s = System.Environment.GetResourceString(key); - return System.String.formatProvider.apply(System.String, [System.Globalization.CultureInfo.getCurrentCulture(), s].concat(values)); - }, - PatchDictionary: function (d) { - d.noKeyCheck = true; - - return d; - }, - Exit: function (exitCode) { - System.Environment.ExitCode = exitCode; - }, - ExpandEnvironmentVariables: function (name) { - var $t; - if (name == null) { - throw new System.ArgumentNullException.$ctor1(name); - } - - $t = H5.getEnumerator(System.Environment.Variables); - try { - while ($t.moveNext()) { - var pair = $t.Current; - name = System.String.replaceAll(name, "%" + (pair.key || "") + "%", pair.value); - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - - return name; - }, - FailFast: function (message) { - throw new System.Exception(message); - }, - FailFast$1: function (message, exception) { - throw new System.Exception(message, exception); - }, - GetCommandLineArgs: function () { - var l = System.Environment.Location; - - if (l) { - var args = new (System.Collections.Generic.List$1(System.String)).ctor(); - - var path = l.pathname; - - if (!System.String.isNullOrEmpty(path)) { - args.add(path); - } - - var search = l.search; - - if (!System.String.isNullOrEmpty(search) && search.length > 1) { - var query = System.String.split(search.substr(1), [38].map(function (i) {{ return String.fromCharCode(i); }})); - - for (var i = 0; i < query.length; i = (i + 1) | 0) { - var param = System.String.split(query[System.Array.index(i, query)], [61].map(function (i) {{ return String.fromCharCode(i); }})); - - for (var j = 0; j < param.length; j = (j + 1) | 0) { - args.add(param[System.Array.index(j, param)]); - } - } - } - - return args.ToArray(); - } - - return System.Array.init(0, null, System.String); - }, - GetEnvironmentVariable: function (variable) { - if (variable == null) { - throw new System.ArgumentNullException.$ctor1("variable"); - } - - var r = { }; - - if (System.Environment.Variables.tryGetValue(variable.toLowerCase(), r)) { - return r.v; - } - - return null; - }, - GetEnvironmentVariable$1: function (variable, target) { - return System.Environment.GetEnvironmentVariable(variable); - }, - GetEnvironmentVariables: function () { - return System.Environment.PatchDictionary(new (System.Collections.Generic.Dictionary$2(System.String,System.String)).$ctor1(System.Environment.Variables)); - }, - GetEnvironmentVariables$1: function (target) { - return System.Environment.GetEnvironmentVariables(); - }, - GetLogicalDrives: function () { - return System.Array.init(0, null, System.String); - }, - SetEnvironmentVariable: function (variable, value) { - if (variable == null) { - throw new System.ArgumentNullException.$ctor1("variable"); - } - - if (System.String.isNullOrEmpty(variable) || System.String.startsWith(variable, String.fromCharCode(0)) || System.String.contains(variable,"=") || variable.length > 32767) { - throw new System.ArgumentException.$ctor1("Incorrect variable (cannot be empty, contain zero character nor equal sign, be longer than 32767)."); - } - - variable = variable.toLowerCase(); - - if (System.String.isNullOrEmpty(value)) { - if (System.Environment.Variables.containsKey(variable)) { - System.Environment.Variables.remove(variable); - } - } else { - System.Environment.Variables.setItem(variable, value); - } - }, - SetEnvironmentVariable$1: function (variable, value, target) { - System.Environment.SetEnvironmentVariable(variable, value); - } - } - } - }); - - // @source StringSplitOptions.js - - H5.define("System.StringSplitOptions", { - $kind: "enum", - statics: { - fields: { - None: 0, - RemoveEmptyEntries: 1 - } - }, - $flags: true - }); - - // @source TypeCode.js - - H5.define("System.TypeCode", { - $kind: "enum", - statics: { - fields: { - Empty: 0, - Object: 1, - DBNull: 2, - Boolean: 3, - Char: 4, - SByte: 5, - Byte: 6, - Int16: 7, - UInt16: 8, - Int32: 9, - UInt32: 10, - Int64: 11, - UInt64: 12, - Single: 13, - Double: 14, - Decimal: 15, - DateTime: 16, - String: 18 - } - } - }); - - // @source TypeCodeValues.js - - H5.define("System.TypeCodeValues", { - statics: { - fields: { - Empty: null, - Object: null, - DBNull: null, - Boolean: null, - Char: null, - SByte: null, - Byte: null, - Int16: null, - UInt16: null, - Int32: null, - UInt32: null, - Int64: null, - UInt64: null, - Single: null, - Double: null, - Decimal: null, - DateTime: null, - String: null - }, - ctors: { - init: function () { - this.Empty = "0"; - this.Object = "1"; - this.DBNull = "2"; - this.Boolean = "3"; - this.Char = "4"; - this.SByte = "5"; - this.Byte = "6"; - this.Int16 = "7"; - this.UInt16 = "8"; - this.Int32 = "9"; - this.UInt32 = "10"; - this.Int64 = "11"; - this.UInt64 = "12"; - this.Single = "13"; - this.Double = "14"; - this.Decimal = "15"; - this.DateTime = "16"; - this.String = "18"; - } - } - } - }); - - // @source Type.js - -H5.define("System.Type", { - - statics: { - $is: function (instance) { - return instance && instance.constructor === Function; - }, - - getTypeCode: function (t) { - if (t == null) { - return System.TypeCode.Empty; - } - if (t === System.Double) { - return System.TypeCode.Double; - } - if (t === System.Single) { - return System.TypeCode.Single; - } - if (t === System.Decimal) { - return System.TypeCode.Decimal; - } - if (t === System.Byte) { - return System.TypeCode.Byte; - } - if (t === System.SByte) { - return System.TypeCode.SByte; - } - if (t === System.UInt16) { - return System.TypeCode.UInt16; - } - if (t === System.Int16) { - return System.TypeCode.Int16; - } - if (t === System.UInt32) { - return System.TypeCode.UInt32; - } - if (t === System.Int32) { - return System.TypeCode.Int32; - } - if (t === System.UInt64) { - return System.TypeCode.UInt64; - } - if (t === System.Int64) { - return System.TypeCode.Int64; - } - if (t === System.Boolean) { - return System.TypeCode.Boolean; - } - if (t === System.Char) { - return System.TypeCode.Char; - } - if (t === System.DateTime) { - return System.TypeCode.DateTime; - } - if (t === System.String) { - return System.TypeCode.String; - } - return System.TypeCode.Object; - } - } -}); - // @source Math.js - - H5.Math = { - divRem: function (a, b, result) { - var remainder = a % b; - - result.v = remainder; - - return (a - remainder) / b; - }, - - round: function (n, d, rounding) { - var m = Math.pow(10, d || 0); - - n *= m; - - var sign = (n > 0) | -(n < 0); - - if (n % 1 === 0.5 * sign) { - var f = Math.floor(n); - - return (f + (rounding === 4 ? (sign > 0) : (f % 2 * sign))) / m; - } - - return Math.round(n) / m; - }, - - log10: Math.log10 || function (x) { - return Math.log(x) / Math.LN10; - }, - - logWithBase: function (x, newBase) { - if (isNaN(x)) { - return x; - } - - if (isNaN(newBase)) { - return newBase; - } - - if (newBase === 1) { - return NaN - } - - if (x !== 1 && (newBase === 0 || newBase === Number.POSITIVE_INFINITY)) { - return NaN; - } - - return H5.Math.log10(x) / H5.Math.log10(newBase); - }, - - log: function (x) { - if (x === 0.0) { - return Number.NEGATIVE_INFINITY; - } - - if (x < 0.0 || isNaN(x)) { - return NaN; - } - - if (x === Number.POSITIVE_INFINITY) { - return Number.POSITIVE_INFINITY; - } - - if (x === Number.NEGATIVE_INFINITY) { - return NaN; - } - - return Math.log(x); - }, - - sinh: Math.sinh || function (x) { - return (Math.exp(x) - Math.exp(-x)) / 2; - }, - - cosh: Math.cosh || function (x) { - return (Math.exp(x) + Math.exp(-x)) / 2; - }, - - tanh: Math.tanh || function (x) { - if (x === Infinity) { - return 1; - } else if (x === -Infinity) { - return -1; - } else { - var y = Math.exp(2 * x); - - return (y - 1) / (y + 1); - } - }, - - IEEERemainder: function (x, y) { - var regularMod = x % y; - if (isNaN(regularMod)) { - return Number.NaN; - } - if (regularMod === 0) { - if (x < 0) { - return -0; - } - } - var alternativeResult; - alternativeResult = regularMod - (Math.abs(y) * H5.Int.sign(x)); - if (Math.abs(alternativeResult) === Math.abs(regularMod)) { - var divisionResult = x / y; - var roundedResult = H5.Math.round(divisionResult, 0, 6); - if (Math.abs(roundedResult) > Math.abs(divisionResult)) { - return alternativeResult; - } else { - return regularMod; - } - } - if (Math.abs(alternativeResult) < Math.abs(regularMod)) { - return alternativeResult; - } else { - return regularMod; - } - } - }; - - // @source Bool.js - - H5.define("System.Boolean", { - inherits: [System.IComparable], - - statics: { - trueString: "True", - falseString: "False", - - $is: function (instance) { - return typeof (instance) === "boolean"; - }, - - getDefaultValue: function () { - return false; - }, - - createInstance: function () { - return false; - }, - - toString: function (v) { - return v ? System.Boolean.trueString : System.Boolean.falseString; - }, - - parse: function (value) { - if (!H5.hasValue(value)) { - throw new System.ArgumentNullException.$ctor1("value"); - } - - var result = { - v: false - }; - - if (!System.Boolean.tryParse(value, result)) { - throw new System.FormatException.$ctor1("Bad format for Boolean value"); - } - - return result.v; - }, - - tryParse: function (value, result) { - result.v = false; - - if (!H5.hasValue(value)) { - return false; - } - - if (System.String.equals(System.Boolean.trueString, value, 5)) { - result.v = true; - return true; - } - - if (System.String.equals(System.Boolean.falseString, value, 5)) { - result.v = false; - return true; - } - - var start = 0, - end = value.length - 1; - - while (start < value.length) { - if (!System.Char.isWhiteSpace(value[start]) && !System.Char.isNull(value.charCodeAt(start))) { - break; - } - - start++; - } - - while (end >= start) { - if (!System.Char.isWhiteSpace(value[end]) && !System.Char.isNull(value.charCodeAt(end))) { - break; - } - - end--; - } - - value = value.substr(start, end - start + 1); - - if (System.String.equals(System.Boolean.trueString, value, 5)) { - result.v = true; - - return true; - } - - if (System.String.equals(System.Boolean.falseString, value, 5)) { - result.v = false; - - return true; - } - - return false; - } - } - }); - - System.Boolean.$kind = ""; - H5.Class.addExtend(System.Boolean, [System.IComparable$1(System.Boolean), System.IEquatable$1(System.Boolean)]); - - // @source Integer.js - - - H5.define("H5.Int", { - inherits: [System.IComparable, System.IFormattable], - statics: { - $number: true, - - MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || Math.pow(2, 53) - 1, - MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -(Math.pow(2, 53) - 1), - - $is: function (instance) { - return typeof (instance) === "number" && isFinite(instance) && Math.floor(instance, 0) === instance; - }, - - getDefaultValue: function () { - return 0; - }, - - format: function (number, format, provider, T, toUnsign) { - var nf = (provider || System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo), - decimalSeparator = nf.numberDecimalSeparator, - groupSeparator = nf.numberGroupSeparator, - isDecimal = number instanceof System.Decimal, - isLong = number instanceof System.Int64 || number instanceof System.UInt64, - isNeg = isDecimal || isLong ? (number.isZero() ? false : number.isNegative()) : number < 0, - match, - precision, - groups, - fs; - - if (!isLong && (isDecimal ? !number.isFinite() : !isFinite(number))) { - return Number.NEGATIVE_INFINITY === number || (isDecimal && isNeg) ? nf.negativeInfinitySymbol : (isNaN(number) ? nf.nanSymbol : nf.positiveInfinitySymbol); - } - - if (!format) { - format = "G"; - } - - match = format.match(/^([a-zA-Z])(\d*)$/); - - if (match) { - fs = match[1].toUpperCase(); - precision = parseInt(match[2], 10); - //precision = precision > 15 ? 15 : precision; - - switch (fs) { - case "D": - return this.defaultFormat(number, isNaN(precision) ? 1 : precision, 0, 0, nf, true); - case "F": - case "N": - if (isNaN(precision)) { - precision = nf.numberDecimalDigits; - } - - return this.defaultFormat(number, 1, precision, precision, nf, fs === "F"); - case "G": - case "E": - var exponent = 0, - coefficient = isDecimal || isLong ? (isLong && number.eq(System.Int64.MinValue) ? System.Int64(number.value.toUnsigned()) : number.abs()) : Math.abs(number), - exponentPrefix = match[1], - exponentPrecision = 3, - minDecimals, - maxDecimals; - - while (isDecimal || isLong ? coefficient.gte(10) : (coefficient >= 10)) { - if (isDecimal || isLong) { - coefficient = coefficient.div(10); - } else { - coefficient /= 10; - } - - exponent++; - } - - while (isDecimal || isLong ? (coefficient.ne(0) && coefficient.lt(1)) : (coefficient !== 0 && coefficient < 1)) { - if (isDecimal || isLong) { - coefficient = coefficient.mul(10); - } else { - coefficient *= 10; - } - - exponent--; - } - - if (fs === "G") { - var noPrecision = isNaN(precision); - - if (noPrecision) { - if (isDecimal) { - precision = 29; - } else if (isLong) { - precision = number instanceof System.Int64 ? 19 : 20; - } else if (T && T.precision) { - precision = T.precision; - } else { - precision = 15; - } - } - - if ((exponent > -5 && exponent < precision) || isDecimal && noPrecision) { - minDecimals = 0; - maxDecimals = precision - (exponent > 0 ? exponent + 1 : 1); - - return this.defaultFormat(number, 1, isDecimal ? Math.min(27, Math.max(minDecimals, number.$precision)) : minDecimals, maxDecimals, nf, true); - } - - exponentPrefix = exponentPrefix === "G" ? "E" : "e"; - exponentPrecision = 2; - minDecimals = 0; - maxDecimals = (precision || 15) - 1; - } else { - minDecimals = maxDecimals = isNaN(precision) ? 6 : precision; - } - - if (exponent >= 0) { - exponentPrefix += nf.positiveSign; - } else { - exponentPrefix += nf.negativeSign; - exponent = -exponent; - } - - if (isNeg) { - if (isDecimal || isLong) { - coefficient = coefficient.mul(-1); - } else { - coefficient *= -1; - } - } - - return this.defaultFormat(coefficient, 1, isDecimal ? Math.min(27, Math.max(minDecimals, number.$precision)) : minDecimals, maxDecimals, nf) + exponentPrefix + this.defaultFormat(exponent, exponentPrecision, 0, 0, nf, true); - case "P": - if (isNaN(precision)) { - precision = nf.percentDecimalDigits; - } - - return this.defaultFormat(number * 100, 1, precision, precision, nf, false, "percent"); - case "X": - var result; - - if (isDecimal) { - result = number.round().value.toHex().substr(2); - } else if (isLong) { - var uvalue = toUnsign ? toUnsign(number) : number; - result = uvalue.toString(16); - } else { - var uvalue = toUnsign ? toUnsign(Math.round(number)) : Math.round(number) >>> 0; - result = uvalue.toString(16); - } - - if (match[1] === "X") { - result = result.toUpperCase(); - } - - precision -= result.length; - - while (precision-- > 0) { - result = "0" + result; - } - - return result; - case "C": - if (isNaN(precision)) { - precision = nf.currencyDecimalDigits; - } - - return this.defaultFormat(number, 1, precision, precision, nf, false, "currency"); - case "R": - var r_result = isDecimal || isLong ? (number.toString()) : ("" + number); - - if (decimalSeparator !== ".") { - r_result = r_result.replace(".", decimalSeparator); - } - - r_result = r_result.replace("e", "E"); - - return r_result; - } - } - - if (format.indexOf(",.") !== -1 || System.String.endsWith(format, ",")) { - var count = 0, - index = format.indexOf(",."); - - if (index === -1) { - index = format.length - 1; - } - - while (index > -1 && format.charAt(index) === ",") { - count++; - index--; - } - - if (isDecimal || isLong) { - number = number.div(Math.pow(1000, count)); - } else { - number /= Math.pow(1000, count); - } - } - - if (format.indexOf("%") !== -1) { - if (isDecimal || isLong) { - number = number.mul(100); - } else { - number *= 100; - } - } - - if (format.indexOf("‰") !== -1) { - if (isDecimal || isLong) { - number = number.mul(1000); - } else { - number *= 1000; - } - } - - groups = format.split(";"); - - if ((isDecimal || isLong ? number.lt(0) : (number < 0)) && groups.length > 1) { - if (isDecimal || isLong) { - number = number.mul(-1); - } else { - number *= -1; - } - - format = groups[1]; - } else { - format = groups[(isDecimal || isLong ? number.ne(0) : !number) && groups.length > 2 ? 2 : 0]; - } - - return this.customFormat(number, format, nf, !format.match(/^[^\.]*[0#],[0#]/)); - }, - - defaultFormat: function (number, minIntLen, minDecLen, maxDecLen, provider, noGroup, name) { - name = name || "number"; - - var nf = (provider || System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo), - str, - decimalIndex, - pattern, - roundingFactor, - groupIndex, - groupSize, - groups = nf[name + "GroupSizes"], - decimalPart, - index, - done, - startIndex, - length, - part, - sep, - buffer = "", - isDecimal = number instanceof System.Decimal, - isLong = number instanceof System.Int64 || number instanceof System.UInt64, - isNeg = isDecimal || isLong ? (number.isZero() ? false : number.isNegative()) : number < 0, - isZero = false; - - roundingFactor = Math.pow(10, maxDecLen); - - if (isDecimal) { - str = number.abs().toDecimalPlaces(maxDecLen).toFixed(); - } else if (isLong) { - str = number.eq(System.Int64.MinValue) ? number.value.toUnsigned().toString() : number.abs().toString(); - } else { - str = "" + (+Math.abs(number).toFixed(maxDecLen)); - } - - isZero = str.split("").every(function (s) { return s === "0" || s === "."; }); - - decimalIndex = str.indexOf("."); - - if (decimalIndex > 0) { - decimalPart = nf[name + "DecimalSeparator"] + str.substr(decimalIndex + 1); - str = str.substr(0, decimalIndex); - } - - if (str.length < minIntLen) { - str = Array(minIntLen - str.length + 1).join("0") + str; - } - - if (decimalPart) { - if ((decimalPart.length - 1) < minDecLen) { - decimalPart += Array(minDecLen - decimalPart.length + 2).join("0"); - } - - if (maxDecLen === 0) { - decimalPart = null; - } else if ((decimalPart.length - 1) > maxDecLen) { - decimalPart = decimalPart.substr(0, maxDecLen + 1); - } - } else if (minDecLen > 0) { - decimalPart = nf[name + "DecimalSeparator"] + Array(minDecLen + 1).join("0"); - } - - groupIndex = 0; - groupSize = groups[groupIndex]; - - if (str.length < groupSize) { - buffer = str; - - if (decimalPart) { - buffer += decimalPart; - } - } else { - index = str.length; - done = false; - sep = noGroup ? "" : nf[name + "GroupSeparator"]; - - while (!done) { - length = groupSize; - startIndex = index - length; - - if (startIndex < 0) { - groupSize += startIndex; - length += startIndex; - startIndex = 0; - done = true; - } - - if (!length) { - break; - } - - part = str.substr(startIndex, length); - - if (buffer.length) { - buffer = part + sep + buffer; - } else { - buffer = part; - } - - index -= length; - - if (groupIndex < groups.length - 1) { - groupIndex++; - groupSize = groups[groupIndex]; - } - } - - if (decimalPart) { - buffer += decimalPart; - } - } - - if (isNeg && !isZero) { - pattern = System.Globalization.NumberFormatInfo[name + "NegativePatterns"][nf[name + "NegativePattern"]]; - - return pattern.replace("-", nf.negativeSign).replace("%", nf.percentSymbol).replace("$", nf.currencySymbol).replace("n", buffer); - } else if (System.Globalization.NumberFormatInfo[name + "PositivePatterns"]) { - pattern = System.Globalization.NumberFormatInfo[name + "PositivePatterns"][nf[name + "PositivePattern"]]; - - return pattern.replace("%", nf.percentSymbol).replace("$", nf.currencySymbol).replace("n", buffer); - } - - return buffer; - }, - - customFormat: function (number, format, nf, noGroup) { - var digits = 0, - forcedDigits = -1, - integralDigits = -1, - decimals = 0, - forcedDecimals = -1, - atDecimals = 0, - unused = 1, - c, i, f, - endIndex, - roundingFactor, - decimalIndex, - isNegative = false, - isZero = false, - name, - groupCfg, - buffer = "", - isZeroInt = false, - wasSeparator = false, - wasIntPart = false, - isDecimal = number instanceof System.Decimal, - isLong = number instanceof System.Int64 || number instanceof System.UInt64, - isNeg = isDecimal || isLong ? (number.isZero() ? false : number.isNegative()) : number < 0; - - name = "number"; - - if (format.indexOf("%") !== -1) { - name = "percent"; - } else if (format.indexOf("$") !== -1) { - name = "currency"; - } - - for (i = 0; i < format.length; i++) { - c = format.charAt(i); - - if (c === "'" || c === '"') { - i = format.indexOf(c, i + 1); - - if (i < 0) { - break; - } - } else if (c === "\\") { - i++; - } else { - if (c === "0" || c === "#") { - decimals += atDecimals; - - if (c === "0") { - if (atDecimals) { - forcedDecimals = decimals; - } else if (forcedDigits < 0) { - forcedDigits = digits; - } - } - - digits += !atDecimals; - } - - atDecimals = atDecimals || c === "."; - } - } - forcedDigits = forcedDigits < 0 ? 1 : digits - forcedDigits; - - if (isNeg) { - isNegative = true; - } - - roundingFactor = Math.pow(10, decimals); - - if (isDecimal) { - number = System.Decimal.round(number.abs().mul(roundingFactor), 4).div(roundingFactor).toString(); - } else if (isLong) { - number = (number.eq(System.Int64.MinValue) ? System.Int64(number.value.toUnsigned()) : number.abs()).mul(roundingFactor).div(roundingFactor).toString(); - } else { - number = "" + (Math.round(Math.abs(number) * roundingFactor) / roundingFactor); - } - - isZero = number.split("").every(function (s) { return s === "0" || s === "."; }); - - decimalIndex = number.indexOf("."); - integralDigits = decimalIndex < 0 ? number.length : decimalIndex; - i = integralDigits - digits; - - groupCfg = { - groupIndex: Math.max(integralDigits, forcedDigits), - sep: noGroup ? "" : nf[name + "GroupSeparator"] - }; - - if (integralDigits === 1 && number.charAt(0) === "0") { - isZeroInt = true; - } - - for (f = 0; f < format.length; f++) { - c = format.charAt(f); - - if (c === "'" || c === '"') { - endIndex = format.indexOf(c, f + 1); - - buffer += format.substring(f + 1, endIndex < 0 ? format.length : endIndex); - - if (endIndex < 0) { - break; - } - - f = endIndex; - } else if (c === "\\") { - buffer += format.charAt(f + 1); - f++; - } else if (c === "#" || c === "0") { - wasIntPart = true; - - if (!wasSeparator && isZeroInt && c === "#") { - i++; - } else { - groupCfg.buffer = buffer; - - if (i < integralDigits) { - if (i >= 0) { - if (unused) { - this.addGroup(number.substr(0, i), groupCfg); - } - - this.addGroup(number.charAt(i), groupCfg); - } else if (i >= integralDigits - forcedDigits) { - this.addGroup("0", groupCfg); - } - - unused = 0; - } else if (forcedDecimals-- > 0 || i < number.length) { - this.addGroup(i >= number.length ? "0" : number.charAt(i), groupCfg); - } - - buffer = groupCfg.buffer; - - i++; - } - } else if (c === ".") { - if (!wasIntPart && !isZeroInt) { - buffer += number.substr(0, integralDigits); - wasIntPart = true; - } - - if (number.length > ++i || forcedDecimals > 0) { - wasSeparator = true; - buffer += nf[name + "DecimalSeparator"]; - } - } else if (c !== ",") { - buffer += c; - } - } - - if (isNegative && !isZero) { - buffer = "-" + buffer; - } - - return buffer; - }, - - addGroup: function (value, cfg) { - var buffer = cfg.buffer, - sep = cfg.sep, - groupIndex = cfg.groupIndex; - - for (var i = 0, length = value.length; i < length; i++) { - buffer += value.charAt(i); - - if (sep && groupIndex > 1 && groupIndex-- % 3 === 1) { - buffer += sep; - } - } - - cfg.buffer = buffer; - cfg.groupIndex = groupIndex; - }, - - parseFloat: function (s, provider) { - var res = { }; - - H5.Int.tryParseFloat(s, provider, res, false); - - return res.v; - }, - - tryParseFloat: function (s, provider, result, safe) { - result.v = 0; - - if (safe == null) { - safe = true; - } - - if (s == null) { - if (safe) { - return false; - } - - throw new System.ArgumentNullException.$ctor1("s"); - } - - s = s.trim(); - - var nfInfo = (provider || System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo), - point = nfInfo.numberDecimalSeparator, - thousands = nfInfo.numberGroupSeparator; - - var errMsg = "Input string was not in a correct format."; - - var pointIndex = s.indexOf(point); - var thousandIndex = thousands ? s.indexOf(thousands) : -1; - - if (pointIndex > -1) { - // point before thousands is not allowed - // "10.2,5" -> FormatException - // "1,0.2,5" -> FormatException - if (((pointIndex < thousandIndex) || ((thousandIndex > -1) && (pointIndex < s.indexOf(thousands, pointIndex)))) - // only one point is allowed - || (s.indexOf(point, pointIndex + 1) > -1)) { - if (safe) { - return false; - } - - throw new System.FormatException.$ctor1(errMsg); - } - } - - if ((point !== ".") && (thousands !== ".") && (s.indexOf(".") > -1)) { - if (safe) { - return false; - } - - throw new System.FormatException.$ctor1(errMsg); - } - - if (thousandIndex > -1) { - // mutiple thousands are allowed, so we remove them before going further - var tmpStr = ""; - - for (var i = 0; i < s.length; i++) { - if (s[i] !== thousands) { - tmpStr += s[i]; - } - } - - s = tmpStr; - } - - if (s === nfInfo.negativeInfinitySymbol) { - result.v = Number.NEGATIVE_INFINITY; - - return true; - } else if (s === nfInfo.positiveInfinitySymbol) { - result.v = Number.POSITIVE_INFINITY; - - return true; - } else if (s === nfInfo.nanSymbol) { - result.v = Number.NaN; - - return true; - } - - var countExp = 0, - ePrev = false; - - for (var i = 0; i < s.length; i++) { - if (!System.Char.isNumber(s[i].charCodeAt(0)) && - s[i] !== "." && - s[i] !== "," && - (s[i] !== nfInfo.positiveSign || i !== 0 && !ePrev) && - (s[i] !== nfInfo.negativeSign || i !== 0 && !ePrev) && - s[i] !== point && - s[i] !== thousands) { - if (s[i].toLowerCase() === "e") { - ePrev = true; - countExp++; - - if (countExp > 1) { - if (safe) { - return false; - } - - throw new System.FormatException.$ctor1(errMsg); - } - } else { - ePrev = false; - if (safe) { - return false; - } - - throw new System.FormatException.$ctor1(errMsg); - } - } else { - ePrev = false; - } - } - - var r = parseFloat(s.replace(point, ".")); - - if (isNaN(r)) { - if (safe) { - return false; - } - - throw new System.FormatException.$ctor1(errMsg); - } - - result.v = r; - - return true; - }, - - parseInt: function (str, min, max, radix) { - radix = radix || 10; - - if (str == null) { - throw new System.ArgumentNullException.$ctor1("str"); - } - - str = str.trim(); - - if ((radix <= 10 && !/^[+-]?[0-9]+$/.test(str)) - || (radix == 16 && !/^[+-]?[0-9A-F]+$/gi.test(str))) { - throw new System.FormatException.$ctor1("Input string was not in a correct format."); - } - - var result = parseInt(str, radix); - - if (isNaN(result)) { - throw new System.FormatException.$ctor1("Input string was not in a correct format."); - } - - if (result < min || result > max) { - throw new System.OverflowException(); - } - - return result; - }, - - tryParseInt: function (str, result, min, max, radix) { - result.v = 0; - radix = radix || 10; - - if (str != null && str.trim === "".trim) { - str = str.trim(); - } - - if ((radix <= 10 && !/^[+-]?[0-9]+$/.test(str)) - || (radix == 16 && !/^[+-]?[0-9A-F]+$/gi.test(str))) { - return false; - } - - result.v = parseInt(str, radix); - - if (result.v < min || result.v > max) { - result.v = 0; - - return false; - } - - return true; - }, - - isInfinite: function (x) { - return x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY; - }, - - trunc: function (num) { - if (!H5.isNumber(num)) { - return H5.Int.isInfinite(num) ? num : null; - } - - return num > 0 ? Math.floor(num) : Math.ceil(num); - }, - - div: function (x, y) { - if (x == null || y == null) { - return null; - } - - if (y === 0) { - throw new System.DivideByZeroException(); - } - - return this.trunc(x / y); - }, - - mod: function (x, y) { - if (x == null || y == null) { - return null; - } - - if (y === 0) { - throw new System.DivideByZeroException(); - } - - return x % y; - }, - - check: function (x, type) { - if (System.Int64.is64Bit(x)) { - return System.Int64.check(x, type); - } else if (x instanceof System.Decimal) { - return System.Decimal.toInt(x, type); - } - - if (H5.isNumber(x)) { - if (System.Int64.is64BitType(type)) { - if (type === System.UInt64 && x < 0) { - throw new System.OverflowException(); - } - - return type === System.Int64 ? System.Int64(x) : System.UInt64(x); - } else if (!type.$is(x)) { - throw new System.OverflowException(); - } - } - - if (H5.Int.isInfinite(x) || isNaN(x)) { - if (System.Int64.is64BitType(type)) { - return type.MinValue; - } - - return type.min; - } - - return x; - }, - - sxb: function (x) { - return H5.isNumber(x) ? (x | (x & 0x80 ? 0xffffff00 : 0)) : ((H5.Int.isInfinite(x) || isNaN(x)) ? System.SByte.min : null); - }, - - sxs: function (x) { - return H5.isNumber(x) ? (x | (x & 0x8000 ? 0xffff0000 : 0)) : ((H5.Int.isInfinite(x) || isNaN(x)) ? System.Int16.min : null); - }, - - clip8: function (x) { - return H5.isNumber(x) ? H5.Int.sxb(x & 0xff) : ((H5.Int.isInfinite(x) || isNaN(x)) ? System.SByte.min : null); - }, - - clipu8: function (x) { - return H5.isNumber(x) ? x & 0xff : ((H5.Int.isInfinite(x) || isNaN(x)) ? System.Byte.min : null); - }, - - clip16: function (x) { - return H5.isNumber(x) ? H5.Int.sxs(x & 0xffff) : ((H5.Int.isInfinite(x) || isNaN(x)) ? System.Int16.min : null); - }, - - clipu16: function (x) { - return H5.isNumber(x) ? x & 0xffff : ((H5.Int.isInfinite(x) || isNaN(x)) ? System.UInt16.min : null); - }, - - clip32: function (x) { - return H5.isNumber(x) ? x | 0 : ((H5.Int.isInfinite(x) || isNaN(x)) ? System.Int32.min : null); - }, - - clipu32: function (x) { - return H5.isNumber(x) ? x >>> 0 : ((H5.Int.isInfinite(x) || isNaN(x)) ? System.UInt32.min : null); - }, - - clip64: function (x) { - return H5.isNumber(x) ? System.Int64(H5.Int.trunc(x)) : ((H5.Int.isInfinite(x) || isNaN(x)) ? System.Int64.MinValue : null); - }, - - clipu64: function (x) { - return H5.isNumber(x) ? System.UInt64(H5.Int.trunc(x)) : ((H5.Int.isInfinite(x) || isNaN(x)) ? System.UInt64.MinValue : null); - }, - - sign: function (x) { - if (x === Number.POSITIVE_INFINITY) { - return 1; - } - - if (x === Number.NEGATIVE_INFINITY) { - return -1; - } - - return H5.isNumber(x) ? (x === 0 ? 0 : (x < 0 ? -1 : 1)) : null; - }, - - $mul: Math.imul || function (a, b) { - var ah = (a >>> 16) & 0xffff, - al = a & 0xffff, - bh = (b >>> 16) & 0xffff, - bl = b & 0xffff; - - return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0) | 0); - }, - - mul: function (a, b, overflow) { - if (a == null || b == null) { - return null; - } - - if (overflow) { - H5.Int.check(a * b, System.Int32) - } - - return H5.Int.$mul(a, b); - }, - - umul: function (a, b, overflow) { - if (a == null || b == null) { - return null; - } - - if (overflow) { - H5.Int.check(a * b, System.UInt32) - } - - return H5.Int.$mul(a, b) >>> 0; - }, - - bitIncrement: function (x) { - if (isNaN(x) || x === Number.POSITIVE_INFINITY) { return x; } - if (x === Number.NEGATIVE_INFINITY) { return -3.40282346638528859e+38; } - if (x === 0.0) { return 1.4e-45; } - - var bits = System.BitConverter.singleToInt32Bits(x); - - if (bits < 0) { bits = bits - 1; } - else { bits = bits + 1; } - - return System.BitConverter.int32BitsToSingle(bits); - }, - - bitDecrement: function (x) { return -H5.Int.bitIncrement(-x); }, - } - }); - - H5.Int.$kind = ""; - H5.Class.addExtend(H5.Int, [System.IComparable$1(H5.Int), System.IEquatable$1(H5.Int)]); - - (function () { - var createIntType = function (name, min, max, precision, toUnsign) { - var type = H5.define(name, { - inherits: [System.IComparable, System.IFormattable], - - statics: { - $number: true, - toUnsign: toUnsign, - min: min, - max: max, - precision: precision, - - $is: function (instance) { - return typeof (instance) === "number" && Math.floor(instance, 0) === instance && instance >= min && instance <= max; - }, - getDefaultValue: function () { - return 0; - }, - parse: function (s, radix) { - return H5.Int.parseInt(s, min, max, radix); - }, - tryParse: function (s, result, radix) { - return H5.Int.tryParseInt(s, result, min, max, radix); - }, - format: function (number, format, provider) { - return H5.Int.format(number, format, provider, type, toUnsign); - }, - equals: function (v1, v2) { - if (H5.is(v1, type) && H5.is(v2, type)) { - return H5.unbox(v1, true) === H5.unbox(v2, true); - } - - return false; - }, - equalsT: function (v1, v2) { - return H5.unbox(v1, true) === H5.unbox(v2, true); - } - } - }); - - type.$kind = ""; - H5.Class.addExtend(type, [System.IComparable$1(type), System.IEquatable$1(type)]); - }; - - createIntType("System.Byte", 0, 255, 3); - createIntType("System.SByte", -128, 127, 3, H5.Int.clipu8); - createIntType("System.Int16", -32768, 32767, 5, H5.Int.clipu16); - createIntType("System.UInt16", 0, 65535, 5); - createIntType("System.Int32", -2147483648, 2147483647, 10, H5.Int.clipu32); - createIntType("System.UInt32", 0, 4294967295, 10); - })(); - - // @source Double.js - - H5.define("System.Double", { - inherits: [System.IComparable, System.IFormattable], - statics: { - min: -Number.MAX_VALUE, - - max: Number.MAX_VALUE, - - precision: 15, - - $number: true, - - $is: function (instance) { - return typeof (instance) === "number"; - }, - - getDefaultValue: function () { - return 0; - }, - - parse: function (s, provider) { - return H5.Int.parseFloat(s, provider); - }, - - tryParse: function (s, provider, result) { - return H5.Int.tryParseFloat(s, provider, result); - }, - - format: function (number, format, provider) { - return H5.Int.format(number, format || 'G', provider, System.Double); - }, - - equals: function (v1, v2) { - if (H5.is(v1, System.Double) && H5.is(v2, System.Double)) { - v1 = H5.unbox(v1, true); - v2 = H5.unbox(v2, true); - - if (isNaN(v1) && isNaN(v2)) { - return true; - } - - return v1 === v2; - } - - return false; - }, - - equalsT: function (v1, v2) { - return H5.unbox(v1, true) === H5.unbox(v2, true); - }, - - getHashCode: function (v) { - var value = H5.unbox(v, true); - - if (value === 0) { - return 0; - } - - if (value === Number.POSITIVE_INFINITY) { - return 0x7FF00000; - } - - if (value === Number.NEGATIVE_INFINITY) { - return 0xFFF00000; - } - - return H5.getHashCode(value.toExponential()); - } - } - }); - - System.Double.$kind = ""; - H5.Class.addExtend(System.Double, [System.IComparable$1(System.Double), System.IEquatable$1(System.Double)]); - - H5.define("System.Single", { - inherits: [System.IComparable, System.IFormattable], - statics: { - min: -3.40282346638528859e+38, - - max: 3.40282346638528859e+38, - - precision: 7, - - $number: true, - - $is: System.Double.$is, - - getDefaultValue: System.Double.getDefaultValue, - - parse: System.Double.parse, - - tryParse: System.Double.tryParse, - - format: function (number, format, provider) { - return H5.Int.format(number, format || 'G', provider, System.Single); - }, - - equals: function (v1, v2) { - if (H5.is(v1, System.Single) && H5.is(v2, System.Single)) { - v1 = H5.unbox(v1, true); - v2 = H5.unbox(v2, true); - - if (isNaN(v1) && isNaN(v2)) { - return true; - } - - return v1 === v2; - } - - return false; - }, - - equalsT: function (v1, v2) { - return H5.unbox(v1, true) === H5.unbox(v2, true); - }, - - getHashCode: System.Double.getHashCode - } - }); - - System.Single.$kind = ""; - H5.Class.addExtend(System.Single, [System.IComparable$1(System.Single), System.IEquatable$1(System.Single)]); - - // @source Long.js - - /* long.js https://github.com/dcodeIO/long.js/blob/master/LICENSE */ - (function (b) { - function d(a, b, c) { this.low = a | 0; this.high = b | 0; this.unsigned = !!c } function g(a) { return !0 === (a && a.__isLong__) } function m(a, b) { var c, u; if (b) { a >>>= 0; if (u = 0 <= a && 256 > a) if (c = A[a]) return c; c = e(a, 0 > (a | 0) ? -1 : 0, !0); u && (A[a] = c) } else { a |= 0; if (u = -128 <= a && 128 > a) if (c = B[a]) return c; c = e(a, 0 > a ? -1 : 0, !1); u && (B[a] = c) } return c } function n(a, b) { - if (isNaN(a) || !isFinite(a)) return b ? p : k; if (b) { if (0 > a) return p; if (a >= C) return D } else { if (a <= -E) return l; if (a + 1 >= E) return F } return 0 > a ? n(-a, b).neg() : e(a % 4294967296 | 0, a / 4294967296 | - 0, b) - } function e(a, b, c) { return new d(a, b, c) } function y(a, b, c) { - if (0 === a.length) throw Error("empty string"); if ("NaN" === a || "Infinity" === a || "+Infinity" === a || "-Infinity" === a) return k; "number" === typeof b ? (c = b, b = !1) : b = !!b; c = c || 10; if (2 > c || 36 < c) throw RangeError("radix"); var u; if (0 < (u = a.indexOf("-"))) throw Error("interior hyphen"); if (0 === u) return y(a.substring(1), b, c).neg(); u = n(w(c, 8)); for (var e = k, f = 0; f < a.length; f += 8) { - var d = Math.min(8, a.length - f), g = parseInt(a.substring(f, f + d), c); 8 > d ? (d = n(w(c, d)), e = e.mul(d).add(n(g))) : - (e = e.mul(u), e = e.add(n(g))) - } e.unsigned = b; return e - } function q(a) { return a instanceof d ? a : "number" === typeof a ? n(a) : "string" === typeof a ? y(a) : e(a.low, a.high, a.unsigned) } b.H5.$Long = d; d.__isLong__; Object.defineProperty(d.prototype, "__isLong__", { value: !0, enumerable: !1, configurable: !1 }); d.isLong = g; var B = {}, A = {}; d.fromInt = m; d.fromNumber = n; d.fromBits = e; var w = Math.pow; d.fromString = y; d.fromValue = q; var C = 4294967296 * 4294967296, E = C / 2, G = m(16777216), k = m(0); d.ZERO = k; var p = m(0, !0); d.UZERO = p; var r = m(1); d.ONE = r; var H = - m(1, !0); d.UONE = H; var z = m(-1); d.NEG_ONE = z; var F = e(-1, 2147483647, !1); d.MAX_VALUE = F; var D = e(-1, -1, !0); d.MAX_UNSIGNED_VALUE = D; var l = e(0, -2147483648, !1); d.MIN_VALUE = l; b = d.prototype; b.toInt = function () { return this.unsigned ? this.low >>> 0 : this.low }; b.toNumber = function () { return this.unsigned ? 4294967296 * (this.high >>> 0) + (this.low >>> 0) : 4294967296 * this.high + (this.low >>> 0) }; b.toString = function (a) { - a = a || 10; if (2 > a || 36 < a) throw RangeError("radix"); if (this.isZero()) return "0"; if (this.isNegative()) { - if (this.eq(l)) { - var b = - n(a), c = this.div(b), b = c.mul(b).sub(this); return c.toString(a) + b.toInt().toString(a) - } return ("undefined" === typeof a || 10 === a ? "-" : "") + this.neg().toString(a) - } for (var c = n(w(a, 6), this.unsigned), b = this, e = ""; ;) { var d = b.div(c), f = (b.sub(d.mul(c)).toInt() >>> 0).toString(a), b = d; if (b.isZero()) return f + e; for (; 6 > f.length;) f = "0" + f; e = "" + f + e } - }; b.getHighBits = function () { return this.high }; b.getHighBitsUnsigned = function () { return this.high >>> 0 }; b.getLowBits = function () { return this.low }; b.getLowBitsUnsigned = function () { - return this.low >>> - 0 - }; b.getNumBitsAbs = function () { if (this.isNegative()) return this.eq(l) ? 64 : this.neg().getNumBitsAbs(); for (var a = 0 != this.high ? this.high : this.low, b = 31; 0 < b && 0 == (a & 1 << b) ; b--); return 0 != this.high ? b + 33 : b + 1 }; b.isZero = function () { return 0 === this.high && 0 === this.low }; b.isNegative = function () { return !this.unsigned && 0 > this.high }; b.isPositive = function () { return this.unsigned || 0 <= this.high }; b.isOdd = function () { return 1 === (this.low & 1) }; b.isEven = function () { return 0 === (this.low & 1) }; b.equals = function (a) { - g(a) || (a = q(a)); return this.unsigned !== - a.unsigned && 1 === this.high >>> 31 && 1 === a.high >>> 31 ? !1 : this.high === a.high && this.low === a.low - }; b.eq = b.equals; b.notEquals = function (a) { return !this.eq(a) }; b.neq = b.notEquals; b.lessThan = function (a) { return 0 > this.comp(a) }; b.lt = b.lessThan; b.lessThanOrEqual = function (a) { return 0 >= this.comp(a) }; b.lte = b.lessThanOrEqual; b.greaterThan = function (a) { return 0 < this.comp(a) }; b.gt = b.greaterThan; b.greaterThanOrEqual = function (a) { return 0 <= this.comp(a) }; b.gte = b.greaterThanOrEqual; b.compare = function (a) { - g(a) || (a = q(a)); if (this.eq(a)) return 0; - var b = this.isNegative(), c = a.isNegative(); return b && !c ? -1 : !b && c ? 1 : this.unsigned ? a.high >>> 0 > this.high >>> 0 || a.high === this.high && a.low >>> 0 > this.low >>> 0 ? -1 : 1 : this.sub(a).isNegative() ? -1 : 1 - }; b.comp = b.compare; b.negate = function () { return !this.unsigned && this.eq(l) ? l : this.not().add(r) }; b.neg = b.negate; b.add = function (a) { - g(a) || (a = q(a)); var b = this.high >>> 16, c = this.high & 65535, d = this.low >>> 16, l = a.high >>> 16, f = a.high & 65535, n = a.low >>> 16, k; k = 0 + ((this.low & 65535) + (a.low & 65535)); a = 0 + (k >>> 16); a += d + n; d = 0 + (a >>> 16); d += c + f; c = - 0 + (d >>> 16); c = c + (b + l) & 65535; return e((a & 65535) << 16 | k & 65535, c << 16 | d & 65535, this.unsigned) - }; b.subtract = function (a) { g(a) || (a = q(a)); return this.add(a.neg()) }; b.sub = b.subtract; b.multiply = function (a) { - if (this.isZero()) return k; g(a) || (a = q(a)); if (a.isZero()) return k; if (this.eq(l)) return a.isOdd() ? l : k; if (a.eq(l)) return this.isOdd() ? l : k; if (this.isNegative()) return a.isNegative() ? this.neg().mul(a.neg()) : this.neg().mul(a).neg(); if (a.isNegative()) return this.mul(a.neg()).neg(); if (this.lt(G) && a.lt(G)) return n(this.toNumber() * - a.toNumber(), this.unsigned); var b = this.high >>> 16, c = this.high & 65535, d = this.low >>> 16, x = this.low & 65535, f = a.high >>> 16, m = a.high & 65535, p = a.low >>> 16; a = a.low & 65535; var v, h, t, r; r = 0 + x * a; t = 0 + (r >>> 16); t += d * a; h = 0 + (t >>> 16); t = (t & 65535) + x * p; h += t >>> 16; t &= 65535; h += c * a; v = 0 + (h >>> 16); h = (h & 65535) + d * p; v += h >>> 16; h &= 65535; h += x * m; v += h >>> 16; h &= 65535; v = v + (b * a + c * p + d * m + x * f) & 65535; return e(t << 16 | r & 65535, v << 16 | h, this.unsigned) - }; b.mul = b.multiply; b.divide = function (a) { - g(a) || (a = q(a)); if (a.isZero()) throw Error("division by zero"); if (this.isZero()) return this.unsigned ? - p : k; var b, c, d; if (this.unsigned) a.unsigned || (a = a.toUnsigned()); else { if (this.eq(l)) { if (a.eq(r) || a.eq(z)) return l; if (a.eq(l)) return r; b = this.shr(1).div(a).shl(1); if (b.eq(k)) return a.isNegative() ? r : z; c = this.sub(a.mul(b)); return d = b.add(c.div(a)) } if (a.eq(l)) return this.unsigned ? p : k; if (this.isNegative()) return a.isNegative() ? this.neg().div(a.neg()) : this.neg().div(a).neg(); if (a.isNegative()) return this.div(a.neg()).neg() } if (this.unsigned) { if (a.gt(this)) return p; if (a.gt(this.shru(1))) return H; d = p } else d = - k; for (c = this; c.gte(a) ;) { b = Math.max(1, Math.floor(c.toNumber() / a.toNumber())); for (var e = Math.ceil(Math.log(b) / Math.LN2), e = 48 >= e ? 1 : w(2, e - 48), f = n(b), m = f.mul(a) ; m.isNegative() || m.gt(c) ;) b -= e, f = n(b, this.unsigned), m = f.mul(a); f.isZero() && (f = r); d = d.add(f); c = c.sub(m) } return d - }; b.div = b.divide; b.modulo = function (a) { g(a) || (a = q(a)); return this.sub(this.div(a).mul(a)) }; b.mod = b.modulo; b.not = function () { return e(~this.low, ~this.high, this.unsigned) }; b.and = function (a) { - g(a) || (a = q(a)); return e(this.low & a.low, this.high & - a.high, this.unsigned) - }; b.or = function (a) { g(a) || (a = q(a)); return e(this.low | a.low, this.high | a.high, this.unsigned) }; b.xor = function (a) { g(a) || (a = q(a)); return e(this.low ^ a.low, this.high ^ a.high, this.unsigned) }; b.shiftLeft = function (a) { g(a) && (a = a.toInt()); return 0 === (a &= 63) ? this : 32 > a ? e(this.low << a, this.high << a | this.low >>> 32 - a, this.unsigned) : e(0, this.low << a - 32, this.unsigned) }; b.shl = b.shiftLeft; b.shiftRight = function (a) { - g(a) && (a = a.toInt()); return 0 === (a &= 63) ? this : 32 > a ? e(this.low >>> a | this.high << 32 - a, this.high >> - a, this.unsigned) : e(this.high >> a - 32, 0 <= this.high ? 0 : -1, this.unsigned) - }; b.shr = b.shiftRight; b.shiftRightUnsigned = function (a) { g(a) && (a = a.toInt()); a &= 63; if (0 === a) return this; var b = this.high; return 32 > a ? e(this.low >>> a | b << 32 - a, b >>> a, this.unsigned) : 32 === a ? e(b, 0, this.unsigned) : e(b >>> a - 32, 0, this.unsigned) }; b.shru = b.shiftRightUnsigned; b.toSigned = function () { return this.unsigned ? e(this.low, this.high, !1) : this }; b.toUnsigned = function () { return this.unsigned ? this : e(this.low, this.high, !0) } - })(H5.global); - - System.Int64 = function (l) { - if (this.constructor !== System.Int64) { - return new System.Int64(l); - } - - if (!H5.hasValue(l)) { - l = 0; - } - - this.T = System.Int64; - this.unsigned = false; - this.value = System.Int64.getValue(l); - } - - System.Int64.$number = true; - System.Int64.TWO_PWR_16_DBL = 1 << 16; - System.Int64.TWO_PWR_32_DBL = System.Int64.TWO_PWR_16_DBL * System.Int64.TWO_PWR_16_DBL; - System.Int64.TWO_PWR_64_DBL = System.Int64.TWO_PWR_32_DBL * System.Int64.TWO_PWR_32_DBL; - System.Int64.TWO_PWR_63_DBL = System.Int64.TWO_PWR_64_DBL / 2; - - System.Int64.$$name = "System.Int64"; - System.Int64.prototype.$$name = "System.Int64"; - System.Int64.$kind = "struct"; - System.Int64.prototype.$kind = "struct"; - - System.Int64.$$inherits = []; - H5.Class.addExtend(System.Int64, [System.IComparable, System.IFormattable, System.IComparable$1(System.Int64), System.IEquatable$1(System.Int64)]); - - System.Int64.$is = function (instance) { - return instance instanceof System.Int64; - }; - - System.Int64.is64Bit = function (instance) { - return instance instanceof System.Int64 || instance instanceof System.UInt64; - }; - - System.Int64.is64BitType = function (type) { - return type === System.Int64 || type === System.UInt64; - }; - - System.Int64.getDefaultValue = function () { - return System.Int64.Zero; - }; - - System.Int64.getValue = function (l) { - if (!H5.hasValue(l)) { - return null; - } - - if (l instanceof H5.$Long) { - return l; - } - - if (l instanceof System.Int64) { - return l.value; - } - - if (l instanceof System.UInt64) { - return l.value.toSigned(); - } - - if (H5.isArray(l)) { - return new H5.$Long(l[0], l[1]); - } - - if (H5.isString(l)) { - return H5.$Long.fromString(l); - } - - if (H5.isNumber(l)) { - if (l + 1 >= System.Int64.TWO_PWR_63_DBL) { - return (new System.UInt64(l)).value.toSigned(); - } - return H5.$Long.fromNumber(l); - } - - if (l instanceof System.Decimal) { - return H5.$Long.fromString(l.toString()); - } - - return H5.$Long.fromValue(l); - }; - - System.Int64.create = function (l) { - if (!H5.hasValue(l)) { - return null; - } - - if (l instanceof System.Int64) { - return l; - } - - return new System.Int64(l); - }; - - System.Int64.lift = function (l) { - if (!H5.hasValue(l)) { - return null; - } - return System.Int64.create(l); - }; - - System.Int64.toNumber = function (value) { - if (!value) { - return null; - } - - return value.toNumber(); - }; - - System.Int64.prototype.toNumberDivided = function (divisor) { - var integral = this.div(divisor), - remainder = this.mod(divisor), - scaledRemainder = remainder.toNumber() / divisor; - - return integral.toNumber() + scaledRemainder; - }; - - System.Int64.prototype.toJSON = function () { - return this.gt(H5.Int.MAX_SAFE_INTEGER) || this.lt(H5.Int.MIN_SAFE_INTEGER) ? this.toString() : this.toNumber(); - }; - - System.Int64.prototype.toString = function (format, provider) { - if (!format && !provider) { - return this.value.toString(); - } - - if (H5.isNumber(format) && !provider) { - return this.value.toString(format); - } - - return H5.Int.format(this, format, provider, System.Int64, System.Int64.clipu64); - }; - - System.Int64.prototype.format = function (format, provider) { - return H5.Int.format(this, format, provider, System.Int64, System.Int64.clipu64); - }; - - System.Int64.prototype.isNegative = function () { - return this.value.isNegative(); - }; - - System.Int64.prototype.abs = function () { - if (this.T === System.Int64 && this.eq(System.Int64.MinValue)) { - throw new System.OverflowException(); - } - return new this.T(this.value.isNegative() ? this.value.neg() : this.value); - }; - - System.Int64.prototype.compareTo = function (l) { - return this.value.compare(this.T.getValue(l)); - }; - - System.Int64.prototype.add = function (l, overflow) { - var addl = this.T.getValue(l), - r = new this.T(this.value.add(addl)); - - if (overflow) { - var neg1 = this.value.isNegative(), - neg2 = addl.isNegative(), - rneg = r.value.isNegative(); - - if ((neg1 && neg2 && !rneg) || - (!neg1 && !neg2 && rneg) || - (this.T === System.UInt64 && r.lt(System.UInt64.max(this, addl)))) { - throw new System.OverflowException(); - } - } - - return r; - }; - - System.Int64.prototype.sub = function (l, overflow) { - var subl = this.T.getValue(l), - r = new this.T(this.value.sub(subl)); - - if (overflow) { - var neg1 = this.value.isNegative(), - neg2 = subl.isNegative(), - rneg = r.value.isNegative(); - - if ((neg1 && !neg2 && !rneg) || - (!neg1 && neg2 && rneg) || - (this.T === System.UInt64 && this.value.lt(subl))) { - throw new System.OverflowException(); - } - } - - return r; - }; - - System.Int64.prototype.isZero = function () { - return this.value.isZero(); - }; - - System.Int64.prototype.mul = function (l, overflow) { - var arg = this.T.getValue(l), - r = new this.T(this.value.mul(arg)); - - if (overflow) { - var s1 = this.sign(), - s2 = arg.isZero() ? 0 : (arg.isNegative() ? -1 : 1), - rs = r.sign(); - - if (this.T === System.Int64) { - if (this.eq(System.Int64.MinValue) || this.eq(System.Int64.MaxValue)) { - if (arg.neq(1) && arg.neq(0)) { - throw new System.OverflowException(); - } - - return r; - } - - if (arg.eq(H5.$Long.MIN_VALUE) || arg.eq(H5.$Long.MAX_VALUE)) { - if (this.neq(1) && this.neq(0)) { - throw new System.OverflowException(); - } - - return r; - } - - if ((s1 === -1 && s2 === -1 && rs !== 1) || - (s1 === 1 && s2 === 1 && rs !== 1) || - (s1 === -1 && s2 === 1 && rs !== -1) || - (s1 === 1 && s2 === -1 && rs !== -1)) { - throw new System.OverflowException(); - } - - var r_abs = r.abs(); - - if (r_abs.lt(this.abs()) || r_abs.lt(System.Int64(arg).abs())) { - throw new System.OverflowException(); - } - } else { - if (this.eq(System.UInt64.MaxValue)) { - if (arg.neq(1) && arg.neq(0)) { - throw new System.OverflowException(); - } - - return r; - } - - if (arg.eq(H5.$Long.MAX_UNSIGNED_VALUE)) { - if (this.neq(1) && this.neq(0)) { - throw new System.OverflowException(); - } - - return r; - } - - var r_abs = r.abs(); - - if (r_abs.lt(this.abs()) || r_abs.lt(System.Int64(arg).abs())) { - throw new System.OverflowException(); - } - } - } - - return r; - }; - - System.Int64.prototype.div = function (l) { - return new this.T(this.value.div(this.T.getValue(l))); - }; - - System.Int64.prototype.mod = function (l) { - return new this.T(this.value.mod(this.T.getValue(l))); - }; - - System.Int64.prototype.neg = function (overflow) { - if (overflow && this.T === System.Int64 && this.eq(System.Int64.MinValue)) { - throw new System.OverflowException(); - } - return new this.T(this.value.neg()); - }; - - System.Int64.prototype.inc = function (overflow) { - return this.add(1, overflow); - }; - - System.Int64.prototype.dec = function (overflow) { - return this.sub(1, overflow); - }; - - System.Int64.prototype.sign = function () { - return this.value.isZero() ? 0 : (this.value.isNegative() ? -1 : 1); - }; - - System.Int64.prototype.clone = function () { - return new this.T(this); - }; - - System.Int64.prototype.ne = function (l) { - return this.value.neq(this.T.getValue(l)); - }; - - System.Int64.prototype.neq = function (l) { - return this.value.neq(this.T.getValue(l)); - }; - - System.Int64.prototype.eq = function (l) { - return this.value.eq(this.T.getValue(l)); - }; - - System.Int64.prototype.lt = function (l) { - return this.value.lt(this.T.getValue(l)); - }; - - System.Int64.prototype.lte = function (l) { - return this.value.lte(this.T.getValue(l)); - }; - - System.Int64.prototype.gt = function (l) { - return this.value.gt(this.T.getValue(l)); - }; - - System.Int64.prototype.gte = function (l) { - return this.value.gte(this.T.getValue(l)); - }; - - System.Int64.prototype.equals = function (l) { - return this.value.eq(this.T.getValue(l)); - }; - - System.Int64.prototype.equalsT = function (l) { - return this.equals(l); - }; - - System.Int64.prototype.getHashCode = function () { - var n = (this.sign() * 397 + this.value.high) | 0; - n = (n * 397 + this.value.low) | 0; - - return n; - }; - - System.Int64.prototype.toNumber = function () { - return this.value.toNumber(); - }; - - System.Int64.parse = function (str) { - if (str == null) { - throw new System.ArgumentNullException.$ctor1("str"); - } - - if (!/^[+-]?[0-9]+$/.test(str)) { - throw new System.FormatException.$ctor1("Input string was not in a correct format."); - } - - var result = new System.Int64(str); - - if (System.String.trimStartZeros(str) !== result.toString()) { - throw new System.OverflowException(); - } - - return result; - }; - - System.Int64.tryParse = function (str, v) { - try { - if (str == null || !/^[+-]?[0-9]+$/.test(str)) { - v.v = System.Int64(H5.$Long.ZERO); - return false; - } - - v.v = new System.Int64(str); - - if (System.String.trimStartZeros(str) !== v.v.toString()) { - v.v = System.Int64(H5.$Long.ZERO); - return false; - } - - return true; - } catch (e) { - v.v = System.Int64(H5.$Long.ZERO); - return false; - } - }; - - System.Int64.divRem = function (a, b, result) { - a = System.Int64(a); - b = System.Int64(b); - var remainder = a.mod(b); - result.v = remainder; - return a.sub(remainder).div(b); - }; - - System.Int64.min = function () { - var values = [], - min, i, len; - - for (i = 0, len = arguments.length; i < len; i++) { - values.push(System.Int64.getValue(arguments[i])); - } - - i = 0; - min = values[0]; - for (; ++i < values.length;) { - if (values[i].lt(min)) { - min = values[i]; - } - } - - return new System.Int64(min); - }; - - System.Int64.max = function () { - var values = [], - max, i, len; - - for (i = 0, len = arguments.length; i < len; i++) { - values.push(System.Int64.getValue(arguments[i])); - } - - i = 0; - max = values[0]; - for (; ++i < values.length;) { - if (values[i].gt(max)) { - max = values[i]; - } - } - - return new System.Int64(max); - }; - - System.Int64.prototype.and = function (l) { - return new this.T(this.value.and(this.T.getValue(l))); - }; - - System.Int64.prototype.not = function () { - return new this.T(this.value.not()); - }; - - System.Int64.prototype.or = function (l) { - return new this.T(this.value.or(this.T.getValue(l))); - }; - - System.Int64.prototype.shl = function (l) { - return new this.T(this.value.shl(l)); - }; - - System.Int64.prototype.shr = function (l) { - return new this.T(this.value.shr(l)); - }; - - System.Int64.prototype.shru = function (l) { - return new this.T(this.value.shru(l)); - }; - - System.Int64.prototype.xor = function (l) { - return new this.T(this.value.xor(this.T.getValue(l))); - }; - - System.Int64.check = function (v, tp) { - if (H5.Int.isInfinite(v)) { - if (tp === System.Int64 || tp === System.UInt64) { - return tp.MinValue; - } - return tp.min; - } - - if (!v) { - return null; - } - - var str, r; - if (tp === System.Int64) { - if (v instanceof System.Int64) { - return v; - } - - str = v.value.toString(); - r = new System.Int64(str); - - if (str !== r.value.toString()) { - throw new System.OverflowException(); - } - - return r; - } - - if (tp === System.UInt64) { - if (v instanceof System.UInt64) { - return v; - } - - if (v.value.isNegative()) { - throw new System.OverflowException(); - } - str = v.value.toString(); - r = new System.UInt64(str); - - if (str !== r.value.toString()) { - throw new System.OverflowException(); - } - - return r; - } - - return H5.Int.check(v.toNumber(), tp); - }; - - System.Int64.clip8 = function (x) { - x = (x == null || System.Int64.is64Bit(x)) ? x : new System.Int64(x); - return x ? H5.Int.sxb(x.value.low & 0xff) : (H5.Int.isInfinite(x) ? System.SByte.min : null); - }; - - System.Int64.clipu8 = function (x) { - x = (x == null || System.Int64.is64Bit(x)) ? x : new System.Int64(x); - return x ? x.value.low & 0xff : (H5.Int.isInfinite(x) ? System.Byte.min : null); - }; - - System.Int64.clip16 = function (x) { - x = (x == null || System.Int64.is64Bit(x)) ? x : new System.Int64(x); - return x ? H5.Int.sxs(x.value.low & 0xffff) : (H5.Int.isInfinite(x) ? System.Int16.min : null); - }; - - System.Int64.clipu16 = function (x) { - x = (x == null || System.Int64.is64Bit(x)) ? x : new System.Int64(x); - return x ? x.value.low & 0xffff : (H5.Int.isInfinite(x) ? System.UInt16.min : null); - }; - - System.Int64.clip32 = function (x) { - x = (x == null || System.Int64.is64Bit(x)) ? x : new System.Int64(x); - return x ? x.value.low | 0 : (H5.Int.isInfinite(x) ? System.Int32.min : null); - }; - - System.Int64.clipu32 = function (x) { - x = (x == null || System.Int64.is64Bit(x)) ? x : new System.Int64(x); - return x ? x.value.low >>> 0 : (H5.Int.isInfinite(x) ? System.UInt32.min : null); - }; - - System.Int64.clip64 = function (x) { - x = (x == null || System.Int64.is64Bit(x)) ? x : new System.UInt64(x); - return x ? new System.Int64(x.value.toSigned()) : (H5.Int.isInfinite(x) ? System.Int64.MinValue : null); - }; - - System.Int64.clipu64 = function (x) { - x = (x == null || System.Int64.is64Bit(x)) ? x : new System.Int64(x); - return x ? new System.UInt64(x.value.toUnsigned()) : (H5.Int.isInfinite(x) ? System.UInt64.MinValue : null); - }; - - System.Int64.bitIncrement = function (x) { - if (isNaN(x) || x === Number.POSITIVE_INFINITY) { return x; } - if (x === Number.NEGATIVE_INFINITY) { return System.Double.min; } - if (x === 0.0) { return 4.94065645841247E-324; } - - var bits = System.BitConverter.doubleToInt64Bits(x); - if (bits.lt(0)) { bits = bits.add(-1); } - else { bits = bits.add(1); } - return System.BitConverter.int64BitsToDouble(bits); - }; - - System.Int64.bitDecrement = function (x) { return -System.Int64.bitIncrement(-x);}; - - System.Int64.Zero = System.Int64(H5.$Long.ZERO); - System.Int64.MinValue = System.Int64(H5.$Long.MIN_VALUE); - System.Int64.MaxValue = System.Int64(H5.$Long.MAX_VALUE); - System.Int64.precision = 19; - - /* ULONG */ - - System.UInt64 = function (l) { - if (this.constructor !== System.UInt64) { - return new System.UInt64(l); - } - - if (!H5.hasValue(l)) { - l = 0; - } - - this.T = System.UInt64; - this.unsigned = true; - this.value = System.UInt64.getValue(l, true); - } - - System.UInt64.$number = true; - System.UInt64.$$name = "System.UInt64"; - System.UInt64.prototype.$$name = "System.UInt64"; - System.UInt64.$kind = "struct"; - System.UInt64.prototype.$kind = "struct"; - System.UInt64.$$inherits = []; - H5.Class.addExtend(System.UInt64, [System.IComparable, System.IFormattable, System.IComparable$1(System.UInt64), System.IEquatable$1(System.UInt64)]); - - System.UInt64.$is = function (instance) { - return instance instanceof System.UInt64; - }; - - System.UInt64.getDefaultValue = function () { - return System.UInt64.Zero; - }; - - System.UInt64.getValue = function (l) { - if (!H5.hasValue(l)) { - return null; - } - - if (l instanceof H5.$Long) { - return l; - } - - if (l instanceof System.UInt64) { - return l.value; - } - - if (l instanceof System.Int64) { - return l.value.toUnsigned(); - } - - if (H5.isArray(l)) { - return new H5.$Long(l[0], l[1], true); - } - - if (H5.isString(l)) { - return H5.$Long.fromString(l, true); - } - - if (H5.isNumber(l)) { - if (l < 0) { - return (new System.Int64(l)).value.toUnsigned(); - } - - return H5.$Long.fromNumber(l, true); - } - - if (l instanceof System.Decimal) { - return H5.$Long.fromString(l.toString(), true); - } - - return H5.$Long.fromValue(l); - }; - - System.UInt64.create = function (l) { - if (!H5.hasValue(l)) { - return null; - } - - if (l instanceof System.UInt64) { - return l; - } - - return new System.UInt64(l); - }; - - System.UInt64.lift = function (l) { - if (!H5.hasValue(l)) { - return null; - } - return System.UInt64.create(l); - }; - - System.UInt64.prototype.toString = System.Int64.prototype.toString; - System.UInt64.prototype.format = System.Int64.prototype.format; - System.UInt64.prototype.isNegative = System.Int64.prototype.isNegative; - System.UInt64.prototype.abs = System.Int64.prototype.abs; - System.UInt64.prototype.compareTo = System.Int64.prototype.compareTo; - System.UInt64.prototype.add = System.Int64.prototype.add; - System.UInt64.prototype.sub = System.Int64.prototype.sub; - System.UInt64.prototype.isZero = System.Int64.prototype.isZero; - System.UInt64.prototype.mul = System.Int64.prototype.mul; - System.UInt64.prototype.div = System.Int64.prototype.div; - System.UInt64.prototype.toNumberDivided = System.Int64.prototype.toNumberDivided; - System.UInt64.prototype.mod = System.Int64.prototype.mod; - System.UInt64.prototype.neg = System.Int64.prototype.neg; - System.UInt64.prototype.inc = System.Int64.prototype.inc; - System.UInt64.prototype.dec = System.Int64.prototype.dec; - System.UInt64.prototype.sign = System.Int64.prototype.sign; - System.UInt64.prototype.clone = System.Int64.prototype.clone; - System.UInt64.prototype.ne = System.Int64.prototype.ne; - System.UInt64.prototype.neq = System.Int64.prototype.neq; - System.UInt64.prototype.eq = System.Int64.prototype.eq; - System.UInt64.prototype.lt = System.Int64.prototype.lt; - System.UInt64.prototype.lte = System.Int64.prototype.lte; - System.UInt64.prototype.gt = System.Int64.prototype.gt; - System.UInt64.prototype.gte = System.Int64.prototype.gte; - System.UInt64.prototype.equals = System.Int64.prototype.equals; - System.UInt64.prototype.equalsT = System.Int64.prototype.equalsT; - System.UInt64.prototype.getHashCode = System.Int64.prototype.getHashCode; - System.UInt64.prototype.toNumber = System.Int64.prototype.toNumber; - - System.UInt64.parse = function (str) { - if (str == null) { - throw new System.ArgumentNullException.$ctor1("str"); - } - - if (!/^[+-]?[0-9]+$/.test(str)) { - throw new System.FormatException.$ctor1("Input string was not in a correct format."); - } - - var result = new System.UInt64(str); - - if (result.value.isNegative()) { - throw new System.OverflowException(); - } - - if (System.String.trimStartZeros(str) !== result.toString()) { - throw new System.OverflowException(); - } - - return result; - }; - - System.UInt64.tryParse = function (str, v) { - try { - if (str == null || !/^[+-]?[0-9]+$/.test(str)) { - v.v = System.UInt64(H5.$Long.UZERO); - return false; - } - - v.v = new System.UInt64(str); - - if (v.v.isNegative()) { - v.v = System.UInt64(H5.$Long.UZERO); - return false; - } - - if (System.String.trimStartZeros(str) !== v.v.toString()) { - v.v = System.UInt64(H5.$Long.UZERO); - return false; - } - - return true; - } catch (e) { - v.v = System.UInt64(H5.$Long.UZERO); - return false; - } - }; - - System.UInt64.min = function () { - var values = [], - min, i, len; - - for (i = 0, len = arguments.length; i < len; i++) { - values.push(System.UInt64.getValue(arguments[i])); - } - - i = 0; - min = values[0]; - for (; ++i < values.length;) { - if (values[i].lt(min)) { - min = values[i]; - } - } - - return new System.UInt64(min); - }; - - System.UInt64.max = function () { - var values = [], - max, i, len; - - for (i = 0, len = arguments.length; i < len; i++) { - values.push(System.UInt64.getValue(arguments[i])); - } - - i = 0; - max = values[0]; - for (; ++i < values.length;) { - if (values[i].gt(max)) { - max = values[i]; - } - } - - return new System.UInt64(max); - }; - - System.UInt64.divRem = function (a, b, result) { - a = System.UInt64(a); - b = System.UInt64(b); - var remainder = a.mod(b); - result.v = remainder; - return a.sub(remainder).div(b); - }; - - System.UInt64.prototype.toJSON = function () { - return this.gt(H5.Int.MAX_SAFE_INTEGER) ? this.toString() : this.toNumber(); - }; - - System.UInt64.prototype.and = System.Int64.prototype.and; - System.UInt64.prototype.not = System.Int64.prototype.not; - System.UInt64.prototype.or = System.Int64.prototype.or; - System.UInt64.prototype.shl = System.Int64.prototype.shl; - System.UInt64.prototype.shr = System.Int64.prototype.shr; - System.UInt64.prototype.shru = System.Int64.prototype.shru; - System.UInt64.prototype.xor = System.Int64.prototype.xor; - - System.UInt64.Zero = System.UInt64(H5.$Long.UZERO); - System.UInt64.MinValue = System.UInt64.Zero; - System.UInt64.MaxValue = System.UInt64(H5.$Long.MAX_UNSIGNED_VALUE); - System.UInt64.precision = 20; - - // @source Decimal.js - - /* decimal.js v7.1.0 https://github.com/MikeMcl/decimal.js/LICENCE */ - !function (n) { "use strict"; function e(n) { var e, i, t, r = n.length - 1, s = "", o = n[0]; if (r > 0) { for (s += o, e = 1; r > e; e++) t = n[e] + "", i = Rn - t.length, i && (s += l(i)), s += t; o = n[e], t = o + "", i = Rn - t.length, i && (s += l(i)) } else if (0 === o) return "0"; for (; o % 10 === 0;) o /= 10; return s + o } function i(n, e, i) { if (n !== ~~n || e > n || n > i) throw Error(En + n) } function t(n, e, i, t) { var r, s, o, u; for (s = n[0]; s >= 10; s /= 10)--e; return --e < 0 ? (e += Rn, r = 0) : (r = Math.ceil((e + 1) / Rn), e %= Rn), s = On(10, Rn - e), u = n[r] % s | 0, null == t ? 3 > e ? (0 == e ? u = u / 100 | 0 : 1 == e && (u = u / 10 | 0), o = 4 > i && 99999 == u || i > 3 && 49999 == u || 5e4 == u || 0 == u) : o = (4 > i && u + 1 == s || i > 3 && u + 1 == s / 2) && (n[r + 1] / s / 100 | 0) == On(10, e - 2) - 1 || (u == s / 2 || 0 == u) && 0 == (n[r + 1] / s / 100 | 0) : 4 > e ? (0 == e ? u = u / 1e3 | 0 : 1 == e ? u = u / 100 | 0 : 2 == e && (u = u / 10 | 0), o = (t || 4 > i) && 9999 == u || !t && i > 3 && 4999 == u) : o = ((t || 4 > i) && u + 1 == s || !t && i > 3 && u + 1 == s / 2) && (n[r + 1] / s / 1e3 | 0) == On(10, e - 3) - 1, o } function r(n, e, i) { for (var t, r, s = [0], o = 0, u = n.length; u > o;) { for (r = s.length; r--;) s[r] *= e; for (s[0] += wn.indexOf(n.charAt(o++)), t = 0; t < s.length; t++) s[t] > i - 1 && (void 0 === s[t + 1] && (s[t + 1] = 0), s[t + 1] += s[t] / i | 0, s[t] %= i) } return s.reverse() } function s(n, e) { var i, t, r = e.d.length; 32 > r ? (i = Math.ceil(r / 3), t = Math.pow(4, -i).toString()) : (i = 16, t = "2.3283064365386962890625e-10"), n.precision += i, e = E(n, 1, e.times(t), new n(1)); for (var s = i; s--;) { var o = e.times(e); e = o.times(o).minus(o).times(8).plus(1) } return n.precision -= i, e } function o(n, e, i, t) { var r, s, o, u, c, f, a, h, l, d = n.constructor; n: if (null != e) { if (h = n.d, !h) return n; for (r = 1, u = h[0]; u >= 10; u /= 10) r++; if (s = e - r, 0 > s) s += Rn, o = e, a = h[l = 0], c = a / On(10, r - o - 1) % 10 | 0; else if (l = Math.ceil((s + 1) / Rn), u = h.length, l >= u) { if (!t) break n; for (; u++ <= l;) h.push(0); a = c = 0, r = 1, s %= Rn, o = s - Rn + 1 } else { for (a = u = h[l], r = 1; u >= 10; u /= 10) r++; s %= Rn, o = s - Rn + r, c = 0 > o ? 0 : a / On(10, r - o - 1) % 10 | 0 } if (t = t || 0 > e || void 0 !== h[l + 1] || (0 > o ? a : a % On(10, r - o - 1)), f = 4 > i ? (c || t) && (0 == i || i == (n.s < 0 ? 3 : 2)) : c > 5 || 5 == c && (4 == i || t || 6 == i && (s > 0 ? o > 0 ? a / On(10, r - o) : 0 : h[l - 1]) % 10 & 1 || i == (n.s < 0 ? 8 : 7)), 1 > e || !h[0]) return h.length = 0, f ? (e -= n.e + 1, h[0] = On(10, (Rn - e % Rn) % Rn), n.e = -e || 0) : h[0] = n.e = 0, n; if (0 == s ? (h.length = l, u = 1, l--) : (h.length = l + 1, u = On(10, Rn - s), h[l] = o > 0 ? (a / On(10, r - o) % On(10, o) | 0) * u : 0), f) for (; ;) { if (0 == l) { for (s = 1, o = h[0]; o >= 10; o /= 10) s++; for (o = h[0] += u, u = 1; o >= 10; o /= 10) u++; s != u && (n.e++, h[0] == Pn && (h[0] = 1)); break } if (h[l] += u, h[l] != Pn) break; h[l--] = 0, u = 1 } for (s = h.length; 0 === h[--s];) h.pop() } return bn && (n.e > d.maxE ? (n.d = null, n.e = NaN) : n.e < d.minE && (n.e = 0, n.d = [0])), n } function u(n, i, t) { if (!n.isFinite()) return v(n); var r, s = n.e, o = e(n.d), u = o.length; return i ? (t && (r = t - u) > 0 ? o = o.charAt(0) + "." + o.slice(1) + l(r) : u > 1 && (o = o.charAt(0) + "." + o.slice(1)), o = o + (n.e < 0 ? "e" : "e+") + n.e) : 0 > s ? (o = "0." + l(-s - 1) + o, t && (r = t - u) > 0 && (o += l(r))) : s >= u ? (o += l(s + 1 - u), t && (r = t - s - 1) > 0 && (o = o + "." + l(r))) : ((r = s + 1) < u && (o = o.slice(0, r) + "." + o.slice(r)), t && (r = t - u) > 0 && (s + 1 === u && (o += "."), o += l(r))), o } function c(n, e) { for (var i = 1, t = n[0]; t >= 10; t /= 10) i++; return i + e * Rn - 1 } function f(n, e, i) { if (e > Un) throw bn = !0, i && (n.precision = i), Error(Mn); return o(new n(mn), e, 1, !0) } function a(n, e, i) { if (e > _n) throw Error(Mn); return o(new n(vn), e, i, !0) } function h(n) { var e = n.length - 1, i = e * Rn + 1; if (e = n[e]) { for (; e % 10 == 0; e /= 10) i--; for (e = n[0]; e >= 10; e /= 10) i++ } return i } function l(n) { for (var e = ""; n--;) e += "0"; return e } function d(n, e, i, t) { var r, s = new n(1), o = Math.ceil(t / Rn + 4); for (bn = !1; ;) { if (i % 2 && (s = s.times(e), q(s.d, o) && (r = !0)), i = qn(i / 2), 0 === i) { i = s.d.length - 1, r && 0 === s.d[i] && ++s.d[i]; break } e = e.times(e), q(e.d, o) } return bn = !0, s } function p(n) { return 1 & n.d[n.d.length - 1] } function g(n, e, i) { for (var t, r = new n(e[0]), s = 0; ++s < e.length;) { if (t = new n(e[s]), !t.s) { r = t; break } r[i](t) && (r = t) } return r } function w(n, i) { var r, s, u, c, f, a, h, l = 0, d = 0, p = 0, g = n.constructor, w = g.rounding, m = g.precision; if (!n.d || !n.d[0] || n.e > 17) return new g(n.d ? n.d[0] ? n.s < 0 ? 0 : 1 / 0 : 1 : n.s ? n.s < 0 ? 0 : n : NaN); for (null == i ? (bn = !1, h = m) : h = i, a = new g(.03125) ; n.e > -2;) n = n.times(a), p += 5; for (s = Math.log(On(2, p)) / Math.LN10 * 2 + 5 | 0, h += s, r = c = f = new g(1), g.precision = h; ;) { if (c = o(c.times(n), h, 1), r = r.times(++d), a = f.plus(Sn(c, r, h, 1)), e(a.d).slice(0, h) === e(f.d).slice(0, h)) { for (u = p; u--;) f = o(f.times(f), h, 1); if (null != i) return g.precision = m, f; if (!(3 > l && t(f.d, h - s, w, l))) return o(f, g.precision = m, w, bn = !0); g.precision = h += 10, r = c = a = new g(1), d = 0, l++ } f = a } } function m(n, i) { var r, s, u, c, a, h, l, d, p, g, w, v = 1, N = 10, b = n, x = b.d, E = b.constructor, M = E.rounding, y = E.precision; if (b.s < 0 || !x || !x[0] || !b.e && 1 == x[0] && 1 == x.length) return new E(x && !x[0] ? -1 / 0 : 1 != b.s ? NaN : x ? 0 : b); if (null == i ? (bn = !1, p = y) : p = i, E.precision = p += N, r = e(x), s = r.charAt(0), !(Math.abs(c = b.e) < 15e14)) return d = f(E, p + 2, y).times(c + ""), b = m(new E(s + "." + r.slice(1)), p - N).plus(d), E.precision = y, null == i ? o(b, y, M, bn = !0) : b; for (; 7 > s && 1 != s || 1 == s && r.charAt(1) > 3;) b = b.times(n), r = e(b.d), s = r.charAt(0), v++; for (c = b.e, s > 1 ? (b = new E("0." + r), c++) : b = new E(s + "." + r.slice(1)), g = b, l = a = b = Sn(b.minus(1), b.plus(1), p, 1), w = o(b.times(b), p, 1), u = 3; ;) { if (a = o(a.times(w), p, 1), d = l.plus(Sn(a, new E(u), p, 1)), e(d.d).slice(0, p) === e(l.d).slice(0, p)) { if (l = l.times(2), 0 !== c && (l = l.plus(f(E, p + 2, y).times(c + ""))), l = Sn(l, new E(v), p, 1), null != i) return E.precision = y, l; if (!t(l.d, p - N, M, h)) return o(l, E.precision = y, M, bn = !0); E.precision = p += N, d = a = b = Sn(g.minus(1), g.plus(1), p, 1), w = o(b.times(b), p, 1), u = h = 1 } l = d, u += 2 } } function v(n) { return String(n.s * n.s / 0) } function N(n, e) { var i, t, r; for ((i = e.indexOf(".")) > -1 && (e = e.replace(".", "")), (t = e.search(/e/i)) > 0 ? (0 > i && (i = t), i += +e.slice(t + 1), e = e.substring(0, t)) : 0 > i && (i = e.length), t = 0; 48 === e.charCodeAt(t) ; t++); for (r = e.length; 48 === e.charCodeAt(r - 1) ; --r); if (e = e.slice(t, r)) { if (r -= t, n.e = i = i - t - 1, n.d = [], t = (i + 1) % Rn, 0 > i && (t += Rn), r > t) { for (t && n.d.push(+e.slice(0, t)), r -= Rn; r > t;) n.d.push(+e.slice(t, t += Rn)); e = e.slice(t), t = Rn - e.length } else t -= r; for (; t--;) e += "0"; n.d.push(+e), bn && (n.e > n.constructor.maxE ? (n.d = null, n.e = NaN) : n.e < n.constructor.minE && (n.e = 0, n.d = [0])) } else n.e = 0, n.d = [0]; return n } function b(n, e) { var i, t, s, o, u, f, a, h, l; if ("Infinity" === e || "NaN" === e) return +e || (n.s = NaN), n.e = NaN, n.d = null, n; if (An.test(e)) i = 16, e = e.toLowerCase(); else if (Fn.test(e)) i = 2; else { if (!Dn.test(e)) throw Error(En + e); i = 8 } for (o = e.search(/p/i), o > 0 ? (a = +e.slice(o + 1), e = e.substring(2, o)) : e = e.slice(2), o = e.indexOf("."), u = o >= 0, t = n.constructor, u && (e = e.replace(".", ""), f = e.length, o = f - o, s = d(t, new t(i), o, 2 * o)), h = r(e, i, Pn), l = h.length - 1, o = l; 0 === h[o]; --o) h.pop(); return 0 > o ? new t(0 * n.s) : (n.e = c(h, l), n.d = h, bn = !1, u && (n = Sn(n, s, 4 * f)), a && (n = n.times(Math.abs(a) < 54 ? Math.pow(2, a) : Nn.pow(2, a))), bn = !0, n) } function x(n, e) { var i, t = e.d.length; if (3 > t) return E(n, 2, e, e); i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : 0 | i, e = e.times(Math.pow(5, -i)), e = E(n, 2, e, e); for (var r, s = new n(5), o = new n(16), u = new n(20) ; i--;) r = e.times(e), e = e.times(s.plus(r.times(o.times(r).minus(u)))); return e } function E(n, e, i, t, r) { var s, o, u, c, f = 1, a = n.precision, h = Math.ceil(a / Rn); for (bn = !1, c = i.times(i), u = new n(t) ; ;) { if (o = Sn(u.times(c), new n(e++ * e++), a, 1), u = r ? t.plus(o) : t.minus(o), t = Sn(o.times(c), new n(e++ * e++), a, 1), o = u.plus(t), void 0 !== o.d[h]) { for (s = h; o.d[s] === u.d[s] && s--;); if (-1 == s) break } s = u, u = t, t = o, o = s, f++ } return bn = !0, o.d.length = h + 1, o } function M(n, e) { var i, t = e.s < 0, r = a(n, n.precision, 1), s = r.times(.5); if (e = e.abs(), e.lte(s)) return dn = t ? 4 : 1, e; if (i = e.divToInt(r), i.isZero()) dn = t ? 3 : 2; else { if (e = e.minus(i.times(r)), e.lte(s)) return dn = p(i) ? t ? 2 : 3 : t ? 4 : 1, e; dn = p(i) ? t ? 1 : 4 : t ? 3 : 2 } return e.minus(r).abs() } function y(n, e, t, s) { var o, c, f, a, h, l, d, p, g, w = n.constructor, m = void 0 !== t; if (m ? (i(t, 1, gn), void 0 === s ? s = w.rounding : i(s, 0, 8)) : (t = w.precision, s = w.rounding), n.isFinite()) { for (d = u(n), f = d.indexOf("."), m ? (o = 2, 16 == e ? t = 4 * t - 3 : 8 == e && (t = 3 * t - 2)) : o = e, f >= 0 && (d = d.replace(".", ""), g = new w(1), g.e = d.length - f, g.d = r(u(g), 10, o), g.e = g.d.length), p = r(d, 10, o), c = h = p.length; 0 == p[--h];) p.pop(); if (p[0]) { if (0 > f ? c-- : (n = new w(n), n.d = p, n.e = c, n = Sn(n, g, t, s, 0, o), p = n.d, c = n.e, l = hn), f = p[t], a = o / 2, l = l || void 0 !== p[t + 1], l = 4 > s ? (void 0 !== f || l) && (0 === s || s === (n.s < 0 ? 3 : 2)) : f > a || f === a && (4 === s || l || 6 === s && 1 & p[t - 1] || s === (n.s < 0 ? 8 : 7)), p.length = t, l) for (; ++p[--t] > o - 1;) p[t] = 0, t || (++c, p.unshift(1)); for (h = p.length; !p[h - 1]; --h); for (f = 0, d = ""; h > f; f++) d += wn.charAt(p[f]); if (m) { if (h > 1) if (16 == e || 8 == e) { for (f = 16 == e ? 4 : 3, --h; h % f; h++) d += "0"; for (p = r(d, o, e), h = p.length; !p[h - 1]; --h); for (f = 1, d = "1."; h > f; f++) d += wn.charAt(p[f]) } else d = d.charAt(0) + "." + d.slice(1); d = d + (0 > c ? "p" : "p+") + c } else if (0 > c) { for (; ++c;) d = "0" + d; d = "0." + d } else if (++c > h) for (c -= h; c--;) d += "0"; else h > c && (d = d.slice(0, c) + "." + d.slice(c)) } else d = m ? "0p+0" : "0"; d = (16 == e ? "0x" : 2 == e ? "0b" : 8 == e ? "0o" : "") + d } else d = v(n); return n.s < 0 ? "-" + d : d } function q(n, e) { return n.length > e ? (n.length = e, !0) : void 0 } function O(n) { return new this(n).abs() } function F(n) { return new this(n).acos() } function A(n) { return new this(n).acosh() } function D(n, e) { return new this(n).plus(e) } function Z(n) { return new this(n).asin() } function P(n) { return new this(n).asinh() } function R(n) { return new this(n).atan() } function L(n) { return new this(n).atanh() } function U(n, e) { n = new this(n), e = new this(e); var i, t = this.precision, r = this.rounding, s = t + 4; return n.s && e.s ? n.d || e.d ? !e.d || n.isZero() ? (i = e.s < 0 ? a(this, t, r) : new this(0), i.s = n.s) : !n.d || e.isZero() ? (i = a(this, s, 1).times(.5), i.s = n.s) : e.s < 0 ? (this.precision = s, this.rounding = 1, i = this.atan(Sn(n, e, s, 1)), e = a(this, s, 1), this.precision = t, this.rounding = r, i = n.s < 0 ? i.minus(e) : i.plus(e)) : i = this.atan(Sn(n, e, s, 1)) : (i = a(this, s, 1).times(e.s > 0 ? .25 : .75), i.s = n.s) : i = new this(NaN), i } function _(n) { return new this(n).cbrt() } function k(n) { return o(n = new this(n), n.e + 1, 2) } function S(n) { if (!n || "object" != typeof n) throw Error(xn + "Object expected"); var e, i, t, r = ["precision", 1, gn, "rounding", 0, 8, "toExpNeg", -pn, 0, "toExpPos", 0, pn, "maxE", 0, pn, "minE", -pn, 0, "modulo", 0, 9]; for (e = 0; e < r.length; e += 3) if (void 0 !== (t = n[i = r[e]])) { if (!(qn(t) === t && t >= r[e + 1] && t <= r[e + 2])) throw Error(En + i + ": " + t); this[i] = t } if (void 0 !== (t = n[i = "crypto"])) { if (t !== !0 && t !== !1 && 0 !== t && 1 !== t) throw Error(En + i + ": " + t); if (t) { if ("undefined" == typeof crypto || !crypto || !crypto.getRandomValues && !crypto.randomBytes) throw Error(yn); this[i] = !0 } else this[i] = !1 } return this } function T(n) { return new this(n).cos() } function C(n) { return new this(n).cosh() } function I(n) { function e(n) { var i, t, r, s = this; if (!(s instanceof e)) return new e(n); if (s.constructor = e, n instanceof e) return s.s = n.s, s.e = n.e, void (s.d = (n = n.d) ? n.slice() : n); if (r = typeof n, "number" === r) { if (0 === n) return s.s = 0 > 1 / n ? -1 : 1, s.e = 0, void (s.d = [0]); if (0 > n ? (n = -n, s.s = -1) : s.s = 1, n === ~~n && 1e7 > n) { for (i = 0, t = n; t >= 10; t /= 10) i++; return s.e = i, void (s.d = [n]) } return 0 * n !== 0 ? (n || (s.s = NaN), s.e = NaN, void (s.d = null)) : N(s, n.toString()) } if ("string" !== r) throw Error(En + n); return 45 === n.charCodeAt(0) ? (n = n.slice(1), s.s = -1) : s.s = 1, Zn.test(n) ? N(s, n) : b(s, n) } var i, t, r; if (e.prototype = kn, e.ROUND_UP = 0, e.ROUND_DOWN = 1, e.ROUND_CEIL = 2, e.ROUND_FLOOR = 3, e.ROUND_HALF_UP = 4, e.ROUND_HALF_DOWN = 5, e.ROUND_HALF_EVEN = 6, e.ROUND_HALF_CEIL = 7, e.ROUND_HALF_FLOOR = 8, e.EUCLID = 9, e.config = e.set = S, e.clone = I, e.abs = O, e.acos = F, e.acosh = A, e.add = D, e.asin = Z, e.asinh = P, e.atan = R, e.atanh = L, e.atan2 = U, e.cbrt = _, e.ceil = k, e.cos = T, e.cosh = C, e.div = H, e.exp = B, e.floor = V, e.hypot = $, e.ln = j, e.log = W, e.log10 = z, e.log2 = J, e.max = G, e.min = K, e.mod = Q, e.mul = X, e.pow = Y, e.random = nn, e.round = en, e.sign = tn, e.sin = rn, e.sinh = sn, e.sqrt = on, e.sub = un, e.tan = cn, e.tanh = fn, e.trunc = an, void 0 === n && (n = {}), n) for (r = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], i = 0; i < r.length;) n.hasOwnProperty(t = r[i++]) || (n[t] = this[t]); return e.config(n), e } function H(n, e) { return new this(n).div(e) } function B(n) { return new this(n).exp() } function V(n) { return o(n = new this(n), n.e + 1, 3) } function $() { var n, e, i = new this(0); for (bn = !1, n = 0; n < arguments.length;) if (e = new this(arguments[n++]), e.d) i.d && (i = i.plus(e.times(e))); else { if (e.s) return bn = !0, new this(1 / 0); i = e } return bn = !0, i.sqrt() } function j(n) { return new this(n).ln() } function W(n, e) { return new this(n).log(e) } function J(n) { return new this(n).log(2) } function z(n) { return new this(n).log(10) } function G() { return g(this, arguments, "lt") } function K() { return g(this, arguments, "gt") } function Q(n, e) { return new this(n).mod(e) } function X(n, e) { return new this(n).mul(e) } function Y(n, e) { return new this(n).pow(e) } function nn(n) { var e, t, r, s, o = 0, u = new this(1), c = []; if (void 0 === n ? n = this.precision : i(n, 1, gn), r = Math.ceil(n / Rn), this.crypto) if (crypto.getRandomValues) for (e = crypto.getRandomValues(new Uint32Array(r)) ; r > o;) s = e[o], s >= 429e7 ? e[o] = crypto.getRandomValues(new Uint32Array(1))[0] : c[o++] = s % 1e7; else { if (!crypto.randomBytes) throw Error(yn); for (e = crypto.randomBytes(r *= 4) ; r > o;) s = e[o] + (e[o + 1] << 8) + (e[o + 2] << 16) + ((127 & e[o + 3]) << 24), s >= 214e7 ? crypto.randomBytes(4).copy(e, o) : (c.push(s % 1e7), o += 4); o = r / 4 } else for (; r > o;) c[o++] = 1e7 * Math.random() | 0; for (r = c[--o], n %= Rn, r && n && (s = On(10, Rn - n), c[o] = (r / s | 0) * s) ; 0 === c[o]; o--) c.pop(); if (0 > o) t = 0, c = [0]; else { for (t = -1; 0 === c[0]; t -= Rn) c.shift(); for (r = 1, s = c[0]; s >= 10; s /= 10) r++; Rn > r && (t -= Rn - r) } return u.e = t, u.d = c, u } function en(n) { return o(n = new this(n), n.e + 1, this.rounding) } function tn(n) { return n = new this(n), n.d ? n.d[0] ? n.s : 0 * n.s : n.s || NaN } function rn(n) { return new this(n).sin() } function sn(n) { return new this(n).sinh() } function on(n) { return new this(n).sqrt() } function un(n, e) { return new this(n).sub(e) } function cn(n) { return new this(n).tan() } function fn(n) { return new this(n).tanh() } function an(n) { return o(n = new this(n), n.e + 1, 1) } var hn, ln, dn, pn = 9e15, gn = 1e9, wn = "0123456789abcdef", mn = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", vn = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", Nn = { precision: 20, rounding: 4, modulo: 1, toExpNeg: -7, toExpPos: 21, minE: -pn, maxE: pn, crypto: !1 }, bn = !0, xn = "[DecimalError] ", En = xn + "Invalid argument: ", Mn = xn + "Precision limit exceeded", yn = xn + "crypto unavailable", qn = Math.floor, On = Math.pow, Fn = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, An = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Dn = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, Zn = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, Pn = 1e7, Rn = 7, Ln = 9007199254740991, Un = mn.length - 1, _n = vn.length - 1, kn = {}; kn.absoluteValue = kn.abs = function () { var n = new this.constructor(this); return n.s < 0 && (n.s = 1), o(n) }, kn.ceil = function () { return o(new this.constructor(this), this.e + 1, 2) }, kn.comparedTo = kn.cmp = function (n) { var e, i, t, r, s = this, o = s.d, u = (n = new s.constructor(n)).d, c = s.s, f = n.s; if (!o || !u) return c && f ? c !== f ? c : o === u ? 0 : !o ^ 0 > c ? 1 : -1 : NaN; if (!o[0] || !u[0]) return o[0] ? c : u[0] ? -f : 0; if (c !== f) return c; if (s.e !== n.e) return s.e > n.e ^ 0 > c ? 1 : -1; for (t = o.length, r = u.length, e = 0, i = r > t ? t : r; i > e; ++e) if (o[e] !== u[e]) return o[e] > u[e] ^ 0 > c ? 1 : -1; return t === r ? 0 : t > r ^ 0 > c ? 1 : -1 }, kn.cosine = kn.cos = function () { var n, e, i = this, t = i.constructor; return i.d ? i.d[0] ? (n = t.precision, e = t.rounding, t.precision = n + Math.max(i.e, i.sd()) + Rn, t.rounding = 1, i = s(t, M(t, i)), t.precision = n, t.rounding = e, o(2 == dn || 3 == dn ? i.neg() : i, n, e, !0)) : new t(1) : new t(NaN) }, kn.cubeRoot = kn.cbrt = function () { var n, i, t, r, s, u, c, f, a, h, l = this, d = l.constructor; if (!l.isFinite() || l.isZero()) return new d(l); for (bn = !1, u = l.s * Math.pow(l.s * l, 1 / 3), u && Math.abs(u) != 1 / 0 ? r = new d(u.toString()) : (t = e(l.d), n = l.e, (u = (n - t.length + 1) % 3) && (t += 1 == u || -2 == u ? "0" : "00"), u = Math.pow(t, 1 / 3), n = qn((n + 1) / 3) - (n % 3 == (0 > n ? -1 : 2)), u == 1 / 0 ? t = "5e" + n : (t = u.toExponential(), t = t.slice(0, t.indexOf("e") + 1) + n), r = new d(t), r.s = l.s), c = (n = d.precision) + 3; ;) if (f = r, a = f.times(f).times(f), h = a.plus(l), r = Sn(h.plus(l).times(f), h.plus(a), c + 2, 1), e(f.d).slice(0, c) === (t = e(r.d)).slice(0, c)) { if (t = t.slice(c - 3, c + 1), "9999" != t && (s || "4999" != t)) { (!+t || !+t.slice(1) && "5" == t.charAt(0)) && (o(r, n + 1, 1), i = !r.times(r).times(r).eq(l)); break } if (!s && (o(f, n + 1, 0), f.times(f).times(f).eq(l))) { r = f; break } c += 4, s = 1 } return bn = !0, o(r, n, d.rounding, i) }, kn.decimalPlaces = kn.dp = function () { var n, e = this.d, i = NaN; if (e) { if (n = e.length - 1, i = (n - qn(this.e / Rn)) * Rn, n = e[n]) for (; n % 10 == 0; n /= 10) i--; 0 > i && (i = 0) } return i }, kn.dividedBy = kn.div = function (n) { return Sn(this, new this.constructor(n)) }, kn.dividedToIntegerBy = kn.divToInt = function (n) { var e = this, i = e.constructor; return o(Sn(e, new i(n), 0, 1, 1), i.precision, i.rounding) }, kn.equals = kn.eq = function (n) { return 0 === this.cmp(n) }, kn.floor = function () { return o(new this.constructor(this), this.e + 1, 3) }, kn.greaterThan = kn.gt = function (n) { return this.cmp(n) > 0 }, kn.greaterThanOrEqualTo = kn.gte = function (n) { var e = this.cmp(n); return 1 == e || 0 === e }, kn.hyperbolicCosine = kn.cosh = function () { var n, e, i, t, r, s = this, u = s.constructor, c = new u(1); if (!s.isFinite()) return new u(s.s ? 1 / 0 : NaN); if (s.isZero()) return c; i = u.precision, t = u.rounding, u.precision = i + Math.max(s.e, s.sd()) + 4, u.rounding = 1, r = s.d.length, 32 > r ? (n = Math.ceil(r / 3), e = Math.pow(4, -n).toString()) : (n = 16, e = "2.3283064365386962890625e-10"), s = E(u, 1, s.times(e), new u(1), !0); for (var f, a = n, h = new u(8) ; a--;) f = s.times(s), s = c.minus(f.times(h.minus(f.times(h)))); return o(s, u.precision = i, u.rounding = t, !0) }, kn.hyperbolicSine = kn.sinh = function () { var n, e, i, t, r = this, s = r.constructor; if (!r.isFinite() || r.isZero()) return new s(r); if (e = s.precision, i = s.rounding, s.precision = e + Math.max(r.e, r.sd()) + 4, s.rounding = 1, t = r.d.length, 3 > t) r = E(s, 2, r, r, !0); else { n = 1.4 * Math.sqrt(t), n = n > 16 ? 16 : 0 | n, r = r.times(Math.pow(5, -n)), r = E(s, 2, r, r, !0); for (var u, c = new s(5), f = new s(16), a = new s(20) ; n--;) u = r.times(r), r = r.times(c.plus(u.times(f.times(u).plus(a)))) } return s.precision = e, s.rounding = i, o(r, e, i, !0) }, kn.hyperbolicTangent = kn.tanh = function () { var n, e, i = this, t = i.constructor; return i.isFinite() ? i.isZero() ? new t(i) : (n = t.precision, e = t.rounding, t.precision = n + 7, t.rounding = 1, Sn(i.sinh(), i.cosh(), t.precision = n, t.rounding = e)) : new t(i.s) }, kn.inverseCosine = kn.acos = function () { var n, e = this, i = e.constructor, t = e.abs().cmp(1), r = i.precision, s = i.rounding; return -1 !== t ? 0 === t ? e.isNeg() ? a(i, r, s) : new i(0) : new i(NaN) : e.isZero() ? a(i, r + 4, s).times(.5) : (i.precision = r + 6, i.rounding = 1, e = e.asin(), n = a(i, r + 4, s).times(.5), i.precision = r, i.rounding = s, n.minus(e)) }, kn.inverseHyperbolicCosine = kn.acosh = function () { var n, e, i = this, t = i.constructor; return i.lte(1) ? new t(i.eq(1) ? 0 : NaN) : i.isFinite() ? (n = t.precision, e = t.rounding, t.precision = n + Math.max(Math.abs(i.e), i.sd()) + 4, t.rounding = 1, bn = !1, i = i.times(i).minus(1).sqrt().plus(i), bn = !0, t.precision = n, t.rounding = e, i.ln()) : new t(i) }, kn.inverseHyperbolicSine = kn.asinh = function () { var n, e, i = this, t = i.constructor; return !i.isFinite() || i.isZero() ? new t(i) : (n = t.precision, e = t.rounding, t.precision = n + 2 * Math.max(Math.abs(i.e), i.sd()) + 6, t.rounding = 1, bn = !1, i = i.times(i).plus(1).sqrt().plus(i), bn = !0, t.precision = n, t.rounding = e, i.ln()) }, kn.inverseHyperbolicTangent = kn.atanh = function () { var n, e, i, t, r = this, s = r.constructor; return r.isFinite() ? r.e >= 0 ? new s(r.abs().eq(1) ? r.s / 0 : r.isZero() ? r : NaN) : (n = s.precision, e = s.rounding, t = r.sd(), Math.max(t, n) < 2 * -r.e - 1 ? o(new s(r), n, e, !0) : (s.precision = i = t - r.e, r = Sn(r.plus(1), new s(1).minus(r), i + n, 1), s.precision = n + 4, s.rounding = 1, r = r.ln(), s.precision = n, s.rounding = e, r.times(.5))) : new s(NaN) }, kn.inverseSine = kn.asin = function () { var n, e, i, t, r = this, s = r.constructor; return r.isZero() ? new s(r) : (e = r.abs().cmp(1), i = s.precision, t = s.rounding, -1 !== e ? 0 === e ? (n = a(s, i + 4, t).times(.5), n.s = r.s, n) : new s(NaN) : (s.precision = i + 6, s.rounding = 1, r = r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(), s.precision = i, s.rounding = t, r.times(2))) }, kn.inverseTangent = kn.atan = function () { var n, e, i, t, r, s, u, c, f, h = this, l = h.constructor, d = l.precision, p = l.rounding; if (h.isFinite()) { if (h.isZero()) return new l(h); if (h.abs().eq(1) && _n >= d + 4) return u = a(l, d + 4, p).times(.25), u.s = h.s, u } else { if (!h.s) return new l(NaN); if (_n >= d + 4) return u = a(l, d + 4, p).times(.5), u.s = h.s, u } for (l.precision = c = d + 10, l.rounding = 1, i = Math.min(28, c / Rn + 2 | 0), n = i; n; --n) h = h.div(h.times(h).plus(1).sqrt().plus(1)); for (bn = !1, e = Math.ceil(c / Rn), t = 1, f = h.times(h), u = new l(h), r = h; -1 !== n;) if (r = r.times(f), s = u.minus(r.div(t += 2)), r = r.times(f), u = s.plus(r.div(t += 2)), void 0 !== u.d[e]) for (n = e; u.d[n] === s.d[n] && n--;); return i && (u = u.times(2 << i - 1)), bn = !0, o(u, l.precision = d, l.rounding = p, !0) }, kn.isFinite = function () { return !!this.d }, kn.isInteger = kn.isInt = function () { return !!this.d && qn(this.e / Rn) > this.d.length - 2 }, kn.isNaN = function () { return !this.s }, kn.isNegative = kn.isNeg = function () { return this.s < 0 }, kn.isPositive = kn.isPos = function () { return this.s > 0 }, kn.isZero = function () { return !!this.d && 0 === this.d[0] }, kn.lessThan = kn.lt = function (n) { return this.cmp(n) < 0 }, kn.lessThanOrEqualTo = kn.lte = function (n) { return this.cmp(n) < 1 }, kn.logarithm = kn.log = function (n) { var i, r, s, u, c, a, h, l, d = this, p = d.constructor, g = p.precision, w = p.rounding, v = 5; if (null == n) n = new p(10), i = !0; else { if (n = new p(n), r = n.d, n.s < 0 || !r || !r[0] || n.eq(1)) return new p(NaN); i = n.eq(10) } if (r = d.d, d.s < 0 || !r || !r[0] || d.eq(1)) return new p(r && !r[0] ? -1 / 0 : 1 != d.s ? NaN : r ? 0 : 1 / 0); if (i) if (r.length > 1) c = !0; else { for (u = r[0]; u % 10 === 0;) u /= 10; c = 1 !== u } if (bn = !1, h = g + v, a = m(d, h), s = i ? f(p, h + 10) : m(n, h), l = Sn(a, s, h, 1), t(l.d, u = g, w)) do if (h += 10, a = m(d, h), s = i ? f(p, h + 10) : m(n, h), l = Sn(a, s, h, 1), !c) { +e(l.d).slice(u + 1, u + 15) + 1 == 1e14 && (l = o(l, g + 1, 0)); break } while (t(l.d, u += 10, w)); return bn = !0, o(l, g, w) }, kn.minus = kn.sub = function (n) { var e, i, t, r, s, u, f, a, h, l, d, p, g = this, w = g.constructor; if (n = new w(n), !g.d || !n.d) return g.s && n.s ? g.d ? n.s = -n.s : n = new w(n.d || g.s !== n.s ? g : NaN) : n = new w(NaN), n; if (g.s != n.s) return n.s = -n.s, g.plus(n); if (h = g.d, p = n.d, f = w.precision, a = w.rounding, !h[0] || !p[0]) { if (p[0]) n.s = -n.s; else { if (!h[0]) return new w(3 === a ? -0 : 0); n = new w(g) } return bn ? o(n, f, a) : n } if (i = qn(n.e / Rn), l = qn(g.e / Rn), h = h.slice(), s = l - i) { for (d = 0 > s, d ? (e = h, s = -s, u = p.length) : (e = p, i = l, u = h.length), t = Math.max(Math.ceil(f / Rn), u) + 2, s > t && (s = t, e.length = 1), e.reverse(), t = s; t--;) e.push(0); e.reverse() } else { for (t = h.length, u = p.length, d = u > t, d && (u = t), t = 0; u > t; t++) if (h[t] != p[t]) { d = h[t] < p[t]; break } s = 0 } for (d && (e = h, h = p, p = e, n.s = -n.s), u = h.length, t = p.length - u; t > 0; --t) h[u++] = 0; for (t = p.length; t > s;) { if (h[--t] < p[t]) { for (r = t; r && 0 === h[--r];) h[r] = Pn - 1; --h[r], h[t] += Pn } h[t] -= p[t] } for (; 0 === h[--u];) h.pop(); for (; 0 === h[0]; h.shift())--i; return h[0] ? (n.d = h, n.e = c(h, i), bn ? o(n, f, a) : n) : new w(3 === a ? -0 : 0) }, kn.modulo = kn.mod = function (n) { var e, i = this, t = i.constructor; return n = new t(n), !i.d || !n.s || n.d && !n.d[0] ? new t(NaN) : !n.d || i.d && !i.d[0] ? o(new t(i), t.precision, t.rounding) : (bn = !1, 9 == t.modulo ? (e = Sn(i, n.abs(), 0, 3, 1), e.s *= n.s) : e = Sn(i, n, 0, t.modulo, 1), e = e.times(n), bn = !0, i.minus(e)) }, kn.naturalExponential = kn.exp = function () { return w(this) }, kn.naturalLogarithm = kn.ln = function () { return m(this) }, kn.negated = kn.neg = function () { var n = new this.constructor(this); return n.s = -n.s, o(n) }, kn.plus = kn.add = function (n) { var e, i, t, r, s, u, f, a, h, l, d = this, p = d.constructor; if (n = new p(n), !d.d || !n.d) return d.s && n.s ? d.d || (n = new p(n.d || d.s === n.s ? d : NaN)) : n = new p(NaN), n; if (d.s != n.s) return n.s = -n.s, d.minus(n); if (h = d.d, l = n.d, f = p.precision, a = p.rounding, !h[0] || !l[0]) return l[0] || (n = new p(d)), bn ? o(n, f, a) : n; if (s = qn(d.e / Rn), t = qn(n.e / Rn), h = h.slice(), r = s - t) { for (0 > r ? (i = h, r = -r, u = l.length) : (i = l, t = s, u = h.length), s = Math.ceil(f / Rn), u = s > u ? s + 1 : u + 1, r > u && (r = u, i.length = 1), i.reverse() ; r--;) i.push(0); i.reverse() } for (u = h.length, r = l.length, 0 > u - r && (r = u, i = l, l = h, h = i), e = 0; r;) e = (h[--r] = h[r] + l[r] + e) / Pn | 0, h[r] %= Pn; for (e && (h.unshift(e), ++t), u = h.length; 0 == h[--u];) h.pop(); return n.d = h, n.e = c(h, t), bn ? o(n, f, a) : n }, kn.precision = kn.sd = function (n) { var e, i = this; if (void 0 !== n && n !== !!n && 1 !== n && 0 !== n) throw Error(En + n); return i.d ? (e = h(i.d), n && i.e + 1 > e && (e = i.e + 1)) : e = NaN, e }, kn.round = function () { var n = this, e = n.constructor; return o(new e(n), n.e + 1, e.rounding) }, kn.sine = kn.sin = function () { var n, e, i = this, t = i.constructor; return i.isFinite() ? i.isZero() ? new t(i) : (n = t.precision, e = t.rounding, t.precision = n + Math.max(i.e, i.sd()) + Rn, t.rounding = 1, i = x(t, M(t, i)), t.precision = n, t.rounding = e, o(dn > 2 ? i.neg() : i, n, e, !0)) : new t(NaN) }, kn.squareRoot = kn.sqrt = function () { var n, i, t, r, s, u, c = this, f = c.d, a = c.e, h = c.s, l = c.constructor; if (1 !== h || !f || !f[0]) return new l(!h || 0 > h && (!f || f[0]) ? NaN : f ? c : 1 / 0); for (bn = !1, h = Math.sqrt(+c), 0 == h || h == 1 / 0 ? (i = e(f), (i.length + a) % 2 == 0 && (i += "0"), h = Math.sqrt(i), a = qn((a + 1) / 2) - (0 > a || a % 2), h == 1 / 0 ? i = "1e" + a : (i = h.toExponential(), i = i.slice(0, i.indexOf("e") + 1) + a), r = new l(i)) : r = new l(h.toString()), t = (a = l.precision) + 3; ;) if (u = r, r = u.plus(Sn(c, u, t + 2, 1)).times(.5), e(u.d).slice(0, t) === (i = e(r.d)).slice(0, t)) { if (i = i.slice(t - 3, t + 1), "9999" != i && (s || "4999" != i)) { (!+i || !+i.slice(1) && "5" == i.charAt(0)) && (o(r, a + 1, 1), n = !r.times(r).eq(c)); break } if (!s && (o(u, a + 1, 0), u.times(u).eq(c))) { r = u; break } t += 4, s = 1 } return bn = !0, o(r, a, l.rounding, n) }, kn.tangent = kn.tan = function () { var n, e, i = this, t = i.constructor; return i.isFinite() ? i.isZero() ? new t(i) : (n = t.precision, e = t.rounding, t.precision = n + 10, t.rounding = 1, i = i.sin(), i.s = 1, i = Sn(i, new t(1).minus(i.times(i)).sqrt(), n + 10, 0), t.precision = n, t.rounding = e, o(2 == dn || 4 == dn ? i.neg() : i, n, e, !0)) : new t(NaN) }, kn.times = kn.mul = function (n) { var e, i, t, r, s, u, f, a, h, l = this, d = l.constructor, p = l.d, g = (n = new d(n)).d; if (n.s *= l.s, !(p && p[0] && g && g[0])) return new d(!n.s || p && !p[0] && !g || g && !g[0] && !p ? NaN : p && g ? 0 * n.s : n.s / 0); for (i = qn(l.e / Rn) + qn(n.e / Rn), a = p.length, h = g.length, h > a && (s = p, p = g, g = s, u = a, a = h, h = u), s = [], u = a + h, t = u; t--;) s.push(0); for (t = h; --t >= 0;) { for (e = 0, r = a + t; r > t;) f = s[r] + g[t] * p[r - t - 1] + e, s[r--] = f % Pn | 0, e = f / Pn | 0; s[r] = (s[r] + e) % Pn | 0 } for (; !s[--u];) s.pop(); for (e ? ++i : s.shift(), t = s.length; !s[--t];) s.pop(); return n.d = s, n.e = c(s, i), bn ? o(n, d.precision, d.rounding) : n }, kn.toBinary = function (n, e) { return y(this, 2, n, e) }, kn.toDecimalPlaces = kn.toDP = function (n, e) { var t = this, r = t.constructor; return t = new r(t), void 0 === n ? t : (i(n, 0, gn), void 0 === e ? e = r.rounding : i(e, 0, 8), o(t, n + t.e + 1, e)) }, kn.toExponential = function (n, e) { var t, r = this, s = r.constructor; return void 0 === n ? t = u(r, !0) : (i(n, 0, gn), void 0 === e ? e = s.rounding : i(e, 0, 8), r = o(new s(r), n + 1, e), t = u(r, !0, n + 1)), r.isNeg() && !r.isZero() ? "-" + t : t }, kn.toFixed = function (n, e) { var t, r, s = this, c = s.constructor; return void 0 === n ? t = u(s) : (i(n, 0, gn), void 0 === e ? e = c.rounding : i(e, 0, 8), r = o(new c(s), n + s.e + 1, e), t = u(r, !1, n + r.e + 1)), s.isNeg() && !s.isZero() ? "-" + t : t }, kn.toFraction = function (n) { var i, t, r, s, o, u, c, f, a, l, d, p, g = this, w = g.d, m = g.constructor; if (!w) return new m(g); if (a = t = new m(1), r = f = new m(0), i = new m(r), o = i.e = h(w) - g.e - 1, u = o % Rn, i.d[0] = On(10, 0 > u ? Rn + u : u), null == n) n = o > 0 ? i : a; else { if (c = new m(n), !c.isInt() || c.lt(a)) throw Error(En + c); n = c.gt(i) ? o > 0 ? i : a : c } for (bn = !1, c = new m(e(w)), l = m.precision, m.precision = o = w.length * Rn * 2; d = Sn(c, i, 0, 1, 1), s = t.plus(d.times(r)), 1 != s.cmp(n) ;) t = r, r = s, s = a, a = f.plus(d.times(s)), f = s, s = i, i = c.minus(d.times(s)), c = s; return s = Sn(n.minus(t), r, 0, 1, 1), f = f.plus(s.times(a)), t = t.plus(s.times(r)), f.s = a.s = g.s, p = Sn(a, r, o, 1).minus(g).abs().cmp(Sn(f, t, o, 1).minus(g).abs()) < 1 ? [a, r] : [f, t], m.precision = l, bn = !0, p }, kn.toHexadecimal = kn.toHex = function (n, e) { return y(this, 16, n, e) }, kn.toNearest = function (n, e) { var t = this, r = t.constructor; if (t = new r(t), null == n) { if (!t.d) return t; n = new r(1), e = r.rounding } else { if (n = new r(n), void 0 !== e && i(e, 0, 8), !t.d) return n.s ? t : n; if (!n.d) return n.s && (n.s = t.s), n } return n.d[0] ? (bn = !1, 4 > e && (e = [4, 5, 7, 8][e]), t = Sn(t, n, 0, e, 1).times(n), bn = !0, o(t)) : (n.s = t.s, t = n), t }, kn.toNumber = function () { return +this }, kn.toOctal = function (n, e) { return y(this, 8, n, e) }, kn.toPower = kn.pow = function (n) { var i, r, s, u, c, f, a, h = this, l = h.constructor, p = +(n = new l(n)); if (!(h.d && n.d && h.d[0] && n.d[0])) return new l(On(+h, p)); if (h = new l(h), h.eq(1)) return h; if (s = l.precision, c = l.rounding, n.eq(1)) return o(h, s, c); if (i = qn(n.e / Rn), r = n.d.length - 1, a = i >= r, f = h.s, a) { if ((r = 0 > p ? -p : p) <= Ln) return u = d(l, h, r, s), n.s < 0 ? new l(1).div(u) : o(u, s, c) } else if (0 > f) return new l(NaN); return f = 0 > f && 1 & n.d[Math.max(i, r)] ? -1 : 1, r = On(+h, p), i = 0 != r && isFinite(r) ? new l(r + "").e : qn(p * (Math.log("0." + e(h.d)) / Math.LN10 + h.e + 1)), i > l.maxE + 1 || i < l.minE - 1 ? new l(i > 0 ? f / 0 : 0) : (bn = !1, l.rounding = h.s = 1, r = Math.min(12, (i + "").length), u = w(n.times(m(h, s + r)), s), u = o(u, s + 5, 1), t(u.d, s, c) && (i = s + 10, u = o(w(n.times(m(h, i + r)), i), i + 5, 1), +e(u.d).slice(s + 1, s + 15) + 1 == 1e14 && (u = o(u, s + 1, 0))), u.s = f, bn = !0, l.rounding = c, o(u, s, c)) }, kn.toPrecision = function (n, e) { var t, r = this, s = r.constructor; return void 0 === n ? t = u(r, r.e <= s.toExpNeg || r.e >= s.toExpPos) : (i(n, 1, gn), void 0 === e ? e = s.rounding : i(e, 0, 8), r = o(new s(r), n, e), t = u(r, n <= r.e || r.e <= s.toExpNeg, n)), r.isNeg() && !r.isZero() ? "-" + t : t }, kn.toSignificantDigits = kn.toSD = function (n, e) { var t = this, r = t.constructor; return void 0 === n ? (n = r.precision, e = r.rounding) : (i(n, 1, gn), void 0 === e ? e = r.rounding : i(e, 0, 8)), o(new r(t), n, e) }, kn.toString = function () { var n = this, e = n.constructor, i = u(n, n.e <= e.toExpNeg || n.e >= e.toExpPos); return n.isNeg() && !n.isZero() ? "-" + i : i }, kn.truncated = kn.trunc = function () { return o(new this.constructor(this), this.e + 1, 1) }, kn.valueOf = kn.toJSON = function () { var n = this, e = n.constructor, i = u(n, n.e <= e.toExpNeg || n.e >= e.toExpPos); return n.isNeg() ? "-" + i : i }; var Sn = function () { function n(n, e, i) { var t, r = 0, s = n.length; for (n = n.slice() ; s--;) t = n[s] * e + r, n[s] = t % i | 0, r = t / i | 0; return r && n.unshift(r), n } function e(n, e, i, t) { var r, s; if (i != t) s = i > t ? 1 : -1; else for (r = s = 0; i > r; r++) if (n[r] != e[r]) { s = n[r] > e[r] ? 1 : -1; break } return s } function i(n, e, i, t) { for (var r = 0; i--;) n[i] -= r, r = n[i] < e[i] ? 1 : 0, n[i] = r * t + n[i] - e[i]; for (; !n[0] && n.length > 1;) n.shift() } return function (t, r, s, u, c, f) { var a, h, l, d, p, g, w, m, v, N, b, x, E, M, y, q, O, F, A, D, Z = t.constructor, P = t.s == r.s ? 1 : -1, R = t.d, L = r.d; if (!(R && R[0] && L && L[0])) return new Z(t.s && r.s && (R ? !L || R[0] != L[0] : L) ? R && 0 == R[0] || !L ? 0 * P : P / 0 : NaN); for (f ? (p = 1, h = t.e - r.e) : (f = Pn, p = Rn, h = qn(t.e / p) - qn(r.e / p)), A = L.length, O = R.length, v = new Z(P), N = v.d = [], l = 0; L[l] == (R[l] || 0) ; l++); if (L[l] > (R[l] || 0) && h--, null == s ? (M = s = Z.precision, u = Z.rounding) : M = c ? s + (t.e - r.e) + 1 : s, 0 > M) N.push(1), g = !0; else { if (M = M / p + 2 | 0, l = 0, 1 == A) { for (d = 0, L = L[0], M++; (O > l || d) && M--; l++) y = d * f + (R[l] || 0), N[l] = y / L | 0, d = y % L | 0; g = d || O > l } else { for (d = f / (L[0] + 1) | 0, d > 1 && (L = n(L, d, f), R = n(R, d, f), A = L.length, O = R.length), q = A, b = R.slice(0, A), x = b.length; A > x;) b[x++] = 0; D = L.slice(), D.unshift(0), F = L[0], L[1] >= f / 2 && ++F; do d = 0, a = e(L, b, A, x), 0 > a ? (E = b[0], A != x && (E = E * f + (b[1] || 0)), d = E / F | 0, d > 1 ? (d >= f && (d = f - 1), w = n(L, d, f), m = w.length, x = b.length, a = e(w, b, m, x), 1 == a && (d--, i(w, m > A ? D : L, m, f))) : (0 == d && (a = d = 1), w = L.slice()), m = w.length, x > m && w.unshift(0), i(b, w, x, f), -1 == a && (x = b.length, a = e(L, b, A, x), 1 > a && (d++, i(b, x > A ? D : L, x, f))), x = b.length) : 0 === a && (d++, b = [0]), N[l++] = d, a && b[0] ? b[x++] = R[q] || 0 : (b = [R[q]], x = 1); while ((q++ < O || void 0 !== b[0]) && M--); g = void 0 !== b[0] } N[0] || N.shift() } if (1 == p) v.e = h, hn = g; else { for (l = 1, d = N[0]; d >= 10; d /= 10) l++; v.e = l + h * p - 1, o(v, c ? s + v.e + 1 : s, u, g) } return v } }(); Nn = I(Nn), mn = new Nn(mn), vn = new Nn(vn), H5.$Decimal = Nn, "function" == typeof define && define.amd ? define("decimal.js", function () { return Nn }) : "undefined" != typeof module && module.exports ? module.exports = Nn["default"] = Nn.Decimal = Nn : (n || (n = "undefined" != typeof self && self && self.self == self ? self : Function("return this")()), ln = n.Decimal, Nn.noConflict = function () { return n.Decimal = ln, Nn }/*, n.Decimal = Nn*/) }(H5.global); - - System.Decimal = function (v, provider, T) { - if (this.constructor !== System.Decimal) { - return new System.Decimal(v, provider, T); - } - - if (v == null) { - v = 0; - } - - if (H5.isNumber(provider)) { - this.$precision = provider; - provider = undefined; - } else { - this.$precision = 0; - } - - if (typeof v === "string") { - provider = provider || System.Globalization.CultureInfo.getCurrentCulture(); - - var nfInfo = provider && provider.getFormat(System.Globalization.NumberFormatInfo), - dot; - - if (nfInfo && nfInfo.numberDecimalSeparator !== ".") { - v = v.replace(nfInfo.numberDecimalSeparator, "."); - } - - // Native .NET accepts the sign in postfixed form. Yet, it is documented otherwise. - // https://docs.microsoft.com/en-us/dotnet/api/system.decimal.parse - // True at least as with: Microsoft (R) Build Engine version 16.1.76+g14b0a930a7 for .NET Framework - if (!/^\s*[+-]?(\d+|\d+\.|\d*\.\d+)((e|E)[+-]?\d+)?\s*$/.test(v) && - !/^\s*(\d+|\d+\.|\d*\.\d+)((e|E)[+-]?\d+)?[+-]\s*$/.test(v)) { - throw new System.FormatException(); - } - - v = v.replace(/\s/g, ""); - - // Move the postfixed - to front, or remove "+" so the underlying - // decimal handler knows what to do with the string. - if (/[+-]$/.test(v)) { - var vlastpos = v.length - 1; - if (v.indexOf("-", vlastpos) === vlastpos) { - v = v.replace(/(.*)(-)$/, "$2$1"); - } else { - v = v.substr(0, vlastpos); - } - } else if (v.lastIndexOf("+", 0) === 0) { - v = v.substr(1); - } - - if (!this.$precision && (dot = v.indexOf(".")) >= 0) { - this.$precision = v.length - dot - 1; - } - } - - if (isNaN(v) || System.Decimal.MaxValue && typeof v === "number" && (System.Decimal.MinValue.gt(v) || System.Decimal.MaxValue.lt(v))) { - throw new System.OverflowException(); - } - - if (T && T.precision && typeof v === "number" && Number.isFinite(v)) { - var i = H5.Int.trunc(v); - var length = (i + "").length; - var p = T.precision - length; - if (p < 0) { - p = 0; - } - v = v.toFixed(p); - } - - if (v instanceof System.Decimal) { - this.$precision = v.$precision; - } - - this.value = System.Decimal.getValue(v); - } - - System.Decimal.$number = true; - System.Decimal.$$name = "System.Decimal"; - System.Decimal.prototype.$$name = "System.Decimal"; - System.Decimal.$kind = "struct"; - System.Decimal.prototype.$kind = "struct"; - System.Decimal.$$inherits = []; - H5.Class.addExtend(System.Decimal, [System.IComparable, System.IFormattable, System.IComparable$1(System.Decimal), System.IEquatable$1(System.Decimal)]); - - System.Decimal.$is = function (instance) { - return instance instanceof System.Decimal; - }; - - System.Decimal.getDefaultValue = function () { - return new System.Decimal(0); - }; - - System.Decimal.getValue = function (d) { - if (!H5.hasValue(d)) { - return this.getDefaultValue(); - } - - if (d instanceof System.Decimal) { - return d.value; - } - - if (d instanceof System.Int64 || d instanceof System.UInt64) { - return new H5.$Decimal(d.toString()); - } - - return new H5.$Decimal(d); - }; - - System.Decimal.create = function (d) { - if (!H5.hasValue(d)) { - return null; - } - - if (d instanceof System.Decimal) { - return d; - } - - return new System.Decimal(d); - }; - - System.Decimal.lift = function (d) { - return d == null ? null : System.Decimal.create(d); - }; - - System.Decimal.prototype.toString = function (format, provider) { - return H5.Int.format(this, format || "G", provider); - }; - - System.Decimal.prototype.toFloat = function () { - return this.value.toNumber(); - }; - - System.Decimal.prototype.toJSON = function () { - return this.value.toNumber(); - }; - - System.Decimal.prototype.format = function (format, provider) { - return H5.Int.format(this, format, provider); - }; - - System.Decimal.prototype.decimalPlaces = function () { - return this.value.decimalPlaces(); - }; - - System.Decimal.prototype.dividedToIntegerBy = function (d) { - var d = new System.Decimal(this.value.dividedToIntegerBy(System.Decimal.getValue(d)), this.$precision); - d.$precision = Math.max(d.value.decimalPlaces(), this.$precision); - return d; - }; - - System.Decimal.prototype.exponential = function () { - return new System.Decimal(this.value.exponential(), this.$precision); - }; - - System.Decimal.prototype.abs = function () { - return new System.Decimal(this.value.abs(), this.$precision); - }; - - System.Decimal.prototype.floor = function () { - return new System.Decimal(this.value.floor()); - }; - - System.Decimal.prototype.ceil = function () { - return new System.Decimal(this.value.ceil()); - }; - - System.Decimal.prototype.trunc = function () { - return new System.Decimal(this.value.trunc()); - }; - - System.Decimal.round = function (obj, mode) { - obj = System.Decimal.create(obj); - - var old = H5.$Decimal.rounding; - - H5.$Decimal.rounding = mode; - - var d = new System.Decimal(obj.value.round()); - - H5.$Decimal.rounding = old; - - return d; - }; - - System.Decimal.toDecimalPlaces = function (obj, decimals, mode) { - obj = System.Decimal.create(obj); - var d = new System.Decimal(obj.value.toDecimalPlaces(decimals, mode)); - return d; - }; - - System.Decimal.prototype.compareTo = function (another) { - return this.value.comparedTo(System.Decimal.getValue(another)); - }; - - System.Decimal.prototype.add = function (another) { - var d = new System.Decimal(this.value.plus(System.Decimal.getValue(another))); - d.$precision = Math.max(d.value.decimalPlaces(), Math.max(another.$precision || 0, this.$precision)); - return d; - }; - - System.Decimal.prototype.sub = function (another) { - var d = new System.Decimal(this.value.minus(System.Decimal.getValue(another))); - d.$precision = Math.max(d.value.decimalPlaces(), Math.max(another.$precision || 0, this.$precision)); - return d; - }; - - System.Decimal.prototype.isZero = function () { - return this.value.isZero; - }; - - System.Decimal.prototype.mul = function (another) { - var d = new System.Decimal(this.value.times(System.Decimal.getValue(another))); - d.$precision = Math.max(d.value.decimalPlaces(), Math.max(another.$precision || 0, this.$precision)); - return d; - }; - - System.Decimal.prototype.div = function (another) { - var d = new System.Decimal(this.value.dividedBy(System.Decimal.getValue(another))); - d.$precision = Math.max(d.value.decimalPlaces(), Math.max(another.$precision || 0, this.$precision)); - return d; - }; - - System.Decimal.prototype.mod = function (another) { - var d = new System.Decimal(this.value.modulo(System.Decimal.getValue(another))); - d.$precision = Math.max(d.value.decimalPlaces(), Math.max(another.$precision || 0, this.$precision)); - return d; - }; - - System.Decimal.prototype.neg = function () { - return new System.Decimal(this.value.negated(), this.$precision); - }; - - System.Decimal.prototype.inc = function () { - return new System.Decimal(this.value.plus(System.Decimal.getValue(1)), this.$precision); - }; - - System.Decimal.prototype.dec = function () { - return new System.Decimal(this.value.minus(System.Decimal.getValue(1)), this.$precision); - }; - - System.Decimal.prototype.sign = function () { - return this.value.isZero() ? 0 : (this.value.isNegative() ? -1 : 1); - }; - - System.Decimal.prototype.clone = function () { - return new System.Decimal(this, this.$precision); - }; - - System.Decimal.prototype.ne = function (v) { - return !!this.compareTo(v); - }; - - System.Decimal.prototype.lt = function (v) { - return this.compareTo(v) < 0; - }; - - System.Decimal.prototype.lte = function (v) { - return this.compareTo(v) <= 0; - }; - - System.Decimal.prototype.gt = function (v) { - return this.compareTo(v) > 0; - }; - - System.Decimal.prototype.gte = function (v) { - return this.compareTo(v) >= 0; - }; - - System.Decimal.prototype.equals = function (v) { - if (v instanceof System.Decimal || typeof v === "number") { - return !this.compareTo(v); - } - - return false; - }; - - System.Decimal.prototype.equalsT = function (v) { - return !this.compareTo(v); - }; - - System.Decimal.prototype.getHashCode = function () { - var n = (this.sign() * 397 + this.value.e) | 0; - - for (var i = 0; i < this.value.d.length; i++) { - n = (n * 397 + this.value.d[i]) | 0; - } - - return n; - }; - - System.Decimal.toInt = function (v, tp) { - if (!v) { - return null; - } - - if (tp) { - var str, - r; - - if (tp === System.Int64) { - str = v.value.trunc().toString(); - r = new System.Int64(str); - - if (str !== r.value.toString()) { - throw new System.OverflowException(); - } - - return r; - } - - if (tp === System.UInt64) { - if (v.value.isNegative()) { - throw new System.OverflowException(); - } - - str = v.value.trunc().toString(); - r = new System.UInt64(str); - - if (str !== r.value.toString()) { - throw new System.OverflowException(); - } - - return r; - } - - return H5.Int.check(H5.Int.trunc(v.value.toNumber()), tp); - } - - var i = H5.Int.trunc(System.Decimal.getValue(v).toNumber()); - - if (!H5.Int.$is(i)) { - throw new System.OverflowException(); - } - - return i; - }; - - System.Decimal.tryParse = function (s, provider, v) { - try { - v.v = new System.Decimal(s, provider); - - return true; - } catch (e) { - v.v = new System.Decimal(0); - - return false; - } - }; - - System.Decimal.toFloat = function (v) { - if (!v) { - return null; - } - - return System.Decimal.getValue(v).toNumber(); - }; - - System.Decimal.setConfig = function (config) { - H5.$Decimal.config(config); - }; - - System.Decimal.min = function () { - var values = [], - d, p; - - for (var i = 0, len = arguments.length; i < len; i++) { - values.push(System.Decimal.getValue(arguments[i])); - } - - d = H5.$Decimal.min.apply(H5.$Decimal, values); - - for (var i = 0; i < arguments.length; i++) { - if (d.eq(values[i])) { - p = arguments[i].$precision; - } - } - - return new System.Decimal(d, p); - }; - - System.Decimal.max = function () { - var values = [], - d, p; - - for (var i = 0, len = arguments.length; i < len; i++) { - values.push(System.Decimal.getValue(arguments[i])); - } - - d = H5.$Decimal.max.apply(H5.$Decimal, values); - - for (var i = 0; i < arguments.length; i++) { - if (d.eq(values[i])) { - p = arguments[i].$precision; - } - } - - return new System.Decimal(d, p); - }; - - System.Decimal.random = function (dp) { - return new System.Decimal(H5.$Decimal.random(dp)); - }; - - System.Decimal.exp = function (d) { - return new System.Decimal(System.Decimal.getValue(d).exp()); - }; - - System.Decimal.exp = function (d) { - return new System.Decimal(System.Decimal.getValue(d).exp()); - }; - - System.Decimal.ln = function (d) { - return new System.Decimal(System.Decimal.getValue(d).ln()); - }; - - System.Decimal.log = function (d, logBase) { - return new System.Decimal(System.Decimal.getValue(d).log(logBase)); - }; - - System.Decimal.pow = function (d, exponent) { - return new System.Decimal(System.Decimal.getValue(d).pow(exponent)); - }; - - System.Decimal.sqrt = function (d) { - return new System.Decimal(System.Decimal.getValue(d).sqrt()); - }; - - System.Decimal.prototype.isFinite = function () { - return this.value.isFinite(); - }; - - System.Decimal.prototype.isInteger = function () { - return this.value.isInteger(); - }; - - System.Decimal.prototype.isNaN = function () { - return this.value.isNaN(); - }; - - System.Decimal.prototype.isNegative = function () { - return this.value.isNegative(); - }; - - System.Decimal.prototype.isZero = function () { - return this.value.isZero(); - }; - - System.Decimal.prototype.log = function (logBase) { - var d = new System.Decimal(this.value.log(logBase)); - d.$precision = Math.max(d.value.decimalPlaces(), this.$precision); - return d; - }; - - System.Decimal.prototype.ln = function () { - var d = new System.Decimal(this.value.ln()); - d.$precision = Math.max(d.value.decimalPlaces(), this.$precision); - return d; - }; - - System.Decimal.prototype.precision = function () { - return this.value.precision(); - }; - - System.Decimal.prototype.round = function () { - var old = H5.$Decimal.rounding, - r; - - H5.$Decimal.rounding = 6; - r = new System.Decimal(this.value.round()); - H5.$Decimal.rounding = old; - - return r; - }; - - System.Decimal.prototype.sqrt = function () { - var d = new System.Decimal(this.value.sqrt()); - d.$precision = Math.max(d.value.decimalPlaces(), this.$precision); - return d; - }; - - System.Decimal.prototype.toDecimalPlaces = function (dp, rm) { - return new System.Decimal(this.value.toDecimalPlaces(dp, rm)); - }; - - System.Decimal.prototype.toExponential = function (dp, rm) { - return this.value.toExponential(dp, rm); - }; - - System.Decimal.prototype.toFixed = function (dp, rm) { - return this.value.toFixed(dp, rm); - }; - - System.Decimal.prototype.pow = function (n) { - var d = new System.Decimal(this.value.pow(n)); - d.$precision = Math.max(d.value.decimalPlaces(), this.$precision); - return d; - }; - - System.Decimal.prototype.toPrecision = function (dp, rm) { - return this.value.toPrecision(dp, rm); - }; - - System.Decimal.prototype.toSignificantDigits = function (dp, rm) { - var d = new System.Decimal(this.value.toSignificantDigits(dp, rm)); - d.$precision = Math.max(d.value.decimalPlaces(), this.$precision); - return d; - }; - - System.Decimal.prototype.valueOf = function () { - return this.value.valueOf(); - }; - - System.Decimal.prototype._toFormat = function (dp, rm, f) { - var x = this.value; - - if (!x.isFinite()) { - return x.toString(); - } - - var i, - isNeg = x.isNeg(), - groupSeparator = f.groupSeparator, - g1 = +f.groupSize, - g2 = +f.secondaryGroupSize, - arr = x.toFixed(dp, rm).split("."), - intPart = arr[0], - fractionPart = arr[1], - intDigits = isNeg ? intPart.slice(1) : intPart, - len = intDigits.length; - - if (g2) { - len -= (i = g1, g1 = g2, g2 = i); - } - - if (g1 > 0 && len > 0) { - i = len % g1 || g1; - intPart = intDigits.substr(0, i); - - for (; i < len; i += g1) { - intPart += groupSeparator + intDigits.substr(i, g1); - } - - if (g2 > 0) { - intPart += groupSeparator + intDigits.slice(i); - } - - if (isNeg) { - intPart = "-" + intPart; - } - } - - return fractionPart - ? intPart + f.decimalSeparator + ((g2 = +f.fractionGroupSize) - ? fractionPart.replace(new RegExp("\\d{" + g2 + "}\\B", "g"), - "$&" + f.fractionGroupSeparator) - : fractionPart) - : intPart; - }; - - System.Decimal.prototype.toFormat = function (dp, rm, provider) { - var config = { - decimalSeparator: ".", - groupSeparator: ",", - groupSize: 3, - secondaryGroupSize: 0, - fractionGroupSeparator: "\xA0", - fractionGroupSize: 0 - }, - d; - - if (provider && !provider.getFormat) { - config = H5.merge(config, provider); - d = this._toFormat(dp, rm, config); - } else { - provider = provider || System.Globalization.CultureInfo.getCurrentCulture(); - - var nfInfo = provider && provider.getFormat(System.Globalization.NumberFormatInfo); - - if (nfInfo) { - config.decimalSeparator = nfInfo.numberDecimalSeparator; - config.groupSeparator = nfInfo.numberGroupSeparator; - config.groupSize = nfInfo.numberGroupSizes[0]; - } - - d = this._toFormat(dp, rm, config); - } - - return d; - }; - - System.Decimal.prototype.getBytes = function () { - var s = this.value.s, - e = this.value.e, - d = this.value.d, - bytes = System.Array.init(23, 0, System.Byte); - - bytes[0] = s & 255; - bytes[1] = e; - - if (d && d.length > 0) { - bytes[2] = d.length * 4; - - for (var i = 0; i < d.length; i++) { - bytes[i * 4 + 3] = d[i] & 255; - bytes[i * 4 + 4] = (d[i] >> 8) & 255; - bytes[i * 4 + 5] = (d[i] >> 16) & 255; - bytes[i * 4 + 6] = (d[i] >> 24) & 255; - } - } else { - bytes[2] = 0; - } - - return bytes; - }; - - System.Decimal.fromBytes = function (bytes) { - var value = new System.Decimal(0), - s = H5.Int.sxb(bytes[0] & 255), - e = bytes[1], - ln = bytes[2], - d = []; - - value.value.s = s; - value.value.e = e; - - if (ln > 0) { - for (var i = 3; i < (ln + 3);) { - d.push(bytes[i] | bytes[i + 1] << 8 | bytes[i + 2] << 16 | bytes[i + 3] << 24); - i = i + 4; - } - } - - value.value.d = d; - - return value; - }; - - H5.$Decimal.config({ precision: 29 }); - - System.Decimal.Zero = System.Decimal(0); - System.Decimal.One = System.Decimal(1); - System.Decimal.MinusOne = System.Decimal(-1); - System.Decimal.MinValue = System.Decimal("-79228162514264337593543950335"); - System.Decimal.MaxValue = System.Decimal("79228162514264337593543950335"); - System.Decimal.precision = 29; - - // @source Date.js - - H5.define("System.DateTime", { - inherits: function () { return [System.IComparable, System.IComparable$1(System.DateTime), System.IEquatable$1(System.DateTime), System.IFormattable]; }, - $kind: "struct", - fields: { - kind: 0 - }, - methods: { - $clone: function (to) { return this; } - }, - statics: { - $minTicks: null, - $maxTicks: null, - $minOffset: null, - $maxOffset: null, - $default: null, - $min: null, - $max: null, - - TicksPerDay: System.Int64(864e9), - - DaysTo1970: 719162, - YearDaysByMonth: [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], - - getMinTicks: function () { - if (this.$minTicks === null) { - this.$minTicks = System.Int64(0); - } - - return this.$minTicks; - }, - - getMaxTicks: function () { - if (this.$maxTicks === null) { - this.$maxTicks = System.Int64("3652059").mul(this.TicksPerDay).sub(1); - } - - return this.$maxTicks; - }, - - // Difference in Ticks from 1-Jan-0001 to 1-Jan-1970 at UTC - $getMinOffset: function () { - if (this.$minOffset === null) { - this.$minOffset = System.Int64(621355968e9); - } - - return this.$minOffset; - }, - - // Difference in Ticks between 1970-01-01 and 100 nanoseconds before 10000-01-01 UTC - $getMaxOffset: function () { - if (this.$maxOffset === null) { - this.$maxOffset = this.getMaxTicks().sub(this.$getMinOffset()); - } - - return this.$maxOffset; - }, - - $is: function (instance) { - return H5.isDate(instance); - }, - - getDefaultValue: function () { - if (this.$default === null) { - this.$default = this.getMinValue(); - } - - return this.$default; - }, - - getMinValue: function () { - if (this.$min === null) { - var d = new Date(1, 0, 1, 0, 0, 0, 0); - - d.setFullYear(1); - d.setSeconds(0); - - d.kind = 0; - d.ticks = this.getMinTicks(); - - this.$min = d; - } - - return this.$min; - }, - - getMaxValue: function () { - if (this.$max === null) { - var d = new Date(9999, 11, 31, 23, 59, 59, 999); - - d.kind = 0; - d.ticks = this.getMaxTicks(); - - this.$max = d; - } - - return this.$max; - }, - - $getTzOffset: function (d) { - // 60 seconds * 1000 milliseconds * 10000 - return System.Int64(d.getTimezoneOffset()).mul(6e8); - }, - - toLocalTime: function (d, throwOnOverflow) { - var kind = (d.kind !== undefined) ? d.kind : 0, - ticks = this.getTicks(d), - d1; - - if (kind === 2) { - d1 = new Date(d.getTime()); - d1.kind = 2; - d1.ticks = ticks; - - return d1; - } - - d1 = new Date(Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds())); - - d1.kind = 2; - d1.ticks = ticks.sub(this.$getTzOffset(d)); - - // Check if Ticks are out of range - if (d1.ticks.gt(this.getMaxTicks()) || d1.ticks.lt(0)) { - if (throwOnOverflow && throwOnOverflow === true) { - throw new System.ArgumentException.$ctor1("Specified argument was out of the range of valid values."); - } else { - d1 = this.create$2(ticks.add(this.$getTzOffset(d1)), 2); - } - } - - return d1; - }, - - toUniversalTime: function (d) { - var kind = (d.kind !== undefined) ? d.kind : 0, - ticks = this.getTicks(d), - d1; - - if (kind === 1) { - d1 = new Date(d.getTime()); - d1.kind = 1; - d1.ticks = ticks; - - return d1; - } - - d1 = new Date(Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds())); - - d1.kind = 1; - d1.ticks = ticks.add(this.$getTzOffset(d)); - - // Check if Ticks are out of range - if (d1.ticks.gt(this.getMaxTicks()) || d1.ticks.lt(0)) { - d1 = this.create$2(ticks.add(this.$getTzOffset(d1)), 1); - } - - return d1; - }, - - // Get the number of ticks since 0001-01-01T00:00:00.0000000 UTC - getTicks: function (d) { - if (d.ticks) { - return d.ticks; - } - - var kind = (d.kind !== undefined) ? d.kind : 0; - - if (kind === 1) { - d.ticks = System.Int64(d.getTime()).mul(10000).add(this.$getMinOffset()); - } else { - d.ticks = System.Int64(d.getTime()).mul(10000).add(this.$getMinOffset()).sub(this.$getTzOffset(d)); - } - - return d.ticks; - }, - - create: function (year, month, day, hour, minute, second, millisecond, kind) { - year = (year !== undefined) ? year : new Date().getFullYear(); - month = (month !== undefined) ? month : new Date().getMonth() + 1; - day = (day !== undefined) ? day : 1; - hour = (hour !== undefined) ? hour : 0; - minute = (minute !== undefined) ? minute : 0; - second = (second !== undefined) ? second : 0; - millisecond = (millisecond !== undefined) ? millisecond : 0; - kind = (kind !== undefined) ? kind : 0; - - var d; - - if (kind === 1) { - d = new Date(Date.UTC(year, month - 1, day, hour, minute, second, millisecond)); - d.setUTCFullYear(year); - } else { - d = new Date(year, month - 1, day, hour, minute, second, millisecond); - d.setFullYear(year); - } - - d.kind = kind; - d.ticks = this.getTicks(d); - - return d; - }, - - create$2: function (ticks, kind) { - ticks = System.Int64.is64Bit(ticks) ? ticks : System.Int64(ticks); - - var d; - - if (ticks.lt(this.TicksPerDay)) { - d = new Date(0); - d.setMilliseconds(d.getMilliseconds() + this.$getTzOffset(d).div(10000).toNumber()); - d.setFullYear(1); - } else { - d = new Date(ticks.sub(this.$getMinOffset()).div(10000).toNumber()); - - if (kind !== 1) { - d.setTime(d.getTime() + (d.getTimezoneOffset() * 60000)); - } - } - - d.kind = (kind !== undefined) ? kind : 0; - d.ticks = ticks; - - return d; - }, - - getToday: function () { - var d = this.getNow() - - d.setHours(0); - d.setMinutes(0); - d.setSeconds(0); - d.setMilliseconds(0); - - return d; - }, - - getNow: function () { - var d = new Date(); - - d.kind = 2; - - return d; - }, - - getUtcNow: function () { - var d = new Date(); - - d.kind = 1; - - return d; - }, - - getTimeOfDay: function (d) { - var dt = this.getDate(d); - - return new System.TimeSpan((d - dt) * 10000); - }, - - getKind: function (d) { - d.kind = (d.kind !== undefined) ? d.kind : 0 - - return d.kind; - }, - - specifyKind: function (d, kind) { - var dt = new Date(d.getTime()); - dt.kind = kind; - dt.ticks = d.ticks !== undefined ? d.ticks : this.getTicks(dt); - - return dt; - }, - - $FileTimeOffset: System.Int64("584388").mul(System.Int64(864e9)), - - FromFileTime: function (fileTime) { - return this.toLocalTime(this.FromFileTimeUtc(fileTime)); - }, - - FromFileTimeUtc: function (fileTime) { - fileTime = System.Int64.is64Bit(fileTime) ? fileTime : System.Int64(fileTime); - - return this.create$2(fileTime.add(this.$FileTimeOffset), 1); - }, - - ToFileTime: function (d) { - return this.ToFileTimeUtc(this.toUniversalTime(d)); - }, - - ToFileTimeUtc: function (d) { - return (this.getKind(d) !== 0) ? this.getTicks(this.toUniversalTime(d)) : this.getTicks(d); - }, - - isUseGenitiveForm: function (format, index, tokenLen, patternToMatch) { - var i, - repeat = 0; - - for (i = index - 1; i >= 0 && format[i] !== patternToMatch; i--) { } - - if (i >= 0) { - while (--i >= 0 && format[i] === patternToMatch) { - repeat++; - } - - if (repeat <= 1) { - return true; - } - } - - for (i = index + tokenLen; i < format.length && format[i] !== patternToMatch; i++) { } - - if (i < format.length) { - repeat = 0; - - while (++i < format.length && format[i] === patternToMatch) { - repeat++; - } - - if (repeat <= 1) { - return true; - } - } - - return false; - }, - - format: function (d, f, p) { - var me = this, - kind = d.kind || 0, - isUtc = (kind === 1 || ["u", "r", "R"].indexOf(f) > -1), - df = (p || System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.DateTimeFormatInfo), - year = isUtc ? d.getUTCFullYear() : d.getFullYear(), - month = isUtc ? d.getUTCMonth() : d.getMonth(), - dayOfMonth = isUtc ? d.getUTCDate() : d.getDate(), - dayOfWeek = isUtc ? d.getUTCDay() : d.getDay(), - hour = isUtc ? d.getUTCHours() : d.getHours(), - minute = isUtc ? d.getUTCMinutes() : d.getMinutes(), - second = isUtc ? d.getUTCSeconds() : d.getSeconds(), - millisecond = isUtc ? d.getUTCMilliseconds() : d.getMilliseconds(), - timezoneOffset = d.getTimezoneOffset(), - formats; - - f = f || "G"; - - if (f.length === 1) { - formats = df.getAllDateTimePatterns(f, true); - f = formats ? formats[0] : f; - } else if (f.length === 2 && f.charAt(0) === "%") { - f = f.charAt(1); - } - - var removeDot = false; - - f = f.replace(/(\\.|'[^']*'|"[^"]*"|d{1,4}|M{1,4}|yyyy|yy|y|HH?|hh?|mm?|ss?|tt?|u|f{1,7}|F{1,7}|K|z{1,3}|\:|\/)/g, - function (match, group, index) { - var part = match; - - switch (match) { - case "dddd": - part = df.dayNames[dayOfWeek]; - - break; - case "ddd": - part = df.abbreviatedDayNames[dayOfWeek]; - - break; - case "dd": - part = dayOfMonth < 10 ? "0" + dayOfMonth : dayOfMonth; - - break; - case "d": - part = dayOfMonth; - - break; - case "MMMM": - if (me.isUseGenitiveForm(f, index, 4, "d")) { - part = df.monthGenitiveNames[month]; - } else { - part = df.monthNames[month]; - } - - break; - case "MMM": - if (me.isUseGenitiveForm(f, index, 3, "d")) { - part = df.abbreviatedMonthGenitiveNames[month]; - } else { - part = df.abbreviatedMonthNames[month]; - } - - break; - case "MM": - part = (month + 1) < 10 ? "0" + (month + 1) : (month + 1); - - break; - case "M": - part = month + 1; - - break; - case "yyyy": - part = ("0000" + year).substring(year.toString().length); - - break; - case "yy": - part = (year % 100).toString(); - - if (part.length === 1) { - part = "0" + part; - } - - break; - case "y": - part = year % 100; - - break; - case "h": - case "hh": - part = hour % 12; - - if (!part) { - part = "12"; - } else if (match === "hh" && part.length === 1) { - part = "0" + part; - } - - break; - case "HH": - part = hour.toString(); - - if (part.length === 1) { - part = "0" + part; - } - - break; - case "H": - part = hour; - break; - case "mm": - part = minute.toString(); - - if (part.length === 1) { - part = "0" + part; - } - - break; - case "m": - part = minute; - - break; - case "ss": - part = second.toString(); - - if (part.length === 1) { - part = "0" + part; - } - - break; - case "s": - part = second; - break; - case "t": - case "tt": - part = (hour < 12) ? df.amDesignator : df.pmDesignator; - - if (match === "t") { - part = part.charAt(0); - } - - break; - case "F": - case "FF": - case "FFF": - case "FFFF": - case "FFFFF": - case "FFFFFF": - case "FFFFFFF": - part = millisecond.toString(); - - if (part.length < 3) { - part = Array(4 - part.length).join("0") + part; - } - - part = part.substr(0, match.length); - - var c = '0', - i = part.length - 1; - - for (; i >= 0 && part.charAt(i) === c; i--); - part = part.substring(0, i + 1); - - removeDot = part.length == 0; - - break; - case "f": - case "ff": - case "fff": - case "ffff": - case "fffff": - case "ffffff": - case "fffffff": - part = millisecond.toString(); - - if (part.length < 3) { - part = Array(4 - part.length).join("0") + part; - } - - var ln = match === "u" ? 7 : match.length; - if (part.length < ln) { - part = part + Array(8 - part.length).join("0"); - } - - part = part.substr(0, ln); - - break; - case "z": - part = timezoneOffset / 60; - part = ((part >= 0) ? "-" : "+") + Math.floor(Math.abs(part)); - - break; - case "K": - case "zz": - case "zzz": - if (kind === 0) { - part = ""; - } else if (kind === 1) { - part = "Z"; - } else { - part = timezoneOffset / 60; - part = ((part > 0) ? "-" : "+") + System.String.alignString(Math.floor(Math.abs(part)).toString(), 2, "0", 2); - - if (match === "zzz" || match === "K") { - part += df.timeSeparator + System.String.alignString(Math.floor(Math.abs(timezoneOffset % 60)).toString(), 2, "0", 2); - } - } - - break; - case ":": - part = df.timeSeparator; - - break; - case "/": - part = df.dateSeparator; - - break; - default: - part = match.substr(1, match.length - 1 - (match.charAt(0) !== "\\")); - - break; - } - - return part; - }); - - if (removeDot) { - if (System.String.endsWith(f, ".")) { - f = f.substring(0, f.length - 1); - } else if (System.String.endsWith(f, ".Z")) { - f = f.substring(0, f.length - 2) + "Z"; - } else if (kind === 2 && f.match(/\.([+-])/g) !== null) { - f = f.replace(/\.([+-])/g, '$1'); - } - } - - return f; - }, - - parse: function (value, provider, utc, silent) { - var d = this.parseExact(value, null, provider, utc, true); - - if (d !== null) { - return d; - } - - d = Date.parse(value); - - if (!isNaN(d)) { - return new Date(d); - } else if (!silent) { - throw new System.FormatException.$ctor1("String does not contain a valid string representation of a date and time."); - } - }, - - parseExact: function (str, format, provider, utc, silent) { - if (!format) { - format = ["G", "g", "F", "f", "D", "d", "R", "r", "s", "S", "U", "u", "O", "o", "Y", "y", "M", "m", "T", "t"]; - } - - if (H5.isArray(format)) { - var j = 0, - d; - - for (j; j < format.length; j++) { - d = this.parseExact(str, format[j], provider, utc, true); - - if (d != null) { - return d; - } - } - - if (silent) { - return null; - } - - throw new System.FormatException.$ctor1("String does not contain a valid string representation of a date and time."); - } else { - // TODO: The code below assumes that there are no quotation marks around the UTC/Z format token (the format patterns - // used by H5 appear to use quotation marks throughout (see universalSortableDateTimePattern), including - // in the recent Newtonsoft.Json.JsonConvert release). - // Until the above is sorted out, manually remove quotation marks to get UTC times parsed correctly. - format = format.replace("'Z'", "Z"); - } - - var now = new Date(), - df = (provider || System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.DateTimeFormatInfo), - am = df.amDesignator, - pm = df.pmDesignator, - idx = 0, - index = 0, - i = 0, - c, - token, - year = now.getFullYear(), - month = now.getMonth() + 1, - date = now.getDate(), - hh = 0, - mm = 0, - ss = 0, - ff = 0, - tt = "", - zzh = 0, - zzm = 0, - zzi, - sign, - neg, - names, - name, - invalid = false, - inQuotes = false, - tokenMatched, - formats, - kind = 0, - adjust = false, - offset = 0; - - if (str == null) { - throw new System.ArgumentNullException.$ctor1("str"); - } - - format = format || "G"; - - if (format.length === 1) { - formats = df.getAllDateTimePatterns(format, true); - format = formats ? formats[0] : format; - } else if (format.length === 2 && format.charAt(0) === "%") { - format = format.charAt(1); - } - - while (index < format.length) { - c = format.charAt(index); - token = ""; - - if (inQuotes === "\\") { - token += c; - index++; - } else { - var nextChar = format.charAt(index + 1); - if (c === '.' && str.charAt(idx) !== c && (nextChar === 'F' || nextChar === 'f')) { - index++; - c = nextChar; - } - - while ((format.charAt(index) === c) && (index < format.length)) { - token += c; - index++; - } - } - - tokenMatched = true; - - if (!inQuotes) { - if (token === "yyyy" || token === "yy" || token === "y") { - if (token === "yyyy") { - year = this.subparseInt(str, idx, 4, 4); - } else if (token === "yy") { - year = this.subparseInt(str, idx, 2, 2); - } else if (token === "y") { - year = this.subparseInt(str, idx, 2, 4); - } - - if (year == null) { - invalid = true; - break; - } - - idx += year.length; - - if (year.length === 2) { - year = ~~year; - year = (year > 30 ? 1900 : 2000) + year; - } - } else if (token === "MMM" || token === "MMMM") { - month = 0; - - if (token === "MMM") { - if (this.isUseGenitiveForm(format, index, 3, "d")) { - names = df.abbreviatedMonthGenitiveNames; - } else { - names = df.abbreviatedMonthNames; - } - } else { - if (this.isUseGenitiveForm(format, index, 4, "d")) { - names = df.monthGenitiveNames; - } else { - names = df.monthNames; - } - } - - for (i = 0; i < names.length; i++) { - name = names[i]; - - if (str.substring(idx, idx + name.length).toLowerCase() === name.toLowerCase()) { - month = (i % 12) + 1; - idx += name.length; - - break; - } - } - - if ((month < 1) || (month > 12)) { - invalid = true; - - break; - } - } else if (token === "MM" || token === "M") { - month = this.subparseInt(str, idx, token.length, 2); - - if (month == null || month < 1 || month > 12) { - invalid = true; - - break; - } - - idx += month.length; - } else if (token === "dddd" || token === "ddd") { - names = token === "ddd" ? df.abbreviatedDayNames : df.dayNames; - - for (i = 0; i < names.length; i++) { - name = names[i]; - - if (str.substring(idx, idx + name.length).toLowerCase() === name.toLowerCase()) { - idx += name.length; - - break; - } - } - } else if (token === "dd" || token === "d") { - date = this.subparseInt(str, idx, token.length, 2); - - if (date == null || date < 1 || date > 31) { - invalid = true; - - break; - } - - idx += date.length; - } else if (token === "hh" || token === "h") { - hh = this.subparseInt(str, idx, token.length, 2); - - if (hh == null || hh < 1 || hh > 12) { - invalid = true; - - break; - } - - idx += hh.length; - } else if (token === "HH" || token === "H") { - hh = this.subparseInt(str, idx, token.length, 2); - - if (hh == null || hh < 0 || hh > 23) { - invalid = true; - - break; - } - - idx += hh.length; - } else if (token === "mm" || token === "m") { - mm = this.subparseInt(str, idx, token.length, 2); - - if (mm == null || mm < 0 || mm > 59) { - return null; - } - - idx += mm.length; - } else if (token === "ss" || token === "s") { - ss = this.subparseInt(str, idx, token.length, 2); - - if (ss == null || ss < 0 || ss > 59) { - invalid = true; - - break; - } - - idx += ss.length; - } else if (token === "u") { - ff = this.subparseInt(str, idx, 1, 7); - - if (ff == null) { - invalid = true; - - break; - } - - idx += ff.length; - - if (ff.length > 3) { - ff = ff.substring(0, 3); - } - } else if (token.match(/f{1,7}/) !== null) { - ff = this.subparseInt(str, idx, token.length, 7); - - if (ff == null) { - invalid = true; - - break; - } - - idx += ff.length; - - if (ff.length > 3) { - ff = ff.substring(0, 3); - } - } else if (token.match(/F{1,7}/) !== null) { - ff = this.subparseInt(str, idx, 0, 7); - - if (ff !== null) { - idx += ff.length; - - if (ff.length > 3) { - ff = ff.substring(0, 3); - } - } - } else if (token === "t") { - if (str.substring(idx, idx + 1).toLowerCase() === am.charAt(0).toLowerCase()) { - tt = am; - } else if (str.substring(idx, idx + 1).toLowerCase() === pm.charAt(0).toLowerCase()) { - tt = pm; - } else { - invalid = true; - - break; - } - - idx += 1; - } else if (token === "tt") { - if (str.substring(idx, idx + 2).toLowerCase() === am.toLowerCase()) { - tt = am; - } else if (str.substring(idx, idx + 2).toLowerCase() === pm.toLowerCase()) { - tt = pm; - } else { - invalid = true; - - break; - } - - idx += 2; - } else if (token === "z" || token === "zz") { - sign = str.charAt(idx); - - if (sign === "-") { - neg = true; - } else if (sign === "+") { - neg = false; - } else { - invalid = true; - - break; - } - - idx++; - - zzh = this.subparseInt(str, idx, 1, 2); - - if (zzh == null || zzh > 14) { - invalid = true; - - break; - } - - idx += zzh.length; - - offset = zzh * 60 * 60 * 1000; - - if (neg) { - offset = -offset; - } - } else if (token === "Z") { - var ch = str.substring(idx, idx + 1); - if (ch === "Z" || ch === "z") { - kind = 1; - idx += 1; - } else { - invalid = true; - } - - break; - - } else if (token === "zzz" || token === "K") { - if (str.substring(idx, idx + 1) === "Z") { - kind = 2; - adjust = true; - idx += 1; - - break; - } - - name = str.substring(idx, idx + 6); - - if (name === "") { - kind = 0; - - break; - } - - idx += name.length; - - if (name.length !== 6 && name.length !== 5) { - invalid = true; - - break; - } - - sign = name.charAt(0); - - if (sign === "-") { - neg = true; - } else if (sign === "+") { - neg = false; - } else { - invalid = true; - - break; - } - - zzi = 1; - zzh = this.subparseInt(name, zzi, 1, name.length === 6 ? 2 : 1); - - if (zzh == null || zzh > 14) { - invalid = true; - - break; - } - - zzi += zzh.length; - - if (name.charAt(zzi) !== df.timeSeparator) { - invalid = true; - - break; - } - - zzi++; - - zzm = this.subparseInt(name, zzi, 1, 2); - - if (zzm == null || zzh > 59) { - invalid = true; - - break; - } - - offset = zzh * 60 * 60 * 1000 + zzm * 60 * 1000; - - if (neg) { - offset = -offset; - } - - kind = 2; - } else { - tokenMatched = false; - } - } - - if (inQuotes || !tokenMatched) { - name = str.substring(idx, idx + token.length); - - if (!inQuotes && name === ":" && (token === df.timeSeparator || token === ":")) { - - } else if ((!inQuotes && ((token === ":" && name !== df.timeSeparator) || (token === "/" && name !== df.dateSeparator))) || (name !== token && token !== "'" && token !== '"' && token !== "\\")) { - invalid = true; - - break; - } - - if (inQuotes === "\\") { - inQuotes = false; - } - - if (token !== "'" && token !== '"' && token !== "\\") { - idx += token.length; - } else { - if (inQuotes === false) { - inQuotes = token; - } else { - if (inQuotes !== token) { - invalid = true; - break; - } - - inQuotes = false; - } - } - } - } - - if (inQuotes) { - invalid = true; - } - - if (!invalid) { - if (idx !== str.length) { - invalid = true; - } else if (month === 2) { - if (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)) { - if (date > 29) { - invalid = true; - } - } else if (date > 28) { - invalid = true; - } - } else if ((month === 4) || (month === 6) || (month === 9) || (month === 11)) { - if (date > 30) { - invalid = true; - } - } - } - - if (invalid) { - if (silent) { - return null; - } - - throw new System.FormatException.$ctor1("String does not contain a valid string representation of a date and time."); - } - - if (tt) { - if (hh < 12 && tt === pm) { - hh = hh - 0 + 12; - } else if (hh > 11 && tt === am) { - hh -= 12; - } - } - - var d = this.create(year, month, date, hh, mm, ss, ff, kind); - - if (kind === 2) { - if (adjust === true) { - d = new Date(d.getTime() - d.getTimezoneOffset() * 60 * 1000); - } else if (offset !== 0) { - d = new Date(d.getTime() - d.getTimezoneOffset() * 60 * 1000); - d = this.addMilliseconds(d, -offset); - } - - d.kind = kind; - } - - return d; - }, - - subparseInt: function (str, index, min, max) { - var x, - token; - - for (x = max; x >= min; x--) { - token = str.substring(index, index + x); - - if (token.length < min) { - return null; - } - - if (/^\d+$/.test(token)) { - return token; - } - } - - return null; - }, - - tryParse: function (value, provider, result, utc) { - result.v = this.parse(value, provider, utc, true); - - if (result.v == null) { - result.v = this.getMinValue(); - - return false; - } - - return true; - }, - - tryParseExact: function (v, f, p, r, utc) { - r.v = this.parseExact(v, f, p, utc, true); - - if (r.v == null) { - r.v = this.getMinValue(); - - return false; - } - - return true; - }, - - isDaylightSavingTime: function (d) { - if (d.kind !== undefined && d.kind === 1) { - return false; - } - - var tmp = new Date(d.getTime()); - - tmp.setMonth(0); - tmp.setDate(1); - - return tmp.getTimezoneOffset() !== d.getTimezoneOffset(); - }, - - dateAddSubTimeSpan: function (d, t, direction) { - var ticks = t.getTicks().mul(direction), - dt = new Date(d.getTime() + ticks.div(10000).toNumber()); - - dt.kind = d.kind; - dt.ticks = this.getTicks(dt); - - return dt; - }, - - subdt: function (d, t) { - return this.dateAddSubTimeSpan(d, t, -1); - }, - - adddt: function (d, t) { - return this.dateAddSubTimeSpan(d, t, 1); - }, - - subdd: function (a, b) { - var offset = 0, - ticksA = this.getTicks(a), - ticksB = this.getTicks(b), - valA = ticksA.toNumber(), - valB = ticksB.toNumber(), - spread = ticksA.sub(ticksB); - - if ((valA === 0 && valB !== 0) || (valB === 0 && valA !== 0)) { - offset = Math.round((spread.toNumberDivided(6e8) - (Math.round(spread.toNumberDivided(9e9)) * 15)) * 6e8); - } - - return new System.TimeSpan(spread.sub(offset)); - }, - - addYears: function (d, v) { - return this.addMonths(d, v * 12); - }, - - addMonths: function (d, v) { - var dt = new Date(d.getTime()), - day = d.getDate(); - - dt.setDate(1); - dt.setMonth(dt.getMonth() + v); - dt.setDate(Math.min(day, this.getDaysInMonth(dt.getFullYear(), dt.getMonth() + 1))); - dt.kind = (d.kind !== undefined) ? d.kind : 0; - dt.ticks = this.getTicks(dt); - - return dt; - }, - - addDays: function (d, v) { - var kind = (d.kind !== undefined) ? d.kind : 0, - dt = new Date(d.getTime()); - - if (kind === 1) { - dt.setUTCDate(dt.getUTCDate() + (Math.floor(v) * 1)); - - if (v % 1 !== 0) { - dt.setUTCMilliseconds(dt.getUTCMilliseconds() + Math.round((v % 1) * 864e5)); - } - } else { - dt.setDate(dt.getDate() + (Math.floor(v) * 1)); - - if (v % 1 !== 0) { - dt.setMilliseconds(dt.getMilliseconds() + Math.round((v % 1) * 864e5)); - } - } - - dt.kind = kind; - dt.ticks = this.getTicks(dt); - - return dt; - }, - - addHours: function (d, v) { - return this.addMilliseconds(d, v * 36e5); - }, - - addMinutes: function (d, v) { - return this.addMilliseconds(d, v * 6e4); - }, - - addSeconds: function (d, v) { - return this.addMilliseconds(d, v * 1e3); - }, - - addMilliseconds: function (d, v) { - var dt = new Date(d.getTime()); - dt.setMilliseconds(dt.getMilliseconds() + v) - dt.kind = (d.kind !== undefined) ? d.kind : 0; - dt.ticks = this.getTicks(dt); - - return dt; - }, - - addTicks: function (d, v) { - v = System.Int64.is64Bit(v) ? v : System.Int64(v); - - var dt = new Date(d.getTime()), - ticks = this.getTicks(d).add(v); - - dt.setMilliseconds(dt.getMilliseconds() + v.div(10000).toNumber()) - dt.ticks = ticks; - dt.kind = (d.kind !== undefined) ? d.kind : 0; - - return dt; - }, - - add: function (d, value) { - return this.addTicks(d, value.getTicks()); - }, - - subtract: function (d, value) { - return this.addTicks(d, value.getTicks().mul(-1)); - }, - - // Replaced leap year calculation for performance: - // https://jsperf.com/leapyear-calculation/1 - getIsLeapYear: function (year) { - if ((year & 3) != 0) { - return false; - } - - return ((year % 100) != 0 || (year % 400) == 0); - }, - - getDaysInMonth: function (year, month) { - return [31, (this.getIsLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1]; - }, - - // Optimized as per: https://jsperf.com/get-day-of-year - getDayOfYear: function (d) { - var dt = this.getDate(d), - mn = dt.getMonth(), - dn = dt.getDate(), - dayOfYear = this.YearDaysByMonth[mn] + dn; - - if (mn > 1 && this.getIsLeapYear(dt.getFullYear())) { - dayOfYear++; - } - - return dayOfYear; - }, - - getDate: function (d) { - var kind = (d.kind !== undefined) ? d.kind : 0, - dt = new Date(d.getTime()); - - if (kind === 1) { - dt.setUTCHours(0); - dt.setUTCMinutes(0); - dt.setUTCSeconds(0); - dt.setUTCMilliseconds(0); - } else { - dt.setHours(0); - dt.setMinutes(0); - dt.setSeconds(0); - dt.setMilliseconds(0); - } - - dt.ticks = this.getTicks(dt); - dt.kind = kind; - - return dt; - }, - - getDayOfWeek: function (d) { - return d.getDay(); - }, - - getYear: function (d) { - var kind = (d.kind !== undefined) ? d.kind : 0, - ticks = this.getTicks(d); - - if (ticks.lt(this.TicksPerDay)) { - return 1; - } - - return kind === 1 ? d.getUTCFullYear() : d.getFullYear(); - }, - - getMonth: function (d) { - var kind = (d.kind !== undefined) ? d.kind : 0, - ticks = this.getTicks(d); - - if (ticks.lt(this.TicksPerDay)) { - return 1; - } - - return kind === 1 ? d.getUTCMonth() + 1 : d.getMonth() + 1; - }, - - getDay: function (d) { - var kind = (d.kind !== undefined) ? d.kind : 0, - ticks = this.getTicks(d); - - if (ticks.lt(this.TicksPerDay)) { - return 1; - } - - return kind === 1 ? d.getUTCDate() : d.getDate(); - }, - - getHour: function (d) { - var kind = (d.kind !== undefined) ? d.kind : 0; - - return kind === 1 ? d.getUTCHours() : d.getHours(); - }, - - getMinute: function (d) { - var kind = (d.kind !== undefined) ? d.kind : 0; - - return kind === 1 ? d.getUTCMinutes() : d.getMinutes(); - }, - - getSecond: function (d) { - return d.getSeconds(); - }, - - getMillisecond: function (d) { - return d.getMilliseconds(); - }, - - gt: function (a, b) { - return (a != null && b != null) ? (this.getTicks(a).gt(this.getTicks(b))) : false; - }, - - gte: function (a, b) { - return (a != null && b != null) ? (this.getTicks(a).gte(this.getTicks(b))) : false; - }, - - lt: function (a, b) { - return (a != null && b != null) ? (this.getTicks(a).lt(this.getTicks(b))) : false; - }, - - lte: function (a, b) { - return (a != null && b != null) ? (this.getTicks(a).lte(this.getTicks(b))) : false; - } - } - }); - - // @source TimeSpan.js - - H5.define("System.TimeSpan", { - inherits: [System.IComparable], - - config: { - alias: [ - "compareTo", ["System$IComparable$compareTo", "System$IComparable$1$compareTo", "System$IComparable$1System$TimeSpan$compareTo"] - ] - }, - - $kind: "struct", - statics: { - fromDays: function (value) { - return new System.TimeSpan(value * 864e9); - }, - - fromHours: function (value) { - return new System.TimeSpan(value * 36e9); - }, - - fromMilliseconds: function (value) { - return new System.TimeSpan(value * 1e4); - }, - - fromMinutes: function (value) { - return new System.TimeSpan(value * 6e8); - }, - - fromSeconds: function (value) { - return new System.TimeSpan(value * 1e7); - }, - - fromTicks: function (value) { - return new System.TimeSpan(value); - }, - - ctor: function () { - this.zero = new System.TimeSpan(System.Int64.Zero); - this.maxValue = new System.TimeSpan(System.Int64.MaxValue); - this.minValue = new System.TimeSpan(System.Int64.MinValue); - }, - - getDefaultValue: function () { - return new System.TimeSpan(System.Int64.Zero); - }, - - neg: function (t) { - return H5.hasValue(t) ? (new System.TimeSpan(t.ticks.neg())) : null; - }, - - sub: function (t1, t2) { - return H5.hasValue$1(t1, t2) ? (new System.TimeSpan(t1.ticks.sub(t2.ticks))) : null; - }, - - eq: function (t1, t2) { - if (t1 === null && t2 === null) { - return true; - } - - return H5.hasValue$1(t1, t2) ? (t1.ticks.eq(t2.ticks)) : false; - }, - - neq: function (t1, t2) { - if (t1 === null && t2 === null) { - return false; - } - - return H5.hasValue$1(t1, t2) ? (t1.ticks.ne(t2.ticks)) : true; - }, - - plus: function (t) { - return H5.hasValue(t) ? (new System.TimeSpan(t.ticks)) : null; - }, - - add: function (t1, t2) { - return H5.hasValue$1(t1, t2) ? (new System.TimeSpan(t1.ticks.add(t2.ticks))) : null; - }, - - gt: function (a, b) { - return H5.hasValue$1(a, b) ? (a.ticks.gt(b.ticks)) : false; - }, - - gte: function (a, b) { - return H5.hasValue$1(a, b) ? (a.ticks.gte(b.ticks)) : false; - }, - - lt: function (a, b) { - return H5.hasValue$1(a, b) ? (a.ticks.lt(b.ticks)) : false; - }, - - lte: function (a, b) { - return H5.hasValue$1(a, b) ? (a.ticks.lte(b.ticks)) : false; - }, - - timeSpanWithDays: /^(\-)?(\d+)[\.|:](\d+):(\d+):(\d+)(\.\d+)?/, - timeSpanNoDays: /^(\-)?(\d+):(\d+):(\d+)(\.\d+)?/, - - parse: function(value) { - var match, - milliseconds; - - function parseMilliseconds(value) { - return value ? parseFloat('0' + value) * 1000 : 0; - } - - if ((match = value.match(System.TimeSpan.timeSpanWithDays))) { - var ts = new System.TimeSpan(match[2], match[3], match[4], match[5], parseMilliseconds(match[6])); - - return match[1] ? new System.TimeSpan(ts.ticks.neg()) : ts; - } - - if ((match = value.match(System.TimeSpan.timeSpanNoDays))) { - var ts = new System.TimeSpan(0, match[2], match[3], match[4], parseMilliseconds(match[5])); - - return match[1] ? new System.TimeSpan(ts.ticks.neg()) : ts; - } - - return null; - }, - - tryParse: function (value, provider, result) { - result.v = this.parse(value); - - if (result.v == null) { - result.v = this.minValue; - - return false; - } - - return true; - } - }, - - ctor: function () { - this.$initialize(); - this.ticks = System.Int64.Zero; - - if (arguments.length === 1) { - this.ticks = arguments[0] instanceof System.Int64 ? arguments[0] : new System.Int64(arguments[0]); - } else if (arguments.length === 3) { - this.ticks = new System.Int64(arguments[0]).mul(60).add(arguments[1]).mul(60).add(arguments[2]).mul(1e7); - } else if (arguments.length === 4) { - this.ticks = new System.Int64(arguments[0]).mul(24).add(arguments[1]).mul(60).add(arguments[2]).mul(60).add(arguments[3]).mul(1e7); - } else if (arguments.length === 5) { - this.ticks = new System.Int64(arguments[0]).mul(24).add(arguments[1]).mul(60).add(arguments[2]).mul(60).add(arguments[3]).mul(1e3).add(arguments[4]).mul(1e4); - } - }, - - TimeToTicks: function (hour, minute, second) { - var totalSeconds = System.Int64(hour).mul("3600").add(System.Int64(minute).mul("60")).add(System.Int64(second)); - return totalSeconds.mul("10000000"); - }, - - getTicks: function () { - return this.ticks; - }, - - getDays: function () { - return this.ticks.div(864e9).toNumber(); - }, - - getHours: function () { - return this.ticks.div(36e9).mod(24).toNumber(); - }, - - getMilliseconds: function () { - return this.ticks.div(1e4).mod(1e3).toNumber(); - }, - - getMinutes: function () { - return this.ticks.div(6e8).mod(60).toNumber(); - }, - - getSeconds: function () { - return this.ticks.div(1e7).mod(60).toNumber(); - }, - - getTotalDays: function () { - return this.ticks.toNumberDivided(864e9); - }, - - getTotalHours: function () { - return this.ticks.toNumberDivided(36e9); - }, - - getTotalMilliseconds: function () { - return this.ticks.toNumberDivided(1e4); - }, - - getTotalMinutes: function () { - return this.ticks.toNumberDivided(6e8); - }, - - getTotalSeconds: function () { - return this.ticks.toNumberDivided(1e7); - }, - - add: function (ts) { - return new System.TimeSpan(this.ticks.add(ts.ticks)); - }, - - subtract: function (ts) { - return new System.TimeSpan(this.ticks.sub(ts.ticks)); - }, - - duration: function () { - return new System.TimeSpan(this.ticks.abs()); - }, - - negate: function () { - return new System.TimeSpan(this.ticks.neg()); - }, - - compareTo: function (other) { - return this.ticks.compareTo(other.ticks); - }, - - equals: function (other) { - return H5.is(other, System.TimeSpan) ? other.ticks.eq(this.ticks) : false; - }, - - equalsT: function (other) { - return other.ticks.eq(this.ticks); - }, - - format: function (formatStr, provider) { - return this.toString(formatStr, provider); - }, - - getHashCode: function () { - return this.ticks.getHashCode(); - }, - - toString: function (formatStr, provider) { - var ticks = this.ticks, - result = "", - me = this, - dtInfo = (provider || System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.DateTimeFormatInfo), - format = function (t, n, dir, cut) { - return System.String.alignString(Math.abs(t | 0).toString(), n || 2, "0", dir || 2, cut || false); - }, - isNeg = ticks < 0; - - if (formatStr) { - return formatStr.replace(/(\\.|'[^']*'|"[^"]*"|dd?|hh?|mm?|ss?|f{1,7}|\:|\/)/g, - function (match, group, index) { - var part = match; - - switch (match) { - case "d": - return me.getDays(); - case "dd": - return format(me.getDays()); - case "h": - return me.getHours(); - case "hh": - return format(me.getHours()); - case "m": - return me.getMinutes(); - case "mm": - return format(me.getMinutes()); - case "s": - return me.getSeconds(); - case "ss": - return format(me.getSeconds()); - case "f": - case "ff": - case "fff": - case "ffff": - case "fffff": - case "ffffff": - case "fffffff": - return format(me.getMilliseconds(), match.length, 1, true); - case ":": - return ":"; - default: - return match.substr(1, match.length - 1 - (match.charAt(0) !== "\\")); - } - } - ); - } - - if (ticks.abs().gte(864e9)) { - result += format(ticks.toNumberDivided(864e9), 1) + "."; - ticks = ticks.mod(864e9); - } - - result += format(ticks.toNumberDivided(36e9)) + ":"; - ticks = ticks.mod(36e9); - result += format(ticks.toNumberDivided(6e8) | 0) + ":"; - ticks = ticks.mod(6e8); - result += format(ticks.toNumberDivided(1e7)); - ticks = ticks.mod(1e7); - - if (ticks.gt(0)) { - result += "." + format(ticks.toNumber(), 7); - } - - return (isNeg ? "-" : "") + result; - } - }); - - H5.Class.addExtend(System.TimeSpan, [System.IComparable$1(System.TimeSpan), System.IEquatable$1(System.TimeSpan)]); - - // @source StringBuilder.js - - H5.define("System.Text.StringBuilder", { - ctor: function () { - this.$initialize(); - this.buffer = [], - this.capacity = 16; - - if (arguments.length === 1) { - this.append(arguments[0]); - } else if (arguments.length === 2) { - this.append(arguments[0]); - this.setCapacity(arguments[1]); - } else if (arguments.length >= 3) { - this.append(arguments[0], arguments[1], arguments[2]); - if (arguments.length === 4) { - this.setCapacity(arguments[3]); - } - } - }, - - getLength: function () { - if (this.buffer.length < 2) { - return this.buffer[0] ? this.buffer[0].length : 0; - } - - var s = this.getString(); - - return s.length; - }, - - setLength: function (value) { - if (value === 0) { - this.clear(); - } else if (value < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("value", "Length cannot be less than zero"); - } else { - var l = this.getLength(); - - if (value === l) { - return; - } - - var delta = value - l; - - if (delta > 0) { - this.append("\0", delta); - } else { - this.remove(l + delta, -delta); - } - } - }, - - getCapacity: function () { - var length = this.getLength(); - - return (this.capacity > length) ? this.capacity : length; - }, - - setCapacity: function (value) { - var length = this.getLength(); - - if (value > length) { - this.capacity = value; - } - }, - - toString: function () { - var s = this.getString(); - - if (arguments.length === 2) { - var startIndex = arguments[0], - length = arguments[1]; - - this.checkLimits(s, startIndex, length); - - return s.substr(startIndex, length); - } - - return s; - }, - - append: function (value) { - if (value == null) { - return this; - } - - if (arguments.length === 2) { - // append a char repeated count times - var count = arguments[1]; - - if (count === 0) { - return this; - } else if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "cannot be less than zero"); - } - - value = Array(count + 1).join(value).toString(); - } else if (arguments.length === 3) { - // append a (startIndex, count) substring of value - var startIndex = arguments[1], - count = arguments[2]; - - if (count === 0) { - return this; - } - - this.checkLimits(value, startIndex, count); - value = value.substr(startIndex, count); - } - - this.buffer[this.buffer.length] = value; - this.clearString(); - - return this; - }, - - appendFormat: function (format) { - return this.append(System.String.format.apply(System.String, arguments)); - }, - - clear: function () { - this.buffer = []; - this.clearString(); - - return this; - }, - - appendLine: function () { - if (arguments.length === 1) { - this.append(arguments[0]); - } - - return this.append("\r\n"); - }, - - equals: function (sb) { - if (sb == null) { - return false; - } - - if (sb === this) { - return true; - } - - return this.toString() === sb.toString(); - }, - - remove: function (startIndex, length) { - var s = this.getString(); - - this.checkLimits(s, startIndex, length); - - if (s.length === length && startIndex === 0) { - // Optimization. If we are deleting everything - return this.clear(); - } - - if (length > 0) { - this.buffer = []; - this.buffer[0] = s.substring(0, startIndex); - this.buffer[1] = s.substring(startIndex + length, s.length); - this.clearString(); - } - - return this; - }, - - insert: function (index, value) { - if (value == null) { - return this; - } - - if (arguments.length === 3) { - // insert value repeated count times - var count = arguments[2]; - - if (count === 0) { - return this; - } else if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "cannot be less than zero"); - } - - value = Array(count + 1).join(value).toString(); - } - - var s = this.getString(); - - this.buffer = []; - - if (index < 1) { - this.buffer[0] = value; - this.buffer[1] = s; - } else if (index >= s.length) { - this.buffer[0] = s; - this.buffer[1] = value; - } else { - this.buffer[0] = s.substring(0, index); - this.buffer[1] = value; - this.buffer[2] = s.substring(index, s.length); - } - - this.clearString(); - - return this; - }, - - replace: function (oldValue, newValue) { - var r = new RegExp(oldValue, "g"), - s = this.buffer.join(""); - - this.buffer = []; - - if (arguments.length === 4) { - var startIndex = arguments[2], - count = arguments[3], - b = s.substr(startIndex, count); - - this.checkLimits(s, startIndex, count); - - this.buffer[0] = s.substring(0, startIndex); - this.buffer[1] = b.replace(r, newValue); - this.buffer[2] = s.substring(startIndex + count, s.length); - } else { - this.buffer[0] = s.replace(r, newValue); - } - - this.clearString(); - return this; - }, - - checkLimits: function (value, startIndex, length) { - if (length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("length", "must be non-negative"); - } - - if (startIndex < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("startIndex", "startIndex cannot be less than zero"); - } - - if (length > value.length - startIndex) { - throw new System.ArgumentOutOfRangeException.$ctor4("Index and length must refer to a location within the string"); - } - }, - - clearString: function () { - this.$str = null; - }, - - getString: function () { - if (!this.$str) { - this.$str = this.buffer.join(""); - this.buffer = []; - this.buffer[0] = this.$str; - } - - return this.$str; - }, - - getChar: function (index) { - var str = this.getString(); - - if (index < 0 || index >= str.length) { - throw new System.IndexOutOfRangeException(); - } - - return str.charCodeAt(index); - }, - - setChar: function (index, value) { - var str = this.getString(); - - if (index < 0 || index >= str.length) { - throw new System.ArgumentOutOfRangeException(); - } - - value = String.fromCharCode(value); - this.buffer = []; - this.buffer[0] = str.substring(0, index); - this.buffer[1] = value; - this.buffer[2] = str.substring(index + 1, str.length); - this.clearString(); - } - }); - - // @source H5Regex.js - - (function () { - var specials = [ - // order matters for these - "-" - , "[" - , "]" - // order doesn't matter for any of these - , "/" - , "{" - , "}" - , "(" - , ")" - , "*" - , "+" - , "?" - , "." - , "\\" - , "^" - , "$" - , "|" - ], - - regex = RegExp("[" + specials.join("\\") + "]", "g"), - - regexpEscape = function (s) { - return s.replace(regex, "\\$&"); - }; - - H5.regexpEscape = regexpEscape; - })(); - - // @source DebugAssertException.js - - H5.define("System.Diagnostics.Debug.DebugAssertException", { - inherits: [System.Exception], - $kind: "nested class", - ctors: { - ctor: function (message, detailMessage, stackTrace) { - this.$initialize(); - System.Exception.ctor.call(this, (message || "") + ("\n" || "") + (detailMessage || "") + ("\n" || "") + (stackTrace || "")); - } - } - }); - - // @source Debug.js - - H5.define("System.Diagnostics.Debug", { - statics: { - fields: { - s_lock: null, - s_indentLevel: 0, - s_indentSize: 0, - s_needIndent: false, - s_indentString: null, - s_ShowAssertDialog: null, - s_WriteCore: null, - s_shouldWriteToStdErr: false - }, - props: { - AutoFlush: { - get: function () { - return true; - }, - set: function (value) { } - }, - IndentLevel: { - get: function () { - return System.Diagnostics.Debug.s_indentLevel; - }, - set: function (value) { - System.Diagnostics.Debug.s_indentLevel = value < 0 ? 0 : value; - } - }, - IndentSize: { - get: function () { - return System.Diagnostics.Debug.s_indentSize; - }, - set: function (value) { - System.Diagnostics.Debug.s_indentSize = value < 0 ? 0 : value; - } - } - }, - ctors: { - init: function () { - this.s_lock = { }; - this.s_indentSize = 4; - this.s_ShowAssertDialog = System.Diagnostics.Debug.ShowAssertDialog; - this.s_WriteCore = System.Diagnostics.Debug.WriteCore; - this.s_shouldWriteToStdErr = H5.referenceEquals(System.Environment.GetEnvironmentVariable("COMPlus_DebugWriteToStdErr"), "1"); - } - }, - methods: { - Close: function () { }, - Flush: function () { }, - Indent: function () { - System.Diagnostics.Debug.IndentLevel = (System.Diagnostics.Debug.IndentLevel + 1) | 0; - }, - Unindent: function () { - System.Diagnostics.Debug.IndentLevel = (System.Diagnostics.Debug.IndentLevel - 1) | 0; - }, - Print: function (message) { - System.Diagnostics.Debug.Write$2(message); - }, - Print$1: function (format, args) { - if (args === void 0) { args = []; } - System.Diagnostics.Debug.Write$2(System.String.formatProvider.apply(System.String, [null, format].concat(args))); - }, - Assert: function (condition) { - System.Diagnostics.Debug.Assert$2(condition, "", ""); - }, - Assert$1: function (condition, message) { - System.Diagnostics.Debug.Assert$2(condition, message, ""); - }, - Assert$2: function (condition, message, detailMessage) { - if (!condition) { - var stackTrace; - - try { - throw System.NotImplemented.ByDesign; - } catch ($e1) { - $e1 = System.Exception.create($e1); - stackTrace = ""; - } - - System.Diagnostics.Debug.WriteLine$2(System.Diagnostics.Debug.FormatAssert(stackTrace, message, detailMessage)); - System.Diagnostics.Debug.s_ShowAssertDialog(stackTrace, message, detailMessage); - } - }, - Assert$3: function (condition, message, detailMessageFormat, args) { - if (args === void 0) { args = []; } - System.Diagnostics.Debug.Assert$2(condition, message, System.String.format.apply(System.String, [detailMessageFormat].concat(args))); - }, - Fail: function (message) { - System.Diagnostics.Debug.Assert$2(false, message, ""); - }, - Fail$1: function (message, detailMessage) { - System.Diagnostics.Debug.Assert$2(false, message, detailMessage); - }, - FormatAssert: function (stackTrace, message, detailMessage) { - var newLine = (System.Diagnostics.Debug.GetIndentString() || "") + ("\n" || ""); - return "---- DEBUG ASSERTION FAILED ----" + (newLine || "") + "---- Assert Short Message ----" + (newLine || "") + (message || "") + (newLine || "") + "---- Assert Long Message ----" + (newLine || "") + (detailMessage || "") + (newLine || "") + (stackTrace || ""); - }, - WriteLine$2: function (message) { - System.Diagnostics.Debug.Write$2((message || "") + ("\n" || "")); - }, - WriteLine: function (value) { - System.Diagnostics.Debug.WriteLine$2(value != null ? H5.toString(value) : null); - }, - WriteLine$1: function (value, category) { - System.Diagnostics.Debug.WriteLine$4(value != null ? H5.toString(value) : null, category); - }, - WriteLine$3: function (format, args) { - if (args === void 0) { args = []; } - System.Diagnostics.Debug.WriteLine$2(System.String.formatProvider.apply(System.String, [null, format].concat(args))); - }, - WriteLine$4: function (message, category) { - if (category == null) { - System.Diagnostics.Debug.WriteLine$2(message); - } else { - System.Diagnostics.Debug.WriteLine$2((category || "") + ":" + (message || "")); - } - }, - Write$2: function (message) { - System.Diagnostics.Debug.s_lock; - { - if (message == null) { - System.Diagnostics.Debug.s_WriteCore(""); - return; - } - if (System.Diagnostics.Debug.s_needIndent) { - message = (System.Diagnostics.Debug.GetIndentString() || "") + (message || ""); - System.Diagnostics.Debug.s_needIndent = false; - } - System.Diagnostics.Debug.s_WriteCore(message); - if (System.String.endsWith(message, "\n")) { - System.Diagnostics.Debug.s_needIndent = true; - } - } - }, - Write: function (value) { - System.Diagnostics.Debug.Write$2(value != null ? H5.toString(value) : null); - }, - Write$3: function (message, category) { - if (category == null) { - System.Diagnostics.Debug.Write$2(message); - } else { - System.Diagnostics.Debug.Write$2((category || "") + ":" + (message || "")); - } - }, - Write$1: function (value, category) { - System.Diagnostics.Debug.Write$3(value != null ? H5.toString(value) : null, category); - }, - WriteIf$2: function (condition, message) { - if (condition) { - System.Diagnostics.Debug.Write$2(message); - } - }, - WriteIf: function (condition, value) { - if (condition) { - System.Diagnostics.Debug.Write(value); - } - }, - WriteIf$3: function (condition, message, category) { - if (condition) { - System.Diagnostics.Debug.Write$3(message, category); - } - }, - WriteIf$1: function (condition, value, category) { - if (condition) { - System.Diagnostics.Debug.Write$1(value, category); - } - }, - WriteLineIf: function (condition, value) { - if (condition) { - System.Diagnostics.Debug.WriteLine(value); - } - }, - WriteLineIf$1: function (condition, value, category) { - if (condition) { - System.Diagnostics.Debug.WriteLine$1(value, category); - } - }, - WriteLineIf$2: function (condition, message) { - if (condition) { - System.Diagnostics.Debug.WriteLine$2(message); - } - }, - WriteLineIf$3: function (condition, message, category) { - if (condition) { - System.Diagnostics.Debug.WriteLine$4(message, category); - } - }, - GetIndentString: function () { - var $t; - var indentCount = H5.Int.mul(System.Diagnostics.Debug.IndentSize, System.Diagnostics.Debug.IndentLevel); - if (System.Nullable.eq((System.Diagnostics.Debug.s_indentString != null ? System.Diagnostics.Debug.s_indentString.length : null), indentCount)) { - return System.Diagnostics.Debug.s_indentString; - } - return ($t = System.String.fromCharCount(32, indentCount), System.Diagnostics.Debug.s_indentString = $t, $t); - }, - ShowAssertDialog: function (stackTrace, message, detailMessage) { - if (System.Diagnostics.Debugger.IsAttached) { - debugger; - } else { - var ex = new System.Diagnostics.Debug.DebugAssertException(message, detailMessage, stackTrace); - System.Environment.FailFast$1(ex.Message, ex); - } - }, - WriteCore: function (message) { - System.Diagnostics.Debug.WriteToDebugger(message); - - if (System.Diagnostics.Debug.s_shouldWriteToStdErr) { - System.Diagnostics.Debug.WriteToStderr(message); - } - }, - WriteToDebugger: function (message) { - if (System.Diagnostics.Debugger.IsLogging()) { - System.Diagnostics.Debugger.Log(0, null, message); - } else { - System.Console.WriteLine(message); - - } - }, - WriteToStderr: function (message) { - System.Console.WriteLine(message); - - - - - - - - } - } - } - }); - - // @source Debugger.js - - H5.define("System.Diagnostics.Debugger", { - statics: { - fields: { - DefaultCategory: null - }, - props: { - IsAttached: { - get: function () { - return true; - } - } - }, - methods: { - IsLogging: function () { - return true; - }, - Launch: function () { - return true; - }, - Log: function (level, category, message) { }, - NotifyOfCrossThreadDependency: function () { } - } - } - }); - - // @source Diagnostics.js - - H5.define("System.Diagnostics.Stopwatch", { - ctor: function () { - this.$initialize(); - this.reset(); - }, - - start: function () { - if (this.isRunning) { - return; - } - - this._startTime = System.Diagnostics.Stopwatch.getTimestamp(); - this.isRunning = true; - }, - - stop: function () { - if (!this.isRunning) { - return; - } - - var endTimeStamp = System.Diagnostics.Stopwatch.getTimestamp(); - var elapsedThisPeriod = endTimeStamp.sub(this._startTime); - this._elapsed = this._elapsed.add(elapsedThisPeriod); - this.isRunning = false; - }, - - reset: function () { - this._startTime = System.Int64.Zero; - this._elapsed = System.Int64.Zero; - this.isRunning = false; - }, - - restart: function () { - this.isRunning = false; - this._elapsed = System.Int64.Zero; - this._startTime = System.Diagnostics.Stopwatch.getTimestamp(); - this.start(); - }, - - ticks: function () { - var timeElapsed = this._elapsed; - - if (this.isRunning) - { - var currentTimeStamp = System.Diagnostics.Stopwatch.getTimestamp(); - var elapsedUntilNow = currentTimeStamp.sub(this._startTime); - - timeElapsed = timeElapsed.add(elapsedUntilNow); - } - - return timeElapsed; - }, - - milliseconds: function () { - return this.ticks().mul(1000).div(System.Diagnostics.Stopwatch.frequency); - }, - - timeSpan: function () { - return new System.TimeSpan(this.milliseconds().mul(10000)); - }, - - statics: { - startNew: function () { - var s = new System.Diagnostics.Stopwatch(); - s.start(); - - return s; - } - } - }); - -if (typeof window !== 'undefined' && window.performance && window.performance.now) { - System.Diagnostics.Stopwatch.frequency = new System.Int64(1e6); - System.Diagnostics.Stopwatch.isHighResolution = true; - System.Diagnostics.Stopwatch.getTimestamp = function () { - return new System.Int64(Math.round(window.performance.now() * 1000)); - }; - } else if (typeof (process) !== "undefined" && process.hrtime) { - System.Diagnostics.Stopwatch.frequency = new System.Int64(1e9); - System.Diagnostics.Stopwatch.isHighResolution = true; - System.Diagnostics.Stopwatch.getTimestamp = function () { - var hr = process.hrtime(); - return new System.Int64(hr[0]).mul(1e9).add(hr[1]); - }; - } else { - System.Diagnostics.Stopwatch.frequency = new System.Int64(1e3); - System.Diagnostics.Stopwatch.isHighResolution = false; - System.Diagnostics.Stopwatch.getTimestamp = function () { - return new System.Int64(new Date().valueOf()); - }; - } - - System.Diagnostics.Contracts.Contract = { - reportFailure: function (failureKind, userMessage, condition, innerException, TException) { - var conditionText = condition.toString(); - - conditionText = conditionText.substring(conditionText.indexOf("return") + 7); - conditionText = conditionText.substr(0, conditionText.lastIndexOf(";")); - - var failureMessage = (conditionText) ? "Contract '" + conditionText + "' failed" : "Contract failed", - displayMessage = (userMessage) ? failureMessage + ": " + userMessage : failureMessage; - - if (TException) { - throw new TException(conditionText, userMessage); - } else { - throw new System.Diagnostics.Contracts.ContractException(failureKind, displayMessage, userMessage, conditionText, innerException); - } - }, - assert: function (failureKind, scope, condition, message) { - if (!condition.call(scope)) { - System.Diagnostics.Contracts.Contract.reportFailure(failureKind, message, condition, null); - } - }, - requires: function (TException, scope, condition, message) { - if (!condition.call(scope)) { - System.Diagnostics.Contracts.Contract.reportFailure(0, message, condition, null, TException); - } - }, - forAll: function (fromInclusive, toExclusive, predicate) { - if (!predicate) { - throw new System.ArgumentNullException.$ctor1("predicate"); - } - - for (; fromInclusive < toExclusive; fromInclusive++) { - if (!predicate(fromInclusive)) { - return false; - } - } - - return true; - }, - forAll$1: function (collection, predicate) { - if (!collection) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - - if (!predicate) { - throw new System.ArgumentNullException.$ctor1("predicate"); - } - - var enumerator = H5.getEnumerator(collection); - - try { - while (enumerator.moveNext()) { - if (!predicate(enumerator.Current)) { - return false; - } - } - - return true; - } finally { - enumerator.Dispose(); - } - }, - exists: function (fromInclusive, toExclusive, predicate) { - if (!predicate) { - throw new System.ArgumentNullException.$ctor1("predicate"); - } - - for (; fromInclusive < toExclusive; fromInclusive++) { - if (predicate(fromInclusive)) { - return true; - } - } - - return false; - }, - exists$1: function (collection, predicate) { - if (!collection) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - - if (!predicate) { - throw new System.ArgumentNullException.$ctor1("predicate"); - } - - var enumerator = H5.getEnumerator(collection); - - try { - while (enumerator.moveNext()) { - if (predicate(enumerator.Current)) { - return true; - } - } - - return false; - } finally { - enumerator.Dispose(); - } - } - }; - - H5.define("System.Diagnostics.Contracts.ContractFailureKind", { - $kind: "enum", - $statics: { - precondition: 0, - postcondition: 1, - postconditionOnException: 2, - invarian: 3, - assert: 4, - assume: 5 - } - }); - - H5.define("System.Diagnostics.Contracts.ContractException", { - inherits: [System.Exception], - - config: { - properties: { - Kind: { - get: function () { - return this._kind; - } - }, - - Failure: { - get: function () { - return this._failureMessage; - } - }, - - UserMessage: { - get: function () { - return this._userMessage; - } - }, - - Condition: { - get: function () { - return this._condition; - } - } - } - }, - - ctor: function (failureKind, failureMessage, userMessage, condition, innerException) { - this.$initialize(); - System.Exception.ctor.call(this, failureMessage, innerException); - this._kind = failureKind; - this._failureMessage = failureMessage || null; - this._userMessage = userMessage || null; - this._condition = condition || null; - } - }); - - // @source Array.js - - var array = { - toIndex: function (arr, indices) { - if (indices.length !== (arr.$s ? arr.$s.length : 1)) { - throw new System.ArgumentException.$ctor1("Invalid number of indices"); - } - - if (indices[0] < 0 || indices[0] >= (arr.$s ? arr.$s[0] : arr.length)) { - throw new System.IndexOutOfRangeException.$ctor1("Index 0 out of range"); - } - - var idx = indices[0], - i; - - if (arr.$s) { - for (i = 1; i < arr.$s.length; i++) { - if (indices[i] < 0 || indices[i] >= arr.$s[i]) { - throw new System.IndexOutOfRangeException.$ctor1("Index " + i + " out of range"); - } - - idx = idx * arr.$s[i] + indices[i]; - } - } - - return idx; - }, - - index: function (index, arr) { - if (index < 0 || index >= arr.length) { - throw new System.IndexOutOfRangeException(); - } - return index; - }, - - $get: function (indices) { - var r = this[System.Array.toIndex(this, indices)]; - - return typeof r !== "undefined" ? r : this.$v; - }, - - get: function (arr) { - if (arguments.length < 2) { - throw new System.ArgumentNullException.$ctor1("indices"); - } - - var idx = Array.prototype.slice.call(arguments, 1); - - for (var i = 0; i < idx.length; i++) { - if (!H5.hasValue(idx[i])) { - throw new System.ArgumentNullException.$ctor1("indices"); - } - } - - var r = arr[System.Array.toIndex(arr, idx)]; - - return typeof r !== "undefined" ? r : arr.$v; - }, - - $set: function (indices, value) { - this[System.Array.toIndex(this, indices)] = value; - }, - - set: function (arr, value) { - var indices = Array.prototype.slice.call(arguments, 2); - - arr[System.Array.toIndex(arr, indices)] = value; - }, - - getLength: function (arr, dimension) { - if (dimension < 0 || dimension >= (arr.$s ? arr.$s.length : 1)) { - throw new System.IndexOutOfRangeException(); - } - - return arr.$s ? arr.$s[dimension] : arr.length; - }, - - getRank: function (arr) { - return arr.$type ? arr.$type.$rank : (arr.$s ? arr.$s.length : 1); - }, - - getLower: function (arr, d) { - System.Array.getLength(arr, d); - - return 0; - }, - - create: function (defvalue, initValues, T, sizes) { - if (sizes === null) { - throw new System.ArgumentNullException.$ctor1("length"); - } - - var arr = [], - length = arguments.length > 3 ? 1 : 0, - i, s, v, j, - idx, - indices, - flatIdx; - - arr.$v = defvalue; - arr.$s = []; - arr.get = System.Array.$get; - arr.set = System.Array.$set; - - if (sizes && H5.isArray(sizes)) { - for (i = 0; i < sizes.length; i++) { - j = sizes[i]; - - if (isNaN(j) || j < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("length"); - } - - length *= j; - arr.$s[i] = j; - } - } else { - for (i = 3; i < arguments.length; i++) { - j = arguments[i]; - - if (isNaN(j) || j < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("length"); - } - - length *= j; - arr.$s[i - 3] = j; - } - } - - arr.length = length; - var isFn = H5.isFunction(defvalue); - - if (isFn) { - var v = defvalue(); - - if (!v || (!v.$kind && typeof v !== "object")) { - isFn = false; - defvalue = v; - } - } - - for (var k = 0; k < length; k++) { - arr[k] = isFn ? defvalue() : defvalue; - } - - if (initValues) { - for (i = 0; i < arr.length; i++) { - indices = []; - flatIdx = i; - - for (s = arr.$s.length - 1; s >= 0; s--) { - idx = flatIdx % arr.$s[s]; - indices.unshift(idx); - flatIdx = H5.Int.div(flatIdx - idx, arr.$s[s]); - } - - v = initValues; - - for (idx = 0; idx < indices.length; idx++) { - v = v[indices[idx]]; - } - - arr[i] = v; - } - } - - System.Array.init(arr, T, arr.$s.length); - - return arr; - }, - - init: function (length, value, T, addFn) { - if (length == null) { - throw new System.ArgumentNullException.$ctor1("length"); - } - - if (H5.isArray(length)) { - var elementType = value, - rank = T || 1; - - System.Array.type(elementType, rank, length); - - return length; - } - - if (isNaN(length) || length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("length"); - } - - var arr = new Array(length), - isFn = addFn !== true && H5.isFunction(value); - - if (isFn) { - var v = value(); - - if (!v || (!v.$kind && typeof v !== "object")) { - isFn = false; - value = v; - } - } - - for (var i = 0; i < length; i++) { - arr[i] = isFn ? value() : value; - } - - return System.Array.init(arr, T, 1); - }, - - toEnumerable: function (array) { - return new H5.ArrayEnumerable(array); - }, - - toEnumerator: function (array, T) { - return new H5.ArrayEnumerator(array, T); - }, - - _typedArrays: { - Float32Array: System.Single, - Float64Array: System.Double, - Int8Array: System.SByte, - Int16Array: System.Int16, - Int32Array: System.Int32, - Uint8Array: System.Byte, - Uint8ClampedArray: System.Byte, - Uint16Array: System.UInt16, - Uint32Array: System.UInt32 - }, - - is: function (obj, type) { - if (obj instanceof H5.ArrayEnumerator) { - if ((obj.constructor === type) || (obj instanceof type) || - type === H5.ArrayEnumerator || - type.$$name && System.String.startsWith(type.$$name, "System.Collections.IEnumerator") || - type.$$name && System.String.startsWith(type.$$name, "System.Collections.Generic.IEnumerator")) { - return true; - } - - return false; - } - - if (!H5.isArray(obj)) { - return false; - } - - if (type.$elementType && type.$isArray) { - var et = H5.getType(obj).$elementType; - - if (et) { - - if (H5.Reflection.isValueType(et) !== H5.Reflection.isValueType(type.$elementType)) { - return false; - } - - return System.Array.getRank(obj) === type.$rank && H5.Reflection.isAssignableFrom(type.$elementType, et); - } - - type = Array; - } - - if ((obj.constructor === type) || (obj instanceof type)) { - return true; - } - - if (type === System.Collections.IEnumerable || - type === System.Collections.ICollection || - type === System.ICloneable || - type === System.Collections.IList || - type.$$name && System.String.startsWith(type.$$name, "System.Collections.Generic.IEnumerable$1") || - type.$$name && System.String.startsWith(type.$$name, "System.Collections.Generic.ICollection$1") || - type.$$name && System.String.startsWith(type.$$name, "System.Collections.Generic.IList$1") || - type.$$name && System.String.startsWith(type.$$name, "System.Collections.Generic.IReadOnlyCollection$1") || - type.$$name && System.String.startsWith(type.$$name, "System.Collections.Generic.IReadOnlyList$1")) { - return true; - } - - var isTypedArray = !!System.Array._typedArrays[String.prototype.slice.call(Object.prototype.toString.call(obj), 8, -1)]; - - if (isTypedArray && !!System.Array._typedArrays[type.name]) { - return obj instanceof type; - } - - return isTypedArray; - }, - - clone: function (arr) { - var newArr; - - if (arr.length === 1) { - newArr = [arr[0]]; - } else { - newArr = arr.slice(0); - } - - newArr.$type = arr.$type; - newArr.$v = arr.$v; - newArr.$s = arr.$s; - newArr.get = System.Array.$get; - newArr.set = System.Array.$set; - - return newArr; - }, - - getCount: function (obj, T) { - var name, - v; - - if (H5.isArray(obj)) { - return obj.length; - } else if (T && H5.isFunction(obj[name = "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$getCount"])) { - return obj[name](); - } else if (T && H5.isFunction(obj[name = "System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(T) + "$getCount"])) { - return obj[name](); - } else if (H5.isFunction(obj[name = "System$Collections$ICollection$getCount"])) { - return obj[name](); - } else if (T && (v = obj["System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$Count"]) !== undefined) { - return v; - } else if (T && (v = obj["System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(T) + "$Count"]) !== undefined) { - return v; - } else if ((v = obj["System$Collections$ICollection$Count"]) !== undefined) { - return v; - } else if ((v = obj.Count) !== undefined) { - return v; - } else if (H5.isFunction(obj.getCount)) { - return obj.getCount(); - } - - return 0; - }, - - getIsReadOnly: function (obj, T) { - var name, - v; - - if (H5.isArray(obj)) { - return T ? true : false; - } else if (T && H5.isFunction(obj[name = "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$getIsReadOnly"])) { - return obj[name](); - } else if (T && (v = obj["System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$IsReadOnly"]) !== undefined) { - return v; - } else if (H5.isFunction(obj[name = "System$Collections$IList$getIsReadOnly"])) { - return obj[name](); - } else if ((v = obj["System$Collections$IList$IsReadOnly"]) !== undefined) { - return v; - } else if ((v = obj.IsReadOnly) !== undefined) { - return v; - } else if (H5.isFunction(obj.getIsReadOnly)) { - return obj.getIsReadOnly(); - } - - return false; - }, - - checkReadOnly: function (obj, T, msg) { - if (H5.isArray(obj)) { - if (T) { - throw new System.NotSupportedException.$ctor1(msg || "Collection was of a fixed size."); - } - } else if (System.Array.getIsReadOnly(obj, T)) { - throw new System.NotSupportedException.$ctor1(msg || "Collection is read-only."); - } - }, - - add: function (obj, item, T) { - var name; - - System.Array.checkReadOnly(obj, T); - - if (T) { - item = System.Array.checkNewElementType(item, T); - } - - if (T && H5.isFunction(obj[name = "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$add"])) { - return obj[name](item); - } else if (H5.isFunction(obj[name = "System$Collections$IList$add"])) { - return obj[name](item); - } else if (H5.isFunction(obj.add)) { - return obj.add(item); - } - - return -1; - }, - - checkNewElementType: function (v, type) { - var unboxed = H5.unbox(v, true); - - if (H5.isNumber(unboxed)) { - if (type === System.Decimal) { - return new System.Decimal(unboxed); - } - - if (type === System.Int64) { - return new System.Int64(unboxed); - } - - if (type === System.UInt64) { - return new System.UInt64(unboxed); - } - } - - var is = H5.is(v, type); - - if (!is) { - if (v == null && H5.getDefaultValue(type) == null) { - return null; - } - - throw new System.ArgumentException.$ctor1("The value " + unboxed + "is not of type " + H5.getTypeName(type) + " and cannot be used in this generic collection."); - } - - return unboxed; - }, - - clear: function (obj, T) { - var name; - - System.Array.checkReadOnly(obj, T, "Collection is read-only."); - - if (H5.isArray(obj)) { - System.Array.fill(obj, T ? (T.getDefaultValue || H5.getDefaultValue(T)) : null, 0, obj.length); - } else if (T && H5.isFunction(obj[name = "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$clear"])) { - obj[name](); - } else if (H5.isFunction(obj[name = "System$Collections$IList$clear"])) { - obj[name](); - } else if (H5.isFunction(obj.clear)) { - obj.clear(); - } - }, - - fill: function (dst, val, index, count) { - if (!H5.hasValue(dst)) { - throw new System.ArgumentNullException.$ctor1("dst"); - } - - if (index < 0 || count < 0 || (index + count) > dst.length) { - throw new System.IndexOutOfRangeException(); - } - - var isFn = H5.isFunction(val); - - if (isFn) { - var v = val(); - - if (!v || (!v.$kind && typeof v !== "object")) { - isFn = false; - val = v; - } - } - - while (--count >= 0) { - dst[index + count] = isFn ? val() : val; - } - }, - - copy: function (src, spos, dest, dpos, len) { - if (!dest) { - throw new System.ArgumentNullException.$ctor3("dest", "Value cannot be null"); - } - - if (!src) { - throw new System.ArgumentNullException.$ctor3("src", "Value cannot be null"); - } - - if (spos < 0 || dpos < 0 || len < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("bound", "Number was less than the array's lower bound in the first dimension"); - } - - if (len > (src.length - spos) || len > (dest.length - dpos)) { - throw new System.ArgumentException.$ctor1("Destination array was not long enough. Check destIndex and length, and the array's lower bounds"); - } - - if (spos < dpos && src === dest) { - while (--len >= 0) { - dest[dpos + len] = src[spos + len]; - } - } else { - for (var i = 0; i < len; i++) { - dest[dpos + i] = src[spos + i]; - } - } - }, - - copyTo: function (obj, dest, index, T) { - var name; - - if (H5.isArray(obj)) { - System.Array.copy(obj, 0, dest, index, obj ? obj.length : 0); - } else if (H5.isFunction(obj.copyTo)) { - obj.copyTo(dest, index); - } else if (T && H5.isFunction(obj[name = "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$copyTo"])) { - obj[name](dest, index); - } else if (H5.isFunction(obj[name = "System$Collections$ICollection$copyTo"])) { - obj[name](dest, index); - } else { - throw new System.NotImplementedException.$ctor1("copyTo"); - } - }, - - indexOf: function (arr, item, startIndex, count, T) { - var name; - - if (H5.isArray(arr)) { - var i, - el, - endIndex; - - startIndex = startIndex || 0; - count = H5.isNumber(count) ? count : arr.length; - endIndex = startIndex + count; - - for (i = startIndex; i < endIndex; i++) { - el = arr[i]; - - if (el === item || System.Collections.Generic.EqualityComparer$1.$default.equals2(el, item)) { - return i; - } - } - } else if (T && H5.isFunction(arr[name = "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$indexOf"])) { - return arr[name](item); - } else if (H5.isFunction(arr[name = "System$Collections$IList$indexOf"])) { - return arr[name](item); - } else if (H5.isFunction(arr.indexOf)) { - return arr.indexOf(item); - } - - return -1; - }, - - contains: function (obj, item, T) { - var name; - - if (H5.isArray(obj)) { - return System.Array.indexOf(obj, item) > -1; - } else if (T && H5.isFunction(obj[name = "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$contains"])) { - return obj[name](item); - } else if (H5.isFunction(obj[name = "System$Collections$IList$contains"])) { - return obj[name](item); - } else if (H5.isFunction(obj.contains)) { - return obj.contains(item); - } - - return false; - }, - - remove: function (obj, item, T) { - var name; - - System.Array.checkReadOnly(obj, T); - - if (H5.isArray(obj)) { - var index = System.Array.indexOf(obj, item); - - if (index > -1) { - obj.splice(index, 1); - - return true; - } - } else if (T && H5.isFunction(obj[name = "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$remove"])) { - return obj[name](item); - } else if (H5.isFunction(obj[name = "System$Collections$IList$remove"])) { - return obj[name](item); - } else if (H5.isFunction(obj.remove)) { - return obj.remove(item); - } - - return false; - }, - - insert: function (obj, index, item, T) { - var name; - - System.Array.checkReadOnly(obj, T); - - if (T) { - item = System.Array.checkNewElementType(item, T); - } - - if (T && H5.isFunction(obj[name = "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$insert"])) { - obj[name](index, item); - } else if (H5.isFunction(obj[name = "System$Collections$IList$insert"])) { - obj[name](index, item); - } else if (H5.isFunction(obj.insert)) { - obj.insert(index, item); - } - }, - - removeAt: function (obj, index, T) { - var name; - - System.Array.checkReadOnly(obj, T); - - if (H5.isArray(obj)) { - obj.splice(index, 1); - } else if (T && H5.isFunction(obj[name = "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$removeAt"])) { - obj[name](index); - } else if (H5.isFunction(obj[name = "System$Collections$IList$removeAt"])) { - obj[name](index); - } else if (H5.isFunction(obj.removeAt)) { - obj.removeAt(index); - } - }, - - getItem: function (obj, idx, T) { - var name, - v; - - if (H5.isArray(obj)) { - v = obj[idx]; - if (T) { - return v; - } - - return (obj.$type && (H5.isNumber(v) || H5.isBoolean(v) || H5.isDate(v))) ? H5.box(v, obj.$type.$elementType) : v; - } else if (T && H5.isFunction(obj[name = "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$getItem"])) { - v = obj[name](idx); - return v; - } else if (H5.isFunction(obj.get)) { - v = obj.get(idx); - } else if (H5.isFunction(obj.getItem)) { - v = obj.getItem(idx); - } else if (H5.isFunction(obj[name = "System$Collections$IList$$getItem"])) { - v = obj[name](idx); - } else if (H5.isFunction(obj.get_Item)) { - v = obj.get_Item(idx); - } - - return T && H5.getDefaultValue(T) != null ? H5.box(v, T) : v; - }, - - setItem: function (obj, idx, value, T) { - var name; - - if (H5.isArray(obj)) { - if (obj.$type) { - value = System.Array.checkElementType(value, obj.$type.$elementType); - } - - obj[idx] = value; - } else { - if (T) { - value = System.Array.checkElementType(value, T); - } - - if (H5.isFunction(obj.set)) { - obj.set(idx, value); - } else if (H5.isFunction(obj.setItem)) { - obj.setItem(idx, value); - } else if (T && H5.isFunction(obj[name = "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$setItem"])) { - return obj[name](idx, value); - } else if (T && H5.isFunction(obj[name = "System$Collections$IList$setItem"])) { - return obj[name](idx, value); - } else if (H5.isFunction(obj.set_Item)) { - obj.set_Item(idx, value); - } - } - }, - - checkElementType: function (v, type) { - var unboxed = H5.unbox(v, true); - - if (H5.isNumber(unboxed)) { - if (type === System.Decimal) { - return new System.Decimal(unboxed); - } - - if (type === System.Int64) { - return new System.Int64(unboxed); - } - - if (type === System.UInt64) { - return new System.UInt64(unboxed); - } - } - - var is = H5.is(v, type); - - if (!is) { - if (v == null) { - return H5.getDefaultValue(type); - } - - throw new System.ArgumentException.$ctor1("Cannot widen from source type to target type either because the source type is a not a primitive type or the conversion cannot be accomplished."); - } - - return unboxed; - }, - - resize: function (arr, newSize, val, T) { - if (newSize < 0) { - throw new System.ArgumentOutOfRangeException.$ctor3("newSize", newSize, "newSize cannot be less than 0."); - } - - var oldSize = 0, - isFn = H5.isFunction(val), - ref = arr.v; - - if (isFn) { - var v = val(); - - if (!v || (!v.$kind && typeof v !== "object")) { - isFn = false; - val = v; - } - } - - if (!ref) { - ref = System.Array.init(new Array(newSize), T); - } else { - oldSize = ref.length; - ref.length = newSize; - } - - for (var i = oldSize; i < newSize; i++) { - ref[i] = isFn ? val() : val; - } - - ref.$s = [ref.length]; - - arr.v = ref; - }, - - reverse: function (arr, index, length) { - if (!array) { - throw new System.ArgumentNullException.$ctor1("arr"); - } - - if (!index && index !== 0) { - index = 0; - length = arr.length; - } - - if (index < 0 || length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4((index < 0 ? "index" : "length"), "Non-negative number required."); - } - - if ((array.length - index) < length) { - throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection."); - } - - if (System.Array.getRank(arr) !== 1) { - throw new System.Exception("Only single dimension arrays are supported here."); - } - - var i = index, - j = index + length - 1; - - while (i < j) { - var temp = arr[i]; - arr[i] = arr[j]; - arr[j] = temp; - i++; - j--; - } - }, - - binarySearch: function (array, index, length, value, comparer) { - if (!array) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - var lb = 0; - - if (index < lb || length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4(index < lb ? "index" : "length", "Non-negative number required."); - } - - if (array.length - (index - lb) < length) { - throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection."); - } - - if (System.Array.getRank(array) !== 1) { - throw new System.RankException.$ctor1("Only single dimensional arrays are supported for the requested action."); - } - - if (!comparer) { - comparer = System.Collections.Generic.Comparer$1.$default; - } - - var lo = index, - hi = index + length - 1, - i, - c; - - while (lo <= hi) { - i = lo + ((hi - lo) >> 1); - - try { - c = System.Collections.Generic.Comparer$1.get(comparer)(array[i], value); - } catch (e) { - throw new System.InvalidOperationException.$ctor2("Failed to compare two elements in the array.", e); - } - - if (c === 0) { - return i; - } - - if (c < 0) { - lo = i + 1; - } else { - hi = i - 1; - } - } - - return ~lo; - }, - - sortDict: function (keys, values, index, length, comparer) { - if (!comparer) { - comparer = System.Collections.Generic.Comparer$1.$default; - } - - var list = [], - fn = H5.fn.bind(comparer, System.Collections.Generic.Comparer$1.get(comparer)); - - if (length == null) { - length = keys.length; - } - - for (var j = 0; j < keys.length; j++) { - list.push({ key: keys[j], value: values[j] }); - } - - if (index === 0 && length === list.length) { - list.sort(function (x, y) { - return fn(x.key, y.key); - }); - } else { - var newarray = list.slice(index, index + length); - - newarray.sort(function (x, y) { - return fn(x.key, y.key); - }); - - for (var i = index; i < (index + length); i++) { - list[i] = newarray[i - index]; - } - } - - for (var k = 0; k < list.length; k++) { - keys[k] = list[k].key; - values[k] = list[k].value; - } - }, - - sort: function (array, index, length, comparer) { - if (!array) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (arguments.length === 2 && typeof index === "function") { - array.sort(index); - return; - } - - if (arguments.length === 2 && typeof index === "object") { - comparer = index; - index = null; - } - - if (!H5.isNumber(index)) { - index = 0; - } - - if (!H5.isNumber(length)) { - length = array.length; - } - - if (!comparer) { - comparer = System.Collections.Generic.Comparer$1.$default; - } - - if (index === 0 && length === array.length) { - array.sort(H5.fn.bind(comparer, System.Collections.Generic.Comparer$1.get(comparer))); - } else { - var newarray = array.slice(index, index + length); - - newarray.sort(H5.fn.bind(comparer, System.Collections.Generic.Comparer$1.get(comparer))); - - for (var i = index; i < (index + length) ; i++) { - array[i] = newarray[i - index]; - } - } - }, - - min: function (arr, minValue) { - var min = arr[0], - len = arr.length; - - for (var i = 0; i < len; i++) { - if ((arr[i] < min || min < minValue) && !(arr[i] < minValue)) { - min = arr[i]; - } - } - - return min; - }, - - max: function (arr, maxValue) { - var max = arr[0], - len = arr.length; - - for (var i = 0; i < len; i++) { - if ((arr[i] > max || max > maxValue) && !(arr[i] > maxValue)) { - max = arr[i]; - } - } - - return max; - }, - - addRange: function (arr, items) { - if (H5.isArray(items)) { - arr.push.apply(arr, items); - } else { - var e = H5.getEnumerator(items); - - try { - while (e.moveNext()) { - arr.push(e.Current); - } - } finally { - if (H5.is(e, System.IDisposable)) { - e.Dispose(); - } - } - } - }, - - convertAll: function (array, converter) { - if (!H5.hasValue(array)) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (!H5.hasValue(converter)) { - throw new System.ArgumentNullException.$ctor1("converter"); - } - - var array2 = array.map(converter); - - return array2; - }, - - find: function (T, array, match) { - if (!H5.hasValue(array)) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (!H5.hasValue(match)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - for (var i = 0; i < array.length; i++) { - if (match(array[i])) { - return array[i]; - } - } - - return H5.getDefaultValue(T); - }, - - findAll: function (array, match) { - if (!H5.hasValue(array)) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (!H5.hasValue(match)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - var list = []; - - for (var i = 0; i < array.length; i++) { - if (match(array[i])) { - list.push(array[i]); - } - } - - return list; - }, - - findIndex: function (array, startIndex, count, match) { - if (!H5.hasValue(array)) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (arguments.length === 2) { - match = startIndex; - startIndex = 0; - count = array.length; - } else if (arguments.length === 3) { - match = count; - count = array.length - startIndex; - } - - if (startIndex < 0 || startIndex > array.length) { - throw new System.ArgumentOutOfRangeException.$ctor1("startIndex"); - } - - if (count < 0 || startIndex > array.length - count) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - if (!H5.hasValue(match)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - var endIndex = startIndex + count; - - for (var i = startIndex; i < endIndex; i++) { - if (match(array[i])) { - return i; - } - } - - return -1; - }, - - findLast: function (T, array, match) { - if (!H5.hasValue(array)) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (!H5.hasValue(match)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - for (var i = array.length - 1; i >= 0; i--) { - if (match(array[i])) { - return array[i]; - } - } - - return H5.getDefaultValue(T); - }, - - findLastIndex: function (array, startIndex, count, match) { - if (!H5.hasValue(array)) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (arguments.length === 2) { - match = startIndex; - startIndex = array.length - 1; - count = array.length; - } else if (arguments.length === 3) { - match = count; - count = startIndex + 1; - } - - if (!H5.hasValue(match)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - if (array.length === 0) { - if (startIndex !== -1) { - throw new System.ArgumentOutOfRangeException.$ctor1("startIndex"); - } - } else { - if (startIndex < 0 || startIndex >= array.length) { - throw new System.ArgumentOutOfRangeException.$ctor1("startIndex"); - } - } - - if (count < 0 || startIndex - count + 1 < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - var endIndex = startIndex - count; - - for (var i = startIndex; i > endIndex; i--) { - if (match(array[i])) { - return i; - } - } - - return -1; - }, - - forEach: function (array, action) { - if (!H5.hasValue(array)) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (!H5.hasValue(action)) { - throw new System.ArgumentNullException.$ctor1("action"); - } - - for (var i = 0; i < array.length; i++) { - action(array[i], i, array); - } - }, - - indexOfT: function (array, value, startIndex, count) { - if (!H5.hasValue(array)) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (arguments.length === 2) { - startIndex = 0; - count = array.length; - } else if (arguments.length === 3) { - count = array.length - startIndex; - } - - if (startIndex < 0 || (startIndex >= array.length && array.length > 0)) { - throw new System.ArgumentOutOfRangeException.$ctor4("startIndex", "out of range"); - } - - if (count < 0 || count > array.length - startIndex) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "out of range"); - } - - return System.Array.indexOf(array, value, startIndex, count); - }, - - isFixedSize: function (array) { - if (H5.isArray(array)) { - return true; - } else if (array["System$Collections$IList$isFixedSize"] != null) { - return array["System$Collections$IList$isFixedSize"]; - } else if(array["System$Collections$IList$IsFixedSize"] != null) { - return array["System$Collections$IList$IsFixedSize"]; - } else if (array.isFixedSize != null) { - return array.isFixedSize; - } else if (array.IsFixedSize != null) { - return array.IsFixedSize; - } - - return true; - }, - - isSynchronized: function (array) { - return false; - }, - - lastIndexOfT: function (array, value, startIndex, count) { - if (!H5.hasValue(array)) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (arguments.length === 2) { - startIndex = array.length - 1; - count = array.length; - } else if (arguments.length === 3) { - count = (array.length === 0) ? 0 : (startIndex + 1); - } - - if (startIndex < 0 || (startIndex >= array.length && array.length > 0)) { - throw new System.ArgumentOutOfRangeException.$ctor4("startIndex", "out of range"); - } - - if (count < 0 || startIndex - count + 1 < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "out of range"); - } - - var endIndex = startIndex - count + 1; - - for (var i = startIndex; i >= endIndex; i--) { - var el = array[i]; - - if (el === value || System.Collections.Generic.EqualityComparer$1.$default.equals2(el, value)) { - return i; - } - } - - return -1; - }, - - syncRoot: function (array) { - return array; - }, - - trueForAll: function (array, match) { - if (!H5.hasValue(array)) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (!H5.hasValue(match)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - for (var i = 0; i < array.length; i++) { - if (!match(array[i])) { - return false; - } - } - - return true; - }, - - type: function (t, rank, arr) { - rank = rank || 1; - - var typeCache = System.Array.$cache[rank], - result, - name; - - if (!typeCache) { - typeCache = []; - System.Array.$cache[rank] = typeCache; - } - - for (var i = 0; i < typeCache.length; i++) { - if (typeCache[i].$elementType === t) { - result = typeCache[i]; - break; - } - } - - if (!result) { - name = H5.getTypeName(t) + "[" + System.String.fromCharCount(",".charCodeAt(0), rank - 1) + "]"; - - var old = H5.Class.staticInitAllow; - - result = H5.define(name, { - $inherits: [System.Array, System.Collections.ICollection, System.ICloneable, System.Collections.Generic.IList$1(t), System.Collections.Generic.IReadOnlyCollection$1(t)], - $noRegister: true, - statics: { - $elementType: t, - $rank: rank, - $isArray: true, - $is: function (obj) { - return System.Array.is(obj, this); - }, - getDefaultValue: function () { - return null; - }, - createInstance: function () { - var arr; - - if (this.$rank === 1) { - arr = []; - } else { - var args = [H5.getDefaultValue(this.$elementType), null, this.$elementType]; - - for (var j = 0; j < this.$rank; j++) { - args.push(0); - } - - arr = System.Array.create.apply(System.Array, args); - } - - arr.$type = this; - - return arr; - } - } - }); - - typeCache.push(result); - - H5.Class.staticInitAllow = true; - - if (result.$staticInit) { - result.$staticInit(); - } - - H5.Class.staticInitAllow = old; - } - - if (arr) { - arr.$type = result; - } - - return arr || result; - }, - getLongLength: function (array) { - return System.Int64(array.length); - } - }; - - H5.define("System.Array", { - statics: array - }); - - System.Array.$cache = {}; - - // @source ArraySegment.js - - H5.define("System.ArraySegment", { - $kind: "struct", - - statics: { - getDefaultValue: function () { - return new System.ArraySegment(); - } - }, - - ctor: function (array, offset, count) { - this.$initialize(); - - if (arguments.length === 0) { - this.array = null; - this.offset = 0; - this.count = 0; - - return; - } - - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - this.array = array; - - if (H5.isNumber(offset)) { - if (offset < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("offset"); - } - - this.offset = offset; - } else { - this.offset = 0; - } - - if (H5.isNumber(count)) { - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - this.count = count; - } else { - this.count = array.length; - } - - if (array.length - this.offset < this.count) { - throw new ArgumentException(); - } - }, - - getArray: function () { - return this.array; - }, - - getCount: function () { - return this.count; - }, - - getOffset: function () { - return this.offset; - }, - - getHashCode: function () { - var h = H5.addHash([5322976039, this.array, this.count, this.offset]); - - return h; - }, - - equals: function (o) { - if (!H5.is(o, System.ArraySegment)) { - return false; - } - - return H5.equals(this.array, o.array) && H5.equals(this.count, o.count) && H5.equals(this.offset, o.offset); - }, - - $clone: function (to) { return this; } - }); - - // @source Interfaces.js - - H5.define("System.Collections.IEnumerable", { - $kind: "interface" - }); - H5.define("System.Collections.ICollection", { - inherits: [System.Collections.IEnumerable], - $kind: "interface" - }); - H5.define("System.Collections.IList", { - inherits: [System.Collections.ICollection], - $kind: "interface" - }); - H5.define("System.Collections.IDictionary", { - inherits: [System.Collections.ICollection], - $kind: "interface" - }); - - H5.define("System.Collections.Generic.IEnumerable$1", function (T) { - return { - inherits: [System.Collections.IEnumerable], - $kind: "interface", - $variance: [1] - }; - }); - - H5.define("System.Collections.Generic.ICollection$1", function (T) { - return { - inherits: [System.Collections.Generic.IEnumerable$1(T)], - $kind: "interface" - }; - }); - - H5.define("System.Collections.Generic.IEqualityComparer$1", function (T) { - return { - $kind: "interface", - $variance: [2] - }; - }); - - H5.define("System.Collections.Generic.IDictionary$2", function (TKey, TValue) { - return { - inherits: [System.Collections.Generic.ICollection$1(System.Collections.Generic.KeyValuePair$2(TKey, TValue))], - $kind: "interface" - }; - }); - - H5.define("System.Collections.Generic.IList$1", function (T) { - return { - inherits: [System.Collections.Generic.ICollection$1(T)], - $kind: "interface" - }; - }); - - H5.define("System.Collections.Generic.ISet$1", function (T) { - return { - inherits: [System.Collections.Generic.ICollection$1(T)], - $kind: "interface" - }; - }); - - H5.define("System.Collections.Generic.IReadOnlyCollection$1", function (T) { - return { - inherits: [System.Collections.Generic.IEnumerable$1(T)], - $kind: "interface" - }; - }); - - H5.define("System.Collections.Generic.IReadOnlyList$1", function (T) { - return { - inherits: [System.Collections.Generic.IReadOnlyCollection$1(T)], - $kind: "interface", - $variance: [1] - }; - }); - - H5.define("System.Collections.Generic.IReadOnlyDictionary$2", function (TKey, TValue) { - return { - inherits: [System.Collections.Generic.IReadOnlyCollection$1(System.Collections.Generic.KeyValuePair$2(TKey, TValue))], - $kind: "interface" - }; - }); - - // @source String.js - - H5.define("System.String", { - inherits: [System.IComparable, System.ICloneable, System.Collections.IEnumerable, System.Collections.Generic.IEnumerable$1(System.Char)], - - statics: { - $is: function (instance) { - return typeof (instance) === "string"; - }, - - charCodeAt: function (str, idx) { - idx = idx || 0; - - var code = str.charCodeAt(idx), - hi, - low; - - if (0xD800 <= code && code <= 0xDBFF) { - hi = code; - low = str.charCodeAt(idx + 1); - - if (isNaN(low)) { - throw new System.Exception("High surrogate not followed by low surrogate"); - } - - return ((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000; - } - - if (0xDC00 <= code && code <= 0xDFFF) { - return false; - } - - return code; - }, - - fromCharCode: function (codePt) { - if (codePt > 0xFFFF) { - codePt -= 0x10000; - - return String.fromCharCode(0xD800 + (codePt >> 10), 0xDC00 + (codePt & 0x3FF)); - } - - return String.fromCharCode(codePt); - }, - - fromCharArray: function (chars, startIndex, length) { - if (chars == null) { - throw new System.ArgumentNullException.$ctor1("chars"); - } - - if (startIndex < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("startIndex"); - } - - if (length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("length"); - } - - if (chars.length - startIndex < length) { - throw new System.ArgumentOutOfRangeException.$ctor1("startIndex"); - } - - var result = ""; - - startIndex = startIndex || 0; - length = H5.isNumber(length) ? length : chars.length; - - if ((startIndex + length) > chars.length) { - length = chars.length - startIndex; - } - - for (var i = 0; i < length; i++) { - var ch = chars[i + startIndex] | 0; - - result += String.fromCharCode(ch); - } - - return result; - }, - - lastIndexOf: function (s, search, startIndex, count) { - var index = s.lastIndexOf(search, startIndex); - - return (index < (startIndex - count + 1)) ? -1 : index; - }, - - lastIndexOfAny: function (s, chars, startIndex, count) { - var length = s.length; - - if (!length) { - return -1; - } - - chars = String.fromCharCode.apply(null, chars); - startIndex = startIndex || length - 1; - count = count || length; - - var endIndex = startIndex - count + 1; - - if (endIndex < 0) { - endIndex = 0; - } - - for (var i = startIndex; i >= endIndex; i--) { - if (chars.indexOf(s.charAt(i)) >= 0) { - return i; - } - } - - return -1; - }, - - isNullOrWhiteSpace: function (s) { - if (!s) { - return true; - } - - return System.Char.isWhiteSpace(s); - }, - - isNullOrEmpty: function (s) { - return !s; - }, - - fromCharCount: function (c, count) { - if (count >= 0) { - return String(Array(count + 1).join(String.fromCharCode(c))); - } else { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "cannot be less than zero"); - } - }, - - format: function (format, args) { - return System.String._format(System.Globalization.CultureInfo.getCurrentCulture(), format, Array.isArray(args) && arguments.length == 2 ? args : Array.prototype.slice.call(arguments, 1)); - }, - - formatProvider: function (provider, format, args) { - return System.String._format(provider, format, Array.isArray(args) && arguments.length == 3 ? args : Array.prototype.slice.call(arguments, 2)); - }, - - _format: function (provider, format, args) { - if (format == null) { - throw new System.ArgumentNullException.$ctor1("format"); - } - - var reverse = function (s) { - return s.split("").reverse().join(""); - }; - - format = reverse(reverse(format.replace(/\{\{/g, function (m) { - return String.fromCharCode(1, 1); - })).replace(/\}\}/g, function (m) { - return String.fromCharCode(2, 2); - })); - - var me = this, - _formatRe = /(\{+)((\d+|[a-zA-Z_$]\w+(?:\.[a-zA-Z_$]\w+|\[\d+\])*)(?:\,(-?\d*))?(?:\:([^\}]*))?)(\}+)|(\{+)|(\}+)/g, - fn = this.decodeBraceSequence; - - format = format.replace(_formatRe, function (m, openBrace, elementContent, index, align, format, closeBrace, repeatOpenBrace, repeatCloseBrace) { - if (repeatOpenBrace) { - return fn(repeatOpenBrace); - } - - if (repeatCloseBrace) { - return fn(repeatCloseBrace); - } - - if (openBrace.length % 2 === 0 || closeBrace.length % 2 === 0) { - return fn(openBrace) + elementContent + fn(closeBrace); - } - - return fn(openBrace, true) + me.handleElement(provider, index, align, format, args) + fn(closeBrace, true); - }); - - return format.replace(/(\x01\x01)|(\x02\x02)/g, function (m) { - if (m == String.fromCharCode(1, 1)) { - return "{"; - } - - if (m == String.fromCharCode(2, 2)) { - return "}"; - } - }); - }, - - handleElement: function (provider, index, alignment, formatStr, args) { - var value; - - index = parseInt(index, 10); - - if (index > args.length - 1) { - throw new System.FormatException.$ctor1("Input string was not in a correct format."); - } - - value = args[index]; - - if (value == null) { - value = ""; - } - - if (formatStr && value.$boxed && value.type.$kind === "enum") { - value = System.Enum.format(value.type, value.v, formatStr); - } else if (formatStr && value.$boxed && value.type.format) { - value = value.type.format(H5.unbox(value, true), formatStr, provider); - } else if (formatStr && H5.is(value, System.IFormattable)) { - value = H5.format(H5.unbox(value, true), formatStr, provider); - } if (H5.isNumber(value)) { - value = H5.Int.format(value, formatStr, provider); - } else if (H5.isDate(value)) { - value = System.DateTime.format(value, formatStr, provider); - } else { - value = "" + H5.toString(value); - } - - if (alignment) { - alignment = parseInt(alignment, 10); - - if (!H5.isNumber(alignment)) { - alignment = null; - } - } - - return System.String.alignString(H5.toString(value), alignment); - }, - - decodeBraceSequence: function (braces, remove) { - return braces.substr(0, (braces.length + (remove ? 0 : 1)) / 2); - }, - - alignString: function (str, alignment, pad, dir, cut) { - if (str == null || !alignment) { - return str; - } - - if (!pad) { - pad = " "; - } - - if (H5.isNumber(pad)) { - pad = String.fromCharCode(pad); - } - - if (!dir) { - dir = alignment < 0 ? 1 : 2; - } - - alignment = Math.abs(alignment); - - if (cut && (str.length > alignment)) { - str = str.substring(0, alignment); - } - - if (alignment + 1 >= str.length) { - switch (dir) { - case 2: - str = Array(alignment + 1 - str.length).join(pad) + str; - break; - - case 3: - var padlen = alignment - str.length, - right = Math.ceil(padlen / 2), - left = padlen - right; - - str = Array(left + 1).join(pad) + str + Array(right + 1).join(pad); - break; - - case 1: - default: - str = str + Array(alignment + 1 - str.length).join(pad); - break; - } - } - - return str; - }, - - startsWith: function (str, prefix) { - if (!prefix.length) { - return true; - } - - if (prefix.length > str.length) { - return false; - } - - return System.String.equals(str.slice(0, prefix.length), prefix, arguments[2]); - }, - - endsWith: function (str, suffix) { - if (!suffix.length) { - return true; - } - - if (suffix.length > str.length) { - return false; - } - - return System.String.equals(str.slice(str.length - suffix.length, str.length), suffix, arguments[2]); - }, - - contains: function (str, value) { - if (value == null) { - throw new System.ArgumentNullException(); - } - - if (str == null) { - return false; - } - - return str.indexOf(value) > -1; - }, - - indexOfAny: function (str, anyOf) { - if (anyOf == null) { - throw new System.ArgumentNullException(); - } - - if (str == null || str === "") { - return -1; - } - - var startIndex = (arguments.length > 2) ? arguments[2] : 0; - - if (startIndex < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("startIndex", "startIndex cannot be less than zero"); - } - - var length = str.length - startIndex; - - if (arguments.length > 3 && arguments[3] != null) { - length = arguments[3]; - } - - if (length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("length", "must be non-negative"); - } - - if (length > str.length - startIndex) { - throw new System.ArgumentOutOfRangeException.$ctor4("length", "Index and length must refer to a location within the string"); - } - - length = startIndex + length; - anyOf = String.fromCharCode.apply(null, anyOf); - - for (var i = startIndex; i < length; i++) { - if (anyOf.indexOf(str.charAt(i)) >= 0) { - return i; - } - } - - return -1; - }, - - indexOf: function (str, value) { - if (value == null) { - throw new System.ArgumentNullException(); - } - - if (str == null || str === "") { - return -1; - } - - var startIndex = (arguments.length > 2) ? arguments[2] : 0; - - if (startIndex < 0 || startIndex > str.length) { - throw new System.ArgumentOutOfRangeException.$ctor4("startIndex", "startIndex cannot be less than zero and must refer to a location within the string"); - } - - if (value === "") { - return (arguments.length > 2) ? startIndex : 0; - } - - var length = str.length - startIndex; - - if (arguments.length > 3 && arguments[3] != null) { - length = arguments[3]; - } - - if (length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("length", "must be non-negative"); - } - - if (length > str.length - startIndex) { - throw new System.ArgumentOutOfRangeException.$ctor4("length", "Index and length must refer to a location within the string"); - } - - var s = str.substr(startIndex, length), - index = (arguments.length === 5 && arguments[4] % 2 !== 0) ? s.toLocaleUpperCase().indexOf(value.toLocaleUpperCase()) : s.indexOf(value); - - if (index > -1) { - if (arguments.length === 5) { - // StringComparison - return (System.String.compare(value, s.substr(index, value.length), arguments[4]) === 0) ? index + startIndex : -1; - } else { - return index + startIndex; - } - } - - return -1; - }, - - equals: function () { - return System.String.compare.apply(this, arguments) === 0; - }, - - swapCase: function (letters) { - return letters.replace(/\w/g, function (c) { - if (c === c.toLowerCase()) { - return c.toUpperCase(); - } else { - return c.toLowerCase(); - } - }); - }, - - compare: function (strA, strB) { - if (strA == null) { - return (strB == null) ? 0 : -1; - } - - if (strB == null) { - return 1; - } - - if (arguments.length >= 3) { - if (!H5.isBoolean(arguments[2])) { - // StringComparison - switch (arguments[2]) { - case 1: // CurrentCultureIgnoreCase - return strA.localeCompare(strB, System.Globalization.CultureInfo.getCurrentCulture().name, { - sensitivity: "accent" - }); - case 2: // InvariantCulture - return strA.localeCompare(strB, System.Globalization.CultureInfo.invariantCulture.name); - case 3: // InvariantCultureIgnoreCase - return strA.localeCompare(strB, System.Globalization.CultureInfo.invariantCulture.name, { - sensitivity: "accent" - }); - case 4: // Ordinal - return (strA === strB) ? 0 : ((strA > strB) ? 1 : -1); - case 5: // OrdinalIgnoreCase - return (strA.toUpperCase() === strB.toUpperCase()) ? 0 : ((strA.toUpperCase() > strB.toUpperCase()) ? 1 : -1); - case 0: // CurrentCulture - default: - break; - } - } else { - // ignoreCase - if (arguments[2]) { - strA = strA.toLocaleUpperCase(); - strB = strB.toLocaleUpperCase(); - } - - if (arguments.length === 4) { - // CultureInfo - return strA.localeCompare(strB, arguments[3].name); - } - } - } - - return strA.localeCompare(strB); - }, - - toCharArray: function (str, startIndex, length) { - if (startIndex < 0 || startIndex > str.length || startIndex > str.length - length) { - throw new System.ArgumentOutOfRangeException.$ctor4("startIndex", "startIndex cannot be less than zero and must refer to a location within the string"); - } - - if (length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("length", "must be non-negative"); - } - - if (!H5.hasValue(startIndex)) { - startIndex = 0; - } - - if (!H5.hasValue(length)) { - length = str.length; - } - - var arr = []; - - for (var i = startIndex; i < startIndex + length; i++) { - arr.push(str.charCodeAt(i)); - } - - return arr; - }, - - escape: function (str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); - }, - - replaceAll: function (str, a, b) { - var reg = new RegExp(System.String.escape(a), "g"); - - return str.replace(reg, b); - }, - - insert: function (index, strA, strB) { - return index > 0 ? (strA.substring(0, index) + strB + strA.substring(index, strA.length)) : (strB + strA); - }, - - remove: function (s, index, count) { - if (s == null) { - throw new System.NullReferenceException(); - } - - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("startIndex", "StartIndex cannot be less than zero"); - } - - if (count != null) { - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "Count cannot be less than zero"); - } - - if (count > s.length - index) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "Index and count must refer to a location within the string"); - } - } else { - if (index >= s.length) { - throw new System.ArgumentOutOfRangeException.$ctor4("startIndex", "startIndex must be less than length of string"); - } - } - - if (count == null || ((index + count) > s.length)) { - return s.substr(0, index); - } - - return s.substr(0, index) + s.substr(index + count); - }, - - split: function (s, strings, limit, options) { - var re = (!H5.hasValue(strings) || strings.length === 0) ? new RegExp("\\s", "g") : new RegExp(strings.map(System.String.escape).join("|"), "g"), - res = [], - m, - i; - - for (i = 0; ; i = re.lastIndex) { - if (m = re.exec(s)) { - if (options !== 1 || m.index > i) { - if (res.length === limit - 1) { - res.push(s.substr(i)); - - return res; - } else { - res.push(s.substring(i, m.index)); - } - } - } else { - if (options !== 1 || i !== s.length) { - res.push(s.substr(i)); - } - - return res; - } - } - }, - - trimEnd: function (str, chars) { - return str.replace(chars ? new RegExp("[" + System.String.escape(String.fromCharCode.apply(null, chars)) + "]+$") : /\s*$/, ""); - }, - - trimStart: function (str, chars) { - return str.replace(chars ? new RegExp("^[" + System.String.escape(String.fromCharCode.apply(null, chars)) + "]+") : /^\s*/, ""); - }, - - trim: function (str, chars) { - return System.String.trimStart(System.String.trimEnd(str, chars), chars); - }, - - trimStartZeros: function (str) { - return str.replace(new RegExp("^[ 0+]+(?=.)"), ""); - }, - - concat: function (values) { - var list = (arguments.length == 1 && Array.isArray(values)) ? values : [].slice.call(arguments), - s = ""; - - for (var i = 0; i < list.length; i++) { - s += list[i] == null ? "" : H5.toString(list[i]); - } - - return s; - }, - - copyTo: function (str, sourceIndex, destination, destinationIndex, count) { - if (destination == null) { - throw new System.ArgumentNullException.$ctor1("destination"); - } - - if (str == null) { - throw new System.ArgumentNullException.$ctor1("str"); - } - - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - if (sourceIndex < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("sourceIndex"); - } - - if (count > str.length - sourceIndex) { - throw new System.ArgumentOutOfRangeException.$ctor1("sourceIndex"); - } - - if (destinationIndex > destination.length - count || destinationIndex < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("destinationIndex"); - } - - if (count > 0) { - for (var i = 0; i < count; i++) { - destination[destinationIndex + i] = str.charCodeAt(sourceIndex + i); - } - } - } - } - }); - - H5.Class.addExtend(System.String, [System.IComparable$1(System.String), System.IEquatable$1(System.String)]); - - // @source KeyValuePair.js - - H5.define("System.Collections.Generic.KeyValuePair$2", function (TKey, TValue) { return { - $kind: "struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.key$1 = null; - $.value$1 = null; - return $;} - } - }, - fields: { - key$1: H5.getDefaultValue(TKey), - value$1: H5.getDefaultValue(TValue) - }, - props: { - key: { - get: function () { - return this.key$1; - } - }, - value: { - get: function () { - return this.value$1; - } - } - }, - ctors: { - $ctor1: function (key, value) { - this.$initialize(); - this.key$1 = key; - this.value$1 = value; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - toString: function () { - var s = System.Text.StringBuilderCache.Acquire(); - s.append(String.fromCharCode(91)); - if (this.key != null) { - s.append(H5.toString(this.key)); - } - s.append(", "); - if (this.value != null) { - s.append(H5.toString(this.value)); - } - s.append(String.fromCharCode(93)); - return System.Text.StringBuilderCache.GetStringAndRelease(s); - }, - Deconstruct: function (key, value) { - key.v = this.key; - value.v = this.value; - }, - getHashCode: function () { - var h = H5.addHash([5072499452, this.key$1, this.value$1]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.KeyValuePair$2(TKey,TValue))) { - return false; - } - return H5.equals(this.key$1, o.key$1) && H5.equals(this.value$1, o.value$1); - }, - $clone: function (to) { return this; } - } - }; }); - - // @source IEnumerator.js - - H5.define("System.Collections.IEnumerator", { - $kind: "interface" - }); - - // @source IComparer.js - - H5.define("System.Collections.IComparer", { - $kind: "interface" - }); - - // @source IDictionaryEnumerator.js - - H5.define("System.Collections.IDictionaryEnumerator", { - inherits: [System.Collections.IEnumerator], - $kind: "interface" - }); - - // @source IEqualityComparer.js - - H5.define("System.Collections.IEqualityComparer", { - $kind: "interface" - }); - - // @source IStructuralComparable.js - - H5.define("System.Collections.IStructuralComparable", { - $kind: "interface" - }); - - // @source IStructuralEquatable.js - - H5.define("System.Collections.IStructuralEquatable", { - $kind: "interface" - }); - - // @source IEnumerator.js - - H5.definei("System.Collections.Generic.IEnumerator$1", function (T) { return { - inherits: [System.IDisposable,System.Collections.IEnumerator], - $kind: "interface", - $variance: [1] - }; }); - - // @source IComparer.js - - H5.definei("System.Collections.Generic.IComparer$1", function (T) { return { - $kind: "interface", - $variance: [2] - }; }); - - // @source KeyValuePairs.js - - H5.define("System.Collections.KeyValuePairs", { - fields: { - key: null, - value: null - }, - props: { - Key: { - get: function () { - return this.key; - } - }, - Value: { - get: function () { - return this.value; - } - } - }, - ctors: { - ctor: function (key, value) { - this.$initialize(); - this.value = value; - this.key = key; - } - } - }); - - // @source SortedList.js - - H5.define("System.Collections.SortedList", { - inherits: [System.Collections.IDictionary,System.ICloneable], - statics: { - fields: { - emptyArray: null - }, - ctors: { - init: function () { - this.emptyArray = System.Array.init(0, null, System.Object); - } - }, - methods: { - Synchronized: function (list) { - if (list == null) { - throw new System.ArgumentNullException.$ctor1("list"); - } - - return new System.Collections.SortedList.SyncSortedList(list); - } - } - }, - fields: { - keys: null, - values: null, - _size: 0, - version: 0, - comparer: null, - keyList: null, - valueList: null - }, - props: { - Capacity: { - get: function () { - return this.keys.length; - }, - set: function (value) { - if (value < this.Count) { - throw new System.ArgumentOutOfRangeException.$ctor1("value"); - } - - if (value !== this.keys.length) { - if (value > 0) { - var newKeys = System.Array.init(value, null, System.Object); - var newValues = System.Array.init(value, null, System.Object); - if (this._size > 0) { - System.Array.copy(this.keys, 0, newKeys, 0, this._size); - System.Array.copy(this.values, 0, newValues, 0, this._size); - } - this.keys = newKeys; - this.values = newValues; - } else { - this.keys = System.Collections.SortedList.emptyArray; - this.values = System.Collections.SortedList.emptyArray; - } - } - } - }, - Count: { - get: function () { - return this._size; - } - }, - Keys: { - get: function () { - return this.GetKeyList(); - } - }, - Values: { - get: function () { - return this.GetValueList(); - } - }, - IsReadOnly: { - get: function () { - return false; - } - }, - IsFixedSize: { - get: function () { - return false; - } - }, - IsSynchronized: { - get: function () { - return false; - } - }, - SyncRoot: { - get: function () { - return null; - } - } - }, - alias: [ - "add", "System$Collections$IDictionary$add", - "Count", "System$Collections$ICollection$Count", - "Keys", "System$Collections$IDictionary$Keys", - "Values", "System$Collections$IDictionary$Values", - "IsReadOnly", "System$Collections$IDictionary$IsReadOnly", - "IsFixedSize", "System$Collections$IDictionary$IsFixedSize", - "IsSynchronized", "System$Collections$ICollection$IsSynchronized", - "SyncRoot", "System$Collections$ICollection$SyncRoot", - "clear", "System$Collections$IDictionary$clear", - "clone", "System$ICloneable$clone", - "contains", "System$Collections$IDictionary$contains", - "copyTo", "System$Collections$ICollection$copyTo", - "GetEnumerator", "System$Collections$IDictionary$GetEnumerator", - "getItem", "System$Collections$IDictionary$getItem", - "setItem", "System$Collections$IDictionary$setItem", - "remove", "System$Collections$IDictionary$remove" - ], - ctors: { - ctor: function () { - this.$initialize(); - this.Init(); - }, - $ctor5: function (initialCapacity) { - this.$initialize(); - if (initialCapacity < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("initialCapacity"); - } - - this.keys = System.Array.init(initialCapacity, null, System.Object); - this.values = System.Array.init(initialCapacity, null, System.Object); - this.comparer = new (System.Collections.Generic.Comparer$1(Object))(System.Collections.Generic.Comparer$1.$default.fn); - }, - $ctor1: function (comparer) { - System.Collections.SortedList.ctor.call(this); - if (comparer != null) { - this.comparer = comparer; - } - }, - $ctor2: function (comparer, capacity) { - System.Collections.SortedList.$ctor1.call(this, comparer); - this.Capacity = capacity; - }, - $ctor3: function (d) { - System.Collections.SortedList.$ctor4.call(this, d, null); - }, - $ctor4: function (d, comparer) { - System.Collections.SortedList.$ctor2.call(this, comparer, (d != null ? System.Array.getCount(d) : 0)); - if (d == null) { - throw new System.ArgumentNullException.$ctor1("d"); - } - - System.Array.copyTo(d.System$Collections$IDictionary$Keys, this.keys, 0); - System.Array.copyTo(d.System$Collections$IDictionary$Values, this.values, 0); - System.Array.sortDict(this.keys, this.values, 0, null, comparer); - this._size = System.Array.getCount(d); - } - }, - methods: { - getItem: function (key) { - var i = this.IndexOfKey(key); - if (i >= 0) { - return this.values[System.Array.index(i, this.values)]; - } - return null; - }, - setItem: function (key, value) { - if (key == null) { - throw new System.ArgumentNullException.$ctor1("key"); - } - - var i = System.Array.binarySearch(this.keys, 0, this._size, key, this.comparer); - if (i >= 0) { - this.values[System.Array.index(i, this.values)] = value; - this.version = (this.version + 1) | 0; - return; - } - this.Insert(~i, key, value); - }, - Init: function () { - this.keys = System.Collections.SortedList.emptyArray; - this.values = System.Collections.SortedList.emptyArray; - this._size = 0; - this.comparer = new (System.Collections.Generic.Comparer$1(Object))(System.Collections.Generic.Comparer$1.$default.fn); - }, - add: function (key, value) { - if (key == null) { - throw new System.ArgumentNullException.$ctor1("key"); - } - - var i = System.Array.binarySearch(this.keys, 0, this._size, key, this.comparer); - if (i >= 0) { - throw new System.ArgumentException.ctor(); - } - this.Insert(~i, key, value); - }, - clear: function () { - this.version = (this.version + 1) | 0; - System.Array.fill(this.keys, null, 0, this._size); - System.Array.fill(this.values, null, 0, this._size); - this._size = 0; - - }, - clone: function () { - var sl = new System.Collections.SortedList.$ctor5(this._size); - System.Array.copy(this.keys, 0, sl.keys, 0, this._size); - System.Array.copy(this.values, 0, sl.values, 0, this._size); - sl._size = this._size; - sl.version = this.version; - sl.comparer = this.comparer; - return sl; - }, - contains: function (key) { - return this.IndexOfKey(key) >= 0; - }, - ContainsKey: function (key) { - return this.IndexOfKey(key) >= 0; - }, - ContainsValue: function (value) { - return this.IndexOfValue(value) >= 0; - }, - copyTo: function (array, arrayIndex) { - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - if (System.Array.getRank(array) !== 1) { - throw new System.ArgumentException.ctor(); - } - if (arrayIndex < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("arrayIndex"); - } - if (((array.length - arrayIndex) | 0) < this.Count) { - throw new System.ArgumentException.ctor(); - } - for (var i = 0; i < this.Count; i = (i + 1) | 0) { - var entry = new System.Collections.DictionaryEntry.$ctor1(this.keys[System.Array.index(i, this.keys)], this.values[System.Array.index(i, this.values)]); - System.Array.set(array, entry.$clone(), ((i + arrayIndex) | 0)); - } - }, - ToKeyValuePairsArray: function () { - var array = System.Array.init(this.Count, null, System.Collections.KeyValuePairs); - for (var i = 0; i < this.Count; i = (i + 1) | 0) { - array[System.Array.index(i, array)] = new System.Collections.KeyValuePairs(this.keys[System.Array.index(i, this.keys)], this.values[System.Array.index(i, this.values)]); - } - return array; - }, - EnsureCapacity: function (min) { - var newCapacity = this.keys.length === 0 ? 16 : H5.Int.mul(this.keys.length, 2); - - if ((newCapacity >>> 0) > 2146435071) { - newCapacity = 2146435071; - } - if (newCapacity < min) { - newCapacity = min; - } - this.Capacity = newCapacity; - }, - GetByIndex: function (index) { - if (index < 0 || index >= this.Count) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - return this.values[System.Array.index(index, this.values)]; - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return new System.Collections.SortedList.SortedListEnumerator(this, 0, this._size, System.Collections.SortedList.SortedListEnumerator.DictEntry); - }, - GetEnumerator: function () { - return new System.Collections.SortedList.SortedListEnumerator(this, 0, this._size, System.Collections.SortedList.SortedListEnumerator.DictEntry); - }, - GetKey: function (index) { - if (index < 0 || index >= this.Count) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - return this.keys[System.Array.index(index, this.keys)]; - }, - GetKeyList: function () { - if (this.keyList == null) { - this.keyList = new System.Collections.SortedList.KeyList(this); - } - return this.keyList; - }, - GetValueList: function () { - if (this.valueList == null) { - this.valueList = new System.Collections.SortedList.ValueList(this); - } - return this.valueList; - }, - IndexOfKey: function (key) { - if (key == null) { - throw new System.ArgumentNullException.$ctor1("key"); - } - - var ret = System.Array.binarySearch(this.keys, 0, this._size, key, this.comparer); - return ret >= 0 ? ret : -1; - }, - IndexOfValue: function (value) { - return System.Array.indexOfT(this.values, value, 0, this._size); - }, - Insert: function (index, key, value) { - if (this._size === this.keys.length) { - this.EnsureCapacity(((this._size + 1) | 0)); - } - if (index < this._size) { - System.Array.copy(this.keys, index, this.keys, ((index + 1) | 0), ((this._size - index) | 0)); - System.Array.copy(this.values, index, this.values, ((index + 1) | 0), ((this._size - index) | 0)); - } - this.keys[System.Array.index(index, this.keys)] = key; - this.values[System.Array.index(index, this.values)] = value; - this._size = (this._size + 1) | 0; - this.version = (this.version + 1) | 0; - }, - RemoveAt: function (index) { - if (index < 0 || index >= this.Count) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - this._size = (this._size - 1) | 0; - if (index < this._size) { - System.Array.copy(this.keys, ((index + 1) | 0), this.keys, index, ((this._size - index) | 0)); - System.Array.copy(this.values, ((index + 1) | 0), this.values, index, ((this._size - index) | 0)); - } - this.keys[System.Array.index(this._size, this.keys)] = null; - this.values[System.Array.index(this._size, this.values)] = null; - this.version = (this.version + 1) | 0; - }, - remove: function (key) { - var i = this.IndexOfKey(key); - if (i >= 0) { - this.RemoveAt(i); - } - }, - SetByIndex: function (index, value) { - if (index < 0 || index >= this.Count) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - this.values[System.Array.index(index, this.values)] = value; - this.version = (this.version + 1) | 0; - }, - TrimToSize: function () { - this.Capacity = this._size; - } - } - }); - - // @source KeyList.js - - H5.define("System.Collections.SortedList.KeyList", { - inherits: [System.Collections.IList], - $kind: "nested class", - fields: { - sortedList: null - }, - props: { - Count: { - get: function () { - return this.sortedList._size; - } - }, - IsReadOnly: { - get: function () { - return true; - } - }, - IsFixedSize: { - get: function () { - return true; - } - }, - IsSynchronized: { - get: function () { - return this.sortedList.IsSynchronized; - } - }, - SyncRoot: { - get: function () { - return this.sortedList.SyncRoot; - } - } - }, - alias: [ - "Count", "System$Collections$ICollection$Count", - "IsReadOnly", "System$Collections$IList$IsReadOnly", - "IsFixedSize", "System$Collections$IList$IsFixedSize", - "IsSynchronized", "System$Collections$ICollection$IsSynchronized", - "SyncRoot", "System$Collections$ICollection$SyncRoot", - "add", "System$Collections$IList$add", - "clear", "System$Collections$IList$clear", - "contains", "System$Collections$IList$contains", - "copyTo", "System$Collections$ICollection$copyTo", - "insert", "System$Collections$IList$insert", - "getItem", "System$Collections$IList$getItem", - "setItem", "System$Collections$IList$setItem", - "GetEnumerator", "System$Collections$IEnumerable$GetEnumerator", - "indexOf", "System$Collections$IList$indexOf", - "remove", "System$Collections$IList$remove", - "removeAt", "System$Collections$IList$removeAt" - ], - ctors: { - ctor: function (sortedList) { - this.$initialize(); - this.sortedList = sortedList; - } - }, - methods: { - getItem: function (index) { - return this.sortedList.GetKey(index); - }, - setItem: function (index, value) { - throw new System.NotSupportedException.ctor(); - }, - add: function (key) { - throw new System.NotSupportedException.ctor(); - }, - clear: function () { - throw new System.NotSupportedException.ctor(); - }, - contains: function (key) { - return this.sortedList.contains(key); - }, - copyTo: function (array, arrayIndex) { - if (array != null && System.Array.getRank(array) !== 1) { - throw new System.ArgumentException.ctor(); - } - - System.Array.copy(this.sortedList.keys, 0, array, arrayIndex, this.sortedList.Count); - }, - insert: function (index, value) { - throw new System.NotSupportedException.ctor(); - }, - GetEnumerator: function () { - return new System.Collections.SortedList.SortedListEnumerator(this.sortedList, 0, this.sortedList.Count, System.Collections.SortedList.SortedListEnumerator.Keys); - }, - indexOf: function (key) { - if (key == null) { - throw new System.ArgumentNullException.$ctor1("key"); - } - - var i = System.Array.binarySearch(this.sortedList.keys, 0, this.sortedList.Count, key, this.sortedList.comparer); - if (i >= 0) { - return i; - } - return -1; - }, - remove: function (key) { - throw new System.NotSupportedException.ctor(); - }, - removeAt: function (index) { - throw new System.NotSupportedException.ctor(); - } - } - }); - - // @source SortedListDebugView.js - - H5.define("System.Collections.SortedList.SortedListDebugView", { - $kind: "nested class", - fields: { - sortedList: null - }, - props: { - Items: { - get: function () { - return this.sortedList.ToKeyValuePairsArray(); - } - } - }, - ctors: { - ctor: function (sortedList) { - this.$initialize(); - if (sortedList == null) { - throw new System.ArgumentNullException.$ctor1("sortedList"); - } - - this.sortedList = sortedList; - } - } - }); - - // @source SortedListEnumerator.js - - H5.define("System.Collections.SortedList.SortedListEnumerator", { - inherits: [System.Collections.IDictionaryEnumerator,System.ICloneable], - $kind: "nested class", - statics: { - fields: { - Keys: 0, - Values: 0, - DictEntry: 0 - }, - ctors: { - init: function () { - this.Keys = 1; - this.Values = 2; - this.DictEntry = 3; - } - } - }, - fields: { - sortedList: null, - key: null, - value: null, - index: 0, - startIndex: 0, - endIndex: 0, - version: 0, - current: false, - getObjectRetType: 0 - }, - props: { - Key: { - get: function () { - if (this.version !== this.sortedList.version) { - throw new System.InvalidOperationException.ctor(); - } - if (this.current === false) { - throw new System.InvalidOperationException.ctor(); - } - return this.key; - } - }, - Entry: { - get: function () { - if (this.version !== this.sortedList.version) { - throw new System.InvalidOperationException.ctor(); - } - if (this.current === false) { - throw new System.InvalidOperationException.ctor(); - } - return new System.Collections.DictionaryEntry.$ctor1(this.key, this.value); - } - }, - Current: { - get: function () { - if (this.current === false) { - throw new System.InvalidOperationException.ctor(); - } - - if (this.getObjectRetType === System.Collections.SortedList.SortedListEnumerator.Keys) { - return this.key; - } else { - if (this.getObjectRetType === System.Collections.SortedList.SortedListEnumerator.Values) { - return this.value; - } else { - return new System.Collections.DictionaryEntry.$ctor1(this.key, this.value).$clone(); - } - } - } - }, - Value: { - get: function () { - if (this.version !== this.sortedList.version) { - throw new System.InvalidOperationException.ctor(); - } - if (this.current === false) { - throw new System.InvalidOperationException.ctor(); - } - return this.value; - } - } - }, - alias: [ - "clone", "System$ICloneable$clone", - "Key", "System$Collections$IDictionaryEnumerator$Key", - "moveNext", "System$Collections$IEnumerator$moveNext", - "Entry", "System$Collections$IDictionaryEnumerator$Entry", - "Current", "System$Collections$IEnumerator$Current", - "Value", "System$Collections$IDictionaryEnumerator$Value", - "reset", "System$Collections$IEnumerator$reset" - ], - ctors: { - ctor: function (sortedList, index, count, getObjRetType) { - this.$initialize(); - this.sortedList = sortedList; - this.index = index; - this.startIndex = index; - this.endIndex = (index + count) | 0; - this.version = sortedList.version; - this.getObjectRetType = getObjRetType; - this.current = false; - } - }, - methods: { - clone: function () { - return H5.clone(this); - }, - moveNext: function () { - var $t, $t1; - if (this.version !== this.sortedList.version) { - throw new System.InvalidOperationException.ctor(); - } - if (this.index < this.endIndex) { - this.key = ($t = this.sortedList.keys)[System.Array.index(this.index, $t)]; - this.value = ($t1 = this.sortedList.values)[System.Array.index(this.index, $t1)]; - this.index = (this.index + 1) | 0; - this.current = true; - return true; - } - this.key = null; - this.value = null; - this.current = false; - return false; - }, - reset: function () { - if (this.version !== this.sortedList.version) { - throw new System.InvalidOperationException.ctor(); - } - this.index = this.startIndex; - this.current = false; - this.key = null; - this.value = null; - } - } - }); - - // @source SyncSortedList.js - - H5.define("System.Collections.SortedList.SyncSortedList", { - inherits: [System.Collections.SortedList], - $kind: "nested class", - fields: { - _list: null, - _root: null - }, - props: { - Count: { - get: function () { - this._root; - { - return this._list.Count; - } - } - }, - SyncRoot: { - get: function () { - return this._root; - } - }, - IsReadOnly: { - get: function () { - return this._list.IsReadOnly; - } - }, - IsFixedSize: { - get: function () { - return this._list.IsFixedSize; - } - }, - IsSynchronized: { - get: function () { - return true; - } - }, - Capacity: { - get: function () { - this._root; - { - return this._list.Capacity; - } - } - } - }, - alias: [ - "Count", "System$Collections$ICollection$Count", - "SyncRoot", "System$Collections$ICollection$SyncRoot", - "IsReadOnly", "System$Collections$IDictionary$IsReadOnly", - "IsFixedSize", "System$Collections$IDictionary$IsFixedSize", - "IsSynchronized", "System$Collections$ICollection$IsSynchronized", - "getItem", "System$Collections$IDictionary$getItem", - "setItem", "System$Collections$IDictionary$setItem", - "add", "System$Collections$IDictionary$add", - "clear", "System$Collections$IDictionary$clear", - "clone", "System$ICloneable$clone", - "contains", "System$Collections$IDictionary$contains", - "copyTo", "System$Collections$ICollection$copyTo", - "GetEnumerator", "System$Collections$IDictionary$GetEnumerator", - "GetEnumerator", "System$Collections$IEnumerable$GetEnumerator", - "remove", "System$Collections$IDictionary$remove" - ], - ctors: { - ctor: function (list) { - this.$initialize(); - System.Collections.SortedList.ctor.call(this); - this._list = list; - this._root = list.SyncRoot; - } - }, - methods: { - getItem: function (key) { - this._root; - { - return this._list.getItem(key); - } - }, - setItem: function (key, value) { - this._root; - { - this._list.setItem(key, value); - } - }, - add: function (key, value) { - this._root; - { - this._list.add(key, value); - } - }, - clear: function () { - this._root; - { - this._list.clear(); - } - }, - clone: function () { - this._root; - { - return this._list.clone(); - } - }, - contains: function (key) { - this._root; - { - return this._list.contains(key); - } - }, - ContainsKey: function (key) { - this._root; - { - return this._list.ContainsKey(key); - } - }, - ContainsValue: function (key) { - this._root; - { - return this._list.ContainsValue(key); - } - }, - copyTo: function (array, index) { - this._root; - { - this._list.copyTo(array, index); - } - }, - GetByIndex: function (index) { - this._root; - { - return this._list.GetByIndex(index); - } - }, - GetEnumerator: function () { - this._root; - { - return this._list.GetEnumerator(); - } - }, - GetKey: function (index) { - this._root; - { - return this._list.GetKey(index); - } - }, - GetKeyList: function () { - this._root; - { - return this._list.GetKeyList(); - } - }, - GetValueList: function () { - this._root; - { - return this._list.GetValueList(); - } - }, - IndexOfKey: function (key) { - if (key == null) { - throw new System.ArgumentNullException.$ctor1("key"); - } - - return this._list.IndexOfKey(key); - }, - IndexOfValue: function (value) { - this._root; - { - return this._list.IndexOfValue(value); - } - }, - RemoveAt: function (index) { - this._root; - { - this._list.RemoveAt(index); - } - }, - remove: function (key) { - this._root; - { - this._list.remove(key); - } - }, - SetByIndex: function (index, value) { - this._root; - { - this._list.SetByIndex(index, value); - } - }, - ToKeyValuePairsArray: function () { - return this._list.ToKeyValuePairsArray(); - }, - TrimToSize: function () { - this._root; - { - this._list.TrimToSize(); - } - } - } - }); - - // @source ValueList.js - - H5.define("System.Collections.SortedList.ValueList", { - inherits: [System.Collections.IList], - $kind: "nested class", - fields: { - sortedList: null - }, - props: { - Count: { - get: function () { - return this.sortedList._size; - } - }, - IsReadOnly: { - get: function () { - return true; - } - }, - IsFixedSize: { - get: function () { - return true; - } - }, - IsSynchronized: { - get: function () { - return this.sortedList.IsSynchronized; - } - }, - SyncRoot: { - get: function () { - return this.sortedList.SyncRoot; - } - } - }, - alias: [ - "Count", "System$Collections$ICollection$Count", - "IsReadOnly", "System$Collections$IList$IsReadOnly", - "IsFixedSize", "System$Collections$IList$IsFixedSize", - "IsSynchronized", "System$Collections$ICollection$IsSynchronized", - "SyncRoot", "System$Collections$ICollection$SyncRoot", - "add", "System$Collections$IList$add", - "clear", "System$Collections$IList$clear", - "contains", "System$Collections$IList$contains", - "copyTo", "System$Collections$ICollection$copyTo", - "insert", "System$Collections$IList$insert", - "getItem", "System$Collections$IList$getItem", - "setItem", "System$Collections$IList$setItem", - "GetEnumerator", "System$Collections$IEnumerable$GetEnumerator", - "indexOf", "System$Collections$IList$indexOf", - "remove", "System$Collections$IList$remove", - "removeAt", "System$Collections$IList$removeAt" - ], - ctors: { - ctor: function (sortedList) { - this.$initialize(); - this.sortedList = sortedList; - } - }, - methods: { - getItem: function (index) { - return this.sortedList.GetByIndex(index); - }, - setItem: function (index, value) { - throw new System.NotSupportedException.ctor(); - }, - add: function (key) { - throw new System.NotSupportedException.ctor(); - }, - clear: function () { - throw new System.NotSupportedException.ctor(); - }, - contains: function (value) { - return this.sortedList.ContainsValue(value); - }, - copyTo: function (array, arrayIndex) { - if (array != null && System.Array.getRank(array) !== 1) { - throw new System.ArgumentException.ctor(); - } - - System.Array.copy(this.sortedList.values, 0, array, arrayIndex, this.sortedList.Count); - }, - insert: function (index, value) { - throw new System.NotSupportedException.ctor(); - }, - GetEnumerator: function () { - return new System.Collections.SortedList.SortedListEnumerator(this.sortedList, 0, this.sortedList.Count, System.Collections.SortedList.SortedListEnumerator.Values); - }, - indexOf: function (value) { - return System.Array.indexOfT(this.sortedList.values, value, 0, this.sortedList.Count); - }, - remove: function (value) { - throw new System.NotSupportedException.ctor(); - }, - removeAt: function (index) { - throw new System.NotSupportedException.ctor(); - } - } - }); - - // @source SortedList.js - - H5.define("System.Collections.Generic.SortedList$2", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.IDictionary$2(TKey,TValue),System.Collections.IDictionary,System.Collections.Generic.IReadOnlyDictionary$2(TKey,TValue)], - statics: { - fields: { - _defaultCapacity: 0, - MaxArrayLength: 0, - emptyKeys: null, - emptyValues: null - }, - ctors: { - init: function () { - this._defaultCapacity = 4; - this.MaxArrayLength = 2146435071; - this.emptyKeys = System.Array.init(0, function (){ - return H5.getDefaultValue(TKey); - }, TKey); - this.emptyValues = System.Array.init(0, function (){ - return H5.getDefaultValue(TValue); - }, TValue); - } - }, - methods: { - IsCompatibleKey: function (key) { - if (key == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key); - } - - return (H5.is(key, TKey)); - } - } - }, - fields: { - keys: null, - values: null, - _size: 0, - version: 0, - comparer: null, - keyList: null, - valueList: null - }, - props: { - Capacity: { - get: function () { - return this.keys.length; - }, - set: function (value) { - if (value !== this.keys.length) { - if (value < this._size) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.value, System.ExceptionResource.ArgumentOutOfRange_SmallCapacity); - } - - if (value > 0) { - var newKeys = System.Array.init(value, function (){ - return H5.getDefaultValue(TKey); - }, TKey); - var newValues = System.Array.init(value, function (){ - return H5.getDefaultValue(TValue); - }, TValue); - if (this._size > 0) { - System.Array.copy(this.keys, 0, newKeys, 0, this._size); - System.Array.copy(this.values, 0, newValues, 0, this._size); - } - this.keys = newKeys; - this.values = newValues; - } else { - this.keys = System.Collections.Generic.SortedList$2(TKey,TValue).emptyKeys; - this.values = System.Collections.Generic.SortedList$2(TKey,TValue).emptyValues; - } - } - } - }, - Comparer: { - get: function () { - return this.comparer; - } - }, - Count: { - get: function () { - return this._size; - } - }, - Keys: { - get: function () { - return this.GetKeyListHelper(); - } - }, - System$Collections$Generic$IDictionary$2$Keys: { - get: function () { - return this.GetKeyListHelper(); - } - }, - System$Collections$IDictionary$Keys: { - get: function () { - return this.GetKeyListHelper(); - } - }, - System$Collections$Generic$IReadOnlyDictionary$2$Keys: { - get: function () { - return this.GetKeyListHelper(); - } - }, - Values: { - get: function () { - return this.GetValueListHelper(); - } - }, - System$Collections$Generic$IDictionary$2$Values: { - get: function () { - return this.GetValueListHelper(); - } - }, - System$Collections$IDictionary$Values: { - get: function () { - return this.GetValueListHelper(); - } - }, - System$Collections$Generic$IReadOnlyDictionary$2$Values: { - get: function () { - return this.GetValueListHelper(); - } - }, - System$Collections$Generic$ICollection$1$IsReadOnly: { - get: function () { - return false; - } - }, - System$Collections$IDictionary$IsReadOnly: { - get: function () { - return false; - } - }, - System$Collections$IDictionary$IsFixedSize: { - get: function () { - return false; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return null; - } - } - }, - alias: [ - "add", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$add", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$add", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$add", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$contains", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$contains", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$remove", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$remove", - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Count", - "System$Collections$Generic$IDictionary$2$Keys", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Keys", - "System$Collections$Generic$IReadOnlyDictionary$2$Keys", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Keys", - "System$Collections$Generic$IDictionary$2$Values", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Values", - "System$Collections$Generic$IReadOnlyDictionary$2$Values", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Values", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$IsReadOnly", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$IsReadOnly", - "clear", "System$Collections$IDictionary$clear", - "clear", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$clear", - "containsKey", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$containsKey", - "containsKey", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$containsKey", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$copyTo", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$copyTo", - "System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$GetEnumerator", "System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$GetEnumerator", - "getItem", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$getItem", - "setItem", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$setItem", - "getItem", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$getItem", - "setItem", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$setItem", - "getItem$1", "System$Collections$IDictionary$getItem", - "setItem$1", "System$Collections$IDictionary$setItem", - "tryGetValue", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$tryGetValue", - "tryGetValue", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$tryGetValue", - "remove", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$remove" - ], - ctors: { - ctor: function () { - this.$initialize(); - this.keys = System.Collections.Generic.SortedList$2(TKey,TValue).emptyKeys; - this.values = System.Collections.Generic.SortedList$2(TKey,TValue).emptyValues; - this._size = 0; - this.comparer = new (System.Collections.Generic.Comparer$1(TKey))(System.Collections.Generic.Comparer$1.$default.fn); - }, - $ctor4: function (capacity) { - this.$initialize(); - if (capacity < 0) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$1(System.ExceptionArgument.capacity); - } - this.keys = System.Array.init(capacity, function (){ - return H5.getDefaultValue(TKey); - }, TKey); - this.values = System.Array.init(capacity, function (){ - return H5.getDefaultValue(TValue); - }, TValue); - this.comparer = new (System.Collections.Generic.Comparer$1(TKey))(System.Collections.Generic.Comparer$1.$default.fn); - }, - $ctor1: function (comparer) { - System.Collections.Generic.SortedList$2(TKey,TValue).ctor.call(this); - if (comparer != null) { - this.comparer = comparer; - } - }, - $ctor5: function (capacity, comparer) { - System.Collections.Generic.SortedList$2(TKey,TValue).$ctor1.call(this, comparer); - this.Capacity = capacity; - }, - $ctor2: function (dictionary) { - System.Collections.Generic.SortedList$2(TKey,TValue).$ctor3.call(this, dictionary, null); - }, - $ctor3: function (dictionary, comparer) { - System.Collections.Generic.SortedList$2(TKey,TValue).$ctor5.call(this, (dictionary != null ? System.Array.getCount(dictionary, System.Collections.Generic.KeyValuePair$2(TKey,TValue)) : 0), comparer); - if (dictionary == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.dictionary); - } - - System.Array.copyTo(dictionary["System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Keys"], this.keys, 0, TKey); - System.Array.copyTo(dictionary["System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Values"], this.values, 0, TValue); - System.Array.sortDict(this.keys, this.values, 0, null, this.comparer); - this._size = System.Array.getCount(dictionary, System.Collections.Generic.KeyValuePair$2(TKey,TValue)); - } - }, - methods: { - getItem: function (key) { - var i = this.IndexOfKey(key); - if (i >= 0) { - return this.values[System.Array.index(i, this.values)]; - } - - throw new System.Collections.Generic.KeyNotFoundException.ctor(); - }, - setItem: function (key, value) { - if (key == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key); - } - var i = System.Array.binarySearch(this.keys, 0, this._size, key, this.comparer); - if (i >= 0) { - this.values[System.Array.index(i, this.values)] = value; - this.version = (this.version + 1) | 0; - return; - } - this.Insert(~i, key, value); - }, - getItem$1: function (key) { - if (System.Collections.Generic.SortedList$2(TKey,TValue).IsCompatibleKey(key)) { - var i = this.IndexOfKey(H5.cast(H5.unbox(key, TKey), TKey)); - if (i >= 0) { - return this.values[System.Array.index(i, this.values)]; - } - } - - return null; - }, - setItem$1: function (key, value) { - if (!System.Collections.Generic.SortedList$2(TKey,TValue).IsCompatibleKey(key)) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key); - } - - System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(TValue, value, System.ExceptionArgument.value); - - try { - var tempKey = H5.cast(H5.unbox(key, TKey), TKey); - try { - this.setItem(tempKey, H5.cast(H5.unbox(value, TValue), TValue)); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.InvalidCastException)) { - System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object, value, TValue); - } else { - throw $e1; - } - } - } catch ($e2) { - $e2 = System.Exception.create($e2); - if (H5.is($e2, System.InvalidCastException)) { - System.ThrowHelper.ThrowWrongKeyTypeArgumentException(System.Object, key, TKey); - } else { - throw $e2; - } - } - }, - add: function (key, value) { - if (key == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key); - } - var i = System.Array.binarySearch(this.keys, 0, this._size, key, this.comparer); - if (i >= 0) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_AddingDuplicate); - } - this.Insert(~i, key, value); - }, - System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$add: function (keyValuePair) { - this.add(keyValuePair.key, keyValuePair.value); - }, - System$Collections$IDictionary$add: function (key, value) { - if (key == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key); - } - - System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(TValue, value, System.ExceptionArgument.value); - - try { - var tempKey = H5.cast(H5.unbox(key, TKey), TKey); - - try { - this.add(tempKey, H5.cast(H5.unbox(value, TValue), TValue)); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.InvalidCastException)) { - System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object, value, TValue); - } else { - throw $e1; - } - } - } catch ($e2) { - $e2 = System.Exception.create($e2); - if (H5.is($e2, System.InvalidCastException)) { - System.ThrowHelper.ThrowWrongKeyTypeArgumentException(System.Object, key, TKey); - } else { - throw $e2; - } - } - }, - System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$contains: function (keyValuePair) { - var index = this.IndexOfKey(keyValuePair.key); - if (index >= 0 && System.Collections.Generic.EqualityComparer$1(TValue).def.equals2(this.values[System.Array.index(index, this.values)], keyValuePair.value)) { - return true; - } - return false; - }, - System$Collections$IDictionary$contains: function (key) { - if (System.Collections.Generic.SortedList$2(TKey,TValue).IsCompatibleKey(key)) { - return this.containsKey(H5.cast(H5.unbox(key, TKey), TKey)); - } - return false; - }, - System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$remove: function (keyValuePair) { - var index = this.IndexOfKey(keyValuePair.key); - if (index >= 0 && System.Collections.Generic.EqualityComparer$1(TValue).def.equals2(this.values[System.Array.index(index, this.values)], keyValuePair.value)) { - this.RemoveAt(index); - return true; - } - return false; - }, - remove: function (key) { - var i = this.IndexOfKey(key); - if (i >= 0) { - this.RemoveAt(i); - } - return i >= 0; - }, - System$Collections$IDictionary$remove: function (key) { - if (System.Collections.Generic.SortedList$2(TKey,TValue).IsCompatibleKey(key)) { - this.remove(H5.cast(H5.unbox(key, TKey), TKey)); - } - }, - GetKeyListHelper: function () { - if (this.keyList == null) { - this.keyList = new (System.Collections.Generic.SortedList$2.KeyList(TKey,TValue))(this); - } - return this.keyList; - }, - GetValueListHelper: function () { - if (this.valueList == null) { - this.valueList = new (System.Collections.Generic.SortedList$2.ValueList(TKey,TValue))(this); - } - return this.valueList; - }, - clear: function () { - this.version = (this.version + 1) | 0; - System.Array.fill(this.keys, function () { - return H5.getDefaultValue(TKey); - }, 0, this._size); - System.Array.fill(this.values, function () { - return H5.getDefaultValue(TValue); - }, 0, this._size); - this._size = 0; - }, - containsKey: function (key) { - return this.IndexOfKey(key) >= 0; - }, - ContainsValue: function (value) { - return this.IndexOfValue(value) >= 0; - }, - System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$copyTo: function (array, arrayIndex) { - if (array == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array); - } - - if (arrayIndex < 0 || arrayIndex > array.length) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.arrayIndex, System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - } - - if (((array.length - arrayIndex) | 0) < this.Count) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall); - } - - for (var i = 0; i < this.Count; i = (i + 1) | 0) { - var entry = new (System.Collections.Generic.KeyValuePair$2(TKey,TValue)).$ctor1(this.keys[System.Array.index(i, this.keys)], this.values[System.Array.index(i, this.values)]); - array[System.Array.index(((arrayIndex + i) | 0), array)] = entry; - } - }, - System$Collections$ICollection$copyTo: function (array, arrayIndex) { - if (array == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array); - } - - if (System.Array.getRank(array) !== 1) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported); - } - - if (System.Array.getLower(array, 0) !== 0) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_NonZeroLowerBound); - } - - if (arrayIndex < 0 || arrayIndex > array.length) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.arrayIndex, System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - } - - if (((array.length - arrayIndex) | 0) < this.Count) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall); - } - var keyValuePairArray; - if (((keyValuePairArray = H5.as(array, System.Array.type(System.Collections.Generic.KeyValuePair$2(TKey,TValue))))) != null) { - for (var i = 0; i < this.Count; i = (i + 1) | 0) { - keyValuePairArray[System.Array.index(((i + arrayIndex) | 0), keyValuePairArray)] = new (System.Collections.Generic.KeyValuePair$2(TKey,TValue)).$ctor1(this.keys[System.Array.index(i, this.keys)], this.values[System.Array.index(i, this.values)]); - } - } else { - var objects = H5.as(array, System.Array.type(System.Object)); - if (objects == null) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType); - } - - try { - for (var i1 = 0; i1 < this.Count; i1 = (i1 + 1) | 0) { - objects[System.Array.index(((i1 + arrayIndex) | 0), objects)] = new (System.Collections.Generic.KeyValuePair$2(TKey,TValue)).$ctor1(this.keys[System.Array.index(i1, this.keys)], this.values[System.Array.index(i1, this.values)]); - } - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.ArrayTypeMismatchException)) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType); - } else { - throw $e1; - } - } - - } - }, - EnsureCapacity: function (min) { - var newCapacity = this.keys.length === 0 ? System.Collections.Generic.SortedList$2(TKey,TValue)._defaultCapacity : H5.Int.mul(this.keys.length, 2); - if ((newCapacity >>> 0) > System.Collections.Generic.SortedList$2(TKey,TValue).MaxArrayLength) { - newCapacity = System.Collections.Generic.SortedList$2(TKey,TValue).MaxArrayLength; - } - if (newCapacity < min) { - newCapacity = min; - } - this.Capacity = newCapacity; - }, - GetByIndex: function (index) { - if (index < 0 || index >= this._size) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index, System.ExceptionResource.ArgumentOutOfRange_Index); - } - return this.values[System.Array.index(index, this.values)]; - }, - GetEnumerator: function () { - return new (System.Collections.Generic.SortedList$2.Enumerator(TKey,TValue)).$ctor1(this, System.Collections.Generic.SortedList$2.Enumerator(TKey,TValue).KeyValuePair).$clone(); - }, - System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$GetEnumerator: function () { - return new (System.Collections.Generic.SortedList$2.Enumerator(TKey,TValue)).$ctor1(this, System.Collections.Generic.SortedList$2.Enumerator(TKey,TValue).KeyValuePair).$clone(); - }, - System$Collections$IDictionary$GetEnumerator: function () { - return new (System.Collections.Generic.SortedList$2.Enumerator(TKey,TValue)).$ctor1(this, System.Collections.Generic.SortedList$2.Enumerator(TKey,TValue).DictEntry).$clone(); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return new (System.Collections.Generic.SortedList$2.Enumerator(TKey,TValue)).$ctor1(this, System.Collections.Generic.SortedList$2.Enumerator(TKey,TValue).KeyValuePair).$clone(); - }, - GetKey: function (index) { - if (index < 0 || index >= this._size) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index, System.ExceptionResource.ArgumentOutOfRange_Index); - } - return this.keys[System.Array.index(index, this.keys)]; - }, - IndexOfKey: function (key) { - if (key == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key); - } - var ret = System.Array.binarySearch(this.keys, 0, this._size, key, this.comparer); - return ret >= 0 ? ret : -1; - }, - IndexOfValue: function (value) { - return System.Array.indexOfT(this.values, value, 0, this._size); - }, - Insert: function (index, key, value) { - if (this._size === this.keys.length) { - this.EnsureCapacity(((this._size + 1) | 0)); - } - if (index < this._size) { - System.Array.copy(this.keys, index, this.keys, ((index + 1) | 0), ((this._size - index) | 0)); - System.Array.copy(this.values, index, this.values, ((index + 1) | 0), ((this._size - index) | 0)); - } - this.keys[System.Array.index(index, this.keys)] = key; - this.values[System.Array.index(index, this.values)] = value; - this._size = (this._size + 1) | 0; - this.version = (this.version + 1) | 0; - }, - tryGetValue: function (key, value) { - var i = this.IndexOfKey(key); - if (i >= 0) { - value.v = this.values[System.Array.index(i, this.values)]; - return true; - } - - value.v = H5.getDefaultValue(TValue); - return false; - }, - RemoveAt: function (index) { - if (index < 0 || index >= this._size) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index, System.ExceptionResource.ArgumentOutOfRange_Index); - } - this._size = (this._size - 1) | 0; - if (index < this._size) { - System.Array.copy(this.keys, ((index + 1) | 0), this.keys, index, ((this._size - index) | 0)); - System.Array.copy(this.values, ((index + 1) | 0), this.values, index, ((this._size - index) | 0)); - } - this.keys[System.Array.index(this._size, this.keys)] = H5.getDefaultValue(TKey); - this.values[System.Array.index(this._size, this.values)] = H5.getDefaultValue(TValue); - this.version = (this.version + 1) | 0; - }, - TrimExcess: function () { - var threshold = H5.Int.clip32(this.keys.length * 0.9); - if (this._size < threshold) { - this.Capacity = this._size; - } - } - } - }; }); - - // @source Enumerator.js - - H5.define("System.Collections.Generic.SortedList$2.Enumerator", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.IEnumerator$1(System.Collections.Generic.KeyValuePair$2(TKey,TValue)),System.Collections.IDictionaryEnumerator], - $kind: "nested struct", - statics: { - fields: { - KeyValuePair: 0, - DictEntry: 0 - }, - ctors: { - init: function () { - this.KeyValuePair = 1; - this.DictEntry = 2; - } - }, - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $._sortedList = null; - $.key = null; - $.value = null; - $.index = 0; - $.version = 0; - $.getEnumeratorRetType = 0; - return $;} - } - }, - fields: { - _sortedList: null, - key: H5.getDefaultValue(TKey), - value: H5.getDefaultValue(TValue), - index: 0, - version: 0, - getEnumeratorRetType: 0 - }, - props: { - System$Collections$IDictionaryEnumerator$Key: { - get: function () { - if (this.index === 0 || (this.index === ((this._sortedList.Count + 1) | 0))) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - return this.key; - } - }, - System$Collections$IDictionaryEnumerator$Entry: { - get: function () { - if (this.index === 0 || (this.index === ((this._sortedList.Count + 1) | 0))) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - return new System.Collections.DictionaryEntry.$ctor1(this.key, this.value); - } - }, - Current: { - get: function () { - return new (System.Collections.Generic.KeyValuePair$2(TKey,TValue)).$ctor1(this.key, this.value); - } - }, - System$Collections$IEnumerator$Current: { - get: function () { - if (this.index === 0 || (this.index === ((this._sortedList.Count + 1) | 0))) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - if (this.getEnumeratorRetType === System.Collections.Generic.SortedList$2.Enumerator(TKey,TValue).DictEntry) { - return new System.Collections.DictionaryEntry.$ctor1(this.key, this.value).$clone(); - } else { - return new (System.Collections.Generic.KeyValuePair$2(TKey,TValue)).$ctor1(this.key, this.value); - } - } - }, - System$Collections$IDictionaryEnumerator$Value: { - get: function () { - if (this.index === 0 || (this.index === ((this._sortedList.Count + 1) | 0))) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - return this.value; - } - } - }, - alias: [ - "Dispose", "System$IDisposable$Dispose", - "moveNext", "System$Collections$IEnumerator$moveNext", - "Current", ["System$Collections$Generic$IEnumerator$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"] - ], - ctors: { - $ctor1: function (sortedList, getEnumeratorRetType) { - this.$initialize(); - this._sortedList = sortedList; - this.index = 0; - this.version = this._sortedList.version; - this.getEnumeratorRetType = getEnumeratorRetType; - this.key = H5.getDefaultValue(TKey); - this.value = H5.getDefaultValue(TValue); - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - Dispose: function () { - this.index = 0; - this.key = H5.getDefaultValue(TKey); - this.value = H5.getDefaultValue(TValue); - }, - moveNext: function () { - var $t, $t1; - if (this.version !== this._sortedList.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - - if ((this.index >>> 0) < ((this._sortedList.Count) >>> 0)) { - this.key = ($t = this._sortedList.keys)[System.Array.index(this.index, $t)]; - this.value = ($t1 = this._sortedList.values)[System.Array.index(this.index, $t1)]; - this.index = (this.index + 1) | 0; - return true; - } - - this.index = (this._sortedList.Count + 1) | 0; - this.key = H5.getDefaultValue(TKey); - this.value = H5.getDefaultValue(TValue); - return false; - }, - System$Collections$IEnumerator$reset: function () { - if (this.version !== this._sortedList.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - - this.index = 0; - this.key = H5.getDefaultValue(TKey); - this.value = H5.getDefaultValue(TValue); - }, - getHashCode: function () { - var h = H5.addHash([3788985113, this._sortedList, this.key, this.value, this.index, this.version, this.getEnumeratorRetType]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.SortedList$2.Enumerator(TKey,TValue))) { - return false; - } - return H5.equals(this._sortedList, o._sortedList) && H5.equals(this.key, o.key) && H5.equals(this.value, o.value) && H5.equals(this.index, o.index) && H5.equals(this.version, o.version) && H5.equals(this.getEnumeratorRetType, o.getEnumeratorRetType); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.SortedList$2.Enumerator(TKey,TValue))(); - s._sortedList = this._sortedList; - s.key = this.key; - s.value = this.value; - s.index = this.index; - s.version = this.version; - s.getEnumeratorRetType = this.getEnumeratorRetType; - return s; - } - } - }; }); - - // @source KeyList.js - - H5.define("System.Collections.Generic.SortedList$2.KeyList", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.IList$1(TKey),System.Collections.ICollection], - $kind: "nested class", - fields: { - _dict: null - }, - props: { - Count: { - get: function () { - return this._dict._size; - } - }, - IsReadOnly: { - get: function () { - return true; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return H5.cast(this._dict, System.Collections.ICollection).System$Collections$ICollection$SyncRoot; - } - } - }, - alias: [ - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$Count", - "IsReadOnly", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$IsReadOnly", - "add", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$add", - "clear", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$clear", - "contains", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$contains", - "copyTo", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$copyTo", - "insert", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(TKey) + "$insert", - "getItem", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(TKey) + "$getItem", - "setItem", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(TKey) + "$setItem", - "GetEnumerator", ["System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(TKey) + "$GetEnumerator", "System$Collections$Generic$IEnumerable$1$GetEnumerator"], - "indexOf", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(TKey) + "$indexOf", - "remove", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$remove", - "removeAt", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(TKey) + "$removeAt" - ], - ctors: { - ctor: function (dictionary) { - this.$initialize(); - this._dict = dictionary; - } - }, - methods: { - getItem: function (index) { - return this._dict.GetKey(index); - }, - setItem: function (index, value) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_KeyCollectionSet); - }, - add: function (key) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite); - }, - clear: function () { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite); - }, - contains: function (key) { - return this._dict.containsKey(key); - }, - copyTo: function (array, arrayIndex) { - System.Array.copy(this._dict.keys, 0, array, arrayIndex, this._dict.Count); - }, - System$Collections$ICollection$copyTo: function (array, arrayIndex) { - if (array != null && System.Array.getRank(array) !== 1) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported); - } - - try { - System.Array.copy(this._dict.keys, 0, array, arrayIndex, this._dict.Count); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.ArrayTypeMismatchException)) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType); - } else { - throw $e1; - } - } - }, - insert: function (index, value) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite); - }, - GetEnumerator: function () { - return new (System.Collections.Generic.SortedList$2.SortedListKeyEnumerator(TKey,TValue))(this._dict); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return new (System.Collections.Generic.SortedList$2.SortedListKeyEnumerator(TKey,TValue))(this._dict); - }, - indexOf: function (key) { - if (key == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key); - } - - var i = System.Array.binarySearch(this._dict.keys, 0, this._dict.Count, key, this._dict.comparer); - if (i >= 0) { - return i; - } - return -1; - }, - remove: function (key) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite); - return false; - }, - removeAt: function (index) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite); - } - } - }; }); - - // @source SortedListKeyEnumerator.js - - H5.define("System.Collections.Generic.SortedList$2.SortedListKeyEnumerator", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.IEnumerator$1(TKey),System.Collections.IEnumerator], - $kind: "nested class", - fields: { - _sortedList: null, - index: 0, - version: 0, - currentKey: H5.getDefaultValue(TKey) - }, - props: { - Current: { - get: function () { - return this.currentKey; - } - }, - System$Collections$IEnumerator$Current: { - get: function () { - if (this.index === 0 || (this.index === ((this._sortedList.Count + 1) | 0))) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - return this.currentKey; - } - } - }, - alias: [ - "Dispose", "System$IDisposable$Dispose", - "moveNext", "System$Collections$IEnumerator$moveNext", - "Current", ["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(TKey) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"] - ], - ctors: { - ctor: function (sortedList) { - this.$initialize(); - this._sortedList = sortedList; - this.version = sortedList.version; - } - }, - methods: { - Dispose: function () { - this.index = 0; - this.currentKey = H5.getDefaultValue(TKey); - }, - moveNext: function () { - var $t; - if (this.version !== this._sortedList.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - - if ((this.index >>> 0) < ((this._sortedList.Count) >>> 0)) { - this.currentKey = ($t = this._sortedList.keys)[System.Array.index(this.index, $t)]; - this.index = (this.index + 1) | 0; - return true; - } - - this.index = (this._sortedList.Count + 1) | 0; - this.currentKey = H5.getDefaultValue(TKey); - return false; - }, - System$Collections$IEnumerator$reset: function () { - if (this.version !== this._sortedList.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - this.index = 0; - this.currentKey = H5.getDefaultValue(TKey); - } - } - }; }); - - // @source SortedListValueEnumerator.js - - H5.define("System.Collections.Generic.SortedList$2.SortedListValueEnumerator", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.IEnumerator$1(TValue),System.Collections.IEnumerator], - $kind: "nested class", - fields: { - _sortedList: null, - index: 0, - version: 0, - currentValue: H5.getDefaultValue(TValue) - }, - props: { - Current: { - get: function () { - return this.currentValue; - } - }, - System$Collections$IEnumerator$Current: { - get: function () { - if (this.index === 0 || (this.index === ((this._sortedList.Count + 1) | 0))) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - return this.currentValue; - } - } - }, - alias: [ - "Dispose", "System$IDisposable$Dispose", - "moveNext", "System$Collections$IEnumerator$moveNext", - "Current", ["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(TValue) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"] - ], - ctors: { - ctor: function (sortedList) { - this.$initialize(); - this._sortedList = sortedList; - this.version = sortedList.version; - } - }, - methods: { - Dispose: function () { - this.index = 0; - this.currentValue = H5.getDefaultValue(TValue); - }, - moveNext: function () { - var $t; - if (this.version !== this._sortedList.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - - if ((this.index >>> 0) < ((this._sortedList.Count) >>> 0)) { - this.currentValue = ($t = this._sortedList.values)[System.Array.index(this.index, $t)]; - this.index = (this.index + 1) | 0; - return true; - } - - this.index = (this._sortedList.Count + 1) | 0; - this.currentValue = H5.getDefaultValue(TValue); - return false; - }, - System$Collections$IEnumerator$reset: function () { - if (this.version !== this._sortedList.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - this.index = 0; - this.currentValue = H5.getDefaultValue(TValue); - } - } - }; }); - - // @source ValueList.js - - H5.define("System.Collections.Generic.SortedList$2.ValueList", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.IList$1(TValue),System.Collections.ICollection], - $kind: "nested class", - fields: { - _dict: null - }, - props: { - Count: { - get: function () { - return this._dict._size; - } - }, - IsReadOnly: { - get: function () { - return true; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return H5.cast(this._dict, System.Collections.ICollection).System$Collections$ICollection$SyncRoot; - } - } - }, - alias: [ - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$Count", - "IsReadOnly", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$IsReadOnly", - "add", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$add", - "clear", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$clear", - "contains", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$contains", - "copyTo", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$copyTo", - "insert", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(TValue) + "$insert", - "getItem", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(TValue) + "$getItem", - "setItem", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(TValue) + "$setItem", - "GetEnumerator", ["System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(TValue) + "$GetEnumerator", "System$Collections$Generic$IEnumerable$1$GetEnumerator"], - "indexOf", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(TValue) + "$indexOf", - "remove", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$remove", - "removeAt", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(TValue) + "$removeAt" - ], - ctors: { - ctor: function (dictionary) { - this.$initialize(); - this._dict = dictionary; - } - }, - methods: { - getItem: function (index) { - return this._dict.GetByIndex(index); - }, - setItem: function (index, value) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite); - }, - add: function (key) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite); - }, - clear: function () { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite); - }, - contains: function (value) { - return this._dict.ContainsValue(value); - }, - copyTo: function (array, arrayIndex) { - System.Array.copy(this._dict.values, 0, array, arrayIndex, this._dict.Count); - }, - System$Collections$ICollection$copyTo: function (array, arrayIndex) { - if (array != null && System.Array.getRank(array) !== 1) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported); - } - - try { - System.Array.copy(this._dict.values, 0, array, arrayIndex, this._dict.Count); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.ArrayTypeMismatchException)) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType); - } else { - throw $e1; - } - } - }, - insert: function (index, value) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite); - }, - GetEnumerator: function () { - return new (System.Collections.Generic.SortedList$2.SortedListValueEnumerator(TKey,TValue))(this._dict); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return new (System.Collections.Generic.SortedList$2.SortedListValueEnumerator(TKey,TValue))(this._dict); - }, - indexOf: function (value) { - return System.Array.indexOfT(this._dict.values, value, 0, this._dict.Count); - }, - remove: function (value) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite); - return false; - }, - removeAt: function (index) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_SortedListNestedWrite); - } - } - }; }); - - // @source SortedSet.js - - H5.define("System.Collections.Generic.SortedSet$1", function (T) { return { - inherits: [System.Collections.Generic.ISet$1(T),System.Collections.Generic.ICollection$1(T),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(T)], - statics: { - fields: { - ComparerName: null, - CountName: null, - ItemsName: null, - VersionName: null, - TreeName: null, - NodeValueName: null, - EnumStartName: null, - ReverseName: null, - EnumVersionName: null, - minName: null, - maxName: null, - lBoundActiveName: null, - uBoundActiveName: null, - StackAllocThreshold: 0 - }, - ctors: { - init: function () { - this.ComparerName = "Comparer"; - this.CountName = "Count"; - this.ItemsName = "Items"; - this.VersionName = "Version"; - this.TreeName = "Tree"; - this.NodeValueName = "Item"; - this.EnumStartName = "EnumStarted"; - this.ReverseName = "Reverse"; - this.EnumVersionName = "EnumVersion"; - this.minName = "Min"; - this.maxName = "Max"; - this.lBoundActiveName = "lBoundActive"; - this.uBoundActiveName = "uBoundActive"; - this.StackAllocThreshold = 100; - } - }, - methods: { - GetSibling: function (node, parent) { - if (H5.referenceEquals(parent.Left, node)) { - return parent.Right; - } - return parent.Left; - }, - Is2Node: function (node) { - return System.Collections.Generic.SortedSet$1(T).IsBlack(node) && System.Collections.Generic.SortedSet$1(T).IsNullOrBlack(node.Left) && System.Collections.Generic.SortedSet$1(T).IsNullOrBlack(node.Right); - }, - Is4Node: function (node) { - return System.Collections.Generic.SortedSet$1(T).IsRed(node.Left) && System.Collections.Generic.SortedSet$1(T).IsRed(node.Right); - }, - IsBlack: function (node) { - return (node != null && !node.IsRed); - }, - IsNullOrBlack: function (node) { - return (node == null || !node.IsRed); - }, - IsRed: function (node) { - return (node != null && node.IsRed); - }, - Merge2Nodes: function (parent, child1, child2) { - parent.IsRed = false; - child1.IsRed = true; - child2.IsRed = true; - }, - RotateLeft: function (node) { - var x = node.Right; - node.Right = x.Left; - x.Left = node; - return x; - }, - RotateLeftRight: function (node) { - var child = node.Left; - var grandChild = child.Right; - - node.Left = grandChild.Right; - grandChild.Right = node; - child.Right = grandChild.Left; - grandChild.Left = child; - return grandChild; - }, - RotateRight: function (node) { - var x = node.Left; - node.Left = x.Right; - x.Right = node; - return x; - }, - RotateRightLeft: function (node) { - var child = node.Right; - var grandChild = child.Left; - - node.Right = grandChild.Left; - grandChild.Left = node; - child.Left = grandChild.Right; - grandChild.Right = child; - return grandChild; - }, - RotationNeeded: function (parent, current, sibling) { - if (System.Collections.Generic.SortedSet$1(T).IsRed(sibling.Left)) { - if (H5.referenceEquals(parent.Left, current)) { - return System.Collections.Generic.TreeRotation.RightLeftRotation; - } - return System.Collections.Generic.TreeRotation.RightRotation; - } else { - if (H5.referenceEquals(parent.Left, current)) { - return System.Collections.Generic.TreeRotation.LeftRotation; - } - return System.Collections.Generic.TreeRotation.LeftRightRotation; - } - }, - CreateSetComparer: function () { - return new (System.Collections.Generic.SortedSetEqualityComparer$1(T)).ctor(); - }, - CreateSetComparer$1: function (memberEqualityComparer) { - return new (System.Collections.Generic.SortedSetEqualityComparer$1(T)).$ctor3(memberEqualityComparer); - }, - SortedSetEquals: function (set1, set2, comparer) { - var $t, $t1; - if (set1 == null) { - return (set2 == null); - } else if (set2 == null) { - return false; - } - - if (System.Collections.Generic.SortedSet$1(T).AreComparersEqual(set1, set2)) { - if (set1.Count !== set2.Count) { - return false; - } - - return set1.setEquals(set2); - } else { - var found = false; - $t = H5.getEnumerator(set1); - try { - while ($t.moveNext()) { - var item1 = $t.Current; - found = false; - $t1 = H5.getEnumerator(set2); - try { - while ($t1.moveNext()) { - var item2 = $t1.Current; - if (comparer[H5.geti(comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](item1, item2) === 0) { - found = true; - break; - } - } - } finally { - if (H5.is($t1, System.IDisposable)) { - $t1.System$IDisposable$Dispose(); - } - } - if (!found) { - return false; - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - return true; - } - - }, - AreComparersEqual: function (set1, set2) { - return H5.equals(set1.Comparer, set2.Comparer); - }, - Split4Node: function (node) { - node.IsRed = true; - node.Left.IsRed = false; - node.Right.IsRed = false; - }, - ConstructRootFromSortedArray: function (arr, startIndex, endIndex, redNode) { - - - - - - var size = (((endIndex - startIndex) | 0) + 1) | 0; - if (size === 0) { - return null; - } - var root = null; - if (size === 1) { - root = new (System.Collections.Generic.SortedSet$1.Node(T)).$ctor1(arr[System.Array.index(startIndex, arr)], false); - if (redNode != null) { - root.Left = redNode; - } - } else if (size === 2) { - root = new (System.Collections.Generic.SortedSet$1.Node(T)).$ctor1(arr[System.Array.index(startIndex, arr)], false); - root.Right = new (System.Collections.Generic.SortedSet$1.Node(T)).$ctor1(arr[System.Array.index(endIndex, arr)], false); - root.Right.IsRed = true; - if (redNode != null) { - root.Left = redNode; - } - } else if (size === 3) { - root = new (System.Collections.Generic.SortedSet$1.Node(T)).$ctor1(arr[System.Array.index(((startIndex + 1) | 0), arr)], false); - root.Left = new (System.Collections.Generic.SortedSet$1.Node(T)).$ctor1(arr[System.Array.index(startIndex, arr)], false); - root.Right = new (System.Collections.Generic.SortedSet$1.Node(T)).$ctor1(arr[System.Array.index(endIndex, arr)], false); - if (redNode != null) { - root.Left.Left = redNode; - - } - } else { - var midpt = (((H5.Int.div((((startIndex + endIndex) | 0)), 2)) | 0)); - root = new (System.Collections.Generic.SortedSet$1.Node(T)).$ctor1(arr[System.Array.index(midpt, arr)], false); - root.Left = System.Collections.Generic.SortedSet$1(T).ConstructRootFromSortedArray(arr, startIndex, ((midpt - 1) | 0), redNode); - if (size % 2 === 0) { - root.Right = System.Collections.Generic.SortedSet$1(T).ConstructRootFromSortedArray(arr, ((midpt + 2) | 0), endIndex, new (System.Collections.Generic.SortedSet$1.Node(T)).$ctor1(arr[System.Array.index(((midpt + 1) | 0), arr)], true)); - } else { - root.Right = System.Collections.Generic.SortedSet$1(T).ConstructRootFromSortedArray(arr, ((midpt + 1) | 0), endIndex, null); - } - } - return root; - - }, - log2: function (value) { - var c = 0; - while (value > 0) { - c = (c + 1) | 0; - value = value >> 1; - } - return c; - } - } - }, - fields: { - root: null, - comparer: null, - count: 0, - version: 0 - }, - props: { - Count: { - get: function () { - this.VersionCheck(); - return this.count; - } - }, - Comparer: { - get: function () { - return this.comparer; - } - }, - System$Collections$Generic$ICollection$1$IsReadOnly: { - get: function () { - return false; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return null; - } - }, - Min: { - get: function () { - var ret = H5.getDefaultValue(T); - this.InOrderTreeWalk(function (n) { - ret = n.Item; - return false; - }); - return ret; - } - }, - Max: { - get: function () { - var ret = H5.getDefaultValue(T); - this.InOrderTreeWalk$1(function (n) { - ret = n.Item; - return false; - }, true); - return ret; - } - } - }, - alias: [ - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(T) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$Count", - "System$Collections$Generic$ICollection$1$IsReadOnly", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$IsReadOnly", - "add", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$add", - "System$Collections$Generic$ICollection$1$add", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$add", - "remove", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$remove", - "clear", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$clear", - "contains", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$contains", - "copyTo", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$copyTo", - "System$Collections$Generic$IEnumerable$1$GetEnumerator", "System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(T) + "$GetEnumerator", - "unionWith", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$unionWith", - "intersectWith", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$intersectWith", - "exceptWith", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$exceptWith", - "symmetricExceptWith", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$symmetricExceptWith", - "isSubsetOf", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$isSubsetOf", - "isProperSubsetOf", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$isProperSubsetOf", - "isSupersetOf", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$isSupersetOf", - "isProperSupersetOf", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$isProperSupersetOf", - "setEquals", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$setEquals", - "overlaps", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$overlaps" - ], - ctors: { - ctor: function () { - this.$initialize(); - this.comparer = new (System.Collections.Generic.Comparer$1(T))(System.Collections.Generic.Comparer$1.$default.fn); - - }, - $ctor1: function (comparer) { - this.$initialize(); - if (comparer == null) { - this.comparer = new (System.Collections.Generic.Comparer$1(T))(System.Collections.Generic.Comparer$1.$default.fn); - } else { - this.comparer = comparer; - } - }, - $ctor2: function (collection) { - System.Collections.Generic.SortedSet$1(T).$ctor3.call(this, collection, new (System.Collections.Generic.Comparer$1(T))(System.Collections.Generic.Comparer$1.$default.fn)); - }, - $ctor3: function (collection, comparer) { - System.Collections.Generic.SortedSet$1(T).$ctor1.call(this, comparer); - if (collection == null) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - - var baseTreeSubSet = H5.as(collection, System.Collections.Generic.SortedSet$1.TreeSubSet(T)); - var baseSortedSet; - if (((baseSortedSet = H5.as(collection, System.Collections.Generic.SortedSet$1(T)))) != null && baseTreeSubSet == null && System.Collections.Generic.SortedSet$1(T).AreComparersEqual(this, baseSortedSet)) { - if (baseSortedSet.Count === 0) { - this.count = 0; - this.version = 0; - this.root = null; - return; - } - - - var theirStack = new (System.Collections.Generic.Stack$1(System.Collections.Generic.SortedSet$1.Node(T))).$ctor2(((H5.Int.mul(2, System.Collections.Generic.SortedSet$1(T).log2(baseSortedSet.Count)) + 2) | 0)); - var myStack = new (System.Collections.Generic.Stack$1(System.Collections.Generic.SortedSet$1.Node(T))).$ctor2(((H5.Int.mul(2, System.Collections.Generic.SortedSet$1(T).log2(baseSortedSet.Count)) + 2) | 0)); - var theirCurrent = baseSortedSet.root; - var myCurrent = (theirCurrent != null ? new (System.Collections.Generic.SortedSet$1.Node(T)).$ctor1(theirCurrent.Item, theirCurrent.IsRed) : null); - this.root = myCurrent; - while (theirCurrent != null) { - theirStack.Push(theirCurrent); - myStack.Push(myCurrent); - myCurrent.Left = (theirCurrent.Left != null ? new (System.Collections.Generic.SortedSet$1.Node(T)).$ctor1(theirCurrent.Left.Item, theirCurrent.Left.IsRed) : null); - theirCurrent = theirCurrent.Left; - myCurrent = myCurrent.Left; - } - while (theirStack.Count !== 0) { - theirCurrent = theirStack.Pop(); - myCurrent = myStack.Pop(); - var theirRight = theirCurrent.Right; - var myRight = null; - if (theirRight != null) { - myRight = new (System.Collections.Generic.SortedSet$1.Node(T)).$ctor1(theirRight.Item, theirRight.IsRed); - } - myCurrent.Right = myRight; - - while (theirRight != null) { - theirStack.Push(theirRight); - myStack.Push(myRight); - myRight.Left = (theirRight.Left != null ? new (System.Collections.Generic.SortedSet$1.Node(T)).$ctor1(theirRight.Left.Item, theirRight.Left.IsRed) : null); - theirRight = theirRight.Left; - myRight = myRight.Left; - } - } - this.count = baseSortedSet.count; - this.version = 0; - } else { - - var els = new (System.Collections.Generic.List$1(T)).$ctor1(collection); - els.Sort$1(this.comparer); - for (var i = 1; i < els.Count; i = (i + 1) | 0) { - if (this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](els.getItem(i), els.getItem(((i - 1) | 0))) === 0) { - els.removeAt(i); - i = (i - 1) | 0; - } - } - this.root = System.Collections.Generic.SortedSet$1(T).ConstructRootFromSortedArray(els.ToArray(), 0, ((els.Count - 1) | 0), null); - this.count = els.Count; - this.version = 0; - } - } - }, - methods: { - AddAllElements: function (collection) { - var $t; - - $t = H5.getEnumerator(collection, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (!this.contains(item)) { - this.add(item); - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - }, - RemoveAllElements: function (collection) { - var $t; - var min = this.Min; - var max = this.Max; - $t = H5.getEnumerator(collection, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (!(this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](item, min) < 0 || this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](item, max) > 0) && this.contains(item)) { - this.remove(item); - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - }, - ContainsAllElements: function (collection) { - var $t; - $t = H5.getEnumerator(collection, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (!this.contains(item)) { - return false; - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - return true; - }, - InOrderTreeWalk: function (action) { - return this.InOrderTreeWalk$1(action, false); - }, - InOrderTreeWalk$1: function (action, reverse) { - if (this.root == null) { - return true; - } - - var stack = new (System.Collections.Generic.Stack$1(System.Collections.Generic.SortedSet$1.Node(T))).$ctor2(H5.Int.mul(2, (System.Collections.Generic.SortedSet$1(T).log2(((this.Count + 1) | 0))))); - var current = this.root; - while (current != null) { - stack.Push(current); - current = (reverse ? current.Right : current.Left); - } - while (stack.Count !== 0) { - current = stack.Pop(); - if (!action(current)) { - return false; - } - - var node = (reverse ? current.Left : current.Right); - while (node != null) { - stack.Push(node); - node = (reverse ? node.Right : node.Left); - } - } - return true; - }, - BreadthFirstTreeWalk: function (action) { - if (this.root == null) { - return true; - } - - var processQueue = new (System.Collections.Generic.List$1(System.Collections.Generic.SortedSet$1.Node(T))).ctor(); - processQueue.add(this.root); - var current; - - while (processQueue.Count !== 0) { - current = processQueue.getItem(0); - processQueue.removeAt(0); - if (!action(current)) { - return false; - } - if (current.Left != null) { - processQueue.add(current.Left); - } - if (current.Right != null) { - processQueue.add(current.Right); - } - } - return true; - }, - VersionCheck: function () { }, - IsWithinRange: function (item) { - return true; - - }, - add: function (item) { - return this.AddIfNotPresent(item); - }, - System$Collections$Generic$ICollection$1$add: function (item) { - this.AddIfNotPresent(item); - }, - AddIfNotPresent: function (item) { - if (this.root == null) { - this.root = new (System.Collections.Generic.SortedSet$1.Node(T)).$ctor1(item, false); - this.count = 1; - this.version = (this.version + 1) | 0; - return true; - } - - var current = this.root; - var parent = { v : null }; - var grandParent = null; - var greatGrandParent = null; - - this.version = (this.version + 1) | 0; - - - var order = 0; - while (current != null) { - order = this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](item, current.Item); - if (order === 0) { - this.root.IsRed = false; - return false; - } - - if (System.Collections.Generic.SortedSet$1(T).Is4Node(current)) { - System.Collections.Generic.SortedSet$1(T).Split4Node(current); - if (System.Collections.Generic.SortedSet$1(T).IsRed(parent.v)) { - this.InsertionBalance(current, parent, grandParent, greatGrandParent); - } - } - greatGrandParent = grandParent; - grandParent = parent.v; - parent.v = current; - current = (order < 0) ? current.Left : current.Right; - } - - var node = new (System.Collections.Generic.SortedSet$1.Node(T)).ctor(item); - if (order > 0) { - parent.v.Right = node; - } else { - parent.v.Left = node; - } - - if (parent.v.IsRed) { - this.InsertionBalance(node, parent, grandParent, greatGrandParent); - } - - this.root.IsRed = false; - this.count = (this.count + 1) | 0; - return true; - }, - remove: function (item) { - return this.DoRemove(item); - }, - DoRemove: function (item) { - - if (this.root == null) { - return false; - } - - - - this.version = (this.version + 1) | 0; - - var current = this.root; - var parent = null; - var grandParent = null; - var match = null; - var parentOfMatch = null; - var foundMatch = false; - while (current != null) { - if (System.Collections.Generic.SortedSet$1(T).Is2Node(current)) { - if (parent == null) { - current.IsRed = true; - } else { - var sibling = System.Collections.Generic.SortedSet$1(T).GetSibling(current, parent); - if (sibling.IsRed) { - if (H5.referenceEquals(parent.Right, sibling)) { - System.Collections.Generic.SortedSet$1(T).RotateLeft(parent); - } else { - System.Collections.Generic.SortedSet$1(T).RotateRight(parent); - } - - parent.IsRed = true; - sibling.IsRed = false; - this.ReplaceChildOfNodeOrRoot(grandParent, parent, sibling); - grandParent = sibling; - if (H5.referenceEquals(parent, match)) { - parentOfMatch = sibling; - } - - sibling = (H5.referenceEquals(parent.Left, current)) ? parent.Right : parent.Left; - } - - if (System.Collections.Generic.SortedSet$1(T).Is2Node(sibling)) { - System.Collections.Generic.SortedSet$1(T).Merge2Nodes(parent, current, sibling); - } else { - var rotation = System.Collections.Generic.SortedSet$1(T).RotationNeeded(parent, current, sibling); - var newGrandParent = null; - switch (rotation) { - case System.Collections.Generic.TreeRotation.RightRotation: - sibling.Left.IsRed = false; - newGrandParent = System.Collections.Generic.SortedSet$1(T).RotateRight(parent); - break; - case System.Collections.Generic.TreeRotation.LeftRotation: - sibling.Right.IsRed = false; - newGrandParent = System.Collections.Generic.SortedSet$1(T).RotateLeft(parent); - break; - case System.Collections.Generic.TreeRotation.RightLeftRotation: - newGrandParent = System.Collections.Generic.SortedSet$1(T).RotateRightLeft(parent); - break; - case System.Collections.Generic.TreeRotation.LeftRightRotation: - newGrandParent = System.Collections.Generic.SortedSet$1(T).RotateLeftRight(parent); - break; - } - - newGrandParent.IsRed = parent.IsRed; - parent.IsRed = false; - current.IsRed = true; - this.ReplaceChildOfNodeOrRoot(grandParent, parent, newGrandParent); - if (H5.referenceEquals(parent, match)) { - parentOfMatch = newGrandParent; - } - grandParent = newGrandParent; - } - } - } - - var order = foundMatch ? -1 : this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](item, current.Item); - if (order === 0) { - foundMatch = true; - match = current; - parentOfMatch = parent; - } - - grandParent = parent; - parent = current; - - if (order < 0) { - current = current.Left; - } else { - current = current.Right; - } - } - - if (match != null) { - this.ReplaceNode(match, parentOfMatch, parent, grandParent); - this.count = (this.count - 1) | 0; - } - - if (this.root != null) { - this.root.IsRed = false; - } - return foundMatch; - }, - clear: function () { - this.root = null; - this.count = 0; - this.version = (this.version + 1) | 0; - }, - contains: function (item) { - - return this.FindNode(item) != null; - }, - CopyTo: function (array) { - this.CopyTo$1(array, 0, this.Count); - }, - copyTo: function (array, index) { - this.CopyTo$1(array, index, this.Count); - }, - CopyTo$1: function (array, index, count) { - if (array == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array); - } - - if (index < 0) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$1(System.ExceptionArgument.index); - } - - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - if (index > array.length || count > ((array.length - index) | 0)) { - throw new System.ArgumentException.ctor(); - } - count = (count + index) | 0; - - this.InOrderTreeWalk(function (node) { - if (index >= count) { - return false; - } else { - array[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), array)] = node.Item; - return true; - } - }); - }, - System$Collections$ICollection$copyTo: function (array, index) { - if (array == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array); - } - - if (System.Array.getRank(array) !== 1) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported); - } - - if (System.Array.getLower(array, 0) !== 0) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_NonZeroLowerBound); - } - - if (index < 0) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.arrayIndex, System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - } - - if (((array.length - index) | 0) < this.Count) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall); - } - var tarray; - if (((tarray = H5.as(array, System.Array.type(T)))) != null) { - this.copyTo(tarray, index); - } else { - var objects = H5.as(array, System.Array.type(System.Object)); - if (objects == null) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType); - } - - try { - this.InOrderTreeWalk(function (node) { - objects[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), objects)] = node.Item; - return true; - }); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.ArrayTypeMismatchException)) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType); - } else { - throw $e1; - } - } - } - }, - GetEnumerator: function () { - return new (System.Collections.Generic.SortedSet$1.Enumerator(T)).$ctor1(this); - }, - System$Collections$Generic$IEnumerable$1$GetEnumerator: function () { - return new (System.Collections.Generic.SortedSet$1.Enumerator(T)).$ctor1(this).$clone(); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return new (System.Collections.Generic.SortedSet$1.Enumerator(T)).$ctor1(this).$clone(); - }, - InsertionBalance: function (current, parent, grandParent, greatGrandParent) { - var parentIsOnRight = (H5.referenceEquals(grandParent.Right, parent.v)); - var currentIsOnRight = (H5.referenceEquals(parent.v.Right, current)); - - var newChildOfGreatGrandParent; - if (parentIsOnRight === currentIsOnRight) { - newChildOfGreatGrandParent = currentIsOnRight ? System.Collections.Generic.SortedSet$1(T).RotateLeft(grandParent) : System.Collections.Generic.SortedSet$1(T).RotateRight(grandParent); - } else { - newChildOfGreatGrandParent = currentIsOnRight ? System.Collections.Generic.SortedSet$1(T).RotateLeftRight(grandParent) : System.Collections.Generic.SortedSet$1(T).RotateRightLeft(grandParent); - parent.v = greatGrandParent; - } - grandParent.IsRed = true; - newChildOfGreatGrandParent.IsRed = false; - - this.ReplaceChildOfNodeOrRoot(greatGrandParent, grandParent, newChildOfGreatGrandParent); - }, - ReplaceChildOfNodeOrRoot: function (parent, child, newChild) { - if (parent != null) { - if (H5.referenceEquals(parent.Left, child)) { - parent.Left = newChild; - } else { - parent.Right = newChild; - } - } else { - this.root = newChild; - } - }, - ReplaceNode: function (match, parentOfMatch, succesor, parentOfSuccesor) { - if (H5.referenceEquals(succesor, match)) { - succesor = match.Left; - } else { - if (succesor.Right != null) { - succesor.Right.IsRed = false; - } - - if (!H5.referenceEquals(parentOfSuccesor, match)) { - parentOfSuccesor.Left = succesor.Right; - succesor.Right = match.Right; - } - - succesor.Left = match.Left; - } - - if (succesor != null) { - succesor.IsRed = match.IsRed; - } - - this.ReplaceChildOfNodeOrRoot(parentOfMatch, match, succesor); - - }, - FindNode: function (item) { - var current = this.root; - while (current != null) { - var order = this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](item, current.Item); - if (order === 0) { - return current; - } else { - current = (order < 0) ? current.Left : current.Right; - } - } - - return null; - }, - InternalIndexOf: function (item) { - var current = this.root; - var count = 0; - while (current != null) { - var order = this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](item, current.Item); - if (order === 0) { - return count; - } else { - current = (order < 0) ? current.Left : current.Right; - count = (order < 0) ? (((H5.Int.mul(2, count) + 1) | 0)) : (((H5.Int.mul(2, count) + 2) | 0)); - } - } - return -1; - }, - FindRange: function (from, to) { - return this.FindRange$1(from, to, true, true); - }, - FindRange$1: function (from, to, lowerBoundActive, upperBoundActive) { - var current = this.root; - while (current != null) { - if (lowerBoundActive && this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](from, current.Item) > 0) { - current = current.Right; - } else { - if (upperBoundActive && this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](to, current.Item) < 0) { - current = current.Left; - } else { - return current; - } - } - } - - return null; - }, - UpdateVersion: function () { - this.version = (this.version + 1) | 0; - }, - ToArray: function () { - var newArray = System.Array.init(this.Count, function (){ - return H5.getDefaultValue(T); - }, T); - this.CopyTo(newArray); - return newArray; - }, - unionWith: function (other) { - var $t; - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - - var s = H5.as(other, System.Collections.Generic.SortedSet$1(T)); - var t = H5.as(this, System.Collections.Generic.SortedSet$1.TreeSubSet(T)); - - if (t != null) { - this.VersionCheck(); - } - - if (s != null && t == null && this.count === 0) { - var dummy = new (System.Collections.Generic.SortedSet$1(T)).$ctor3(s, this.comparer); - this.root = dummy.root; - this.count = dummy.count; - this.version = (this.version + 1) | 0; - return; - } - - - if (s != null && t == null && System.Collections.Generic.SortedSet$1(T).AreComparersEqual(this, s) && (s.Count > ((H5.Int.div(this.Count, 2)) | 0))) { - var merged = System.Array.init(((s.Count + this.Count) | 0), function (){ - return H5.getDefaultValue(T); - }, T); - var c = 0; - var mine = this.GetEnumerator(); - var theirs = s.GetEnumerator(); - var mineEnded = !mine.moveNext(), theirsEnded = !theirs.moveNext(); - while (!mineEnded && !theirsEnded) { - var comp = ($t = this.Comparer)[H5.geti($t, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](mine.Current, theirs.Current); - if (comp < 0) { - merged[System.Array.index(H5.identity(c, ((c = (c + 1) | 0))), merged)] = mine.Current; - mineEnded = !mine.moveNext(); - } else if (comp === 0) { - merged[System.Array.index(H5.identity(c, ((c = (c + 1) | 0))), merged)] = theirs.Current; - mineEnded = !mine.moveNext(); - theirsEnded = !theirs.moveNext(); - } else { - merged[System.Array.index(H5.identity(c, ((c = (c + 1) | 0))), merged)] = theirs.Current; - theirsEnded = !theirs.moveNext(); - } - } - - if (!mineEnded || !theirsEnded) { - var remaining = (mineEnded ? theirs : mine); - do { - merged[System.Array.index(H5.identity(c, ((c = (c + 1) | 0))), merged)] = remaining.Current; - } while (remaining.moveNext()); - } - - - this.root = null; - - - this.root = System.Collections.Generic.SortedSet$1(T).ConstructRootFromSortedArray(merged, 0, ((c - 1) | 0), null); - this.count = c; - this.version = (this.version + 1) | 0; - } else { - this.AddAllElements(other); - } - }, - intersectWith: function (other) { - var $t, $t1; - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - - if (this.Count === 0) { - return; - } - - - var t = H5.as(this, System.Collections.Generic.SortedSet$1.TreeSubSet(T)); - if (t != null) { - this.VersionCheck(); - } - var s; - if (((s = H5.as(other, System.Collections.Generic.SortedSet$1(T)))) != null && t == null && System.Collections.Generic.SortedSet$1(T).AreComparersEqual(this, s)) { - - - var merged = System.Array.init(this.Count, function (){ - return H5.getDefaultValue(T); - }, T); - var c = 0; - var mine = this.GetEnumerator(); - var theirs = s.GetEnumerator(); - var mineEnded = !mine.moveNext(), theirsEnded = !theirs.moveNext(); - var max = this.Max; - var min = this.Min; - - while (!mineEnded && !theirsEnded && ($t = this.Comparer)[H5.geti($t, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](theirs.Current, max) <= 0) { - var comp = ($t1 = this.Comparer)[H5.geti($t1, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](mine.Current, theirs.Current); - if (comp < 0) { - mineEnded = !mine.moveNext(); - } else if (comp === 0) { - merged[System.Array.index(H5.identity(c, ((c = (c + 1) | 0))), merged)] = theirs.Current; - mineEnded = !mine.moveNext(); - theirsEnded = !theirs.moveNext(); - } else { - theirsEnded = !theirs.moveNext(); - } - } - - - this.root = null; - - this.root = System.Collections.Generic.SortedSet$1(T).ConstructRootFromSortedArray(merged, 0, ((c - 1) | 0), null); - this.count = c; - this.version = (this.version + 1) | 0; - } else { - this.IntersectWithEnumerable(other); - } - }, - IntersectWithEnumerable: function (other) { - var $t; - var toSave = new (System.Collections.Generic.List$1(T)).$ctor2(this.Count); - $t = H5.getEnumerator(other, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (this.contains(item)) { - toSave.add(item); - this.remove(item); - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - this.clear(); - this.AddAllElements(toSave); - - }, - exceptWith: function (other) { - var $t; - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - - if (this.count === 0) { - return; - } - - if (H5.referenceEquals(other, this)) { - this.clear(); - return; - } - var asSorted; - - if (((asSorted = H5.as(other, System.Collections.Generic.SortedSet$1(T)))) != null && System.Collections.Generic.SortedSet$1(T).AreComparersEqual(this, asSorted)) { - if (!(this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](asSorted.Max, this.Min) < 0 || this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](asSorted.Min, this.Max) > 0)) { - var min = this.Min; - var max = this.Max; - $t = H5.getEnumerator(other, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](item, min) < 0) { - continue; - } - if (this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](item, max) > 0) { - break; - } - this.remove(item); - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - } - - } else { - this.RemoveAllElements(other); - } - }, - symmetricExceptWith: function (other) { - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - - if (this.Count === 0) { - this.unionWith(other); - return; - } - - if (H5.referenceEquals(other, this)) { - this.clear(); - return; - } - var asSorted; - if (((asSorted = H5.as(other, System.Collections.Generic.SortedSet$1(T)))) != null && System.Collections.Generic.SortedSet$1(T).AreComparersEqual(this, asSorted)) { - this.SymmetricExceptWithSameEC$1(asSorted); - } else { - var asHash; - if (((asHash = H5.as(other, System.Collections.Generic.HashSet$1(T)))) != null && H5.equals(this.comparer, new (System.Collections.Generic.Comparer$1(T))(System.Collections.Generic.Comparer$1.$default.fn)) && H5.equals(asHash.Comparer, System.Collections.Generic.EqualityComparer$1(T).def)) { - this.SymmetricExceptWithSameEC$1(asHash); - } else { - var elements = (new (System.Collections.Generic.List$1(T)).$ctor1(other)).ToArray(); - System.Array.sort(elements, this.Comparer); - this.SymmetricExceptWithSameEC(elements); - } - } - }, - SymmetricExceptWithSameEC$1: function (other) { - var $t; - $t = H5.getEnumerator(other, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (this.contains(item)) { - this.remove(item); - } else { - this.add(item); - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - }, - SymmetricExceptWithSameEC: function (other) { - if (other.length === 0) { - return; - } - var last = other[System.Array.index(0, other)]; - for (var i = 0; i < other.length; i = (i + 1) | 0) { - while (i < other.length && i !== 0 && this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](other[System.Array.index(i, other)], last) === 0) { - i = (i + 1) | 0; - } - if (i >= other.length) { - break; - } - if (this.contains(other[System.Array.index(i, other)])) { - this.remove(other[System.Array.index(i, other)]); - } else { - this.add(other[System.Array.index(i, other)]); - } - last = other[System.Array.index(i, other)]; - } - }, - isSubsetOf: function (other) { - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - - if (this.Count === 0) { - return true; - } - var asSorted; - - if (((asSorted = H5.as(other, System.Collections.Generic.SortedSet$1(T)))) != null && System.Collections.Generic.SortedSet$1(T).AreComparersEqual(this, asSorted)) { - if (this.Count > asSorted.Count) { - return false; - } - return this.IsSubsetOfSortedSetWithSameEC(asSorted); - } else { - - var result = this.CheckUniqueAndUnfoundElements(other, false); - return (result.uniqueCount === this.Count && result.unfoundCount >= 0); - } - }, - IsSubsetOfSortedSetWithSameEC: function (asSorted) { - var $t; - var prunedOther = asSorted.GetViewBetween(this.Min, this.Max); - $t = H5.getEnumerator(this); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (!prunedOther.contains(item)) { - return false; - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - return true; - - }, - isProperSubsetOf: function (other) { - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - - if ((H5.as(other, System.Collections.ICollection)) != null) { - if (this.Count === 0) { - return System.Array.getCount((H5.as(other, System.Collections.ICollection))) > 0; - } - } - var asHash; - - - if (((asHash = H5.as(other, System.Collections.Generic.HashSet$1(T)))) != null && H5.equals(this.comparer, new (System.Collections.Generic.Comparer$1(T))(System.Collections.Generic.Comparer$1.$default.fn)) && H5.equals(asHash.Comparer, System.Collections.Generic.EqualityComparer$1(T).def)) { - return asHash.isProperSupersetOf(this); - } - var asSorted; - if (((asSorted = H5.as(other, System.Collections.Generic.SortedSet$1(T)))) != null && System.Collections.Generic.SortedSet$1(T).AreComparersEqual(this, asSorted)) { - if (this.Count >= asSorted.Count) { - return false; - } - return this.IsSubsetOfSortedSetWithSameEC(asSorted); - } - - - var result = this.CheckUniqueAndUnfoundElements(other, false); - return (result.uniqueCount === this.Count && result.unfoundCount > 0); - }, - isSupersetOf: function (other) { - var $t; - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - - if ((H5.as(other, System.Collections.ICollection)) != null && System.Array.getCount((H5.as(other, System.Collections.ICollection))) === 0) { - return true; - } - var asHash; - - if (((asHash = H5.as(other, System.Collections.Generic.HashSet$1(T)))) != null && H5.equals(this.comparer, new (System.Collections.Generic.Comparer$1(T))(System.Collections.Generic.Comparer$1.$default.fn)) && H5.equals(asHash.Comparer, System.Collections.Generic.EqualityComparer$1(T).def)) { - return asHash.isSubsetOf(this); - } - var asSorted; - if (((asSorted = H5.as(other, System.Collections.Generic.SortedSet$1(T)))) != null && System.Collections.Generic.SortedSet$1(T).AreComparersEqual(this, asSorted)) { - if (this.Count < asSorted.Count) { - return false; - } - var pruned = this.GetViewBetween(asSorted.Min, asSorted.Max); - $t = H5.getEnumerator(asSorted); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (!pruned.contains(item)) { - return false; - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - return true; - } - return this.ContainsAllElements(other); - }, - isProperSupersetOf: function (other) { - var $t; - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - - if (this.Count === 0) { - return false; - } - - if ((H5.as(other, System.Collections.ICollection)) != null && System.Array.getCount((H5.as(other, System.Collections.ICollection))) === 0) { - return true; - } - var asHash; - - - if (((asHash = H5.as(other, System.Collections.Generic.HashSet$1(T)))) != null && H5.equals(this.comparer, new (System.Collections.Generic.Comparer$1(T))(System.Collections.Generic.Comparer$1.$default.fn)) && H5.equals(asHash.Comparer, System.Collections.Generic.EqualityComparer$1(T).def)) { - return asHash.isProperSubsetOf(this); - } - var asSorted; - if (((asSorted = H5.as(other, System.Collections.Generic.SortedSet$1(T)))) != null && System.Collections.Generic.SortedSet$1(T).AreComparersEqual(asSorted, this)) { - if (asSorted.Count >= this.Count) { - return false; - } - var pruned = this.GetViewBetween(asSorted.Min, asSorted.Max); - $t = H5.getEnumerator(asSorted); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (!pruned.contains(item)) { - return false; - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - return true; - } - - - var result = this.CheckUniqueAndUnfoundElements(other, true); - return (result.uniqueCount < this.Count && result.unfoundCount === 0); - }, - setEquals: function (other) { - var $t; - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - var asHash; - if (((asHash = H5.as(other, System.Collections.Generic.HashSet$1(T)))) != null && H5.equals(this.comparer, new (System.Collections.Generic.Comparer$1(T))(System.Collections.Generic.Comparer$1.$default.fn)) && H5.equals(asHash.Comparer, System.Collections.Generic.EqualityComparer$1(T).def)) { - return asHash.setEquals(this); - } - var asSorted; - if (((asSorted = H5.as(other, System.Collections.Generic.SortedSet$1(T)))) != null && System.Collections.Generic.SortedSet$1(T).AreComparersEqual(this, asSorted)) { - var mine = this.GetEnumerator().$clone(); - var theirs = asSorted.GetEnumerator().$clone(); - var mineEnded = !mine.System$Collections$IEnumerator$moveNext(); - var theirsEnded = !theirs.System$Collections$IEnumerator$moveNext(); - while (!mineEnded && !theirsEnded) { - if (($t = this.Comparer)[H5.geti($t, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](mine[H5.geti(mine, "System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1")], theirs[H5.geti(theirs, "System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1")]) !== 0) { - return false; - } - mineEnded = !mine.System$Collections$IEnumerator$moveNext(); - theirsEnded = !theirs.System$Collections$IEnumerator$moveNext(); - } - return mineEnded && theirsEnded; - } - - var result = this.CheckUniqueAndUnfoundElements(other, true); - return (result.uniqueCount === this.Count && result.unfoundCount === 0); - }, - overlaps: function (other) { - var $t; - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - - if (this.Count === 0) { - return false; - } - - if ((H5.as(other, System.Collections.Generic.ICollection$1(T)) != null) && System.Array.getCount((H5.as(other, System.Collections.Generic.ICollection$1(T))), T) === 0) { - return false; - } - var asSorted; - if (((asSorted = H5.as(other, System.Collections.Generic.SortedSet$1(T)))) != null && System.Collections.Generic.SortedSet$1(T).AreComparersEqual(this, asSorted) && (this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](this.Min, asSorted.Max) > 0 || this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](this.Max, asSorted.Min) < 0)) { - return false; - } - var asHash; - if (((asHash = H5.as(other, System.Collections.Generic.HashSet$1(T)))) != null && H5.equals(this.comparer, new (System.Collections.Generic.Comparer$1(T))(System.Collections.Generic.Comparer$1.$default.fn)) && H5.equals(asHash.Comparer, System.Collections.Generic.EqualityComparer$1(T).def)) { - return asHash.overlaps(this); - } - - $t = H5.getEnumerator(other, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (this.contains(item)) { - return true; - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - return false; - }, - CheckUniqueAndUnfoundElements: function (other, returnIfUnfound) { - var $t, $t1; - var result = new (System.Collections.Generic.SortedSet$1.ElementCount(T))(); - - if (this.Count === 0) { - var numElementsInOther = 0; - $t = H5.getEnumerator(other, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - numElementsInOther = (numElementsInOther + 1) | 0; - break; - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - result.uniqueCount = 0; - result.unfoundCount = numElementsInOther; - return result.$clone(); - } - - - var originalLastIndex = this.Count; - var intArrayLength = System.Collections.Generic.BitHelper.ToIntArrayLength(originalLastIndex); - - var bitHelper; - var bitArray = System.Array.init(intArrayLength, 0, System.Int32); - bitHelper = new System.Collections.Generic.BitHelper(bitArray, intArrayLength); - - var unfoundCount = 0; - var uniqueFoundCount = 0; - - $t1 = H5.getEnumerator(other, T); - try { - while ($t1.moveNext()) { - var item1 = $t1.Current; - var index = this.InternalIndexOf(item1); - if (index >= 0) { - if (!bitHelper.IsMarked(index)) { - bitHelper.MarkBit(index); - uniqueFoundCount = (uniqueFoundCount + 1) | 0; - } - } else { - unfoundCount = (unfoundCount + 1) | 0; - if (returnIfUnfound) { - break; - } - } - } - } finally { - if (H5.is($t1, System.IDisposable)) { - $t1.System$IDisposable$Dispose(); - } - } - - result.uniqueCount = uniqueFoundCount; - result.unfoundCount = unfoundCount; - return result.$clone(); - }, - RemoveWhere: function (match) { - if (H5.staticEquals(match, null)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - var matches = new (System.Collections.Generic.List$1(T)).$ctor2(this.Count); - - this.BreadthFirstTreeWalk(function (n) { - if (match(n.Item)) { - matches.add(n.Item); - } - return true; - }); - var actuallyRemoved = 0; - for (var i = (matches.Count - 1) | 0; i >= 0; i = (i - 1) | 0) { - if (this.remove(matches.getItem(i))) { - actuallyRemoved = (actuallyRemoved + 1) | 0; - } - } - - return actuallyRemoved; - - }, - Reverse: function () { - return new (H5.GeneratorEnumerable$1(T))(H5.fn.bind(this, function () { - var $s = 0, - $jff, - $rv, - e, - $ae; - - var $en = new (H5.GeneratorEnumerator$1(T))(H5.fn.bind(this, function () { - try { - for (;;) { - switch ($s) { - case 0: { - e = new (System.Collections.Generic.SortedSet$1.Enumerator(T)).$ctor2(this, true); - $s = 1; - continue; - } - case 1: { - if ( e.moveNext() ) { - $s = 2; - continue; - } - $s = 4; - continue; - } - case 2: { - $en.current = e.Current; - $s = 3; - return true; - } - case 3: { - - $s = 1; - continue; - } - case 4: { - - } - default: { - return false; - } - } - } - } catch($ae1) { - $ae = System.Exception.create($ae1); - throw $ae; - } - })); - return $en; - })); - }, - GetViewBetween: function (lowerValue, upperValue) { - var $t; - if (($t = this.Comparer)[H5.geti($t, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](lowerValue, upperValue) > 0) { - throw new System.ArgumentException.$ctor1("lowerBound is greater than upperBound"); - } - return new (System.Collections.Generic.SortedSet$1.TreeSubSet(T)).$ctor1(this, lowerValue, upperValue, true, true); - }, - TryGetValue: function (equalValue, actualValue) { - var node = this.FindNode(equalValue); - if (node != null) { - actualValue.v = node.Item; - return true; - } - actualValue.v = H5.getDefaultValue(T); - return false; - } - } - }; }); - - // @source SortedSetEqualityComparer.js - - H5.define("System.Collections.Generic.SortedSetEqualityComparer$1", function (T) { return { - inherits: [System.Collections.Generic.IEqualityComparer$1(System.Collections.Generic.SortedSet$1(T))], - fields: { - comparer: null, - e_comparer: null - }, - alias: [ - "equals2", ["System$Collections$Generic$IEqualityComparer$1$System$Collections$Generic$SortedSet$1$" + H5.getTypeAlias(T) + "$equals2", "System$Collections$Generic$IEqualityComparer$1$equals2"], - "getHashCode2", ["System$Collections$Generic$IEqualityComparer$1$System$Collections$Generic$SortedSet$1$" + H5.getTypeAlias(T) + "$getHashCode2", "System$Collections$Generic$IEqualityComparer$1$getHashCode2"] - ], - ctors: { - ctor: function () { - System.Collections.Generic.SortedSetEqualityComparer$1(T).$ctor2.call(this, null, null); - }, - $ctor1: function (comparer) { - System.Collections.Generic.SortedSetEqualityComparer$1(T).$ctor2.call(this, comparer, null); - }, - $ctor3: function (memberEqualityComparer) { - System.Collections.Generic.SortedSetEqualityComparer$1(T).$ctor2.call(this, null, memberEqualityComparer); - }, - $ctor2: function (comparer, memberEqualityComparer) { - this.$initialize(); - if (comparer == null) { - this.comparer = new (System.Collections.Generic.Comparer$1(T))(System.Collections.Generic.Comparer$1.$default.fn); - } else { - this.comparer = comparer; - } - if (memberEqualityComparer == null) { - this.e_comparer = System.Collections.Generic.EqualityComparer$1(T).def; - } else { - this.e_comparer = memberEqualityComparer; - } - } - }, - methods: { - equals2: function (x, y) { - return System.Collections.Generic.SortedSet$1(T).SortedSetEquals(x, y, this.comparer); - }, - equals: function (obj) { - var comparer; - if (!(((comparer = H5.as(obj, System.Collections.Generic.SortedSetEqualityComparer$1(T)))) != null)) { - return false; - } - return (H5.referenceEquals(this.comparer, comparer.comparer)); - }, - getHashCode2: function (obj) { - var $t; - var hashCode = 0; - if (obj != null) { - $t = H5.getEnumerator(obj); - try { - while ($t.moveNext()) { - var t = $t.Current; - hashCode = hashCode ^ (this.e_comparer[H5.geti(this.e_comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(T) + "$getHashCode2", "System$Collections$Generic$IEqualityComparer$1$getHashCode2")](t) & 2147483647); - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - } - return hashCode; - }, - getHashCode: function () { - return H5.getHashCode(this.comparer) ^ H5.getHashCode(this.e_comparer); - } - } - }; }); - - // @source ElementCount.js - - H5.define("System.Collections.Generic.SortedSet$1.ElementCount", function (T) { return { - $kind: "nested struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.uniqueCount = 0; - $.unfoundCount = 0; - return $;} - } - }, - fields: { - uniqueCount: 0, - unfoundCount: 0 - }, - ctors: { - ctor: function () { - this.$initialize(); - } - }, - methods: { - getHashCode: function () { - var h = H5.addHash([4920463385, this.uniqueCount, this.unfoundCount]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.SortedSet$1.ElementCount(T))) { - return false; - } - return H5.equals(this.uniqueCount, o.uniqueCount) && H5.equals(this.unfoundCount, o.unfoundCount); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.SortedSet$1.ElementCount(T))(); - s.uniqueCount = this.uniqueCount; - s.unfoundCount = this.unfoundCount; - return s; - } - } - }; }); - - // @source Enumerator.js - - H5.define("System.Collections.Generic.SortedSet$1.Enumerator", function (T) { return { - inherits: [System.Collections.Generic.IEnumerator$1(T),System.Collections.IEnumerator], - $kind: "nested struct", - statics: { - fields: { - dummyNode: null - }, - ctors: { - init: function () { - this.dummyNode = new (System.Collections.Generic.SortedSet$1.Node(T)).ctor(H5.getDefaultValue(T)); - } - }, - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.tree = null; - $.version = 0; - $.stack = null; - $.current = null; - $.reverse = false; - return $;} - } - }, - fields: { - tree: null, - version: 0, - stack: null, - current: null, - reverse: false - }, - props: { - Current: { - get: function () { - if (this.current != null) { - return this.current.Item; - } - return H5.getDefaultValue(T); - } - }, - System$Collections$IEnumerator$Current: { - get: function () { - if (this.current == null) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - return this.current.Item; - } - }, - NotStartedOrEnded: { - get: function () { - return this.current == null; - } - } - }, - alias: [ - "moveNext", "System$Collections$IEnumerator$moveNext", - "Dispose", "System$IDisposable$Dispose", - "Current", ["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"] - ], - ctors: { - $ctor1: function (set) { - this.$initialize(); - this.tree = set; - this.tree.VersionCheck(); - - this.version = this.tree.version; - - this.stack = new (System.Collections.Generic.Stack$1(System.Collections.Generic.SortedSet$1.Node(T))).$ctor2(H5.Int.mul(2, System.Collections.Generic.SortedSet$1(T).log2(((set.Count + 1) | 0)))); - this.current = null; - this.reverse = false; - - this.Intialize(); - }, - $ctor2: function (set, reverse) { - this.$initialize(); - this.tree = set; - this.tree.VersionCheck(); - this.version = this.tree.version; - - this.stack = new (System.Collections.Generic.Stack$1(System.Collections.Generic.SortedSet$1.Node(T))).$ctor2(H5.Int.mul(2, System.Collections.Generic.SortedSet$1(T).log2(((set.Count + 1) | 0)))); - this.current = null; - this.reverse = reverse; - - this.Intialize(); - - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - Intialize: function () { - - this.current = null; - var node = this.tree.root; - var next = null, other = null; - while (node != null) { - next = (this.reverse ? node.Right : node.Left); - other = (this.reverse ? node.Left : node.Right); - if (this.tree.IsWithinRange(node.Item)) { - this.stack.Push(node); - node = next; - } else if (next == null || !this.tree.IsWithinRange(next.Item)) { - node = other; - } else { - node = next; - } - } - }, - moveNext: function () { - - this.tree.VersionCheck(); - - if (this.version !== this.tree.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - - if (this.stack.Count === 0) { - this.current = null; - return false; - } - - this.current = this.stack.Pop(); - var node = (this.reverse ? this.current.Left : this.current.Right); - var next = null, other = null; - while (node != null) { - next = (this.reverse ? node.Right : node.Left); - other = (this.reverse ? node.Left : node.Right); - if (this.tree.IsWithinRange(node.Item)) { - this.stack.Push(node); - node = next; - } else if (other == null || !this.tree.IsWithinRange(other.Item)) { - node = next; - } else { - node = other; - } - } - return true; - }, - Dispose: function () { }, - Reset: function () { - if (this.version !== this.tree.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - - this.stack.Clear(); - this.Intialize(); - }, - System$Collections$IEnumerator$reset: function () { - this.Reset(); - }, - getHashCode: function () { - var h = H5.addHash([3788985113, this.tree, this.version, this.stack, this.current, this.reverse]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.SortedSet$1.Enumerator(T))) { - return false; - } - return H5.equals(this.tree, o.tree) && H5.equals(this.version, o.version) && H5.equals(this.stack, o.stack) && H5.equals(this.current, o.current) && H5.equals(this.reverse, o.reverse); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.SortedSet$1.Enumerator(T))(); - s.tree = this.tree; - s.version = this.version; - s.stack = this.stack; - s.current = this.current; - s.reverse = this.reverse; - return s; - } - } - }; }); - - // @source Node.js - - H5.define("System.Collections.Generic.SortedSet$1.Node", function (T) { return { - $kind: "nested class", - fields: { - IsRed: false, - Item: H5.getDefaultValue(T), - Left: null, - Right: null - }, - ctors: { - ctor: function (item) { - this.$initialize(); - this.Item = item; - this.IsRed = true; - }, - $ctor1: function (item, isRed) { - this.$initialize(); - this.Item = item; - this.IsRed = isRed; - } - } - }; }); - - // @source TreeSubSet.js - - H5.define("System.Collections.Generic.SortedSet$1.TreeSubSet", function (T) { return { - inherits: [System.Collections.Generic.SortedSet$1(T)], - $kind: "nested class", - fields: { - underlying: null, - min: H5.getDefaultValue(T), - max: H5.getDefaultValue(T), - lBoundActive: false, - uBoundActive: false - }, - alias: [ - "contains", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$contains", - "clear", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$clear" - ], - ctors: { - $ctor1: function (Underlying, Min, Max, lowerBoundActive, upperBoundActive) { - this.$initialize(); - System.Collections.Generic.SortedSet$1(T).$ctor1.call(this, Underlying.Comparer); - this.underlying = Underlying; - this.min = Min; - this.max = Max; - this.lBoundActive = lowerBoundActive; - this.uBoundActive = upperBoundActive; - this.root = this.underlying.FindRange$1(this.min, this.max, this.lBoundActive, this.uBoundActive); - this.count = 0; - this.version = -1; - this.VersionCheckImpl(); - }, - ctor: function () { - this.$initialize(); - System.Collections.Generic.SortedSet$1(T).ctor.call(this); - this.comparer = null; - } - }, - methods: { - AddIfNotPresent: function (item) { - - if (!this.IsWithinRange(item)) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$1(System.ExceptionArgument.collection); - } - - var ret = this.underlying.AddIfNotPresent(item); - this.VersionCheck(); - - return ret; - }, - contains: function (item) { - this.VersionCheck(); - return System.Collections.Generic.SortedSet$1(T).prototype.contains.call(this, item); - }, - DoRemove: function (item) { - - if (!this.IsWithinRange(item)) { - return false; - } - - var ret = this.underlying.remove(item); - this.VersionCheck(); - return ret; - }, - clear: function () { - - - if (this.count === 0) { - return; - } - - var toRemove = new (System.Collections.Generic.List$1(T)).ctor(); - this.BreadthFirstTreeWalk(function (n) { - toRemove.add(n.Item); - return true; - }); - while (toRemove.Count !== 0) { - this.underlying.remove(toRemove.getItem(((toRemove.Count - 1) | 0))); - toRemove.removeAt(((toRemove.Count - 1) | 0)); - } - this.root = null; - this.count = 0; - this.version = this.underlying.version; - }, - IsWithinRange: function (item) { - var $t, $t1; - - var comp = (this.lBoundActive ? ($t = this.Comparer)[H5.geti($t, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](this.min, item) : -1); - if (comp > 0) { - return false; - } - comp = (this.uBoundActive ? ($t1 = this.Comparer)[H5.geti($t1, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](this.max, item) : 1); - if (comp < 0) { - return false; - } - return true; - }, - InOrderTreeWalk$1: function (action, reverse) { - var $t, $t1; - this.VersionCheck(); - - if (this.root == null) { - return true; - } - - var stack = new (System.Collections.Generic.Stack$1(System.Collections.Generic.SortedSet$1.Node(T))).$ctor2(H5.Int.mul(2, System.Collections.Generic.SortedSet$1(T).log2(((this.count + 1) | 0)))); - var current = this.root; - while (current != null) { - if (this.IsWithinRange(current.Item)) { - stack.Push(current); - current = (reverse ? current.Right : current.Left); - } else if (this.lBoundActive && ($t = this.Comparer)[H5.geti($t, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](this.min, current.Item) > 0) { - current = current.Right; - } else { - current = current.Left; - } - } - - while (stack.Count !== 0) { - current = stack.Pop(); - if (!action(current)) { - return false; - } - - var node = (reverse ? current.Left : current.Right); - while (node != null) { - if (this.IsWithinRange(node.Item)) { - stack.Push(node); - node = (reverse ? node.Right : node.Left); - } else if (this.lBoundActive && ($t1 = this.Comparer)[H5.geti($t1, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](this.min, node.Item) > 0) { - node = node.Right; - } else { - node = node.Left; - } - } - } - return true; - }, - BreadthFirstTreeWalk: function (action) { - var $t, $t1; - this.VersionCheck(); - - if (this.root == null) { - return true; - } - - var processQueue = new (System.Collections.Generic.List$1(System.Collections.Generic.SortedSet$1.Node(T))).ctor(); - processQueue.add(this.root); - var current; - - while (processQueue.Count !== 0) { - current = processQueue.getItem(0); - processQueue.removeAt(0); - if (this.IsWithinRange(current.Item) && !action(current)) { - return false; - } - if (current.Left != null && (!this.lBoundActive || ($t = this.Comparer)[H5.geti($t, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](this.min, current.Item) < 0)) { - processQueue.add(current.Left); - } - if (current.Right != null && (!this.uBoundActive || ($t1 = this.Comparer)[H5.geti($t1, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](this.max, current.Item) > 0)) { - processQueue.add(current.Right); - } - - } - return true; - }, - FindNode: function (item) { - - if (!this.IsWithinRange(item)) { - return null; - } - this.VersionCheck(); - return System.Collections.Generic.SortedSet$1(T).prototype.FindNode.call(this, item); - }, - InternalIndexOf: function (item) { - var $t, $t1; - var count = -1; - $t = H5.getEnumerator(this); - try { - while ($t.moveNext()) { - var i = $t.Current; - count = (count + 1) | 0; - if (($t1 = this.Comparer)[H5.geti($t1, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](item, i) === 0) { - return count; - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - return -1; - }, - VersionCheck: function () { - this.VersionCheckImpl(); - }, - VersionCheckImpl: function () { - if (this.version !== this.underlying.version) { - this.root = this.underlying.FindRange$1(this.min, this.max, this.lBoundActive, this.uBoundActive); - this.version = this.underlying.version; - this.count = 0; - this.InOrderTreeWalk(H5.fn.bind(this, $asm.$.System.Collections.Generic.SortedSet$1.TreeSubSet.f1)); - } - }, - GetViewBetween: function (lowerValue, upperValue) { - var $t, $t1; - - if (this.lBoundActive && ($t = this.Comparer)[H5.geti($t, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](this.min, lowerValue) > 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("lowerValue"); - } - if (this.uBoundActive && ($t1 = this.Comparer)[H5.geti($t1, "System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare", "System$Collections$Generic$IComparer$1$compare")](this.max, upperValue) < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("upperValue"); - } - var ret = H5.cast(this.underlying.GetViewBetween(lowerValue, upperValue), System.Collections.Generic.SortedSet$1.TreeSubSet(T)); - return ret; - }, - IntersectWithEnumerable: function (other) { - var $t; - - var toSave = new (System.Collections.Generic.List$1(T)).$ctor2(this.Count); - $t = H5.getEnumerator(other, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (this.contains(item)) { - toSave.add(item); - this.remove(item); - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - this.clear(); - this.AddAllElements(toSave); - } - } - }; }); - - H5.ns("System.Collections.Generic.SortedSet$1.TreeSubSet", $asm.$); - - H5.apply($asm.$.System.Collections.Generic.SortedSet$1.TreeSubSet, { - f1: function (n) { - this.count = (this.count + 1) | 0; - return true; - } - }); - - // @source LinkedList.js - - H5.define("System.Collections.Generic.LinkedList$1", function (T) { return { - inherits: [System.Collections.Generic.ICollection$1(T),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(T)], - statics: { - fields: { - VersionName: null, - CountName: null, - ValuesName: null - }, - ctors: { - init: function () { - this.VersionName = "Version"; - this.CountName = "Count"; - this.ValuesName = "Data"; - } - } - }, - fields: { - head: null, - count: 0, - version: 0 - }, - props: { - Count: { - get: function () { - return this.count; - } - }, - First: { - get: function () { - return this.head; - } - }, - Last: { - get: function () { - return this.head == null ? null : this.head.prev; - } - }, - System$Collections$Generic$ICollection$1$IsReadOnly: { - get: function () { - return false; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return null; - } - } - }, - alias: [ - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(T) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$Count", - "System$Collections$Generic$ICollection$1$IsReadOnly", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$IsReadOnly", - "System$Collections$Generic$ICollection$1$add", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$add", - "clear", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$clear", - "contains", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$contains", - "copyTo", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$copyTo", - "System$Collections$Generic$IEnumerable$1$GetEnumerator", "System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(T) + "$GetEnumerator", - "remove", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$remove" - ], - ctors: { - ctor: function () { - this.$initialize(); - }, - $ctor1: function (collection) { - var $t; - this.$initialize(); - if (collection == null) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - - $t = H5.getEnumerator(collection, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - this.AddLast(item); - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - } - }, - methods: { - System$Collections$Generic$ICollection$1$add: function (value) { - this.AddLast(value); - }, - AddAfter: function (node, value) { - this.ValidateNode(node); - var result = new (System.Collections.Generic.LinkedListNode$1(T)).$ctor1(node.list, value); - this.InternalInsertNodeBefore(node.next, result); - return result; - }, - AddAfter$1: function (node, newNode) { - this.ValidateNode(node); - this.ValidateNewNode(newNode); - this.InternalInsertNodeBefore(node.next, newNode); - newNode.list = this; - }, - AddBefore: function (node, value) { - this.ValidateNode(node); - var result = new (System.Collections.Generic.LinkedListNode$1(T)).$ctor1(node.list, value); - this.InternalInsertNodeBefore(node, result); - if (H5.referenceEquals(node, this.head)) { - this.head = result; - } - return result; - }, - AddBefore$1: function (node, newNode) { - this.ValidateNode(node); - this.ValidateNewNode(newNode); - this.InternalInsertNodeBefore(node, newNode); - newNode.list = this; - if (H5.referenceEquals(node, this.head)) { - this.head = newNode; - } - }, - AddFirst: function (value) { - var result = new (System.Collections.Generic.LinkedListNode$1(T)).$ctor1(this, value); - if (this.head == null) { - this.InternalInsertNodeToEmptyList(result); - } else { - this.InternalInsertNodeBefore(this.head, result); - this.head = result; - } - return result; - }, - AddFirst$1: function (node) { - this.ValidateNewNode(node); - - if (this.head == null) { - this.InternalInsertNodeToEmptyList(node); - } else { - this.InternalInsertNodeBefore(this.head, node); - this.head = node; - } - node.list = this; - }, - AddLast: function (value) { - var result = new (System.Collections.Generic.LinkedListNode$1(T)).$ctor1(this, value); - if (this.head == null) { - this.InternalInsertNodeToEmptyList(result); - } else { - this.InternalInsertNodeBefore(this.head, result); - } - return result; - }, - AddLast$1: function (node) { - this.ValidateNewNode(node); - - if (this.head == null) { - this.InternalInsertNodeToEmptyList(node); - } else { - this.InternalInsertNodeBefore(this.head, node); - } - node.list = this; - }, - clear: function () { - var current = this.head; - while (current != null) { - var temp = current; - current = current.Next; - temp.Invalidate(); - } - - this.head = null; - this.count = 0; - this.version = (this.version + 1) | 0; - }, - contains: function (value) { - return this.Find(value) != null; - }, - copyTo: function (array, index) { - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (index < 0 || index > array.length) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - if (((array.length - index) | 0) < this.Count) { - throw new System.ArgumentException.ctor(); - } - - var node = this.head; - if (node != null) { - do { - array[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), array)] = node.item; - node = node.next; - } while (!H5.referenceEquals(node, this.head)); - } - }, - System$Collections$ICollection$copyTo: function (array, index) { - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (System.Array.getRank(array) !== 1) { - throw new System.ArgumentException.ctor(); - } - - if (System.Array.getLower(array, 0) !== 0) { - throw new System.ArgumentException.ctor(); - } - - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - if (((array.length - index) | 0) < this.Count) { - throw new System.ArgumentException.ctor(); - } - var tArray; - if (((tArray = H5.as(array, System.Array.type(T)))) != null) { - this.copyTo(tArray, index); - } else { - var targetType = (H5.getType(array).$elementType || null); - var sourceType = T; - if (!(H5.Reflection.isAssignableFrom(targetType, sourceType) || H5.Reflection.isAssignableFrom(sourceType, targetType))) { - throw new System.ArgumentException.ctor(); - } - var objects; - if (!(((objects = H5.as(array, System.Array.type(System.Object)))) != null)) { - throw new System.ArgumentException.ctor(); - } - var node = this.head; - try { - if (node != null) { - do { - objects[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), objects)] = node.item; - node = node.next; - } while (!H5.referenceEquals(node, this.head)); - } - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.ArrayTypeMismatchException)) { - throw new System.ArgumentException.ctor(); - } else { - throw $e1; - } - } - } - }, - Find: function (value) { - var node = this.head; - var c = System.Collections.Generic.EqualityComparer$1(T).def; - if (node != null) { - if (value != null) { - do { - if (c.equals2(node.item, value)) { - return node; - } - node = node.next; - } while (!H5.referenceEquals(node, this.head)); - } else { - do { - if (node.item == null) { - return node; - } - node = node.next; - } while (!H5.referenceEquals(node, this.head)); - } - } - return null; - }, - FindLast: function (value) { - if (this.head == null) { - return null; - } - - var last = this.head.prev; - var node = last; - var c = System.Collections.Generic.EqualityComparer$1(T).def; - if (node != null) { - if (value != null) { - do { - if (c.equals2(node.item, value)) { - return node; - } - - node = node.prev; - } while (!H5.referenceEquals(node, last)); - } else { - do { - if (node.item == null) { - return node; - } - node = node.prev; - } while (!H5.referenceEquals(node, last)); - } - } - return null; - }, - GetEnumerator: function () { - return new (System.Collections.Generic.LinkedList$1.Enumerator(T)).$ctor1(this); - }, - System$Collections$Generic$IEnumerable$1$GetEnumerator: function () { - return this.GetEnumerator().$clone(); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return this.GetEnumerator().$clone(); - }, - remove: function (value) { - var node = this.Find(value); - if (node != null) { - this.InternalRemoveNode(node); - return true; - } - return false; - }, - Remove: function (node) { - this.ValidateNode(node); - this.InternalRemoveNode(node); - }, - RemoveFirst: function () { - if (this.head == null) { - throw new System.InvalidOperationException.ctor(); - } - this.InternalRemoveNode(this.head); - }, - RemoveLast: function () { - if (this.head == null) { - throw new System.InvalidOperationException.ctor(); - } - this.InternalRemoveNode(this.head.prev); - }, - InternalInsertNodeBefore: function (node, newNode) { - newNode.next = node; - newNode.prev = node.prev; - node.prev.next = newNode; - node.prev = newNode; - this.version = (this.version + 1) | 0; - this.count = (this.count + 1) | 0; - }, - InternalInsertNodeToEmptyList: function (newNode) { - newNode.next = newNode; - newNode.prev = newNode; - this.head = newNode; - this.version = (this.version + 1) | 0; - this.count = (this.count + 1) | 0; - }, - InternalRemoveNode: function (node) { - if (H5.referenceEquals(node.next, node)) { - this.head = null; - } else { - node.next.prev = node.prev; - node.prev.next = node.next; - if (H5.referenceEquals(this.head, node)) { - this.head = node.next; - } - } - node.Invalidate(); - this.count = (this.count - 1) | 0; - this.version = (this.version + 1) | 0; - }, - ValidateNewNode: function (node) { - if (node == null) { - throw new System.ArgumentNullException.$ctor1("node"); - } - - if (node.list != null) { - throw new System.InvalidOperationException.ctor(); - } - }, - ValidateNode: function (node) { - if (node == null) { - throw new System.ArgumentNullException.$ctor1("node"); - } - - if (!H5.referenceEquals(node.list, this)) { - throw new System.InvalidOperationException.ctor(); - } - } - } - }; }); - - // @source LinkedListNode.js - - H5.define("System.Collections.Generic.LinkedListNode$1", function (T) { return { - fields: { - list: null, - next: null, - prev: null, - item: H5.getDefaultValue(T) - }, - props: { - List: { - get: function () { - return this.list; - } - }, - Next: { - get: function () { - return this.next == null || H5.referenceEquals(this.next, this.list.head) ? null : this.next; - } - }, - Previous: { - get: function () { - return this.prev == null || H5.referenceEquals(this, this.list.head) ? null : this.prev; - } - }, - Value: { - get: function () { - return this.item; - }, - set: function (value) { - this.item = value; - } - } - }, - ctors: { - ctor: function (value) { - this.$initialize(); - this.item = value; - }, - $ctor1: function (list, value) { - this.$initialize(); - this.list = list; - this.item = value; - } - }, - methods: { - Invalidate: function () { - this.list = null; - this.next = null; - this.prev = null; - } - } - }; }); - - // @source Enumerator.js - - H5.define("System.Collections.Generic.LinkedList$1.Enumerator", function (T) { return { - inherits: [System.Collections.Generic.IEnumerator$1(T),System.Collections.IEnumerator], - $kind: "nested struct", - statics: { - fields: { - LinkedListName: null, - CurrentValueName: null, - VersionName: null, - IndexName: null - }, - ctors: { - init: function () { - this.LinkedListName = "LinkedList"; - this.CurrentValueName = "Current"; - this.VersionName = "Version"; - this.IndexName = "Index"; - } - }, - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.list = null; - $.node = null; - $.version = 0; - $.current = null; - $.index = 0; - return $;} - } - }, - fields: { - list: null, - node: null, - version: 0, - current: H5.getDefaultValue(T), - index: 0 - }, - props: { - Current: { - get: function () { - return this.current; - } - }, - System$Collections$IEnumerator$Current: { - get: function () { - if (this.index === 0 || (this.index === ((this.list.Count + 1) | 0))) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - return this.current; - } - } - }, - alias: [ - "Current", ["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"], - "moveNext", "System$Collections$IEnumerator$moveNext", - "Dispose", "System$IDisposable$Dispose" - ], - ctors: { - $ctor1: function (list) { - this.$initialize(); - this.list = list; - this.version = list.version; - this.node = list.head; - this.current = H5.getDefaultValue(T); - this.index = 0; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - moveNext: function () { - if (this.version !== this.list.version) { - throw new System.InvalidOperationException.ctor(); - } - - if (this.node == null) { - this.index = (this.list.Count + 1) | 0; - return false; - } - - this.index = (this.index + 1) | 0; - this.current = this.node.item; - this.node = this.node.next; - if (H5.referenceEquals(this.node, this.list.head)) { - this.node = null; - } - return true; - }, - System$Collections$IEnumerator$reset: function () { - if (this.version !== this.list.version) { - throw new System.InvalidOperationException.ctor(); - } - - this.current = H5.getDefaultValue(T); - this.node = this.list.head; - this.index = 0; - }, - Dispose: function () { }, - getHashCode: function () { - var h = H5.addHash([3788985113, this.list, this.node, this.version, this.current, this.index]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.LinkedList$1.Enumerator(T))) { - return false; - } - return H5.equals(this.list, o.list) && H5.equals(this.node, o.node) && H5.equals(this.version, o.version) && H5.equals(this.current, o.current) && H5.equals(this.index, o.index); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.LinkedList$1.Enumerator(T))(); - s.list = this.list; - s.node = this.node; - s.version = this.version; - s.current = this.current; - s.index = this.index; - return s; - } - } - }; }); - - // @source TreeRotation.js - - H5.define("System.Collections.Generic.TreeRotation", { - $kind: "enum", - statics: { - fields: { - LeftRotation: 1, - RightRotation: 2, - RightLeftRotation: 3, - LeftRightRotation: 4 - } - } - }); - - // @source Dictionary.js - - H5.define("System.Collections.Generic.Dictionary$2", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.IDictionary$2(TKey,TValue),System.Collections.IDictionary,System.Collections.Generic.IReadOnlyDictionary$2(TKey,TValue)], - statics: { - fields: { - VersionName: null, - HashSizeName: null, - KeyValuePairsName: null, - ComparerName: null - }, - ctors: { - init: function () { - this.VersionName = "Version"; - this.HashSizeName = "HashSize"; - this.KeyValuePairsName = "KeyValuePairs"; - this.ComparerName = "Comparer"; - } - }, - methods: { - IsCompatibleKey: function (key) { - if (key == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key); - } - return (H5.is(key, TKey)); - } - } - }, - fields: { - buckets: null, - simpleBuckets: null, - entries: null, - count: 0, - version: 0, - freeList: 0, - freeCount: 0, - comparer: null, - keys: null, - values: null, - isSimpleKey: false - }, - props: { - Comparer: { - get: function () { - return this.comparer; - } - }, - Count: { - get: function () { - return ((this.count - this.freeCount) | 0); - } - }, - Keys: { - get: function () { - if (this.keys == null) { - this.keys = new (System.Collections.Generic.Dictionary$2.KeyCollection(TKey,TValue))(this); - } - return this.keys; - } - }, - System$Collections$Generic$IDictionary$2$Keys: { - get: function () { - if (this.keys == null) { - this.keys = new (System.Collections.Generic.Dictionary$2.KeyCollection(TKey,TValue))(this); - } - return this.keys; - } - }, - System$Collections$Generic$IReadOnlyDictionary$2$Keys: { - get: function () { - if (this.keys == null) { - this.keys = new (System.Collections.Generic.Dictionary$2.KeyCollection(TKey,TValue))(this); - } - return this.keys; - } - }, - Values: { - get: function () { - if (this.values == null) { - this.values = new (System.Collections.Generic.Dictionary$2.ValueCollection(TKey,TValue))(this); - } - return this.values; - } - }, - System$Collections$Generic$IDictionary$2$Values: { - get: function () { - if (this.values == null) { - this.values = new (System.Collections.Generic.Dictionary$2.ValueCollection(TKey,TValue))(this); - } - return this.values; - } - }, - System$Collections$Generic$IReadOnlyDictionary$2$Values: { - get: function () { - if (this.values == null) { - this.values = new (System.Collections.Generic.Dictionary$2.ValueCollection(TKey,TValue))(this); - } - return this.values; - } - }, - System$Collections$Generic$ICollection$1$IsReadOnly: { - get: function () { - return false; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return null; - } - }, - System$Collections$IDictionary$IsFixedSize: { - get: function () { - return false; - } - }, - System$Collections$IDictionary$IsReadOnly: { - get: function () { - return false; - } - }, - System$Collections$IDictionary$Keys: { - get: function () { - return H5.cast(this.Keys, System.Collections.ICollection); - } - }, - System$Collections$IDictionary$Values: { - get: function () { - return H5.cast(this.Values, System.Collections.ICollection); - } - } - }, - alias: [ - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Count", - "System$Collections$Generic$IDictionary$2$Keys", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Keys", - "System$Collections$Generic$IReadOnlyDictionary$2$Keys", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Keys", - "System$Collections$Generic$IDictionary$2$Values", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Values", - "System$Collections$Generic$IReadOnlyDictionary$2$Values", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Values", - "getItem", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$getItem", - "setItem", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$setItem", - "getItem", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$getItem", - "setItem", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$setItem", - "add", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$add", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$add", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$add", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$contains", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$contains", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$remove", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$remove", - "clear", "System$Collections$IDictionary$clear", - "clear", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$clear", - "containsKey", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$containsKey", - "containsKey", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$containsKey", - "System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$GetEnumerator", "System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$GetEnumerator", - "remove", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$remove", - "tryGetValue", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$tryGetValue", - "tryGetValue", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$tryGetValue", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$IsReadOnly", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$IsReadOnly", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$copyTo", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$copyTo" - ], - ctors: { - ctor: function () { - System.Collections.Generic.Dictionary$2(TKey,TValue).$ctor5.call(this, 0, null); - }, - $ctor4: function (capacity) { - System.Collections.Generic.Dictionary$2(TKey,TValue).$ctor5.call(this, capacity, null); - }, - $ctor3: function (comparer) { - System.Collections.Generic.Dictionary$2(TKey,TValue).$ctor5.call(this, 0, comparer); - }, - $ctor5: function (capacity, comparer) { - this.$initialize(); - if (capacity < 0) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$1(System.ExceptionArgument.capacity); - } - if (capacity > 0) { - this.Initialize(capacity); - } - this.comparer = comparer || System.Collections.Generic.EqualityComparer$1(TKey).def; - - this.isSimpleKey = ((TKey === System.String) || (TKey.$number === true && TKey !== System.Int64 && TKey !== System.UInt64) || (TKey === System.Char)) && (H5.referenceEquals(this.comparer, System.Collections.Generic.EqualityComparer$1(TKey).def)); - }, - $ctor1: function (dictionary) { - System.Collections.Generic.Dictionary$2(TKey,TValue).$ctor2.call(this, dictionary, null); - }, - $ctor2: function (dictionary, comparer) { - var $t; - System.Collections.Generic.Dictionary$2(TKey,TValue).$ctor5.call(this, dictionary != null ? System.Array.getCount(dictionary, System.Collections.Generic.KeyValuePair$2(TKey,TValue)) : 0, comparer); - - if (dictionary == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.dictionary); - } - - $t = H5.getEnumerator(dictionary, System.Collections.Generic.KeyValuePair$2(TKey,TValue)); - try { - while ($t.moveNext()) { - var pair = $t.Current; - this.add(pair.key, pair.value); - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - } - }, - methods: { - getItem: function (key) { - var i = this.FindEntry(key); - if (i >= 0) { - return this.entries[System.Array.index(i, this.entries)].value; - } - throw new System.Collections.Generic.KeyNotFoundException.ctor(); - }, - setItem: function (key, value) { - this.Insert(key, value, false); - }, - System$Collections$IDictionary$getItem: function (key) { - if (System.Collections.Generic.Dictionary$2(TKey,TValue).IsCompatibleKey(key)) { - var i = this.FindEntry(H5.cast(H5.unbox(key, TKey), TKey)); - if (i >= 0) { - return this.entries[System.Array.index(i, this.entries)].value; - } - } - return null; - }, - System$Collections$IDictionary$setItem: function (key, value) { - if (key == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key); - } - System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(TValue, value, System.ExceptionArgument.value); - - try { - var tempKey = H5.cast(H5.unbox(key, TKey), TKey); - try { - this.setItem(tempKey, H5.cast(H5.unbox(value, TValue), TValue)); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.InvalidCastException)) { - System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object, value, TValue); - } else { - throw $e1; - } - } - } catch ($e2) { - $e2 = System.Exception.create($e2); - if (H5.is($e2, System.InvalidCastException)) { - System.ThrowHelper.ThrowWrongKeyTypeArgumentException(System.Object, key, TKey); - } else { - throw $e2; - } - } - }, - add: function (key, value) { - this.Insert(key, value, true); - }, - System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$add: function (keyValuePair) { - this.add(keyValuePair.key, keyValuePair.value); - }, - System$Collections$IDictionary$add: function (key, value) { - if (key == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key); - } - System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(TValue, value, System.ExceptionArgument.value); - - try { - var tempKey = H5.cast(H5.unbox(key, TKey), TKey); - - try { - this.add(tempKey, H5.cast(H5.unbox(value, TValue), TValue)); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.InvalidCastException)) { - System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object, value, TValue); - } else { - throw $e1; - } - } - } catch ($e2) { - $e2 = System.Exception.create($e2); - if (H5.is($e2, System.InvalidCastException)) { - System.ThrowHelper.ThrowWrongKeyTypeArgumentException(System.Object, key, TKey); - } else { - throw $e2; - } - } - }, - System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$contains: function (keyValuePair) { - var i = this.FindEntry(keyValuePair.key); - if (i >= 0 && System.Collections.Generic.EqualityComparer$1(TValue).def.equals2(this.entries[System.Array.index(i, this.entries)].value, keyValuePair.value)) { - return true; - } - return false; - }, - System$Collections$IDictionary$contains: function (key) { - if (System.Collections.Generic.Dictionary$2(TKey,TValue).IsCompatibleKey(key)) { - return this.containsKey(H5.cast(H5.unbox(key, TKey), TKey)); - } - - return false; - }, - System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$remove: function (keyValuePair) { - var i = this.FindEntry(keyValuePair.key); - if (i >= 0 && System.Collections.Generic.EqualityComparer$1(TValue).def.equals2(this.entries[System.Array.index(i, this.entries)].value, keyValuePair.value)) { - this.remove(keyValuePair.key); - return true; - } - return false; - }, - remove: function (key) { - if (key == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key); - } - - if (this.isSimpleKey) { - if (this.simpleBuckets != null) { - if (this.simpleBuckets.hasOwnProperty(key)) { - var i = this.simpleBuckets[key]; - delete this.simpleBuckets[key]; - this.entries[System.Array.index(i, this.entries)].hashCode = -1; - this.entries[System.Array.index(i, this.entries)].next = this.freeList; - this.entries[System.Array.index(i, this.entries)].key = H5.getDefaultValue(TKey); - this.entries[System.Array.index(i, this.entries)].value = H5.getDefaultValue(TValue); - this.freeList = i; - this.freeCount = (this.freeCount + 1) | 0; - this.version = (this.version + 1) | 0; - return true; - } - } - } else if (this.buckets != null) { - var hashCode = this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(TKey) + "$getHashCode2", "System$Collections$Generic$IEqualityComparer$1$getHashCode2")](key) & 2147483647; - var bucket = hashCode % this.buckets.length; - var last = -1; - for (var i1 = this.buckets[System.Array.index(bucket, this.buckets)]; i1 >= 0; last = i1, i1 = this.entries[System.Array.index(i1, this.entries)].next) { - if (this.entries[System.Array.index(i1, this.entries)].hashCode === hashCode && this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(TKey) + "$equals2", "System$Collections$Generic$IEqualityComparer$1$equals2")](this.entries[System.Array.index(i1, this.entries)].key, key)) { - if (last < 0) { - this.buckets[System.Array.index(bucket, this.buckets)] = this.entries[System.Array.index(i1, this.entries)].next; - } else { - this.entries[System.Array.index(last, this.entries)].next = this.entries[System.Array.index(i1, this.entries)].next; - } - this.entries[System.Array.index(i1, this.entries)].hashCode = -1; - this.entries[System.Array.index(i1, this.entries)].next = this.freeList; - this.entries[System.Array.index(i1, this.entries)].key = H5.getDefaultValue(TKey); - this.entries[System.Array.index(i1, this.entries)].value = H5.getDefaultValue(TValue); - this.freeList = i1; - this.freeCount = (this.freeCount + 1) | 0; - this.version = (this.version + 1) | 0; - return true; - } - } - } - return false; - }, - System$Collections$IDictionary$remove: function (key) { - if (System.Collections.Generic.Dictionary$2(TKey,TValue).IsCompatibleKey(key)) { - this.remove(H5.cast(H5.unbox(key, TKey), TKey)); - } - }, - clear: function () { - if (this.count > 0) { - for (var i = 0; i < this.buckets.length; i = (i + 1) | 0) { - this.buckets[System.Array.index(i, this.buckets)] = -1; - } - if (this.isSimpleKey) { - this.simpleBuckets = { }; - } - System.Array.fill(this.entries, function () { - return H5.getDefaultValue(System.Collections.Generic.Dictionary$2.Entry(TKey,TValue)); - }, 0, this.count); - this.freeList = -1; - this.count = 0; - this.freeCount = 0; - this.version = (this.version + 1) | 0; - } - }, - containsKey: function (key) { - return this.FindEntry(key) >= 0; - }, - ContainsValue: function (value) { - if (value == null) { - for (var i = 0; i < this.count; i = (i + 1) | 0) { - if (this.entries[System.Array.index(i, this.entries)].hashCode >= 0 && this.entries[System.Array.index(i, this.entries)].value == null) { - return true; - } - } - } else { - var c = System.Collections.Generic.EqualityComparer$1(TValue).def; - for (var i1 = 0; i1 < this.count; i1 = (i1 + 1) | 0) { - if (this.entries[System.Array.index(i1, this.entries)].hashCode >= 0 && c.equals2(this.entries[System.Array.index(i1, this.entries)].value, value)) { - return true; - } - } - } - return false; - }, - CopyTo: function (array, index) { - if (array == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array); - } - - if (index < 0 || index > array.length) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index, System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - } - - if (((array.length - index) | 0) < this.Count) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall); - } - - var count = this.count; - var entries = this.entries; - for (var i = 0; i < count; i = (i + 1) | 0) { - if (entries[System.Array.index(i, entries)].hashCode >= 0) { - array[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), array)] = new (System.Collections.Generic.KeyValuePair$2(TKey,TValue)).$ctor1(entries[System.Array.index(i, entries)].key, entries[System.Array.index(i, entries)].value); - } - } - }, - System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$copyTo: function (array, index) { - this.CopyTo(array, index); - }, - System$Collections$ICollection$copyTo: function (array, index) { - if (array == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array); - } - - if (System.Array.getRank(array) !== 1) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported); - } - - if (System.Array.getLower(array, 0) !== 0) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_NonZeroLowerBound); - } - - if (index < 0 || index > array.length) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index, System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - } - - if (((array.length - index) | 0) < this.Count) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall); - } - var pairs; - if (((pairs = H5.as(array, System.Array.type(System.Collections.Generic.KeyValuePair$2(TKey,TValue))))) != null) { - this.CopyTo(pairs, index); - } else if (H5.is(array, System.Array.type(System.Collections.DictionaryEntry))) { - var dictEntryArray = H5.as(array, System.Array.type(System.Collections.DictionaryEntry)); - var entries = this.entries; - for (var i = 0; i < this.count; i = (i + 1) | 0) { - if (entries[System.Array.index(i, entries)].hashCode >= 0) { - dictEntryArray[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), dictEntryArray)] = new System.Collections.DictionaryEntry.$ctor1(entries[System.Array.index(i, entries)].key, entries[System.Array.index(i, entries)].value); - } - } - } else { - var objects = H5.as(array, System.Array.type(System.Object)); - if (objects == null) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType); - } - - try { - var count = this.count; - var entries1 = this.entries; - for (var i1 = 0; i1 < count; i1 = (i1 + 1) | 0) { - if (entries1[System.Array.index(i1, entries1)].hashCode >= 0) { - objects[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), objects)] = new (System.Collections.Generic.KeyValuePair$2(TKey,TValue)).$ctor1(entries1[System.Array.index(i1, entries1)].key, entries1[System.Array.index(i1, entries1)].value); - } - } - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.ArrayTypeMismatchException)) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType); - } else { - throw $e1; - } - } - } - }, - GetEnumerator: function () { - return new (System.Collections.Generic.Dictionary$2.Enumerator(TKey,TValue)).$ctor1(this, System.Collections.Generic.Dictionary$2.Enumerator(TKey,TValue).KeyValuePair); - }, - System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$GetEnumerator: function () { - return new (System.Collections.Generic.Dictionary$2.Enumerator(TKey,TValue)).$ctor1(this, System.Collections.Generic.Dictionary$2.Enumerator(TKey,TValue).KeyValuePair).$clone(); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return new (System.Collections.Generic.Dictionary$2.Enumerator(TKey,TValue)).$ctor1(this, System.Collections.Generic.Dictionary$2.Enumerator(TKey,TValue).KeyValuePair).$clone(); - }, - System$Collections$IDictionary$GetEnumerator: function () { - return new (System.Collections.Generic.Dictionary$2.Enumerator(TKey,TValue)).$ctor1(this, System.Collections.Generic.Dictionary$2.Enumerator(TKey,TValue).DictEntry).$clone(); - }, - FindEntry: function (key) { - if (key == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key); - } - - if (this.isSimpleKey) { - if (this.simpleBuckets != null && this.simpleBuckets.hasOwnProperty(key)) { - return this.simpleBuckets[key]; - } - } else if (this.buckets != null) { - var hashCode = this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(TKey) + "$getHashCode2", "System$Collections$Generic$IEqualityComparer$1$getHashCode2")](key) & 2147483647; - for (var i = this.buckets[System.Array.index(hashCode % this.buckets.length, this.buckets)]; i >= 0; i = this.entries[System.Array.index(i, this.entries)].next) { - if (this.entries[System.Array.index(i, this.entries)].hashCode === hashCode && this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(TKey) + "$equals2", "System$Collections$Generic$IEqualityComparer$1$equals2")](this.entries[System.Array.index(i, this.entries)].key, key)) { - return i; - } - } - } - return -1; - }, - Initialize: function (capacity) { - var size = System.Collections.HashHelpers.GetPrime(capacity); - this.buckets = System.Array.init(size, 0, System.Int32); - for (var i = 0; i < this.buckets.length; i = (i + 1) | 0) { - this.buckets[System.Array.index(i, this.buckets)] = -1; - } - this.entries = System.Array.init(size, function (){ - return H5.getDefaultValue(System.Collections.Generic.Dictionary$2.Entry(TKey,TValue)); - }, System.Collections.Generic.Dictionary$2.Entry(TKey,TValue)); - this.freeList = -1; - this.simpleBuckets = { }; - }, - Insert: function (key, value, add) { - - if (key == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.key); - } - - if (this.buckets == null) { - this.Initialize(0); - } - - if (this.isSimpleKey) { - if (this.simpleBuckets.hasOwnProperty(key)) { - if (add) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_AddingDuplicate); - } - - this.entries[System.Array.index(this.simpleBuckets[key], this.entries)].value = value; - this.version = (this.version + 1) | 0; - return; - } - - var simpleIndex; - if (this.freeCount > 0) { - simpleIndex = this.freeList; - this.freeList = this.entries[System.Array.index(simpleIndex, this.entries)].next; - this.freeCount = (this.freeCount - 1) | 0; - } else { - if (this.count === this.entries.length) { - this.Resize(); - } - simpleIndex = this.count; - this.count = (this.count + 1) | 0; - } - - this.entries[System.Array.index(simpleIndex, this.entries)].hashCode = 1; - this.entries[System.Array.index(simpleIndex, this.entries)].next = -1; - this.entries[System.Array.index(simpleIndex, this.entries)].key = key; - this.entries[System.Array.index(simpleIndex, this.entries)].value = value; - - this.simpleBuckets[key] = simpleIndex; - this.version = (this.version + 1) | 0; - - return; - } - - var hashCode = this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(TKey) + "$getHashCode2", "System$Collections$Generic$IEqualityComparer$1$getHashCode2")](key) & 2147483647; - var targetBucket = hashCode % this.buckets.length; - - for (var i = this.buckets[System.Array.index(targetBucket, this.buckets)]; i >= 0; i = this.entries[System.Array.index(i, this.entries)].next) { - if (this.entries[System.Array.index(i, this.entries)].hashCode === hashCode && this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(TKey) + "$equals2", "System$Collections$Generic$IEqualityComparer$1$equals2")](this.entries[System.Array.index(i, this.entries)].key, key)) { - if (add) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_AddingDuplicate); - } - this.entries[System.Array.index(i, this.entries)].value = value; - this.version = (this.version + 1) | 0; - return; - } - } - var index; - if (this.freeCount > 0) { - index = this.freeList; - this.freeList = this.entries[System.Array.index(index, this.entries)].next; - this.freeCount = (this.freeCount - 1) | 0; - } else { - if (this.count === this.entries.length) { - this.Resize(); - targetBucket = hashCode % this.buckets.length; - } - index = this.count; - this.count = (this.count + 1) | 0; - } - - this.entries[System.Array.index(index, this.entries)].hashCode = hashCode; - this.entries[System.Array.index(index, this.entries)].next = this.buckets[System.Array.index(targetBucket, this.buckets)]; - this.entries[System.Array.index(index, this.entries)].key = key; - this.entries[System.Array.index(index, this.entries)].value = value; - this.buckets[System.Array.index(targetBucket, this.buckets)] = index; - this.version = (this.version + 1) | 0; - }, - Resize: function () { - this.Resize$1(System.Collections.HashHelpers.ExpandPrime(this.count), false); - }, - Resize$1: function (newSize, forceNewHashCodes) { - var newBuckets = System.Array.init(newSize, 0, System.Int32); - for (var i = 0; i < newBuckets.length; i = (i + 1) | 0) { - newBuckets[System.Array.index(i, newBuckets)] = -1; - } - if (this.isSimpleKey) { - this.simpleBuckets = { }; - } - var newEntries = System.Array.init(newSize, function (){ - return H5.getDefaultValue(System.Collections.Generic.Dictionary$2.Entry(TKey,TValue)); - }, System.Collections.Generic.Dictionary$2.Entry(TKey,TValue)); - System.Array.copy(this.entries, 0, newEntries, 0, this.count); - if (forceNewHashCodes) { - for (var i1 = 0; i1 < this.count; i1 = (i1 + 1) | 0) { - if (newEntries[System.Array.index(i1, newEntries)].hashCode !== -1) { - newEntries[System.Array.index(i1, newEntries)].hashCode = (this.comparer[H5.geti(this.comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(TKey) + "$getHashCode2", "System$Collections$Generic$IEqualityComparer$1$getHashCode2")](newEntries[System.Array.index(i1, newEntries)].key) & 2147483647); - } - } - } - for (var i2 = 0; i2 < this.count; i2 = (i2 + 1) | 0) { - if (newEntries[System.Array.index(i2, newEntries)].hashCode >= 0) { - if (this.isSimpleKey) { - newEntries[System.Array.index(i2, newEntries)].next = -1; - this.simpleBuckets[newEntries[System.Array.index(i2, newEntries)].key] = i2; - } else { - var bucket = newEntries[System.Array.index(i2, newEntries)].hashCode % newSize; - newEntries[System.Array.index(i2, newEntries)].next = newBuckets[System.Array.index(bucket, newBuckets)]; - newBuckets[System.Array.index(bucket, newBuckets)] = i2; - } - } - } - this.buckets = newBuckets; - this.entries = newEntries; - }, - tryGetValue: function (key, value) { - var i = this.FindEntry(key); - if (i >= 0) { - value.v = this.entries[System.Array.index(i, this.entries)].value; - return true; - } - value.v = H5.getDefaultValue(TValue); - return false; - }, - GetValueOrDefault: function (key) { - var i = this.FindEntry(key); - if (i >= 0) { - return this.entries[System.Array.index(i, this.entries)].value; - } - return H5.getDefaultValue(TValue); - } - } - }; }); - - // @source Entry.js - - H5.define("System.Collections.Generic.Dictionary$2.Entry", function (TKey, TValue) { return { - $kind: "nested struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.hashCode = 0; - $.next = 0; - $.key = null; - $.value = null; - return $;} - } - }, - fields: { - hashCode: 0, - next: 0, - key: H5.getDefaultValue(TKey), - value: H5.getDefaultValue(TValue) - }, - ctors: { - ctor: function () { - this.$initialize(); - } - }, - methods: { - getHashCode: function () { - var h = H5.addHash([1920233150, this.hashCode, this.next, this.key, this.value]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.Dictionary$2.Entry(TKey,TValue))) { - return false; - } - return H5.equals(this.hashCode, o.hashCode) && H5.equals(this.next, o.next) && H5.equals(this.key, o.key) && H5.equals(this.value, o.value); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.Dictionary$2.Entry(TKey,TValue))(); - s.hashCode = this.hashCode; - s.next = this.next; - s.key = this.key; - s.value = this.value; - return s; - } - } - }; }); - - // @source Enumerator.js - - H5.define("System.Collections.Generic.Dictionary$2.Enumerator", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.IEnumerator$1(System.Collections.Generic.KeyValuePair$2(TKey,TValue)),System.Collections.IDictionaryEnumerator], - $kind: "nested struct", - statics: { - fields: { - DictEntry: 0, - KeyValuePair: 0 - }, - ctors: { - init: function () { - this.DictEntry = 1; - this.KeyValuePair = 2; - } - }, - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.dictionary = null; - $.version = 0; - $.index = 0; - $.current = H5.getDefaultValue(System.Collections.Generic.KeyValuePair$2(TKey,TValue)); - $.getEnumeratorRetType = 0; - return $;} - } - }, - fields: { - dictionary: null, - version: 0, - index: 0, - current: null, - getEnumeratorRetType: 0 - }, - props: { - Current: { - get: function () { - return this.current; - } - }, - System$Collections$IEnumerator$Current: { - get: function () { - if (this.index === 0 || (this.index === ((this.dictionary.count + 1) | 0))) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - if (this.getEnumeratorRetType === System.Collections.Generic.Dictionary$2.Enumerator(TKey,TValue).DictEntry) { - return new System.Collections.DictionaryEntry.$ctor1(this.current.key, this.current.value).$clone(); - } else { - return new (System.Collections.Generic.KeyValuePair$2(TKey,TValue)).$ctor1(this.current.key, this.current.value); - } - } - }, - System$Collections$IDictionaryEnumerator$Entry: { - get: function () { - if (this.index === 0 || (this.index === ((this.dictionary.count + 1) | 0))) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - return new System.Collections.DictionaryEntry.$ctor1(this.current.key, this.current.value); - } - }, - System$Collections$IDictionaryEnumerator$Key: { - get: function () { - if (this.index === 0 || (this.index === ((this.dictionary.count + 1) | 0))) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - return this.current.key; - } - }, - System$Collections$IDictionaryEnumerator$Value: { - get: function () { - if (this.index === 0 || (this.index === ((this.dictionary.count + 1) | 0))) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - return this.current.value; - } - } - }, - alias: [ - "moveNext", "System$Collections$IEnumerator$moveNext", - "Current", ["System$Collections$Generic$IEnumerator$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"], - "Dispose", "System$IDisposable$Dispose" - ], - ctors: { - init: function () { - this.current = H5.getDefaultValue(System.Collections.Generic.KeyValuePair$2(TKey,TValue)); - }, - $ctor1: function (dictionary, getEnumeratorRetType) { - this.$initialize(); - this.dictionary = dictionary; - this.version = dictionary.version; - this.index = 0; - this.getEnumeratorRetType = getEnumeratorRetType; - this.current = new (System.Collections.Generic.KeyValuePair$2(TKey,TValue)).ctor(); - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - moveNext: function () { - var $t, $t1, $t2; - if (this.version !== this.dictionary.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - - while ((this.index >>> 0) < ((this.dictionary.count) >>> 0)) { - if (($t = this.dictionary.entries)[System.Array.index(this.index, $t)].hashCode >= 0) { - this.current = new (System.Collections.Generic.KeyValuePair$2(TKey,TValue)).$ctor1(($t1 = this.dictionary.entries)[System.Array.index(this.index, $t1)].key, ($t2 = this.dictionary.entries)[System.Array.index(this.index, $t2)].value); - this.index = (this.index + 1) | 0; - return true; - } - this.index = (this.index + 1) | 0; - } - - this.index = (this.dictionary.count + 1) | 0; - this.current = new (System.Collections.Generic.KeyValuePair$2(TKey,TValue)).ctor(); - return false; - }, - Dispose: function () { }, - System$Collections$IEnumerator$reset: function () { - if (this.version !== this.dictionary.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - - this.index = 0; - this.current = new (System.Collections.Generic.KeyValuePair$2(TKey,TValue)).ctor(); - }, - getHashCode: function () { - var h = H5.addHash([3788985113, this.dictionary, this.version, this.index, this.current, this.getEnumeratorRetType]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.Dictionary$2.Enumerator(TKey,TValue))) { - return false; - } - return H5.equals(this.dictionary, o.dictionary) && H5.equals(this.version, o.version) && H5.equals(this.index, o.index) && H5.equals(this.current, o.current) && H5.equals(this.getEnumeratorRetType, o.getEnumeratorRetType); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.Dictionary$2.Enumerator(TKey,TValue))(); - s.dictionary = this.dictionary; - s.version = this.version; - s.index = this.index; - s.current = this.current; - s.getEnumeratorRetType = this.getEnumeratorRetType; - return s; - } - } - }; }); - - // @source KeyCollection.js - - H5.define("System.Collections.Generic.Dictionary$2.KeyCollection", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.ICollection$1(TKey),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(TKey)], - $kind: "nested class", - fields: { - dictionary: null - }, - props: { - Count: { - get: function () { - return this.dictionary.Count; - } - }, - System$Collections$Generic$ICollection$1$IsReadOnly: { - get: function () { - return true; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return H5.cast(this.dictionary, System.Collections.ICollection).System$Collections$ICollection$SyncRoot; - } - } - }, - alias: [ - "copyTo", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$copyTo", - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(TKey) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$Count", - "System$Collections$Generic$ICollection$1$IsReadOnly", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$IsReadOnly", - "System$Collections$Generic$ICollection$1$add", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$add", - "System$Collections$Generic$ICollection$1$clear", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$clear", - "System$Collections$Generic$ICollection$1$contains", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$contains", - "System$Collections$Generic$ICollection$1$remove", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$remove", - "System$Collections$Generic$IEnumerable$1$GetEnumerator", "System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(TKey) + "$GetEnumerator" - ], - ctors: { - ctor: function (dictionary) { - this.$initialize(); - if (dictionary == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.dictionary); - } - this.dictionary = dictionary; - } - }, - methods: { - GetEnumerator: function () { - return new (System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator(TKey,TValue)).$ctor1(this.dictionary); - }, - System$Collections$Generic$IEnumerable$1$GetEnumerator: function () { - return new (System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator(TKey,TValue)).$ctor1(this.dictionary).$clone(); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return new (System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator(TKey,TValue)).$ctor1(this.dictionary).$clone(); - }, - copyTo: function (array, index) { - if (array == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array); - } - - if (index < 0 || index > array.length) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index, System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - } - - if (((array.length - index) | 0) < this.dictionary.Count) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall); - } - - var count = this.dictionary.count; - var entries = this.dictionary.entries; - for (var i = 0; i < count; i = (i + 1) | 0) { - if (entries[System.Array.index(i, entries)].hashCode >= 0) { - array[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), array)] = entries[System.Array.index(i, entries)].key; - } - } - }, - System$Collections$ICollection$copyTo: function (array, index) { - if (array == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array); - } - - if (System.Array.getRank(array) !== 1) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported); - } - - if (System.Array.getLower(array, 0) !== 0) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_NonZeroLowerBound); - } - - if (index < 0 || index > array.length) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index, System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - } - - if (((array.length - index) | 0) < this.dictionary.Count) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall); - } - var keys; - if (((keys = H5.as(array, System.Array.type(TKey)))) != null) { - this.copyTo(keys, index); - } else { - var objects = H5.as(array, System.Array.type(System.Object)); - if (objects == null) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType); - } - - var count = this.dictionary.count; - var entries = this.dictionary.entries; - try { - for (var i = 0; i < count; i = (i + 1) | 0) { - if (entries[System.Array.index(i, entries)].hashCode >= 0) { - objects[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), objects)] = entries[System.Array.index(i, entries)].key; - } - } - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.ArrayTypeMismatchException)) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType); - } else { - throw $e1; - } - } - } - }, - System$Collections$Generic$ICollection$1$add: function (item) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_KeyCollectionSet); - }, - System$Collections$Generic$ICollection$1$clear: function () { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_KeyCollectionSet); - }, - System$Collections$Generic$ICollection$1$contains: function (item) { - return this.dictionary.containsKey(item); - }, - System$Collections$Generic$ICollection$1$remove: function (item) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_KeyCollectionSet); - return false; - } - } - }; }); - - // @source Enumerator.js - - H5.define("System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.IEnumerator$1(TKey),System.Collections.IEnumerator], - $kind: "nested struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.dictionary = null; - $.index = 0; - $.version = 0; - $.currentKey = null; - return $;} - } - }, - fields: { - dictionary: null, - index: 0, - version: 0, - currentKey: H5.getDefaultValue(TKey) - }, - props: { - Current: { - get: function () { - return this.currentKey; - } - }, - System$Collections$IEnumerator$Current: { - get: function () { - if (this.index === 0 || (this.index === ((this.dictionary.count + 1) | 0))) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - return this.currentKey; - } - } - }, - alias: [ - "Dispose", "System$IDisposable$Dispose", - "moveNext", "System$Collections$IEnumerator$moveNext", - "Current", ["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(TKey) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"] - ], - ctors: { - $ctor1: function (dictionary) { - this.$initialize(); - this.dictionary = dictionary; - this.version = dictionary.version; - this.index = 0; - this.currentKey = H5.getDefaultValue(TKey); - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - Dispose: function () { }, - moveNext: function () { - var $t, $t1; - if (this.version !== this.dictionary.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - - while ((this.index >>> 0) < ((this.dictionary.count) >>> 0)) { - if (($t = this.dictionary.entries)[System.Array.index(this.index, $t)].hashCode >= 0) { - this.currentKey = ($t1 = this.dictionary.entries)[System.Array.index(this.index, $t1)].key; - this.index = (this.index + 1) | 0; - return true; - } - this.index = (this.index + 1) | 0; - } - - this.index = (this.dictionary.count + 1) | 0; - this.currentKey = H5.getDefaultValue(TKey); - return false; - }, - System$Collections$IEnumerator$reset: function () { - if (this.version !== this.dictionary.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - - this.index = 0; - this.currentKey = H5.getDefaultValue(TKey); - }, - getHashCode: function () { - var h = H5.addHash([3788985113, this.dictionary, this.index, this.version, this.currentKey]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator(TKey,TValue))) { - return false; - } - return H5.equals(this.dictionary, o.dictionary) && H5.equals(this.index, o.index) && H5.equals(this.version, o.version) && H5.equals(this.currentKey, o.currentKey); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator(TKey,TValue))(); - s.dictionary = this.dictionary; - s.index = this.index; - s.version = this.version; - s.currentKey = this.currentKey; - return s; - } - } - }; }); - - // @source ValueCollection.js - - H5.define("System.Collections.Generic.Dictionary$2.ValueCollection", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.ICollection$1(TValue),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(TValue)], - $kind: "nested class", - fields: { - dictionary: null - }, - props: { - Count: { - get: function () { - return this.dictionary.Count; - } - }, - System$Collections$Generic$ICollection$1$IsReadOnly: { - get: function () { - return true; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return H5.cast(this.dictionary, System.Collections.ICollection).System$Collections$ICollection$SyncRoot; - } - } - }, - alias: [ - "copyTo", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$copyTo", - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(TValue) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$Count", - "System$Collections$Generic$ICollection$1$IsReadOnly", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$IsReadOnly", - "System$Collections$Generic$ICollection$1$add", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$add", - "System$Collections$Generic$ICollection$1$remove", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$remove", - "System$Collections$Generic$ICollection$1$clear", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$clear", - "System$Collections$Generic$ICollection$1$contains", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$contains", - "System$Collections$Generic$IEnumerable$1$GetEnumerator", "System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(TValue) + "$GetEnumerator" - ], - ctors: { - ctor: function (dictionary) { - this.$initialize(); - if (dictionary == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.dictionary); - } - this.dictionary = dictionary; - } - }, - methods: { - GetEnumerator: function () { - return new (System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator(TKey,TValue)).$ctor1(this.dictionary); - }, - System$Collections$Generic$IEnumerable$1$GetEnumerator: function () { - return new (System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator(TKey,TValue)).$ctor1(this.dictionary).$clone(); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return new (System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator(TKey,TValue)).$ctor1(this.dictionary).$clone(); - }, - copyTo: function (array, index) { - if (array == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array); - } - - if (index < 0 || index > array.length) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index, System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - } - - if (((array.length - index) | 0) < this.dictionary.Count) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall); - } - - var count = this.dictionary.count; - var entries = this.dictionary.entries; - for (var i = 0; i < count; i = (i + 1) | 0) { - if (entries[System.Array.index(i, entries)].hashCode >= 0) { - array[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), array)] = entries[System.Array.index(i, entries)].value; - } - } - }, - System$Collections$ICollection$copyTo: function (array, index) { - if (array == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array); - } - - if (System.Array.getRank(array) !== 1) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported); - } - - if (System.Array.getLower(array, 0) !== 0) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_NonZeroLowerBound); - } - - if (index < 0 || index > array.length) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index, System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - } - - if (((array.length - index) | 0) < this.dictionary.Count) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall); - } - var values; - if (((values = H5.as(array, System.Array.type(TValue)))) != null) { - this.copyTo(values, index); - } else { - var objects = H5.as(array, System.Array.type(System.Object)); - if (objects == null) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType); - } - - var count = this.dictionary.count; - var entries = this.dictionary.entries; - try { - for (var i = 0; i < count; i = (i + 1) | 0) { - if (entries[System.Array.index(i, entries)].hashCode >= 0) { - objects[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), objects)] = entries[System.Array.index(i, entries)].value; - } - } - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.ArrayTypeMismatchException)) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Argument_InvalidArrayType); - } else { - throw $e1; - } - } - } - }, - System$Collections$Generic$ICollection$1$add: function (item) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ValueCollectionSet); - }, - System$Collections$Generic$ICollection$1$remove: function (item) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ValueCollectionSet); - return false; - }, - System$Collections$Generic$ICollection$1$clear: function () { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ValueCollectionSet); - }, - System$Collections$Generic$ICollection$1$contains: function (item) { - return this.dictionary.ContainsValue(item); - } - } - }; }); - - // @source Enumerator.js - - H5.define("System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.IEnumerator$1(TValue),System.Collections.IEnumerator], - $kind: "nested struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.dictionary = null; - $.index = 0; - $.version = 0; - $.currentValue = null; - return $;} - } - }, - fields: { - dictionary: null, - index: 0, - version: 0, - currentValue: H5.getDefaultValue(TValue) - }, - props: { - Current: { - get: function () { - return this.currentValue; - } - }, - System$Collections$IEnumerator$Current: { - get: function () { - if (this.index === 0 || (this.index === ((this.dictionary.count + 1) | 0))) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - } - - return this.currentValue; - } - } - }, - alias: [ - "Dispose", "System$IDisposable$Dispose", - "moveNext", "System$Collections$IEnumerator$moveNext", - "Current", ["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(TValue) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"] - ], - ctors: { - $ctor1: function (dictionary) { - this.$initialize(); - this.dictionary = dictionary; - this.version = dictionary.version; - this.index = 0; - this.currentValue = H5.getDefaultValue(TValue); - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - Dispose: function () { }, - moveNext: function () { - var $t, $t1; - if (this.version !== this.dictionary.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - - while ((this.index >>> 0) < ((this.dictionary.count) >>> 0)) { - if (($t = this.dictionary.entries)[System.Array.index(this.index, $t)].hashCode >= 0) { - this.currentValue = ($t1 = this.dictionary.entries)[System.Array.index(this.index, $t1)].value; - this.index = (this.index + 1) | 0; - return true; - } - this.index = (this.index + 1) | 0; - } - this.index = (this.dictionary.count + 1) | 0; - this.currentValue = H5.getDefaultValue(TValue); - return false; - }, - System$Collections$IEnumerator$reset: function () { - if (this.version !== this.dictionary.version) { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - } - this.index = 0; - this.currentValue = H5.getDefaultValue(TValue); - }, - getHashCode: function () { - var h = H5.addHash([3788985113, this.dictionary, this.index, this.version, this.currentValue]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator(TKey,TValue))) { - return false; - } - return H5.equals(this.dictionary, o.dictionary) && H5.equals(this.index, o.index) && H5.equals(this.version, o.version) && H5.equals(this.currentValue, o.currentValue); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator(TKey,TValue))(); - s.dictionary = this.dictionary; - s.index = this.index; - s.version = this.version; - s.currentValue = this.currentValue; - return s; - } - } - }; }); - - // @source ReadOnlyDictionary.js - - H5.define("System.Collections.ObjectModel.ReadOnlyDictionary$2", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.IDictionary$2(TKey,TValue),System.Collections.IDictionary,System.Collections.Generic.IReadOnlyDictionary$2(TKey,TValue)], - statics: { - fields: { - NotSupported_ReadOnlyCollection: null - }, - ctors: { - init: function () { - this.NotSupported_ReadOnlyCollection = "Collection is read-only."; - } - }, - methods: { - IsCompatibleKey: function (key) { - if (key == null) { - throw new System.ArgumentNullException.$ctor1("key"); - } - return H5.is(key, TKey); - } - } - }, - fields: { - m_dictionary: null, - _keys: null, - _values: null - }, - props: { - Dictionary: { - get: function () { - return this.m_dictionary; - } - }, - Keys: { - get: function () { - if (this._keys == null) { - this._keys = new (System.Collections.ObjectModel.ReadOnlyDictionary$2.KeyCollection(TKey,TValue))(this.m_dictionary["System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Keys"]); - } - return this._keys; - } - }, - Values: { - get: function () { - if (this._values == null) { - this._values = new (System.Collections.ObjectModel.ReadOnlyDictionary$2.ValueCollection(TKey,TValue))(this.m_dictionary["System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Values"]); - } - return this._values; - } - }, - System$Collections$Generic$IDictionary$2$Keys: { - get: function () { - return this.Keys; - } - }, - System$Collections$Generic$IDictionary$2$Values: { - get: function () { - return this.Values; - } - }, - Count: { - get: function () { - return System.Array.getCount(this.m_dictionary, System.Collections.Generic.KeyValuePair$2(TKey,TValue)); - } - }, - System$Collections$Generic$ICollection$1$IsReadOnly: { - get: function () { - return true; - } - }, - System$Collections$IDictionary$IsFixedSize: { - get: function () { - return true; - } - }, - System$Collections$IDictionary$IsReadOnly: { - get: function () { - return true; - } - }, - System$Collections$IDictionary$Keys: { - get: function () { - return this.Keys; - } - }, - System$Collections$IDictionary$Values: { - get: function () { - return this.Values; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return null; - } - }, - System$Collections$Generic$IReadOnlyDictionary$2$Keys: { - get: function () { - return this.Keys; - } - }, - System$Collections$Generic$IReadOnlyDictionary$2$Values: { - get: function () { - return this.Values; - } - } - }, - alias: [ - "containsKey", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$containsKey", - "containsKey", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$containsKey", - "System$Collections$Generic$IDictionary$2$Keys", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Keys", - "tryGetValue", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$tryGetValue", - "tryGetValue", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$tryGetValue", - "System$Collections$Generic$IDictionary$2$Values", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Values", - "getItem", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$getItem", - "System$Collections$Generic$IDictionary$2$add", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$add", - "System$Collections$Generic$IDictionary$2$remove", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$remove", - "System$Collections$Generic$IDictionary$2$getItem", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$getItem", - "System$Collections$Generic$IDictionary$2$setItem", "System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$setItem", - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Count", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$contains", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$contains", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$copyTo", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$copyTo", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$IsReadOnly", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$IsReadOnly", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$add", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$add", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$clear", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$clear", - "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$remove", "System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$remove", - "GetEnumerator", ["System$Collections$Generic$IEnumerable$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$GetEnumerator", "System$Collections$Generic$IEnumerable$1$GetEnumerator"], - "System$Collections$Generic$IReadOnlyDictionary$2$Keys", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Keys", - "System$Collections$Generic$IReadOnlyDictionary$2$Values", "System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Values" - ], - ctors: { - ctor: function (dictionary) { - this.$initialize(); - if (dictionary == null) { - throw new System.ArgumentNullException.$ctor1("dictionary"); - } - this.m_dictionary = dictionary; - } - }, - methods: { - getItem: function (key) { - return this.m_dictionary["System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$getItem"](key); - }, - System$Collections$Generic$IDictionary$2$getItem: function (key) { - return this.m_dictionary["System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$getItem"](key); - }, - System$Collections$Generic$IDictionary$2$setItem: function (key, value) { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - System$Collections$IDictionary$getItem: function (key) { - if (System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).IsCompatibleKey(key)) { - return this.getItem(H5.cast(H5.unbox(key, TKey), TKey)); - } - return null; - }, - System$Collections$IDictionary$setItem: function (key, value) { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - containsKey: function (key) { - return this.m_dictionary["System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$containsKey"](key); - }, - tryGetValue: function (key, value) { - return this.m_dictionary["System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$tryGetValue"](key, value); - }, - System$Collections$Generic$IDictionary$2$add: function (key, value) { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$add: function (item) { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - System$Collections$IDictionary$add: function (key, value) { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - System$Collections$Generic$IDictionary$2$remove: function (key) { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$remove: function (item) { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - System$Collections$IDictionary$remove: function (key) { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$contains: function (item) { - return System.Array.contains(this.m_dictionary, item, System.Collections.Generic.KeyValuePair$2(TKey,TValue)); - }, - System$Collections$IDictionary$contains: function (key) { - return System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).IsCompatibleKey(key) && this.containsKey(H5.cast(H5.unbox(key, TKey), TKey)); - }, - System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$copyTo: function (array, arrayIndex) { - System.Array.copyTo(this.m_dictionary, array, arrayIndex, System.Collections.Generic.KeyValuePair$2(TKey,TValue)); - }, - System$Collections$ICollection$copyTo: function (array, index) { - var $t, $t1; - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (System.Array.getRank(array) !== 1) { - throw new System.ArgumentException.$ctor1("Only single dimensional arrays are supported for the requested action."); - } - - if (System.Array.getLower(array, 0) !== 0) { - throw new System.ArgumentException.$ctor1("The lower bound of target array must be zero."); - } - - if (index < 0 || index > array.length) { - throw new System.ArgumentOutOfRangeException.$ctor4("index", "Non-negative number required."); - } - - if (((array.length - index) | 0) < this.Count) { - throw new System.ArgumentException.$ctor1("Destination array is not long enough to copy all the items in the collection. Check array index and length."); - } - var pairs; - if (((pairs = H5.as(array, System.Array.type(System.Collections.Generic.KeyValuePair$2(TKey,TValue))))) != null) { - System.Array.copyTo(this.m_dictionary, pairs, index, System.Collections.Generic.KeyValuePair$2(TKey,TValue)); - } else { - var dictEntryArray; - if (((dictEntryArray = H5.as(array, System.Array.type(System.Collections.DictionaryEntry)))) != null) { - $t = H5.getEnumerator(this.m_dictionary, System.Collections.Generic.KeyValuePair$2(TKey,TValue)); - try { - while ($t.moveNext()) { - var item = $t.Current; - dictEntryArray[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), dictEntryArray)] = new System.Collections.DictionaryEntry.$ctor1(item.key, item.value); - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - } else { - var objects; - if (!(((objects = H5.as(array, System.Array.type(System.Object)))) != null)) { - throw new System.ArgumentException.$ctor1("Target array type is not compatible with the type of items in the collection."); - } - - try { - $t1 = H5.getEnumerator(this.m_dictionary, System.Collections.Generic.KeyValuePair$2(TKey,TValue)); - try { - while ($t1.moveNext()) { - var item1 = $t1.Current; - objects[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), objects)] = new (System.Collections.Generic.KeyValuePair$2(TKey,TValue)).$ctor1(item1.key, item1.value); - } - } finally { - if (H5.is($t1, System.IDisposable)) { - $t1.System$IDisposable$Dispose(); - } - } - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.ArrayTypeMismatchException)) { - throw new System.ArgumentException.$ctor1("Target array type is not compatible with the type of items in the collection."); - } else { - throw $e1; - } - } - } - } - }, - System$Collections$Generic$ICollection$1$System$Collections$Generic$KeyValuePair$2$clear: function () { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - System$Collections$IDictionary$clear: function () { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - GetEnumerator: function () { - return H5.getEnumerator(this.m_dictionary, System.Collections.Generic.KeyValuePair$2(TKey,TValue)); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return H5.getEnumerator(H5.cast(this.m_dictionary, System.Collections.IEnumerable)); - }, - System$Collections$IDictionary$GetEnumerator: function () { - var d; - if (((d = H5.as(this.m_dictionary, System.Collections.IDictionary))) != null) { - return d.System$Collections$IDictionary$GetEnumerator(); - } - return new (System.Collections.ObjectModel.ReadOnlyDictionary$2.DictionaryEnumerator(TKey,TValue)).$ctor1(this.m_dictionary).$clone(); - } - } - }; }); - - // @source DictionaryEnumerator.js - - H5.define("System.Collections.ObjectModel.ReadOnlyDictionary$2.DictionaryEnumerator", function (TKey, TValue) { return { - inherits: [System.Collections.IDictionaryEnumerator], - $kind: "nested struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $._dictionary = null; - $._enumerator = null; - return $;} - } - }, - fields: { - _dictionary: null, - _enumerator: null - }, - props: { - Entry: { - get: function () { - return new System.Collections.DictionaryEntry.$ctor1(this._enumerator[H5.geti(this._enumerator, "System$Collections$Generic$IEnumerator$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1")].key, this._enumerator[H5.geti(this._enumerator, "System$Collections$Generic$IEnumerator$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1")].value); - } - }, - Key: { - get: function () { - return this._enumerator[H5.geti(this._enumerator, "System$Collections$Generic$IEnumerator$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1")].key; - } - }, - Value: { - get: function () { - return this._enumerator[H5.geti(this._enumerator, "System$Collections$Generic$IEnumerator$1$System$Collections$Generic$KeyValuePair$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1")].value; - } - }, - Current: { - get: function () { - return this.Entry.$clone(); - } - } - }, - alias: [ - "Entry", "System$Collections$IDictionaryEnumerator$Entry", - "Key", "System$Collections$IDictionaryEnumerator$Key", - "Value", "System$Collections$IDictionaryEnumerator$Value", - "Current", "System$Collections$IEnumerator$Current", - "moveNext", "System$Collections$IEnumerator$moveNext", - "reset", "System$Collections$IEnumerator$reset" - ], - ctors: { - $ctor1: function (dictionary) { - this.$initialize(); - this._dictionary = dictionary; - this._enumerator = H5.getEnumerator(this._dictionary, System.Collections.Generic.KeyValuePair$2(TKey,TValue)); - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - moveNext: function () { - return this._enumerator.System$Collections$IEnumerator$moveNext(); - }, - reset: function () { - this._enumerator.System$Collections$IEnumerator$reset(); - }, - getHashCode: function () { - var h = H5.addHash([9276503029, this._dictionary, this._enumerator]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.ObjectModel.ReadOnlyDictionary$2.DictionaryEnumerator(TKey,TValue))) { - return false; - } - return H5.equals(this._dictionary, o._dictionary) && H5.equals(this._enumerator, o._enumerator); - }, - $clone: function (to) { - var s = to || new (System.Collections.ObjectModel.ReadOnlyDictionary$2.DictionaryEnumerator(TKey,TValue))(); - s._dictionary = this._dictionary; - s._enumerator = this._enumerator; - return s; - } - } - }; }); - - // @source KeyCollection.js - - H5.define("System.Collections.ObjectModel.ReadOnlyDictionary$2.KeyCollection", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.ICollection$1(TKey),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(TKey)], - $kind: "nested class", - fields: { - _collection: null - }, - props: { - Count: { - get: function () { - return System.Array.getCount(this._collection, TKey); - } - }, - System$Collections$Generic$ICollection$1$IsReadOnly: { - get: function () { - return true; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return null; - } - } - }, - alias: [ - "System$Collections$Generic$ICollection$1$add", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$add", - "System$Collections$Generic$ICollection$1$clear", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$clear", - "System$Collections$Generic$ICollection$1$contains", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$contains", - "copyTo", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$copyTo", - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(TKey) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$Count", - "System$Collections$Generic$ICollection$1$IsReadOnly", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$IsReadOnly", - "System$Collections$Generic$ICollection$1$remove", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TKey) + "$remove", - "GetEnumerator", ["System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(TKey) + "$GetEnumerator", "System$Collections$Generic$IEnumerable$1$GetEnumerator"] - ], - ctors: { - ctor: function (collection) { - this.$initialize(); - if (collection == null) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - this._collection = collection; - } - }, - methods: { - System$Collections$Generic$ICollection$1$add: function (item) { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - System$Collections$Generic$ICollection$1$clear: function () { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - System$Collections$Generic$ICollection$1$contains: function (item) { - return System.Array.contains(this._collection, item, TKey); - }, - copyTo: function (array, arrayIndex) { - System.Array.copyTo(this._collection, array, arrayIndex, TKey); - }, - System$Collections$ICollection$copyTo: function (array, index) { - System.Collections.ObjectModel.ReadOnlyDictionaryHelpers.CopyToNonGenericICollectionHelper(TKey, this._collection, array, index); - }, - System$Collections$Generic$ICollection$1$remove: function (item) { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - GetEnumerator: function () { - return H5.getEnumerator(this._collection, TKey); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return H5.getEnumerator(H5.cast(this._collection, System.Collections.IEnumerable)); - } - } - }; }); - - // @source ValueCollection.js - - H5.define("System.Collections.ObjectModel.ReadOnlyDictionary$2.ValueCollection", function (TKey, TValue) { return { - inherits: [System.Collections.Generic.ICollection$1(TValue),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(TValue)], - $kind: "nested class", - fields: { - _collection: null - }, - props: { - Count: { - get: function () { - return System.Array.getCount(this._collection, TValue); - } - }, - System$Collections$Generic$ICollection$1$IsReadOnly: { - get: function () { - return true; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return null; - } - } - }, - alias: [ - "System$Collections$Generic$ICollection$1$add", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$add", - "System$Collections$Generic$ICollection$1$clear", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$clear", - "System$Collections$Generic$ICollection$1$contains", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$contains", - "copyTo", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$copyTo", - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(TValue) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$Count", - "System$Collections$Generic$ICollection$1$IsReadOnly", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$IsReadOnly", - "System$Collections$Generic$ICollection$1$remove", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(TValue) + "$remove", - "GetEnumerator", ["System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(TValue) + "$GetEnumerator", "System$Collections$Generic$IEnumerable$1$GetEnumerator"] - ], - ctors: { - ctor: function (collection) { - this.$initialize(); - if (collection == null) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - this._collection = collection; - } - }, - methods: { - System$Collections$Generic$ICollection$1$add: function (item) { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - System$Collections$Generic$ICollection$1$clear: function () { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - System$Collections$Generic$ICollection$1$contains: function (item) { - return System.Array.contains(this._collection, item, TValue); - }, - copyTo: function (array, arrayIndex) { - System.Array.copyTo(this._collection, array, arrayIndex, TValue); - }, - System$Collections$ICollection$copyTo: function (array, index) { - System.Collections.ObjectModel.ReadOnlyDictionaryHelpers.CopyToNonGenericICollectionHelper(TValue, this._collection, array, index); - }, - System$Collections$Generic$ICollection$1$remove: function (item) { - throw new System.NotSupportedException.$ctor1(System.Collections.ObjectModel.ReadOnlyDictionary$2(TKey,TValue).NotSupported_ReadOnlyCollection); - }, - GetEnumerator: function () { - return H5.getEnumerator(this._collection, TValue); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return H5.getEnumerator(H5.cast(this._collection, System.Collections.IEnumerable)); - } - } - }; }); - - // @source ReadOnlyDictionaryHelpers.js - - H5.define("System.Collections.ObjectModel.ReadOnlyDictionaryHelpers", { - statics: { - methods: { - CopyToNonGenericICollectionHelper: function (T, collection, array, index) { - var $t; - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (System.Array.getRank(array) !== 1) { - throw new System.ArgumentException.$ctor1("Only single dimensional arrays are supported for the requested action."); - } - - if (System.Array.getLower(array, 0) !== 0) { - throw new System.ArgumentException.$ctor1("The lower bound of target array must be zero."); - } - - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("index", "Index is less than zero."); - } - - if (((array.length - index) | 0) < System.Array.getCount(collection, T)) { - throw new System.ArgumentException.$ctor1("Destination array is not long enough to copy all the items in the collection. Check array index and length."); - } - var nonGenericCollection; - if (((nonGenericCollection = H5.as(collection, System.Collections.ICollection))) != null) { - System.Array.copyTo(nonGenericCollection, array, index); - return; - } - var items; - if (((items = H5.as(array, System.Array.type(T)))) != null) { - System.Array.copyTo(collection, items, index, T); - } else { - var objects; /* - FxOverRh: Type.IsAssignableNot() not an api on that platform. - - // - // Catch the obvious case assignment will fail. - // We can found all possible problems by doing the check though. - // For example, if the element type of the Array is derived from T, - // we can't figure out if we can successfully copy the element beforehand. - // - Type targetType = array.GetType().GetElementType(); - Type sourceType = typeof(T); - if (!(targetType.IsAssignableFrom(sourceType) || sourceType.IsAssignableFrom(targetType))) { - throw new ArgumentException(SR.Argument_InvalidArrayType); - } - */ - - if (!(((objects = H5.as(array, System.Array.type(System.Object)))) != null)) { - throw new System.ArgumentException.$ctor1("Target array type is not compatible with the type of items in the collection."); - } - - try { - $t = H5.getEnumerator(collection, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - objects[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), objects)] = item; - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.ArrayTypeMismatchException)) { - throw new System.ArgumentException.$ctor1("Target array type is not compatible with the type of items in the collection."); - } else { - throw $e1; - } - } - } - } - } - } - }); - - // @source CollectionExtensions.js - - H5.define("System.Collections.Generic.CollectionExtensions", { - statics: { - methods: { - GetValueOrDefault$1: function (TKey, TValue, dictionary, key) { - return System.Collections.Generic.CollectionExtensions.GetValueOrDefault(TKey, TValue, dictionary, key, H5.getDefaultValue(TValue)); - }, - GetValueOrDefault: function (TKey, TValue, dictionary, key, defaultValue) { - if (dictionary == null) { - throw new System.ArgumentNullException.$ctor1("dictionary"); - } - - var value = { }; - return dictionary["System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$tryGetValue"](key, value) ? value.v : defaultValue; - }, - TryAdd: function (TKey, TValue, dictionary, key, value) { - if (dictionary == null) { - throw new System.ArgumentNullException.$ctor1("dictionary"); - } - - if (!dictionary["System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$containsKey"](key)) { - dictionary["System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$add"](key, value); - return true; - } - - return false; - }, - Remove: function (TKey, TValue, dictionary, key, value) { - if (dictionary == null) { - throw new System.ArgumentNullException.$ctor1("dictionary"); - } - - if (dictionary["System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$tryGetValue"](key, value)) { - dictionary["System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$remove"](key); - return true; - } - - value.v = H5.getDefaultValue(TValue); - return false; - } - } - } - }); - - // @source StringComparer.js - - H5.define("System.StringComparer", { - inherits: [System.Collections.Generic.IComparer$1(System.String),System.Collections.Generic.IEqualityComparer$1(System.String)], - statics: { - fields: { - _ordinal: null, - _ordinalIgnoreCase: null - }, - props: { - Ordinal: { - get: function () { - return System.StringComparer._ordinal; - } - }, - OrdinalIgnoreCase: { - get: function () { - return System.StringComparer._ordinalIgnoreCase; - } - } - }, - ctors: { - init: function () { - this._ordinal = new System.OrdinalComparer(false); - this._ordinalIgnoreCase = new System.OrdinalComparer(true); - } - } - }, - methods: { - Compare: function (x, y) { - if (H5.referenceEquals(x, y)) { - return 0; - } - if (x == null) { - return -1; - } - if (y == null) { - return 1; - } - var sa; - if (((sa = H5.as(x, System.String))) != null) { - var sb; - if (((sb = H5.as(y, System.String))) != null) { - return this.compare(sa, sb); - } - } - var ia; - if (((ia = H5.as(x, System.IComparable))) != null) { - return H5.compare(ia, y); - } - - throw new System.ArgumentException.$ctor1("At least one object must implement IComparable."); - }, - Equals: function (x, y) { - if (H5.referenceEquals(x, y)) { - return true; - } - if (x == null || y == null) { - return false; - } - var sa; - if (((sa = H5.as(x, System.String))) != null) { - var sb; - if (((sb = H5.as(y, System.String))) != null) { - return this.equals2(sa, sb); - } - } - return H5.equals(x, y); - }, - GetHashCode: function (obj) { - if (obj == null) { - throw new System.ArgumentNullException.$ctor1("obj"); - } - var s; - if (((s = H5.as(obj, System.String))) != null) { - return this.getHashCode2(s); - } - return H5.getHashCode(obj); - } - } - }); - - // @source OrdinalComparer.js - - H5.define("System.OrdinalComparer", { - inherits: [System.StringComparer], - fields: { - _ignoreCase: false - }, - alias: [ - "compare", ["System$Collections$Generic$IComparer$1$System$String$compare", "System$Collections$Generic$IComparer$1$compare"], - "equals2", ["System$Collections$Generic$IEqualityComparer$1$System$String$equals2", "System$Collections$Generic$IEqualityComparer$1$equals2"], - "getHashCode2", ["System$Collections$Generic$IEqualityComparer$1$System$String$getHashCode2", "System$Collections$Generic$IEqualityComparer$1$getHashCode2"] - ], - ctors: { - ctor: function (ignoreCase) { - this.$initialize(); - System.StringComparer.ctor.call(this); - this._ignoreCase = ignoreCase; - } - }, - methods: { - compare: function (x, y) { - if (H5.referenceEquals(x, y)) { - return 0; - } - if (x == null) { - return -1; - } - if (y == null) { - return 1; - } - - if (this._ignoreCase) { - return System.String.compare(x, y, 5); - } - - return System.String.compare(x, y, false); - }, - equals2: function (x, y) { - if (H5.referenceEquals(x, y)) { - return true; - } - if (x == null || y == null) { - return false; - } - - if (this._ignoreCase) { - if (x.length !== y.length) { - return false; - } - return (System.String.compare(x, y, 5) === 0); - } - return System.String.equals(x, y); - }, - equals: function (obj) { - var comparer; - if (!(((comparer = H5.as(obj, System.OrdinalComparer))) != null)) { - return false; - } - return (this._ignoreCase === comparer._ignoreCase); - }, - getHashCode2: function (obj) { - if (obj == null) { - throw new System.ArgumentNullException.$ctor1("obj"); - } - - if (this._ignoreCase && obj != null) { - return H5.getHashCode(obj.toLowerCase()); - } - - return H5.getHashCode(obj); - }, - getHashCode: function () { - var name = "OrdinalComparer"; - var hashCode = H5.getHashCode(name); - return this._ignoreCase ? (~hashCode) : hashCode; - } - } - }); - - // @source CustomEnumerator.js - - H5.define("H5.CustomEnumerator", { - inherits: [System.Collections.IEnumerator, System.IDisposable], - - config: { - properties: { - Current: { - get: function () { - return this.getCurrent(); - } - }, - - Current$1: { - get: function () { - return this.getCurrent(); - } - } - }, - - alias: [ - "getCurrent", "System$Collections$IEnumerator$getCurrent", - "moveNext", "System$Collections$IEnumerator$moveNext", - "reset", "System$Collections$IEnumerator$reset", - "Dispose", "System$IDisposable$Dispose", - "Current", "System$Collections$IEnumerator$Current" - ] - }, - - ctor: function (moveNext, getCurrent, reset, dispose, scope, T) { - this.$initialize(); - this.$moveNext = moveNext; - this.$getCurrent = getCurrent; - this.$Dispose = dispose; - this.$reset = reset; - this.scope = scope; - - if (T) { - this["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$getCurrent$1"] = this.getCurrent; - this["System$Collections$Generic$IEnumerator$1$getCurrent$1"] = this.getCurrent; - - Object.defineProperty(this, "System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", { - get: this.getCurrent, - enumerable: true - }); - - Object.defineProperty(this, "System$Collections$Generic$IEnumerator$1$Current$1", { - get: this.getCurrent, - enumerable: true - }); - } - }, - - moveNext: function () { - try { - return this.$moveNext.call(this.scope); - } - catch (ex) { - this.Dispose.call(this.scope); - - throw ex; - } - }, - - getCurrent: function () { - return this.$getCurrent.call(this.scope); - }, - - getCurrent$1: function () { - return this.$getCurrent.call(this.scope); - }, - - reset: function () { - if (this.$reset) { - this.$reset.call(this.scope); - } - }, - - Dispose: function () { - if (this.$Dispose) { - this.$Dispose.call(this.scope); - } - } - }); - - // @source ArrayEnumerator.js - - H5.define("H5.ArrayEnumerator", { - inherits: [System.Collections.IEnumerator, System.IDisposable], - - statics: { - $isArrayEnumerator: true - }, - - config: { - properties: { - Current: { - get: function () { - return this.getCurrent(); - } - }, - - Current$1: { - get: function () { - return this.getCurrent(); - } - } - }, - - alias: [ - "getCurrent", "System$Collections$IEnumerator$getCurrent", - "moveNext", "System$Collections$IEnumerator$moveNext", - "reset", "System$Collections$IEnumerator$reset", - "Dispose", "System$IDisposable$Dispose", - "Current", "System$Collections$IEnumerator$Current" - ] - }, - - ctor: function (array, T) { - this.$initialize(); - this.array = array; - this.reset(); - - if (T) { - this["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$getCurrent$1"] = this.getCurrent; - this["System$Collections$Generic$IEnumerator$1$getCurrent$1"] = this.getCurrent; - - Object.defineProperty(this, "System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", { - get: this.getCurrent, - enumerable: true - }); - - Object.defineProperty(this, "System$Collections$Generic$IEnumerator$1$Current$1", { - get: this.getCurrent, - enumerable: true - }); - } - }, - - moveNext: function () { - this.index++; - - return this.index < this.array.length; - }, - - getCurrent: function () { - return this.array[this.index]; - }, - - getCurrent$1: function () { - return this.array[this.index]; - }, - - reset: function () { - this.index = -1; - }, - - Dispose: H5.emptyFn - }); - - H5.define("H5.ArrayEnumerable", { - inherits: [System.Collections.IEnumerable], - - config: { - alias: [ - "GetEnumerator", "System$Collections$IEnumerable$GetEnumerator" - ] - }, - - ctor: function (array) { - this.$initialize(); - this.array = array; - }, - - GetEnumerator: function () { - return new H5.ArrayEnumerator(this.array); - } - }); - - // @source EqualityComparer.js - - H5.define("System.Collections.Generic.EqualityComparer$1", function (T) { - return { - inherits: [System.Collections.Generic.IEqualityComparer$1(T)], - - statics: { - config: { - init: function () { - this.def = new (System.Collections.Generic.EqualityComparer$1(T))(); - } - } - }, - - config: { - alias: [ - "equals2", ["System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(T) + "$equals2", "System$Collections$Generic$IEqualityComparer$1$equals2"], - "getHashCode2", ["System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(T) + "$getHashCode2", "System$Collections$Generic$IEqualityComparer$1$getHashCode2"] - ] - }, - - equals2: function (x, y) { - if (!H5.isDefined(x, true)) { - return !H5.isDefined(y, true); - } else if (H5.isDefined(y, true)) { - var isH5 = x && x.$$name; - - if (H5.isFunction(x) && H5.isFunction(y)) { - return H5.fn.equals.call(x, y); - } else if (!isH5 || x && x.$boxed || y && y.$boxed) { - return H5.equals(x, y); - } else if (H5.isFunction(x.equalsT)) { - return H5.equalsT(x, y); - } else if (H5.isFunction(x.equals)) { - return H5.equals(x, y); - } - - return x === y; - } - - return false; - }, - - getHashCode2: function (obj) { - return H5.isDefined(obj, true) ? H5.getHashCode(obj) : 0; - } - }; - }); - - System.Collections.Generic.EqualityComparer$1.$default = new (System.Collections.Generic.EqualityComparer$1(System.Object))(); - - // @source Comparer.js - - H5.define("System.Collections.Generic.Comparer$1", function (T) { - return { - inherits: [System.Collections.Generic.IComparer$1(T)], - - ctor: function (fn) { - this.$initialize(); - this.fn = fn; - this.compare = fn; - this["System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare"] = fn; - this["System$Collections$Generic$IComparer$1$compare"] = fn; - } - } - }); - - System.Collections.Generic.Comparer$1.$default = new (System.Collections.Generic.Comparer$1(System.Object))(function (x, y) { - if (!H5.hasValue(x)) { - return !H5.hasValue(y) ? 0 : -1; - } else if (!H5.hasValue(y)) { - return 1; - } - - return H5.compare(x, y); - }); - - System.Collections.Generic.Comparer$1.get = function (obj, T) { - var m; - - if (T && (m = obj["System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare"])) { - return m.bind(obj); - } - - if (m = obj["System$Collections$Generic$IComparer$1$compare"]) { - return m.bind(obj); - } - - return obj.compare.bind(obj); - }; - - // @source Dictionary.js - - System.Collections.Generic.Dictionary$2.getTypeParameters = function (type) { - var interfaceType; - - if (System.String.startsWith(type.$$name, "System.Collections.Generic.IDictionary")) { - interfaceType = type; - } else { - var interfaces = H5.Reflection.getInterfaces(type); - - for (var j = 0; j < interfaces.length; j++) { - if (System.String.startsWith(interfaces[j].$$name, "System.Collections.Generic.IDictionary")) { - interfaceType = interfaces[j]; - - break; - } - } - } - - var typesGeneric = interfaceType ? H5.Reflection.getGenericArguments(interfaceType) : null; - var typeKey = typesGeneric ? typesGeneric[0] : null; - var typeValue = typesGeneric ? typesGeneric[1] : null; - - return [typeKey, typeValue]; - }; - // @source List.js - - H5.define("System.Collections.Generic.List$1", function (T) { return { - inherits: [System.Collections.Generic.IList$1(T),System.Collections.IList,System.Collections.Generic.IReadOnlyList$1(T)], - statics: { - fields: { - _defaultCapacity: 0, - _emptyArray: null - }, - ctors: { - init: function () { - this._defaultCapacity = 4; - this._emptyArray = System.Array.init(0, function (){ - return H5.getDefaultValue(T); - }, T); - } - }, - methods: { - IsCompatibleObject: function (value) { - return ((H5.is(value, T)) || (value == null && H5.getDefaultValue(T) == null)); - } - } - }, - fields: { - _items: null, - _size: 0, - _version: 0 - }, - props: { - Capacity: { - get: function () { - return this._items.length; - }, - set: function (value) { - if (value < this._size) { - throw new System.ArgumentOutOfRangeException.$ctor1("value"); - } - - if (value !== this._items.length) { - if (value > 0) { - var newItems = System.Array.init(value, function (){ - return H5.getDefaultValue(T); - }, T); - if (this._size > 0) { - System.Array.copy(this._items, 0, newItems, 0, this._size); - } - this._items = newItems; - } else { - this._items = System.Collections.Generic.List$1(T)._emptyArray; - } - } - } - }, - Count: { - get: function () { - return this._size; - } - }, - System$Collections$IList$IsFixedSize: { - get: function () { - return false; - } - }, - System$Collections$Generic$ICollection$1$IsReadOnly: { - get: function () { - return false; - } - }, - System$Collections$IList$IsReadOnly: { - get: function () { - return false; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return this; - } - } - }, - alias: [ - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(T) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$Count", - "System$Collections$Generic$ICollection$1$IsReadOnly", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$IsReadOnly", - "getItem", ["System$Collections$Generic$IReadOnlyList$1$" + H5.getTypeAlias(T) + "$getItem", "System$Collections$Generic$IReadOnlyList$1$getItem"], - "setItem", ["System$Collections$Generic$IReadOnlyList$1$" + H5.getTypeAlias(T) + "$setItem", "System$Collections$Generic$IReadOnlyList$1$setItem"], - "getItem", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$getItem", - "setItem", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$setItem", - "add", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$add", - "clear", "System$Collections$IList$clear", - "clear", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$clear", - "contains", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$contains", - "copyTo", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$copyTo", - "System$Collections$Generic$IEnumerable$1$GetEnumerator", "System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(T) + "$GetEnumerator", - "indexOf", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$indexOf", - "insert", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$insert", - "remove", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$remove", - "removeAt", "System$Collections$IList$removeAt", - "removeAt", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$removeAt" - ], - ctors: { - ctor: function () { - this.$initialize(); - this._items = System.Collections.Generic.List$1(T)._emptyArray; - }, - $ctor2: function (capacity) { - this.$initialize(); - if (capacity < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("capacity"); - } - - if (capacity === 0) { - this._items = System.Collections.Generic.List$1(T)._emptyArray; - } else { - this._items = System.Array.init(capacity, function (){ - return H5.getDefaultValue(T); - }, T); - } - }, - $ctor1: function (collection) { - this.$initialize(); - if (collection == null) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - var c; - if (((c = H5.as(collection, System.Collections.Generic.ICollection$1(T)))) != null) { - var count = System.Array.getCount(c, T); - if (count === 0) { - this._items = System.Collections.Generic.List$1(T)._emptyArray; - } else { - this._items = System.Array.init(count, function (){ - return H5.getDefaultValue(T); - }, T); - System.Array.copyTo(c, this._items, 0, T); - this._size = count; - } - } else { - this._size = 0; - this._items = System.Collections.Generic.List$1(T)._emptyArray; - - var en = H5.getEnumerator(collection, T); - try { - while (en.System$Collections$IEnumerator$moveNext()) { - this.add(en[H5.geti(en, "System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1")]); - } - } - finally { - if (H5.hasValue(en)) { - en.System$IDisposable$Dispose(); - } - } - } - } - }, - methods: { - getItem: function (index) { - if ((index >>> 0) >= (this._size >>> 0)) { - throw new System.ArgumentOutOfRangeException.ctor(); - } - return this._items[System.Array.index(index, this._items)]; - }, - setItem: function (index, value) { - if ((index >>> 0) >= (this._size >>> 0)) { - throw new System.ArgumentOutOfRangeException.ctor(); - } - this._items[System.Array.index(index, this._items)] = value; - this._version = (this._version + 1) | 0; - }, - System$Collections$IList$getItem: function (index) { - return this.getItem(index); - }, - System$Collections$IList$setItem: function (index, value) { - if (value == null && !(H5.getDefaultValue(T) == null)) { - throw new System.ArgumentNullException.$ctor1("value"); - } - - try { - this.setItem(index, H5.cast(H5.unbox(value, T), T)); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.InvalidCastException)) { - throw new System.ArgumentException.$ctor1("value"); - } else { - throw $e1; - } - } - }, - add: function (item) { - if (this._size === this._items.length) { - this.EnsureCapacity(((this._size + 1) | 0)); - } - this._items[System.Array.index(H5.identity(this._size, ((this._size = (this._size + 1) | 0))), this._items)] = item; - this._version = (this._version + 1) | 0; - }, - System$Collections$IList$add: function (item) { - if (item == null && !(H5.getDefaultValue(T) == null)) { - throw new System.ArgumentNullException.$ctor1("item"); - } - - try { - this.add(H5.cast(H5.unbox(item, T), T)); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.InvalidCastException)) { - throw new System.ArgumentException.$ctor1("item"); - } else { - throw $e1; - } - } - - return ((this.Count - 1) | 0); - }, - AddRange: function (collection) { - this.InsertRange(this._size, collection); - }, - AsReadOnly: function () { - return new (System.Collections.ObjectModel.ReadOnlyCollection$1(T))(this); - }, - BinarySearch$2: function (index, count, item, comparer) { - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - if (((this._size - index) | 0) < count) { - throw new System.ArgumentException.ctor(); - } - - return System.Array.binarySearch(this._items, index, count, item, comparer); - }, - BinarySearch: function (item) { - return this.BinarySearch$2(0, this.Count, item, null); - }, - BinarySearch$1: function (item, comparer) { - return this.BinarySearch$2(0, this.Count, item, comparer); - }, - clear: function () { - if (this._size > 0) { - System.Array.fill(this._items, function () { - return H5.getDefaultValue(T); - }, 0, this._size); - this._size = 0; - } - this._version = (this._version + 1) | 0; - }, - contains: function (item) { - if (item == null) { - for (var i = 0; i < this._size; i = (i + 1) | 0) { - if (this._items[System.Array.index(i, this._items)] == null) { - return true; - } - } - return false; - } else { - var c = System.Collections.Generic.EqualityComparer$1(T).def; - for (var i1 = 0; i1 < this._size; i1 = (i1 + 1) | 0) { - if (c.equals2(this._items[System.Array.index(i1, this._items)], item)) { - return true; - } - } - return false; - } - }, - System$Collections$IList$contains: function (item) { - if (System.Collections.Generic.List$1(T).IsCompatibleObject(item)) { - return this.contains(H5.cast(H5.unbox(item, T), T)); - } - return false; - }, - ConvertAll: function (TOutput, converter) { - if (H5.staticEquals(converter, null)) { - throw new System.ArgumentNullException.$ctor1("converter"); - } - - var list = new (System.Collections.Generic.List$1(TOutput)).$ctor2(this._size); - for (var i = 0; i < this._size; i = (i + 1) | 0) { - list._items[System.Array.index(i, list._items)] = converter(this._items[System.Array.index(i, this._items)]); - } - list._size = this._size; - return list; - }, - CopyTo: function (array) { - this.copyTo(array, 0); - }, - System$Collections$ICollection$copyTo: function (array, arrayIndex) { - if ((array != null) && (System.Array.getRank(array) !== 1)) { - throw new System.ArgumentException.$ctor1("array"); - } - - System.Array.copy(this._items, 0, array, arrayIndex, this._size); - }, - CopyTo$1: function (index, array, arrayIndex, count) { - if (((this._size - index) | 0) < count) { - throw new System.ArgumentException.ctor(); - } - - System.Array.copy(this._items, index, array, arrayIndex, count); - }, - copyTo: function (array, arrayIndex) { - System.Array.copy(this._items, 0, array, arrayIndex, this._size); - }, - EnsureCapacity: function (min) { - if (this._items.length < min) { - var newCapacity = this._items.length === 0 ? System.Collections.Generic.List$1(T)._defaultCapacity : H5.Int.mul(this._items.length, 2); - if ((newCapacity >>> 0) > 2146435071) { - newCapacity = 2146435071; - } - if (newCapacity < min) { - newCapacity = min; - } - this.Capacity = newCapacity; - } - }, - Exists: function (match) { - return this.FindIndex$2(match) !== -1; - }, - Find: function (match) { - if (H5.staticEquals(match, null)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - for (var i = 0; i < this._size; i = (i + 1) | 0) { - if (match(this._items[System.Array.index(i, this._items)])) { - return this._items[System.Array.index(i, this._items)]; - } - } - return H5.getDefaultValue(T); - }, - FindAll: function (match) { - if (H5.staticEquals(match, null)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - var list = new (System.Collections.Generic.List$1(T)).ctor(); - for (var i = 0; i < this._size; i = (i + 1) | 0) { - if (match(this._items[System.Array.index(i, this._items)])) { - list.add(this._items[System.Array.index(i, this._items)]); - } - } - return list; - }, - FindIndex$2: function (match) { - return this.FindIndex(0, this._size, match); - }, - FindIndex$1: function (startIndex, match) { - return this.FindIndex(startIndex, ((this._size - startIndex) | 0), match); - }, - FindIndex: function (startIndex, count, match) { - if ((startIndex >>> 0) > (this._size >>> 0)) { - throw new System.ArgumentOutOfRangeException.$ctor1("startIndex"); - } - - if (count < 0 || startIndex > ((this._size - count) | 0)) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - if (H5.staticEquals(match, null)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - var endIndex = (startIndex + count) | 0; - for (var i = startIndex; i < endIndex; i = (i + 1) | 0) { - if (match(this._items[System.Array.index(i, this._items)])) { - return i; - } - } - return -1; - }, - FindLast: function (match) { - if (H5.staticEquals(match, null)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - for (var i = (this._size - 1) | 0; i >= 0; i = (i - 1) | 0) { - if (match(this._items[System.Array.index(i, this._items)])) { - return this._items[System.Array.index(i, this._items)]; - } - } - return H5.getDefaultValue(T); - }, - FindLastIndex$2: function (match) { - return this.FindLastIndex(((this._size - 1) | 0), this._size, match); - }, - FindLastIndex$1: function (startIndex, match) { - return this.FindLastIndex(startIndex, ((startIndex + 1) | 0), match); - }, - FindLastIndex: function (startIndex, count, match) { - if (H5.staticEquals(match, null)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - if (this._size === 0) { - if (startIndex !== -1) { - throw new System.ArgumentOutOfRangeException.$ctor1("startIndex"); - } - } else { - if ((startIndex >>> 0) >= (this._size >>> 0)) { - throw new System.ArgumentOutOfRangeException.$ctor1("startIndex"); - } - } - - if (count < 0 || ((((startIndex - count) | 0) + 1) | 0) < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - var endIndex = (startIndex - count) | 0; - for (var i = startIndex; i > endIndex; i = (i - 1) | 0) { - if (match(this._items[System.Array.index(i, this._items)])) { - return i; - } - } - return -1; - }, - ForEach: function (action) { - if (H5.staticEquals(action, null)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - var version = this._version; - - for (var i = 0; i < this._size; i = (i + 1) | 0) { - if (version !== this._version) { - break; - } - action(this._items[System.Array.index(i, this._items)]); - } - - if (version !== this._version) { - throw new System.InvalidOperationException.ctor(); - } - }, - GetEnumerator: function () { - return new (System.Collections.Generic.List$1.Enumerator(T)).$ctor1(this); - }, - System$Collections$Generic$IEnumerable$1$GetEnumerator: function () { - return new (System.Collections.Generic.List$1.Enumerator(T)).$ctor1(this).$clone(); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return new (System.Collections.Generic.List$1.Enumerator(T)).$ctor1(this).$clone(); - }, - GetRange: function (index, count) { - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - if (((this._size - index) | 0) < count) { - throw new System.ArgumentException.ctor(); - } - - var list = new (System.Collections.Generic.List$1(T)).$ctor2(count); - System.Array.copy(this._items, index, list._items, 0, count); - list._size = count; - return list; - }, - indexOf: function (item) { - return System.Array.indexOfT(this._items, item, 0, this._size); - }, - System$Collections$IList$indexOf: function (item) { - if (System.Collections.Generic.List$1(T).IsCompatibleObject(item)) { - return this.indexOf(H5.cast(H5.unbox(item, T), T)); - } - return -1; - }, - IndexOf: function (item, index) { - if (index > this._size) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - return System.Array.indexOfT(this._items, item, index, ((this._size - index) | 0)); - }, - IndexOf$1: function (item, index, count) { - if (index > this._size) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - if (count < 0 || index > ((this._size - count) | 0)) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - return System.Array.indexOfT(this._items, item, index, count); - }, - insert: function (index, item) { - if ((index >>> 0) > (this._size >>> 0)) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - if (this._size === this._items.length) { - this.EnsureCapacity(((this._size + 1) | 0)); - } - if (index < this._size) { - System.Array.copy(this._items, index, this._items, ((index + 1) | 0), ((this._size - index) | 0)); - } - this._items[System.Array.index(index, this._items)] = item; - this._size = (this._size + 1) | 0; - this._version = (this._version + 1) | 0; - }, - System$Collections$IList$insert: function (index, item) { - if (item == null && !(H5.getDefaultValue(T) == null)) { - throw new System.ArgumentNullException.$ctor1("item"); - } - - try { - this.insert(index, H5.cast(H5.unbox(item, T), T)); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.InvalidCastException)) { - throw new System.ArgumentException.$ctor1("item"); - } else { - throw $e1; - } - } - }, - InsertRange: function (index, collection) { - if (collection == null) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - - if ((index >>> 0) > (this._size >>> 0)) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - var c; - if (((c = H5.as(collection, System.Collections.Generic.ICollection$1(T)))) != null) { - var count = System.Array.getCount(c, T); - if (count > 0) { - this.EnsureCapacity(((this._size + count) | 0)); - if (index < this._size) { - System.Array.copy(this._items, index, this._items, ((index + count) | 0), ((this._size - index) | 0)); - } - - if (H5.referenceEquals(this, c)) { - System.Array.copy(this._items, 0, this._items, index, index); - System.Array.copy(this._items, ((index + count) | 0), this._items, H5.Int.mul(index, 2), ((this._size - index) | 0)); - } else { - var itemsToInsert = System.Array.init(count, function (){ - return H5.getDefaultValue(T); - }, T); - System.Array.copyTo(c, itemsToInsert, 0, T); - System.Array.copy(itemsToInsert, 0, this._items, index, itemsToInsert.length); - } - this._size = (this._size + count) | 0; - } - } else { - var en = H5.getEnumerator(collection, T); - try { - while (en.System$Collections$IEnumerator$moveNext()) { - this.insert(H5.identity(index, ((index = (index + 1) | 0))), en[H5.geti(en, "System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1")]); - } - } - finally { - if (H5.hasValue(en)) { - en.System$IDisposable$Dispose(); - } - } - } - this._version = (this._version + 1) | 0; - }, - LastIndexOf: function (item) { - if (this._size === 0) { - return -1; - } else { - return this.LastIndexOf$2(item, ((this._size - 1) | 0), this._size); - } - }, - LastIndexOf$1: function (item, index) { - if (index >= this._size) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - return this.LastIndexOf$2(item, index, ((index + 1) | 0)); - }, - LastIndexOf$2: function (item, index, count) { - if ((this.Count !== 0) && (index < 0)) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - if ((this.Count !== 0) && (count < 0)) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - if (this._size === 0) { - return -1; - } - - if (index >= this._size) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - if (count > ((index + 1) | 0)) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - return System.Array.lastIndexOfT(this._items, item, index, count); - }, - remove: function (item) { - var index = this.indexOf(item); - if (index >= 0) { - this.removeAt(index); - return true; - } - - return false; - }, - System$Collections$IList$remove: function (item) { - if (System.Collections.Generic.List$1(T).IsCompatibleObject(item)) { - this.remove(H5.cast(H5.unbox(item, T), T)); - } - }, - RemoveAll: function (match) { - if (H5.staticEquals(match, null)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - var freeIndex = 0; - - while (freeIndex < this._size && !match(this._items[System.Array.index(freeIndex, this._items)])) { - freeIndex = (freeIndex + 1) | 0; - } - if (freeIndex >= this._size) { - return 0; - } - - var current = (freeIndex + 1) | 0; - while (current < this._size) { - while (current < this._size && match(this._items[System.Array.index(current, this._items)])) { - current = (current + 1) | 0; - } - - if (current < this._size) { - this._items[System.Array.index(H5.identity(freeIndex, ((freeIndex = (freeIndex + 1) | 0))), this._items)] = this._items[System.Array.index(H5.identity(current, ((current = (current + 1) | 0))), this._items)]; - } - } - - System.Array.fill(this._items, function () { - return H5.getDefaultValue(T); - }, freeIndex, ((this._size - freeIndex) | 0)); - var result = (this._size - freeIndex) | 0; - this._size = freeIndex; - this._version = (this._version + 1) | 0; - return result; - }, - removeAt: function (index) { - if ((index >>> 0) >= (this._size >>> 0)) { - throw new System.ArgumentOutOfRangeException.ctor(); - } - this._size = (this._size - 1) | 0; - if (index < this._size) { - System.Array.copy(this._items, ((index + 1) | 0), this._items, index, ((this._size - index) | 0)); - } - this._items[System.Array.index(this._size, this._items)] = H5.getDefaultValue(T); - this._version = (this._version + 1) | 0; - }, - RemoveRange: function (index, count) { - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - if (((this._size - index) | 0) < count) { - throw new System.ArgumentException.ctor(); - } - - if (count > 0) { - var i = this._size; - this._size = (this._size - count) | 0; - if (index < this._size) { - System.Array.copy(this._items, ((index + count) | 0), this._items, index, ((this._size - index) | 0)); - } - System.Array.fill(this._items, function () { - return H5.getDefaultValue(T); - }, this._size, count); - this._version = (this._version + 1) | 0; - } - }, - Reverse: function () { - this.Reverse$1(0, this.Count); - }, - Reverse$1: function (index, count) { - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - if (((this._size - index) | 0) < count) { - throw new System.ArgumentException.ctor(); - } - System.Array.reverse(this._items, index, count); - this._version = (this._version + 1) | 0; - }, - Sort: function () { - this.Sort$3(0, this.Count, null); - }, - Sort$1: function (comparer) { - this.Sort$3(0, this.Count, comparer); - }, - Sort$3: function (index, count, comparer) { - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - if (((this._size - index) | 0) < count) { - throw new System.ArgumentException.ctor(); - } - - System.Array.sort(this._items, index, count, comparer); - this._version = (this._version + 1) | 0; - }, - Sort$2: function (comparison) { - if (H5.staticEquals(comparison, null)) { - throw new System.ArgumentNullException.$ctor1("comparison"); - } - - if (this._size > 0) { - if (this._items.length === this._size) { - System.Array.sort(this._items, comparison); - } else { - var newItems = System.Array.init(this._size, function (){ - return H5.getDefaultValue(T); - }, T); - System.Array.copy(this._items, 0, newItems, 0, this._size); - System.Array.sort(newItems, comparison); - System.Array.copy(newItems, 0, this._items, 0, this._size); - } - } - }, - ToArray: function () { - - var array = System.Array.init(this._size, function (){ - return H5.getDefaultValue(T); - }, T); - System.Array.copy(this._items, 0, array, 0, this._size); - return array; - }, - TrimExcess: function () { - var threshold = H5.Int.clip32(this._items.length * 0.9); - if (this._size < threshold) { - this.Capacity = this._size; - } - }, - TrueForAll: function (match) { - if (H5.staticEquals(match, null)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - for (var i = 0; i < this._size; i = (i + 1) | 0) { - if (!match(this._items[System.Array.index(i, this._items)])) { - return false; - } - } - return true; - }, - toJSON: function () { - var newItems = System.Array.init(this._size, function (){ - return H5.getDefaultValue(T); - }, T); - if (this._size > 0) { - System.Array.copy(this._items, 0, newItems, 0, this._size); - } - - return newItems; - } - } - }; }); - - // @source KeyNotFoundException.js - - H5.define("System.Collections.Generic.KeyNotFoundException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "The given key was not present in the dictionary."); - this.HResult = -2146232969; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146232969; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2146232969; - } - } - }); - - // @source List.js - - System.Collections.Generic.List$1.getElementType = function (type) { - var interfaceType; - - if (System.String.startsWith(type.$$name, "System.Collections.Generic.IList")) { - interfaceType = type; - } else { - var interfaces = H5.Reflection.getInterfaces(type); - - for (var j = 0; j < interfaces.length; j++) { - if (System.String.startsWith(interfaces[j].$$name, "System.Collections.Generic.IList")) { - interfaceType = interfaces[j]; - - break; - } - } - } - - return interfaceType ? H5.Reflection.getGenericArguments(interfaceType)[0] : null; - }; - - // @source CharEnumerator.js - - H5.define("System.CharEnumerator", { - inherits: [System.Collections.IEnumerator,System.Collections.Generic.IEnumerator$1(System.Char),System.IDisposable,System.ICloneable], - fields: { - _str: null, - _index: 0, - _currentElement: 0 - }, - props: { - System$Collections$IEnumerator$Current: { - get: function () { - return H5.box(this.Current, System.Char, String.fromCharCode, System.Char.getHashCode); - } - }, - Current: { - get: function () { - if (this._index === -1) { - throw new System.InvalidOperationException.$ctor1("Enumeration has not started. Call MoveNext."); - } - if (this._index >= this._str.length) { - throw new System.InvalidOperationException.$ctor1("Enumeration already finished."); - } - return this._currentElement; - } - } - }, - alias: [ - "clone", "System$ICloneable$clone", - "moveNext", "System$Collections$IEnumerator$moveNext", - "Dispose", "System$IDisposable$Dispose", - "Current", ["System$Collections$Generic$IEnumerator$1$System$Char$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"], - "reset", "System$Collections$IEnumerator$reset" - ], - ctors: { - ctor: function (str) { - this.$initialize(); - this._str = str; - this._index = -1; - } - }, - methods: { - clone: function () { - return H5.clone(this); - }, - moveNext: function () { - if (this._index < (((this._str.length - 1) | 0))) { - this._index = (this._index + 1) | 0; - this._currentElement = this._str.charCodeAt(this._index); - return true; - } else { - this._index = this._str.length; - } - return false; - }, - Dispose: function () { - if (this._str != null) { - this._index = this._str.length; - } - this._str = null; - }, - reset: function () { - this._currentElement = 0; - this._index = -1; - } - } - }); - - // @source Task.js - - H5.define("System.Threading.Tasks.Task", { - inherits: [System.IDisposable, System.IAsyncResult], - - config: { - alias: [ - "dispose", "System$IDisposable$Dispose", - "AsyncState", "System$IAsyncResult$AsyncState", - "CompletedSynchronously", "System$IAsyncResult$CompletedSynchronously", - "IsCompleted", "System$IAsyncResult$IsCompleted" - ], - - properties: { - IsCompleted: { - get: function () { - return this.isCompleted(); - } - } - } - }, - - ctor: function (action, state) { - this.$initialize(); - this.action = action; - this.state = state; - this.AsyncState = state; - this.CompletedSynchronously = false; - this.exception = null; - this.status = System.Threading.Tasks.TaskStatus.created; - this.callbacks = []; - this.result = null; - }, - - statics: { - queue: [], - - runQueue: function () { - var queue = System.Threading.Tasks.Task.queue.slice(0); - System.Threading.Tasks.Task.queue = []; - - for (var i = 0; i < queue.length; i++) { - queue[i](); - } - }, - - schedule: function (fn) { - System.Threading.Tasks.Task.queue.push(fn); - H5.setImmediate(System.Threading.Tasks.Task.runQueue); - }, - - delay: function (delay, state) { - var tcs = new System.Threading.Tasks.TaskCompletionSource(), - token, - cancelCallback = false; - - if (H5.is(state, System.Threading.CancellationToken)) { - token = state; - state = undefined; - } - - if (token) { - token.cancelWasRequested = function () { - if (!cancelCallback) { - cancelCallback = true; - clearTimeout(clear); - - tcs.setCanceled(); - } - }; - } - - var ms = delay; - if (H5.is(delay, System.TimeSpan)) { - ms = delay.getTotalMilliseconds(); - } - - var clear = setTimeout(function () { - if (!cancelCallback) { - cancelCallback = true; - tcs.setResult(state); - } - }, ms); - - if (token && token.getIsCancellationRequested()) { - H5.setImmediate(token.cancelWasRequested); - } - - return tcs.task; - }, - - fromResult: function (result, T) { - var t = new (System.Threading.Tasks.Task$1(T || System.Object))(); - - t.status = System.Threading.Tasks.TaskStatus.ranToCompletion; - t.result = result; - - return t; - }, - - fromException: function (exception, T) { - var t = new (System.Threading.Tasks.Task$1(T || System.Object))(); - - t.status = System.Threading.Tasks.TaskStatus.faulted; - t.exception = exception; - - return t; - }, - - run: function (fn) { - var tcs = new System.Threading.Tasks.TaskCompletionSource(); - - System.Threading.Tasks.Task.schedule(function () { - try { - var result = fn(); - - if (H5.is(result, System.Threading.Tasks.Task)) { - result.continueWith(function () { - if (result.isFaulted() || result.isCanceled()) { - tcs.setException(result.exception.innerExceptions.Count > 0 ? result.exception.innerExceptions.getItem(0) : result.exception); - } else { - tcs.setResult(result.getAwaitedResult()); - } - }); - } else { - tcs.setResult(result); - } - } catch (e) { - tcs.setException(System.Exception.create(e)); - } - }); - - return tcs.task; - }, - - whenAll: function (tasks) { - var tcs = new System.Threading.Tasks.TaskCompletionSource(), - result, - executing, - cancelled = false, - exceptions = [], - i; - - if (H5.is(tasks, System.Collections.IEnumerable)) { - tasks = H5.toArray(tasks); - } else if (!H5.isArray(tasks)) { - tasks = Array.prototype.slice.call(arguments, 0); - } - - if (tasks.length === 0) { - tcs.setResult([]); - - return tcs.task; - } - - executing = tasks.length; - result = new Array(tasks.length); - - for (i = 0; i < tasks.length; i++) { - (function (i) { - tasks[i].continueWith(function (t) { - switch (t.status) { - case System.Threading.Tasks.TaskStatus.ranToCompletion: - result[i] = t.getResult(); - break; - case System.Threading.Tasks.TaskStatus.canceled: - cancelled = true; - break; - case System.Threading.Tasks.TaskStatus.faulted: - System.Array.addRange(exceptions, t.exception.innerExceptions); - break; - default: - throw new System.InvalidOperationException.$ctor1("Invalid task status: " + t.status); - } - - if (--executing === 0) { - if (exceptions.length > 0) { - tcs.setException(exceptions); - } else if (cancelled) { - tcs.setCanceled(); - } else { - tcs.setResult(result); - } - } - }); - })(i); - } - - return tcs.task; - }, - - whenAny: function (tasks) { - if (H5.is(tasks, System.Collections.IEnumerable)) { - tasks = H5.toArray(tasks); - } else if (!H5.isArray(tasks)) { - tasks = Array.prototype.slice.call(arguments, 0); - } - - if (!tasks.length) { - throw new System.ArgumentException.$ctor1("At least one task is required"); - } - - var tcs = new System.Threading.Tasks.TaskCompletionSource(), - i; - - for (i = 0; i < tasks.length; i++) { - tasks[i].continueWith(function (t) { - tcs.trySetResult(t); - }); - } - - return tcs.task; - }, - - fromCallback: function (target, method) { - var tcs = new System.Threading.Tasks.TaskCompletionSource(), - args = Array.prototype.slice.call(arguments, 2), - callback; - - callback = function (value) { - tcs.setResult(value); - }; - - args.push(callback); - - target[method].apply(target, args); - - return tcs.task; - }, - - fromCallbackResult: function (target, method, resultHandler) { - var tcs = new System.Threading.Tasks.TaskCompletionSource(), - args = Array.prototype.slice.call(arguments, 3), - callback; - - callback = function (value) { - tcs.setResult(value); - }; - - resultHandler(args, callback); - - target[method].apply(target, args); - - return tcs.task; - }, - - fromCallbackOptions: function (target, method, name) { - var tcs = new System.Threading.Tasks.TaskCompletionSource(), - args = Array.prototype.slice.call(arguments, 3), - callback; - - callback = function (value) { - tcs.setResult(value); - }; - - args[0] = args[0] || {}; - args[0][name] = callback; - - target[method].apply(target, args); - - return tcs.task; - }, - - fromPromise: function (promise, handler, errorHandler, progressHandler) { - var tcs = new System.Threading.Tasks.TaskCompletionSource(); - - if (!promise.then) { - promise = promise.promise(); - } - - if (typeof (handler) === 'number') { - handler = (function (i) { - return function () { - return arguments[i >= 0 ? i : (arguments.length + i)]; - }; - })(handler); - } else if (typeof (handler) !== 'function') { - handler = function () { - return Array.prototype.slice.call(arguments, 0); - }; - } - - promise.then(function () { - tcs.setResult(handler ? handler.apply(null, arguments) : Array.prototype.slice.call(arguments, 0)); - }, function () { - tcs.setException(errorHandler ? errorHandler.apply(null, arguments) : new H5.PromiseException(Array.prototype.slice.call(arguments, 0))); - }, progressHandler); - - return tcs.task; - } - }, - - getException: function () { - return this.isCanceled() ? null : this.exception; - }, - - waitt: function (timeout, token) { - var ms = timeout, - tcs = new System.Threading.Tasks.TaskCompletionSource(), - cancelCallback = false; - - if (token) { - token.cancelWasRequested = function () { - if (!cancelCallback) { - cancelCallback = true; - clearTimeout(clear); - tcs.setException(new System.OperationCanceledException.$ctor1(token)); - } - }; - } - - if (H5.is(timeout, System.TimeSpan)) { - ms = timeout.getTotalMilliseconds(); - } - - var clear = setTimeout(function () { - cancelCallback = true; - tcs.setResult(false); - }, ms); - - this.continueWith(function () { - clearTimeout(clear); - if (!cancelCallback) { - cancelCallback = true; - tcs.setResult(true); - } - }) - - return tcs.task; - }, - - wait: function (token) { - var me = this, - tcs = new System.Threading.Tasks.TaskCompletionSource(), - complete = false; - - if (token) { - token.cancelWasRequested = function () { - if (!complete) { - complete = true; - tcs.setException(new System.OperationCanceledException.$ctor1(token)); - } - }; - } - - this.continueWith(function () { - if (!complete) { - complete = true; - if (me.isFaulted() || me.isCanceled()) { - tcs.setException(me.exception); - } else { - tcs.setResult(); - } - } - }) - - return tcs.task; - }, - - c: function (continuationAction) { - if (this.isCompleted()) { - System.Threading.Tasks.Task.queue.push(continuationAction); - System.Threading.Tasks.Task.runQueue(); - } else { - this.callbacks.push(continuationAction); - } - }, - - continue: function (continuationAction) { - if (this.isCompleted()) { - System.Threading.Tasks.Task.queue.push(continuationAction); - System.Threading.Tasks.Task.runQueue(); - } else { - this.callbacks.push(continuationAction); - } - }, - - continueWith: function (continuationAction, raise) { - var tcs = new System.Threading.Tasks.TaskCompletionSource(), - me = this, - fn = raise ? function () { - tcs.setResult(continuationAction(me)); - } : function () { - try { - tcs.setResult(continuationAction(me)); - } catch (e) { - tcs.setException(System.Exception.create(e)); - } - }; - - if (this.isCompleted()) { - //System.Threading.Tasks.Task.schedule(fn); - System.Threading.Tasks.Task.queue.push(fn); - System.Threading.Tasks.Task.runQueue(); - } else { - this.callbacks.push(fn); - } - - return tcs.task; - }, - - start: function () { - if (this.status !== System.Threading.Tasks.TaskStatus.created) { - throw new System.InvalidOperationException.$ctor1("Task was already started."); - } - - var me = this; - - this.status = System.Threading.Tasks.TaskStatus.running; - - System.Threading.Tasks.Task.schedule(function () { - try { - var result = me.action(me.state); - - delete me.action; - delete me.state; - - me.complete(result); - } catch (e) { - me.fail(new System.AggregateException(null, [System.Exception.create(e)])); - } - }); - }, - - runCallbacks: function () { - var me = this; - - for (var i = 0; i < me.callbacks.length; i++) { - me.callbacks[i](me); - } - - delete me.callbacks; - }, - - complete: function (result) { - if (this.isCompleted()) { - return false; - } - - this.result = result; - this.status = System.Threading.Tasks.TaskStatus.ranToCompletion; - this.runCallbacks(); - - return true; - }, - - fail: function (error) { - if (this.isCompleted()) { - return false; - } - - this.exception = error; - this.status = this.exception.hasTaskCanceledException && this.exception.hasTaskCanceledException() ? System.Threading.Tasks.TaskStatus.canceled : System.Threading.Tasks.TaskStatus.faulted; - this.runCallbacks(); - - return true; - }, - - cancel: function (error) { - if (this.isCompleted()) { - return false; - } - - this.exception = error || new System.AggregateException(null, [new System.Threading.Tasks.TaskCanceledException.$ctor3(this)]); - this.status = System.Threading.Tasks.TaskStatus.canceled; - this.runCallbacks(); - - return true; - }, - - isCanceled: function () { - return this.status === System.Threading.Tasks.TaskStatus.canceled; - }, - - isCompleted: function () { - return this.status === System.Threading.Tasks.TaskStatus.ranToCompletion || this.status === System.Threading.Tasks.TaskStatus.canceled || this.status === System.Threading.Tasks.TaskStatus.faulted; - }, - - isC: function () { - return this.status === System.Threading.Tasks.TaskStatus.ranToCompletion || this.status === System.Threading.Tasks.TaskStatus.canceled || this.status === System.Threading.Tasks.TaskStatus.faulted; - }, - - isFaulted: function () { - return this.status === System.Threading.Tasks.TaskStatus.faulted; - }, - - _getResult: function (awaiting) { - switch (this.status) { - case System.Threading.Tasks.TaskStatus.ranToCompletion: - return this.result; - case System.Threading.Tasks.TaskStatus.canceled: - if (this.exception && this.exception.innerExceptions) { - throw awaiting ? (this.exception.innerExceptions.Count > 0 ? this.exception.innerExceptions.getItem(0) : null) : this.exception; - } - - var ex = new System.Threading.Tasks.TaskCanceledException.$ctor3(this); - throw awaiting ? ex : new System.AggregateException(null, [ex]); - case System.Threading.Tasks.TaskStatus.faulted: - throw awaiting ? (this.exception.innerExceptions.Count > 0 ? this.exception.innerExceptions.getItem(0) : null) : this.exception; - default: - throw new System.InvalidOperationException.$ctor1("Task is not yet completed."); - } - }, - - getResult: function () { - return this._getResult(false); - }, - - dispose: function () {}, - - getAwaiter: function () { - return this; - }, - - getAwaitedResult: function () { - return this._getResult(true); - }, - - gAR: function () { - return this._getResult(true); - } - - }); - - H5.define("System.Threading.Tasks.Task$1", function (T) { - return { - inherits: [System.Threading.Tasks.Task], - ctor: function (action, state) { - this.$initialize(); - System.Threading.Tasks.Task.ctor.call(this, action, state); - } - }; - }); - - H5.define("System.Threading.Tasks.TaskStatus", { - $kind: "enum", - $statics: { - created: 0, - waitingForActivation: 1, - waitingToRun: 2, - running: 3, - waitingForChildrenToComplete: 4, - ranToCompletion: 5, - canceled: 6, - faulted: 7 - } - }); - - H5.define("System.Threading.Tasks.TaskCompletionSource", { - ctor: function (state) { - this.$initialize(); - this.task = new System.Threading.Tasks.Task(null, state); - this.task.status = System.Threading.Tasks.TaskStatus.running; - }, - - setCanceled: function () { - if (!this.task.cancel()) { - throw new System.InvalidOperationException.$ctor1("Task was already completed."); - } - }, - - sR: function (result) { - if (!this.task.complete(result)) { - throw new System.InvalidOperationException.$ctor1("Task was already completed."); - } - }, - - setResult: function (result) { - if (!this.task.complete(result)) { - throw new System.InvalidOperationException.$ctor1("Task was already completed."); - } - }, - - setException: function (exception) { - if (!this.trySetException(exception)) { - throw new System.InvalidOperationException.$ctor1("Task was already completed."); - } - }, - - sE: function (exception) { - if (!this.trySetException(exception)) { - throw new System.InvalidOperationException.$ctor1("Task was already completed."); - } - }, - - trySetCanceled: function () { - return this.task.cancel(); - }, - - trySetResult: function (result) { - return this.task.complete(result); - }, - - trySetException: function (exception) { - if (H5.is(exception, System.Exception)) { - exception = [exception]; - } - - exception = new System.AggregateException(null, exception); - - if (exception.hasTaskCanceledException()) { - return this.task.cancel(exception); - } - - return this.task.fail(exception); - } - }); - - H5.define("System.Threading.CancellationTokenSource", { - inherits: [System.IDisposable], - - config: { - alias: [ - "dispose", "System$IDisposable$Dispose" - ] - }, - - ctor: function (delay) { - this.$initialize(); - this.timeout = typeof delay === "number" && delay >= 0 ? setTimeout(H5.fn.bind(this, this.cancel), delay, -1) : null; - this.isCancellationRequested = false; - this.token = new System.Threading.CancellationToken(this); - this.handlers = []; - }, - - cancel: function (throwFirst) { - if (this.isCancellationRequested) { - return; - } - - this.isCancellationRequested = true; - - var x = [], - h = this.handlers; - - this.clean(); - this.token.cancelWasRequested(); - - for (var i = 0; i < h.length; i++) { - try { - h[i].f(h[i].s); - } catch (ex) { - if (throwFirst && throwFirst !== -1) { - throw ex; - } - - x.push(ex); - } - } - - if (x.length > 0 && throwFirst !== -1) { - throw new System.AggregateException(null, x); - } - }, - - cancelAfter: function (delay) { - if (this.isCancellationRequested) { - return; - } - - if (this.timeout) { - clearTimeout(this.timeout); - } - - this.timeout = setTimeout(H5.fn.bind(this, this.cancel), delay, -1); - }, - - register: function (f, s) { - if (this.isCancellationRequested) { - f(s); - - return new System.Threading.CancellationTokenRegistration(); - } else { - var o = { - f: f, - s: s - }; - - this.handlers.push(o); - - return new System.Threading.CancellationTokenRegistration(this, o); - } - }, - - deregister: function (o) { - var ix = this.handlers.indexOf(o); - - if (ix >= 0) { - this.handlers.splice(ix, 1); - } - }, - - dispose: function () { - this.clean(); - }, - - clean: function () { - if (this.timeout) { - clearTimeout(this.timeout); - } - - this.timeout = null; - this.handlers = []; - - if (this.links) { - for (var i = 0; i < this.links.length; i++) { - this.links[i].dispose(); - } - - this.links = null; - } - }, - - statics: { - createLinked: function () { - var cts = new System.Threading.CancellationTokenSource(); - - cts.links = []; - - var d = H5.fn.bind(cts, cts.cancel); - - for (var i = 0; i < arguments.length; i++) { - cts.links.push(arguments[i].register(d)); - } - - return cts; - } - } - }); - - H5.define("System.Threading.CancellationToken", { - $kind: "struct", - - ctor: function (source) { - this.$initialize(); - - if (!H5.is(source, System.Threading.CancellationTokenSource)) { - source = source ? System.Threading.CancellationToken.sourceTrue : System.Threading.CancellationToken.sourceFalse; - } - - this.source = source; - }, - - cancelWasRequested: function () { - - }, - - getCanBeCanceled: function () { - return !this.source.uncancellable; - }, - - getIsCancellationRequested: function () { - return this.source.isCancellationRequested; - }, - - throwIfCancellationRequested: function () { - if (this.source.isCancellationRequested) { - throw new System.OperationCanceledException.$ctor1(this); - } - }, - - register: function (cb, s) { - return this.source.register(cb, s); - }, - - getHashCode: function () { - return H5.getHashCode(this.source); - }, - - equals: function (other) { - return other.source === this.source; - }, - - equalsT: function (other) { - return other.source === this.source; - }, - - statics: { - sourceTrue: { - isCancellationRequested: true, - register: function (f, s) { - f(s); - - return new System.Threading.CancellationTokenRegistration(); - } - }, - sourceFalse: { - uncancellable: true, - isCancellationRequested: false, - register: function () { - return new System.Threading.CancellationTokenRegistration(); - } - }, - getDefaultValue: function () { - return new System.Threading.CancellationToken(); - } - } - }); - - System.Threading.CancellationToken.none = new System.Threading.CancellationToken(); - - H5.define("System.Threading.CancellationTokenRegistration", { - inherits: function () { - return [System.IDisposable, System.IEquatable$1(System.Threading.CancellationTokenRegistration)]; - }, - - $kind: "struct", - - config: { - alias: [ - "dispose", "System$IDisposable$Dispose" - ] - }, - - ctor: function (cts, o) { - this.$initialize(); - this.cts = cts; - this.o = o; - }, - - dispose: function () { - if (this.cts) { - this.cts.deregister(this.o); - this.cts = this.o = null; - } - }, - - equalsT: function (o) { - return this === o; - }, - - equals: function (o) { - return this === o; - }, - - statics: { - getDefaultValue: function () { - return new System.Threading.CancellationTokenRegistration(); - } - } - }); - - H5.toPromise = function (awaitable) { - if (!awaitable) { - return Promise.resolve(awaitable); - } - - if (awaitable instanceof Promise || typeof awaitable.then === 'function') { - return awaitable; - } - - if (H5.is(awaitable, System.Threading.Tasks.Task) || (awaitable && typeof awaitable.continueWith === 'function')) { - return new Promise(function (resolve, reject) { - awaitable.continueWith(function (t) { - if (t.isFaulted()) { - var ex = t.exception; - if (ex && ex.innerExceptions && ex.innerExceptions.Count > 0) { - reject(ex.innerExceptions.getItem(0)); - } else { - reject(ex); - } - } else if (t.isCanceled()) { - reject(new System.Threading.Tasks.TaskCanceledException.$ctor3(t)); - } else { - resolve(t.getAwaitedResult ? t.getAwaitedResult() : t.getResult()); - } - }); - }); - } - - if (typeof awaitable.getAwaiter === 'function') { - var awaiter = awaitable.getAwaiter(); - if (awaiter.isCompleted()) { - return Promise.resolve(awaiter.getResult()); - } - return new Promise(function(resolve, reject) { - var onCompleted = awaiter.onCompleted || awaiter.continueWith; - if (typeof onCompleted === 'function') { - onCompleted.call(awaiter, function() { - try { - resolve(awaiter.getResult()); - } catch(e) { - reject(e); - } - }); - } else { - resolve(awaiter); - } - }); - } - - return Promise.resolve(awaitable); - }; - - // @source Validation.js - - var validation = { - isNull: function (value) { - return !H5.isDefined(value, true); - }, - - isEmpty: function (value) { - return value == null || value.length === 0 || H5.is(value, System.Collections.ICollection) ? value.getCount() === 0 : false; - }, - - isNotEmptyOrWhitespace: function (value) { - return H5.isDefined(value, true) && !(/^$|\s+/.test(value)); - }, - - isNotNull: function (value) { - return H5.isDefined(value, true); - }, - - isNotEmpty: function (value) { - return !H5.Validation.isEmpty(value); - }, - - email: function (value) { - var re = /^(")?(?:[^\."])(?:(?:[\.])?(?:[\w\-!#$%&'*+/=?^_`{|}~]))*\1@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/; - - return re.test(value); - }, - - url: function (value) { - var re = /(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:\.\d{1,3}){3})(?!(?:\.\d{1,3}){2})(?!\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[/?#]\S*)?$/; - - return re.test(value); - }, - - alpha: function (value) { - var re = /^[a-zA-Z_]+$/; - - return re.test(value); - }, - - alphaNum: function (value) { - var re = /^[a-zA-Z_]+$/; - - return re.test(value); - }, - - creditCard: function (value, type) { - var re, - checksum, - i, - digit, - notype = false; - - if (type === "Visa") { - // Visa: length 16, prefix 4, dashes optional. - re = /^4\d{3}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}$/; - } else if (type === "MasterCard") { - // Mastercard: length 16, prefix 51-55, dashes optional. - re = /^5[1-5]\d{2}[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}$/; - } else if (type === "Discover") { - // Discover: length 16, prefix 6011, dashes optional. - re = /^6011[- ]?\d{4}[- ]?\d{4}[- ]?\d{4}$/; - } else if (type === "AmericanExpress") { - // American Express: length 15, prefix 34 or 37. - re = /^3[4,7]\d{13}$/; - } else if (type === "DinersClub") { - // Diners: length 14, prefix 30, 36, or 38. - re = /^(3[0,6,8]\d{12})|(5[45]\d{14})$/; - } else { - // Basing min and max length on - // http://developer.ean.com/general_info/Valid_Credit_Card_Types - if (!value || value.length < 13 || value.length > 19) { - return false; - } - - re = /[^0-9 \-]+/; - notype = true; - } - - if (!re.test(value)) { - return false; - } - - // Remove all dashes for the checksum checks to eliminate negative numbers - value = value.split(notype ? "-" : /[- ]/).join(""); - - // Checksum ("Mod 10") - // Add even digits in even length strings or odd digits in odd length strings. - checksum = 0; - - for (i = (2 - (value.length % 2)); i <= value.length; i += 2) { - checksum += parseInt(value.charAt(i - 1)); - } - - // Analyze odd digits in even length strings or even digits in odd length strings. - for (i = (value.length % 2) + 1; i < value.length; i += 2) { - digit = parseInt(value.charAt(i - 1)) * 2; - - if (digit < 10) { - checksum += digit; - } else { - checksum += (digit - 9); - } - } - - return (checksum % 10) === 0; - } - }; - - H5.Validation = validation; - - // @source Attribute.js - - H5.define("System.Attribute", { - statics: { - getCustomAttributes: function (o, t, b) { - if (o == null) { - throw new System.ArgumentNullException.$ctor1("element"); - } - - if (t == null) { - throw new System.ArgumentNullException.$ctor1("attributeType"); - } - - var r = o.at || []; - - if (o.ov === true) { - var baseType = H5.Reflection.getBaseType(o.td), - baseAttrs = [], - baseMember = null; - - while (baseType != null && baseMember == null) { - baseMember = H5.Reflection.getMembers(baseType, 31, 28, o.n); - - if (baseMember.length == 0) { - var newBaseType = H5.Reflection.getBaseType(baseType); - - if (newBaseType != baseType) { - baseType = newBaseType; - } - - baseMember = null; - } else { - baseMember = baseMember[0]; - } - } - - if (baseMember != null) { - baseAttrs = System.Attribute.getCustomAttributes(baseMember, t); - } - - for (var i = 0; i < baseAttrs.length; i++) { - var baseAttr = baseAttrs[i], - attrType = H5.getType(baseAttr), - meta = H5.getMetadata(attrType); - - if (meta && meta.am || !r.some(function (a) { return H5.is(a, t); })) { - r.push(baseAttr); - } - } - } - - if (!t) { - return r; - } - - return r.filter(function (a) { return H5.is(a, t); }); - }, - - getCustomAttributes$1: function (a, t, b) { - if (a == null) { - throw new System.ArgumentNullException.$ctor1("element"); - } - - if (t == null) { - throw new System.ArgumentNullException.$ctor1("attributeType"); - } - - return a.getCustomAttributes(t || b); - }, - - isDefined: function (o, t, b) { - var attrs = System.Attribute.getCustomAttributes(o, t, b); - - return attrs.length > 0; - } - } - }); - - // @source SerializableAttribute.js - - H5.define("System.SerializableAttribute", { - inherits: [System.Attribute], - ctors: { - ctor: function () { - this.$initialize(); - System.Attribute.ctor.call(this); - } - } - }); - - // @source INotifyPropertyChanged.js - - H5.define("System.ComponentModel.INotifyPropertyChanged", { - $kind: "interface" - }); - - H5.define("System.ComponentModel.PropertyChangedEventArgs", { - ctor: function (propertyName, newValue, oldValue) { - this.$initialize(); - this.propertyName = propertyName; - this.newValue = newValue; - this.oldValue = oldValue; - } - }); - - // @source Convert.js - - var scope = {}; - - scope.convert = { - typeCodes: { - Empty: 0, - Object: 1, - DBNull: 2, - Boolean: 3, - Char: 4, - SByte: 5, - Byte: 6, - Int16: 7, - UInt16: 8, - Int32: 9, - UInt32: 10, - Int64: 11, - UInt64: 12, - Single: 13, - Double: 14, - Decimal: 15, - DateTime: 16, - String: 18 - }, - - convertTypes: [ - null, - System.Object, - null, - System.Boolean, - System.Char, - System.SByte, - System.Byte, - System.Int16, - System.UInt16, - System.Int32, - System.UInt32, - System.Int64, - System.UInt64, - System.Single, - System.Double, - System.Decimal, - System.DateTime, - System.Object, - System.String - ], - - toBoolean: function (value, formatProvider) { - value = H5.unbox(value, true); - - switch (typeof (value)) { - case "boolean": - return value; - - case "number": - return value !== 0; // non-zero int/float value is always converted to True; - - case "string": - var lowCaseVal = value.toLowerCase().trim(); - - if (lowCaseVal === "true") { - return true; - } else if (lowCaseVal === "false") { - return false; - } else { - throw new System.FormatException.$ctor1("String was not recognized as a valid Boolean."); - } - - case "object": - if (value == null) { - return false; - } - - if (value instanceof System.Decimal) { - return !value.isZero(); - } - - if (System.Int64.is64Bit(value)) { - return value.ne(0); - } - - break; - } - - // TODO: #822 When IConvertible is implemented, try it before throwing InvalidCastEx - var typeCode = scope.internal.suggestTypeCode(value); - scope.internal.throwInvalidCastEx(typeCode, scope.convert.typeCodes.Boolean); - - // try converting using IConvertible - return scope.convert.convertToType(scope.convert.typeCodes.Boolean, value, formatProvider || null); - }, - - toChar: function (value, formatProvider, valueTypeCode) { - var typeCodes = scope.convert.typeCodes, - isChar = H5.is(value, System.Char); - - value = H5.unbox(value, true); - - if (value instanceof System.Decimal) { - value = value.toFloat(); - } - - if (value instanceof System.Int64 || value instanceof System.UInt64) { - value = value.toNumber(); - } - - var type = typeof (value); - - valueTypeCode = valueTypeCode || scope.internal.suggestTypeCode(value); - - if (valueTypeCode === typeCodes.String && value == null) { - type = "string"; - } - - if (valueTypeCode !== typeCodes.Object || isChar) { - switch (type) { - case "boolean": - scope.internal.throwInvalidCastEx(typeCodes.Boolean, typeCodes.Char); - - case "number": - var isFloatingType = scope.internal.isFloatingType(valueTypeCode); - - if (isFloatingType || value % 1 !== 0) { - scope.internal.throwInvalidCastEx(valueTypeCode, typeCodes.Char); - } - - scope.internal.validateNumberRange(value, typeCodes.Char, true); - - return value; - - case "string": - if (value == null) { - throw new System.ArgumentNullException.$ctor1("value"); - } - - if (value.length !== 1) { - throw new System.FormatException.$ctor1("String must be exactly one character long."); - } - - return value.charCodeAt(0); - } - } - - if (valueTypeCode === typeCodes.Object || type === "object") { - if (value == null) { - return 0; - } - - if (H5.isDate(value)) { - scope.internal.throwInvalidCastEx(typeCodes.DateTime, typeCodes.Char); - } - } - - // TODO: #822 When IConvertible is implemented, try it before throwing InvalidCastEx - scope.internal.throwInvalidCastEx(valueTypeCode, scope.convert.typeCodes.Char); - - // try converting using IConvertible - return scope.convert.convertToType(typeCodes.Char, value, formatProvider || null); - }, - - toSByte: function (value, formatProvider, valueTypeCode) { - return scope.internal.toNumber(value, formatProvider || null, scope.convert.typeCodes.SByte, valueTypeCode || null); - }, - - toByte: function (value, formatProvider) { - return scope.internal.toNumber(value, formatProvider || null, scope.convert.typeCodes.Byte); - }, - - toInt16: function (value, formatProvider) { - return scope.internal.toNumber(value, formatProvider || null, scope.convert.typeCodes.Int16); - }, - - toUInt16: function (value, formatProvider) { - return scope.internal.toNumber(value, formatProvider || null, scope.convert.typeCodes.UInt16); - }, - - toInt32: function (value, formatProvider) { - return scope.internal.toNumber(value, formatProvider || null, scope.convert.typeCodes.Int32); - }, - - toUInt32: function (value, formatProvider) { - return scope.internal.toNumber(value, formatProvider || null, scope.convert.typeCodes.UInt32); - }, - - toInt64: function (value, formatProvider) { - var result = scope.internal.toNumber(value, formatProvider || null, scope.convert.typeCodes.Int64); - return new System.Int64(result); - }, - - toUInt64: function (value, formatProvider) { - var result = scope.internal.toNumber(value, formatProvider || null, scope.convert.typeCodes.UInt64); - return new System.UInt64(result); - }, - - toSingle: function (value, formatProvider) { - return scope.internal.toNumber(value, formatProvider || null, scope.convert.typeCodes.Single); - }, - - toDouble: function (value, formatProvider) { - return scope.internal.toNumber(value, formatProvider || null, scope.convert.typeCodes.Double); - }, - - toDecimal: function (value, formatProvider) { - if (value instanceof System.Decimal) { - return value; - } - - return new System.Decimal(scope.internal.toNumber(value, formatProvider || null, scope.convert.typeCodes.Decimal)); - }, - - toDateTime: function (value, formatProvider) { - var typeCodes = scope.convert.typeCodes; - - value = H5.unbox(value, true); - - switch (typeof (value)) { - case "boolean": - scope.internal.throwInvalidCastEx(typeCodes.Boolean, typeCodes.DateTime); - - case "number": - var fromType = scope.internal.suggestTypeCode(value); - scope.internal.throwInvalidCastEx(fromType, typeCodes.DateTime); - - case "string": - value = System.DateTime.parse(value, formatProvider || null); - - return value; - - case "object": - if (value == null) { - return scope.internal.getMinValue(typeCodes.DateTime); - } - - if (H5.isDate(value)) { - return value; - } - - if (value instanceof System.Decimal) { - scope.internal.throwInvalidCastEx(typeCodes.Decimal, typeCodes.DateTime); - } - - if (value instanceof System.Int64) { - scope.internal.throwInvalidCastEx(typeCodes.Int64, typeCodes.DateTime); - } - - if (value instanceof System.UInt64) { - scope.internal.throwInvalidCastEx(typeCodes.UInt64, typeCodes.DateTime); - } - - break; - } - - // TODO: #822 When IConvertible is implemented, try it before throwing InvalidCastEx - var valueTypeCode = scope.internal.suggestTypeCode(value); - - scope.internal.throwInvalidCastEx(valueTypeCode, scope.convert.typeCodes.DateTime); - - // try converting using IConvertible - return scope.convert.convertToType(typeCodes.DateTime, value, formatProvider || null); - }, - - toString: function (value, formatProvider, valueTypeCode) { - if (value && value.$boxed) { - return value.toString(); - } - - var typeCodes = scope.convert.typeCodes, - type = typeof (value); - - switch (type) { - case "boolean": - return value ? "True" : "False"; - - case "number": - if ((valueTypeCode || null) === typeCodes.Char) { - return String.fromCharCode(value); - } - - if (isNaN(value)) { - return "NaN"; - } - - if (value % 1 !== 0) { - value = parseFloat(value.toPrecision(15)); - } - - return value.toString(); - - case "string": - return value; - - case "object": - if (value == null) { - return ""; - } - - // If the object has an override to the toString() method, - // then just return its result - if (value.toString !== Object.prototype.toString) { - return value.toString(); - } - - if (H5.isDate(value)) { - return System.DateTime.format(value, null, formatProvider || null); - } - - if (value instanceof System.Decimal) { - if (value.isInteger()) { - return value.toFixed(0, 4); - } - return value.toPrecision(value.precision()); - } - - if (System.Int64.is64Bit(value)) { - return value.toString(); - } - - if (value.format) { - return value.format(null, formatProvider || null); - } - - var typeName = H5.getTypeName(value); - - return typeName; - } - - // try converting using IConvertible - return scope.convert.convertToType(scope.convert.typeCodes.String, value, formatProvider || null); - }, - - toNumberInBase: function (str, fromBase, typeCode) { - if (fromBase !== 2 && fromBase !== 8 && fromBase !== 10 && fromBase !== 16) { - throw new System.ArgumentException.$ctor1("Invalid Base."); - } - - var typeCodes = scope.convert.typeCodes; - - if (str == null) { - if (typeCode === typeCodes.Int64) { - return System.Int64.Zero; - } - - if (typeCode === typeCodes.UInt64) { - return System.UInt64.Zero; - } - - return 0; - } - - if (str.length === 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("length", "Index was out of range. Must be non-negative and less than the size of the collection."); - } - - // Let's process the string in lower case. - str = str.toLowerCase(); - - var minValue = scope.internal.getMinValue(typeCode), - maxValue = scope.internal.getMaxValue(typeCode); - - // Calculate offset (start index) - var isNegative = false, - startIndex = 0; - - if (str[startIndex] === "-") { - if (fromBase !== 10) { - throw new System.ArgumentException.$ctor1("String cannot contain a minus sign if the base is not 10."); - } - - if (minValue >= 0) { - throw new System.OverflowException.$ctor1("The string was being parsed as an unsigned number and could not have a negative sign."); - } - - isNegative = true; - ++startIndex; - } else if (str[startIndex] === "+") { - ++startIndex; - } - - if (fromBase === 16 && str.length >= 2 && str[startIndex] === "0" && str[startIndex + 1] === "x") { - startIndex += 2; - } - - // Fill allowed codes for the specified base: - var allowedCodes; - - if (fromBase === 2) { - allowedCodes = scope.internal.charsToCodes("01"); - } else if (fromBase === 8) { - allowedCodes = scope.internal.charsToCodes("01234567"); - } else if (fromBase === 10) { - allowedCodes = scope.internal.charsToCodes("0123456789"); - } else if (fromBase === 16) { - allowedCodes = scope.internal.charsToCodes("0123456789abcdef"); - } else { - throw new System.ArgumentException.$ctor1("Invalid Base."); - } - - // Create charCode-to-Value map - var codeValues = {}; - - for (var i = 0; i < allowedCodes.length; i++) { - var allowedCode = allowedCodes[i]; - - codeValues[allowedCode] = i; - } - - var firstAllowed = allowedCodes[0], - lastAllowed = allowedCodes[allowedCodes.length - 1], - res, - totalMax, - code, - j; - - if (typeCode === typeCodes.Int64 || typeCode === typeCodes.UInt64) { - for (j = startIndex; j < str.length; j++) { - code = str[j].charCodeAt(0); - - if (!(code >= firstAllowed && code <= lastAllowed)) { - if (j === startIndex) { - throw new System.FormatException.$ctor1("Could not find any recognizable digits."); - } else { - throw new System.FormatException.$ctor1("Additional non-parsable characters are at the end of the string."); - } - } - } - - var isSign = typeCode === typeCodes.Int64; - - if (isSign) { - res = new System.Int64(H5.$Long.fromString(str, false, fromBase)); - } else { - res = new System.UInt64(H5.$Long.fromString(str, true, fromBase)); - } - - if (res.toString(fromBase) !== System.String.trimStartZeros(str)) { - throw new System.OverflowException.$ctor1("Value was either too large or too small."); - } - - return res; - } else { - // Parse the number: - res = 0; - totalMax = maxValue - minValue + 1; - - for (j = startIndex; j < str.length; j++) { - code = str[j].charCodeAt(0); - - if (code >= firstAllowed && code <= lastAllowed) { - res *= fromBase; - res += codeValues[code]; - - if (res > scope.internal.typeRanges.Int64_MaxValue) { - throw new System.OverflowException.$ctor1("Value was either too large or too small."); - } - } else { - if (j === startIndex) { - throw new System.FormatException.$ctor1("Could not find any recognizable digits."); - } else { - throw new System.FormatException.$ctor1("Additional non-parsable characters are at the end of the string."); - } - } - } - - if (isNegative) { - res *= -1; - } - - if (res > maxValue && fromBase !== 10 && minValue < 0) { - // Assume that the value is negative, transform it: - res = res - totalMax; - } - - if (res < minValue || res > maxValue) { - throw new System.OverflowException.$ctor1("Value was either too large or too small."); - } - - return res; - } - }, - - toStringInBase: function (value, toBase, typeCode) { - var typeCodes = scope.convert.typeCodes; - - value = H5.unbox(value, true); - - if (toBase !== 2 && toBase !== 8 && toBase !== 10 && toBase !== 16) { - throw new System.ArgumentException.$ctor1("Invalid Base."); - } - - var minValue = scope.internal.getMinValue(typeCode), - maxValue = scope.internal.getMaxValue(typeCode), - special = System.Int64.is64Bit(value); - - if (special) { - if (value.lt(minValue) || value.gt(maxValue)) { - throw new System.OverflowException.$ctor1("Value was either too large or too small for an unsigned byte."); - } - } else if (value < minValue || value > maxValue) { - throw new System.OverflowException.$ctor1("Value was either too large or too small for an unsigned byte."); - } - - // Handle negative numbers: - var isNegative = false; - - if (special) { - if (toBase === 10) { - return value.toString(); - } else { - return value.value.toUnsigned().toString(toBase); - } - } else if (value < 0) { - if (toBase === 10) { - isNegative = true; - value *= -1; - } else { - value = (maxValue + 1 - minValue) + value; - } - } - - // Fill allowed codes for the specified base: - var allowedChars; - - if (toBase === 2) { - allowedChars = "01"; - } else if (toBase === 8) { - allowedChars = "01234567"; - } else if (toBase === 10) { - allowedChars = "0123456789"; - } else if (toBase === 16) { - allowedChars = "0123456789abcdef"; - } else { - throw new System.ArgumentException.$ctor1("Invalid Base."); - } - - // Fill Value-To-Char map: - var charByValues = {}, - allowedCharArr = allowedChars.split(""), - allowedChar; - - for (var i = 0; i < allowedCharArr.length; i++) { - allowedChar = allowedCharArr[i]; - - charByValues[i] = allowedChar; - } - - // Parse the number: - var res = ""; - - if (value === 0 || (special && value.eq(0))) { - res = "0"; - } else { - var mod, char; - - if (special) { - while (value.gt(0)) { - mod = value.mod(toBase); - value = value.sub(mod).div(toBase); - - char = charByValues[mod.toNumber()]; - res += char; - } - } else { - while (value > 0) { - mod = value % toBase; - value = (value - mod) / toBase; - - char = charByValues[mod]; - res += char; - } - } - } - - if (isNegative) { - res += "-"; - } - - res = res.split("").reverse().join(""); - - return res; - }, - - toBase64String: function (inArray, offset, length, options) { - if (inArray == null) { - throw new System.ArgumentNullException.$ctor1("inArray"); - } - - offset = offset || 0; - length = length != null ? length : inArray.length; - options = options || 0; // 0 - means "None", 1 - stands for "InsertLineBreaks" - - if (length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("length", "Index was out of range. Must be non-negative and less than the size of the collection."); - } - - if (offset < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("offset", "Value must be positive."); - } - - if (options < 0 || options > 1) { - throw new System.ArgumentException.$ctor1("Illegal enum value."); - } - - var inArrayLength = inArray.length; - - if (offset > (inArrayLength - length)) { - throw new System.ArgumentOutOfRangeException.$ctor4("offset", "Offset and length must refer to a position in the string."); - } - - if (inArrayLength === 0) { - return ""; - } - - var insertLineBreaks = (options === 1), - strArrayLen = scope.internal.toBase64_CalculateAndValidateOutputLength(length, insertLineBreaks); - - var strArray = []; - strArray.length = strArrayLen; - - scope.internal.convertToBase64Array(strArray, inArray, offset, length, insertLineBreaks); - - var str = strArray.join(""); - - return str; - }, - - toBase64CharArray: function (inArray, offsetIn, length, outArray, offsetOut, options) { - if (inArray == null) { - throw new System.ArgumentNullException.$ctor1("inArray"); - } - - if (outArray == null) { - throw new System.ArgumentNullException.$ctor1("outArray"); - } - - if (length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("length", "Index was out of range. Must be non-negative and less than the size of the collection."); - } - - if (offsetIn < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("offsetIn", "Value must be positive."); - } - - if (offsetOut < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("offsetOut", "Value must be positive."); - } - - options = options || 0; // 0 - means "None", 1 - stands for "InsertLineBreaks" - - if (options < 0 || options > 1) { - throw new System.ArgumentException.$ctor1("Illegal enum value."); - } - - var inArrayLength = inArray.length; - - if (offsetIn > inArrayLength - length) { - throw new System.ArgumentOutOfRangeException.$ctor4("offsetIn", "Offset and length must refer to a position in the string."); - } - - if (inArrayLength === 0) { - return 0; - } - - var insertLineBreaks = options === 1, - outArrayLength = outArray.length; //This is the maximally required length that must be available in the char array - - // Length of the char buffer required - var numElementsToCopy = scope.internal.toBase64_CalculateAndValidateOutputLength(length, insertLineBreaks); - - if (offsetOut > (outArrayLength - numElementsToCopy)) { - throw new System.ArgumentOutOfRangeException.$ctor4("offsetOut", "Either offset did not refer to a position in the string, or there is an insufficient length of destination character array."); - } - - var charsArr = [], - charsArrLength = scope.internal.convertToBase64Array(charsArr, inArray, offsetIn, length, insertLineBreaks); - - scope.internal.charsToCodes(charsArr, outArray, offsetOut); - - return charsArrLength; - }, - - fromBase64String: function (s) { - // "s" is an unfortunate parameter name, but we need to keep it for backward compat. - - if (s == null) { - throw new System.ArgumentNullException.$ctor1("s"); - } - - var sChars = s.split(""), - bytes = scope.internal.fromBase64CharPtr(sChars, 0, sChars.length); - - return bytes; - }, - - fromBase64CharArray: function (inArray, offset, length) { - if (inArray == null) { - throw new System.ArgumentNullException.$ctor1("inArray"); - } - - if (length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("length", "Index was out of range. Must be non-negative and less than the size of the collection."); - } - - if (offset < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("offset", "Value must be positive."); - } - - if (offset > (inArray.length - length)) { - throw new System.ArgumentOutOfRangeException.$ctor4("offset", "Offset and length must refer to a position in the string."); - } - - var chars = scope.internal.codesToChars(inArray), - bytes = scope.internal.fromBase64CharPtr(chars, offset, length); - - return bytes; - }, - - - toHexString: function (byteArray) { - if (byteArray == null) { - throw new System.ArgumentNullException.$ctor1("byteArray"); - } - - return scope.convert.toHexStringRange(byteArray, 0, byteArray.length); - }, - - toHexStringRange: function (byteArray, offset, length) { - if (byteArray == null) { - throw new System.ArgumentNullException.$ctor1("byteArray"); - } - - if (offset < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("offset", "Value must be positive."); - } - - if (length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("length", "Value must be positive."); - } - - if (offset > byteArray.length - length) { - throw new System.ArgumentOutOfRangeException.$ctor4("length+offset", - "Offset and length were out of bounds for the array" - ); - } - - if (length === 0) { - return ""; - } - - let hex = ""; - for (let i = offset; i < offset + length; i++) { - hex += byteArray[i].toString(16).padStart(2, "0").toUpperCase(); - } - - return hex; - }, - - fromHexString: function (s) { - if (s == null) { - throw new System.ArgumentNullException.$ctor1("s"); - } - - if (s.length % 2 !== 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("s", "The input string must have an even number of hex characters."); - } - - const bytes = new Uint8Array(s.length / 2); - - for (let i = 0; i < bytes.length; i++) { - const hex = s.substring(i * 2, i * 2 + 2); - - try { - bytes[i] = scope.convert.parseHexByte(hex); - } catch (err) { - throw new System.ArgumentException.$ctor1("The string contains invalid hex characters."); - } - } - - return bytes; - }, - - parseHexByte: function (input) { - if (input == null) { - throw new System.ArgumentNullException.$ctor1("input"); - } - - if (input.length === 0) { - throw new System.ArgumentException.$ctor1("Input string was not in a correct format."); - } - - let result = 0; - - for (let i = 0; i < input.length; i++) { - const c = input[i]; - let value; - - if (c >= "0" && c <= "9") { - value = c.charCodeAt(0) - "0".charCodeAt(0); - } else if (c >= "A" && c <= "F") { - value = c.charCodeAt(0) - "A".charCodeAt(0) + 10; - } else if (c >= "a" && c <= "f") { - value = c.charCodeAt(0) - "a".charCodeAt(0) + 10; - } else { - throw new System.ArgumentException.$ctor1("Input string was not in a correct format."); - } - - result = (result << 4) | value; - - if (result > 255) { - throw new System.ArgumentOutOfRangeException.$ctor4("result", "Value was either too large or too small for a byte."); - } - } - - return result; - }, - - - getTypeCode: function (t) { - if (t == null) { - return System.TypeCode.Object; - } - if (t === System.Double) { - return System.TypeCode.Double; - } - if (t === System.Single) { - return System.TypeCode.Single; - } - if (t === System.Decimal) { - return System.TypeCode.Decimal; - } - if (t === System.Byte) { - return System.TypeCode.Byte; - } - if (t === System.SByte) { - return System.TypeCode.SByte; - } - if (t === System.UInt16) { - return System.TypeCode.UInt16; - } - if (t === System.Int16) { - return System.TypeCode.Int16; - } - if (t === System.UInt32) { - return System.TypeCode.UInt32; - } - if (t === System.Int32) { - return System.TypeCode.Int32; - } - if (t === System.UInt64) { - return System.TypeCode.UInt64; - } - if (t === System.Int64) { - return System.TypeCode.Int64; - } - if (t === System.Boolean) { - return System.TypeCode.Boolean; - } - if (t === System.Char) { - return System.TypeCode.Char; - } - if (t === System.DateTime) { - return System.TypeCode.DateTime; - } - if (t === System.String) { - return System.TypeCode.String; - } - return System.TypeCode.Object; - }, - - changeConversionType: function (value, conversionType, provider) { - if (conversionType == null) { - throw new System.ArgumentNullException.$ctor1("conversionType"); - } - - if (value == null) { - if (H5.Reflection.isValueType(conversionType)) { - throw new System.InvalidCastException.$ctor1("Null object cannot be converted to a value type."); - } - return null; - } - - var fromTypeCode = scope.convert.getTypeCode(H5.getType(value)), - ic = H5.as(value, System.IConvertible); - - if (ic == null && fromTypeCode == System.TypeCode.Object) { - if (H5.referenceEquals(H5.getType(value), conversionType)) { - return value; - } - throw new System.InvalidCastException.$ctor1("Cannot convert to IConvertible"); - } - - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.Boolean, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toBoolean(value, provider) : ic.System$IConvertible$ToBoolean(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.Char, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toChar(value, provider, fromTypeCode) : ic.System$IConvertible$ToChar(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.SByte, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toSByte(value, provider, fromTypeCode) : ic.System$IConvertible$ToSByte(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.Byte, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toByte(value, provider) : ic.System$IConvertible$ToByte(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.Int16, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toInt16(value, provider) : ic.System$IConvertible$ToInt16(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.UInt16, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toUInt16(value, provider) : ic.System$IConvertible$ToUInt16(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.Int32, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toInt32(value, provider) : ic.System$IConvertible$ToInt32(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.UInt32, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toUInt32(value, provider) : ic.System$IConvertible$ToUInt32(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.Int64, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toInt64(value, provider) : ic.System$IConvertible$ToInt64(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.UInt64, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toUInt64(value, provider) : ic.System$IConvertible$ToUInt64(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.Single, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toSingle(value, provider) : ic.System$IConvertible$ToSingle(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.Double, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toDouble(value, provider) : ic.System$IConvertible$ToDouble(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.Decimal, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toDecimal(value, provider) : ic.System$IConvertible$ToDecimal(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.DateTime, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toDateTime(value, provider) : ic.System$IConvertible$ToDateTime(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.String, scope.convert.convertTypes)])) { - return ic == null ? scope.convert.toString(value, provider, fromTypeCode) : ic.System$IConvertible$ToString(provider); - } - if (H5.referenceEquals(conversionType, scope.convert.convertTypes[System.Array.index(System.TypeCode.Object, scope.convert.convertTypes)])) { - return value; - } - - if (ic == null) { - throw new System.InvalidCastException.$ctor1("Cannot convert to IConvertible"); - } - - return ic.System$IConvertible$ToType(conversionType, provider); - }, - - changeType: function (value, typeCode, formatProvider) { - if (H5.isFunction(typeCode)) { - return scope.convert.changeConversionType(value, typeCode, formatProvider); - } - - if (value == null && (typeCode === System.TypeCode.Empty || typeCode === System.TypeCode.String || typeCode === System.TypeCode.Object)) { - return null; - } - - var fromTypeCode = scope.convert.getTypeCode(H5.getType(value)), - v = H5.as(value, System.IConvertible); - - if (v == null && fromTypeCode == System.TypeCode.Object) { - throw new System.InvalidCastException.$ctor1("Cannot convert to IConvertible"); - } - - switch (typeCode) { - case System.TypeCode.Boolean: - return v == null ? scope.convert.toBoolean(value, formatProvider) : v.System$IConvertible$ToBoolean(provider); - case System.TypeCode.Char: - return v == null ? scope.convert.toChar(value, formatProvider, fromTypeCode) : v.System$IConvertible$ToChar(provider); - case System.TypeCode.SByte: - return v == null ? scope.convert.toSByte(value, formatProvider, fromTypeCode) : v.System$IConvertible$ToSByte(provider); - case System.TypeCode.Byte: - return v == null ? scope.convert.toByte(value, formatProvider, fromTypeCode) : v.System$IConvertible$ToByte(provider); - case System.TypeCode.Int16: - return v == null ? scope.convert.toInt16(value, formatProvider) : v.System$IConvertible$ToInt16(provider); - case System.TypeCode.UInt16: - return v == null ? scope.convert.toUInt16(value, formatProvider) : v.System$IConvertible$ToUInt16(provider); - case System.TypeCode.Int32: - return v == null ? scope.convert.toInt32(value, formatProvider) : v.System$IConvertible$ToInt32(provider); - case System.TypeCode.UInt32: - return v == null ? scope.convert.toUInt32(value, formatProvider) : v.System$IConvertible$ToUInt32(provider); - case System.TypeCode.Int64: - return v == null ? scope.convert.toInt64(value, formatProvider) : v.System$IConvertible$ToInt64(provider); - case System.TypeCode.UInt64: - return v == null ? scope.convert.toUInt64(value, formatProvider) : v.System$IConvertible$ToUInt64(provider); - case System.TypeCode.Single: - return v == null ? scope.convert.toSingle(value, formatProvider) : v.System$IConvertible$ToSingle(provider); - case System.TypeCode.Double: - return v == null ? scope.convert.toDouble(value, formatProvider) : v.System$IConvertible$ToDouble(provider); - case System.TypeCode.Decimal: - return v == null ? scope.convert.toDecimal(value, formatProvider) : v.System$IConvertible$ToDecimal(provider); - case System.TypeCode.DateTime: - return v == null ? scope.convert.toDateTime(value, formatProvider) : v.System$IConvertible$ToDateTime(provider); - case System.TypeCode.String: - return v == null ? scope.convert.toString(value, formatProvider, fromTypeCode) : v.System$IConvertible$ToString(provider); - case System.TypeCode.Object: - return value; - case System.TypeCode.DBNull: - throw new System.InvalidCastException.$ctor1("Cannot convert DBNull values"); - case System.TypeCode.Empty: - throw new System.InvalidCastException.$ctor1("Cannot convert Empty values"); - default: - throw new System.ArgumentException.$ctor1("Unknown type code"); - } - } - }; - - scope.internal = { - base64Table: [ - "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", "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", "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", "+", "/", "=" - ], - - typeRanges: { - Char_MinValue: 0, - Char_MaxValue: 65535, - - Byte_MinValue: 0, - Byte_MaxValue: 255, - - SByte_MinValue: -128, - SByte_MaxValue: 127, - - Int16_MinValue: -32768, - Int16_MaxValue: 32767, - - UInt16_MinValue: 0, - UInt16_MaxValue: 65535, - - Int32_MinValue: -2147483648, - Int32_MaxValue: 2147483647, - - UInt32_MinValue: 0, - UInt32_MaxValue: 4294967295, - - Int64_MinValue: System.Int64.MinValue, - Int64_MaxValue: System.Int64.MaxValue, - - UInt64_MinValue: System.UInt64.MinValue, - UInt64_MaxValue: System.UInt64.MaxValue, - - Single_MinValue: -3.40282347e+38, - Single_MaxValue: 3.40282347e+38, - - Double_MinValue: -1.7976931348623157e+308, - Double_MaxValue: 1.7976931348623157e+308, - - Decimal_MinValue: System.Decimal.MinValue, - Decimal_MaxValue: System.Decimal.MaxValue - }, - - base64LineBreakPosition: 76, - - getTypeCodeName: function (typeCode) { - var typeCodes = scope.convert.typeCodes; - - if (scope.internal.typeCodeNames == null) { - var names = {}; - - for (var codeName in typeCodes) { - if (!typeCodes.hasOwnProperty(codeName)) { - continue; - } - - var codeValue = typeCodes[codeName]; - - names[codeValue] = codeName; - } - scope.internal.typeCodeNames = names; - } - - var name = scope.internal.typeCodeNames[typeCode]; - - if (name == null) { - throw System.ArgumentOutOfRangeException("typeCode", "The specified typeCode is undefined."); - } - - return name; - }, - - suggestTypeCode: function (value) { - var typeCodes = scope.convert.typeCodes, - type = typeof (value); - - switch (type) { - case "boolean": - return typeCodes.Boolean; - - case "number": - if (value % 1 !== 0) { - return typeCodes.Double; - } - - return typeCodes.Int32; - - case "string": - return typeCodes.String; - - case "object": - if (H5.isDate(value)) { - return typeCodes.DateTime; - } - - if (value != null) { - return typeCodes.Object; - } - - break; - } - return null; - }, - - getMinValue: function (typeCode) { - var typeCodes = scope.convert.typeCodes; - - switch (typeCode) { - case typeCodes.Char: - return scope.internal.typeRanges.Char_MinValue; - case typeCodes.SByte: - return scope.internal.typeRanges.SByte_MinValue; - case typeCodes.Byte: - return scope.internal.typeRanges.Byte_MinValue; - case typeCodes.Int16: - return scope.internal.typeRanges.Int16_MinValue; - case typeCodes.UInt16: - return scope.internal.typeRanges.UInt16_MinValue; - case typeCodes.Int32: - return scope.internal.typeRanges.Int32_MinValue; - case typeCodes.UInt32: - return scope.internal.typeRanges.UInt32_MinValue; - case typeCodes.Int64: - return scope.internal.typeRanges.Int64_MinValue; - case typeCodes.UInt64: - return scope.internal.typeRanges.UInt64_MinValue; - case typeCodes.Single: - return scope.internal.typeRanges.Single_MinValue; - case typeCodes.Double: - return scope.internal.typeRanges.Double_MinValue; - case typeCodes.Decimal: - return scope.internal.typeRanges.Decimal_MinValue; - case typeCodes.DateTime: - return System.DateTime.getMinValue(); - - default: - return null; - } - }, - - getMaxValue: function (typeCode) { - var typeCodes = scope.convert.typeCodes; - - switch (typeCode) { - case typeCodes.Char: - return scope.internal.typeRanges.Char_MaxValue; - case typeCodes.SByte: - return scope.internal.typeRanges.SByte_MaxValue; - case typeCodes.Byte: - return scope.internal.typeRanges.Byte_MaxValue; - case typeCodes.Int16: - return scope.internal.typeRanges.Int16_MaxValue; - case typeCodes.UInt16: - return scope.internal.typeRanges.UInt16_MaxValue; - case typeCodes.Int32: - return scope.internal.typeRanges.Int32_MaxValue; - case typeCodes.UInt32: - return scope.internal.typeRanges.UInt32_MaxValue; - case typeCodes.Int64: - return scope.internal.typeRanges.Int64_MaxValue; - case typeCodes.UInt64: - return scope.internal.typeRanges.UInt64_MaxValue; - case typeCodes.Single: - return scope.internal.typeRanges.Single_MaxValue; - case typeCodes.Double: - return scope.internal.typeRanges.Double_MaxValue; - case typeCodes.Decimal: - return scope.internal.typeRanges.Decimal_MaxValue; - case typeCodes.DateTime: - return System.DateTime.getMaxValue(); - default: - throw new System.ArgumentOutOfRangeException.$ctor4("typeCode", "The specified typeCode is undefined."); - } - }, - - isFloatingType: function (typeCode) { - var typeCodes = scope.convert.typeCodes, - isFloatingType = - typeCode === typeCodes.Single || - typeCode === typeCodes.Double || - typeCode === typeCodes.Decimal; - - return isFloatingType; - }, - - toNumber: function (value, formatProvider, typeCode, valueTypeCode) { - value = H5.unbox(value, true); - - var typeCodes = scope.convert.typeCodes, - type = typeof (value), - isFloating = scope.internal.isFloatingType(typeCode); - - if (valueTypeCode === typeCodes.String) { - type = "string"; - } - - if (System.Int64.is64Bit(value) || value instanceof System.Decimal) { - type = "number"; - } - - switch (type) { - case "boolean": - return value ? 1 : 0; - - case "number": - if (typeCode === typeCodes.Decimal) { - scope.internal.validateNumberRange(value, typeCode, true); - - return new System.Decimal(value, formatProvider); - } - - if (typeCode === typeCodes.Int64) { - scope.internal.validateNumberRange(value, typeCode, true); - - return new System.Int64(value); - } - - if (typeCode === typeCodes.UInt64) { - scope.internal.validateNumberRange(value, typeCode, true); - - return new System.UInt64(value); - } - - if (System.Int64.is64Bit(value)) { - value = value.toNumber(); - } else if (value instanceof System.Decimal) { - value = value.toFloat(); - } - - if (!isFloating && (value % 1 !== 0)) { - value = scope.internal.roundToInt(value, typeCode); - } - - if (isFloating) { - var minValue = scope.internal.getMinValue(typeCode), - maxValue = scope.internal.getMaxValue(typeCode); - - if (value > maxValue) { - value = Infinity; - } else if (value < minValue) { - value = -Infinity; - } - } - - scope.internal.validateNumberRange(value, typeCode, false); - return value; - - case "string": - if (value == null) { - if (formatProvider != null) { - throw new System.ArgumentNullException.$ctor3("String", "Value cannot be null."); - } - - return 0; - } - - if (isFloating) { - var nfInfo = (formatProvider || System.Globalization.CultureInfo.getCurrentCulture()).getFormat(System.Globalization.NumberFormatInfo), - point = nfInfo.numberDecimalSeparator; - - if (typeCode === typeCodes.Decimal) { - if (!new RegExp("^[+-]?(\\d+|\\d+.|\\d*\\" + point +"\\d+)$").test(value)) { - if (!/^[+-]?[0-9]+$/.test(value)) { - throw new System.FormatException.$ctor1("Input string was not in a correct format."); - } - } - - value = new System.Decimal(value, formatProvider); - } else { - if (!new RegExp("^[-+]?[0-9]*\\" + point +"?[0-9]+([eE][-+]?[0-9]+)?$").test(value)) { - throw new System.FormatException.$ctor1("Input string was not in a correct format."); - } - - value = H5.Int.parseFloat(value, formatProvider); - } - } else { - if (!/^[+-]?[0-9]+$/.test(value)) { - throw new System.FormatException.$ctor1("Input string was not in a correct format."); - } - - var str = value; - - if (typeCode === typeCodes.Int64) { - value = new System.Int64(value); - - if (System.String.trimStartZeros(str) !== value.toString()) { - this.throwOverflow(scope.internal.getTypeCodeName(typeCode)); - } - } else if (typeCode === typeCodes.UInt64) { - value = new System.UInt64(value); - - if (System.String.trimStartZeros(str) !== value.toString()) { - this.throwOverflow(scope.internal.getTypeCodeName(typeCode)); - } - } else { - value = parseInt(value, 10); - } - } - - if (isNaN(value)) { - throw new System.FormatException.$ctor1("Input string was not in a correct format."); - } - - scope.internal.validateNumberRange(value, typeCode, true); - - return value; - - case "object": - if (value == null) { - return 0; - } - - if (H5.isDate(value)) { - scope.internal.throwInvalidCastEx(scope.convert.typeCodes.DateTime, typeCode); - } - - break; - } - - // TODO: #822 When IConvertible is implemented, try it before throwing InvalidCastEx - valueTypeCode = valueTypeCode || scope.internal.suggestTypeCode(value); - scope.internal.throwInvalidCastEx(valueTypeCode, typeCode); - - // try converting using IConvertible - return scope.convert.convertToType(typeCode, value, formatProvider); - }, - - validateNumberRange: function (value, typeCode, denyInfinity) { - var typeCodes = scope.convert.typeCodes, - minValue = scope.internal.getMinValue(typeCode), - maxValue = scope.internal.getMaxValue(typeCode), - typeName = scope.internal.getTypeCodeName(typeCode); - - if (typeCode === typeCodes.Single || - typeCode === typeCodes.Double) { - if (!denyInfinity && (value === Infinity || value === -Infinity)) { - return; - } - } - - if (typeCode === typeCodes.Decimal || typeCode === typeCodes.Int64 || typeCode === typeCodes.UInt64) { - if (typeCode === typeCodes.Decimal) { - if (!System.Int64.is64Bit(value)) { - if (minValue.gt(value) || maxValue.lt(value)) { - this.throwOverflow(typeName); - } - } - - value = new System.Decimal(value); - } else if (typeCode === typeCodes.Int64) { - if (value instanceof System.UInt64) { - if (value.gt(System.Int64.MaxValue)) { - this.throwOverflow(typeName); - } - } else if (value instanceof System.Decimal) { - if ((value.gt(new System.Decimal(maxValue)) || value.lt(new System.Decimal(minValue)))) { - this.throwOverflow(typeName); - } - } else if (!(value instanceof System.Int64)) { - if (minValue.toNumber() > value || maxValue.toNumber() < value) { - this.throwOverflow(typeName); - } - } - - value = new System.Int64(value); - } else if (typeCode === typeCodes.UInt64) { - if (value instanceof System.Int64) { - if (value.isNegative()) { - this.throwOverflow(typeName); - } - } else if (value instanceof System.Decimal) { - if ((value.gt(new System.Decimal(maxValue)) || value.lt(new System.Decimal(minValue)))) { - this.throwOverflow(typeName); - } - } else if (!(value instanceof System.UInt64)) { - if (minValue.toNumber() > value || maxValue.toNumber() < value) { - this.throwOverflow(typeName); - } - } - - value = new System.UInt64(value); - } - } else if (value < minValue || value > maxValue) { - this.throwOverflow(typeName); - } - }, - - throwOverflow: function (typeName) { - throw new System.OverflowException.$ctor1("Value was either too large or too small for '" + typeName + "'."); - }, - - roundToInt: function (value, typeCode) { - if (value % 1 === 0) { - return value; - } - - var intPart; - - if (value >= 0) { - intPart = Math.floor(value); - } else { - intPart = -1 * Math.floor(-value); - } - - var floatPart = value - intPart, - minValue = scope.internal.getMinValue(typeCode), - maxValue = scope.internal.getMaxValue(typeCode); - - if (value >= 0.0) { - if (value < (maxValue + 0.5)) { - if (floatPart > 0.5 || floatPart === 0.5 && (intPart & 1) !== 0) { - ++intPart; - } - - return intPart; - } - } else if (value >= (minValue - 0.5)) { - if (floatPart < -0.5 || floatPart === -0.5 && (intPart & 1) !== 0) { - --intPart; - } - - return intPart; - } - - var typeName = scope.internal.getTypeCodeName(typeCode); - - throw new System.OverflowException.$ctor1("Value was either too large or too small for an '" + typeName + "'."); - }, - - toBase64_CalculateAndValidateOutputLength: function (inputLength, insertLineBreaks) { - var base64LineBreakPosition = scope.internal.base64LineBreakPosition, - outlen = ~~(inputLength / 3) * 4; // the base length - we want integer division here. - - outlen += ((inputLength % 3) !== 0) ? 4 : 0; // at most 4 more chars for the remainder - - if (outlen === 0) { - return 0; - } - - if (insertLineBreaks) { - var newLines = ~~(outlen / base64LineBreakPosition); - - if ((outlen % base64LineBreakPosition) === 0) { - --newLines; - } - - outlen += newLines * 2; // the number of line break chars we'll add, "\r\n" - } - - // If we overflow an int then we cannot allocate enough - // memory to output the value so throw - if (outlen > 2147483647) { - throw new System.OutOfMemoryException(); - } - - return outlen; - }, - - convertToBase64Array: function (outChars, inData, offset, length, insertLineBreaks) { - var base64Table = scope.internal.base64Table, - base64LineBreakPosition = scope.internal.base64LineBreakPosition, - lengthmod3 = length % 3, - calcLength = offset + (length - lengthmod3), - charCount = 0, - j = 0; - - // Convert three bytes at a time to base64 notation. This will consume 4 chars. - var i; - - for (i = offset; i < calcLength; i += 3) { - if (insertLineBreaks) { - if (charCount === base64LineBreakPosition) { - outChars[j++] = "\r"; - outChars[j++] = "\n"; - charCount = 0; - } - - charCount += 4; - } - - outChars[j] = base64Table[(inData[i] & 0xfc) >> 2]; - outChars[j + 1] = base64Table[((inData[i] & 0x03) << 4) | ((inData[i + 1] & 0xf0) >> 4)]; - outChars[j + 2] = base64Table[((inData[i + 1] & 0x0f) << 2) | ((inData[i + 2] & 0xc0) >> 6)]; - outChars[j + 3] = base64Table[(inData[i + 2] & 0x3f)]; - j += 4; - } - - //Where we left off before - i = calcLength; - - if (insertLineBreaks && (lengthmod3 !== 0) && (charCount === scope.internal.base64LineBreakPosition)) { - outChars[j++] = "\r"; - outChars[j++] = "\n"; - } - - switch (lengthmod3) { - case 2: //One character padding needed - outChars[j] = base64Table[(inData[i] & 0xfc) >> 2]; - outChars[j + 1] = base64Table[((inData[i] & 0x03) << 4) | ((inData[i + 1] & 0xf0) >> 4)]; - outChars[j + 2] = base64Table[(inData[i + 1] & 0x0f) << 2]; - outChars[j + 3] = base64Table[64]; //Pad - j += 4; - - break; - - case 1: // Two character padding needed - outChars[j] = base64Table[(inData[i] & 0xfc) >> 2]; - outChars[j + 1] = base64Table[(inData[i] & 0x03) << 4]; - outChars[j + 2] = base64Table[64]; //Pad - outChars[j + 3] = base64Table[64]; //Pad - j += 4; - - break; - } - - return j; - }, - - fromBase64CharPtr: function (input, offset, inputLength) { - if (inputLength < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("inputLength", "Index was out of range. Must be non-negative and less than the size of the collection."); - } - - if (offset < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("offset", "Value must be positive."); - } - - // We need to get rid of any trailing white spaces. - // Otherwise we would be rejecting input such as "abc= ": - while (inputLength > 0) { - var lastChar = input[offset + inputLength - 1]; - - if (lastChar !== " " && lastChar !== "\n" && lastChar !== "\r" && lastChar !== "\t") { - break; - } - - inputLength--; - } - - // Compute the output length: - var resultLength = scope.internal.fromBase64_ComputeResultLength(input, offset, inputLength); - - if (0 > resultLength) { - throw new System.InvalidOperationException.$ctor1("Contract voilation: 0 <= resultLength."); - } - - // resultLength can be zero. We will still enter FromBase64_Decode and process the input. - // It may either simply write no bytes (e.g. input = " ") or throw (e.g. input = "ab"). - - // Create result byte blob: - var decodedBytes = []; - decodedBytes.length = resultLength; - - // Convert Base64 chars into bytes: - scope.internal.fromBase64_Decode(input, offset, inputLength, decodedBytes, 0, resultLength); - - // We are done: - return decodedBytes; - }, - - fromBase64_Decode: function (input, inputIndex, inputLength, dest, destIndex, destLength) { - var startDestIndex = destIndex; - - // You may find this method weird to look at. It’s written for performance, not aesthetics. - // You will find unrolled loops label jumps and bit manipulations. - - var intA = "A".charCodeAt(0), - inta = "a".charCodeAt(0), - int0 = "0".charCodeAt(0), - intEq = "=".charCodeAt(0), - intPlus = "+".charCodeAt(0), - intSlash = "/".charCodeAt(0), - intSpace = " ".charCodeAt(0), - intTab = "\t".charCodeAt(0), - intNLn = "\n".charCodeAt(0), - intCRt = "\r".charCodeAt(0), - intAtoZ = ("Z".charCodeAt(0) - "A".charCodeAt(0)), - int0To9 = ("9".charCodeAt(0) - "0".charCodeAt(0)); - - var endInputIndex = inputIndex + inputLength, - endDestIndex = destIndex + destLength; - - // Current char code/value: - var currCode; - - // This 4-byte integer will contain the 4 codes of the current 4-char group. - // Eeach char codes for 6 bits = 24 bits. - // The remaining byte will be FF, we use it as a marker when 4 chars have been processed. - var currBlockCodes = 0x000000FF; - - var allInputConsumed = false, - equalityCharEncountered = false; - - while (true) { - // break when done: - if (inputIndex >= endInputIndex) { - allInputConsumed = true; - - break; - } - - // Get current char: - currCode = input[inputIndex].charCodeAt(0); - inputIndex++; - - // Determine current char code (unsigned Int comparison): - if (((currCode - intA) >>> 0) <= intAtoZ) { - currCode -= intA; - } else if (((currCode - inta) >>> 0) <= intAtoZ) { - currCode -= (inta - 26); - } else if (((currCode - int0) >>> 0) <= int0To9) { - currCode -= (int0 - 52); - } else { - // Use the slower switch for less common cases: - switch (currCode) { - // Significant chars: - case intPlus: - currCode = 62; - - break; - - case intSlash: - currCode = 63; - - break; - - // Legal no-value chars (we ignore these): - case intCRt: - case intNLn: - case intSpace: - case intTab: - continue; - - // The equality char is only legal at the end of the input. - // Jump after the loop to make it easier for the JIT register predictor to do a good job for the loop itself: - case intEq: - equalityCharEncountered = true; - - break; - - // Other chars are illegal: - default: - throw new System.FormatException.$ctor1("The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."); - } - } - - if (equalityCharEncountered) { - break; - } - - // Ok, we got the code. Save it: - currBlockCodes = (currBlockCodes << 6) | currCode; - - // Last bit in currBlockCodes will be on after in shifted right 4 times: - if ((currBlockCodes & 0x80000000) !== 0) { - if ((endDestIndex - destIndex) < 3) { - return -1; - } - - dest[destIndex] = 0xFF & (currBlockCodes >> 16); - dest[destIndex + 1] = 0xFF & (currBlockCodes >> 8); - dest[destIndex + 2] = 0xFF & (currBlockCodes); - destIndex += 3; - - currBlockCodes = 0x000000FF; - } - } // end of while - - if (!allInputConsumed && !equalityCharEncountered) { - throw new System.InvalidOperationException.$ctor1("Contract violation: should never get here."); - } - - if (equalityCharEncountered) { - if (currCode !== intEq) { - throw new System.InvalidOperationException.$ctor1("Contract violation: currCode == intEq."); - } - - // Recall that inputIndex is now one position past where '=' was read. - // '=' can only be at the last input pos: - if (inputIndex === endInputIndex) { - // Code is zero for trailing '=': - currBlockCodes <<= 6; - - // The '=' did not complete a 4-group. The input must be bad: - if ((currBlockCodes & 0x80000000) === 0) { - throw new System.FormatException.$ctor1("Invalid length for a Base-64 char array or string."); - } - - if ((endDestIndex - destIndex) < 2) { - // Autch! We underestimated the output length! - return -1; - } - - // We are good, store bytes form this past group. We had a single "=", so we take two bytes: - dest[destIndex] = 0xFF & (currBlockCodes >> 16); - dest[destIndex + 1] = 0xFF & (currBlockCodes >> 8); - destIndex += 2; - - currBlockCodes = 0x000000FF; - } else { // '=' can also be at the pre-last position iff the last is also a '=' excluding the white spaces: - // We need to get rid of any intermediate white spaces. - // Otherwise we would be rejecting input such as "abc= =": - while (inputIndex < (endInputIndex - 1)) { - var lastChar = input[inputIndex]; - - if (lastChar !== " " && lastChar !== "\n" && lastChar !== "\r" && lastChar !== "\t") { - break; - } - - inputIndex++; - } - - if (inputIndex === (endInputIndex - 1) && input[inputIndex] === "=") { - // Code is zero for each of the two '=': - currBlockCodes <<= 12; - - // The '=' did not complete a 4-group. The input must be bad: - if ((currBlockCodes & 0x80000000) === 0) { - throw new System.FormatException.$ctor1("Invalid length for a Base-64 char array or string."); - } - - if ((endDestIndex - destIndex) < 1) { - // Autch! We underestimated the output length! - return -1; - } - - // We are good, store bytes form this past group. We had a "==", so we take only one byte: - dest[destIndex] = 0xFF & (currBlockCodes >> 16); - destIndex++; - - currBlockCodes = 0x000000FF; - } else { - // '=' is not ok at places other than the end: - throw new System.FormatException.$ctor1("The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."); - } - } - } - - // We get here either from above or by jumping out of the loop: - // The last block of chars has less than 4 items - if (currBlockCodes !== 0x000000FF) { - throw new System.FormatException.$ctor1("Invalid length for a Base-64 char array or string."); - } - - // Return how many bytes were actually recovered: - return (destIndex - startDestIndex); - }, - - fromBase64_ComputeResultLength: function (input, startIndex, inputLength) { - var intEq = "=", - intSpace = " "; - - if (inputLength < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("inputLength", "Index was out of range. Must be non-negative and less than the size of the collection."); - } - - var endIndex = startIndex + inputLength, - usefulInputLength = inputLength, - padding = 0; - - while (startIndex < endIndex) { - var c = input[startIndex]; - - startIndex++; - - // We want to be as fast as possible and filter out spaces with as few comparisons as possible. - // We end up accepting a number of illegal chars as legal white-space chars. - // This is ok: as soon as we hit them during actual decode we will recognise them as illegal and throw. - if (c <= intSpace) { - usefulInputLength--; - } else if (c === intEq) { - usefulInputLength--; - padding++; - } - } - - if (0 > usefulInputLength) { - throw new System.InvalidOperationException.$ctor1("Contract violation: 0 <= usefulInputLength."); - } - - if (0 > padding) { - // For legal input, we can assume that 0 <= padding < 3. But it may be more for illegal input. - // We will notice it at decode when we see a '=' at the wrong place. - throw new System.InvalidOperationException.$ctor1("Contract violation: 0 <= padding."); - } - - // Perf: reuse the variable that stored the number of '=' to store the number of bytes encoded by the - // last group that contains the '=': - if (padding !== 0) { - if (padding === 1) { - padding = 2; - } else if (padding === 2) { - padding = 1; - } else { - throw new System.FormatException.$ctor1("The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."); - } - } - - // Done: - return ~~(usefulInputLength / 4) * 3 + padding; - }, - - charsToCodes: function (chars, codes, codesOffset) { - if (chars == null) { - return null; - } - - codesOffset = codesOffset || 0; - - if (codes == null) { - codes = []; - codes.length = chars.length; - } - - for (var i = 0; i < chars.length; i++) { - codes[i + codesOffset] = chars[i].charCodeAt(0); - } - - return codes; - }, - - codesToChars: function (codes, chars) { - if (codes == null) { - return null; - } - - chars = chars || []; - - for (var i = 0; i < codes.length; i++) { - var code = codes[i]; - - chars[i] = String.fromCharCode(code); - } - - return chars; - }, - - throwInvalidCastEx: function (fromTypeCode, toTypeCode) { - var fromType = scope.internal.getTypeCodeName(fromTypeCode), toType = scope.internal.getTypeCodeName(toTypeCode); - - throw new System.InvalidCastException.$ctor1("Invalid cast from '" + fromType + "' to '" + toType + "'."); - } - }; - - System.Convert = scope.convert; - - // @source ClientWebSocket.js - - H5.define("System.Net.WebSockets.ClientWebSocket", { - inherits: [System.IDisposable], - - ctor: function () { - this.$initialize(); - this.messageBuffer = []; - this.state = "none"; - this.options = new System.Net.WebSockets.ClientWebSocketOptions(); - this.disposed = false; - this.closeStatus = null; - this.closeStatusDescription = null; - }, - - getCloseStatus: function () { - return this.closeStatus; - }, - - getState: function () { - return this.state; - }, - - getCloseStatusDescription: function () { - return this.closeStatusDescription; - }, - - getSubProtocol: function () { - return this.socket ? this.socket.protocol : null; - }, - - onCloseHandler: function(event) { - var reason, - success = false; - - // See http://tools.ietf.org/html/rfc6455#section-7.4.1 - if (event.code == 1000) { - reason = "Status code: " + event.code + ". Normal closure, meaning that the purpose for which the connection was established has been fulfilled."; - success = true; - } else if (event.code == 1001) - reason = "Status code: " + event.code + ". An endpoint is \"going away\", such as a server going down or a browser having navigated away from a page."; - else if (event.code == 1002) - reason = "Status code: " + event.code + ". An endpoint is terminating the connection due to a protocol error"; - else if (event.code == 1003) - reason = "Status code: " + event.code + ". An endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message)."; - else if (event.code == 1004) - reason = "Status code: " + event.code + ". Reserved. The specific meaning might be defined in the future."; - else if (event.code == 1005) - reason = "Status code: " + event.code + ". No status code was actually present."; - else if (event.code == 1006) - reason = "Status code: " + event.code + ". The connection was closed abnormally, e.g., without sending or receiving a Close control frame"; - else if (event.code == 1007) - reason = "Status code: " + event.code + ". An endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [http://tools.ietf.org/html/rfc3629] data within a text message)."; - else if (event.code == 1008) - reason = "Status code: " + event.code + ". An endpoint is terminating the connection because it has received a message that \"violates its policy\". This reason is given either if there is no other sutible reason, or if there is a need to hide specific details about the policy."; - else if (event.code == 1009) - reason = "Status code: " + event.code + ". An endpoint is terminating the connection because it has received a message that is too big for it to process."; - else if (event.code == 1010) // Note that this status code is not used by the server, because it can fail the WebSocket handshake instead. - reason = "Status code: " + event.code + ". An endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake.
Specifically, the extensions that are needed are: " + event.reason; - else if (event.code == 1011) - reason = "Status code: " + event.code + ". A server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request."; - else if (event.code == 1015) - reason = "Status code: " + event.code + ". The connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."; - else - reason = "Unknown reason"; - - return { - code: event.code, - reason: reason - }; - }, - - connectAsync: function (uri, cancellationToken) { - if (this.state !== "none") { - throw new System.InvalidOperationException.$ctor1("Socket is not in initial state"); - } - - this.options.setToReadOnly(); - this.state = "connecting"; - - var tcs = new System.Threading.Tasks.TaskCompletionSource(), - self = this; - - try { - this.socket = new WebSocket(uri.getAbsoluteUri(), this.options.requestedSubProtocols); - - this.socket.onerror = function (e) { - setTimeout(function () { - if (self.closeInfo && !self.closeInfo.success) { - e.message = self.closeInfo.reason; - } - tcs.setException(System.Exception.create(e)); - }, 10); - }; - - this.socket.binaryType = "arraybuffer"; - this.socket.onopen = function () { - self.state = "open"; - tcs.setResult(null); - }; - - this.socket.onmessage = function (e) { - var data = e.data, - message = {}, - i; - - message.bytes = []; - - if (typeof (data) === "string") { - for (i = 0; i < data.length; ++i) { - message.bytes.push(data.charCodeAt(i)); - } - - message.messageType = "text"; - self.messageBuffer.push(message); - - return; - } - - if (data instanceof ArrayBuffer) { - var dataView = new Uint8Array(data); - - for (i = 0; i < dataView.length; i++) { - message.bytes.push(dataView[i]); - } - - message.messageType = "binary"; - self.messageBuffer.push(message); - - return; - } - - throw new System.ArgumentException.$ctor1("Invalid message type."); - }; - - this.socket.onclose = function (e) { - self.state = "closed"; - self.closeStatus = e.code; - self.closeStatusDescription = e.reason; - self.closeInfo = self.onCloseHandler(e); - } - } catch (e) { - tcs.setException(System.Exception.create(e)); - } - - return tcs.task; - }, - - sendAsync: function (buffer, messageType, endOfMessage, cancellationToken) { - this.throwIfNotConnected(); - - var tcs = new System.Threading.Tasks.TaskCompletionSource(); - - try { - if (messageType === "close") { - this.socket.close(); - } else { - var array = buffer.getArray(), - count = buffer.getCount(), - offset = buffer.getOffset(); - - var data = new Uint8Array(count); - - for (var i = 0; i < count; i++) { - data[i] = array[i + offset]; - } - - if (messageType === "text") { - data = String.fromCharCode.apply(null, data); - } - - this.socket.send(data); - } - - tcs.setResult(null); - } catch (e) { - tcs.setException(System.Exception.create(e)); - } - - return tcs.task; - }, - - receiveAsync: function (buffer, cancellationToken) { - this.throwIfNotConnected(); - - var task, - tcs = new System.Threading.Tasks.TaskCompletionSource(), - self = this, - asyncBody = H5.fn.bind(this, function () { - try { - if (cancellationToken.getIsCancellationRequested()) { - tcs.setException(new System.Threading.Tasks.TaskCanceledException("Receive has been cancelled.", tcs.task)); - - return; - } - - if (self.messageBuffer.length === 0) { - task = System.Threading.Tasks.Task.delay(0); - task.continueWith(asyncBody); - - return; - } - - var message = self.messageBuffer[0], - array = buffer.getArray(), - resultBytes, - endOfMessage; - - if (message.bytes.length <= array.length) { - self.messageBuffer.shift(); - resultBytes = message.bytes; - endOfMessage = true; - } else { - resultBytes = message.bytes.slice(0, array.length); - message.bytes = message.bytes.slice(array.length, message.bytes.length); - endOfMessage = false; - } - - for (var i = 0; i < resultBytes.length; i++) { - array[i] = resultBytes[i]; - } - - tcs.setResult(new System.Net.WebSockets.WebSocketReceiveResult( - resultBytes.length, message.messageType, endOfMessage)); - } catch (e) { - tcs.setException(System.Exception.create(e)); - } - }, arguments); - - asyncBody(); - - return tcs.task; - }, - - closeAsync: function (closeStatus, statusDescription, cancellationToken) { - this.throwIfNotConnected(); - - if (this.state !== "open") { - throw new System.InvalidOperationException.$ctor1("Socket is not in connected state"); - } - - var tcs = new System.Threading.Tasks.TaskCompletionSource(), - self = this, - task, - asyncBody = function () { - if (self.state === "closed") { - tcs.setResult(null); - return; - } - - if (cancellationToken.getIsCancellationRequested()) { - tcs.setException(new System.Threading.Tasks.TaskCanceledException("Closing has been cancelled.", tcs.task)); - return; - } - - task = System.Threading.Tasks.Task.delay(0); - task.continueWith(asyncBody); - }; - try { - this.state = "closesent"; - this.socket.close(closeStatus, statusDescription); - } catch (e) { - tcs.setException(System.Exception.create(e)); - } - - asyncBody(); - - return tcs.task; - }, - - closeOutputAsync: function (closeStatus, statusDescription, cancellationToken) { - this.throwIfNotConnected(); - - if (this.state !== "open") { - throw new System.InvalidOperationException.$ctor1("Socket is not in connected state"); - } - - var tcs = new System.Threading.Tasks.TaskCompletionSource(); - - try { - this.state = "closesent"; - this.socket.close(closeStatus, statusDescription); - tcs.setResult(null); - } catch (e) { - tcs.setException(System.Exception.create(e)); - } - - return tcs.task; - }, - - abort: function () { - this.Dispose(); - }, - - Dispose: function () { - if (this.disposed) { - return; - } - - this.disposed = true; - this.messageBuffer = []; - - if (state === "open") { - this.state = "closesent"; - this.socket.close(); - } - }, - - throwIfNotConnected: function () { - if (this.disposed) { - throw new System.InvalidOperationException.$ctor1("Socket is disposed."); - } - - if (this.socket.readyState !== 1) { - throw new System.InvalidOperationException.$ctor1("Socket is not connected."); - } - } - }); - - H5.define("System.Net.WebSockets.ClientWebSocketOptions", { - ctor: function () { - this.$initialize(); - this.isReadOnly = false; - this.requestedSubProtocols = []; - }, - - setToReadOnly: function () { - if (this.isReadOnly) { - throw new System.InvalidOperationException.$ctor1("Options are already readonly."); - } - - this.isReadOnly = true; - }, - - addSubProtocol: function (subProtocol) { - if (this.isReadOnly) { - throw new System.InvalidOperationException.$ctor1("Socket already started."); - } - - if (this.requestedSubProtocols.indexOf(subProtocol) > -1) { - throw new System.ArgumentException.$ctor1("Socket cannot have duplicate sub-protocols.", "subProtocol"); - } - - this.requestedSubProtocols.push(subProtocol); - } - }); - - H5.define("System.Net.WebSockets.WebSocketReceiveResult", { - ctor: function (count, messageType, endOfMessage, closeStatus, closeStatusDescription) { - this.$initialize(); - this.count = count; - this.messageType = messageType; - this.endOfMessage = endOfMessage; - this.closeStatus = closeStatus; - this.closeStatusDescription = closeStatusDescription; - }, - - getCount: function () { - return this.count; - }, - - getMessageType: function () { - return this.messageType; - }, - - getEndOfMessage: function () { - return this.endOfMessage; - }, - - getCloseStatus: function () { - return this.closeStatus; - }, - - getCloseStatusDescription: function () { - return this.closeStatusDescription; - } - }); - - // @source Uri.js - - H5.assembly("System", {}, function ($asm, globals) { - "use strict"; - - H5.define("System.Uri", { - statics: { - methods: { - equals: function (uri1, uri2) { - if (uri1 == uri2) { - return true; - } - - if (uri1 == null || uri2 == null) { - return false; - } - - return uri2.equals(uri1); - }, - - notEquals: function (uri1, uri2) { - return !System.Uri.equals(uri1, uri2); - } - } - }, - - ctor: function (uriString) { - this.$initialize(); - this.absoluteUri = uriString; - }, - - getAbsoluteUri: function () { - return this.absoluteUri; - }, - - toJSON: function () { - return this.absoluteUri; - }, - - toString: function () { - return this.absoluteUri; - }, - - equals: function (uri) { - if (uri == null || !H5.is(uri, System.Uri)) { - return false; - } - - return this.absoluteUri === uri.absoluteUri; - } - }); - }, true); - - // @source Generator.js - - H5.define("H5.GeneratorEnumerable", { - inherits: [System.Collections.IEnumerable], - - config: { - alias: [ - "GetEnumerator", "System$Collections$IEnumerable$GetEnumerator" - ] - }, - - ctor: function (action) { - this.$initialize(); - this.GetEnumerator = action; - this.System$Collections$IEnumerable$GetEnumerator = action; - } - }); - - H5.define("H5.GeneratorEnumerable$1", function (T) - { - return { - inherits: [System.Collections.Generic.IEnumerable$1(T)], - - config: { - alias: [ - "GetEnumerator", ["System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(T) + "$GetEnumerator", "System$Collections$Generic$IEnumerable$1$GetEnumerator"] - ] - }, - - ctor: function (action) { - this.$initialize(); - this.GetEnumerator = action; - this["System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(T) + "$GetEnumerator"] = action; - this["System$Collections$Generic$IEnumerable$1$GetEnumerator"] = action; - } - }; - }); - - H5.define("H5.GeneratorEnumerator", { - inherits: [System.Collections.IEnumerator], - - current: null, - - config: { - properties: { - Current: { - get: function () { - return this.getCurrent(); - } - } - }, - - alias: [ - "getCurrent", "System$Collections$IEnumerator$getCurrent", - "moveNext", "System$Collections$IEnumerator$moveNext", - "reset", "System$Collections$IEnumerator$reset", - "Current", "System$Collections$IEnumerator$Current" - ] - }, - - ctor: function (action) { - this.$initialize(); - this.moveNext = action; - this.System$Collections$IEnumerator$moveNext = action; - }, - - getCurrent: function () { - return this.current; - }, - - getCurrent$1: function () { - return this.current; - }, - - reset: function () { - throw new System.NotSupportedException(); - } - }); - - H5.define("H5.GeneratorEnumerator$1", function (T) { - return { - inherits: [System.Collections.Generic.IEnumerator$1(T), System.IDisposable], - - current: null, - - config: { - properties: { - Current: { - get: function () { - return this.getCurrent(); - } - }, - - Current$1: { - get: function () { - return this.getCurrent(); - } - } - }, - alias: [ - "getCurrent", ["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$getCurrent$1", "System$Collections$Generic$IEnumerator$1$getCurrent$1"], - "Current", ["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"], - "Current", "System$Collections$IEnumerator$Current", - "Dispose", "System$IDisposable$Dispose", - "moveNext", "System$Collections$IEnumerator$moveNext", - "reset", "System$Collections$IEnumerator$reset" - ] - }, - - ctor: function (action, final) { - this.$initialize(); - this.moveNext = action; - this.System$Collections$IEnumerator$moveNext = action; - this.final = final; - }, - - getCurrent: function () { - return this.current; - }, - - getCurrent$1: function () { - return this.current; - }, - - System$Collections$IEnumerator$getCurrent: function () { - return this.current; - }, - - Dispose: function () { - if (this.final) { - this.final(); - } - }, - - reset: function () { - throw new System.NotSupportedException(); - } - }; - }); - // @source linq.js - -/*-------------------------------------------------------------------------- - * linq.js - LINQ for JavaScript - * ver 3.0.4-Beta5 (Jun. 20th, 2013) - * - * created and maintained by neuecc - * licensed under MIT License - * http://linqjs.codeplex.com/ - *------------------------------------------------------------------------*/ - -(function (root, undefined) { - // ReadOnly Function - var Functions = { - Identity: function (x) { return x; }, - True: function () { return true; }, - Blank: function () { } - }; - - // const Type - var Types = { - Boolean: typeof true, - Number: typeof 0, - String: typeof "", - Object: typeof {}, - Undefined: typeof undefined, - Function: typeof function () { } - }; - - // createLambda cache - var funcCache = { "": Functions.Identity }; - - // private utility methods - var Utils = { - // Create anonymous function from lambda expression string - createLambda: function (expression) { - if (expression == null) return Functions.Identity; - if (typeof expression === Types.String) { - // get from cache - var f = funcCache[expression]; - if (f != null) { - return f; - } - - if (expression.indexOf("=>") === -1) { - var regexp = new RegExp("[$]+", "g"); - - var maxLength = 0; - var match; - while ((match = regexp.exec(expression)) != null) { - var paramNumber = match[0].length; - if (paramNumber > maxLength) { - maxLength = paramNumber; - } - } - - var argArray = []; - for (var i = 1; i <= maxLength; i++) { - var dollar = ""; - for (var j = 0; j < i; j++) { - dollar += "$"; - } - argArray.push(dollar); - } - - var args = Array.prototype.join.call(argArray, ","); - - f = new Function(args, "return " + expression); - funcCache[expression] = f; - return f; - } - else { - var expr = expression.match(/^[(\s]*([^()]*?)[)\s]*=>(.*)/); - f = new Function(expr[1], "return " + expr[2]); - funcCache[expression] = f; - return f; - } - } - return expression; - }, - - isIEnumerable: function (obj) { - if (typeof Enumerator !== Types.Undefined) { - try { - new Enumerator(obj); // check JScript(IE)'s Enumerator - return true; - } - catch (e) { } - } - - return false; - }, - - // IE8's defineProperty is defined but cannot use, therefore check defineProperties - defineProperty: (Object.defineProperties != null) - ? function (target, methodName, value) { - Object.defineProperty(target, methodName, { - enumerable: false, - configurable: true, - writable: true, - value: value - }) - } - : function (target, methodName, value) { - target[methodName] = value; - }, - - compare: function (a, b) { - return (a === b) ? 0 - : (a > b) ? 1 - : -1; - }, - - Dispose: function (obj) { - if (obj != null) obj.Dispose(); - } - }; - - // IEnumerator State - var State = { Before: 0, Running: 1, After: 2 }; - - // "Enumerator" is conflict JScript's "Enumerator" - var IEnumerator = function (initialize, tryGetNext, dispose) { - var yielder = new Yielder(); - var state = State.Before; - - this.getCurrent = yielder.getCurrent; - this.reset = function () { throw new Error("Reset is not supported"); }; - - this.moveNext = function () { - try { - switch (state) { - case State.Before: - state = State.Running; - initialize(); - // fall through - case State.Running: - if (tryGetNext.apply(yielder)) { - return true; - } - else { - this.Dispose(); - return false; - } - case State.After: - return false; - } - } - catch (e) { - this.Dispose(); - throw e; - } - }; - - this.Dispose = function () { - if (state != State.Running) return; - - try { - dispose(); - } - finally { - state = State.After; - } - }; - - this.System$IDisposable$Dispose = this.Dispose; - this.getCurrent$1 = this.getCurrent; - this.System$Collections$IEnumerator$getCurrent = this.getCurrent; - this.System$Collections$IEnumerator$moveNext = this.moveNext; - this.System$Collections$IEnumerator$reset = this.reset; - - Object.defineProperties(this, - { - "Current$1": { - get: this.getCurrent, - enumerable: true - }, - - "Current": { - get: this.getCurrent, - enumerable: true - }, - - "System$Collections$IEnumerator$Current": { - get: this.getCurrent, - enumerable: true - } - }); - }; - - IEnumerator.$$inherits = []; - H5.Class.addExtend(IEnumerator, [System.IDisposable, System.Collections.IEnumerator]); - - // for tryGetNext - var Yielder = function () { - var current = null; - this.getCurrent = function () { return current; }; - this.yieldReturn = function (value) { - current = value; - return true; - }; - this.yieldBreak = function () { - return false; - }; - }; - - // Enumerable constuctor - var Enumerable = function (GetEnumerator) { - this.GetEnumerator = GetEnumerator; - }; - - Enumerable.$$inherits = []; - H5.Class.addExtend(Enumerable, [System.Collections.IEnumerable]); - - // Utility - - Enumerable.Utils = {}; // container - - Enumerable.Utils.createLambda = function (expression) { - return Utils.createLambda(expression); - }; - - Enumerable.Utils.createEnumerable = function (GetEnumerator) { - return new Enumerable(GetEnumerator); - }; - - Enumerable.Utils.createEnumerator = function (initialize, tryGetNext, dispose) { - return new IEnumerator(initialize, tryGetNext, dispose); - }; - - Enumerable.Utils.extendTo = function (type) { - var typeProto = type.prototype; - var enumerableProto; - - if (type === Array) { - enumerableProto = ArrayEnumerable.prototype; - Utils.defineProperty(typeProto, "getSource", function () { - return this; - }); - } - else { - enumerableProto = Enumerable.prototype; - Utils.defineProperty(typeProto, "GetEnumerator", function () { - return Enumerable.from(this).GetEnumerator(); - }); - } - - for (var methodName in enumerableProto) { - var func = enumerableProto[methodName]; - - // already extended - if (typeProto[methodName] == func) continue; - - // already defined(example Array#reverse/join/forEach...) - if (typeProto[methodName] != null) { - methodName = methodName + "ByLinq"; - if (typeProto[methodName] == func) continue; // recheck - } - - if (func instanceof Function) { - Utils.defineProperty(typeProto, methodName, func); - } - } - }; - - // Generator - - Enumerable.choice = function () // variable argument - { - var args = arguments; - - return new Enumerable(function () { - return new IEnumerator( - function () { - args = (args[0] instanceof Array) ? args[0] - : (args[0].GetEnumerator != null) ? args[0].ToArray() - : args; - }, - function () { - return this.yieldReturn(args[Math.floor(Math.random() * args.length)]); - }, - Functions.Blank); - }); - }; - - Enumerable.cycle = function () // variable argument - { - var args = arguments; - - return new Enumerable(function () { - var index = 0; - return new IEnumerator( - function () { - args = (args[0] instanceof Array) ? args[0] - : (args[0].GetEnumerator != null) ? args[0].ToArray() - : args; - }, - function () { - if (index >= args.length) index = 0; - return this.yieldReturn(args[index++]); - }, - Functions.Blank); - }); - }; - - // private singleton - var emptyEnumerable = new Enumerable(function () { - return new IEnumerator( - Functions.Blank, - function () { return false; }, - Functions.Blank); - }); - Enumerable.empty = function () { - return emptyEnumerable; - }; - - Enumerable.from = function (obj, T) { - if (obj == null) { - return null; - } - if (obj instanceof Enumerable) { - return obj; - } - if (typeof obj == Types.Number || typeof obj == Types.Boolean) { - return Enumerable.repeat(obj, 1); - } - if (typeof obj == Types.String) { - return new Enumerable(function () { - var index = 0; - return new IEnumerator( - Functions.Blank, - function () { - return (index < obj.length) ? this.yieldReturn(obj.charCodeAt(index++)) : false; - }, - Functions.Blank); - }); - } - var ienum = H5.as(obj, System.Collections.IEnumerable); - if (ienum) { - return new Enumerable(function () { - var enumerator; - return new IEnumerator( - function () { enumerator = H5.getEnumerator(ienum, T); }, - function () { - var ok = enumerator.moveNext(); - return ok ? this.yieldReturn(enumerator.Current) : false; - }, - function () { - var disposable = H5.as(enumerator, System.IDisposable); - if (disposable) { - disposable.Dispose(); - } - } - ); - }); - } - if (typeof obj != Types.Function) { - // array or array like object - if (typeof obj.length == Types.Number) { - return new ArrayEnumerable(obj); - } - - // JScript's IEnumerable - if (!(obj instanceof Object) && Utils.isIEnumerable(obj)) { - return new Enumerable(function () { - var isFirst = true; - var enumerator; - return new IEnumerator( - function () { enumerator = new Enumerator(obj); }, - function () { - if (isFirst) isFirst = false; - else enumerator.moveNext(); - - return (enumerator.atEnd()) ? false : this.yieldReturn(enumerator.item()); - }, - Functions.Blank); - }); - } - - // WinMD IIterable - if (typeof Windows === Types.Object && typeof obj.first === Types.Function) { - return new Enumerable(function () { - var isFirst = true; - var enumerator; - return new IEnumerator( - function () { enumerator = obj.first(); }, - function () { - if (isFirst) isFirst = false; - else enumerator.moveNext(); - - return (enumerator.hasCurrent) ? this.yieldReturn(enumerator.current) : this.yieldBreak(); - }, - Functions.Blank); - }); - } - } - - // case function/object : Create keyValuePair[] - return new Enumerable(function () { - var array = []; - var index = 0; - - return new IEnumerator( - function () { - for (var key in obj) { - var value = obj[key]; - if (!(value instanceof Function) && Object.prototype.hasOwnProperty.call(obj, key)) { - array.push({ key: key, value: value }); - } - } - }, - function () { - return (index < array.length) - ? this.yieldReturn(array[index++]) - : false; - }, - Functions.Blank); - }); - }, - - Enumerable.make = function (element) { - return Enumerable.repeat(element, 1); - }; - - // Overload:function (input, pattern) - // Overload:function (input, pattern, flags) - Enumerable.matches = function (input, pattern, flags) { - if (flags == null) flags = ""; - if (pattern instanceof RegExp) { - flags += (pattern.ignoreCase) ? "i" : ""; - flags += (pattern.multiline) ? "m" : ""; - pattern = pattern.source; - } - if (flags.indexOf("g") === -1) flags += "g"; - - return new Enumerable(function () { - var regex; - return new IEnumerator( - function () { regex = new RegExp(pattern, flags); }, - function () { - var match = regex.exec(input); - return (match) ? this.yieldReturn(match) : false; - }, - Functions.Blank); - }); - }; - - // Overload:function (start, count) - // Overload:function (start, count, step) - Enumerable.range = function (start, count, step) { - if (step == null) step = 1; - - return new Enumerable(function () { - var value; - var index = 0; - - return new IEnumerator( - function () { value = start - step; }, - function () { - return (index++ < count) - ? this.yieldReturn(value += step) - : this.yieldBreak(); - }, - Functions.Blank); - }); - }; - - // Overload:function (start, count) - // Overload:function (start, count, step) - Enumerable.rangeDown = function (start, count, step) { - if (step == null) step = 1; - - return new Enumerable(function () { - var value; - var index = 0; - - return new IEnumerator( - function () { value = start + step; }, - function () { - return (index++ < count) - ? this.yieldReturn(value -= step) - : this.yieldBreak(); - }, - Functions.Blank); - }); - }; - - // Overload:function (start, to) - // Overload:function (start, to, step) - Enumerable.rangeTo = function (start, to, step) { - if (step == null) step = 1; - - if (start < to) { - return new Enumerable(function () { - var value; - - return new IEnumerator( - function () { value = start - step; }, - function () { - var next = value += step; - return (next <= to) - ? this.yieldReturn(next) - : this.yieldBreak(); - }, - Functions.Blank); - }); - } - else { - return new Enumerable(function () { - var value; - - return new IEnumerator( - function () { value = start + step; }, - function () { - var next = value -= step; - return (next >= to) - ? this.yieldReturn(next) - : this.yieldBreak(); - }, - Functions.Blank); - }); - } - }; - - // Overload:function (element) - // Overload:function (element, count) - Enumerable.repeat = function (element, count) { - if (count != null) return Enumerable.repeat(element).take(count); - - return new Enumerable(function () { - return new IEnumerator( - Functions.Blank, - function () { return this.yieldReturn(element); }, - Functions.Blank); - }); - }; - - Enumerable.repeatWithFinalize = function (initializer, finalizer) { - initializer = Utils.createLambda(initializer); - finalizer = Utils.createLambda(finalizer); - - return new Enumerable(function () { - var element; - return new IEnumerator( - function () { element = initializer(); }, - function () { return this.yieldReturn(element); }, - function () { - if (element != null) { - finalizer(element); - element = null; - } - }); - }); - }; - - // Overload:function (func) - // Overload:function (func, count) - Enumerable.generate = function (func, count) { - if (count != null) return Enumerable.generate(func).take(count); - func = Utils.createLambda(func); - - return new Enumerable(function () { - return new IEnumerator( - Functions.Blank, - function () { return this.yieldReturn(func()); }, - Functions.Blank); - }); - }; - - // Overload:function () - // Overload:function (start) - // Overload:function (start, step) - Enumerable.toInfinity = function (start, step) { - if (start == null) start = 0; - if (step == null) step = 1; - - return new Enumerable(function () { - var value; - return new IEnumerator( - function () { value = start - step; }, - function () { return this.yieldReturn(value += step); }, - Functions.Blank); - }); - }; - - // Overload:function () - // Overload:function (start) - // Overload:function (start, step) - Enumerable.toNegativeInfinity = function (start, step) { - if (start == null) start = 0; - if (step == null) step = 1; - - return new Enumerable(function () { - var value; - return new IEnumerator( - function () { value = start + step; }, - function () { return this.yieldReturn(value -= step); }, - Functions.Blank); - }); - }; - - Enumerable.unfold = function (seed, func) { - func = Utils.createLambda(func); - - return new Enumerable(function () { - var isFirst = true; - var value; - return new IEnumerator( - Functions.Blank, - function () { - if (isFirst) { - isFirst = false; - value = seed; - return this.yieldReturn(value); - } - value = func(value); - return this.yieldReturn(value); - }, - Functions.Blank); - }); - }; - - Enumerable.defer = function (enumerableFactory) { - return new Enumerable(function () { - var enumerator; - - return new IEnumerator( - function () { enumerator = Enumerable.from(enumerableFactory()).GetEnumerator(); }, - function () { - return (enumerator.moveNext()) - ? this.yieldReturn(enumerator.Current) - : this.yieldBreak(); - }, - function () { - Utils.Dispose(enumerator); - }); - }); - }; - - // Extension Methods - - /* Projection and Filtering Methods */ - - // Overload:function (func) - // Overload:function (func, resultSelector) - // Overload:function (func, resultSelector) - Enumerable.prototype.traverseBreadthFirst = function (func, resultSelector) { - var source = this; - func = Utils.createLambda(func); - resultSelector = Utils.createLambda(resultSelector); - - return new Enumerable(function () { - var enumerator; - var nestLevel = 0; - var buffer = []; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - while (true) { - if (enumerator.moveNext()) { - buffer.push(enumerator.Current); - return this.yieldReturn(resultSelector(enumerator.Current, nestLevel)); - } - - var next = Enumerable.from(buffer).selectMany(function (x) { return func(x); }); - if (!next.any()) { - return false; - } - else { - nestLevel++; - buffer = []; - Utils.Dispose(enumerator); - enumerator = next.GetEnumerator(); - } - } - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - // Overload:function (func) - // Overload:function (func, resultSelector) - // Overload:function (func, resultSelector) - Enumerable.prototype.traverseDepthFirst = function (func, resultSelector) { - var source = this; - func = Utils.createLambda(func); - resultSelector = Utils.createLambda(resultSelector); - - return new Enumerable(function () { - var enumeratorStack = []; - var enumerator; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - while (true) { - if (enumerator.moveNext()) { - var value = resultSelector(enumerator.Current, enumeratorStack.length); - enumeratorStack.push(enumerator); - enumerator = Enumerable.from(func(enumerator.Current)).GetEnumerator(); - return this.yieldReturn(value); - } - - if (enumeratorStack.length <= 0) return false; - Utils.Dispose(enumerator); - enumerator = enumeratorStack.pop(); - } - }, - function () { - try { - Utils.Dispose(enumerator); - } - finally { - Enumerable.from(enumeratorStack).forEach(function (s) { s.Dispose(); }); - } - }); - }); - }; - - Enumerable.prototype.flatten = function () { - var source = this; - - return new Enumerable(function () { - var enumerator; - var middleEnumerator = null; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - while (true) { - if (middleEnumerator != null) { - if (middleEnumerator.moveNext()) { - return this.yieldReturn(middleEnumerator.Current); - } - else { - middleEnumerator = null; - } - } - - if (enumerator.moveNext()) { - if (enumerator.Current instanceof Array) { - Utils.Dispose(middleEnumerator); - middleEnumerator = Enumerable.from(enumerator.Current) - .selectMany(Functions.Identity) - .flatten() - .GetEnumerator(); - continue; - } - else { - return this.yieldReturn(enumerator.Current); - } - } - - return false; - } - }, - function () { - try { - Utils.Dispose(enumerator); - } - finally { - Utils.Dispose(middleEnumerator); - } - }); - }); - }; - - Enumerable.prototype.pairwise = function (selector) { - var source = this; - selector = Utils.createLambda(selector); - - return new Enumerable(function () { - var enumerator; - - return new IEnumerator( - function () { - enumerator = source.GetEnumerator(); - enumerator.moveNext(); - }, - function () { - var prev = enumerator.Current; - return (enumerator.moveNext()) - ? this.yieldReturn(selector(prev, enumerator.Current)) - : false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - // Overload:function (func) - // Overload:function (seed,func) - Enumerable.prototype.scan = function (seed, func) { - var isUseSeed; - if (func == null) { - func = Utils.createLambda(seed); // arguments[0] - isUseSeed = false; - } else { - func = Utils.createLambda(func); - isUseSeed = true; - } - var source = this; - - return new Enumerable(function () { - var enumerator; - var value; - var isFirst = true; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - if (isFirst) { - isFirst = false; - if (!isUseSeed) { - if (enumerator.moveNext()) { - return this.yieldReturn(value = enumerator.Current); - } - } - else { - return this.yieldReturn(value = seed); - } - } - - return (enumerator.moveNext()) - ? this.yieldReturn(value = func(value, enumerator.Current)) - : false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - // Overload:function (selector) - // Overload:function (selector) - Enumerable.prototype.select = function (selector) { - selector = Utils.createLambda(selector); - - if (selector.length <= 1) { - return new WhereSelectEnumerable(this, null, selector); - } - else { - var source = this; - - return new Enumerable(function () { - var enumerator; - var index = 0; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - return (enumerator.moveNext()) - ? this.yieldReturn(selector(enumerator.Current, index++)) - : false; - }, - function () { Utils.Dispose(enumerator); }); - }); - } - }; - - // Overload:function (collectionSelector) - // Overload:function (collectionSelector) - // Overload:function (collectionSelector,resultSelector) - // Overload:function (collectionSelector,resultSelector) - Enumerable.prototype.selectMany = function (collectionSelector, resultSelector) { - var source = this; - collectionSelector = Utils.createLambda(collectionSelector); - if (resultSelector == null) resultSelector = function (a, b) { return b; }; - resultSelector = Utils.createLambda(resultSelector); - - return new Enumerable(function () { - var enumerator; - var middleEnumerator = undefined; - var index = 0; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - if (middleEnumerator === undefined) { - if (!enumerator.moveNext()) return false; - } - do { - if (middleEnumerator == null) { - var middleSeq = collectionSelector(enumerator.Current, index++); - middleEnumerator = Enumerable.from(middleSeq).GetEnumerator(); - } - if (middleEnumerator.moveNext()) { - return this.yieldReturn(resultSelector(enumerator.Current, middleEnumerator.Current)); - } - Utils.Dispose(middleEnumerator); - middleEnumerator = null; - } while (enumerator.moveNext()); - return false; - }, - function () { - try { - Utils.Dispose(enumerator); - } - finally { - Utils.Dispose(middleEnumerator); - } - }); - }); - }; - - // Overload:function (predicate) - // Overload:function (predicate) - Enumerable.prototype.where = function (predicate) { - predicate = Utils.createLambda(predicate); - - if (predicate.length <= 1) { - return new WhereEnumerable(this, predicate); - } - else { - var source = this; - - return new Enumerable(function () { - var enumerator; - var index = 0; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - while (enumerator.moveNext()) { - if (predicate(enumerator.Current, index++)) { - return this.yieldReturn(enumerator.Current); - } - } - return false; - }, - function () { Utils.Dispose(enumerator); }); - }); - } - }; - - // Overload:function (selector) - // Overload:function (selector) - Enumerable.prototype.choose = function (selector) { - selector = Utils.createLambda(selector); - var source = this; - - return new Enumerable(function () { - var enumerator; - var index = 0; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - while (enumerator.moveNext()) { - var result = selector(enumerator.Current, index++); - if (result != null) { - return this.yieldReturn(result); - } - } - return this.yieldBreak(); - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - Enumerable.prototype.ofType = function (type) { - var source = this; - - return new Enumerable(function () { - var enumerator; - - return new IEnumerator( - function () { - enumerator = H5.getEnumerator(source); - }, - function () { - while (enumerator.moveNext()) { - var v = H5.as(enumerator.Current, type); - if (H5.hasValue(v)) { - return this.yieldReturn(v); - } - } - return false; - }, - function () { - Utils.Dispose(enumerator); - }); - }); - }; - - // mutiple arguments, last one is selector, others are enumerable - Enumerable.prototype.zip = function () { - var args = arguments; - var selector = Utils.createLambda(arguments[arguments.length - 1]); - - var source = this; - // optimized case:argument is 2 - if (arguments.length == 2) { - var second = arguments[0]; - - if (second == null) { - throw new System.ArgumentNullException(); - } - - return new Enumerable(function () { - var firstEnumerator; - var secondEnumerator; - var index = 0; - - return new IEnumerator( - function () { - firstEnumerator = source.GetEnumerator(); - secondEnumerator = Enumerable.from(second).GetEnumerator(); - }, - function () { - if (firstEnumerator.moveNext() && secondEnumerator.moveNext()) { - return this.yieldReturn(selector(firstEnumerator.Current, secondEnumerator.Current, index++)); - } - return false; - }, - function () { - try { - Utils.Dispose(firstEnumerator); - } finally { - Utils.Dispose(secondEnumerator); - } - }); - }); - } - else { - return new Enumerable(function () { - var enumerators; - var index = 0; - - return new IEnumerator( - function () { - var array = Enumerable.make(source) - .concat(Enumerable.from(args).takeExceptLast().select(Enumerable.from)) - .select(function (x) { return x.GetEnumerator() }) - .ToArray(); - enumerators = Enumerable.from(array); - }, - function () { - if (enumerators.all(function (x) { return x.moveNext() })) { - var array = enumerators - .select(function (x) { return x.Current; }) - .ToArray(); - array.push(index++); - return this.yieldReturn(selector.apply(null, array)); - } - else { - return this.yieldBreak(); - } - }, - function () { - Enumerable.from(enumerators).forEach(Utils.Dispose); - }); - }); - } - }; - - // mutiple arguments - Enumerable.prototype.merge = function () { - var args = arguments; - var source = this; - - return new Enumerable(function () { - var enumerators; - var index = -1; - - return new IEnumerator( - function () { - enumerators = Enumerable.make(source) - .concat(Enumerable.from(args).select(Enumerable.from)) - .select(function (x) { return x.GetEnumerator() }) - .ToArray(); - }, - function () { - while (enumerators.length > 0) { - index = (index >= enumerators.length - 1) ? 0 : index + 1; - var enumerator = enumerators[index]; - - if (enumerator.moveNext()) { - return this.yieldReturn(enumerator.Current); - } - else { - enumerator.Dispose(); - enumerators.splice(index--, 1); - } - } - return this.yieldBreak(); - }, - function () { - Enumerable.from(enumerators).forEach(Utils.Dispose); - }); - }); - }; - - /* Join Methods */ - - // Overload:function (inner, outerKeySelector, innerKeySelector, resultSelector) - // Overload:function (inner, outerKeySelector, innerKeySelector, resultSelector, compareSelector) - Enumerable.prototype.join = function (inner, outerKeySelector, innerKeySelector, resultSelector, comparer) { - outerKeySelector = Utils.createLambda(outerKeySelector); - innerKeySelector = Utils.createLambda(innerKeySelector); - resultSelector = Utils.createLambda(resultSelector); - - if (inner == null) { - throw new System.ArgumentNullException(); - } - - var source = this; - - return new Enumerable(function () { - var outerEnumerator; - var lookup; - var innerElements = null; - var innerCount = 0; - - return new IEnumerator( - function () { - outerEnumerator = source.GetEnumerator(); - lookup = Enumerable.from(inner).toLookup(innerKeySelector, Functions.Identity, comparer); - }, - function () { - while (true) { - if (innerElements != null) { - var innerElement = innerElements[innerCount++]; - if (innerElement !== undefined) { - return this.yieldReturn(resultSelector(outerEnumerator.Current, innerElement)); - } - - innerElement = null; - innerCount = 0; - } - - if (outerEnumerator.moveNext()) { - var key = outerKeySelector(outerEnumerator.Current); - innerElements = lookup.get(key).ToArray(); - } else { - return false; - } - } - }, - function () { Utils.Dispose(outerEnumerator); }); - }); - }; - - // Overload:function (inner, outerKeySelector, innerKeySelector, resultSelector) - // Overload:function (inner, outerKeySelector, innerKeySelector, resultSelector, compareSelector) - Enumerable.prototype.groupJoin = function (inner, outerKeySelector, innerKeySelector, resultSelector, comparer) { - outerKeySelector = Utils.createLambda(outerKeySelector); - innerKeySelector = Utils.createLambda(innerKeySelector); - resultSelector = Utils.createLambda(resultSelector); - var source = this; - - if (inner == null) { - throw new System.ArgumentNullException(); - } - - return new Enumerable(function () { - var enumerator = source.GetEnumerator(); - var lookup = null; - - return new IEnumerator( - function () { - enumerator = source.GetEnumerator(); - lookup = Enumerable.from(inner).toLookup(innerKeySelector, Functions.Identity, comparer); - }, - function () { - if (enumerator.moveNext()) { - var innerElement = lookup.get(outerKeySelector(enumerator.Current)); - return this.yieldReturn(resultSelector(enumerator.Current, innerElement)); - } - return false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - /* Set Methods */ - - Enumerable.prototype.all = function (predicate) { - predicate = Utils.createLambda(predicate); - - var result = true; - this.forEach(function (x) { - if (!predicate(x)) { - result = false; - return false; // break - } - }); - return result; - }; - - // Overload:function () - // Overload:function (predicate) - Enumerable.prototype.any = function (predicate) { - predicate = Utils.createLambda(predicate); - - var enumerator = this.GetEnumerator(); - try { - if (arguments.length == 0) return enumerator.moveNext(); // case:function () - - while (enumerator.moveNext()) // case:function (predicate) - { - if (predicate(enumerator.Current)) return true; - } - return false; - } - finally { - Utils.Dispose(enumerator); - } - }; - - Enumerable.prototype.isEmpty = function () { - return !this.any(); - }; - - // multiple arguments - Enumerable.prototype.concat = function () { - var source = this; - - if (arguments.length == 1) { - var second = arguments[0]; - - if (second == null) { - throw new System.ArgumentNullException(); - } - - return new Enumerable(function () { - var firstEnumerator; - var secondEnumerator; - - return new IEnumerator( - function () { firstEnumerator = source.GetEnumerator(); }, - function () { - if (secondEnumerator == null) { - if (firstEnumerator.moveNext()) return this.yieldReturn(firstEnumerator.Current); - secondEnumerator = Enumerable.from(second).GetEnumerator(); - } - if (secondEnumerator.moveNext()) return this.yieldReturn(secondEnumerator.Current); - return false; - }, - function () { - try { - Utils.Dispose(firstEnumerator); - } - finally { - Utils.Dispose(secondEnumerator); - } - }); - }); - } - else { - var args = arguments; - - return new Enumerable(function () { - var enumerators; - - return new IEnumerator( - function () { - enumerators = Enumerable.make(source) - .concat(Enumerable.from(args).select(Enumerable.from)) - .select(function (x) { return x.GetEnumerator() }) - .ToArray(); - }, - function () { - while (enumerators.length > 0) { - var enumerator = enumerators[0]; - - if (enumerator.moveNext()) { - return this.yieldReturn(enumerator.Current); - } - else { - enumerator.Dispose(); - enumerators.splice(0, 1); - } - } - return this.yieldBreak(); - }, - function () { - Enumerable.from(enumerators).forEach(Utils.Dispose); - }); - }); - } - }; - - Enumerable.prototype.insert = function (index, second) { - var source = this; - - return new Enumerable(function () { - var firstEnumerator; - var secondEnumerator; - var count = 0; - var isEnumerated = false; - - return new IEnumerator( - function () { - firstEnumerator = source.GetEnumerator(); - secondEnumerator = Enumerable.from(second).GetEnumerator(); - }, - function () { - if (count == index && secondEnumerator.moveNext()) { - isEnumerated = true; - return this.yieldReturn(secondEnumerator.Current); - } - if (firstEnumerator.moveNext()) { - count++; - return this.yieldReturn(firstEnumerator.Current); - } - if (!isEnumerated && secondEnumerator.moveNext()) { - return this.yieldReturn(secondEnumerator.Current); - } - return false; - }, - function () { - try { - Utils.Dispose(firstEnumerator); - } - finally { - Utils.Dispose(secondEnumerator); - } - }); - }); - }; - - Enumerable.prototype.alternate = function (alternateValueOrSequence) { - var source = this; - - return new Enumerable(function () { - var buffer; - var enumerator; - var alternateSequence; - var alternateEnumerator; - - return new IEnumerator( - function () { - if (alternateValueOrSequence instanceof Array || alternateValueOrSequence.GetEnumerator != null) { - alternateSequence = Enumerable.from(Enumerable.from(alternateValueOrSequence).ToArray()); // freeze - } - else { - alternateSequence = Enumerable.make(alternateValueOrSequence); - } - enumerator = source.GetEnumerator(); - if (enumerator.moveNext()) buffer = enumerator.Current; - }, - function () { - while (true) { - if (alternateEnumerator != null) { - if (alternateEnumerator.moveNext()) { - return this.yieldReturn(alternateEnumerator.Current); - } - else { - alternateEnumerator = null; - } - } - - if (buffer == null && enumerator.moveNext()) { - buffer = enumerator.Current; // hasNext - alternateEnumerator = alternateSequence.GetEnumerator(); - continue; // GOTO - } - else if (buffer != null) { - var retVal = buffer; - buffer = null; - return this.yieldReturn(retVal); - } - - return this.yieldBreak(); - } - }, - function () { - try { - Utils.Dispose(enumerator); - } - finally { - Utils.Dispose(alternateEnumerator); - } - }); - }); - }; - - // Overload:function (value) - // Overload:function (value, compareSelector) - Enumerable.prototype.contains = function (value, comparer) { - comparer = comparer || System.Collections.Generic.EqualityComparer$1.$default; - var enumerator = this.GetEnumerator(); - try { - while (enumerator.moveNext()) { - if (comparer.equals2(enumerator.Current, value)) return true; - } - return false; - } - finally { - Utils.Dispose(enumerator); - } - }; - - Enumerable.prototype.defaultIfEmpty = function (defaultValue) { - var source = this; - if (defaultValue === undefined) defaultValue = null; - - return new Enumerable(function () { - var enumerator; - var isFirst = true; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - if (enumerator.moveNext()) { - isFirst = false; - return this.yieldReturn(enumerator.Current); - } - else if (isFirst) { - isFirst = false; - return this.yieldReturn(defaultValue); - } - return false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - // Overload:function () - // Overload:function (compareSelector) - Enumerable.prototype.distinct = function (comparer) { - return this.except(Enumerable.empty(), comparer); - }; - - Enumerable.prototype.distinctUntilChanged = function (compareSelector) { - compareSelector = Utils.createLambda(compareSelector); - var source = this; - - return new Enumerable(function () { - var enumerator; - var compareKey; - var initial; - - return new IEnumerator( - function () { - enumerator = source.GetEnumerator(); - }, - function () { - while (enumerator.moveNext()) { - var key = compareSelector(enumerator.Current); - - if (initial) { - initial = false; - compareKey = key; - return this.yieldReturn(enumerator.Current); - } - - if (compareKey === key) { - continue; - } - - compareKey = key; - return this.yieldReturn(enumerator.Current); - } - return this.yieldBreak(); - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - // Overload:function (second) - // Overload:function (second, compareSelector) - Enumerable.prototype.except = function (second, comparer) { - var source = this; - - if (second == null) { - throw new System.ArgumentNullException(); - } - - return new Enumerable(function () { - var enumerator, - keys, - hasNull = false; - - return new IEnumerator( - function () { - enumerator = source.GetEnumerator(); - keys = new (System.Collections.Generic.Dictionary$2(System.Object, System.Object)).$ctor3(comparer); - - Enumerable.from(second).forEach(function (key) { - if (key == null) { - hasNull = true; - } - else if (!keys.containsKey(key)) { - keys.add(key); - } - }); - }, - function () { - while (enumerator.moveNext()) { - var current = enumerator.Current; - if (current == null) { - if (!hasNull) { - hasNull = true; - return this.yieldReturn(current); - } - } - else if (!keys.containsKey(current)) { - keys.add(current); - return this.yieldReturn(current); - } - } - return false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - // Overload:function (second) - // Overload:function (second, compareSelector) - Enumerable.prototype.intersect = function (second, comparer) { - var source = this; - - if (second == null) { - throw new System.ArgumentNullException(); - } - - return new Enumerable(function () { - var enumerator; - var keys; - var outs; - var hasNull = false; - var hasOutsNull = false; - - return new IEnumerator( - function () { - enumerator = source.GetEnumerator(); - - keys = new (System.Collections.Generic.Dictionary$2(System.Object, System.Object)).$ctor3(comparer); - Enumerable.from(second).forEach(function (key) { - if (key == null) { - hasNull = true; - } - else if (!keys.containsKey(key)) { - keys.add(key); - } - }); - outs = new (System.Collections.Generic.Dictionary$2(System.Object, System.Object)).$ctor3(comparer); - }, - function () { - while (enumerator.moveNext()) { - var current = enumerator.Current; - if (current == null) { - if (!hasOutsNull && hasNull) { - hasOutsNull = true; - return this.yieldReturn(current); - } - } else if (!outs.containsKey(current) && keys.containsKey(current)) { - outs.add(current); - return this.yieldReturn(current); - } - } - return false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - // Overload:function (second) - // Overload:function (second, compareSelector) - Enumerable.prototype.sequenceEqual = function (second, comparer) { - comparer = comparer || System.Collections.Generic.EqualityComparer$1.$default; - - if (second == null) { - throw new System.ArgumentNullException(); - } - - var firstEnumerator = this.GetEnumerator(); - try { - var secondEnumerator = Enumerable.from(second).GetEnumerator(); - try { - while (firstEnumerator.moveNext()) { - if (!secondEnumerator.moveNext() - || !comparer.equals2(firstEnumerator.Current, secondEnumerator.Current)) { - return false; - } - } - - if (secondEnumerator.moveNext()) return false; - return true; - } - finally { - Utils.Dispose(secondEnumerator); - } - } - finally { - Utils.Dispose(firstEnumerator); - } - }; - - Enumerable.prototype.union = function (second, comparer) { - var source = this; - - if (second == null) { - throw new System.ArgumentNullException(); - } - - return new Enumerable(function () { - var firstEnumerator; - var secondEnumerator; - var keys; - var hasNull = false; - - return new IEnumerator( - function () { - firstEnumerator = source.GetEnumerator(); - keys = new (System.Collections.Generic.Dictionary$2(System.Object, System.Object)).$ctor3(comparer); - }, - function () { - var current; - if (secondEnumerator === undefined) { - while (firstEnumerator.moveNext()) { - current = firstEnumerator.Current; - if (current == null) { - if (!hasNull) { - hasNull = true; - return this.yieldReturn(current); - } - } - else if (!keys.containsKey(current)) { - keys.add(current); - return this.yieldReturn(current); - } - } - secondEnumerator = Enumerable.from(second).GetEnumerator(); - } - while (secondEnumerator.moveNext()) { - current = secondEnumerator.Current; - if (current == null) { - if (!hasNull) { - hasNull = true; - return this.yieldReturn(current); - } - } - else if (!keys.containsKey(current)) { - keys.add(current); - return this.yieldReturn(current); - } - } - return false; - }, - function () { - try { - Utils.Dispose(firstEnumerator); - } - finally { - Utils.Dispose(secondEnumerator); - } - }); - }); - }; - - /* Ordering Methods */ - - Enumerable.prototype.orderBy = function (keySelector, comparer) { - return new OrderedEnumerable(this, keySelector, comparer, false); - }; - - Enumerable.prototype.orderByDescending = function (keySelector, comparer) { - return new OrderedEnumerable(this, keySelector, comparer, true); - }; - - Enumerable.prototype.reverse = function () { - var source = this; - - return new Enumerable(function () { - var buffer; - var index; - - return new IEnumerator( - function () { - buffer = source.ToArray(); - index = buffer.length; - }, - function () { - return (index > 0) - ? this.yieldReturn(buffer[--index]) - : false; - }, - Functions.Blank); - }); - }; - - Enumerable.prototype.shuffle = function () { - var source = this; - - return new Enumerable(function () { - var buffer; - - return new IEnumerator( - function () { buffer = source.ToArray(); }, - function () { - if (buffer.length > 0) { - var i = Math.floor(Math.random() * buffer.length); - return this.yieldReturn(buffer.splice(i, 1)[0]); - } - return false; - }, - Functions.Blank); - }); - }; - - Enumerable.prototype.weightedSample = function (weightSelector) { - weightSelector = Utils.createLambda(weightSelector); - var source = this; - - return new Enumerable(function () { - var sortedByBound; - var totalWeight = 0; - - return new IEnumerator( - function () { - sortedByBound = source - .choose(function (x) { - var weight = weightSelector(x); - if (weight <= 0) return null; // ignore 0 - - totalWeight += weight; - return { value: x, bound: totalWeight }; - }) - .ToArray(); - }, - function () { - if (sortedByBound.length > 0) { - var draw = Math.floor(Math.random() * totalWeight) + 1; - - var lower = -1; - var upper = sortedByBound.length; - while (upper - lower > 1) { - var index = Math.floor((lower + upper) / 2); - if (sortedByBound[index].bound >= draw) { - upper = index; - } - else { - lower = index; - } - } - - return this.yieldReturn(sortedByBound[upper].value); - } - - return this.yieldBreak(); - }, - Functions.Blank); - }); - }; - - /* Grouping Methods */ - - // Overload:function (keySelector) - // Overload:function (keySelector,elementSelector) - // Overload:function (keySelector,elementSelector,resultSelector) - // Overload:function (keySelector,elementSelector,resultSelector,compareSelector) - Enumerable.prototype.groupBy = function (keySelector, elementSelector, resultSelector, comparer) { - var source = this; - keySelector = Utils.createLambda(keySelector); - elementSelector = Utils.createLambda(elementSelector); - if (resultSelector != null) resultSelector = Utils.createLambda(resultSelector); - - return new Enumerable(function () { - var enumerator; - - return new IEnumerator( - function () { - enumerator = source.toLookup(keySelector, elementSelector, comparer) - .toEnumerable() - .GetEnumerator(); - }, - function () { - while (enumerator.moveNext()) { - return (resultSelector == null) - ? this.yieldReturn(enumerator.Current) - : this.yieldReturn(resultSelector(enumerator.Current.key(), enumerator.Current)); - } - return false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - // Overload:function (keySelector) - // Overload:function (keySelector,elementSelector) - // Overload:function (keySelector,elementSelector,resultSelector) - // Overload:function (keySelector,elementSelector,resultSelector,compareSelector) - Enumerable.prototype.partitionBy = function (keySelector, elementSelector, resultSelector, comparer) { - var source = this; - keySelector = Utils.createLambda(keySelector); - elementSelector = Utils.createLambda(elementSelector); - comparer = comparer || System.Collections.Generic.EqualityComparer$1.$default; - var hasResultSelector; - if (resultSelector == null) { - hasResultSelector = false; - resultSelector = function (key, group) { return new Grouping(key, group); }; - } - else { - hasResultSelector = true; - resultSelector = Utils.createLambda(resultSelector); - } - - return new Enumerable(function () { - var enumerator; - var key; - var group = []; - - return new IEnumerator( - function () { - enumerator = source.GetEnumerator(); - if (enumerator.moveNext()) { - key = keySelector(enumerator.Current); - group.push(elementSelector(enumerator.Current)); - } - }, - function () { - var hasNext; - while ((hasNext = enumerator.moveNext()) == true) { - if (comparer.equals2(key, keySelector(enumerator.Current))) { - group.push(elementSelector(enumerator.Current)); - } - else break; - } - - if (group.length > 0) { - var result = (hasResultSelector) - ? resultSelector(key, Enumerable.from(group)) - : resultSelector(key, group); - if (hasNext) { - key = keySelector(enumerator.Current); - group = [elementSelector(enumerator.Current)]; - } - else group = []; - - return this.yieldReturn(result); - } - - return false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - Enumerable.prototype.buffer = function (count) { - var source = this; - - return new Enumerable(function () { - var enumerator; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - var array = []; - var index = 0; - while (enumerator.moveNext()) { - array.push(enumerator.Current); - if (++index >= count) return this.yieldReturn(array); - } - if (array.length > 0) return this.yieldReturn(array); - return false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - /* Aggregate Methods */ - - // Overload:function (func) - // Overload:function (seed,func) - // Overload:function (seed,func,resultSelector) - Enumerable.prototype.aggregate = function (seed, func, resultSelector) { - resultSelector = Utils.createLambda(resultSelector); - return resultSelector(this.scan(seed, func, resultSelector).last()); - }; - - // Overload:function () - // Overload:function (selector) - Enumerable.prototype.average = function (selector, def) { - if (selector && !def && !H5.isFunction(selector)) { - def = selector; - selector = null; - } - - selector = Utils.createLambda(selector); - - var sum = def || 0; - var count = 0; - this.forEach(function (x) { - x = selector(x); - - if (x instanceof System.Decimal || System.Int64.is64Bit(x)) { - sum = x.add(sum); - } - else if (sum instanceof System.Decimal || System.Int64.is64Bit(sum)) { - sum = sum.add(x); - } else { - sum += x; - } - - ++count; - }); - - if (count === 0) { - throw new System.InvalidOperationException.$ctor1("Sequence contains no elements"); - } - - return (sum instanceof System.Decimal || System.Int64.is64Bit(sum)) ? sum.div(count) : (sum / count); - }; - - Enumerable.prototype.nullableAverage = function (selector, def) { - if (this.any(H5.isNull)) { - return null; - } - - return this.average(selector, def); - }; - - // Overload:function () - // Overload:function (predicate) - Enumerable.prototype.count = function (predicate) { - predicate = (predicate == null) ? Functions.True : Utils.createLambda(predicate); - - var count = 0; - this.forEach(function (x, i) { - if (predicate(x, i))++count; - }); - return count; - }; - - // Overload:function () - // Overload:function (selector) - Enumerable.prototype.max = function (selector) { - if (selector == null) selector = Functions.Identity; - return this.select(selector).aggregate(function (a, b) { - return (H5.compare(a, b, true) === 1) ? a : b; - }); - }; - - Enumerable.prototype.nullableMax = function (selector) { - if (this.any(H5.isNull)) { - return null; - } - - return this.max(selector); - }; - - // Overload:function () - // Overload:function (selector) - Enumerable.prototype.min = function (selector) { - if (selector == null) selector = Functions.Identity; - return this.select(selector).aggregate(function (a, b) { - return (H5.compare(a, b, true) === -1) ? a : b; - }); - }; - - Enumerable.prototype.nullableMin = function (selector) { - if (this.any(H5.isNull)) { - return null; - } - - return this.min(selector); - }; - - Enumerable.prototype.maxBy = function (keySelector) { - keySelector = Utils.createLambda(keySelector); - return this.aggregate(function (a, b) { - return (H5.compare(keySelector(a), keySelector(b), true) === 1) ? a : b; - }); - }; - - Enumerable.prototype.minBy = function (keySelector) { - keySelector = Utils.createLambda(keySelector); - return this.aggregate(function (a, b) { - return (H5.compare(keySelector(a), keySelector(b), true) === -1) ? a : b; - }); - }; - - // Overload:function () - // Overload:function (selector) - Enumerable.prototype.sum = function (selector, def) { - if (selector && !def && !H5.isFunction(selector)) { - def = selector; - selector = null; - } - - if (selector == null) selector = Functions.Identity; - var s = this.select(selector).aggregate(0, function (a, b) { - if (a instanceof System.Decimal || System.Int64.is64Bit(a)) { - return a.add(b); - } - if (b instanceof System.Decimal || System.Int64.is64Bit(b)) { - return b.add(a); - } - return a + b; - }); - - if (s === 0 && def) { - return def; - } - - return s; - }; - - Enumerable.prototype.nullableSum = function (selector, def) { - if (this.any(H5.isNull)) { - return null; - } - - return this.sum(selector, def); - }; - - /* Paging Methods */ - - Enumerable.prototype.elementAt = function (index) { - var value; - var found = false; - this.forEach(function (x, i) { - if (i == index) { - value = x; - found = true; - return false; - } - }); - - if (!found) throw new Error("index is less than 0 or greater than or equal to the number of elements in source."); - return value; - }; - - Enumerable.prototype.elementAtOrDefault = function (index, defaultValue) { - if (defaultValue === undefined) defaultValue = null; - var value; - var found = false; - this.forEach(function (x, i) { - if (i == index) { - value = x; - found = true; - return false; - } - }); - - return (!found) ? defaultValue : value; - }; - - // Overload:function () - // Overload:function (predicate) - Enumerable.prototype.first = function (predicate) { - if (predicate != null) return this.where(predicate).first(); - - var value; - var found = false; - this.forEach(function (x) { - value = x; - found = true; - return false; - }); - - if (!found) throw new Error("first:No element satisfies the condition."); - return value; - }; - - Enumerable.prototype.firstOrDefault = function (predicate, defaultValue) { - if (defaultValue === undefined) defaultValue = null; - if (predicate != null) return this.where(predicate).firstOrDefault(null, defaultValue); - - var value; - var found = false; - this.forEach(function (x) { - value = x; - found = true; - return false; - }); - return (!found) ? defaultValue : value; - }; - - // Overload:function () - // Overload:function (predicate) - Enumerable.prototype.last = function (predicate) { - if (predicate != null) return this.where(predicate).last(); - - var value; - var found = false; - this.forEach(function (x) { - found = true; - value = x; - }); - - if (!found) throw new Error("last:No element satisfies the condition."); - return value; - }; - - // Overload:function (defaultValue) - // Overload:function (defaultValue,predicate) - Enumerable.prototype.lastOrDefault = function (predicate, defaultValue) { - if (defaultValue === undefined) defaultValue = null; - if (predicate != null) return this.where(predicate).lastOrDefault(null, defaultValue); - - var value; - var found = false; - this.forEach(function (x) { - found = true; - value = x; - }); - return (!found) ? defaultValue : value; - }; - - // Overload:function () - // Overload:function (predicate) - Enumerable.prototype.single = function (predicate) { - if (predicate != null) return this.where(predicate).single(); - - var value; - var found = false; - this.forEach(function (x) { - if (!found) { - found = true; - value = x; - } else throw new Error("single:sequence contains more than one element."); - }); - - if (!found) throw new Error("single:No element satisfies the condition."); - return value; - }; - - // Overload:function (defaultValue) - // Overload:function (defaultValue,predicate) - Enumerable.prototype.singleOrDefault = function (predicate, defaultValue) { - if (defaultValue === undefined) defaultValue = null; - if (predicate != null) return this.where(predicate).singleOrDefault(null, defaultValue); - - var value; - var found = false; - this.forEach(function (x) { - if (!found) { - found = true; - value = x; - } else throw new Error("single:sequence contains more than one element."); - }); - - return (!found) ? defaultValue : value; - }; - - Enumerable.prototype.skip = function (count) { - var source = this; - - return new Enumerable(function () { - var enumerator; - var index = 0; - - return new IEnumerator( - function () { - enumerator = source.GetEnumerator(); - while (index++ < count && enumerator.moveNext()) { - } - ; - }, - function () { - return (enumerator.moveNext()) - ? this.yieldReturn(enumerator.Current) - : false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - // Overload:function (predicate) - // Overload:function (predicate) - Enumerable.prototype.skipWhile = function (predicate) { - predicate = Utils.createLambda(predicate); - var source = this; - - return new Enumerable(function () { - var enumerator; - var index = 0; - var isSkipEnd = false; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - while (!isSkipEnd) { - if (enumerator.moveNext()) { - if (!predicate(enumerator.Current, index++)) { - isSkipEnd = true; - return this.yieldReturn(enumerator.Current); - } - continue; - } else return false; - } - - return (enumerator.moveNext()) - ? this.yieldReturn(enumerator.Current) - : false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - Enumerable.prototype.take = function (count) { - var source = this; - - return new Enumerable(function () { - var enumerator; - var index = 0; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - return (index++ < count && enumerator.moveNext()) - ? this.yieldReturn(enumerator.Current) - : false; - }, - function () { Utils.Dispose(enumerator); } - ); - }); - }; - - // Overload:function (predicate) - // Overload:function (predicate) - Enumerable.prototype.takeWhile = function (predicate) { - predicate = Utils.createLambda(predicate); - var source = this; - - return new Enumerable(function () { - var enumerator; - var index = 0; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - return (enumerator.moveNext() && predicate(enumerator.Current, index++)) - ? this.yieldReturn(enumerator.Current) - : false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - // Overload:function () - // Overload:function (count) - Enumerable.prototype.takeExceptLast = function (count) { - if (count == null) count = 1; - var source = this; - - return new Enumerable(function () { - if (count <= 0) return source.GetEnumerator(); // do nothing - - var enumerator; - var q = []; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - while (enumerator.moveNext()) { - if (q.length == count) { - q.push(enumerator.Current); - return this.yieldReturn(q.shift()); - } - q.push(enumerator.Current); - } - return false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - Enumerable.prototype.takeFromLast = function (count) { - if (count <= 0 || count == null) return Enumerable.empty(); - var source = this; - - return new Enumerable(function () { - var sourceEnumerator; - var enumerator; - var q = []; - - return new IEnumerator( - function () { sourceEnumerator = source.GetEnumerator(); }, - function () { - if (enumerator == null) { - while (sourceEnumerator.moveNext()) { - if (q.length == count) q.shift(); - q.push(sourceEnumerator.Current); - } - enumerator = Enumerable.from(q).GetEnumerator(); - } - return (enumerator.moveNext()) - ? this.yieldReturn(enumerator.Current) - : false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - // Overload:function (item) - // Overload:function (predicate) - Enumerable.prototype.indexOf = function (item, comparer) { - var found = null; - - // item as predicate - if (typeof (item) === Types.Function) { - this.forEach(function (x, i) { - if (item(x, i)) { - found = i; - return false; - } - }); - } - else { - comparer = comparer || System.Collections.Generic.EqualityComparer$1.$default; - this.forEach(function (x, i) { - if (comparer.equals2(x, item)) { - found = i; - return false; - } - }); - } - - return (found !== null) ? found : -1; - }; - - // Overload:function (item) - // Overload:function (predicate) - Enumerable.prototype.lastIndexOf = function (item, comparer) { - var result = -1; - - // item as predicate - if (typeof (item) === Types.Function) { - this.forEach(function (x, i) { - if (item(x, i)) result = i; - }); - } - else { - comparer = comparer || System.Collections.Generic.EqualityComparer$1.$default; - this.forEach(function (x, i) { - if (comparer.equals2(x, item)) result = i; - }); - } - - return result; - }; - - /* Convert Methods */ - - Enumerable.prototype.asEnumerable = function () { - return Enumerable.from(this); - }; - - Enumerable.prototype.ToArray = function (T) { - var array = System.Array.init([], T || System.Object); - this.forEach(function (x) { array.push(x); }); - return array; - }; - - Enumerable.prototype.toList = function (T) { - var array = []; - this.forEach(function (x) { array.push(x); }); - return new (System.Collections.Generic.List$1(T || System.Object).$ctor1)(array); - }; - - // Overload:function (keySelector) - // Overload:function (keySelector, elementSelector) - // Overload:function (keySelector, elementSelector, compareSelector) - Enumerable.prototype.toLookup = function (keySelector, elementSelector, comparer) { - keySelector = Utils.createLambda(keySelector); - elementSelector = Utils.createLambda(elementSelector); - - var dict = new (System.Collections.Generic.Dictionary$2(System.Object, System.Object)).$ctor3(comparer); - var order = []; - var nullKey; - this.forEach(function (x) { - var key = keySelector(x); - var element = elementSelector(x); - - var array = { v: null }; - - if (key == null) { - if (!nullKey) { - nullKey = []; - order.push(key); - } - nullKey.push(element); - } - else if (dict.tryGetValue(key, array)) { - array.v.push(element); - } - else { - order.push(key); - dict.add(key, [element]); - } - }); - return new Lookup(dict, order, nullKey); - }; - - Enumerable.prototype.toObject = function (keySelector, elementSelector) { - keySelector = Utils.createLambda(keySelector); - elementSelector = Utils.createLambda(elementSelector); - - var obj = {}; - this.forEach(function (x) { - obj[keySelector(x)] = elementSelector(x); - }); - return obj; - }; - - // Overload:function (keySelector, elementSelector) - // Overload:function (keySelector, elementSelector, compareSelector) - Enumerable.prototype.toDictionary = function (keySelector, elementSelector, keyType, valueType, comparer) { - keySelector = Utils.createLambda(keySelector); - elementSelector = Utils.createLambda(elementSelector); - - var dict = new (System.Collections.Generic.Dictionary$2(keyType, valueType)).$ctor3(comparer); - this.forEach(function (x) { - dict.add(keySelector(x), elementSelector(x)); - }); - return dict; - }; - - // Overload:function () - // Overload:function (replacer) - // Overload:function (replacer, space) - Enumerable.prototype.toJSONString = function (replacer, space) { - if (typeof JSON === Types.Undefined || JSON.stringify == null) { - throw new Error("toJSONString can't find JSON.stringify. This works native JSON support Browser or include json2.js"); - } - return JSON.stringify(this.ToArray(), replacer, space); - }; - - // Overload:function () - // Overload:function (separator) - // Overload:function (separator,selector) - Enumerable.prototype.toJoinedString = function (separator, selector) { - if (separator == null) separator = ""; - if (selector == null) selector = Functions.Identity; - - return this.select(selector).ToArray().join(separator); - }; - - /* Action Methods */ - - // Overload:function (action) - // Overload:function (action) - Enumerable.prototype.doAction = function (action) { - var source = this; - action = Utils.createLambda(action); - - return new Enumerable(function () { - var enumerator; - var index = 0; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - if (enumerator.moveNext()) { - action(enumerator.Current, index++); - return this.yieldReturn(enumerator.Current); - } - return false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - // Overload:function (action) - // Overload:function (action) - // Overload:function (func) - // Overload:function (func) - Enumerable.prototype.forEach = function (action) { - action = Utils.createLambda(action); - - var index = 0; - var enumerator = this.GetEnumerator(); - try { - while (enumerator.moveNext()) { - if (action(enumerator.Current, index++) === false) break; - } - } finally { - Utils.Dispose(enumerator); - } - }; - - // Overload:function () - // Overload:function (separator) - // Overload:function (separator,selector) - Enumerable.prototype.write = function (separator, selector) { - if (separator == null) separator = ""; - selector = Utils.createLambda(selector); - - var isFirst = true; - this.forEach(function (item) { - if (isFirst) isFirst = false; - else document.write(separator); - document.write(selector(item)); - }); - }; - - // Overload:function () - // Overload:function (selector) - Enumerable.prototype.writeLine = function (selector) { - selector = Utils.createLambda(selector); - - this.forEach(function (item) { - document.writeln(selector(item) + "
"); - }); - }; - - Enumerable.prototype.force = function () { - var enumerator = this.GetEnumerator(); - - try { - while (enumerator.moveNext()) { - } - } - finally { - Utils.Dispose(enumerator); - } - }; - - /* Functional Methods */ - - Enumerable.prototype.letBind = function (func) { - func = Utils.createLambda(func); - var source = this; - - return new Enumerable(function () { - var enumerator; - - return new IEnumerator( - function () { - enumerator = Enumerable.from(func(source)).GetEnumerator(); - }, - function () { - return (enumerator.moveNext()) - ? this.yieldReturn(enumerator.Current) - : false; - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - Enumerable.prototype.share = function () { - var source = this; - var sharedEnumerator; - var disposed = false; - - return new DisposableEnumerable(function () { - return new IEnumerator( - function () { - if (sharedEnumerator == null) { - sharedEnumerator = source.GetEnumerator(); - } - }, - function () { - if (disposed) throw new Error("enumerator is disposed"); - - return (sharedEnumerator.moveNext()) - ? this.yieldReturn(sharedEnumerator.Current) - : false; - }, - Functions.Blank - ); - }, function () { - disposed = true; - Utils.Dispose(sharedEnumerator); - }); - }; - - Enumerable.prototype.memoize = function () { - var source = this; - var cache; - var enumerator; - var disposed = false; - - return new DisposableEnumerable(function () { - var index = -1; - - return new IEnumerator( - function () { - if (enumerator == null) { - enumerator = source.GetEnumerator(); - cache = []; - } - }, - function () { - if (disposed) throw new Error("enumerator is disposed"); - - index++; - if (cache.length <= index) { - return (enumerator.moveNext()) - ? this.yieldReturn(cache[index] = enumerator.Current) - : false; - } - - return this.yieldReturn(cache[index]); - }, - Functions.Blank - ); - }, function () { - disposed = true; - Utils.Dispose(enumerator); - cache = null; - }); - }; - - /* Error Handling Methods */ - - Enumerable.prototype.catchError = function (handler) { - handler = Utils.createLambda(handler); - var source = this; - - return new Enumerable(function () { - var enumerator; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - try { - return (enumerator.moveNext()) - ? this.yieldReturn(enumerator.Current) - : false; - } catch (e) { - handler(e); - return false; - } - }, - function () { Utils.Dispose(enumerator); }); - }); - }; - - Enumerable.prototype.finallyAction = function (finallyAction) { - finallyAction = Utils.createLambda(finallyAction); - var source = this; - - return new Enumerable(function () { - var enumerator; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - return (enumerator.moveNext()) - ? this.yieldReturn(enumerator.Current) - : false; - }, - function () { - try { - Utils.Dispose(enumerator); - } finally { - finallyAction(); - } - }); - }); - }; - - /* For Debug Methods */ - - // Overload:function () - // Overload:function (selector) - Enumerable.prototype.log = function (selector) { - selector = Utils.createLambda(selector); - - return this.doAction(function (item) { - if (typeof console !== Types.Undefined) { - console.log(selector(item)); - } - }); - }; - - // Overload:function () - // Overload:function (message) - // Overload:function (message,selector) - Enumerable.prototype.trace = function (message, selector) { - if (message == null) message = "Trace"; - selector = Utils.createLambda(selector); - - return this.doAction(function (item) { - if (typeof console !== Types.Undefined) { - console.log(message, selector(item)); - } - }); - }; - - // private - var defaultComparer = { - compare: function (x, y) { - if (!H5.hasValue(x)) { - return !H5.hasValue(y) ? 0 : -1; - } else if (!H5.hasValue(y)) { - return 1; - } - - if (typeof x == "string" && typeof y == "string") { - var result = System.String.compare(x, y, true); - - if (result !== 0) { - return result; - } - } - - return H5.compare(x, y); - } - }; - var OrderedEnumerable = function (source, keySelector, comparer, descending, parent) { - this.source = source; - this.keySelector = Utils.createLambda(keySelector); - this.comparer = comparer || defaultComparer; - this.descending = descending; - this.parent = parent; - }; - OrderedEnumerable.prototype = new Enumerable(); - OrderedEnumerable.prototype.constructor = OrderedEnumerable; - H5.definei("System.Linq.IOrderedEnumerable$1"); - OrderedEnumerable.$$inherits = []; - H5.Class.addExtend(OrderedEnumerable, [System.Collections.IEnumerable, System.Linq.IOrderedEnumerable$1]); - - OrderedEnumerable.prototype.createOrderedEnumerable = function (keySelector, comparer, descending) { - return new OrderedEnumerable(this.source, keySelector, comparer, descending, this); - }; - - OrderedEnumerable.prototype.thenBy = function (keySelector, comparer) { - return this.createOrderedEnumerable(keySelector, comparer, false); - }; - - OrderedEnumerable.prototype.thenByDescending = function (keySelector, comparer) { - return this.createOrderedEnumerable(keySelector, comparer, true); - }; - - OrderedEnumerable.prototype.GetEnumerator = function () { - var self = this; - var buffer; - var indexes; - var index = 0; - - return new IEnumerator( - function () { - buffer = []; - indexes = []; - self.source.forEach(function (item, index) { - buffer.push(item); - indexes.push(index); - }); - var sortContext = SortContext.create(self, null); - sortContext.GenerateKeys(buffer); - - indexes.sort(function (a, b) { return sortContext.compare(a, b); }); - }, - function () { - return (index < indexes.length) - ? this.yieldReturn(buffer[indexes[index++]]) - : false; - }, - Functions.Blank - ); - }; - - var SortContext = function (keySelector, comparer, descending, child) { - this.keySelector = keySelector; - this.comparer = comparer; - this.descending = descending; - this.child = child; - this.keys = null; - }; - - SortContext.create = function (orderedEnumerable, currentContext) { - var context = new SortContext(orderedEnumerable.keySelector, orderedEnumerable.comparer, orderedEnumerable.descending, currentContext); - if (orderedEnumerable.parent != null) return SortContext.create(orderedEnumerable.parent, context); - return context; - }; - - SortContext.prototype.GenerateKeys = function (source) { - var len = source.length; - var keySelector = this.keySelector; - var keys = new Array(len); - for (var i = 0; i < len; i++) keys[i] = keySelector(source[i]); - this.keys = keys; - - if (this.child != null) this.child.GenerateKeys(source); - }; - - SortContext.prototype.compare = function (index1, index2) { - var comparison = this.comparer.compare(this.keys[index1], this.keys[index2]); - - if (comparison == 0) { - if (this.child != null) return this.child.compare(index1, index2); - return Utils.compare(index1, index2); - } - - return (this.descending) ? -comparison : comparison; - }; - - var DisposableEnumerable = function (GetEnumerator, dispose) { - this.Dispose = dispose; - Enumerable.call(this, GetEnumerator); - }; - DisposableEnumerable.prototype = new Enumerable(); - - // optimize array or arraylike object - - var ArrayEnumerable = function (source) { - this.getSource = function () { return source; }; - }; - ArrayEnumerable.prototype = new Enumerable(); - - ArrayEnumerable.prototype.any = function (predicate) { - return (predicate == null) - ? (this.getSource().length > 0) - : Enumerable.prototype.any.apply(this, arguments); - }; - - ArrayEnumerable.prototype.count = function (predicate) { - return (predicate == null) - ? this.getSource().length - : Enumerable.prototype.count.apply(this, arguments); - }; - - ArrayEnumerable.prototype.elementAt = function (index) { - var source = this.getSource(); - return (0 <= index && index < source.length) - ? source[index] - : Enumerable.prototype.elementAt.apply(this, arguments); - }; - - ArrayEnumerable.prototype.elementAtOrDefault = function (index, defaultValue) { - if (defaultValue === undefined) defaultValue = null; - var source = this.getSource(); - return (0 <= index && index < source.length) - ? source[index] - : defaultValue; - }; - - ArrayEnumerable.prototype.first = function (predicate) { - var source = this.getSource(); - return (predicate == null && source.length > 0) - ? source[0] - : Enumerable.prototype.first.apply(this, arguments); - }; - - ArrayEnumerable.prototype.firstOrDefault = function (predicate, defaultValue) { - if (defaultValue === undefined) defaultValue = null; - if (predicate != null) { - return Enumerable.prototype.firstOrDefault.apply(this, arguments); - } - - var source = this.getSource(); - return source.length > 0 ? source[0] : defaultValue; - }; - - ArrayEnumerable.prototype.last = function (predicate) { - var source = this.getSource(); - return (predicate == null && source.length > 0) - ? source[source.length - 1] - : Enumerable.prototype.last.apply(this, arguments); - }; - - ArrayEnumerable.prototype.lastOrDefault = function (predicate, defaultValue) { - if (defaultValue === undefined) defaultValue = null; - if (predicate != null) { - return Enumerable.prototype.lastOrDefault.apply(this, arguments); - } - - var source = this.getSource(); - return source.length > 0 ? source[source.length - 1] : defaultValue; - }; - - ArrayEnumerable.prototype.skip = function (count) { - var source = this.getSource(); - - return new Enumerable(function () { - var index; - - return new IEnumerator( - function () { index = (count < 0) ? 0 : count; }, - function () { - return (index < source.length) - ? this.yieldReturn(source[index++]) - : false; - }, - Functions.Blank); - }); - }; - - ArrayEnumerable.prototype.takeExceptLast = function (count) { - if (count == null) count = 1; - return this.take(this.getSource().length - count); - }; - - ArrayEnumerable.prototype.takeFromLast = function (count) { - return this.skip(this.getSource().length - count); - }; - - ArrayEnumerable.prototype.reverse = function () { - var source = this.getSource(); - - return new Enumerable(function () { - var index; - - return new IEnumerator( - function () { - index = source.length; - }, - function () { - return (index > 0) - ? this.yieldReturn(source[--index]) - : false; - }, - Functions.Blank); - }); - }; - - ArrayEnumerable.prototype.sequenceEqual = function (second, comparer) { - if ((second instanceof ArrayEnumerable || second instanceof Array) - && comparer == null - && Enumerable.from(second).count() != this.count()) { - return false; - } - - return Enumerable.prototype.sequenceEqual.apply(this, arguments); - }; - - ArrayEnumerable.prototype.toJoinedString = function (separator, selector) { - var source = this.getSource(); - if (selector != null || !(source instanceof Array)) { - return Enumerable.prototype.toJoinedString.apply(this, arguments); - } - - if (separator == null) separator = ""; - return source.join(separator); - }; - - ArrayEnumerable.prototype.GetEnumerator = function () { - return new H5.ArrayEnumerator(this.getSource()); - }; - - // optimization for multiple where and multiple select and whereselect - - var WhereEnumerable = function (source, predicate) { - this.prevSource = source; - this.prevPredicate = predicate; // predicate.length always <= 1 - }; - WhereEnumerable.prototype = new Enumerable(); - - WhereEnumerable.prototype.where = function (predicate) { - predicate = Utils.createLambda(predicate); - - if (predicate.length <= 1) { - var prevPredicate = this.prevPredicate; - var composedPredicate = function (x) { return prevPredicate(x) && predicate(x); }; - return new WhereEnumerable(this.prevSource, composedPredicate); - } - else { - // if predicate use index, can't compose - return Enumerable.prototype.where.call(this, predicate); - } - }; - - WhereEnumerable.prototype.select = function (selector) { - selector = Utils.createLambda(selector); - - return (selector.length <= 1) - ? new WhereSelectEnumerable(this.prevSource, this.prevPredicate, selector) - : Enumerable.prototype.select.call(this, selector); - }; - - WhereEnumerable.prototype.GetEnumerator = function () { - var predicate = this.prevPredicate; - var source = this.prevSource; - var enumerator; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - while (enumerator.moveNext()) { - if (predicate(enumerator.Current)) { - return this.yieldReturn(enumerator.Current); - } - } - return false; - }, - function () { Utils.Dispose(enumerator); }); - }; - - var WhereSelectEnumerable = function (source, predicate, selector) { - this.prevSource = source; - this.prevPredicate = predicate; // predicate.length always <= 1 or null - this.prevSelector = selector; // selector.length always <= 1 - }; - WhereSelectEnumerable.prototype = new Enumerable(); - - WhereSelectEnumerable.prototype.where = function (predicate) { - predicate = Utils.createLambda(predicate); - - return (predicate.length <= 1) - ? new WhereEnumerable(this, predicate) - : Enumerable.prototype.where.call(this, predicate); - }; - - WhereSelectEnumerable.prototype.select = function (selector) { - selector = Utils.createLambda(selector); - - if (selector.length <= 1) { - var prevSelector = this.prevSelector; - var composedSelector = function (x) { return selector(prevSelector(x)); }; - return new WhereSelectEnumerable(this.prevSource, this.prevPredicate, composedSelector); - } - else { - // if selector use index, can't compose - return Enumerable.prototype.select.call(this, selector); - } - }; - - WhereSelectEnumerable.prototype.GetEnumerator = function () { - var predicate = this.prevPredicate; - var selector = this.prevSelector; - var source = this.prevSource; - var enumerator; - - return new IEnumerator( - function () { enumerator = source.GetEnumerator(); }, - function () { - while (enumerator.moveNext()) { - if (predicate == null || predicate(enumerator.Current)) { - return this.yieldReturn(selector(enumerator.Current)); - } - } - return false; - }, - function () { Utils.Dispose(enumerator); }); - }; - - // Collections - - // dictionary = Dictionary - var Lookup = function (dictionary, order, nullKey) { - this.count = function () { - return dictionary.Count; - }; - this.get = function (key) { - if (key == null) { - return Enumerable.from(nullKey ? nullKey : []); - } - - var value = { v: null }; - var success = dictionary.tryGetValue(key, value); - return Enumerable.from(success ? value.v : []); - }; - this.contains = function (key) { - if (key == null) { - return !!nullKey; - } - return dictionary.containsKey(key); - }; - this.toEnumerable = function () { - return Enumerable.from(order).select(function (key) { - if (key == null) { - return new Grouping(key, nullKey); - } - return new Grouping(key, dictionary.getItem(key)); - }); - }; - this.GetEnumerator = function () { - return this.toEnumerable().GetEnumerator(); - }; - }; - - H5.definei("System.Linq.ILookup$2"); - Lookup.$$inherits = []; - H5.Class.addExtend(Lookup, [System.Collections.IEnumerable, System.Linq.ILookup$2]); - - var Grouping = function (groupKey, elements) { - this.key = function () { - return groupKey; - }; - ArrayEnumerable.call(this, elements); - }; - Grouping.prototype = new ArrayEnumerable(); - H5.definei("System.Linq.IGrouping$2"); - Grouping.prototype.constructor = Grouping; - - Grouping.$$inherits = []; - H5.Class.addExtend(Grouping, [System.Collections.IEnumerable, System.Linq.IGrouping$2]); - - // module export - /*if (typeof define === Types.Function && define.amd) { // AMD - define("linqjs", [], function () { return Enumerable; }); - } else if (typeof module !== Types.Undefined && module.exports) { // Node - module.exports = Enumerable; - } else { - root.Enumerable = Enumerable; - }*/ - - H5.Linq = {}; - H5.Linq.Enumerable = Enumerable; - - System.Linq = System.Linq || {}; - System.Linq.Enumerable = Enumerable; - System.Linq.Grouping$2 = Grouping; - System.Linq.Lookup$2 = Lookup; - System.Linq.OrderedEnumerable$1 = OrderedEnumerable; -})(H5.global); - - // @source CollectionDataContractAttribute.js - - H5.define("System.Runtime.Serialization.CollectionDataContractAttribute", { - inherits: [System.Attribute], - fields: { - _name: null, - _ns: null, - _itemName: null, - _keyName: null, - _valueName: null, - _isReference: false, - _isNameSetExplicitly: false, - _isNamespaceSetExplicitly: false, - _isReferenceSetExplicitly: false, - _isItemNameSetExplicitly: false, - _isKeyNameSetExplicitly: false, - _isValueNameSetExplicitly: false - }, - props: { - Namespace: { - get: function () { - return this._ns; - }, - set: function (value) { - this._ns = value; - this._isNamespaceSetExplicitly = true; - } - }, - IsNamespaceSetExplicitly: { - get: function () { - return this._isNamespaceSetExplicitly; - } - }, - Name: { - get: function () { - return this._name; - }, - set: function (value) { - this._name = value; - this._isNameSetExplicitly = true; - } - }, - IsNameSetExplicitly: { - get: function () { - return this._isNameSetExplicitly; - } - }, - ItemName: { - get: function () { - return this._itemName; - }, - set: function (value) { - this._itemName = value; - this._isItemNameSetExplicitly = true; - } - }, - IsItemNameSetExplicitly: { - get: function () { - return this._isItemNameSetExplicitly; - } - }, - KeyName: { - get: function () { - return this._keyName; - }, - set: function (value) { - this._keyName = value; - this._isKeyNameSetExplicitly = true; - } - }, - IsReference: { - get: function () { - return this._isReference; - }, - set: function (value) { - this._isReference = value; - this._isReferenceSetExplicitly = true; - } - }, - IsReferenceSetExplicitly: { - get: function () { - return this._isReferenceSetExplicitly; - } - }, - IsKeyNameSetExplicitly: { - get: function () { - return this._isKeyNameSetExplicitly; - } - }, - ValueName: { - get: function () { - return this._valueName; - }, - set: function (value) { - this._valueName = value; - this._isValueNameSetExplicitly = true; - } - }, - IsValueNameSetExplicitly: { - get: function () { - return this._isValueNameSetExplicitly; - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.Attribute.ctor.call(this); - } - } - }); - - // @source ContractNamespaceAttribute.js - - H5.define("System.Runtime.Serialization.ContractNamespaceAttribute", { - inherits: [System.Attribute], - fields: { - _clrNamespace: null, - _contractNamespace: null - }, - props: { - ClrNamespace: { - get: function () { - return this._clrNamespace; - }, - set: function (value) { - this._clrNamespace = value; - } - }, - ContractNamespace: { - get: function () { - return this._contractNamespace; - } - } - }, - ctors: { - ctor: function (contractNamespace) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._contractNamespace = contractNamespace; - } - } - }); - - // @source DataContractAttribute.js - - H5.define("System.Runtime.Serialization.DataContractAttribute", { - inherits: [System.Attribute], - fields: { - _name: null, - _ns: null, - _isNameSetExplicitly: false, - _isNamespaceSetExplicitly: false, - _isReference: false, - _isReferenceSetExplicitly: false - }, - props: { - IsReference: { - get: function () { - return this._isReference; - }, - set: function (value) { - this._isReference = value; - this._isReferenceSetExplicitly = true; - } - }, - IsReferenceSetExplicitly: { - get: function () { - return this._isReferenceSetExplicitly; - } - }, - Namespace: { - get: function () { - return this._ns; - }, - set: function (value) { - this._ns = value; - this._isNamespaceSetExplicitly = true; - } - }, - IsNamespaceSetExplicitly: { - get: function () { - return this._isNamespaceSetExplicitly; - } - }, - Name: { - get: function () { - return this._name; - }, - set: function (value) { - this._name = value; - this._isNameSetExplicitly = true; - } - }, - IsNameSetExplicitly: { - get: function () { - return this._isNameSetExplicitly; - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.Attribute.ctor.call(this); - } - } - }); - - // @source DataMemberAttribute.js - - H5.define("System.Runtime.Serialization.DataMemberAttribute", { - inherits: [System.Attribute], - fields: { - _name: null, - _isNameSetExplicitly: false, - _order: 0, - _isRequired: false, - _emitDefaultValue: false - }, - props: { - Name: { - get: function () { - return this._name; - }, - set: function (value) { - this._name = value; - this._isNameSetExplicitly = true; - } - }, - IsNameSetExplicitly: { - get: function () { - return this._isNameSetExplicitly; - } - }, - Order: { - get: function () { - return this._order; - }, - set: function (value) { - if (value < 0) { - throw new System.Runtime.Serialization.InvalidDataContractException.$ctor1("Property 'Order' in DataMemberAttribute attribute cannot be a negative number."); - } - this._order = value; - } - }, - IsRequired: { - get: function () { - return this._isRequired; - }, - set: function (value) { - this._isRequired = value; - } - }, - EmitDefaultValue: { - get: function () { - return this._emitDefaultValue; - }, - set: function (value) { - this._emitDefaultValue = value; - } - } - }, - ctors: { - init: function () { - this._order = -1; - this._emitDefaultValue = true; - }, - ctor: function () { - this.$initialize(); - System.Attribute.ctor.call(this); - } - } - }); - - // @source EnumMemberAttribute.js - - H5.define("System.Runtime.Serialization.EnumMemberAttribute", { - inherits: [System.Attribute], - fields: { - _value: null, - _isValueSetExplicitly: false - }, - props: { - Value: { - get: function () { - return this._value; - }, - set: function (value) { - this._value = value; - this._isValueSetExplicitly = true; - } - }, - IsValueSetExplicitly: { - get: function () { - return this._isValueSetExplicitly; - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.Attribute.ctor.call(this); - } - } - }); - - // @source IDeserializationCallback.js - - H5.define("System.Runtime.Serialization.IDeserializationCallback", { - $kind: "interface" - }); - - // @source IFormatterConverter.js - - H5.define("System.Runtime.Serialization.IFormatterConverter", { - $kind: "interface" - }); - - // @source IgnoreDataMemberAttribute.js - - H5.define("System.Runtime.Serialization.IgnoreDataMemberAttribute", { - inherits: [System.Attribute], - ctors: { - ctor: function () { - this.$initialize(); - System.Attribute.ctor.call(this); - } - } - }); - - // @source InvalidDataContractException.js - - H5.define("System.Runtime.Serialization.InvalidDataContractException", { - inherits: [System.Exception], - ctors: { - ctor: function () { - this.$initialize(); - System.Exception.ctor.call(this); - }, - $ctor1: function (message) { - this.$initialize(); - System.Exception.ctor.call(this, message); - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.Exception.ctor.call(this, message, innerException); - } - } - }); - - // @source IObjectReference.js - - H5.define("System.Runtime.Serialization.IObjectReference", { - $kind: "interface" - }); - - // @source ISafeSerializationData.js - - H5.define("System.Runtime.Serialization.ISafeSerializationData", { - $kind: "interface" - }); - - // @source ISerializable.js - - H5.define("System.Runtime.Serialization.ISerializable", { - $kind: "interface" - }); - - // @source ISerializationSurrogateProvider.js - - H5.define("System.Runtime.Serialization.ISerializationSurrogateProvider", { - $kind: "interface" - }); - - // @source KnownTypeAttribute.js - - H5.define("System.Runtime.Serialization.KnownTypeAttribute", { - inherits: [System.Attribute], - fields: { - _methodName: null, - _type: null - }, - props: { - MethodName: { - get: function () { - return this._methodName; - } - }, - Type: { - get: function () { - return this._type; - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.Attribute.ctor.call(this); - }, - $ctor2: function (type) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._type = type; - }, - $ctor1: function (methodName) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._methodName = methodName; - } - } - }); - - // @source SerializationEntry.js - - H5.define("System.Runtime.Serialization.SerializationEntry", { - $kind: "struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $._name = null; - $._value = null; - $._type = null; - return $;} - } - }, - fields: { - _name: null, - _value: null, - _type: null - }, - props: { - Value: { - get: function () { - return this._value; - } - }, - Name: { - get: function () { - return this._name; - } - }, - ObjectType: { - get: function () { - return this._type; - } - } - }, - ctors: { - $ctor1: function (entryName, entryValue, entryType) { - this.$initialize(); - this._name = entryName; - this._value = entryValue; - this._type = entryType; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - getHashCode: function () { - var h = H5.addHash([7645431029, this._name, this._value, this._type]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Runtime.Serialization.SerializationEntry)) { - return false; - } - return H5.equals(this._name, o._name) && H5.equals(this._value, o._value) && H5.equals(this._type, o._type); - }, - $clone: function (to) { - var s = to || new System.Runtime.Serialization.SerializationEntry(); - s._name = this._name; - s._value = this._value; - s._type = this._type; - return s; - } - } - }); - - // @source SerializationException.js - - H5.define("System.Runtime.Serialization.SerializationException", { - inherits: [System.SystemException], - statics: { - fields: { - s_nullMessage: null - }, - ctors: { - init: function () { - this.s_nullMessage = "Serialization error."; - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, System.Runtime.Serialization.SerializationException.s_nullMessage); - this.HResult = -2146233076; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233076; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2146233076; - } - } - }); - - // @source SerializationInfoEnumerator.js - - H5.define("System.Runtime.Serialization.SerializationInfoEnumerator", { - inherits: [System.Collections.IEnumerator], - fields: { - _members: null, - _data: null, - _types: null, - _numItems: 0, - _currItem: 0, - _current: false - }, - props: { - System$Collections$IEnumerator$Current: { - get: function () { - return this.Current.$clone(); - } - }, - Current: { - get: function () { - if (this._current === false) { - throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished."); - } - return new System.Runtime.Serialization.SerializationEntry.$ctor1(this._members[System.Array.index(this._currItem, this._members)], this._data[System.Array.index(this._currItem, this._data)], this._types[System.Array.index(this._currItem, this._types)]); - } - }, - Name: { - get: function () { - if (this._current === false) { - throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished."); - } - return this._members[System.Array.index(this._currItem, this._members)]; - } - }, - Value: { - get: function () { - if (this._current === false) { - throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished."); - } - return this._data[System.Array.index(this._currItem, this._data)]; - } - }, - ObjectType: { - get: function () { - if (this._current === false) { - throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished."); - } - return this._types[System.Array.index(this._currItem, this._types)]; - } - } - }, - alias: [ - "moveNext", "System$Collections$IEnumerator$moveNext", - "reset", "System$Collections$IEnumerator$reset" - ], - ctors: { - ctor: function (members, info, types, numItems) { - this.$initialize(); - - this._members = members; - this._data = info; - this._types = types; - - this._numItems = (numItems - 1) | 0; - this._currItem = -1; - this._current = false; - } - }, - methods: { - moveNext: function () { - if (this._currItem < this._numItems) { - this._currItem = (this._currItem + 1) | 0; - this._current = true; - } else { - this._current = false; - } - - return this._current; - }, - reset: function () { - this._currItem = -1; - this._current = false; - } - } - }); - - // @source StreamingContext.js - - H5.define("System.Runtime.Serialization.StreamingContext", { - $kind: "struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $._additionalContext = null; - $._state = 0; - return $;} - } - }, - fields: { - _additionalContext: null, - _state: 0 - }, - props: { - State: { - get: function () { - return this._state; - } - }, - Context: { - get: function () { - return this._additionalContext; - } - } - }, - ctors: { - $ctor1: function (state) { - System.Runtime.Serialization.StreamingContext.$ctor2.call(this, state, null); - }, - $ctor2: function (state, additional) { - this.$initialize(); - this._state = state; - this._additionalContext = additional; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - equals: function (obj) { - if (!(H5.is(obj, System.Runtime.Serialization.StreamingContext))) { - return false; - } - var ctx = System.Nullable.getValue(H5.cast(H5.unbox(obj, System.Runtime.Serialization.StreamingContext), System.Runtime.Serialization.StreamingContext)); - return H5.referenceEquals(ctx._additionalContext, this._additionalContext) && ctx._state === this._state; - }, - getHashCode: function () { - return this._state; - }, - $clone: function (to) { - var s = to || new System.Runtime.Serialization.StreamingContext(); - s._additionalContext = this._additionalContext; - s._state = this._state; - return s; - } - } - }); - - // @source StreamingContextStates.js - - H5.define("System.Runtime.Serialization.StreamingContextStates", { - $kind: "enum", - statics: { - fields: { - CrossProcess: 1, - CrossMachine: 2, - File: 4, - Persistence: 8, - Remoting: 16, - Other: 32, - Clone: 64, - CrossAppDomain: 128, - All: 255 - } - }, - $flags: true - }); - - // @source OnSerializingAttribute.js - - H5.define("System.Runtime.Serialization.OnSerializingAttribute", { - inherits: [System.Attribute] - }); - - // @source OnSerializedAttribute.js - - H5.define("System.Runtime.Serialization.OnSerializedAttribute", { - inherits: [System.Attribute] - }); - - // @source OnDeserializingAttribute.js - - H5.define("System.Runtime.Serialization.OnDeserializingAttribute", { - inherits: [System.Attribute] - }); - - // @source OnDeserializedAttribute.js - - H5.define("System.Runtime.Serialization.OnDeserializedAttribute", { - inherits: [System.Attribute] - }); - - // @source SecurityException.js - - H5.define("System.Security.SecurityException", { - inherits: [System.SystemException], - statics: { - fields: { - DemandedName: null, - GrantedSetName: null, - RefusedSetName: null, - DeniedName: null, - PermitOnlyName: null, - UrlName: null - }, - ctors: { - init: function () { - this.DemandedName = "Demanded"; - this.GrantedSetName = "GrantedSet"; - this.RefusedSetName = "RefusedSet"; - this.DeniedName = "Denied"; - this.PermitOnlyName = "PermitOnly"; - this.UrlName = "Url"; - } - } - }, - props: { - Demanded: null, - DenySetInstance: null, - GrantedSet: null, - Method: null, - PermissionState: null, - PermissionType: null, - PermitOnlySetInstance: null, - RefusedSet: null, - Url: null - }, - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Security error."); - this.HResult = -2146233078; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233078; - }, - $ctor2: function (message, inner) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, inner); - this.HResult = -2146233078; - }, - $ctor3: function (message, type) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233078; - this.PermissionType = type; - }, - $ctor4: function (message, type, state) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233078; - this.PermissionType = type; - this.PermissionState = state; - } - }, - methods: { - toString: function () { - return H5.toString(this); - } - } - }); - - // @source UnauthorizedAccessException.js - - H5.define("System.UnauthorizedAccessException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Attempted to perform an unauthorized operation."); - this.HResult = -2147024891; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2147024891; - }, - $ctor2: function (message, inner) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, inner); - this.HResult = -2147024891; - } - } - }); - - // @source UnhandledExceptionEventArgs.js - - H5.define("System.UnhandledExceptionEventArgs", { - fields: { - _exception: null, - _isTerminating: false - }, - props: { - ExceptionObject: { - get: function () { - return this._exception; - } - }, - IsTerminating: { - get: function () { - return this._isTerminating; - } - } - }, - ctors: { - ctor: function (exception, isTerminating) { - this.$initialize(); - System.Object.call(this); - this._exception = exception; - this._isTerminating = isTerminating; - } - } - }); - - // @source Regex.js - - H5.define("System.Text.RegularExpressions.Regex", { - statics: { - _cacheSize: 15, - _defaultMatchTimeout: System.TimeSpan.fromMilliseconds(-1), - - getCacheSize: function () { - return System.Text.RegularExpressions.Regex._cacheSize; - }, - - setCacheSize: function (value) { - if (value < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("value"); - } - - System.Text.RegularExpressions.Regex._cacheSize = value; - //TODO: remove extra items from cache - }, - - escape: function (str) { - if (str == null) { - throw new System.ArgumentNullException.$ctor1("str"); - } - - return System.Text.RegularExpressions.RegexParser.escape(str); - }, - - unescape: function (str) { - if (str == null) { - throw new System.ArgumentNullException.$ctor1("str"); - } - - return System.Text.RegularExpressions.RegexParser.unescape(str); - }, - - isMatch: function (input, pattern, options, matchTimeout) { - var scope = System.Text.RegularExpressions; - - if (!H5.isDefined(options)) { - options = scope.RegexOptions.None; - } - - if (!H5.isDefined(matchTimeout)) { - matchTimeout = scope.Regex._defaultMatchTimeout; - } - - var regex = new System.Text.RegularExpressions.Regex.ctor(pattern, options, matchTimeout, true); - - return regex.isMatch(input); - }, - - match: function (input, pattern, options, matchTimeout) { - var scope = System.Text.RegularExpressions; - - if (!H5.isDefined(options)) { - options = scope.RegexOptions.None; - } - - if (!H5.isDefined(matchTimeout)) { - matchTimeout = scope.Regex._defaultMatchTimeout; - } - - var regex = new System.Text.RegularExpressions.Regex.ctor(pattern, options, matchTimeout, true); - - return regex.match(input); - }, - - matches: function (input, pattern, options, matchTimeout) { - var scope = System.Text.RegularExpressions; - - if (!H5.isDefined(options)) { - options = scope.RegexOptions.None; - } - - if (!H5.isDefined(matchTimeout)) { - matchTimeout = scope.Regex._defaultMatchTimeout; - } - - var regex = new System.Text.RegularExpressions.Regex.ctor(pattern, options, matchTimeout, true); - - return regex.matches(input); - }, - - replace: function (input, pattern, replacement, options, matchTimeout) { - var scope = System.Text.RegularExpressions; - - if (!H5.isDefined(options)) { - options = scope.RegexOptions.None; - } - - if (!H5.isDefined(matchTimeout)) { - matchTimeout = scope.Regex._defaultMatchTimeout; - } - - var regex = new System.Text.RegularExpressions.Regex.ctor(pattern, options, matchTimeout, true); - - return regex.replace(input, replacement); - }, - - split: function (input, pattern, options, matchTimeout) { - var scope = System.Text.RegularExpressions; - - if (!H5.isDefined(options)) { - options = scope.RegexOptions.None; - } - - if (!H5.isDefined(matchTimeout)) { - matchTimeout = scope.Regex._defaultMatchTimeout; - } - - var regex = new System.Text.RegularExpressions.Regex.ctor(pattern, options, matchTimeout, true); - - return regex.split(input); - } - }, - - _pattern: "", - _matchTimeout: System.TimeSpan.fromMilliseconds(-1), - _runner: null, - _caps: null, - _capsize: 0, - _capnames: null, - _capslist: null, - - config: { - init: function () { - this._options = System.Text.RegularExpressions.RegexOptions.None; - } - }, - - ctor: function (pattern, options, matchTimeout, useCache) { - this.$initialize(); - - if (!H5.isDefined(options)) { - options = System.Text.RegularExpressions.RegexOptions.None; - } - - if (!H5.isDefined(matchTimeout)) { - matchTimeout = System.TimeSpan.fromMilliseconds(-1); - } - - if (!H5.isDefined(useCache)) { - useCache = false; - } - - var scope = System.Text.RegularExpressions; - - if (pattern == null) { - throw new System.ArgumentNullException.$ctor1("pattern"); - } - - if (options < scope.RegexOptions.None || ((options >> 10) !== 0)) { - throw new System.ArgumentOutOfRangeException.$ctor1("options"); - } - - if (((options & scope.RegexOptions.ECMAScript) !== 0) && - ((options & ~(scope.RegexOptions.ECMAScript | - scope.RegexOptions.IgnoreCase | - scope.RegexOptions.Multiline | - scope.RegexOptions.CultureInvariant - )) !== 0)) { - throw new System.ArgumentOutOfRangeException.$ctor1("options"); - } - - // Check if the specified options are supported. - var supportedOptions = - System.Text.RegularExpressions.RegexOptions.IgnoreCase | - System.Text.RegularExpressions.RegexOptions.Multiline | - System.Text.RegularExpressions.RegexOptions.Singleline | - System.Text.RegularExpressions.RegexOptions.IgnorePatternWhitespace | - System.Text.RegularExpressions.RegexOptions.ExplicitCapture; - - if ((options | supportedOptions) !== supportedOptions) { - throw new System.NotSupportedException.$ctor1("Specified Regex options are not supported."); - } - - this._validateMatchTimeout(matchTimeout); - - this._pattern = pattern; - this._options = options; - this._matchTimeout = matchTimeout; - this._runner = new scope.RegexRunner(this); - - //TODO: cache - var patternInfo = this._runner.parsePattern(); - - this._capnames = patternInfo.sparseSettings.sparseSlotNameMap; - this._capslist = patternInfo.sparseSettings.sparseSlotNameMap.keys; - this._capsize = this._capslist.length; - }, - - getMatchTimeout: function () { - return this._matchTimeout; - }, - - getOptions: function () { - return this._options; - }, - - getRightToLeft: function () { - return (this._options & System.Text.RegularExpressions.RegexOptions.RightToLeft) !== 0; - }, - - isMatch: function (input, startat) { - if (input == null) { - throw new System.ArgumentNullException.$ctor1("input"); - } - - if (!H5.isDefined(startat)) { - startat = this.getRightToLeft() ? input.length : 0; - } - - var match = this._runner.run(true, -1, input, 0, input.length, startat); - - return match == null; - }, - - match: function (input, startat, arg3) { - if (input == null) { - throw new System.ArgumentNullException.$ctor1("input"); - } - - var length = input.length, - beginning = 0; - - if (arguments.length === 3) { - beginning = startat; - length = arg3; - startat = this.getRightToLeft() ? beginning + length : beginning; - } else if (!H5.isDefined(startat)) { - startat = this.getRightToLeft() ? length : 0; - } - - return this._runner.run(false, -1, input, beginning, length, startat); - }, - - matches: function (input, startat) { - if (input == null) { - throw new System.ArgumentNullException.$ctor1("input"); - } - - if (!H5.isDefined(startat)) { - startat = this.getRightToLeft() ? input.length : 0; - } - - return new System.Text.RegularExpressions.MatchCollection(this, input, 0, input.length, startat); - }, - - getGroupNames: function () { - if (this._capslist == null) { - var invariantCulture = System.Globalization.CultureInfo.invariantCulture; - - var result = []; - var max = this._capsize; - var i; - - for (i = 0; i < max; i++) { - result[i] = System.Convert.toString(i, invariantCulture, System.Convert.typeCodes.Int32); - } - - return result; - } else { - return this._capslist.slice(); - } - }, - - getGroupNumbers: function () { - var caps = this._caps; - var result; - var key; - var max; - var i; - - if (caps == null) { - result = []; - max = this._capsize; - for (i = 0; i < max; i++) { - result.push(i); - } - } else { - result = []; - - for (key in caps) { - if (caps.hasOwnProperty(key)) { - result[caps[key]] = key; - } - } - } - - return result; - }, - - groupNameFromNumber: function (i) { - if (this._capslist == null) { - if (i >= 0 && i < this._capsize) { - var invariantCulture = System.Globalization.CultureInfo.invariantCulture; - - return System.Convert.toString(i, invariantCulture, System.Convert.typeCodes.Int32); - } - - return ""; - } else { - if (this._caps != null) { - var obj = this._caps[i]; - - if (obj == null) { - return ""; - } - - return parseInt(obj); - } - - if (i >= 0 && i < this._capslist.length) { - return this._capslist[i]; - } - - return ""; - } - }, - - groupNumberFromName: function (name) { - if (name == null) { - throw new System.ArgumentNullException.$ctor1("name"); - } - - // look up name if we have a hashtable of names - if (this._capnames != null) { - var ret = this._capnames[name]; - - if (ret == null) { - return -1; - } - - return parseInt(ret); - } - - // convert to an int if it looks like a number - var result = 0; - var ch; - var i; - - for (i = 0; i < name.Length; i++) { - ch = name[i]; - - if (ch > "9" || ch < "0") { - return -1; - } - - result *= 10; - result += (ch - "0"); - } - - // return int if it's in range - if (result >= 0 && result < this._capsize) { - return result; - } - - return -1; - }, - - replace: function (input, evaluator, count, startat) { - if (input == null) { - throw new System.ArgumentNullException.$ctor1("input"); - } - - if (!H5.isDefined(count)) { - count = -1; - } - - if (!H5.isDefined(startat)) { - startat = this.getRightToLeft() ? input.length : 0; - } - - if (evaluator == null) { - throw new System.ArgumentNullException.$ctor1("evaluator"); - } - - if (H5.isFunction(evaluator)) { - return System.Text.RegularExpressions.RegexReplacement.replace(evaluator, this, input, count, startat); - } - - var repl = System.Text.RegularExpressions.RegexParser.parseReplacement(evaluator, this._caps, this._capsize, this._capnames, this._options); - //TODO: Cache - - return repl.replace(this, input, count, startat); - }, - - split: function (input, count, startat) { - if (input == null) { - throw new System.ArgumentNullException.$ctor1("input"); - } - - if (!H5.isDefined(count)) { - count = 0; - } - - if (!H5.isDefined(startat)) { - startat = this.getRightToLeft() ? input.length : 0; - } - - return System.Text.RegularExpressions.RegexReplacement.split(this, input, count, startat); - }, - - _validateMatchTimeout: function (matchTimeout) { - var ms = matchTimeout.getTotalMilliseconds(); - - if (-1 === ms) { - return; - } - - if (ms > 0 && ms <= 2147483646) { - return; - } - - throw new System.ArgumentOutOfRangeException.$ctor1("matchTimeout"); - } - }); - - // @source RegexCapture.js - - H5.define("System.Text.RegularExpressions.Capture", { - _text: "", - _index: 0, - _length: 0, - - ctor: function (text, i, l) { - this.$initialize(); - this._text = text; - this._index = i; - this._length = l; - }, - - getIndex: function () { - return this._index; - }, - - getLength: function () { - return this._length; - }, - - getValue: function () { - return this._text.substr(this._index, this._length); - }, - - toString: function () { - return this.getValue(); - }, - - _getOriginalString: function () { - return this._text; - }, - - _getLeftSubstring: function () { - return this._text.slice(0, _index); - }, - - _getRightSubstring: function () { - return this._text.slice(this._index + this._length, this._text.length); - } - }); - - // @source RegexCaptureCollection.js - - H5.define("System.Text.RegularExpressions.CaptureCollection", { - inherits: function () { - return [System.Collections.ICollection]; - }, - - config: { - properties: { - Count: { - get: function () { - return this._capcount; - } - } - }, - - alias: [ - "GetEnumerator", "System$Collections$IEnumerable$GetEnumerator", - "getCount", "System$Collections$ICollection$getCount", - "Count", "System$Collections$ICollection$Count", - "copyTo", "System$Collections$ICollection$copyTo" - ] - }, - - _group: null, - _capcount: 0, - _captures: null, - - ctor: function (group) { - this.$initialize(); - this._group = group; - this._capcount = group._capcount; - }, - - getSyncRoot: function () { - return this._group; - }, - - getIsSynchronized: function () { - return false; - }, - - getIsReadOnly: function () { - return true; - }, - - getCount: function () { - return this._capcount; - }, - - get: function (i) { - if (i === this._capcount - 1 && i >= 0) { - return this._group; - } - - if (i >= this._capcount || i < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("i"); - } - - this._ensureCapturesInited(); - - return this._captures[i]; - }, - - copyTo: function (array, arrayIndex) { - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (array.length < arrayIndex + this._capcount) { - throw new System.IndexOutOfRangeException(); - } - - var capture; - var i; - var j; - - for (i = arrayIndex, j = 0; j < this._capcount; i++, j++) { - capture = this.get(j); - System.Array.set(array, capture, [i]); - } - }, - - GetEnumerator: function () { - return new System.Text.RegularExpressions.CaptureEnumerator(this); - }, - - _ensureCapturesInited: function () { - // first time a capture is accessed, compute them all - if (this._captures == null) { - var captures = []; - var j; - - captures.length = this._capcount; - - for (j = 0; j < this._capcount - 1; j++) { - var index = this._group._caps[j * 2]; - var length = this._group._caps[j * 2 + 1]; - - captures[j] = new System.Text.RegularExpressions.Capture(this._group._text, index, length); - } - - if (this._capcount > 0) { - captures[this._capcount - 1] = this._group; - } - - this._captures = captures; - } - } - }); - - H5.define("System.Text.RegularExpressions.CaptureEnumerator", { - inherits: function () { - return [System.Collections.IEnumerator]; - }, - - config: { - properties: { - Current: { - get: function () { - return this.getCurrent(); - } - } - }, - alias: [ - "getCurrent", "System$Collections$IEnumerator$getCurrent", - "moveNext", "System$Collections$IEnumerator$moveNext", - "reset", "System$Collections$IEnumerator$reset", - "Current", "System$Collections$IEnumerator$Current" - ] - }, - - _captureColl: null, - _curindex: 0, - - ctor: function (captureColl) { - this.$initialize(); - this._curindex = -1; - this._captureColl = captureColl; - }, - - moveNext: function () { - var size = this._captureColl.getCount(); - - if (this._curindex >= size) { - return false; - } - - this._curindex++; - return (this._curindex < size); - }, - - getCurrent: function () { - return this.getCapture(); - }, - - getCapture: function () { - if (this._curindex < 0 || this._curindex >= this._captureColl.getCount()) { - throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished."); - } - - return this._captureColl.get(this._curindex); - }, - - reset: function () { - this._curindex = -1; - } - }); - - // @source RegexGroup.js - - H5.define("System.Text.RegularExpressions.Group", { - inherits: function () { - return [System.Text.RegularExpressions.Capture]; - }, - - statics: { - config: { - init: function () { - var empty = new System.Text.RegularExpressions.Group("", [], 0); - - this.getEmpty = function () { - return empty; - } - } - }, - - synchronized: function (group) { - if (group == null) { - throw new System.ArgumentNullException.$ctor1("group"); - } - - // force Captures to be computed. - var captures = group.getCaptures(); - - if (captures.getCount() > 0) { - captures.get(0); - } - - return group; - } - }, - - _caps: null, - _capcount: 0, - _capColl: null, - - ctor: function (text, caps, capcount) { - this.$initialize(); - var scope = System.Text.RegularExpressions; - var index = capcount === 0 ? 0 : caps[(capcount - 1) * 2]; - var length = capcount === 0 ? 0 : caps[(capcount * 2) - 1]; - - scope.Capture.ctor.call(this, text, index, length); - - this._caps = caps; - this._capcount = capcount; - }, - - getSuccess: function () { - return this._capcount !== 0; - }, - - getCaptures: function () { - if (this._capColl == null) { - this._capColl = new System.Text.RegularExpressions.CaptureCollection(this); - } - - return this._capColl; - } - }); - - // @source RegexGroupCollection.js - - H5.define("System.Text.RegularExpressions.GroupCollection", { - inherits: function () { - return [System.Collections.ICollection]; - }, - - config: { - properties: { - Count: { - get: function () { - return this._match._matchcount.length; - } - } - }, - alias: [ - "GetEnumerator", "System$Collections$IEnumerable$GetEnumerator", - "getCount", "System$Collections$ICollection$getCount", - "Count", "System$Collections$ICollection$Count", - "copyTo", "System$Collections$ICollection$copyTo" - ] - }, - - _match: null, - _captureMap: null, - _groups: null, - - ctor: function (match, caps) { - this.$initialize(); - this._match = match; - this._captureMap = caps; - }, - - getSyncRoot: function () { - return this._match; - }, - - getIsSynchronized: function () { - return false; - }, - - getIsReadOnly: function () { - return true; - }, - - getCount: function () { - return this._match._matchcount.length; - }, - - get: function (groupnum) { - return this._getGroup(groupnum); - }, - - getByName: function (groupname) { - if (this._match._regex == null) { - return System.Text.RegularExpressions.Group.getEmpty(); - } - - var groupnum = this._match._regex.groupNumberFromName(groupname); - - return this._getGroup(groupnum); - }, - - copyTo: function (array, arrayIndex) { - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - var count = this.getCount(); - - if (array.length < arrayIndex + count) { - throw new System.IndexOutOfRangeException(); - } - - var group; - var i; - var j; - - for (i = arrayIndex, j = 0; j < count; i++, j++) { - group = this._getGroup(j); - System.Array.set(array, group, [i]); - } - }, - - GetEnumerator: function () { - return new System.Text.RegularExpressions.GroupEnumerator(this); - }, - - _getGroup: function (groupnum) { - var group; - - if (this._captureMap != null) { - var num = this._captureMap[groupnum]; - - if (num == null) { - group = System.Text.RegularExpressions.Group.getEmpty(); - } else { - group = this._getGroupImpl(num); - } - } else { - if (groupnum >= this._match._matchcount.length || groupnum < 0) { - group = System.Text.RegularExpressions.Group.getEmpty(); - } else { - group = this._getGroupImpl(groupnum); - } - } - - return group; - }, - - _getGroupImpl: function (groupnum) { - if (groupnum === 0) { - return this._match; - } - - this._ensureGroupsInited(); - - return this._groups[groupnum]; - }, - - _ensureGroupsInited: function () { - // Construct all the Group objects the first time GetGroup is called - if (this._groups == null) { - var groups = []; - - groups.length = this._match._matchcount.length; - - if (groups.length > 0) { - groups[0] = this._match; - } - - var matchText; - var matchCaps; - var matchCapcount; - var i; - - for (i = 0; i < groups.length - 1; i++) { - matchText = this._match._text; - matchCaps = this._match._matches[i + 1]; - matchCapcount = this._match._matchcount[i + 1]; - groups[i + 1] = new System.Text.RegularExpressions.Group(matchText, matchCaps, matchCapcount); - } - - this._groups = groups; - } - } - }); - - H5.define("System.Text.RegularExpressions.GroupEnumerator", { - inherits: function () { - return [System.Collections.IEnumerator]; - }, - - config: { - properties: { - Current: { - get: function () { - return this.getCurrent(); - } - } - }, - - alias: [ - "getCurrent", "System$Collections$IEnumerator$getCurrent", - "moveNext", "System$Collections$IEnumerator$moveNext", - "reset", "System$Collections$IEnumerator$reset", - "Current", "System$Collections$IEnumerator$Current" - ] - }, - - _groupColl: null, - _curindex: 0, - - ctor: function (groupColl) { - this.$initialize(); - this._curindex = -1; - this._groupColl = groupColl; - }, - - moveNext: function () { - var size = this._groupColl.getCount(); - - if (this._curindex >= size) { - return false; - } - - this._curindex++; - - return (this._curindex < size); - }, - - getCurrent: function () { - return this.getCapture(); - }, - - getCapture: function () { - if (this._curindex < 0 || this._curindex >= this._groupColl.getCount()) { - throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished."); - } - - return this._groupColl.get(this._curindex); - }, - - reset: function () { - this._curindex = -1; - } - }); - - // @source RegexMatch.js - - H5.define("System.Text.RegularExpressions.Match", { - inherits: function () { - return [System.Text.RegularExpressions.Group]; - }, - - statics: { - config: { - init: function () { - var empty = new System.Text.RegularExpressions.Match(null, 1, "", 0, 0, 0); - - this.getEmpty = function () { - return empty; - } - } - }, - - synchronized: function (match) { - if (match == null) { - throw new System.ArgumentNullException.$ctor1("match"); - } - - // Populate all groups by looking at each one - var groups = match.getGroups(); - var groupsCount = groups.getCount(); - var group; - var i; - - for (i = 0; i < groupsCount; i++) { - group = groups.get(i); - System.Text.RegularExpressions.Group.synchronized(group); - } - - return match; - } - }, - - _regex: null, - _matchcount: null, - _matches: null, - _textbeg: 0, - _textend: 0, - _textstart: 0, - _groupColl: null, - _textpos: 0, - - ctor: function (regex, capcount, text, begpos, len, startpos) { - this.$initialize(); - var scope = System.Text.RegularExpressions; - var caps = [0, 0]; - - scope.Group.ctor.call(this, text, caps, 0); - - this._regex = regex; - - this._matchcount = []; - this._matchcount.length = capcount; - - var i; - - for (i = 0; i < capcount; i++) { - this._matchcount[i] = 0; - } - - this._matches = []; - this._matches.length = capcount; - this._matches[0] = caps; - - this._textbeg = begpos; - this._textend = begpos + len; - this._textstart = startpos; - }, - - getGroups: function () { - if (this._groupColl == null) { - this._groupColl = new System.Text.RegularExpressions.GroupCollection(this, null); - } - - return this._groupColl; - }, - - nextMatch: function () { - if (this._regex == null) { - return this; - } - - return this._regex._runner.run(false, this._length, this._text, this._textbeg, this._textend - this._textbeg, this._textpos); - }, - - result: function (replacement) { - if (replacement == null) { - throw new System.ArgumentNullException.$ctor1("replacement"); - } - - if (this._regex == null) { - throw new System.NotSupportedException.$ctor1("Result cannot be called on a failed Match."); - } - - var repl = System.Text.RegularExpressions.RegexParser.parseReplacement(replacement, this._regex._caps, this._regex._capsize, this._regex._capnames, this._regex._options); - //TODO: cache - - return repl.replacement(this); - }, - - _isMatched: function (cap) { - return cap < this._matchcount.length && this._matchcount[cap] > 0 && this._matches[cap][this._matchcount[cap] * 2 - 1] !== (-3 + 1); - }, - - _addMatch: function (cap, start, len) { - if (this._matches[cap] == null) { - this._matches[cap] = new Array(2); - } - - var capcount = this._matchcount[cap]; - - if (capcount * 2 + 2 > this._matches[cap].length) { - var oldmatches = this._matches[cap]; - var newmatches = new Array(capcount * 8); - var j; - - for (j = 0; j < capcount * 2; j++) { - newmatches[j] = oldmatches[j]; - } - - this._matches[cap] = newmatches; - } - - this._matches[cap][capcount * 2] = start; - this._matches[cap][capcount * 2 + 1] = len; - this._matchcount[cap] = capcount + 1; - }, - - _tidy: function (textpos) { - var interval = this._matches[0]; - this._index = interval[0]; - this._length = interval[1]; - this._textpos = textpos; - this._capcount = this._matchcount[0]; - }, - - _groupToStringImpl: function (groupnum) { - var c = this._matchcount[groupnum]; - - if (c === 0) { - return ""; - } - - var matches = this._matches[groupnum]; - var capIndex = matches[(c - 1) * 2]; - var capLength = matches[(c * 2) - 1]; - - return this._text.slice(capIndex, capIndex + capLength); - }, - - _lastGroupToStringImpl: function () { - return this._groupToStringImpl(this._matchcount.length - 1); - } - }); - - H5.define("System.Text.RegularExpressions.MatchSparse", { - inherits: function () { - return [System.Text.RegularExpressions.Match]; - }, - - _caps: null, - - ctor: function (regex, caps, capcount, text, begpos, len, startpos) { - this.$initialize(); - var scope = System.Text.RegularExpressions; - scope.Match.ctor.call(this, regex, capcount, text, begpos, len, startpos); - - this._caps = caps; - }, - - getGroups: function () { - if (this._groupColl == null) { - this._groupColl = new System.Text.RegularExpressions.GroupCollection(this, this._caps); - } - - return this._groupColl; - }, - }); - - // @source RegexMatchCollection.js - - H5.define("System.Text.RegularExpressions.MatchCollection", { - inherits: function () { - return [System.Collections.ICollection]; - }, - - config: { - properties: { - Count: { - get: function () { - return this.getCount(); - } - } - }, - alias: [ - "GetEnumerator", "System$Collections$IEnumerable$GetEnumerator", - "getCount", "System$Collections$ICollection$getCount", - "Count", "System$Collections$ICollection$Count", - "copyTo", "System$Collections$ICollection$copyTo" - ] - }, - - _regex: null, - _input: null, - _beginning: 0, - _length: 0, - _startat: 0, - _prevlen: 0, - _matches: null, - _done: false, - - ctor: function (regex, input, beginning, length, startat) { - this.$initialize(); - if (startat < 0 || startat > input.Length) { - throw new System.ArgumentOutOfRangeException.$ctor1("startat"); - } - - this._regex = regex; - this._input = input; - this._beginning = beginning; - this._length = length; - this._startat = startat; - this._prevlen = -1; - this._matches = []; - }, - - getCount: function () { - if (!this._done) { - this._getMatch(0x7FFFFFFF); - } - - return this._matches.length; - }, - - getSyncRoot: function () { - return this; - }, - - getIsSynchronized: function () { - return false; - }, - - getIsReadOnly: function () { - return true; - }, - - get: function (i) { - var match = this._getMatch(i); - - if (match == null) { - throw new System.ArgumentOutOfRangeException.$ctor1("i"); - } - - return match; - }, - - copyTo: function (array, arrayIndex) { - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - var count = this.getCount(); - - if (array.length < arrayIndex + count) { - throw new System.IndexOutOfRangeException(); - } - - var match; - var i; - var j; - - for (i = arrayIndex, j = 0; j < count; i++, j++) { - match = this._getMatch(j); - System.Array.set(array, match, [i]); - } - }, - - GetEnumerator: function () { - return new System.Text.RegularExpressions.MatchEnumerator(this); - }, - - _getMatch: function (i) { - if (i < 0) { - return null; - } - - if (this._matches.length > i) { - return this._matches[i]; - } - - if (this._done) { - return null; - } - - var match; - - do { - match = this._regex._runner.run(false, this._prevLen, this._input, this._beginning, this._length, this._startat); - if (!match.getSuccess()) { - this._done = true; - return null; - } - - this._matches.push(match); - - this._prevLen = match._length; - this._startat = match._textpos; - } while (this._matches.length <= i); - - return match; - } - }); - - H5.define("System.Text.RegularExpressions.MatchEnumerator", { - inherits: function () { - return [System.Collections.IEnumerator]; - }, - - config: { - properties: { - Current: { - get: function () { - return this.getCurrent(); - } - } - }, - - alias: [ - "getCurrent", "System$Collections$IEnumerator$getCurrent", - "moveNext", "System$Collections$IEnumerator$moveNext", - "reset", "System$Collections$IEnumerator$reset", - "Current", "System$Collections$IEnumerator$Current" - ] - }, - - _matchcoll: null, - _match: null, - _curindex: 0, - _done: false, - - ctor: function (matchColl) { - this.$initialize(); - this._matchcoll = matchColl; - }, - - moveNext: function () { - if (this._done) { - return false; - } - - this._match = this._matchcoll._getMatch(this._curindex); - this._curindex++; - - if (this._match == null) { - this._done = true; - - return false; - } - - return true; - }, - - getCurrent: function () { - if (this._match == null) { - throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished."); - } - - return this._match; - }, - - reset: function () { - this._curindex = 0; - this._done = false; - this._match = null; - } - }); - - // @source RegexOptions.js - - H5.define("System.Text.RegularExpressions.RegexOptions", { - statics: { - None: 0x0000, - IgnoreCase: 0x0001, - Multiline: 0x0002, - ExplicitCapture: 0x0004, - Compiled: 0x0008, - Singleline: 0x0010, - IgnorePatternWhitespace: 0x0020, - RightToLeft: 0x0040, - ECMAScript: 0x0100, - CultureInvariant: 0x0200 - }, - - $kind: "enum", - $flags: true - }); - - // @source RegexRunner.js - - H5.define("System.Text.RegularExpressions.RegexRunner", { - statics: {}, - - _runregex: null, - _netEngine: null, - - _runtext: "", // text to search - _runtextpos: 0, // current position in text - - _runtextbeg: 0, // beginning of text to search - _runtextend: 0, // end of text to search - _runtextstart: 0, // starting point for search - _quick: false, // true value means IsMatch method call - _prevlen: 0, - - ctor: function (regex) { - this.$initialize(); - - if (regex == null) { - throw new System.ArgumentNullException.$ctor1("regex"); - } - - this._runregex = regex; - - var options = regex.getOptions(); - var optionsEnum = System.Text.RegularExpressions.RegexOptions; - - var isCaseInsensitive = (options & optionsEnum.IgnoreCase) === optionsEnum.IgnoreCase; - var isMultiline = (options & optionsEnum.Multiline) === optionsEnum.Multiline; - var isSingleline = (options & optionsEnum.Singleline) === optionsEnum.Singleline; - var isIgnoreWhitespace = (options & optionsEnum.IgnorePatternWhitespace) === optionsEnum.IgnorePatternWhitespace; - var isExplicitCapture = (options & optionsEnum.ExplicitCapture) === optionsEnum.ExplicitCapture; - - var timeoutMs = regex._matchTimeout.getTotalMilliseconds(); - - this._netEngine = new System.Text.RegularExpressions.RegexEngine(regex._pattern, isCaseInsensitive, isMultiline, isSingleline, isIgnoreWhitespace, isExplicitCapture, timeoutMs); - }, - - run: function (quick, prevlen, input, beginning, length, startat) { - if (startat < 0 || startat > input.Length) { - throw new System.ArgumentOutOfRangeException.$ctor4("start", "Start index cannot be less than 0 or greater than input length."); - } - - if (length < 0 || length > input.Length) { - throw new ArgumentOutOfRangeException("length", "Length cannot be less than 0 or exceed input length."); - } - - this._runtext = input; - this._runtextbeg = beginning; - this._runtextend = beginning + length; - this._runtextstart = startat; - this._quick = quick; - this._prevlen = prevlen; - - var stoppos; - var bump; - - if (this._runregex.getRightToLeft()) { - stoppos = this._runtextbeg; - bump = -1; - } else { - stoppos = this._runtextend; - bump = 1; - } - - if (this._prevlen === 0) { - if (this._runtextstart === stoppos) { - return System.Text.RegularExpressions.Match.getEmpty(); - } - - this._runtextstart += bump; - } - - // Execute Regex: - var jsMatch = this._netEngine.match(this._runtext, this._runtextstart); - - // Convert the results: - var result = this._convertNetEngineResults(jsMatch); - return result; - }, - - parsePattern: function () { - var result = this._netEngine.parsePattern(); - - return result; - }, - - _convertNetEngineResults: function (jsMatch) { - if (jsMatch.success && this._quick) { - return null; // in quick mode, a successful match returns null - } - - if (!jsMatch.success) { - return System.Text.RegularExpressions.Match.getEmpty(); - } - - var patternInfo = this.parsePattern(); - var match; - - if (patternInfo.sparseSettings.isSparse) { - match = new System.Text.RegularExpressions.MatchSparse(this._runregex, patternInfo.sparseSettings.sparseSlotMap, jsMatch.groups.length, this._runtext, 0, this._runtext.length, this._runtextstart); - } else { - match = new System.Text.RegularExpressions.Match(this._runregex, jsMatch.groups.length, this._runtext, 0, this._runtext.length, this._runtextstart); - } - - var jsGroup; - var jsCapture; - var grOrder; - var i; - var j; - - for (i = 0; i < jsMatch.groups.length; i++) { - jsGroup = jsMatch.groups[i]; - - // Paste group index/length according to group ordering: - grOrder = 0; - - if (jsGroup.descriptor != null) { - grOrder = this._runregex.groupNumberFromName(jsGroup.descriptor.name); - } - - for (j = 0; j < jsGroup.captures.length; j++) { - jsCapture = jsGroup.captures[j]; - match._addMatch(grOrder, jsCapture.capIndex, jsCapture.capLength); - } - } - - var textEndPos = jsMatch.capIndex + jsMatch.capLength; - - match._tidy(textEndPos); - - return match; - } - }); - - // @source RegexParser.js - - H5.define("System.Text.RegularExpressions.RegexParser", { - statics: { - _Q: 5, // quantifier - _S: 4, // ordinary stopper - _Z: 3, // ScanBlank stopper - _X: 2, // whitespace - _E: 1, // should be escaped - - _category: [ - //0 1 2 3 4 5 6 7 8 9 A B C D E F 0 1 2 3 4 5 6 7 8 9 A B C D E F - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - //! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? - 2, 0, 0, 3, 4, 0, 0, 0, 4, 4, 5, 5, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, - //@ 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 [ \ ] ^ _ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 0, - //' 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 { | } ~ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0 - ], - - escape: function (input) { - var sb; - var ch; - var lastpos; - var i; - - for (i = 0; i < input.length; i++) { - if (System.Text.RegularExpressions.RegexParser._isMetachar(input[i])) { - sb = ""; - ch = input[i]; - - sb += input.slice(0, i); - - do { - sb += "\\"; - - switch (ch) { - case "\n": - ch = "n"; - break; - case "\r": - ch = "r"; - break; - case "\t": - ch = "t"; - break; - case "\f": - ch = "f"; - break; - } - - sb += ch; - i++; - lastpos = i; - - while (i < input.length) { - ch = input[i]; - - if (System.Text.RegularExpressions.RegexParser._isMetachar(ch)) { - break; - } - - i++; - } - - sb += input.slice(lastpos, i); - } while (i < input.length); - - return sb; - } - } - - return input; - }, - - unescape: function (input) { - var culture = System.Globalization.CultureInfo.invariantCulture; - var sb; - var lastpos; - var i; - var p; - - for (i = 0; i < input.length; i++) { - if (input[i] === "\\") { - sb = ""; - p = new System.Text.RegularExpressions.RegexParser(culture); - p._setPattern(input); - - sb += input.slice(0, i); - - do { - i++; - - p._textto(i); - - if (i < input.length) { - sb += p._scanCharEscape(); - } - - i = p._textpos(); - lastpos = i; - - while (i < input.length && input[i] !== "\\") { - i++; - } - - sb += input.slice(lastpos, i); - } while (i < input.length); - - return sb; - } - } - - return input; - }, - - parseReplacement: function (rep, caps, capsize, capnames, op) { - var culture = System.Globalization.CultureInfo.getCurrentCulture(); // TODO: InvariantCulture - var p = new System.Text.RegularExpressions.RegexParser(culture); - - p._options = op; - p._noteCaptures(caps, capsize, capnames); - p._setPattern(rep); - - var root = p._scanReplacement(); - - return new System.Text.RegularExpressions.RegexReplacement(rep, root, caps); - }, - - _isMetachar: function (ch) { - var code = ch.charCodeAt(0); - - return (code <= "|".charCodeAt(0) && System.Text.RegularExpressions.RegexParser._category[code] >= System.Text.RegularExpressions.RegexParser._E); - } - }, - - _caps: null, - _capsize: 0, - _capnames: null, - _pattern: "", - _currentPos: 0, - _concatenation: null, - _culture: null, - - config: { - init: function () { - this._options = System.Text.RegularExpressions.RegexOptions.None; - } - }, - - ctor: function (culture) { - this.$initialize(); - this._culture = culture; - this._caps = {}; - }, - - _noteCaptures: function (caps, capsize, capnames) { - this._caps = caps; - this._capsize = capsize; - this._capnames = capnames; - }, - - _setPattern: function (pattern) { - if (pattern == null) { - pattern = ""; - } - - this._pattern = pattern || ""; - this._currentPos = 0; - }, - - _scanReplacement: function () { - this._concatenation = new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Concatenate, this._options); - var c; - var startpos; - var dollarNode; - - while (true) { - c = this._charsRight(); - - if (c === 0) { - break; - } - - startpos = this._textpos(); - - while (c > 0 && this._rightChar() !== "$") { - this._moveRight(); - c--; - } - - this._addConcatenate(startpos, this._textpos() - startpos); - - if (c > 0) { - if (this._moveRightGetChar() === "$") { - dollarNode = this._scanDollar(); - this._concatenation.addChild(dollarNode); - } - } - } - - return this._concatenation; - }, - - _addConcatenate: function (pos, cch /*, bool isReplacement*/ ) { - if (cch === 0) { - return; - } - - var node; - - if (cch > 1) { - var str = this._pattern.slice(pos, pos + cch); - - node = new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Multi, this._options, str); - } else { - var ch = this._pattern[pos]; - - node = new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One, this._options, ch); - } - - this._concatenation.addChild(node); - }, - - _useOptionE: function () { - return (this._options & System.Text.RegularExpressions.RegexOptions.ECMAScript) !== 0; - }, - - _makeException: function (message) { - return new System.ArgumentException("Incorrect pattern. " + message); - }, - - _scanDollar: function () { - var maxValueDiv10 = 214748364; // Int32.MaxValue / 10; - var maxValueMod10 = 7; // Int32.MaxValue % 10; - - if (this._charsRight() === 0) { - return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One, this._options, "$"); - } - - var ch = this._rightChar(); - var angled; - var backpos = this._textpos(); - var lastEndPos = backpos; - - // Note angle - if (ch === "{" && this._charsRight() > 1) { - angled = true; - this._moveRight(); - ch = this._rightChar(); - } else { - angled = false; - } - - // Try to parse backreference: \1 or \{1} or \{cap} - - var capnum; - var digit; - - if (ch >= "0" && ch <= "9") { - if (!angled && this._useOptionE()) { - capnum = -1; - var newcapnum = ch - "0"; - - this._moveRight(); - - if (this._isCaptureSlot(newcapnum)) { - capnum = newcapnum; - lastEndPos = this._textpos(); - } - - while (this._charsRight() > 0 && (ch = this._rightChar()) >= "0" && ch <= "9") { - digit = ch - "0"; - if (newcapnum > (maxValueDiv10) || (newcapnum === (maxValueDiv10) && digit > (maxValueMod10))) { - throw this._makeException("Capture group is out of range."); - } - - newcapnum = newcapnum * 10 + digit; - - this._moveRight(); - - if (this._isCaptureSlot(newcapnum)) { - capnum = newcapnum; - lastEndPos = this._textpos(); - } - } - this._textto(lastEndPos); - - if (capnum >= 0) { - return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref, this._options, capnum); - } - } else { - capnum = this._scanDecimal(); - - if (!angled || this._charsRight() > 0 && this._moveRightGetChar() === "}") { - if (this._isCaptureSlot(capnum)) { - return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref, this._options, capnum); - } - } - } - } else if (angled && this._isWordChar(ch)) { - var capname = this._scanCapname(); - - if (this._charsRight() > 0 && this._moveRightGetChar() === "}") { - if (this._isCaptureName(capname)) { - var captureSlot = this._captureSlotFromName(capname); - - return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref, this._options, captureSlot); - } - } - } else if (!angled) { - capnum = 1; - - switch (ch) { - case "$": - this._moveRight(); - return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One, this._options, "$"); - - case "&": - capnum = 0; - break; - - case "`": - capnum = System.Text.RegularExpressions.RegexReplacement.LeftPortion; - break; - - case "\'": - capnum = System.Text.RegularExpressions.RegexReplacement.RightPortion; - break; - - case "+": - capnum = System.Text.RegularExpressions.RegexReplacement.LastGroup; - break; - - case "_": - capnum = System.Text.RegularExpressions.RegexReplacement.WholeString; - break; - } - - if (capnum !== 1) { - this._moveRight(); - - return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Ref, this._options, capnum); - } - } - - // unrecognized $: literalize - - this._textto(backpos); - - return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.One, this._options, "$"); - }, - - _scanDecimal: function () { - // Scans any number of decimal digits (pegs value at 2^31-1 if too large) - - var maxValueDiv10 = 214748364; // Int32.MaxValue / 10; - var maxValueMod10 = 7; // Int32.MaxValue % 10; - var i = 0; - var ch; - var d; - - while (this._charsRight() > 0) { - ch = this._rightChar(); - - if (ch < "0" || ch > "9") { - break; - } - - d = ch - "0"; - - this._moveRight(); - - if (i > (maxValueDiv10) || (i === (maxValueDiv10) && d > (maxValueMod10))) { - throw this._makeException("Capture group is out of range."); - } - - i *= 10; - i += d; - } - - return i; - }, - - _scanOctal: function () { - var d; - var i; - var c; - - // Consume octal chars only up to 3 digits and value 0377 - - c = 3; - - if (c > this._charsRight()) { - c = this._charsRight(); - } - - for (i = 0; c > 0 && (d = this._rightChar() - "0") <= 7; c -= 1) { - this._moveRight(); - - i *= 8; - i += d; - - if (this._useOptionE() && i >= 0x20) { - break; - } - } - - // Octal codes only go up to 255. Any larger and the behavior that Perl follows - // is simply to truncate the high bits. - i &= 0xFF; - - return String.fromCharCode(i); - }, - - _scanHex: function (c) { - var i; - var d; - - i = 0; - - if (this._charsRight() >= c) { - for (; c > 0 && ((d = this._hexDigit(this._moveRightGetChar())) >= 0); c -= 1) { - i *= 0x10; - i += d; - } - } - - if (c > 0) { - throw this._makeException("Insufficient hexadecimal digits."); - } - - return i; - }, - - _hexDigit: function (ch) { - var d; - - var code = ch.charCodeAt(0); - - if ((d = code - "0".charCodeAt(0)) <= 9) { - return d; - } - - if ((d = code - "a".charCodeAt(0)) <= 5) { - return d + 0xa; - } - - if ((d = code - "A".charCodeAt(0)) <= 5) { - return d + 0xa; - } - - return -1; - }, - - _scanControl: function () { - if (this._charsRight() <= 0) { - throw this._makeException("Missing control character."); - } - - var ch = this._moveRightGetChar(); - - // \ca interpreted as \cA - - var code = ch.charCodeAt(0); - - if (code >= "a".charCodeAt(0) && code <= "z".charCodeAt(0)) { - code = code - ("a".charCodeAt(0) - "A".charCodeAt(0)); - } - - if ((code = (code - "@".charCodeAt(0))) < " ".charCodeAt(0)) { - return String.fromCharCode(code); - } - - throw this._makeException("Unrecognized control character."); - }, - - _scanCapname: function () { - var startpos = this._textpos(); - - while (this._charsRight() > 0) { - if (!this._isWordChar(this._moveRightGetChar())) { - this._moveLeft(); - - break; - } - } - - return _pattern.slice(startpos, this._textpos()); - }, - - _scanCharEscape: function () { - var ch = this._moveRightGetChar(); - - if (ch >= "0" && ch <= "7") { - this._moveLeft(); - - return this._scanOctal(); - } - - switch (ch) { - case "x": - return this._scanHex(2); - case "u": - return this._scanHex(4); - case "a": - return "\u0007"; - case "b": - return "\b"; - case "e": - return "\u001B"; - case "f": - return "\f"; - case "n": - return "\n"; - case "r": - return "\r"; - case "t": - return "\t"; - case "v": - return "\u000B"; - case "c": - return this._scanControl(); - default: - var isInvalidBasicLatin = ch === '8' || ch === '9' || ch === '_'; - if (isInvalidBasicLatin || (!this._useOptionE() && this._isWordChar(ch))) { - throw this._makeException("Unrecognized escape sequence \\" + ch + "."); - } - return ch; - } - }, - - _captureSlotFromName: function (capname) { - return this._capnames[capname]; - }, - - _isCaptureSlot: function (i) { - if (this._caps != null) { - return this._caps[i] != null; - } - - return (i >= 0 && i < this._capsize); - }, - - _isCaptureName: function (capname) { - if (this._capnames == null) { - return false; - } - - return _capnames[capname] != null; - }, - - _isWordChar: function (ch) { - // Partial implementation, - // see the link for more details (http://referencesource.microsoft.com/#System/regex/system/text/regularexpressions/RegexParser.cs,1156) - return System.Char.isLetter(ch.charCodeAt(0)); - }, - - _charsRight: function () { - return this._pattern.length - this._currentPos; - }, - - _rightChar: function () { - return this._pattern[this._currentPos]; - }, - - _moveRightGetChar: function () { - return this._pattern[this._currentPos++]; - }, - - _moveRight: function () { - this._currentPos++; - }, - - _textpos: function () { - return this._currentPos; - }, - - _textto: function (pos) { - this._currentPos = pos; - }, - - _moveLeft: function () { - this._currentPos--; - } - }); - - // @source RegexNode.js - - H5.define("System.Text.RegularExpressions.RegexNode", { - statics: { - One: 9, // char a - Multi: 12, // string abcdef - Ref: 13, // index \1 - Empty: 23, // () - Concatenate: 25 // ab - }, - - _type: 0, - _str: null, - _children: null, - _next: null, - _m: 0, - - config: { - init: function () { - this._options = System.Text.RegularExpressions.RegexOptions.None; - } - }, - - ctor: function (type, options, arg) { - this.$initialize(); - this._type = type; - this._options = options; - - if (type === System.Text.RegularExpressions.RegexNode.Ref) { - this._m = arg; - } else { - this._str = arg || null; - } - }, - - addChild: function (newChild) { - if (this._children == null) { - this._children = []; - } - - var reducedChild = newChild._reduce(); - this._children.push(reducedChild); - reducedChild._next = this; - }, - - childCount: function () { - return this._children == null ? 0 : this._children.length; - }, - - child: function (i) { - return this._children[i]; - }, - - _reduce: function () { - // Warning: current implementation is just partial (for Replacement servicing) - - var n; - - switch (this._type) { - case System.Text.RegularExpressions.RegexNode.Concatenate: - n = this._reduceConcatenation(); - break; - - default: - n = this; - break; - } - - return n; - }, - - _reduceConcatenation: function () { - var wasLastString = false; - var optionsLast = 0; - var optionsAt; - var at; - var prev; - var i; - var j; - var k; - - if (this._children == null) { - return new System.Text.RegularExpressions.RegexNode(System.Text.RegularExpressions.RegexNode.Empty, this._options); - } - - for (i = 0, j = 0; i < this._children.length; i++, j++) { - at = this._children[i]; - - if (j < i) { - this._children[j] = at; - } - - if (at._type === System.Text.RegularExpressions.RegexNode.Concatenate && at._isRightToLeft()) { - for (k = 0; k < at._children.length; k++) { - at._children[k]._next = this; - } - - this._children.splice.apply(this._children, [i + 1, 0].concat(at._children)); // _children.InsertRange(i + 1, at._children); - j--; - } else if (at._type === System.Text.RegularExpressions.RegexNode.Multi || at._type === System.Text.RegularExpressions.RegexNode.One) { - // Cannot merge strings if L or I options differ - optionsAt = at._options & (System.Text.RegularExpressions.RegexOptions.RightToLeft | System.Text.RegularExpressions.RegexOptions.IgnoreCase); - - if (!wasLastString || optionsLast !== optionsAt) { - wasLastString = true; - optionsLast = optionsAt; - continue; - } - - prev = this._children[--j]; - - if (prev._type === System.Text.RegularExpressions.RegexNode.One) { - prev._type = System.Text.RegularExpressions.RegexNode.Multi; - prev._str = prev._str; - } - - if ((optionsAt & System.Text.RegularExpressions.RegexOptions.RightToLeft) === 0) { - prev._str += at._str; - } else { - prev._str = at._str + prev._str; - } - } else if (at._type === System.Text.RegularExpressions.RegexNode.Empty) { - j--; - } else { - wasLastString = false; - } - } - - if (j < i) { - this._children.splice(j, i - j); - } - - return this._stripEnation(System.Text.RegularExpressions.RegexNode.Empty); - }, - - _stripEnation: function (emptyType) { - switch (this.childCount()) { - case 0: - return new scope.RegexNode(emptyType, this._options); - case 1: - return this.child(0); - default: - return this; - } - }, - - _isRightToLeft: function () { - if ((this._options & System.Text.RegularExpressions.RegexOptions.RightToLeft) > 0) { - return true; - } - - return false; - }, - }); - - // @source RegexReplacement.js - - H5.define("System.Text.RegularExpressions.RegexReplacement", { - statics: { - replace: function (evaluator, regex, input, count, startat) { - if (evaluator == null) { - throw new System.ArgumentNullException.$ctor1("evaluator"); - } - - if (count < -1) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "Count cannot be less than -1."); - } - - if (startat < 0 || startat > input.length) { - throw new System.ArgumentOutOfRangeException.$ctor4("startat", "Start index cannot be less than 0 or greater than input length."); - } - - if (count === 0) { - return input; - } - - var match = regex.match(input, startat); - - if (!match.getSuccess()) { - return input; - } else { - var sb = ""; - var prevat; - var matchIndex; - var matchLength; - - if (!regex.getRightToLeft()) { - prevat = 0; - - do { - matchIndex = match.getIndex(); - matchLength = match.getLength(); - - if (matchIndex !== prevat) { - sb += input.slice(prevat, matchIndex); - } - - prevat = matchIndex + matchLength; - sb += evaluator(match); - - if (--count === 0) { - break; - } - - match = match.nextMatch(); - } while (match.getSuccess()); - - if (prevat < input.length) { - sb += input.slice(prevat, input.length); - } - } else { - var al = []; - - prevat = input.length; - - do { - matchIndex = match.getIndex(); - matchLength = match.getLength(); - - if (matchIndex + matchLength !== prevat) { - al.push(input.slice(matchIndex + matchLength, prevat)); - } - - prevat = matchIndex; - al.push(evaluator(match)); - - if (--count === 0) { - break; - } - - match = match.nextMatch(); - } while (match.getSuccess()); - - sb = new StringBuilder(); - - if (prevat > 0) { - sb += sb.slice(0, prevat); - } - - var i; - - for (i = al.length - 1; i >= 0; i--) { - sb += al[i]; - } - } - - return sb; - } - }, - - split: function (regex, input, count, startat) { - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "Count can't be less than 0."); - } - - if (startat < 0 || startat > input.length) { - throw new System.ArgumentOutOfRangeException.$ctor4("startat", "Start index cannot be less than 0 or greater than input length."); - } - - var result = []; - - if (count === 1) { - result.push(input); - - return result; - } - - --count; - var match = regex.match(input, startat); - - if (!match.getSuccess()) { - result.push(input); - } else { - var i; - var prevat; - var matchIndex; - var matchLength; - var matchGroups; - var matchGroupsCount; - - if (!regex.getRightToLeft()) { - prevat = 0; - - for (;;) { - matchIndex = match.getIndex(); - matchLength = match.getLength(); - matchGroups = match.getGroups(); - matchGroupsCount = matchGroups.getCount(); - - result.push(input.slice(prevat, matchIndex)); - prevat = matchIndex + matchLength; - - // add all matched capture groups to the list. - for (i = 1; i < matchGroupsCount; i++) { - if (match._isMatched(i)) { - result.push(matchGroups.get(i).toString()); - } - } - - --count; - if (count === 0) { - break; - } - - match = match.nextMatch(); - - if (!match.getSuccess()) { - break; - } - } - - result.push(input.slice(prevat, input.length)); - } else { - prevat = input.length; - - for (;;) { - matchIndex = match.getIndex(); - matchLength = match.getLength(); - matchGroups = match.getGroups(); - matchGroupsCount = matchGroups.getCount(); - - result.push(input.slice(matchIndex + matchLength, prevat)); - prevat = matchIndex; - - // add all matched capture groups to the list. - for (i = 1; i < matchGroupsCount; i++) { - if (match._isMatched(i)) { - result.push(matchGroups.get(i).toString()); - } - } - - --count; - if (count === 0) { - break; - } - - match = match.nextMatch(); - - if (!match.getSuccess()) { - break; - } - } - - result.push(input.slice(0, prevat)); - result.reverse(); - } - } - - return result; - }, - - Specials: 4, - LeftPortion: -1, - RightPortion: -2, - LastGroup: -3, - WholeString: -4 - }, - - _rep: "", - _strings: [], // table of string constants - _rules: [], // negative -> group #, positive -> string # - - ctor: function (rep, concat, caps) { - this.$initialize(); - this._rep = rep; - - if (concat._type !== System.Text.RegularExpressions.RegexNode.Concatenate) { - throw new System.ArgumentException.$ctor1("Replacement error."); - } - - var sb = ""; - var strings = []; - var rules = []; - var slot; - var child; - var i; - - for (i = 0; i < concat.childCount(); i++) { - child = concat.child(i); - - switch (child._type) { - case System.Text.RegularExpressions.RegexNode.Multi: - case System.Text.RegularExpressions.RegexNode.One: - sb += child._str; - break; - - case System.Text.RegularExpressions.RegexNode.Ref: - if (sb.length > 0) { - rules.push(strings.length); - strings.push(sb); - sb = ""; - } - - slot = child._m; - - if (caps != null && slot >= 0) { - slot = caps[slot]; - } - - rules.push(-System.Text.RegularExpressions.RegexReplacement.Specials - 1 - slot); - break; - default: - throw new System.ArgumentException.$ctor1("Replacement error."); - } - } - - if (sb.length > 0) { - rules.push(strings.length); - strings.push(sb); - } - - this._strings = strings; - this._rules = rules; - }, - - getPattern: function () { - return _rep; - }, - - replacement: function (match) { - return this._replacementImpl("", match); - }, - - replace: function (regex, input, count, startat) { - if (count < -1) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "Count cannot be less than -1."); - } - - if (startat < 0 || startat > input.length) { - throw new System.ArgumentOutOfRangeException.$ctor4("startat", "Start index cannot be less than 0 or greater than input length."); - } - - if (count === 0) { - return input; - } - - var match = regex.match(input, startat); - - if (!match.getSuccess()) { - return input; - } else { - var sb = ""; - var prevat; - var matchIndex; - var matchLength; - - if (!regex.getRightToLeft()) { - prevat = 0; - - do { - matchIndex = match.getIndex(); - matchLength = match.getLength(); - - if (matchIndex !== prevat) { - sb += input.slice(prevat, matchIndex); - } - - prevat = matchIndex + matchLength; - sb = this._replacementImpl(sb, match); - - if (--count === 0) { - break; - } - - match = match.nextMatch(); - } while (match.getSuccess()); - - if (prevat < input.length) { - sb += input.slice(prevat, input.length); - } - } else { - var al = []; - - prevat = input.length; - - do { - matchIndex = match.getIndex(); - matchLength = match.getLength(); - - if (matchIndex + matchLength !== prevat) { - al.push(input.slice(matchIndex + matchLength, prevat)); - } - - prevat = matchIndex; - this._replacementImplRTL(al, match); - - if (--count === 0) { - break; - } - - match = match.nextMatch(); - } while (match.getSuccess()); - - if (prevat > 0) { - sb += sb.slice(0, prevat); - } - - var i; - - for (i = al.length - 1; i >= 0; i--) { - sb += al[i]; - } - } - - return sb; - } - }, - - _replacementImpl: function (sb, match) { - var specials = System.Text.RegularExpressions.RegexReplacement.Specials; - var r; - var i; - - for (i = 0; i < this._rules.length; i++) { - r = this._rules[i]; - - if (r >= 0) { - // string lookup - sb += this._strings[r]; - } else if (r < -specials) { - // group lookup - sb += match._groupToStringImpl(-specials - 1 - r); - } else { - // special insertion patterns - switch (-specials - 1 - r) { - case System.Text.RegularExpressions.RegexReplacement.LeftPortion: - sb += match._getLeftSubstring(); - break; - case System.Text.RegularExpressions.RegexReplacement.RightPortion: - sb += match._getRightSubstring(); - break; - case System.Text.RegularExpressions.RegexReplacement.LastGroup: - sb += match._lastGroupToStringImpl(); - break; - case System.Text.RegularExpressions.RegexReplacement.WholeString: - sb += match._getOriginalString(); - break; - } - } - } - - return sb; - }, - - _replacementImplRTL: function (al, match) { - var specials = System.Text.RegularExpressions.RegexReplacement.Specials; - var r; - var i; - - for (i = _rules.length - 1; i >= 0; i--) { - r = this._rules[i]; - - if (r >= 0) { - // string lookup - al.push(this._strings[r]); - } else if (r < -specials) { - // group lookup - al.push(match._groupToStringImpl(-specials - 1 - r)); - } else { - // special insertion patterns - switch (-specials - 1 - r) { - case System.Text.RegularExpressions.RegexReplacement.LeftPortion: - al.push(match._getLeftSubstring()); - break; - case System.Text.RegularExpressions.RegexReplacement.RightPortion: - al.push(match._getRightSubstring()); - break; - case System.Text.RegularExpressions.RegexReplacement.LastGroup: - al.push(match._lastGroupToStringImpl()); - break; - case System.Text.RegularExpressions.RegexReplacement.WholeString: - al.push(match._getOriginalString()); - break; - } - } - } - } - }); - - // @source RegexEngine.js - - H5.define("System.Text.RegularExpressions.RegexEngine", { - _pattern: "", - _patternInfo: null, - - _text: "", - _textStart: 0, - _timeoutMs: -1, - _timeoutTime: -1, - _settings: null, - - _branchType: { - base: 0, - offset: 1, - lazy: 2, - greedy: 3, - or: 4 - }, - - _branchResultKind: { - ok: 1, - endPass: 2, - nextPass: 3, - nextBranch: 4 - }, - - // ============================================================================================ - // Public functions - // ============================================================================================ - ctor: function (pattern, isCaseInsensitive, isMultiLine, isSingleline, isIgnoreWhitespace, isExplicitCapture, timeoutMs) { - this.$initialize(); - - if (pattern == null) { - throw new System.ArgumentNullException.$ctor1("pattern"); - } - - this._pattern = pattern; - this._timeoutMs = timeoutMs; - this._settings = { - ignoreCase: isCaseInsensitive, - multiline: isMultiLine, - singleline: isSingleline, - ignoreWhitespace: isIgnoreWhitespace, - explicitCapture: isExplicitCapture - }; - }, - - match: function (text, textStart) { - if (text == null) { - throw new System.ArgumentNullException.$ctor1("text"); - } - - if (textStart != null && (textStart < 0 || textStart > text.length)) { - throw new System.ArgumentOutOfRangeException.$ctor4("textStart", "Start index cannot be less than 0 or greater than input length."); - } - - this._text = text; - this._textStart = textStart; - this._timeoutTime = this._timeoutMs > 0 ? new Date().getTime() + System.Convert.toInt32(this._timeoutMs + 0.5) : -1; - - // Get group descriptors - var patternInfo = this.parsePattern(); - - if (patternInfo.shouldFail) { - return this._getEmptyMatch(); - } - - this._checkTimeout(); - - var scanRes = this._scanAndTransformResult(textStart, patternInfo.tokens, false, null); - - return scanRes; - }, - - parsePattern: function () { - if (this._patternInfo == null) { - var parser = System.Text.RegularExpressions.RegexEngineParser; - var patternInfo = parser.parsePattern(this._pattern, this._cloneSettings(this._settings)); - this._patternInfo = patternInfo; - } - - return this._patternInfo; - }, - - // ============================================================================================ - // Engine main logic - // ============================================================================================ - _scanAndTransformResult: function (textPos, tokens, noOffset, desiredLen) { - var state = this._scan(textPos, this._text.length, tokens, noOffset, desiredLen); - var transformedRes = this._collectScanResults(state, textPos); - return transformedRes; - }, - - _scan: function (textPos, textEndPos, tokens, noOffset, desiredLen) { - var resKind = this._branchResultKind; - var branches = []; - branches.grCaptureCache = {}; - - var branch = null; - var res = null; - - // Empty pattern case: - if (tokens.length === 0) { - var state = new System.Text.RegularExpressions.RegexEngineState(); - state.capIndex = textPos; - state.txtIndex = textPos; - state.capLength = 0; - - return state; - } - - // Init base branch: - var baseBranchType = noOffset ? this._branchType.base : this._branchType.offset; - - var endPos = this._patternInfo.isContiguous ? textPos : textEndPos; - var baseBranch = new System.Text.RegularExpressions.RegexEngineBranch(baseBranchType, textPos, textPos, endPos); - - baseBranch.pushPass(0, tokens, this._cloneSettings(this._settings)); - baseBranch.started = true; - baseBranch.state.txtIndex = textPos; - branches.push(baseBranch); - - while (branches.length) { - branch = branches[branches.length - 1]; - - res = this._scanBranch(textEndPos, branches, branch); - - if (res === resKind.ok && (desiredLen == null || branch.state.capLength === desiredLen)) { - return branch.state; - } - - //if (!this.branchLimit) { - // this.branchLimit = 1; - //} else { - // this.branchLimit++; - // if (this.branchLimit > 200000) { - // alert("Too many branches :("); - // break; - // } - //} - - this._advanceToNextBranch(branches, branch); - this._checkTimeout(); - } - - return null; - }, - - _scanBranch: function (textEndPos, branches, branch) { - var resKind = this._branchResultKind; - var pass; - var res; - - if (branch.mustFail) { - branch.mustFail = false; - - return resKind.nextBranch; - } - - while (branch.hasPass()) { - pass = branch.peekPass(); - - if (pass.tokens == null || pass.tokens.length === 0) { - res = resKind.endPass; - } else { - // Add alternation branches before scanning: - if (this._addAlternationBranches(branches, branch, pass) === resKind.nextBranch) { - return resKind.nextBranch; - } - - // Scan: - res = this._scanPass(textEndPos, branches, branch, pass); - } - - switch (res) { - case resKind.nextBranch: - // Move to the next branch: - return res; - - case resKind.nextPass: - // switch to the recently added pass - continue; - - case resKind.endPass: - case resKind.ok: - // End of pass has been reached: - branch.popPass(); - break; - - default: - throw new System.InvalidOperationException.$ctor1("Unexpected branch result."); - } - } - - return resKind.ok; - }, - - _scanPass: function (textEndPos, branches, branch, pass) { - var resKind = this._branchResultKind; - var passEndIndex = pass.tokens.length; - var token; - var probe; - var res; - - while (pass.index < passEndIndex) { - token = pass.tokens[pass.index]; - probe = pass.probe; - - // Add probing: - if (probe == null) { - if (this._addBranchBeforeProbing(branches, branch, pass, token)) { - return resKind.nextBranch; - } - } else { - if (probe.value < probe.min || probe.forced) { - res = this._scanToken(textEndPos, branches, branch, pass, token); - - if (res !== resKind.ok) { - return res; - } - - probe.value += 1; - probe.forced = false; - - continue; - } - - this._addBranchAfterProbing(branches, branch, pass, probe); - - if (probe.forced) { - continue; - } - - pass.probe = null; - pass.index++; - - continue; - } - - // Process the token: - res = this._scanToken(textEndPos, branches, branch, pass, token); - - // Process the result of the token scan: - switch (res) { - case resKind.nextBranch: - case resKind.nextPass: - case resKind.endPass: - return res; - - case resKind.ok: - // Advance to the next token within the current pass: - pass.index++; - break; - - default: - throw new System.InvalidOperationException.$ctor1("Unexpected branch-pass result."); - } - } - - return resKind.ok; - }, - - _addAlternationBranches: function (branches, branch, pass) { - var tokenTypes = System.Text.RegularExpressions.RegexEngineParser.tokenTypes; - var branchTypes = this._branchType; - var passEndIndex = pass.tokens.length; - var resKind = this._branchResultKind; - var orIndexes; - var newBranch; - var newPass; - var token; - var i; - - // Scan potential alternations: - if (!pass.alternationHandled && !pass.tokens.noAlternation) { - orIndexes = [-1]; - - for (i = 0; i < passEndIndex; i++) { - token = pass.tokens[i]; - - if (token.type === tokenTypes.alternation) { - orIndexes.push(i); - } - } - - if (orIndexes.length > 1) { - for (i = 0; i < orIndexes.length; i++) { - newBranch = new System.Text.RegularExpressions.RegexEngineBranch(branchTypes.or, i, 0, orIndexes.length, branch.state); - newBranch.isNotFailing = true; - newPass = newBranch.peekPass(); - newPass.alternationHandled = true; - newPass.index = orIndexes[i] + 1; - branches.splice(branches.length - i, 0, newBranch); - } - - // The last branch must fail: - branches[branches.length - orIndexes.length].isNotFailing = false; - - // The parent branch must be ended up immediately: - branch.mustFail = true; - - pass.alternationHandled = true; - - return resKind.nextBranch; - } else { - pass.tokens.noAlternation = true; - } - } - - return resKind.ok; - }, - - _addBranchBeforeProbing: function (branches, branch, pass, token) { - // Add +, *, ? branches: - var probe = this._tryGetTokenProbe(token); - - if (probe == null) { - return false; - } - - pass.probe = probe; - - var branchType = probe.isLazy ? this._branchType.lazy : this._branchType.greedy; - var newBranch = new System.Text.RegularExpressions.RegexEngineBranch(branchType, probe.value, probe.min, probe.max, branch.state); - - branches.push(newBranch); - - return true; - }, - - _addBranchAfterProbing: function (branches, branch, pass, probe) { - if (probe.isLazy) { - if (probe.value + 1 <= probe.max) { - var lazyBranch = branch.clone(); - var lazyProbe = lazyBranch.peekPass().probe; - - lazyBranch.value += 1; - lazyProbe.forced = true; - - // add to the left from the current branch - branches.splice(branches.length - 1, 0, lazyBranch); - branch.isNotFailing = true; - } - } else { - if (probe.value + 1 <= probe.max) { - var greedyBranch = branch.clone(); - - greedyBranch.started = true; - greedyBranch.peekPass().probe = null; - greedyBranch.peekPass().index++; - branches.splice(branches.length - 1, 0, greedyBranch); - - probe.forced = true; - branch.value += 1; - branch.isNotFailing = true; - } - } - }, - - _tryGetTokenProbe: function (token) { - var qtoken = token.qtoken; - - if (qtoken == null) { - return null; - } - - var tokenTypes = System.Text.RegularExpressions.RegexEngineParser.tokenTypes; - var min; - var max; - - if (qtoken.type === tokenTypes.quantifier) { - switch (qtoken.value) { - case "*": - case "*?": - min = 0; - max = 2147483647; - break; - - case "+": - case "+?": - min = 1; - max = 2147483647; - break; - - case "?": - case "??": - min = 0; - max = 1; - break; - - default: - throw new System.InvalidOperationException.$ctor1("Unexpected quantifier value."); - } - } else if (qtoken.type === tokenTypes.quantifierN) { - min = qtoken.data.n; - max = qtoken.data.n; - } else if (qtoken.type === tokenTypes.quantifierNM) { - min = qtoken.data.n; - max = qtoken.data.m != null ? qtoken.data.m : 2147483647; - } else { - return null; - } - - var probe = new System.Text.RegularExpressions.RegexEngineProbe(min, max, 0, qtoken.data.isLazy); - return probe; - }, - - _advanceToNextBranch: function (branches, branch) { - if (branches.length === 0) { - return; - } - - var lastBranch = branches[branches.length - 1]; - - if (!lastBranch.started) { - lastBranch.started = true; - return; - } - - if (branch !== lastBranch) { - throw new System.InvalidOperationException.$ctor1("Current branch is supposed to be the last one."); - } - - if (branches.length === 1 && branch.type === this._branchType.offset) { - branch.value++; - branch.state.txtIndex = branch.value; - branch.mustFail = false; - - // clear state: - branch.state.capIndex = null; - branch.state.capLength = 0; - branch.state.groups.length = 0; - branch.state.passes.length = 1; - branch.state.passes[0].clearState(this._cloneSettings(this._settings)); - - if (branch.value > branch.max) { - branches.pop(); - } - } else { - branches.pop(); - - if (!branch.isNotFailing) { - lastBranch = branches[branches.length - 1]; - this._advanceToNextBranch(branches, lastBranch); - - return; - } - } - }, - - _collectScanResults: function (state, textPos) { - var groupDescs = this._patternInfo.groups; - var text = this._text; - var processedGroupNames = {}; - var capGroups; - var capGroup; - var groupsMap = {}; - var groupDesc; - var capture; - var group; - var i; - - // Create Empty match object: - var match = this._getEmptyMatch(); - - if (state != null) { - capGroups = state.groups; - - // For successful match fill Match object: - this._fillMatch(match, state.capIndex, state.capLength, textPos); - - // Fill group captures: - for (i = 0; i < capGroups.length; i++) { - capGroup = capGroups[i]; - groupDesc = groupDescs[capGroup.rawIndex - 1]; - - if (groupDesc.constructs.skipCapture) { - continue; - } - - capture = { - capIndex: capGroup.capIndex, - capLength: capGroup.capLength, - value: text.slice(capGroup.capIndex, capGroup.capIndex + capGroup.capLength) - }; - - group = groupsMap[groupDesc.name]; - - if (group == null) { - group = { - capIndex: 0, - capLength: 0, - value: "", - success: false, - captures: [capture] - }; - - groupsMap[groupDesc.name] = group; - } else { - group.captures.push(capture); - } - } - - // Add groups to Match in the required order: - for (i = 0; i < groupDescs.length; i++) { - groupDesc = groupDescs[i]; - - if (groupDesc.constructs.skipCapture) { - continue; - } - - if (processedGroupNames[groupDesc.name] === true) { - continue; - } - - group = groupsMap[groupDesc.name]; - - if (group == null) { - group = { - capIndex: 0, - capLength: 0, - value: "", - success: false, - captures: [] - }; - } else { - // Update group values with the last capture info: - if (group.captures.length > 0) { - capture = group.captures[group.captures.length - 1]; - - group.capIndex = capture.capIndex; - group.capLength = capture.capLength; - group.value = capture.value; - group.success = true; - } - } - - processedGroupNames[groupDesc.name] = true; - group.descriptor = groupDesc; // TODO: check if we can get rid of this - match.groups.push(group); - } - } - - return match; - }, - - // ============================================================================================ - // Token processing - // ============================================================================================ - _scanToken: function (textEndPos, branches, branch, pass, token) { - var tokenTypes = System.Text.RegularExpressions.RegexEngineParser.tokenTypes; - var resKind = this._branchResultKind; - - switch (token.type) { - case tokenTypes.group: - case tokenTypes.groupImnsx: - case tokenTypes.alternationGroup: - return this._scanGroupToken(textEndPos, branches, branch, pass, token); - - case tokenTypes.groupImnsxMisc: - return this._scanGroupImnsxToken(token.group.constructs, pass.settings); - - case tokenTypes.charGroup: - return this._scanCharGroupToken(branches, branch, pass, token, false); - - case tokenTypes.charNegativeGroup: - return this._scanCharNegativeGroupToken(branches, branch, pass, token, false); - - case tokenTypes.escChar: - case tokenTypes.escCharOctal: - case tokenTypes.escCharHex: - case tokenTypes.escCharUnicode: - case tokenTypes.escCharCtrl: - return this._scanLiteral(textEndPos, branches, branch, pass, token.data.ch); - - case tokenTypes.escCharOther: - case tokenTypes.escCharClass: - return this._scanEscapeToken(branches, branch, pass, token); - - case tokenTypes.escCharClassCategory: - throw new System.NotSupportedException.$ctor1("Unicode Category constructions are not supported."); - - case tokenTypes.escCharClassBlock: - throw new System.NotSupportedException.$ctor1("Unicode Named block constructions are not supported."); - - case tokenTypes.escCharClassDot: - return this._scanDotToken(textEndPos, branches, branch, pass); - - case tokenTypes.escBackrefNumber: - return this._scanBackrefNumberToken(textEndPos, branches, branch, pass, token); - - case tokenTypes.escBackrefName: - return this._scanBackrefNameToken(textEndPos, branches, branch, pass, token); - - case tokenTypes.anchor: - case tokenTypes.escAnchor: - return this._scanAnchorToken(textEndPos, branches, branch, pass, token); - - case tokenTypes.groupConstruct: - case tokenTypes.groupConstructName: - case tokenTypes.groupConstructImnsx: - case tokenTypes.groupConstructImnsxMisc: - return resKind.ok; - - case tokenTypes.alternationGroupCondition: - case tokenTypes.alternationGroupRefNameCondition: - case tokenTypes.alternationGroupRefNumberCondition: - return this._scanAlternationConditionToken(textEndPos, branches, branch, pass, token); - - case tokenTypes.alternation: - return resKind.endPass; - - case tokenTypes.commentInline: - case tokenTypes.commentXMode: - return resKind.ok; - - default: - return this._scanLiteral(textEndPos, branches, branch, pass, token.value); - } - }, - - _scanGroupToken: function (textEndPos, branches, branch, pass, token) { - var tokenTypes = System.Text.RegularExpressions.RegexEngineParser.tokenTypes; - var resKind = this._branchResultKind; - var textIndex = branch.state.txtIndex; - - if (pass.onHold) { - if (token.type === tokenTypes.group) { - var rawIndex = token.group.rawIndex; - var capIndex = pass.onHoldTextIndex; - var capLength = textIndex - capIndex; - - // Cache value to avoid proceeding with the already checked route: - var tokenCache = branches.grCaptureCache[rawIndex]; - - if (tokenCache == null) { - tokenCache = {}; - branches.grCaptureCache[rawIndex] = tokenCache; - } - - var key = capIndex.toString() + "_" + capLength.toString(); - - if (tokenCache[key] == null) { - tokenCache[key] = true; - } else { - return resKind.nextBranch; - } - - if (!token.group.constructs.emptyCapture) { - if (token.group.isBalancing) { - branch.state.logCaptureGroupBalancing(token.group, capIndex); - } else { - branch.state.logCaptureGroup(token.group, capIndex, capLength); - } - } - } - - pass.onHold = false; - pass.onHoldTextIndex = -1; - - return resKind.ok; - } - - if (token.type === tokenTypes.group || - token.type === tokenTypes.groupImnsx) { - var constructs = token.group.constructs; - - // Update Pass settings: - this._scanGroupImnsxToken(constructs, pass.settings); - - // Scan Grouping constructs: - if (constructs.isPositiveLookahead || constructs.isNegativeLookahead || - constructs.isPositiveLookbehind || constructs.isNegativeLookbehind) { - var scanLookRes = this._scanLook(branch, textIndex, textEndPos, token); - - return scanLookRes; - } else if (constructs.isNonbacktracking) { - var scanNonBacktrackingRes = this._scanNonBacktracking(branch, textIndex, textEndPos, token); - - return scanNonBacktrackingRes; - } - } - - // Continue scanning a regular group: - pass.onHoldTextIndex = textIndex; - pass.onHold = true; - - branch.pushPass(0, token.children, this._cloneSettings(pass.settings)); - - return resKind.nextPass; - }, - - _scanGroupImnsxToken: function (constructs, settings) { - var resKind = this._branchResultKind; - - if (constructs.isIgnoreCase != null) { - settings.ignoreCase = constructs.isIgnoreCase; - } - - if (constructs.isMultiline != null) { - settings.multiline = constructs.isMultiline; - } - - if (constructs.isSingleLine != null) { - settings.singleline = constructs.isSingleLine; - } - - if (constructs.isIgnoreWhitespace != null) { - settings.ignoreWhitespace = constructs.isIgnoreWhitespace; - } - - if (constructs.isExplicitCapture != null) { - settings.explicitCapture = constructs.isExplicitCapture; - } - - return resKind.ok; - }, - - _scanAlternationConditionToken: function (textEndPos, branches, branch, pass, token) { - var tokenTypes = System.Text.RegularExpressions.RegexEngineParser.tokenTypes; - var resKind = this._branchResultKind; - var children = token.children; - var textIndex = branch.state.txtIndex; - var res = resKind.nextBranch; - - if (token.type === tokenTypes.alternationGroupRefNameCondition || - token.type === tokenTypes.alternationGroupRefNumberCondition) { - var grCapture = branch.state.resolveBackref(token.data.packedSlotId); - - if (grCapture != null) { - res = resKind.ok; - } else { - res = resKind.nextBranch; - } - } else { - // Resolve expression: - var state = this._scan(textIndex, textEndPos, children, true, null); - - if (this._combineScanResults(branch, state)) { - res = resKind.ok; - } - } - - if (res === resKind.nextBranch && pass.tokens.noAlternation) { - res = resKind.endPass; - } - - return res; - }, - - _scanLook: function (branch, textIndex, textEndPos, token) { - var constructs = token.group.constructs; - var resKind = this._branchResultKind; - var children = token.children; - var expectedRes; - var actualRes; - - var isLookahead = constructs.isPositiveLookahead || constructs.isNegativeLookahead; - var isLookbehind = constructs.isPositiveLookbehind || constructs.isNegativeLookbehind; - - if (isLookahead || isLookbehind) { - children = children.slice(1, children.length); // remove constructs - - expectedRes = constructs.isPositiveLookahead || constructs.isPositiveLookbehind; - - if (isLookahead) { - actualRes = this._scanLookAhead(branch, textIndex, textEndPos, children); - } else { - actualRes = this._scanLookBehind(branch, textIndex, textEndPos, children); - } - - if (expectedRes === actualRes) { - return resKind.ok; - } else { - return resKind.nextBranch; - } - } - - return null; - }, - - _scanLookAhead: function (branch, textIndex, textEndPos, tokens) { - var state = this._scan(textIndex, textEndPos, tokens, true, null); - - return this._combineScanResults(branch, state); - }, - - _scanLookBehind: function (branch, textIndex, textEndPos, tokens) { - var currIndex = textIndex; - var strLen; - var state; - - while (currIndex >= 0) { - strLen = textIndex - currIndex; - state = this._scan(currIndex, textEndPos, tokens, true, strLen); - - if (this._combineScanResults(branch, state)) { - return true; - } - - --currIndex; - } - - return false; - }, - - _scanNonBacktracking: function (branch, textIndex, textEndPos, token) { - var resKind = this._branchResultKind; - var children = token.children; - children = children.slice(1, children.length); // remove constructs - - var state = this._scan(textIndex, textEndPos, children, true, null); - - if (!state) { - return resKind.nextBranch; - } - - branch.state.logCapture(state.capLength); - - return resKind.ok; - }, - - _scanLiteral: function (textEndPos, branches, branch, pass, literal) { - var resKind = this._branchResultKind; - var index = branch.state.txtIndex; - - if (index + literal.length > textEndPos) { - return resKind.nextBranch; - } - - var i; - - if (pass.settings.ignoreCase) { - for (i = 0; i < literal.length; i++) { - if (this._text[index + i].toLowerCase() !== literal[i].toLowerCase()) { - return resKind.nextBranch; - } - } - } else { - for (i = 0; i < literal.length; i++) { - if (this._text[index + i] !== literal[i]) { - return resKind.nextBranch; - } - } - } - - branch.state.logCapture(literal.length); - - return resKind.ok; - }, - - _scanWithJsRegex: function (branches, branch, pass, token, tokenValue) { - var resKind = this._branchResultKind; - var index = branch.state.txtIndex; - var ch = this._text[index]; - - if (ch == null) { - ch = ""; - } - - var options = pass.settings.ignoreCase ? "i" : ""; - - var rgx = token.rgx; - - if (rgx == null) { - if (tokenValue == null) { - tokenValue = token.value; - } - - rgx = new RegExp(tokenValue, options); - token.rgx = rgx; - } - - if (rgx.test(ch)) { - branch.state.logCapture(ch.length); - - return resKind.ok; - } - - return resKind.nextBranch; - }, - - _scanWithJsRegex2: function (textIndex, pattern) { - var resKind = this._branchResultKind; - var ch = this._text[textIndex]; - - if (ch == null) { - ch = ""; - } - - var rgx = new RegExp(pattern, ""); - - if (rgx.test(ch)) { - return resKind.ok; - } - - return resKind.nextBranch; - }, - - _scanCharGroupToken: function (branches, branch, pass, token, skipLoggingCapture) { - var tokenTypes = System.Text.RegularExpressions.RegexEngineParser.tokenTypes; - var resKind = this._branchResultKind; - var index = branch.state.txtIndex; - var ch = this._text[index]; - - if (ch == null) { - return resKind.nextBranch; - } - - var i; - var j; - var n = ch.charCodeAt(0); - var ranges = token.data.ranges; - var range; - var upperCh; - - // Check susbstruct group: - if (token.data.substractToken != null) { - var substractRes; - - if (token.data.substractToken.type === tokenTypes.charGroup) { - substractRes = this._scanCharGroupToken(branches, branch, pass, token.data.substractToken, true); - } else if (token.data.substractToken.type === tokenTypes.charNegativeGroup) { - substractRes = this._scanCharNegativeGroupToken(branches, branch, pass, token.data.substractToken, true); - } else { - throw new System.InvalidOperationException.$ctor1("Unexpected substuct group token."); - } - - if (substractRes === resKind.ok) { - return token.type === tokenTypes.charGroup ? resKind.nextBranch : resKind.ok; - } - } - - // Try CharClass tokens like: \s \S \d \D - if (ranges.charClassToken != null) { - var charClassRes = this._scanWithJsRegex(branches, branch, pass, ranges.charClassToken); - - if (charClassRes === resKind.ok) { - return resKind.ok; - } - } - - // 2 iterations - to handle both cases: upper and lower - for (j = 0; j < 2; j++) { - //TODO: [Performance] Use binary search - for (i = 0; i < ranges.length; i++) { - range = ranges[i]; - - if (range.n > n) { - break; - } - - if (n <= range.m) { - if (!skipLoggingCapture) { - branch.state.logCapture(1); - } - - return resKind.ok; - } - } - - if (upperCh == null && pass.settings.ignoreCase) { - upperCh = ch.toUpperCase(); - - // Invert case for the 2nd attempt; - if (ch === upperCh) { - ch = ch.toLowerCase(); - } else { - ch = upperCh; - } - - n = ch.charCodeAt(0); - } - } - - return resKind.nextBranch; - }, - - _scanCharNegativeGroupToken: function (branches, branch, pass, token, skipLoggingCapture) { - var resKind = this._branchResultKind; - var index = branch.state.txtIndex; - var ch = this._text[index]; - - if (ch == null) { - return resKind.nextBranch; - } - - // Get result for positive group: - var positiveRes = this._scanCharGroupToken(branches, branch, pass, token, true); - - // Inverse the positive result: - if (positiveRes === resKind.ok) { - return resKind.nextBranch; - } - - if (!skipLoggingCapture) { - branch.state.logCapture(1); - } - - return resKind.ok; - }, - - _scanEscapeToken: function (branches, branch, pass, token) { - return this._scanWithJsRegex(branches, branch, pass, token); - }, - - _scanDotToken: function (textEndPos, branches, branch, pass) { - var resKind = this._branchResultKind; - var index = branch.state.txtIndex; - - if (pass.settings.singleline) { - if (index < textEndPos) { - branch.state.logCapture(1); - - return resKind.ok; - } - } else { - if (index < textEndPos && this._text[index] !== "\n") { - branch.state.logCapture(1); - - return resKind.ok; - } - } - - return resKind.nextBranch; - }, - - _scanBackrefNumberToken: function (textEndPos, branches, branch, pass, token) { - var resKind = this._branchResultKind; - - var grCapture = branch.state.resolveBackref(token.data.slotId); - - if (grCapture == null) { - return resKind.nextBranch; - } - - var grCaptureTxt = this._text.slice(grCapture.capIndex, grCapture.capIndex + grCapture.capLength); - - return this._scanLiteral(textEndPos, branches, branch, pass, grCaptureTxt); - }, - - _scanBackrefNameToken: function (textEndPos, branches, branch, pass, token) { - var resKind = this._branchResultKind; - - var grCapture = branch.state.resolveBackref(token.data.slotId); - - if (grCapture == null) { - return resKind.nextBranch; - } - - var grCaptureTxt = this._text.slice(grCapture.capIndex, grCapture.capIndex + grCapture.capLength); - - return this._scanLiteral(textEndPos, branches, branch, pass, grCaptureTxt); - }, - - _scanAnchorToken: function (textEndPos, branches, branch, pass, token) { - var resKind = this._branchResultKind; - var index = branch.state.txtIndex; - - if (token.value === "\\b" || token.value === "\\B") { - var prevIsWord = index > 0 && this._scanWithJsRegex2(index - 1, "\\w") === resKind.ok; - var currIsWord = this._scanWithJsRegex2(index, "\\w") === resKind.ok; - - if ((prevIsWord === currIsWord) === (token.value === "\\B")) { - return resKind.ok; - } - } else if (token.value === "^") { - if (index === 0) { - return resKind.ok; - } - - if (pass.settings.multiline && this._text[index - 1] === "\n") { - return resKind.ok; - } - } else if (token.value === "$") { - if (index === textEndPos) { - return resKind.ok; - } - - if (pass.settings.multiline && this._text[index] === "\n") { - return resKind.ok; - } - } else if (token.value === "\\A") { - if (index === 0) { - return resKind.ok; - } - } else if (token.value === "\\z") { - if (index === textEndPos) { - return resKind.ok; - } - } else if (token.value === "\\Z") { - if (index === textEndPos) { - return resKind.ok; - } - - if (index === textEndPos - 1 && this._text[index] === "\n") { - return resKind.ok; - } - } else if (token.value === "\\G") { - return resKind.ok; - } - - return resKind.nextBranch; - }, - - // ============================================================================================ - // Auxiliary functions - // ============================================================================================ - _cloneSettings: function (settings) { - var cloned = { - ignoreCase: settings.ignoreCase, - multiline: settings.multiline, - singleline: settings.singleline, - ignoreWhitespace: settings.ignoreWhitespace, - explicitCapture: settings.explicitCapture - }; - - return cloned; - }, - - _combineScanResults: function (branch, srcState) { - if (srcState != null) { - var dstGroups = branch.state.groups; - var srcGroups = srcState.groups; - var srcGroupsLen = srcGroups.length; - var i; - - for (i = 0; i < srcGroupsLen; ++i) { - dstGroups.push(srcGroups[i]); - } - - return true; - } - return false; - }, - - _getEmptyMatch: function () { - var match = { - capIndex: 0, // start index of total capture - capLength: 0, // length of total capture - success: false, - value: "", - groups: [], - captures: [] - }; - - return match; - }, - - _fillMatch: function (match, capIndex, capLength, textPos) { - if (capIndex == null) { - capIndex = textPos; - } - - match.capIndex = capIndex; - match.capLength = capLength; - match.success = true; - match.value = this._text.slice(capIndex, capIndex + capLength); - - match.groups.push({ - capIndex: capIndex, - capLength: capLength, - value: match.value, - success: true, - captures: [ - { - capIndex: capIndex, - capLength: capLength, - value: match.value - } - ] - }); - - match.captures.push(match.groups[0].captures[0]); - }, - - _checkTimeout: function () { - if (this._timeoutTime < 0) { - return; - } - - var time = new Date().getTime(); - - if (time >= this._timeoutTime) { - throw new System.RegexMatchTimeoutException(this._text, this._pattern, System.TimeSpan.fromMilliseconds(this._timeoutMs)); - } - } - }); - - // @source RegexEngineBranch.js - - H5.define("System.Text.RegularExpressions.RegexEngineBranch", { - type: 0, - value: 0, - min: 0, - max: 0, - - isStarted: false, - isNotFailing: false, - - state: null, - - ctor: function (branchType, currVal, minVal, maxVal, parentState) { - this.$initialize(); - - this.type = branchType; - - this.value = currVal; - this.min = minVal; - this.max = maxVal; - - this.state = parentState != null ? parentState.clone() : new System.Text.RegularExpressions.RegexEngineState(); - }, - - pushPass: function (index, tokens, settings) { - var pass = new System.Text.RegularExpressions.RegexEnginePass(index, tokens, settings); - - this.state.passes.push(pass); - }, - - peekPass: function () { - return this.state.passes[this.state.passes.length - 1]; - }, - - popPass: function () { - return this.state.passes.pop(); - }, - - hasPass: function () { - return this.state.passes.length > 0; - }, - - clone: function () { - var cloned = new System.Text.RegularExpressions.RegexEngineBranch(this.type, this.value, this.min, this.max, this.state); - - cloned.isNotFailing = this.isNotFailing; - - return cloned; - } - }); - - // @source RegexEngineState.js - - H5.define("System.Text.RegularExpressions.RegexEngineState", { - txtIndex: 0, // current index - capIndex: null, // first index of captured text - capLength: 0, // current length - passes: null, - groups: null, // captured groups - - ctor: function () { - this.$initialize(); - - this.passes = []; - this.groups = []; - }, - - logCapture: function (length) { - if (this.capIndex == null) { - this.capIndex = this.txtIndex; - } - - this.txtIndex += length; - this.capLength += length; - }, - - logCaptureGroup: function (group, index, length) { - this.groups.push({ rawIndex: group.rawIndex, slotId: group.packedSlotId, capIndex: index, capLength: length }); - }, - - logCaptureGroupBalancing: function (group, capIndex) { - var balancingSlotId = group.balancingSlotId; - var groups = this.groups; - var index = groups.length - 1; - var group2; - var group2Index; - - while (index >= 0) { - if (groups[index].slotId === balancingSlotId) { - group2 = groups[index]; - group2Index = index; - - break; - } - --index; - } - - if (group2 != null && group2Index != null) { - groups.splice(group2Index, 1); // remove group2 from the collection - - // Add balancing group value: - if (group.constructs.name1 != null) { - var balCapIndex = group2.capIndex + group2.capLength; - var balCapLength = capIndex - balCapIndex; - - this.logCaptureGroup(group, balCapIndex, balCapLength); - } - - return true; - } - - return false; - }, - - resolveBackref: function (packedSlotId) { - var groups = this.groups; - var index = groups.length - 1; - - while (index >= 0) { - if (groups[index].slotId === packedSlotId) { - return groups[index]; - } - - --index; - } - - return null; - }, - - clone: function () { - var cloned = new System.Text.RegularExpressions.RegexEngineState(); - cloned.txtIndex = this.txtIndex; - cloned.capIndex = this.capIndex; - cloned.capLength = this.capLength; - - // Clone passes: - var clonedPasses = cloned.passes; - var thisPasses = this.passes; - var len = thisPasses.length; - var clonedItem; - var i; - - for (i = 0; i < len; i++) { - clonedItem = thisPasses[i].clone(); - clonedPasses.push(clonedItem); - } - - // Clone groups: - var clonedGroups = cloned.groups; - var thisGroups = this.groups; - len = thisGroups.length; - - for (i = 0; i < len; i++) { - clonedItem = thisGroups[i]; - clonedGroups.push(clonedItem); - } - - return cloned; - } - }); - - // @source RegexEnginePass.js - - H5.define("System.Text.RegularExpressions.RegexEnginePass", { - index: 0, - tokens: null, - probe: null, - - onHold: false, - onHoldTextIndex: -1, - alternationHandled: false, - - settings: null, - - ctor: function (index, tokens, settings) { - this.$initialize(); - - this.index = index; - this.tokens = tokens; - this.settings = settings; - }, - - clearState: function (settings) { - this.index = 0; - this.probe = null; - this.onHold = false; - this.onHoldTextIndex = -1; - this.alternationHandled = false; - this.settings = settings; - }, - - clone: function () { - var cloned = new System.Text.RegularExpressions.RegexEnginePass(this.index, this.tokens, this.settings); - - cloned.onHold = this.onHold; - cloned.onHoldTextIndex = this.onHoldTextIndex; - cloned.alternationHandled = this.alternationHandled; - cloned.probe = this.probe != null ? this.probe.clone() : null; - - return cloned; - } - }); - - // @source RegexEngineProbe.js - - H5.define("System.Text.RegularExpressions.RegexEngineProbe", { - min: 0, - max: 0, - value: 0, - isLazy: false, - forced: false, - - ctor: function (min, max, value, isLazy) { - this.$initialize(); - - this.min = min; - this.max = max; - this.value = value; - this.isLazy = isLazy; - this.forced = false; - }, - - clone: function () { - var cloned = new System.Text.RegularExpressions.RegexEngineProbe(this.min, this.max, this.value, this.isLazy); - - cloned.forced = this.forced; - - return cloned; - } - }); - - // @source RegexEngineParser.js - - H5.define("System.Text.RegularExpressions.RegexEngineParser", { - statics: { - _hexSymbols: "0123456789abcdefABCDEF", - _octSymbols: "01234567", - _decSymbols: "0123456789", - - _escapedChars: "abtrvfnexcu", - _escapedCharClasses: "pPwWsSdD", - _escapedAnchors: "AZzGbB", - _escapedSpecialSymbols: " .,$^{}[]()|*+-=?\\|/\"':;~!@#%&", - - _whiteSpaceChars: " \r\n\t\v\f\u00A0\uFEFF", //TODO: This is short version of .NET WhiteSpace category. - _unicodeCategories: ["Lu", "Ll", "Lt", "Lm", "Lo", "L", "Mn", "Mc", "Me", "M", "Nd", "Nl", "No", "N", "Pc", "Pd", "Ps", "Pe", "Pi", "Pf", "Po", "P", "Sm", "Sc", "Sk", "So", "S", "Zs", "Zl", "Zp", "Z", "Cc", "Cf", "Cs", "Co", "Cn", "C"], - _namedCharBlocks: ["IsBasicLatin", "IsLatin-1Supplement", "IsLatinExtended-A", "IsLatinExtended-B", "IsIPAExtensions", "IsSpacingModifierLetters", "IsCombiningDiacriticalMarks", "IsGreek", "IsGreekandCoptic", "IsCyrillic", "IsCyrillicSupplement", "IsArmenian", "IsHebrew", "IsArabic", "IsSyriac", "IsThaana", "IsDevanagari", "IsBengali", "IsGurmukhi", "IsGujarati", "IsOriya", "IsTamil", "IsTelugu", "IsKannada", "IsMalayalam", "IsSinhala", "IsThai", "IsLao", "IsTibetan", "IsMyanmar", "IsGeorgian", "IsHangulJamo", "IsEthiopic", "IsCherokee", "IsUnifiedCanadianAboriginalSyllabics", "IsOgham", "IsRunic", "IsTagalog", "IsHanunoo", "IsBuhid", "IsTagbanwa", "IsKhmer", "IsMongolian", "IsLimbu", "IsTaiLe", "IsKhmerSymbols", "IsPhoneticExtensions", "IsLatinExtendedAdditional", "IsGreekExtended", "IsGeneralPunctuation", "IsSuperscriptsandSubscripts", "IsCurrencySymbols", "IsCombiningDiacriticalMarksforSymbols", "IsCombiningMarksforSymbols", "IsLetterlikeSymbols", "IsNumberForms", "IsArrows", "IsMathematicalOperators", "IsMiscellaneousTechnical", "IsControlPictures", "IsOpticalCharacterRecognition", "IsEnclosedAlphanumerics", "IsBoxDrawing", "IsBlockElements", "IsGeometricShapes", "IsMiscellaneousSymbols", "IsDingbats", "IsMiscellaneousMathematicalSymbols-A", "IsSupplementalArrows-A", "IsBraillePatterns", "IsSupplementalArrows-B", "IsMiscellaneousMathematicalSymbols-B", "IsSupplementalMathematicalOperators", "IsMiscellaneousSymbolsandArrows", "IsCJKRadicalsSupplement", "IsKangxiRadicals", "IsIdeographicDescriptionCharacters", "IsCJKSymbolsandPunctuation", "IsHiragana", "IsKatakana", "IsBopomofo", "IsHangulCompatibilityJamo", "IsKanbun", "IsBopomofoExtended", "IsKatakanaPhoneticExtensions", "IsEnclosedCJKLettersandMonths", "IsCJKCompatibility", "IsCJKUnifiedIdeographsExtensionA", "IsYijingHexagramSymbols", "IsCJKUnifiedIdeographs", "IsYiSyllables", "IsYiRadicals", "IsHangulSyllables", "IsHighSurrogates", "IsHighPrivateUseSurrogates", "IsLowSurrogates", "IsPrivateUse or IsPrivateUseArea", "IsCJKCompatibilityIdeographs", "IsAlphabeticPresentationForms", "IsArabicPresentationForms-A", "IsVariationSelectors", "IsCombiningHalfMarks", "IsCJKCompatibilityForms", "IsSmallFormVariants", "IsArabicPresentationForms-B", "IsHalfwidthandFullwidthForms", "IsSpecials"], - _controlChars: ["@", "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", "[", "\\", "]", "^", "_"], - - tokenTypes: { - literal: 0, - - escChar: 110, - escCharOctal: 111, - escCharHex: 112, - escCharCtrl: 113, - escCharUnicode: 114, - escCharOther: 115, - - escCharClass: 120, - escCharClassCategory: 121, - escCharClassBlock: 122, - escCharClassDot: 123, - - escAnchor: 130, - - escBackrefNumber: 140, - escBackrefName: 141, - - charGroup: 200, - charNegativeGroup: 201, - charInterval: 202, - - anchor: 300, - - group: 400, - groupImnsx: 401, - groupImnsxMisc: 402, - - groupConstruct: 403, - groupConstructName: 404, - groupConstructImnsx: 405, - groupConstructImnsxMisc: 406, - - quantifier: 500, - quantifierN: 501, - quantifierNM: 502, - - alternation: 600, - alternationGroup: 601, - alternationGroupCondition: 602, - alternationGroupRefNumberCondition: 603, - alternationGroupRefNameCondition: 604, - - commentInline: 700, - commentXMode: 701 - }, - - parsePattern: function (pattern, settings) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - - // Parse tokens in the original pattern: - var tokens = scope._parsePatternImpl(pattern, settings, 0, pattern.length); - - // Collect and fill group descriptors into Group tokens. - // We need do it before any token modification. - var groups = []; - scope._fillGroupDescriptors(tokens, groups); - - // Fill Sparse Info: - var sparseSettings = scope._getGroupSparseInfo(groups); - - // Fill balancing info for the groups with "name2": - scope._fillBalancingGroupInfo(groups, sparseSettings); - - // Transform tokens for usage in JS RegExp: - scope._preTransformBackrefTokens(pattern, tokens, sparseSettings); - scope._transformRawTokens(settings, tokens, sparseSettings, [], [], 0); - - // Update group descriptors as tokens have been transformed (at least indexes were changed): - scope._updateGroupDescriptors(tokens); - - var result = { - groups: groups, - sparseSettings: sparseSettings, - isContiguous: settings.isContiguous || false, - shouldFail: settings.shouldFail || false, - tokens: tokens - }; - - return result; - }, - - _transformRawTokens: function (settings, tokens, sparseSettings, allowedPackedSlotIds, nestedGroupIds, nestingLevel) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - var prevToken; - var token; - var value; - var packedSlotId; - var groupNumber; - var matchRes; - var localNestedGroupIds; - var localSettings; - var qtoken; - var i; - - // Transform/adjust tokens collection to work with JS RegExp: - for (i = 0; i < tokens.length; i++) { - token = tokens[i]; - - if (i < tokens.length - 1) { - qtoken = tokens[i + 1]; - - switch (qtoken.type) { - case tokenTypes.quantifier: - case tokenTypes.quantifierN: - case tokenTypes.quantifierNM: - token.qtoken = qtoken; - tokens.splice(i + 1, 1); - --i; - } - } - - if (token.type === tokenTypes.escBackrefNumber) { - groupNumber = token.data.number; - packedSlotId = sparseSettings.getPackedSlotIdBySlotNumber(groupNumber); - - if (packedSlotId == null) { - throw new System.ArgumentException.$ctor1("Reference to undefined group number " + groupNumber.toString() + "."); - } - - if (allowedPackedSlotIds.indexOf(packedSlotId) < 0) { - settings.shouldFail = true; // Backreferences to unreachable group number lead to an empty match. - - continue; - } - - token.data.slotId = packedSlotId; - } else if (token.type === tokenTypes.escBackrefName) { - value = token.data.name; - packedSlotId = sparseSettings.getPackedSlotIdBySlotName(value); - - if (packedSlotId == null) { - // TODO: Move this code to earlier stages - // If the name is number, treat the backreference as a numbered: - matchRes = scope._matchChars(value, 0, value.length, scope._decSymbols); - - if (matchRes.matchLength === value.length) { - value = "\\" + value; - scope._updatePatternToken(token, tokenTypes.escBackrefNumber, token.index, value.length, value); - --i; // process the token again - - continue; - } - - throw new System.ArgumentException.$ctor1("Reference to undefined group name '" + value + "'."); - } - - if (allowedPackedSlotIds.indexOf(packedSlotId) < 0) { - settings.shouldFail = true; // Backreferences to unreachable group number lead to an empty match. - - continue; - } - - token.data.slotId = packedSlotId; - } else if (token.type === tokenTypes.anchor || token.type === tokenTypes.escAnchor) { - if (token.value === "\\G") { - if (nestingLevel === 0 && i === 0) { - settings.isContiguous = true; - } else { - settings.shouldFail = true; - } - - tokens.splice(i, 1); - --i; - - continue; - } - } else if (token.type === tokenTypes.commentInline || token.type === tokenTypes.commentXMode) { - // We can safely remove comments from the pattern - tokens.splice(i, 1); - --i; - - continue; - } else if (token.type === tokenTypes.literal) { - // Combine literal tokens for better performance: - if (i > 0 && !token.qtoken) { - prevToken = tokens[i - 1]; - - if (prevToken.type === tokenTypes.literal && !prevToken.qtoken) { - prevToken.value += token.value; - prevToken.length += token.length; - - tokens.splice(i, 1); - --i; - - continue; - } - } - } else if (token.type === tokenTypes.alternationGroupCondition) { - if (token.data != null) { - if (token.data.number != null) { - packedSlotId = sparseSettings.getPackedSlotIdBySlotNumber(token.data.number); - - if (packedSlotId == null) { - throw new System.ArgumentException.$ctor1("Reference to undefined group number " + value + "."); - } - - token.data.packedSlotId = packedSlotId; - scope._updatePatternToken(token, tokenTypes.alternationGroupRefNumberCondition, token.index, token.length, token.value); - } else { - packedSlotId = sparseSettings.getPackedSlotIdBySlotName(token.data.name); - - if (packedSlotId != null) { - token.data.packedSlotId = packedSlotId; - scope._updatePatternToken(token, tokenTypes.alternationGroupRefNameCondition, token.index, token.length, token.value); - } else { - delete token.data; - } - } - } - } - - // Update children tokens: - if (token.children && token.children.length) { - localNestedGroupIds = token.type === tokenTypes.group ? [token.group.rawIndex] : []; - localNestedGroupIds = localNestedGroupIds.concat(nestedGroupIds); - - localSettings = token.localSettings || settings; - scope._transformRawTokens(localSettings, token.children, sparseSettings, allowedPackedSlotIds, localNestedGroupIds, nestingLevel + 1); - settings.shouldFail = settings.shouldFail || localSettings.shouldFail; - settings.isContiguous = settings.isContiguous || localSettings.isContiguous; - } - - // Group is processed. Now it can be referenced with Backref: - if (token.type === tokenTypes.group) { - allowedPackedSlotIds.push(token.group.packedSlotId); - } - } - }, - - _fillGroupDescriptors: function (tokens, groups) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var group; - var i; - - // Fill group structure: - scope._fillGroupStructure(groups, tokens, null); - - // Assign name or id: - var groupId = 1; - - for (i = 0; i < groups.length; i++) { - group = groups[i]; - - if (group.constructs.name1 != null) { - group.name = group.constructs.name1; - group.hasName = true; - } else { - group.hasName = false; - group.name = groupId.toString(); - ++groupId; - } - } - }, - - _fillGroupStructure: function (groups, tokens, parentGroup) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - var group; - var token; - var constructs; - var constructCandidateToken; - var hasChildren; - var i; - - for (i = 0; i < tokens.length; i++) { - token = tokens[i]; - hasChildren = token.children && token.children.length; - - if (token.type === tokenTypes.group || token.type === tokenTypes.groupImnsx || token.type === tokenTypes.groupImnsxMisc) { - group = { - rawIndex: groups.length + 1, - number: -1, - - parentGroup: null, - innerGroups: [], - - name: null, - hasName: false, - - constructs: null, - quantifier: null, - - exprIndex: -1, - exprLength: 0, - expr: null, - exprFull: null - }; - - token.group = group; - - if (token.type === tokenTypes.group) { - groups.push(group); - - if (parentGroup != null) { - token.group.parentGroup = parentGroup; - parentGroup.innerGroups.push(group); - } - } - - // fill group constructs: - constructCandidateToken = hasChildren ? token.children[0] : null; - group.constructs = scope._fillGroupConstructs(constructCandidateToken); - constructs = group.constructs; - - if (token.isNonCapturingExplicit) { - delete token.isNonCapturingExplicit; - constructs.isNonCapturingExplicit = true; - } - - if (token.isEmptyCapturing) { - delete token.isEmptyCapturing; - constructs.emptyCapture = true; - } - - constructs.skipCapture = - constructs.isNonCapturing || - constructs.isNonCapturingExplicit || - constructs.isNonbacktracking || - constructs.isPositiveLookahead || - constructs.isNegativeLookahead || - constructs.isPositiveLookbehind || - constructs.isNegativeLookbehind || - (constructs.name1 == null && constructs.name2 != null); - } - - // fill group descriptors for inner tokens: - if (hasChildren) { - scope._fillGroupStructure(groups, token.children, token.group); - } - } - }, - - _getGroupSparseInfo: function (groups) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - - var explNumberedGroups = {}; - var explNumberedGroupKeys = []; - var explNamedGroups = {}; - var explGroups; - - var numberedGroups; - var slotNumber; - var slotName; - var group; - var i; - var j; - - var sparseSlotMap = { 0: 0 }; - sparseSlotMap.lastSlot = 0; - - var sparseSlotNameMap = { "0": 0 }; - sparseSlotNameMap.keys = ["0"]; - - // Fill Explicit Numbers: - for (i = 0; i < groups.length; i++) { - group = groups[i]; - - if (group.constructs.skipCapture) { - continue; - } - - if (group.constructs.isNumberName1) { - slotNumber = parseInt(group.constructs.name1); - explNumberedGroupKeys.push(slotNumber); - - if (explNumberedGroups[slotNumber]) { - explNumberedGroups[slotNumber].push(group); - } else { - explNumberedGroups[slotNumber] = [group]; - } - } else { - slotName = group.constructs.name1; - - if (explNamedGroups[slotName]) { - explNamedGroups[slotName].push(group); - } else { - explNamedGroups[slotName] = [group]; - } - } - } - - // Sort explicitly set Number names: - var sortNum = function (a, b) { - return a - b; - }; - - explNumberedGroupKeys.sort(sortNum); - - // Add group without names first (emptyCapture = false first, than emptyCapture = true): - var allowEmptyCapture = false; - - for (j = 0; j < 2; j++) { - for (i = 0; i < groups.length; i++) { - group = groups[i]; - - if (group.constructs.skipCapture) { - continue; - } - - if ((group.constructs.emptyCapture === true) !== allowEmptyCapture) { - continue; - } - - slotNumber = sparseSlotNameMap.keys.length; - - if (!group.hasName) { - numberedGroups = [group]; - explGroups = explNumberedGroups[slotNumber]; - - if (explGroups != null) { - numberedGroups = numberedGroups.concat(explGroups); - explNumberedGroups[slotNumber] = null; - } - - scope._addSparseSlotForSameNamedGroups(numberedGroups, slotNumber, sparseSlotMap, sparseSlotNameMap); - } - } - allowEmptyCapture = true; - } - - // Then add named groups: - for (i = 0; i < groups.length; i++) { - group = groups[i]; - - if (group.constructs.skipCapture) { - continue; - } - - if (!group.hasName || group.constructs.isNumberName1) { - continue; - } - - // If the slot is already occupied by an explicitly numbered group, - // add this group to the slot: - slotNumber = sparseSlotNameMap.keys.length; - explGroups = explNumberedGroups[slotNumber]; - - while (explGroups != null) { - scope._addSparseSlotForSameNamedGroups(explGroups, slotNumber, sparseSlotMap, sparseSlotNameMap); - - explNumberedGroups[slotNumber] = null; // Group is processed. - slotNumber = sparseSlotNameMap.keys.length; - explGroups = explNumberedGroups[slotNumber]; - } - - if (!group.constructs.isNumberName1) { - slotNumber = sparseSlotNameMap.keys.length; - explGroups = explNumberedGroups[slotNumber]; - - while (explGroups != null) { - scope._addSparseSlotForSameNamedGroups(explGroups, slotNumber, sparseSlotMap, sparseSlotNameMap); - - explNumberedGroups[slotNumber] = null; // Group is processed. - slotNumber = sparseSlotNameMap.keys.length; - explGroups = explNumberedGroups[slotNumber]; - } - } - - // Add the named group(s) to the 1st free slot: - slotName = group.constructs.name1; - explGroups = explNamedGroups[slotName]; - - if (explGroups != null) { - scope._addSparseSlotForSameNamedGroups(explGroups, slotNumber, sparseSlotMap, sparseSlotNameMap); - explNamedGroups[slotName] = null; // Group is processed. - } - } - - // Add the rest explicitly numbered groups: - for (i = 0; i < explNumberedGroupKeys.length; i++) { - slotNumber = explNumberedGroupKeys[i]; - explGroups = explNumberedGroups[slotNumber]; - - if (explGroups != null) { - scope._addSparseSlotForSameNamedGroups(explGroups, slotNumber, sparseSlotMap, sparseSlotNameMap); - - explNumberedGroups[slotNumber] = null; // Group is processed. - } - } - - return { - isSparse: sparseSlotMap.isSparse || false, //sparseSlotNumbers.length !== (1 + sparseSlotNumbers[sparseSlotNumbers.length - 1]), - sparseSlotMap: sparseSlotMap, // - sparseSlotNameMap: sparseSlotNameMap, // - - getPackedSlotIdBySlotNumber: function (slotNumber) { - return this.sparseSlotMap[slotNumber]; - }, - - getPackedSlotIdBySlotName: function (slotName) { - return this.sparseSlotNameMap[slotName]; - } - }; - }, - - _addSparseSlot: function (group, slotNumber, sparseSlotMap, sparseSlotNameMap) { - var packedSlotId = sparseSlotNameMap.keys.length; // 0-based index. Raw Slot number, 0,1..n (without gaps) - - group.packedSlotId = packedSlotId; - - sparseSlotMap[slotNumber] = packedSlotId; - sparseSlotNameMap[group.name] = packedSlotId; - sparseSlotNameMap.keys.push(group.name); - - if (!sparseSlotMap.isSparse && ((slotNumber - sparseSlotMap.lastSlot) > 1)) { - sparseSlotMap.isSparse = true; - } - - sparseSlotMap.lastSlot = slotNumber; - }, - - _addSparseSlotForSameNamedGroups: function (groups, slotNumber, sparseSlotMap, sparseSlotNameMap) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var i; - - scope._addSparseSlot(groups[0], slotNumber, sparseSlotMap, sparseSlotNameMap); - var sparseSlotId = groups[0].sparseSlotId; - var packedSlotId = groups[0].packedSlotId; - - // Assign SlotID for all expl. named groups in this slot. - if (groups.length > 1) { - for (i = 1; i < groups.length; i++) { - groups[i].sparseSlotId = sparseSlotId; - groups[i].packedSlotId = packedSlotId; - } - } - }, - - _fillGroupConstructs: function (childToken) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - var constructs = { - name1: null, - name2: null, - - isNumberName1: false, - isNumberName2: false, - - isNonCapturing: false, - isNonCapturingExplicit: false, - - isIgnoreCase: null, - isMultiline: null, - isExplicitCapture: null, - isSingleLine: null, - isIgnoreWhitespace: null, - - isPositiveLookahead: false, - isNegativeLookahead: false, - isPositiveLookbehind: false, - isNegativeLookbehind: false, - - isNonbacktracking: false - }; - - if (childToken == null) { - return constructs; - } - - if (childToken.type === tokenTypes.groupConstruct) { - // ?: - // ?= - // ?! - // ?<= - // ? - - switch (childToken.value) { - case "?:": - constructs.isNonCapturing = true; - break; - - case "?=": - constructs.isPositiveLookahead = true; - break; - - case "?!": - constructs.isNegativeLookahead = true; - break; - - case "?>": - constructs.isNonbacktracking = true; - break; - - case "?<=": - constructs.isPositiveLookbehind = true; - break; - - case "? - // ?'name1' - // ? - // ?'name1-name2' - - var nameExpr = childToken.value.slice(2, childToken.length - 1); - var groupNames = nameExpr.split("-"); - - if (groupNames.length === 0 || groupNames.length > 2) { - throw new System.ArgumentException.$ctor1("Invalid group name."); - } - - if (groupNames[0].length) { - constructs.name1 = groupNames[0]; - - var nameRes1 = scope._validateGroupName(groupNames[0]); - - constructs.isNumberName1 = nameRes1.isNumberName; - } - - if (groupNames.length === 2) { - constructs.name2 = groupNames[1]; - - var nameRes2 = scope._validateGroupName(groupNames[1]); - - constructs.isNumberName2 = nameRes2.isNumberName; - } - } else if (childToken.type === tokenTypes.groupConstructImnsx || childToken.type === tokenTypes.groupConstructImnsxMisc) { - // ?imnsx-imnsx: - var imnsxPostfixLen = childToken.type === tokenTypes.groupConstructImnsx ? 1 : 0; - var imnsxExprLen = childToken.length - 1 - imnsxPostfixLen; // - prefix - postfix - var imnsxVal = true; - var ch; - var i; - - for (i = 1; i <= imnsxExprLen; i++) { - ch = childToken.value[i]; - - if (ch === "-") { - imnsxVal = false; - } else if (ch === "i") { - constructs.isIgnoreCase = imnsxVal; - } else if (ch === "m") { - constructs.isMultiline = imnsxVal; - } else if (ch === "n") { - constructs.isExplicitCapture = imnsxVal; - } else if (ch === "s") { - constructs.isSingleLine = imnsxVal; - } else if (ch === "x") { - constructs.isIgnoreWhitespace = imnsxVal; - } - } - } - - return constructs; - }, - - _validateGroupName: function (name) { - if (!name || !name.length) { - throw new System.ArgumentException.$ctor1("Invalid group name: Group names must begin with a word character."); - } - - var isDigit = name[0] >= "0" && name[0] <= "9"; - - if (isDigit) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var res = scope._matchChars(name, 0, name.length, scope._decSymbols); - - if (res.matchLength !== name.length) { - throw new System.ArgumentException.$ctor1("Invalid group name: Group names must begin with a word character."); - } - } - - return { - isNumberName: isDigit - }; - }, - - _fillBalancingGroupInfo: function (groups, sparseSettings) { - var group; - var i; - - // Assign name or id: - for (i = 0; i < groups.length; i++) { - group = groups[i]; - - if (group.constructs.name2 != null) { - group.isBalancing = true; - - group.balancingSlotId = sparseSettings.getPackedSlotIdBySlotName(group.constructs.name2); - - if (group.balancingSlotId == null) { - throw new System.ArgumentException.$ctor1("Reference to undefined group name '" + group.constructs.name2 + "'."); - } - } - } - }, - - _preTransformBackrefTokens: function (pattern, tokens, sparseSettings) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - - var groupNumber; - var octalCharToken; - var extraLength; - var literalToken; - var token; - var i; - - for (i = 0; i < tokens.length; i++) { - token = tokens[i]; - - if (token.type === tokenTypes.escBackrefNumber) { - groupNumber = token.data.number; - - if (groupNumber >= 1 && sparseSettings.getPackedSlotIdBySlotNumber(groupNumber) != null) { - // Expressions from \10 and greater are considered backreferences - // if there is a group corresponding to that number; - // otherwise, they are interpreted as octal codes. - continue; // validated - } - - if (groupNumber <= 9) { - // The expressions \1 through \9 are always interpreted as backreferences, and not as octal codes. - throw new System.ArgumentException.$ctor1("Reference to undefined group number " + groupNumber.toString() + "."); - } - - // Otherwise, transform the token to OctalNumber: - octalCharToken = scope._parseOctalCharToken(token.value, 0, token.length); - - if (octalCharToken == null) { - throw new System.ArgumentException.$ctor1("Unrecognized escape sequence " + token.value.slice(0, 2) + "."); - } - - extraLength = token.length - octalCharToken.length; - scope._modifyPatternToken(token, pattern, tokenTypes.escCharOctal, null, octalCharToken.length); - token.data = octalCharToken.data; - - if (extraLength > 0) { - literalToken = scope._createPatternToken(pattern, tokenTypes.literal, token.index + token.length, extraLength); - tokens.splice(i + 1, 0, literalToken); - } - } - - if (token.children && token.children.length) { - scope._preTransformBackrefTokens(pattern, token.children, sparseSettings); - } - } - }, - - _updateGroupDescriptors: function (tokens, parentIndex) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - var group; - var token; - var quantCandidateToken; - var childrenValue; - var childrenIndex; - var i; - - var index = parentIndex || 0; - - for (i = 0; i < tokens.length; i++) { - token = tokens[i]; - token.index = index; - - // Calculate children indexes/lengths to update parent length: - if (token.children) { - childrenIndex = token.childrenPostfix.length; - scope._updateGroupDescriptors(token.children, index + childrenIndex); - - // Update parent value if children have been changed: - childrenValue = scope._constructPattern(token.children); - token.value = token.childrenPrefix + childrenValue + token.childrenPostfix; - token.length = token.value.length; - } - - // Update group information: - if (token.type === tokenTypes.group && token.group) { - group = token.group; - group.exprIndex = token.index; - group.exprLength = token.length; - - if (i + 1 < tokens.length) { - quantCandidateToken = tokens[i + 1]; - - if (quantCandidateToken.type === tokenTypes.quantifier || - quantCandidateToken.type === tokenTypes.quantifierN || - quantCandidateToken.type === tokenTypes.quantifierNM) { - group.quantifier = quantCandidateToken.value; - } - } - - group.expr = token.value; - group.exprFull = group.expr + (group.quantifier != null ? group.quantifier : ""); - } - - // Update current index: - index += token.length; - } - }, - - _constructPattern: function (tokens) { - var pattern = ""; - var token; - var i; - - for (i = 0; i < tokens.length; i++) { - token = tokens[i]; - pattern += token.value; - } - - return pattern; - }, - - _parsePatternImpl: function (pattern, settings, startIndex, endIndex) { - if (pattern == null) { - throw new System.ArgumentNullException.$ctor1("pattern"); - } - - if (startIndex < 0 || startIndex > pattern.length) { - throw new System.ArgumentOutOfRangeException.$ctor1("startIndex"); - } - - if (endIndex < startIndex || endIndex > pattern.length) { - throw new System.ArgumentOutOfRangeException.$ctor1("endIndex"); - } - - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - var tokens = []; - var token; - var ch; - var i; - - i = startIndex; - - while (i < endIndex) { - ch = pattern[i]; - - // Ignore whitespaces (if it was requested): - if (settings.ignoreWhitespace && scope._whiteSpaceChars.indexOf(ch) >= 0) { - ++i; - - continue; - } - - if (ch === ".") { - token = scope._parseDotToken(pattern, i, endIndex); - } else if (ch === "\\") { - token = scope._parseEscapeToken(pattern, i, endIndex); - } else if (ch === "[") { - token = scope._parseCharRangeToken(pattern, i, endIndex); - } else if (ch === "^" || ch === "$") { - token = scope._parseAnchorToken(pattern, i); - } else if (ch === "(") { - token = scope._parseGroupToken(pattern, settings, i, endIndex); - } else if (ch === "|") { - token = scope._parseAlternationToken(pattern, i); - } else if (ch === "#" && settings.ignoreWhitespace) { - token = scope._parseXModeCommentToken(pattern, i, endIndex); - } else { - token = scope._parseQuantifierToken(pattern, i, endIndex); - } - - if (token == null) { - token = scope._createPatternToken(pattern, tokenTypes.literal, i, 1); - } - - if (token != null) { - tokens.push(token); - i += token.length; - } - } - - return tokens; - }, - - _parseEscapeToken: function (pattern, i, endIndex) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - - var ch = pattern[i]; - - if (ch !== "\\") { - return null; - } - - if (i + 1 >= endIndex) { - throw new System.ArgumentException.$ctor1("Illegal \\ at end of pattern."); - } - - ch = pattern[i + 1]; - - // Parse a sequence for a numbered reference ("Backreference Constructs") - if (ch >= "1" && ch <= "9") { - // check if the number is a group backreference - var groupDigits = scope._matchChars(pattern, i + 1, endIndex, scope._decSymbols, 3); // assume: there are not more than 999 groups - var backrefNumberToken = scope._createPatternToken(pattern, tokenTypes.escBackrefNumber, i, 1 + groupDigits.matchLength); // "\nnn" - - backrefNumberToken.data = { number: parseInt(groupDigits.match, 10) }; - - return backrefNumberToken; - } - - // Parse a sequence for "Anchors" - if (scope._escapedAnchors.indexOf(ch) >= 0) { - return scope._createPatternToken(pattern, tokenTypes.escAnchor, i, 2); // "\A" or "\Z" or "\z" or "\G" or "\b" or "\B" - } - - // Parse a sequence for "Character Escapes" or "Character Classes" - var escapedCharToken = scope._parseEscapedChar(pattern, i, endIndex); - - if (escapedCharToken != null) { - return escapedCharToken; - } - - // Parse a sequence for a named backreference ("Backreference Constructs") - if (ch === "k") { - if (i + 2 < endIndex) { - var nameQuoteCh = pattern[i + 2]; - - if (nameQuoteCh === "'" || nameQuoteCh === "<") { - var closingCh = nameQuoteCh === "<" ? ">" : "'"; - var refNameChars = scope._matchUntil(pattern, i + 3, endIndex, closingCh); - - if (refNameChars.unmatchLength === 1 && refNameChars.matchLength > 0) { - var backrefNameToken = scope._createPatternToken(pattern, tokenTypes.escBackrefName, i, 3 + refNameChars.matchLength + 1); // "\k" or "\k'Name'" - - backrefNameToken.data = { name: refNameChars.match }; - - return backrefNameToken; - } - } - } - - throw new System.ArgumentException.$ctor1("Malformed \\k<...> named back reference."); - } - - // Temp fix (until IsWordChar is not supported): - // See more: https://referencesource.microsoft.com/#System/regex/system/text/regularexpressions/RegexParser.cs,1414 - // Unescaping of any of the following ASCII characters results in the character itself - var code = ch.charCodeAt(0); - - if ((code >= 0 && code < 48) || - (code > 57 && code < 65) || - (code > 90 && code < 95) || - (code === 96) || - (code > 122 && code < 128)) { - var token = scope._createPatternToken(pattern, tokenTypes.escChar, i, 2); - - token.data = { n: code, ch: ch }; - - return token; - } - - // Unrecognized escape sequence: - throw new System.ArgumentException.$ctor1("Unrecognized escape sequence \\" + ch + "."); - }, - - _parseOctalCharToken: function (pattern, i, endIndex) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - - var ch = pattern[i]; - - if (ch === "\\" && i + 1 < endIndex) { - ch = pattern[i + 1]; - - if (ch >= "0" && ch <= "7") { - var octalDigits = scope._matchChars(pattern, i + 1, endIndex, scope._octSymbols, 3); - var octalVal = parseInt(octalDigits.match, 8); - var token = scope._createPatternToken(pattern, tokenTypes.escCharOctal, i, 1 + octalDigits.matchLength); // "\0" or "\nn" or "\nnn" - - token.data = { n: octalVal, ch: String.fromCharCode(octalVal) }; - - return token; - } - } - - return null; - }, - - _parseEscapedChar: function (pattern, i, endIndex) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - var token; - - var ch = pattern[i]; - - if (ch !== "\\" || i + 1 >= endIndex) { - return null; - } - - ch = pattern[i + 1]; - - // Parse a sequence for "Character Escapes" - if (scope._escapedChars.indexOf(ch) >= 0) { - if (ch === "x") { - var hexDigits = scope._matchChars(pattern, i + 2, endIndex, scope._hexSymbols, 2); - - if (hexDigits.matchLength !== 2) { - throw new System.ArgumentException.$ctor1("Insufficient hexadecimal digits."); - } - - var hexVal = parseInt(hexDigits.match, 16); - - token = scope._createPatternToken(pattern, tokenTypes.escCharHex, i, 4); // "\xnn" - token.data = { n: hexVal, ch: String.fromCharCode(hexVal) }; - - return token; - } else if (ch === "c") { - if (i + 2 >= endIndex) { - throw new System.ArgumentException.$ctor1("Missing control character."); - } - - var ctrlCh = pattern[i + 2]; - - ctrlCh = ctrlCh.toUpperCase(); - - var ctrlIndex = this._controlChars.indexOf(ctrlCh); - - if (ctrlIndex >= 0) { - token = scope._createPatternToken(pattern, tokenTypes.escCharCtrl, i, 3); // "\cx" or "\cX" - token.data = { n: ctrlIndex, ch: String.fromCharCode(ctrlIndex) }; - - return token; - } - - throw new System.ArgumentException.$ctor1("Unrecognized control character."); - } else if (ch === "u") { - var ucodeDigits = scope._matchChars(pattern, i + 2, endIndex, scope._hexSymbols, 4); - - if (ucodeDigits.matchLength !== 4) { - throw new System.ArgumentException.$ctor1("Insufficient hexadecimal digits."); - } - - var ucodeVal = parseInt(ucodeDigits.match, 16); - - token = scope._createPatternToken(pattern, tokenTypes.escCharUnicode, i, 6); // "\unnnn" - token.data = { n: ucodeVal, ch: String.fromCharCode(ucodeVal) }; - - return token; - } - - token = scope._createPatternToken(pattern, tokenTypes.escChar, i, 2); // "\a" or "\b" or "\t" or "\r" or "\v" or "f" or "n" or "e"- - - var escVal; - - switch (ch) { - case "a": - escVal = 7; - break; - case "b": - escVal = 8; - break; - case "t": - escVal = 9; - break; - case "r": - escVal = 13; - break; - case "v": - escVal = 11; - break; - case "f": - escVal = 12; - break; - case "n": - escVal = 10; - break; - case "e": - escVal = 27; - break; - - default: - throw new System.ArgumentException.$ctor1("Unexpected escaped char: '" + ch + "'."); - } - - token.data = { n: escVal, ch: String.fromCharCode(escVal) }; - - return token; - } - - // Parse a sequence for an octal character("Character Escapes") - if (ch >= "0" && ch <= "7") { - var octalCharToken = scope._parseOctalCharToken(pattern, i, endIndex); - - return octalCharToken; - } - - // Parse a sequence for "Character Classes" - if (scope._escapedCharClasses.indexOf(ch) >= 0) { - if (ch === "p" || ch === "P") { - var catNameChars = scope._matchUntil(pattern, i + 2, endIndex, "}"); // the longest category name is 37 + 2 brackets, but .NET does not limit the value on this step - - if (catNameChars.matchLength < 2 || catNameChars.match[0] !== "{" || catNameChars.unmatchLength !== 1) { - throw new System.ArgumentException.$ctor1("Incomplete \p{X} character escape."); - } - - var catName = catNameChars.match.slice(1); - - if (scope._unicodeCategories.indexOf(catName) >= 0) { - return scope._createPatternToken(pattern, tokenTypes.escCharClassCategory, i, 2 + catNameChars.matchLength + 1); // "\p{Name}" or "\P{Name}" - } - - if (scope._namedCharBlocks.indexOf(catName) >= 0) { - return scope._createPatternToken(pattern, tokenTypes.escCharClassBlock, i, 2 + catNameChars.matchLength + 1); // "\p{Name}" or "\P{Name}" - } - - throw new System.ArgumentException.$ctor1("Unknown property '" + catName + "'."); - } - - return scope._createPatternToken(pattern, tokenTypes.escCharClass, i, 2); // "\w" or "\W" or "\s" or "\S" or "\d" or "\D" - } - - // Some other literal - if (scope._escapedSpecialSymbols.indexOf(ch) >= 0) { - token = scope._createPatternToken(pattern, tokenTypes.escCharOther, i, 2); // "\." or "\$" or ... "\\" - token.data = { n: ch.charCodeAt(0), ch: ch }; - return token; - } - - return null; - }, - - _parseCharRangeToken: function (pattern, i, endIndex) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - var tokens = []; - var intervalToken; - var substractToken; - var token; - var isNegative = false; - var noMoreTokenAllowed = false; - var hasSubstractToken = false; - - var ch = pattern[i]; - - if (ch !== "[") { - return null; - } - - var index = i + 1; - var closeBracketIndex = -1; - var toInc; - - if (index < endIndex && pattern[index] === "^") { - isNegative = true; - index ++; - } - - var startIndex = index; - - while (index < endIndex) { - ch = pattern[index]; - - noMoreTokenAllowed = hasSubstractToken; - - if (ch === "-" && index + 1 < endIndex && pattern[index + 1] === "[") { - substractToken = scope._parseCharRangeToken(pattern, index + 1, endIndex); - substractToken.childrenPrefix = "-" + substractToken.childrenPrefix; - substractToken.length ++; - token = substractToken; - toInc = substractToken.length; - hasSubstractToken = true; - } else if (ch === "\\") { - token = scope._parseEscapedChar(pattern, index, endIndex); - - if (token == null) { - throw new System.ArgumentException.$ctor1("Unrecognized escape sequence \\" + ch + "."); - } - toInc = token.length; - } else if (ch === "]" && index > startIndex) { - closeBracketIndex = index; - - break; - } else { - token = scope._createPatternToken(pattern, tokenTypes.literal, index, 1); - toInc = 1; - } - - if (noMoreTokenAllowed) { - throw new System.ArgumentException.$ctor1("A subtraction must be the last element in a character class."); - } - - // Check for interval: - if (tokens.length > 1) { - intervalToken = scope._parseCharIntervalToken(pattern, tokens[tokens.length - 2], tokens[tokens.length - 1], token); - - if (intervalToken != null) { - tokens.pop(); //pop Dush - tokens.pop(); //pop Interval start - token = intervalToken; - } - } - - // Add token: - if (token != null) { - tokens.push(token); - index += toInc; - } - } - - if (closeBracketIndex < 0 || tokens.length < 1) { - throw new System.ArgumentException.$ctor1("Unterminated [] set."); - } - - var groupToken; - - if (!isNegative) { - groupToken = scope._createPatternToken(pattern, tokenTypes.charGroup, i, 1 + closeBracketIndex - i, tokens, "[", "]"); - } else { - groupToken = scope._createPatternToken(pattern, tokenTypes.charNegativeGroup, i, 1 + closeBracketIndex - i, tokens, "[^", "]"); - } - - // Create full range data: - var ranges = scope._tidyCharRange(tokens); - - groupToken.data = { ranges: ranges }; - - if (substractToken != null) { - groupToken.data.substractToken = substractToken; - } - - return groupToken; - }, - - _parseCharIntervalToken: function (pattern, intervalStartToken, dashToken, intervalEndToken) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - - if (dashToken.type !== tokenTypes.literal || dashToken.value !== "-") { - return null; - } - - if (intervalStartToken.type !== tokenTypes.literal && - intervalStartToken.type !== tokenTypes.escChar && - intervalStartToken.type !== tokenTypes.escCharOctal && - intervalStartToken.type !== tokenTypes.escCharHex && - intervalStartToken.type !== tokenTypes.escCharCtrl && - intervalStartToken.type !== tokenTypes.escCharUnicode && - intervalStartToken.type !== tokenTypes.escCharOther) { - return null; - } - - if (intervalEndToken.type !== tokenTypes.literal && - intervalEndToken.type !== tokenTypes.escChar && - intervalEndToken.type !== tokenTypes.escCharOctal && - intervalEndToken.type !== tokenTypes.escCharHex && - intervalEndToken.type !== tokenTypes.escCharCtrl && - intervalEndToken.type !== tokenTypes.escCharUnicode && - intervalEndToken.type !== tokenTypes.escCharOther) { - return null; - } - - var startN; - var startCh; - - if (intervalStartToken.type === tokenTypes.literal) { - startN = intervalStartToken.value.charCodeAt(0); - startCh = intervalStartToken.value; - } else { - startN = intervalStartToken.data.n; - startCh = intervalStartToken.data.ch; - } - - var endN; - var endCh; - - if (intervalEndToken.type === tokenTypes.literal) { - endN = intervalEndToken.value.charCodeAt(0); - endCh = intervalEndToken.value; - } else { - endN = intervalEndToken.data.n; - endCh = intervalEndToken.data.ch; - } - - if (startN > endN) { - throw new System.NotSupportedException.$ctor1("[x-y] range in reverse order."); - } - - var index = intervalStartToken.index; - var length = intervalStartToken.length + dashToken.length + intervalEndToken.length; - var intervalToken = scope._createPatternToken(pattern, tokenTypes.charInterval, index, length, [intervalStartToken, dashToken, intervalEndToken], "", ""); - - intervalToken.data = { - startN: startN, - startCh: startCh, - endN: endN, - endCh: endCh - }; - - return intervalToken; - }, - - _tidyCharRange: function (tokens) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - - var j; - var k; - var n; - var m; - var token; - var ranges = []; - var classTokens = []; - - var range; - var nextRange; - var toSkip; - - for (j = 0; j < tokens.length; j++) { - token = tokens[j]; - - if (token.type === tokenTypes.literal) { - n = token.value.charCodeAt(0); - m = n; - } else if (token.type === tokenTypes.charInterval) { - n = token.data.startN; - m = token.data.endN; - } else if (token.type === tokenTypes.literal || - token.type === tokenTypes.escChar || - token.type === tokenTypes.escCharOctal || - token.type === tokenTypes.escCharHex || - token.type === tokenTypes.escCharCtrl || - token.type === tokenTypes.escCharUnicode || - token.type === tokenTypes.escCharOther) { - n = token.data.n; - m = n; - } else if ( - token.type === tokenTypes.charGroup || - token.type === tokenTypes.charNegativeGroup) { - continue; - } else { - classTokens.push(token); - continue; - } - - if (ranges.length === 0) { - ranges.push({ n: n, m: m }); - continue; - } - - //TODO: [Performance] Use binary search - for (k = 0; k < ranges.length; k++) { - if (ranges[k].n > n) { - break; - } - } - - ranges.splice(k, 0, { n: n, m: m }); - } - - // Combine ranges: - for (j = 0; j < ranges.length; j++) { - range = ranges[j]; - - toSkip = 0; - - for (k = j + 1; k < ranges.length; k++) { - nextRange = ranges[k]; - - if (nextRange.n > 1 + range.m) { - break; - } - - toSkip++; - - if (nextRange.m > range.m) { - range.m = nextRange.m; - } - } - if (toSkip > 0) { - ranges.splice(j + 1, toSkip); - } - } - - if (classTokens.length > 0) { - var charClassStr = "[" + scope._constructPattern(classTokens) + "]"; - ranges.charClassToken = scope._createPatternToken(charClassStr, tokenTypes.charGroup, 0, charClassStr.length, tokens, "[", "]"); - } - - return ranges; - }, - - _parseDotToken: function (pattern, i) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - - var ch = pattern[i]; - - if (ch !== ".") { - return null; - } - - return scope._createPatternToken(pattern, tokenTypes.escCharClassDot, i, 1); - }, - - _parseAnchorToken: function (pattern, i) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - - var ch = pattern[i]; - - if (ch !== "^" && ch !== "$") { - return null; - } - - return scope._createPatternToken(pattern, tokenTypes.anchor, i, 1); - }, - - _updateSettingsFromConstructs: function (settings, constructs) { - if (constructs.isIgnoreWhitespace != null) { - settings.ignoreWhitespace = constructs.isIgnoreWhitespace; - } - - if (constructs.isExplicitCapture != null) { - settings.explicitCapture = constructs.isExplicitCapture; - } - }, - - _parseGroupToken: function (pattern, settings, i, endIndex) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - var groupSettings = { - ignoreWhitespace: settings.ignoreWhitespace, - explicitCapture: settings.explicitCapture - }; - - var ch = pattern[i]; - - if (ch !== "(") { - return null; - } - - var bracketLvl = 1; - var sqBracketCtx = false; - var bodyIndex = i + 1; - var closeBracketIndex = -1; - - var isComment = false; - var isAlternation = false; - var isInlineOptions = false; - var isImnsxConstructed = false; - var isNonCapturingExplicit = false; - - var grConstructs = null; - - // Parse the Group construct, if any: - var constructToken = scope._parseGroupConstructToken(pattern, groupSettings, i + 1, endIndex); - - if (constructToken != null) { - grConstructs = this._fillGroupConstructs(constructToken); - - bodyIndex += constructToken.length; - - if (constructToken.type === tokenTypes.commentInline) { - isComment = true; - } else if (constructToken.type === tokenTypes.alternationGroupCondition) { - isAlternation = true; - } else if (constructToken.type === tokenTypes.groupConstructImnsx) { - this._updateSettingsFromConstructs(groupSettings, grConstructs); - isImnsxConstructed = true; - } else if (constructToken.type === tokenTypes.groupConstructImnsxMisc) { - this._updateSettingsFromConstructs(settings, grConstructs); // parent settings! - isInlineOptions = true; - } - } - - if (groupSettings.explicitCapture && (grConstructs == null || grConstructs.name1 == null)) { - isNonCapturingExplicit = true; - } - - var index = bodyIndex; - - while (index < endIndex) { - ch = pattern[index]; - - if (ch === "\\") { - index ++; // skip the escaped char - } else if (ch === "[") { - sqBracketCtx = true; - } else if (ch === "]" && sqBracketCtx) { - sqBracketCtx = false; - } else if (!sqBracketCtx) { - if (ch === "(" && !isComment) { - ++bracketLvl; - } else if (ch === ")") { - --bracketLvl; - - if (bracketLvl === 0) { - closeBracketIndex = index; - break; - } - } - } - - ++index; - } - - var result = null; - - if (isComment) { - if (closeBracketIndex < 0) { - throw new System.ArgumentException.$ctor1("Unterminated (?#...) comment."); - } - - result = scope._createPatternToken(pattern, tokenTypes.commentInline, i, 1 + closeBracketIndex - i); - } else { - if (closeBracketIndex < 0) { - throw new System.ArgumentException.$ctor1("Not enough )'s."); - } - - // Parse the "Body" of the group - var innerTokens = scope._parsePatternImpl(pattern, groupSettings, bodyIndex, closeBracketIndex); - - if (constructToken != null) { - innerTokens.splice(0, 0, constructToken); - } - - // If there is an Alternation expression, treat the group as Alternation group - if (isAlternation) { - var innerTokensLen = innerTokens.length; - var innerToken; - var j; - - // Check that there is only 1 alternation symbol: - var altCount = 0; - - for (j = 0; j < innerTokensLen; j++) { - innerToken = innerTokens[j]; - - if (innerToken.type === tokenTypes.alternation) { - ++altCount; - - if (altCount > 1) { - throw new System.ArgumentException.$ctor1("Too many | in (?()|)."); - } - } - } - - if (altCount === 0) { - // Though .NET works with this case, it ends up with unexpected result. Let's avoid this behaviour. - throw new System.NotSupportedException.$ctor1("Alternation group without | is not supported."); - } - - var altGroupToken = scope._createPatternToken(pattern, tokenTypes.alternationGroup, i, 1 + closeBracketIndex - i, innerTokens, "(", ")"); - - result = altGroupToken; - } else { - // Create Group token: - var tokenType = tokenTypes.group; - - if (isInlineOptions) { - tokenType = tokenTypes.groupImnsxMisc; - } else if (isImnsxConstructed) { - tokenType = tokenTypes.groupImnsx; - } - - var groupToken = scope._createPatternToken(pattern, tokenType, i, 1 + closeBracketIndex - i, innerTokens, "(", ")"); - - groupToken.localSettings = groupSettings; - result = groupToken; - } - } - - if (isNonCapturingExplicit) { - result.isNonCapturingExplicit = true; - } - - return result; - }, - - _parseGroupConstructToken: function (pattern, settings, i, endIndex) { - // ? - // ?'name1' - // ? - // ?'name1-name2' - // ?: - // ?imnsx-imnsx - // ?= - // ?! - // ?<= - // ? - // ?# - - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - - var ch = pattern[i]; - - if (ch !== "?" || i + 1 >= endIndex) { - return null; - } - - ch = pattern[i + 1]; - - if (ch === ":" || ch === "=" || ch === "!" || ch === ">") { - return scope._createPatternToken(pattern, tokenTypes.groupConstruct, i, 2); - } - - if (ch === "#") { - return scope._createPatternToken(pattern, tokenTypes.commentInline, i, 2); - } - - if (ch === "(") { - return scope._parseAlternationGroupConditionToken(pattern, settings, i, endIndex); - } - - if (ch === "<" && i + 2 < endIndex) { - var ch3 = pattern[i + 2]; - - if (ch3 === "=" || ch3 === "!") { - return scope._createPatternToken(pattern, tokenTypes.groupConstruct, i, 3); - } - } - - if (ch === "<" || ch === "'") { - var closingCh = ch === "<" ? ">" : ch; - var nameChars = scope._matchUntil(pattern, i + 2, endIndex, closingCh); - - if (nameChars.unmatchLength !== 1 || nameChars.matchLength === 0) { - throw new System.ArgumentException.$ctor1("Unrecognized grouping construct."); - } - - var nameFirstCh = nameChars.match.slice(0, 1); - - if ("`~@#$%^&*()+{}[]|\\/|'\";:,.?".indexOf(nameFirstCh) >= 0) { - // TODO: replace the "black list" of wrong characters with char class check: - // According to UTS#18 Unicode Regular Expressions (http://www.unicode.org/reports/tr18/) - // RL 1.4 Simple Word Boundaries The class of includes all Alphabetic - // values from the Unicode character database, from UnicodeData.txt [UData], plus the U+200C - // ZERO WIDTH NON-JOINER and U+200D ZERO WIDTH JOINER. - throw new System.ArgumentException.$ctor1("Invalid group name: Group names must begin with a word character."); - } - - return scope._createPatternToken(pattern, tokenTypes.groupConstructName, i, 2 + nameChars.matchLength + 1); - } - - var imnsxChars = scope._matchChars(pattern, i + 1, endIndex, "imnsx-"); - - if (imnsxChars.matchLength > 0 && (imnsxChars.unmatchCh === ":" || imnsxChars.unmatchCh === ")")) { - var imnsxTokenType = imnsxChars.unmatchCh === ":" ? tokenTypes.groupConstructImnsx : tokenTypes.groupConstructImnsxMisc; - var imnsxPostfixLen = imnsxChars.unmatchCh === ":" ? 1 : 0; - - return scope._createPatternToken(pattern, imnsxTokenType, i, 1 + imnsxChars.matchLength + imnsxPostfixLen); - } - - throw new System.ArgumentException.$ctor1("Unrecognized grouping construct."); - }, - - _parseQuantifierToken: function (pattern, i, endIndex) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - var token = null; - - var ch = pattern[i]; - - if (ch === "*" || ch === "+" || ch === "?") { - token = scope._createPatternToken(pattern, tokenTypes.quantifier, i, 1); - token.data = { val: ch }; - } else if (ch === "{") { - var dec1Chars = scope._matchChars(pattern, i + 1, endIndex, scope._decSymbols); - - if (dec1Chars.matchLength !== 0) { - if (dec1Chars.unmatchCh === "}") { - token = scope._createPatternToken(pattern, tokenTypes.quantifierN, i, 1 + dec1Chars.matchLength + 1); - token.data = { - n: parseInt(dec1Chars.match, 10) - }; - } else if (dec1Chars.unmatchCh === ",") { - var dec2Chars = scope._matchChars(pattern, dec1Chars.unmatchIndex + 1, endIndex, scope._decSymbols); - - if (dec2Chars.unmatchCh === "}") { - token = scope._createPatternToken(pattern, tokenTypes.quantifierNM, i, 1 + dec1Chars.matchLength + 1 + dec2Chars.matchLength + 1); - token.data = { - n: parseInt(dec1Chars.match, 10), - m: null - }; - - if (dec2Chars.matchLength !== 0) { - token.data.m = parseInt(dec2Chars.match, 10); - - if (token.data.n > token.data.m) { - throw new System.ArgumentException.$ctor1("Illegal {x,y} with x > y."); - } - } - } - } - } - } - - if (token != null) { - var nextChIndex = i + token.length; - - if (nextChIndex < endIndex) { - var nextCh = pattern[nextChIndex]; - - if (nextCh === "?") { - this._modifyPatternToken(token, pattern, token.type, token.index, token.length + 1); - token.data.isLazy = true; - } - } - } - - return token; - }, - - _parseAlternationToken: function (pattern, i) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - - var ch = pattern[i]; - - if (ch !== "|") { - return null; - } - - return scope._createPatternToken(pattern, tokenTypes.alternation, i, 1); - }, - - _parseAlternationGroupConditionToken: function (pattern, settings, i, endIndex) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - var constructToken; - var childToken; - var data = null; - - var ch = pattern[i]; - - if (ch !== "?" || i + 1 >= endIndex || pattern[i + 1] !== "(") { - return null; - } - - // Parse Alternation condition as a group: - var expr = scope._parseGroupToken(pattern, settings, i + 1, endIndex); - - if (expr == null) { - return null; - } - - if (expr.type === tokenTypes.commentInline) { - throw new System.ArgumentException.$ctor1("Alternation conditions cannot be comments."); - } - - var children = expr.children; - - if (children && children.length) { - constructToken = children[0]; - - if (constructToken.type === tokenTypes.groupConstructName) { - throw new System.ArgumentException.$ctor1("Alternation conditions do not capture and cannot be named."); - } - - if (constructToken.type === tokenTypes.groupConstruct || constructToken.type === tokenTypes.groupConstructImnsx) { - childToken = scope._findFirstGroupWithoutConstructs(children); - - if (childToken != null) { - childToken.isEmptyCapturing = true; - } - } - - if (constructToken.type === tokenTypes.literal) { - var literalVal = expr.value.slice(1, expr.value.length - 1); - var isDigit = literalVal[0] >= "0" && literalVal[0] <= "9"; - - if (isDigit) { - var res = scope._matchChars(literalVal, 0, literalVal.length, scope._decSymbols); - - if (res.matchLength !== literalVal.length) { - throw new System.ArgumentException.$ctor1("Malformed Alternation group number: " + literalVal + "."); - } - - var number = parseInt(literalVal, 10); - data = { number: number }; - } else { - data = { name: literalVal }; - } - } - } - - // Add "Noncapturing" construct if there are no other ones. - if (!children.length || (children[0].type !== tokenTypes.groupConstruct && children[0].type !== tokenTypes.groupConstructImnsx)) { - constructToken = scope._createPatternToken("?:", tokenTypes.groupConstruct, 0, 2); - children.splice(0, 0, constructToken); - } - - // Transform Group token to Alternation expression token: - var token = scope._createPatternToken(pattern, tokenTypes.alternationGroupCondition, expr.index - 1, 1 + expr.length, [expr], "?", ""); - - if (data != null) { - token.data = data; - } - - return token; - }, - - _findFirstGroupWithoutConstructs: function (tokens) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - var result = null; - var token; - var i; - - for (i = 0; i < tokens.length; ++i) { - token = tokens[i]; - - if (token.type === tokenTypes.group && token.children && token.children.length) { - if (token.children[0].type !== tokenTypes.groupConstruct && token.children[0].type !== tokenTypes.groupConstructImnsx) { - result = token; - - break; - } - - if (token.children && token.children.length) { - result = scope._findFirstGroupWithoutConstructs(token.children); - - if (result != null) { - break; - } - } - } - } - - return result; - }, - - _parseXModeCommentToken: function (pattern, i, endIndex) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var tokenTypes = scope.tokenTypes; - - var ch = pattern[i]; - - if (ch !== "#") { - return null; - } - - var index = i + 1; - - while (index < endIndex) { - ch = pattern[index]; - ++index; // index should be changed before breaking - - if (ch === "\n") { - break; - } - } - - return scope._createPatternToken(pattern, tokenTypes.commentXMode, i, index - i); - }, - - _createLiteralToken: function (body) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - var token = scope._createPatternToken(body, scope.tokenTypes.literal, 0, body.length); - - return token; - }, - - _createPositiveLookaheadToken: function (body, settings) { - var scope = System.Text.RegularExpressions.RegexEngineParser; - - var pattern = "(?=" + body + ")"; - var groupToken = scope._parseGroupToken(pattern, settings, 0, pattern.length); - - return groupToken; - }, - - _createPatternToken: function (pattern, type, i, len, innerTokens, innerTokensPrefix, innerTokensPostfix) { - var token = { - type: type, - index: i, - length: len, - value: pattern.slice(i, i + len) - }; - - if (innerTokens != null && innerTokens.length > 0) { - token.children = innerTokens; - token.childrenPrefix = innerTokensPrefix; - token.childrenPostfix = innerTokensPostfix; - } - - return token; - }, - - _modifyPatternToken: function (token, pattern, type, i, len) { - if (type != null) { - token.type = type; - } - - if (i != null || len != null) { - if (i != null) { - token.index = i; - } - - if (len != null) { - token.length = len; - } - - token.value = pattern.slice(token.index, token.index + token.length); - } - }, - - _updatePatternToken: function (token, type, i, len, value) { - token.type = type; - token.index = i; - token.length = len; - token.value = value; - }, - - _matchChars: function (str, startIndex, endIndex, allowedChars, maxLength) { - var res = { - match: "", - matchIndex: -1, - matchLength: 0, - unmatchCh: "", - unmatchIndex: -1, - unmatchLength: 0 - }; - - var index = startIndex; - var ch; - - if (maxLength != null && maxLength >= 0) { - endIndex = startIndex + maxLength; - } - - while (index < endIndex) { - ch = str[index]; - - if (allowedChars.indexOf(ch) < 0) { - res.unmatchCh = ch; - res.unmatchIndex = index; - res.unmatchLength = 1; - - break; - } - - index++; - } - - if (index > startIndex) { - res.match = str.slice(startIndex, index); - res.matchIndex = startIndex; - res.matchLength = index - startIndex; - } - - return res; - }, - - _matchUntil: function (str, startIndex, endIndex, unallowedChars, maxLength) { - var res = { - match: "", - matchIndex: -1, - matchLength: 0, - unmatchCh: "", - unmatchIndex: -1, - unmatchLength: 0 - }; - - var index = startIndex; - var ch; - - if (maxLength != null && maxLength >= 0) { - endIndex = startIndex + maxLength; - } - - while (index < endIndex) { - ch = str[index]; - - if (unallowedChars.indexOf(ch) >= 0) { - res.unmatchCh = ch; - res.unmatchIndex = index; - res.unmatchLength = 1; - - break; - } - - index++; - } - - if (index > startIndex) { - res.match = str.slice(startIndex, index); - res.matchIndex = startIndex; - res.matchLength = index - startIndex; - } - - return res; - } - } - }); - - // @source BitConverter.js - - H5.define("System.BitConverter", { - statics: { - fields: { - isLittleEndian: false, - arg_ArrayPlusOffTooSmall: null - }, - ctors: { - init: function () { - this.isLittleEndian = System.BitConverter.getIsLittleEndian(); - this.arg_ArrayPlusOffTooSmall = "Destination array is not long enough to copy all the items in the collection. Check array index and length."; - } - }, - methods: { - getBytes: function (value) { - return value ? System.Array.init([1], System.Byte) : System.Array.init([0], System.Byte); - }, - getBytes$1: function (value) { - return System.BitConverter.getBytes$3(H5.Int.sxs(value & 65535)); - }, - getBytes$3: function (value) { - var view = System.BitConverter.view(2); - view.setInt16(0, value); - - return System.BitConverter.getViewBytes(view); - }, - getBytes$4: function (value) { - var view = System.BitConverter.view(4); - view.setInt32(0, value); - - return System.BitConverter.getViewBytes(view); - }, - getBytes$5: function (value) { - var view = System.BitConverter.getView(value); - - return System.BitConverter.getViewBytes(view); - }, - getBytes$7: function (value) { - var view = System.BitConverter.view(2); - view.setUint16(0, value); - - return System.BitConverter.getViewBytes(view); - }, - getBytes$8: function (value) { - var view = System.BitConverter.view(4); - view.setUint32(0, value); - - return System.BitConverter.getViewBytes(view); - }, - getBytes$9: function (value) { - var view = System.BitConverter.getView(System.Int64.clip64(value)); - - return System.BitConverter.getViewBytes(view); - }, - getBytes$6: function (value) { - var view = System.BitConverter.view(4); - view.setFloat32(0, value); - - return System.BitConverter.getViewBytes(view); - }, - getBytes$2: function (value) { - if (isNaN(value)) { - if (System.BitConverter.isLittleEndian) { - return System.Array.init([0, 0, 0, 0, 0, 0, 248, 255], System.Byte); - } else { - return System.Array.init([255, 248, 0, 0, 0, 0, 0, 0], System.Byte); - } - } - - var view = System.BitConverter.view(8); - view.setFloat64(0, value); - - return System.BitConverter.getViewBytes(view); - }, - toChar: function (value, startIndex) { - return ((System.BitConverter.toInt16(value, startIndex)) & 65535); - }, - toInt16: function (value, startIndex) { - System.BitConverter.checkArguments(value, startIndex, 2); - - var view = System.BitConverter.view(2); - - System.BitConverter.setViewBytes(view, value, -1, startIndex); - - return view.getInt16(0); - }, - toInt32: function (value, startIndex) { - System.BitConverter.checkArguments(value, startIndex, 4); - - var view = System.BitConverter.view(4); - - System.BitConverter.setViewBytes(view, value, -1, startIndex); - - return view.getInt32(0); - }, - toInt64: function (value, startIndex) { - System.BitConverter.checkArguments(value, startIndex, 8); - - var low = System.BitConverter.toInt32(value, startIndex); - var high = System.BitConverter.toInt32(value, ((startIndex + 4) | 0)); - - if (System.BitConverter.isLittleEndian) { - return System.Int64([low, high]); - } - - return System.Int64([high, low]); - }, - toUInt16: function (value, startIndex) { - return ((System.BitConverter.toInt16(value, startIndex)) & 65535); - }, - toUInt32: function (value, startIndex) { - return ((System.BitConverter.toInt32(value, startIndex)) >>> 0); - }, - toUInt64: function (value, startIndex) { - var l = System.BitConverter.toInt64(value, startIndex); - - return System.UInt64([l.value.low, l.value.high]); - }, - toSingle: function (value, startIndex) { - System.BitConverter.checkArguments(value, startIndex, 4); - - var view = System.BitConverter.view(4); - - System.BitConverter.setViewBytes(view, value, -1, startIndex); - - return view.getFloat32(0); - }, - toDouble: function (value, startIndex) { - System.BitConverter.checkArguments(value, startIndex, 8); - - var view = System.BitConverter.view(8); - - System.BitConverter.setViewBytes(view, value, -1, startIndex); - - return view.getFloat64(0); - }, - toString$2: function (value, startIndex, length) { - if (value == null) { - throw new System.ArgumentNullException.$ctor1("value"); - } - - if (startIndex < 0 || startIndex >= value.length && startIndex > 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("startIndex"); - } - - if (length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("length"); - } - - if (startIndex > ((value.length - length) | 0)) { - throw new System.ArgumentException.$ctor1(System.BitConverter.arg_ArrayPlusOffTooSmall); - } - - if (length === 0) { - return ""; - } - - if (length > (715827882)) { - throw new System.ArgumentOutOfRangeException.$ctor4("length", H5.toString((715827882))); - } - - var chArrayLength = H5.Int.mul(length, 3); - - var chArray = System.Array.init(chArrayLength, 0, System.Char); - var i = 0; - var index = startIndex; - - for (i = 0; i < chArrayLength; i = (i + 3) | 0) { - var b = value[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), value)]; - chArray[System.Array.index(i, chArray)] = System.BitConverter.getHexValue(((H5.Int.div(b, 16)) | 0)); - chArray[System.Array.index(((i + 1) | 0), chArray)] = System.BitConverter.getHexValue(b % 16); - chArray[System.Array.index(((i + 2) | 0), chArray)] = 45; - } - - return System.String.fromCharArray(chArray, 0, ((chArray.length - 1) | 0)); - }, - toString: function (value) { - if (value == null) { - throw new System.ArgumentNullException.$ctor1("value"); - } - - return System.BitConverter.toString$2(value, 0, value.length); - }, - toString$1: function (value, startIndex) { - if (value == null) { - throw new System.ArgumentNullException.$ctor1("value"); - } - - return System.BitConverter.toString$2(value, startIndex, ((value.length - startIndex) | 0)); - }, - toBoolean: function (value, startIndex) { - System.BitConverter.checkArguments(value, startIndex, 1); - - return (value[System.Array.index(startIndex, value)] === 0) ? false : true; - }, - doubleToInt64Bits: function (value) { - var view = System.BitConverter.view(8); - view.setFloat64(0, value); - - return System.Int64(new System.Int64([view.getInt32(4), view.getInt32(0)])); - }, - int64BitsToDouble: function (value) { - var view = System.BitConverter.getView(value); - - return view.getFloat64(0); - }, - singleToInt32Bits: function (value) { - var view = System.BitConverter.view(4); - view.setFloat32(0, value); - - return view.getInt32(0); - }, - int32BitsToSingle: function (value) { - var view = System.BitConverter.view(4); - view.setInt32(0, value); - - return view.getFloat32(0); - }, - getHexValue: function (i) { - if (i < 10) { - return ((((i + 48) | 0)) & 65535); - } - - return ((((((i - 10) | 0) + 65) | 0)) & 65535); - }, - getViewBytes: function (view, count, startIndex) { - if (count === void 0) { count = -1; } - if (startIndex === void 0) { startIndex = 0; } - if (count === -1) { - count = view.byteLength; - } - - var r = System.Array.init(count, 0, System.Byte); - - if (System.BitConverter.isLittleEndian) { - for (var i = (count - 1) | 0; i >= 0; i = (i - 1) | 0) { - r[System.Array.index(i, r)] = view.getUint8(H5.identity(startIndex, (startIndex = (startIndex + 1) | 0))); - } - } else { - for (var i1 = 0; i1 < count; i1 = (i1 + 1) | 0) { - r[System.Array.index(i1, r)] = view.getUint8(H5.identity(startIndex, (startIndex = (startIndex + 1) | 0))); - } - } - - return r; - }, - setViewBytes: function (view, value, count, startIndex) { - if (count === void 0) { count = -1; } - if (startIndex === void 0) { startIndex = 0; } - if (count === -1) { - count = view.byteLength; - } - - if (System.BitConverter.isLittleEndian) { - for (var i = (count - 1) | 0; i >= 0; i = (i - 1) | 0) { - view.setUint8(i, value[System.Array.index(H5.identity(startIndex, (startIndex = (startIndex + 1) | 0)), value)]); - } - } else { - for (var i1 = 0; i1 < count; i1 = (i1 + 1) | 0) { - view.setUint8(i1, value[System.Array.index(H5.identity(startIndex, (startIndex = (startIndex + 1) | 0)), value)]); - } - } - }, - view: function (length) { - var buffer = new ArrayBuffer(length); - var view = new DataView(buffer); - - return view; - }, - getView: function (value) { - var view = System.BitConverter.view(8); - - if (value.value) { - view.setInt32(4, value.value.low); - view.setInt32(0, value.value.high); - } else { - view.setInt32(4, value.low); - view.setInt32(0, value.high); - } - - return view; - }, - getIsLittleEndian: function () { - var view = System.BitConverter.view(2); - - view.setUint8(0, 170); - view.setUint8(1, 187); - - if (view.getUint16(0) === 43707) { - return true; - } - - return false; - }, - checkArguments: function (value, startIndex, size) { - if (value == null) { - throw new System.ArgumentNullException.$ctor1("null"); - } - - if (System.Int64((startIndex >>> 0)).gte(System.Int64(value.length))) { - throw new System.ArgumentOutOfRangeException.$ctor1("startIndex"); - } - - if (startIndex > ((value.length - size) | 0)) { - throw new System.ArgumentException.$ctor1(System.BitConverter.arg_ArrayPlusOffTooSmall); - } - } - } - } - }); - - // @source BitArray.js - - H5.define("System.Collections.BitArray", { - inherits: [System.Collections.ICollection,System.ICloneable], - statics: { - fields: { - BitsPerInt32: 0, - BytesPerInt32: 0, - BitsPerByte: 0, - _ShrinkThreshold: 0 - }, - ctors: { - init: function () { - this.BitsPerInt32 = 32; - this.BytesPerInt32 = 4; - this.BitsPerByte = 8; - this._ShrinkThreshold = 256; - } - }, - methods: { - GetArrayLength: function (n, div) { - return n > 0 ? ((((((H5.Int.div((((n - 1) | 0)), div)) | 0)) + 1) | 0)) : 0; - } - } - }, - fields: { - m_array: null, - m_length: 0, - _version: 0 - }, - props: { - Length: { - get: function () { - return this.m_length; - }, - set: function (value) { - if (value < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("value", "Non-negative number required."); - } - - var newints = System.Collections.BitArray.GetArrayLength(value, System.Collections.BitArray.BitsPerInt32); - if (newints > this.m_array.length || ((newints + System.Collections.BitArray._ShrinkThreshold) | 0) < this.m_array.length) { - var newarray = System.Array.init(newints, 0, System.Int32); - System.Array.copy(this.m_array, 0, newarray, 0, newints > this.m_array.length ? this.m_array.length : newints); - this.m_array = newarray; - } - - if (value > this.m_length) { - var last = (System.Collections.BitArray.GetArrayLength(this.m_length, System.Collections.BitArray.BitsPerInt32) - 1) | 0; - var bits = this.m_length % 32; - if (bits > 0) { - this.m_array[System.Array.index(last, this.m_array)] = this.m_array[System.Array.index(last, this.m_array)] & ((((1 << bits) - 1) | 0)); - } - - System.Array.fill(this.m_array, 0, ((last + 1) | 0), ((((newints - last) | 0) - 1) | 0)); - } - - this.m_length = value; - this._version = (this._version + 1) | 0; - } - }, - Count: { - get: function () { - return this.m_length; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return this; - } - }, - IsReadOnly: { - get: function () { - return false; - } - } - }, - alias: [ - "copyTo", "System$Collections$ICollection$copyTo", - "Count", "System$Collections$ICollection$Count", - "clone", "System$ICloneable$clone", - "GetEnumerator", "System$Collections$IEnumerable$GetEnumerator" - ], - ctors: { - $ctor3: function (length) { - System.Collections.BitArray.$ctor4.call(this, length, false); - }, - $ctor4: function (length, defaultValue) { - this.$initialize(); - if (length < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("length", "Index is less than zero."); - } - - this.m_array = System.Array.init(System.Collections.BitArray.GetArrayLength(length, System.Collections.BitArray.BitsPerInt32), 0, System.Int32); - this.m_length = length; - - var fillValue = defaultValue ? (-1) : 0; - for (var i = 0; i < this.m_array.length; i = (i + 1) | 0) { - this.m_array[System.Array.index(i, this.m_array)] = fillValue; - } - - this._version = 0; - }, - $ctor1: function (bytes) { - this.$initialize(); - if (bytes == null) { - throw new System.ArgumentNullException.$ctor1("bytes"); - } - if (bytes.length > 268435455) { - throw new System.ArgumentException.$ctor3(System.String.format("The input array length must not exceed Int32.MaxValue / {0}. Otherwise BitArray.Length would exceed Int32.MaxValue.", [H5.box(System.Collections.BitArray.BitsPerByte, System.Int32)]), "bytes"); - } - - this.m_array = System.Array.init(System.Collections.BitArray.GetArrayLength(bytes.length, System.Collections.BitArray.BytesPerInt32), 0, System.Int32); - this.m_length = H5.Int.mul(bytes.length, System.Collections.BitArray.BitsPerByte); - - var i = 0; - var j = 0; - while (((bytes.length - j) | 0) >= 4) { - this.m_array[System.Array.index(H5.identity(i, ((i = (i + 1) | 0))), this.m_array)] = (bytes[System.Array.index(j, bytes)] & 255) | ((bytes[System.Array.index(((j + 1) | 0), bytes)] & 255) << 8) | ((bytes[System.Array.index(((j + 2) | 0), bytes)] & 255) << 16) | ((bytes[System.Array.index(((j + 3) | 0), bytes)] & 255) << 24); - j = (j + 4) | 0; - } - - var r = (bytes.length - j) | 0; - if (r === 3) { - this.m_array[System.Array.index(i, this.m_array)] = ((bytes[System.Array.index(((j + 2) | 0), bytes)] & 255) << 16); - r = 2; - } - - if (r === 2) { - this.m_array[System.Array.index(i, this.m_array)] = this.m_array[System.Array.index(i, this.m_array)] | ((bytes[System.Array.index(((j + 1) | 0), bytes)] & 255) << 8); - r = 1; - } - - if (r === 1) { - this.m_array[System.Array.index(i, this.m_array)] = this.m_array[System.Array.index(i, this.m_array)] | (bytes[System.Array.index(j, bytes)] & 255); - } - - this._version = 0; - }, - ctor: function (values) { - var $t; - this.$initialize(); - if (values == null) { - throw new System.ArgumentNullException.$ctor1("values"); - } - - this.m_array = System.Array.init(System.Collections.BitArray.GetArrayLength(values.length, System.Collections.BitArray.BitsPerInt32), 0, System.Int32); - this.m_length = values.length; - - for (var i = 0; i < values.length; i = (i + 1) | 0) { - if (values[System.Array.index(i, values)]) { - this.m_array[System.Array.index(($t = ((H5.Int.div(i, 32)) | 0)), this.m_array)] = this.m_array[System.Array.index($t, this.m_array)] | (1 << (i % 32)); - } - } - - this._version = 0; - }, - $ctor5: function (values) { - this.$initialize(); - if (values == null) { - throw new System.ArgumentNullException.$ctor1("values"); - } - if (values.length > 67108863) { - throw new System.ArgumentException.$ctor3(System.String.format("The input array length must not exceed Int32.MaxValue / {0}. Otherwise BitArray.Length would exceed Int32.MaxValue.", [H5.box(System.Collections.BitArray.BitsPerInt32, System.Int32)]), "values"); - } - - this.m_array = System.Array.init(values.length, 0, System.Int32); - this.m_length = H5.Int.mul(values.length, System.Collections.BitArray.BitsPerInt32); - - System.Array.copy(values, 0, this.m_array, 0, values.length); - - this._version = 0; - }, - $ctor2: function (bits) { - this.$initialize(); - if (bits == null) { - throw new System.ArgumentNullException.$ctor1("bits"); - } - - var arrayLength = System.Collections.BitArray.GetArrayLength(bits.m_length, System.Collections.BitArray.BitsPerInt32); - this.m_array = System.Array.init(arrayLength, 0, System.Int32); - this.m_length = bits.m_length; - - System.Array.copy(bits.m_array, 0, this.m_array, 0, arrayLength); - - this._version = bits._version; - } - }, - methods: { - getItem: function (index) { - return this.Get(index); - }, - setItem: function (index, value) { - this.Set(index, value); - }, - copyTo: function (array, index) { - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - if (System.Array.getRank(array) !== 1) { - throw new System.ArgumentException.$ctor1("Only single dimensional arrays are supported for the requested action."); - } - - if (H5.is(array, System.Array.type(System.Int32))) { - System.Array.copy(this.m_array, 0, array, index, System.Collections.BitArray.GetArrayLength(this.m_length, System.Collections.BitArray.BitsPerInt32)); - } else if (H5.is(array, System.Array.type(System.Byte))) { - var arrayLength = System.Collections.BitArray.GetArrayLength(this.m_length, System.Collections.BitArray.BitsPerByte); - if ((((array.length - index) | 0)) < arrayLength) { - throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection."); - } - - var b = H5.cast(array, System.Array.type(System.Byte)); - for (var i = 0; i < arrayLength; i = (i + 1) | 0) { - b[System.Array.index(((index + i) | 0), b)] = ((this.m_array[System.Array.index(((H5.Int.div(i, 4)) | 0), this.m_array)] >> (H5.Int.mul((i % 4), 8))) & 255) & 255; - } - } else if (H5.is(array, System.Array.type(System.Boolean))) { - if (((array.length - index) | 0) < this.m_length) { - throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection."); - } - - var b1 = H5.cast(array, System.Array.type(System.Boolean)); - for (var i1 = 0; i1 < this.m_length; i1 = (i1 + 1) | 0) { - b1[System.Array.index(((index + i1) | 0), b1)] = ((this.m_array[System.Array.index(((H5.Int.div(i1, 32)) | 0), this.m_array)] >> (i1 % 32)) & 1) !== 0; - } - } else { - throw new System.ArgumentException.$ctor1("Only supported array types for CopyTo on BitArrays are Boolean[], Int32[] and Byte[]."); - } - }, - Get: function (index) { - if (index < 0 || index >= this.Length) { - throw new System.ArgumentOutOfRangeException.$ctor4("index", "Index was out of range. Must be non-negative and less than the size of the collection."); - } - - return (this.m_array[System.Array.index(((H5.Int.div(index, 32)) | 0), this.m_array)] & (1 << (index % 32))) !== 0; - }, - Set: function (index, value) { - var $t, $t1; - if (index < 0 || index >= this.Length) { - throw new System.ArgumentOutOfRangeException.$ctor4("index", "Index was out of range. Must be non-negative and less than the size of the collection."); - } - - if (value) { - this.m_array[System.Array.index(($t = ((H5.Int.div(index, 32)) | 0)), this.m_array)] = this.m_array[System.Array.index($t, this.m_array)] | (1 << (index % 32)); - } else { - this.m_array[System.Array.index(($t1 = ((H5.Int.div(index, 32)) | 0)), this.m_array)] = this.m_array[System.Array.index($t1, this.m_array)] & (~(1 << (index % 32))); - } - - this._version = (this._version + 1) | 0; - }, - SetAll: function (value) { - var fillValue = value ? (-1) : 0; - var ints = System.Collections.BitArray.GetArrayLength(this.m_length, System.Collections.BitArray.BitsPerInt32); - for (var i = 0; i < ints; i = (i + 1) | 0) { - this.m_array[System.Array.index(i, this.m_array)] = fillValue; - } - - this._version = (this._version + 1) | 0; - }, - And: function (value) { - if (value == null) { - throw new System.ArgumentNullException.$ctor1("value"); - } - if (this.Length !== value.Length) { - throw new System.ArgumentException.$ctor1("Array lengths must be the same."); - } - - var ints = System.Collections.BitArray.GetArrayLength(this.m_length, System.Collections.BitArray.BitsPerInt32); - for (var i = 0; i < ints; i = (i + 1) | 0) { - this.m_array[System.Array.index(i, this.m_array)] = this.m_array[System.Array.index(i, this.m_array)] & value.m_array[System.Array.index(i, value.m_array)]; - } - - this._version = (this._version + 1) | 0; - return this; - }, - Or: function (value) { - if (value == null) { - throw new System.ArgumentNullException.$ctor1("value"); - } - if (this.Length !== value.Length) { - throw new System.ArgumentException.$ctor1("Array lengths must be the same."); - } - - var ints = System.Collections.BitArray.GetArrayLength(this.m_length, System.Collections.BitArray.BitsPerInt32); - for (var i = 0; i < ints; i = (i + 1) | 0) { - this.m_array[System.Array.index(i, this.m_array)] = this.m_array[System.Array.index(i, this.m_array)] | value.m_array[System.Array.index(i, value.m_array)]; - } - - this._version = (this._version + 1) | 0; - return this; - }, - Xor: function (value) { - if (value == null) { - throw new System.ArgumentNullException.$ctor1("value"); - } - if (this.Length !== value.Length) { - throw new System.ArgumentException.$ctor1("Array lengths must be the same."); - } - - var ints = System.Collections.BitArray.GetArrayLength(this.m_length, System.Collections.BitArray.BitsPerInt32); - for (var i = 0; i < ints; i = (i + 1) | 0) { - this.m_array[System.Array.index(i, this.m_array)] = this.m_array[System.Array.index(i, this.m_array)] ^ value.m_array[System.Array.index(i, value.m_array)]; - } - - this._version = (this._version + 1) | 0; - return this; - }, - Not: function () { - var ints = System.Collections.BitArray.GetArrayLength(this.m_length, System.Collections.BitArray.BitsPerInt32); - for (var i = 0; i < ints; i = (i + 1) | 0) { - this.m_array[System.Array.index(i, this.m_array)] = ~this.m_array[System.Array.index(i, this.m_array)]; - } - - this._version = (this._version + 1) | 0; - return this; - }, - clone: function () { - var bitArray = new System.Collections.BitArray.$ctor5(this.m_array); - bitArray._version = this._version; - bitArray.m_length = this.m_length; - return bitArray; - }, - GetEnumerator: function () { - return new System.Collections.BitArray.BitArrayEnumeratorSimple(this); - } - } - }); - - // @source BitArrayEnumeratorSimple.js - - H5.define("System.Collections.BitArray.BitArrayEnumeratorSimple", { - inherits: [System.Collections.IEnumerator], - $kind: "nested class", - fields: { - bitarray: null, - index: 0, - version: 0, - currentElement: false - }, - props: { - Current: { - get: function () { - if (this.index === -1) { - throw new System.InvalidOperationException.$ctor1("Enumeration has not started. Call MoveNext."); - } - if (this.index >= this.bitarray.Count) { - throw new System.InvalidOperationException.$ctor1("Enumeration already finished."); - } - return H5.box(this.currentElement, System.Boolean, System.Boolean.toString); - } - } - }, - alias: [ - "moveNext", "System$Collections$IEnumerator$moveNext", - "Current", "System$Collections$IEnumerator$Current", - "reset", "System$Collections$IEnumerator$reset" - ], - ctors: { - ctor: function (bitarray) { - this.$initialize(); - this.bitarray = bitarray; - this.index = -1; - this.version = bitarray._version; - } - }, - methods: { - moveNext: function () { - if (this.version !== this.bitarray._version) { - throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute."); - } - if (this.index < (((this.bitarray.Count - 1) | 0))) { - this.index = (this.index + 1) | 0; - this.currentElement = this.bitarray.Get(this.index); - return true; - } else { - this.index = this.bitarray.Count; - } - - return false; - }, - reset: function () { - if (this.version !== this.bitarray._version) { - throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute."); - } - this.index = -1; - } - } - }); - - // @source BitHelper.js - - H5.define("System.Collections.Generic.BitHelper", { - statics: { - fields: { - MarkedBitFlag: 0, - IntSize: 0 - }, - ctors: { - init: function () { - this.MarkedBitFlag = 1; - this.IntSize = 32; - } - }, - methods: { - ToIntArrayLength: function (n) { - return n > 0 ? (((((H5.Int.div((((n - 1) | 0)), System.Collections.Generic.BitHelper.IntSize)) | 0) + 1) | 0)) : 0; - } - } - }, - fields: { - _length: 0, - _array: null - }, - ctors: { - ctor: function (bitArray, length) { - this.$initialize(); - this._array = bitArray; - this._length = length; - } - }, - methods: { - MarkBit: function (bitPosition) { - var bitArrayIndex = (H5.Int.div(bitPosition, System.Collections.Generic.BitHelper.IntSize)) | 0; - if (bitArrayIndex < this._length && bitArrayIndex >= 0) { - var flag = (System.Collections.Generic.BitHelper.MarkedBitFlag << (bitPosition % System.Collections.Generic.BitHelper.IntSize)); - this._array[System.Array.index(bitArrayIndex, this._array)] = this._array[System.Array.index(bitArrayIndex, this._array)] | flag; - } - }, - IsMarked: function (bitPosition) { - var bitArrayIndex = (H5.Int.div(bitPosition, System.Collections.Generic.BitHelper.IntSize)) | 0; - if (bitArrayIndex < this._length && bitArrayIndex >= 0) { - var flag = (System.Collections.Generic.BitHelper.MarkedBitFlag << (bitPosition % System.Collections.Generic.BitHelper.IntSize)); - return ((this._array[System.Array.index(bitArrayIndex, this._array)] & flag) !== 0); - } - return false; - } - } - }); - - // @source DictionaryKeyCollectionDebugView.js - - H5.define("System.Collections.Generic.DictionaryKeyCollectionDebugView$2", function (TKey, TValue) { return { - fields: { - _collection: null - }, - props: { - Items: { - get: function () { - var items = System.Array.init(System.Array.getCount(this._collection, TKey), function (){ - return H5.getDefaultValue(TKey); - }, TKey); - System.Array.copyTo(this._collection, items, 0, TKey); - return items; - } - } - }, - ctors: { - ctor: function (collection) { - this.$initialize(); - if (collection == null) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - - this._collection = collection; - } - } - }; }); - - // @source DictionaryValueCollectionDebugView.js - - H5.define("System.Collections.Generic.DictionaryValueCollectionDebugView$2", function (TKey, TValue) { return { - fields: { - _collection: null - }, - props: { - Items: { - get: function () { - var items = System.Array.init(System.Array.getCount(this._collection, TValue), function (){ - return H5.getDefaultValue(TValue); - }, TValue); - System.Array.copyTo(this._collection, items, 0, TValue); - return items; - } - } - }, - ctors: { - ctor: function (collection) { - this.$initialize(); - if (collection == null) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - - this._collection = collection; - } - } - }; }); - - // @source EnumerableHelpers.js - - H5.define("H5.Collections.EnumerableHelpers", { - statics: { - methods: { - ToArray: function (T, source) { - var count = { }; - var results = { v : H5.Collections.EnumerableHelpers.ToArray$1(T, source, count) }; - System.Array.resize(results, count.v, function () { - return H5.getDefaultValue(T); - }, T); - return results.v; - }, - ToArray$1: function (T, source, length) { - var en = H5.getEnumerator(source, T); - try { - if (en.System$Collections$IEnumerator$moveNext()) { - var DefaultCapacity = 4; - var arr = { v : System.Array.init(DefaultCapacity, function (){ - return H5.getDefaultValue(T); - }, T) }; - arr.v[System.Array.index(0, arr.v)] = en[H5.geti(en, "System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1")]; - var count = 1; - - while (en.System$Collections$IEnumerator$moveNext()) { - if (count === arr.v.length) { - var MaxArrayLength = 2146435071; - - var newLength = count << 1; - if ((newLength >>> 0) > MaxArrayLength) { - newLength = MaxArrayLength <= count ? ((count + 1) | 0) : MaxArrayLength; - } - - System.Array.resize(arr, newLength, function () { - return H5.getDefaultValue(T); - }, T); - } - - arr.v[System.Array.index(H5.identity(count, ((count = (count + 1) | 0))), arr.v)] = en[H5.geti(en, "System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1")]; - } - - length.v = count; - return arr.v; - } - } - finally { - if (H5.hasValue(en)) { - en.System$IDisposable$Dispose(); - } - } - - length.v = 0; - return System.Array.init(0, function (){ - return H5.getDefaultValue(T); - }, T); - } - } - } - }); - - // @source HashSet.js - - H5.define("System.Collections.Generic.HashSet$1", function (T) { return { - inherits: [System.Collections.Generic.ICollection$1(T),System.Collections.Generic.ISet$1(T),System.Collections.Generic.IReadOnlyCollection$1(T)], - statics: { - fields: { - Lower31BitMask: 0, - ShrinkThreshold: 0 - }, - ctors: { - init: function () { - this.Lower31BitMask = 2147483647; - this.ShrinkThreshold = 3; - } - }, - methods: { - HashSetEquals: function (set1, set2, comparer) { - var $t, $t1, $t2; - if (set1 == null) { - return (set2 == null); - } else if (set2 == null) { - return false; - } - if (System.Collections.Generic.HashSet$1(T).AreEqualityComparersEqual(set1, set2)) { - if (set1.Count !== set2.Count) { - return false; - } - $t = H5.getEnumerator(set2); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (!set1.contains(item)) { - return false; - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - return true; - } else { - $t1 = H5.getEnumerator(set2); - try { - while ($t1.moveNext()) { - var set2Item = $t1.Current; - var found = false; - $t2 = H5.getEnumerator(set1); - try { - while ($t2.moveNext()) { - var set1Item = $t2.Current; - if (comparer[H5.geti(comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(T) + "$equals2", "System$Collections$Generic$IEqualityComparer$1$equals2")](set2Item, set1Item)) { - found = true; - break; - } - } - } finally { - if (H5.is($t2, System.IDisposable)) { - $t2.System$IDisposable$Dispose(); - } - } - if (!found) { - return false; - } - } - } finally { - if (H5.is($t1, System.IDisposable)) { - $t1.System$IDisposable$Dispose(); - } - } - return true; - } - }, - AreEqualityComparersEqual: function (set1, set2) { - return H5.equals(set1.Comparer, set2.Comparer); - } - } - }, - fields: { - _buckets: null, - _slots: null, - _count: 0, - _lastIndex: 0, - _freeList: 0, - _comparer: null, - _version: 0 - }, - props: { - Count: { - get: function () { - return this._count; - } - }, - IsReadOnly: { - get: function () { - return false; - } - }, - Comparer: { - get: function () { - return this._comparer; - } - } - }, - alias: [ - "System$Collections$Generic$ICollection$1$add", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$add", - "clear", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$clear", - "contains", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$contains", - "copyTo", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$copyTo", - "remove", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$remove", - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(T) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$Count", - "IsReadOnly", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$IsReadOnly", - "System$Collections$Generic$IEnumerable$1$GetEnumerator", "System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(T) + "$GetEnumerator", - "add", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$add", - "unionWith", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$unionWith", - "intersectWith", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$intersectWith", - "exceptWith", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$exceptWith", - "symmetricExceptWith", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$symmetricExceptWith", - "isSubsetOf", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$isSubsetOf", - "isProperSubsetOf", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$isProperSubsetOf", - "isSupersetOf", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$isSupersetOf", - "isProperSupersetOf", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$isProperSupersetOf", - "overlaps", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$overlaps", - "setEquals", "System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$setEquals" - ], - ctors: { - ctor: function () { - System.Collections.Generic.HashSet$1(T).$ctor3.call(this, System.Collections.Generic.EqualityComparer$1(T).def); - }, - $ctor3: function (comparer) { - this.$initialize(); - if (comparer == null) { - comparer = System.Collections.Generic.EqualityComparer$1(T).def; - } - this._comparer = comparer; - this._lastIndex = 0; - this._count = 0; - this._freeList = -1; - this._version = 0; - }, - $ctor1: function (collection) { - System.Collections.Generic.HashSet$1(T).$ctor2.call(this, collection, System.Collections.Generic.EqualityComparer$1(T).def); - }, - $ctor2: function (collection, comparer) { - System.Collections.Generic.HashSet$1(T).$ctor3.call(this, comparer); - if (collection == null) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - var suggestedCapacity = 0; - var coll; - if (((coll = H5.as(collection, System.Collections.Generic.ICollection$1(T)))) != null) { - suggestedCapacity = System.Array.getCount(coll, T); - } - this.Initialize(suggestedCapacity); - this.unionWith(collection); - if ((this._count === 0 && this._slots.length > System.Collections.HashHelpers.GetMinPrime()) || (this._count > 0 && ((H5.Int.div(this._slots.length, this._count)) | 0) > System.Collections.Generic.HashSet$1(T).ShrinkThreshold)) { - this.TrimExcess(); - } - } - }, - methods: { - System$Collections$Generic$ICollection$1$add: function (item) { - this.AddIfNotPresent(item); - }, - add: function (item) { - return this.AddIfNotPresent(item); - }, - clear: function () { - if (this._lastIndex > 0) { - for (var i = 0; i < this._lastIndex; i = (i + 1) | 0) { - this._slots[System.Array.index(i, this._slots)] = new (System.Collections.Generic.HashSet$1.Slot(T))(); - } - - for (var i1 = 0; i1 < this._buckets.length; i1 = (i1 + 1) | 0) { - this._buckets[System.Array.index(i1, this._buckets)] = 0; - } - - this._lastIndex = 0; - this._count = 0; - this._freeList = -1; - } - this._version = (this._version + 1) | 0; - }, - ArrayClear: function (array, index, length) { }, - contains: function (item) { - if (this._buckets != null) { - var hashCode = this.InternalGetHashCode(item); - for (var i = (this._buckets[System.Array.index(hashCode % this._buckets.length, this._buckets)] - 1) | 0; i >= 0; i = this._slots[System.Array.index(i, this._slots)].next) { - if (this._slots[System.Array.index(i, this._slots)].hashCode === hashCode && this._comparer[H5.geti(this._comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(T) + "$equals2", "System$Collections$Generic$IEqualityComparer$1$equals2")](this._slots[System.Array.index(i, this._slots)].value, item)) { - return true; - } - } - } - return false; - }, - copyTo: function (array, arrayIndex) { - this.CopyTo$1(array, arrayIndex, this._count); - }, - CopyTo: function (array) { - this.CopyTo$1(array, 0, this._count); - }, - CopyTo$1: function (array, arrayIndex, count) { - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - if (arrayIndex < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("arrayIndex"); - } - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - if (arrayIndex > array.length || count > ((array.length - arrayIndex) | 0)) { - throw new System.ArgumentException.$ctor1("Destination array is not long enough to copy all the items in the collection. Check array index and length."); - } - var numCopied = 0; - for (var i = 0; i < this._lastIndex && numCopied < count; i = (i + 1) | 0) { - if (this._slots[System.Array.index(i, this._slots)].hashCode >= 0) { - array[System.Array.index(((arrayIndex + numCopied) | 0), array)] = this._slots[System.Array.index(i, this._slots)].value; - numCopied = (numCopied + 1) | 0; - } - } - }, - remove: function (item) { - if (this._buckets != null) { - var hashCode = this.InternalGetHashCode(item); - var bucket = hashCode % this._buckets.length; - var last = -1; - for (var i = (this._buckets[System.Array.index(bucket, this._buckets)] - 1) | 0; i >= 0; last = i, i = this._slots[System.Array.index(i, this._slots)].next) { - if (this._slots[System.Array.index(i, this._slots)].hashCode === hashCode && this._comparer[H5.geti(this._comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(T) + "$equals2", "System$Collections$Generic$IEqualityComparer$1$equals2")](this._slots[System.Array.index(i, this._slots)].value, item)) { - if (last < 0) { - this._buckets[System.Array.index(bucket, this._buckets)] = (this._slots[System.Array.index(i, this._slots)].next + 1) | 0; - } else { - this._slots[System.Array.index(last, this._slots)].next = this._slots[System.Array.index(i, this._slots)].next; - } - this._slots[System.Array.index(i, this._slots)].hashCode = -1; - this._slots[System.Array.index(i, this._slots)].value = H5.getDefaultValue(T); - this._slots[System.Array.index(i, this._slots)].next = this._freeList; - this._count = (this._count - 1) | 0; - this._version = (this._version + 1) | 0; - if (this._count === 0) { - this._lastIndex = 0; - this._freeList = -1; - } else { - this._freeList = i; - } - return true; - } - } - } - return false; - }, - GetEnumerator: function () { - return new (System.Collections.Generic.HashSet$1.Enumerator(T)).$ctor1(this); - }, - System$Collections$Generic$IEnumerable$1$GetEnumerator: function () { - return new (System.Collections.Generic.HashSet$1.Enumerator(T)).$ctor1(this).$clone(); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return new (System.Collections.Generic.HashSet$1.Enumerator(T)).$ctor1(this).$clone(); - }, - unionWith: function (other) { - var $t; - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - $t = H5.getEnumerator(other, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - this.AddIfNotPresent(item); - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - }, - intersectWith: function (other) { - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - if (this._count === 0) { - return; - } - var otherAsCollection; - if (((otherAsCollection = H5.as(other, System.Collections.Generic.ICollection$1(T)))) != null) { - if (System.Array.getCount(otherAsCollection, T) === 0) { - this.clear(); - return; - } - var otherAsSet; - if (((otherAsSet = H5.as(other, System.Collections.Generic.HashSet$1(T)))) != null && System.Collections.Generic.HashSet$1(T).AreEqualityComparersEqual(this, otherAsSet)) { - this.IntersectWithHashSetWithSameEC(otherAsSet); - return; - } - } - this.IntersectWithEnumerable(other); - }, - exceptWith: function (other) { - var $t; - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - if (this._count === 0) { - return; - } - if (H5.referenceEquals(other, this)) { - this.clear(); - return; - } - $t = H5.getEnumerator(other, T); - try { - while ($t.moveNext()) { - var element = $t.Current; - this.remove(element); - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - }, - symmetricExceptWith: function (other) { - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - if (this._count === 0) { - this.unionWith(other); - return; - } - if (H5.referenceEquals(other, this)) { - this.clear(); - return; - } - var otherAsSet; - if (((otherAsSet = H5.as(other, System.Collections.Generic.HashSet$1(T)))) != null && System.Collections.Generic.HashSet$1(T).AreEqualityComparersEqual(this, otherAsSet)) { - this.SymmetricExceptWithUniqueHashSet(otherAsSet); - } else { - this.SymmetricExceptWithEnumerable(other); - } - }, - isSubsetOf: function (other) { - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - if (this._count === 0) { - return true; - } - var otherAsSet; - if (((otherAsSet = H5.as(other, System.Collections.Generic.HashSet$1(T)))) != null && System.Collections.Generic.HashSet$1(T).AreEqualityComparersEqual(this, otherAsSet)) { - if (this._count > otherAsSet.Count) { - return false; - } - return this.IsSubsetOfHashSetWithSameEC(otherAsSet); - } else { - var result = this.CheckUniqueAndUnfoundElements(other, false); - return (result.uniqueCount === this._count && result.unfoundCount >= 0); - } - }, - isProperSubsetOf: function (other) { - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - var otherAsCollection; - if (((otherAsCollection = H5.as(other, System.Collections.Generic.ICollection$1(T)))) != null) { - if (this._count === 0) { - return System.Array.getCount(otherAsCollection, T) > 0; - } - var otherAsSet; - if (((otherAsSet = H5.as(other, System.Collections.Generic.HashSet$1(T)))) != null && System.Collections.Generic.HashSet$1(T).AreEqualityComparersEqual(this, otherAsSet)) { - if (this._count >= otherAsSet.Count) { - return false; - } - return this.IsSubsetOfHashSetWithSameEC(otherAsSet); - } - } - var result = this.CheckUniqueAndUnfoundElements(other, false); - return (result.uniqueCount === this._count && result.unfoundCount > 0); - }, - isSupersetOf: function (other) { - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - var otherAsCollection; - if (((otherAsCollection = H5.as(other, System.Collections.Generic.ICollection$1(T)))) != null) { - if (System.Array.getCount(otherAsCollection, T) === 0) { - return true; - } - var otherAsSet; - if (((otherAsSet = H5.as(other, System.Collections.Generic.HashSet$1(T)))) != null && System.Collections.Generic.HashSet$1(T).AreEqualityComparersEqual(this, otherAsSet)) { - if (otherAsSet.Count > this._count) { - return false; - } - } - } - return this.ContainsAllElements(other); - }, - isProperSupersetOf: function (other) { - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - if (this._count === 0) { - return false; - } - var otherAsCollection; - if (((otherAsCollection = H5.as(other, System.Collections.Generic.ICollection$1(T)))) != null) { - if (System.Array.getCount(otherAsCollection, T) === 0) { - return true; - } - var otherAsSet; - if (((otherAsSet = H5.as(other, System.Collections.Generic.HashSet$1(T)))) != null && System.Collections.Generic.HashSet$1(T).AreEqualityComparersEqual(this, otherAsSet)) { - if (otherAsSet.Count >= this._count) { - return false; - } - return this.ContainsAllElements(otherAsSet); - } - } - var result = this.CheckUniqueAndUnfoundElements(other, true); - return (result.uniqueCount < this._count && result.unfoundCount === 0); - }, - overlaps: function (other) { - var $t; - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - if (this._count === 0) { - return false; - } - $t = H5.getEnumerator(other, T); - try { - while ($t.moveNext()) { - var element = $t.Current; - if (this.contains(element)) { - return true; - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - return false; - }, - setEquals: function (other) { - if (other == null) { - throw new System.ArgumentNullException.$ctor1("other"); - } - var otherAsSet; - if (((otherAsSet = H5.as(other, System.Collections.Generic.HashSet$1(T)))) != null && System.Collections.Generic.HashSet$1(T).AreEqualityComparersEqual(this, otherAsSet)) { - if (this._count !== otherAsSet.Count) { - return false; - } - return this.ContainsAllElements(otherAsSet); - } else { - var otherAsCollection; - if (((otherAsCollection = H5.as(other, System.Collections.Generic.ICollection$1(T)))) != null) { - if (this._count === 0 && System.Array.getCount(otherAsCollection, T) > 0) { - return false; - } - } - var result = this.CheckUniqueAndUnfoundElements(other, true); - return (result.uniqueCount === this._count && result.unfoundCount === 0); - } - }, - RemoveWhere: function (match) { - if (H5.staticEquals(match, null)) { - throw new System.ArgumentNullException.$ctor1("match"); - } - var numRemoved = 0; - for (var i = 0; i < this._lastIndex; i = (i + 1) | 0) { - if (this._slots[System.Array.index(i, this._slots)].hashCode >= 0) { - var value = this._slots[System.Array.index(i, this._slots)].value; - if (match(value)) { - if (this.remove(value)) { - numRemoved = (numRemoved + 1) | 0; - } - } - } - } - return numRemoved; - }, - TrimExcess: function () { - if (this._count === 0) { - this._buckets = null; - this._slots = null; - this._version = (this._version + 1) | 0; - } else { - var newSize = System.Collections.HashHelpers.GetPrime(this._count); - var newSlots = System.Array.init(newSize, function (){ - return H5.getDefaultValue(System.Collections.Generic.HashSet$1.Slot(T)); - }, System.Collections.Generic.HashSet$1.Slot(T)); - var newBuckets = System.Array.init(newSize, 0, System.Int32); - var newIndex = 0; - for (var i = 0; i < this._lastIndex; i = (i + 1) | 0) { - if (this._slots[System.Array.index(i, this._slots)].hashCode >= 0) { - newSlots[System.Array.index(newIndex, newSlots)] = this._slots[System.Array.index(i, this._slots)].$clone(); - var bucket = newSlots[System.Array.index(newIndex, newSlots)].hashCode % newSize; - newSlots[System.Array.index(newIndex, newSlots)].next = (newBuckets[System.Array.index(bucket, newBuckets)] - 1) | 0; - newBuckets[System.Array.index(bucket, newBuckets)] = (newIndex + 1) | 0; - newIndex = (newIndex + 1) | 0; - } - } - this._lastIndex = newIndex; - this._slots = newSlots; - this._buckets = newBuckets; - this._freeList = -1; - } - }, - Initialize: function (capacity) { - var size = System.Collections.HashHelpers.GetPrime(capacity); - this._buckets = System.Array.init(size, 0, System.Int32); - this._slots = System.Array.init(size, function (){ - return H5.getDefaultValue(System.Collections.Generic.HashSet$1.Slot(T)); - }, System.Collections.Generic.HashSet$1.Slot(T)); - }, - IncreaseCapacity: function () { - var newSize = System.Collections.HashHelpers.ExpandPrime(this._count); - if (newSize <= this._count) { - throw new System.ArgumentException.$ctor1("HashSet capacity is too big."); - } - this.SetCapacity(newSize, false); - }, - SetCapacity: function (newSize, forceNewHashCodes) { - var newSlots = System.Array.init(newSize, function (){ - return H5.getDefaultValue(System.Collections.Generic.HashSet$1.Slot(T)); - }, System.Collections.Generic.HashSet$1.Slot(T)); - if (this._slots != null) { - for (var i = 0; i < this._lastIndex; i = (i + 1) | 0) { - newSlots[System.Array.index(i, newSlots)] = this._slots[System.Array.index(i, this._slots)].$clone(); - } - } - if (forceNewHashCodes) { - for (var i1 = 0; i1 < this._lastIndex; i1 = (i1 + 1) | 0) { - if (newSlots[System.Array.index(i1, newSlots)].hashCode !== -1) { - newSlots[System.Array.index(i1, newSlots)].hashCode = this.InternalGetHashCode(newSlots[System.Array.index(i1, newSlots)].value); - } - } - } - var newBuckets = System.Array.init(newSize, 0, System.Int32); - for (var i2 = 0; i2 < this._lastIndex; i2 = (i2 + 1) | 0) { - var bucket = newSlots[System.Array.index(i2, newSlots)].hashCode % newSize; - newSlots[System.Array.index(i2, newSlots)].next = (newBuckets[System.Array.index(bucket, newBuckets)] - 1) | 0; - newBuckets[System.Array.index(bucket, newBuckets)] = (i2 + 1) | 0; - } - this._slots = newSlots; - this._buckets = newBuckets; - }, - AddIfNotPresent: function (value) { - if (this._buckets == null) { - this.Initialize(0); - } - var hashCode = this.InternalGetHashCode(value); - var bucket = hashCode % this._buckets.length; - for (var i = (this._buckets[System.Array.index(bucket, this._buckets)] - 1) | 0; i >= 0; i = this._slots[System.Array.index(i, this._slots)].next) { - if (this._slots[System.Array.index(i, this._slots)].hashCode === hashCode && this._comparer[H5.geti(this._comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(T) + "$equals2", "System$Collections$Generic$IEqualityComparer$1$equals2")](this._slots[System.Array.index(i, this._slots)].value, value)) { - return false; - } - } - var index; - if (this._freeList >= 0) { - index = this._freeList; - this._freeList = this._slots[System.Array.index(index, this._slots)].next; - } else { - if (this._lastIndex === this._slots.length) { - this.IncreaseCapacity(); - bucket = hashCode % this._buckets.length; - } - index = this._lastIndex; - this._lastIndex = (this._lastIndex + 1) | 0; - } - this._slots[System.Array.index(index, this._slots)].hashCode = hashCode; - this._slots[System.Array.index(index, this._slots)].value = value; - this._slots[System.Array.index(index, this._slots)].next = (this._buckets[System.Array.index(bucket, this._buckets)] - 1) | 0; - this._buckets[System.Array.index(bucket, this._buckets)] = (index + 1) | 0; - this._count = (this._count + 1) | 0; - this._version = (this._version + 1) | 0; - return true; - }, - ContainsAllElements: function (other) { - var $t; - $t = H5.getEnumerator(other, T); - try { - while ($t.moveNext()) { - var element = $t.Current; - if (!this.contains(element)) { - return false; - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - return true; - }, - IsSubsetOfHashSetWithSameEC: function (other) { - var $t; - $t = H5.getEnumerator(this); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (!other.contains(item)) { - return false; - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - return true; - }, - IntersectWithHashSetWithSameEC: function (other) { - for (var i = 0; i < this._lastIndex; i = (i + 1) | 0) { - if (this._slots[System.Array.index(i, this._slots)].hashCode >= 0) { - var item = this._slots[System.Array.index(i, this._slots)].value; - if (!other.contains(item)) { - this.remove(item); - } - } - } - }, - IntersectWithEnumerable: function (other) { - var $t; - var originalLastIndex = this._lastIndex; - var intArrayLength = System.Collections.Generic.BitHelper.ToIntArrayLength(originalLastIndex); - var bitHelper; - var bitArray = System.Array.init(intArrayLength, 0, System.Int32); - bitHelper = new System.Collections.Generic.BitHelper(bitArray, intArrayLength); - $t = H5.getEnumerator(other, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - var index = this.InternalIndexOf(item); - if (index >= 0) { - bitHelper.MarkBit(index); - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - for (var i = 0; i < originalLastIndex; i = (i + 1) | 0) { - if (this._slots[System.Array.index(i, this._slots)].hashCode >= 0 && !bitHelper.IsMarked(i)) { - this.remove(this._slots[System.Array.index(i, this._slots)].value); - } - } - }, - InternalIndexOf: function (item) { - var hashCode = this.InternalGetHashCode(item); - for (var i = (this._buckets[System.Array.index(hashCode % this._buckets.length, this._buckets)] - 1) | 0; i >= 0; i = this._slots[System.Array.index(i, this._slots)].next) { - if ((this._slots[System.Array.index(i, this._slots)].hashCode) === hashCode && this._comparer[H5.geti(this._comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(T) + "$equals2", "System$Collections$Generic$IEqualityComparer$1$equals2")](this._slots[System.Array.index(i, this._slots)].value, item)) { - return i; - } - } - return -1; - }, - SymmetricExceptWithUniqueHashSet: function (other) { - var $t; - $t = H5.getEnumerator(other); - try { - while ($t.moveNext()) { - var item = $t.Current; - if (!this.remove(item)) { - this.AddIfNotPresent(item); - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - }, - SymmetricExceptWithEnumerable: function (other) { - var $t; - var originalLastIndex = this._lastIndex; - var intArrayLength = System.Collections.Generic.BitHelper.ToIntArrayLength(originalLastIndex); - var itemsToRemove; - var itemsAddedFromOther; - var itemsToRemoveArray = System.Array.init(intArrayLength, 0, System.Int32); - itemsToRemove = new System.Collections.Generic.BitHelper(itemsToRemoveArray, intArrayLength); - var itemsAddedFromOtherArray = System.Array.init(intArrayLength, 0, System.Int32); - itemsAddedFromOther = new System.Collections.Generic.BitHelper(itemsAddedFromOtherArray, intArrayLength); - $t = H5.getEnumerator(other, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - var location = { v : 0 }; - var added = this.AddOrGetLocation(item, location); - if (added) { - itemsAddedFromOther.MarkBit(location.v); - } else { - if (location.v < originalLastIndex && !itemsAddedFromOther.IsMarked(location.v)) { - itemsToRemove.MarkBit(location.v); - } - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - for (var i = 0; i < originalLastIndex; i = (i + 1) | 0) { - if (itemsToRemove.IsMarked(i)) { - this.remove(this._slots[System.Array.index(i, this._slots)].value); - } - } - }, - AddOrGetLocation: function (value, location) { - var hashCode = this.InternalGetHashCode(value); - var bucket = hashCode % this._buckets.length; - for (var i = (this._buckets[System.Array.index(bucket, this._buckets)] - 1) | 0; i >= 0; i = this._slots[System.Array.index(i, this._slots)].next) { - if (this._slots[System.Array.index(i, this._slots)].hashCode === hashCode && this._comparer[H5.geti(this._comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(T) + "$equals2", "System$Collections$Generic$IEqualityComparer$1$equals2")](this._slots[System.Array.index(i, this._slots)].value, value)) { - location.v = i; - return false; - } - } - var index; - if (this._freeList >= 0) { - index = this._freeList; - this._freeList = this._slots[System.Array.index(index, this._slots)].next; - } else { - if (this._lastIndex === this._slots.length) { - this.IncreaseCapacity(); - bucket = hashCode % this._buckets.length; - } - index = this._lastIndex; - this._lastIndex = (this._lastIndex + 1) | 0; - } - this._slots[System.Array.index(index, this._slots)].hashCode = hashCode; - this._slots[System.Array.index(index, this._slots)].value = value; - this._slots[System.Array.index(index, this._slots)].next = (this._buckets[System.Array.index(bucket, this._buckets)] - 1) | 0; - this._buckets[System.Array.index(bucket, this._buckets)] = (index + 1) | 0; - this._count = (this._count + 1) | 0; - this._version = (this._version + 1) | 0; - location.v = index; - return true; - }, - CheckUniqueAndUnfoundElements: function (other, returnIfUnfound) { - var $t, $t1; - var result = new (System.Collections.Generic.HashSet$1.ElementCount(T))(); - if (this._count === 0) { - var numElementsInOther = 0; - $t = H5.getEnumerator(other, T); - try { - while ($t.moveNext()) { - var item = $t.Current; - numElementsInOther = (numElementsInOther + 1) | 0; - break; - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - result.uniqueCount = 0; - result.unfoundCount = numElementsInOther; - return result.$clone(); - } - var originalLastIndex = this._lastIndex; - var intArrayLength = System.Collections.Generic.BitHelper.ToIntArrayLength(originalLastIndex); - var bitHelper; - var bitArray = System.Array.init(intArrayLength, 0, System.Int32); - bitHelper = new System.Collections.Generic.BitHelper(bitArray, intArrayLength); - var unfoundCount = 0; - var uniqueFoundCount = 0; - $t1 = H5.getEnumerator(other, T); - try { - while ($t1.moveNext()) { - var item1 = $t1.Current; - var index = this.InternalIndexOf(item1); - if (index >= 0) { - if (!bitHelper.IsMarked(index)) { - bitHelper.MarkBit(index); - uniqueFoundCount = (uniqueFoundCount + 1) | 0; - } - } else { - unfoundCount = (unfoundCount + 1) | 0; - if (returnIfUnfound) { - break; - } - } - } - } finally { - if (H5.is($t1, System.IDisposable)) { - $t1.System$IDisposable$Dispose(); - } - } - result.uniqueCount = uniqueFoundCount; - result.unfoundCount = unfoundCount; - return result.$clone(); - }, - ToArray: function () { - var newArray = System.Array.init(this.Count, function (){ - return H5.getDefaultValue(T); - }, T); - this.CopyTo(newArray); - return newArray; - }, - InternalGetHashCode: function (item) { - if (item == null) { - return 0; - } - return this._comparer[H5.geti(this._comparer, "System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(T) + "$getHashCode2", "System$Collections$Generic$IEqualityComparer$1$getHashCode2")](item) & System.Collections.Generic.HashSet$1(T).Lower31BitMask; - } - } - }; }); - - // @source ElementCount.js - - H5.define("System.Collections.Generic.HashSet$1.ElementCount", function (T) { return { - $kind: "nested struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.uniqueCount = 0; - $.unfoundCount = 0; - return $;} - } - }, - fields: { - uniqueCount: 0, - unfoundCount: 0 - }, - ctors: { - ctor: function () { - this.$initialize(); - } - }, - methods: { - getHashCode: function () { - var h = H5.addHash([4920463385, this.uniqueCount, this.unfoundCount]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.HashSet$1.ElementCount(T))) { - return false; - } - return H5.equals(this.uniqueCount, o.uniqueCount) && H5.equals(this.unfoundCount, o.unfoundCount); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.HashSet$1.ElementCount(T))(); - s.uniqueCount = this.uniqueCount; - s.unfoundCount = this.unfoundCount; - return s; - } - } - }; }); - - // @source Enumerator.js - - H5.define("System.Collections.Generic.HashSet$1.Enumerator", function (T) { return { - inherits: [System.Collections.Generic.IEnumerator$1(T)], - $kind: "nested struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $._set = null; - $._index = 0; - $._version = 0; - $._current = null; - return $;} - } - }, - fields: { - _set: null, - _index: 0, - _version: 0, - _current: H5.getDefaultValue(T) - }, - props: { - Current: { - get: function () { - return this._current; - } - }, - System$Collections$IEnumerator$Current: { - get: function () { - if (this._index === 0 || this._index === ((this._set._lastIndex + 1) | 0)) { - throw new System.InvalidOperationException.$ctor1("Enumeration has either not started or has already finished."); - } - return this.Current; - } - } - }, - alias: [ - "Dispose", "System$IDisposable$Dispose", - "moveNext", "System$Collections$IEnumerator$moveNext", - "Current", ["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"] - ], - ctors: { - $ctor1: function (set) { - this.$initialize(); - this._set = set; - this._index = 0; - this._version = set._version; - this._current = H5.getDefaultValue(T); - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - Dispose: function () { }, - moveNext: function () { - var $t, $t1; - if (this._version !== this._set._version) { - throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute."); - } - while (this._index < this._set._lastIndex) { - if (($t = this._set._slots)[System.Array.index(this._index, $t)].hashCode >= 0) { - this._current = ($t1 = this._set._slots)[System.Array.index(this._index, $t1)].value; - this._index = (this._index + 1) | 0; - return true; - } - this._index = (this._index + 1) | 0; - } - this._index = (this._set._lastIndex + 1) | 0; - this._current = H5.getDefaultValue(T); - return false; - }, - System$Collections$IEnumerator$reset: function () { - if (this._version !== this._set._version) { - throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute."); - } - this._index = 0; - this._current = H5.getDefaultValue(T); - }, - getHashCode: function () { - var h = H5.addHash([3788985113, this._set, this._index, this._version, this._current]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.HashSet$1.Enumerator(T))) { - return false; - } - return H5.equals(this._set, o._set) && H5.equals(this._index, o._index) && H5.equals(this._version, o._version) && H5.equals(this._current, o._current); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.HashSet$1.Enumerator(T))(); - s._set = this._set; - s._index = this._index; - s._version = this._version; - s._current = this._current; - return s; - } - } - }; }); - - // @source Slot.js - - H5.define("System.Collections.Generic.HashSet$1.Slot", function (T) { return { - $kind: "nested struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.hashCode = 0; - $.value = null; - $.next = 0; - return $;} - } - }, - fields: { - hashCode: 0, - value: H5.getDefaultValue(T), - next: 0 - }, - ctors: { - ctor: function () { - this.$initialize(); - } - }, - methods: { - getHashCode: function () { - var h = H5.addHash([1953459283, this.hashCode, this.value, this.next]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.HashSet$1.Slot(T))) { - return false; - } - return H5.equals(this.hashCode, o.hashCode) && H5.equals(this.value, o.value) && H5.equals(this.next, o.next); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.HashSet$1.Slot(T))(); - s.hashCode = this.hashCode; - s.value = this.value; - s.next = this.next; - return s; - } - } - }; }); - - // @source Enumerator.js - - H5.define("System.Collections.Generic.List$1.Enumerator", function (T) { return { - inherits: [System.Collections.Generic.IEnumerator$1(T),System.Collections.IEnumerator], - $kind: "nested struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.list = null; - $.index = 0; - $.version = 0; - $.current = null; - return $;} - } - }, - fields: { - list: null, - index: 0, - version: 0, - current: H5.getDefaultValue(T) - }, - props: { - Current: { - get: function () { - return this.current; - } - }, - System$Collections$IEnumerator$Current: { - get: function () { - if (this.index === 0 || this.index === ((this.list._size + 1) | 0)) { - throw new System.InvalidOperationException.ctor(); - } - return this.Current; - } - } - }, - alias: [ - "Dispose", "System$IDisposable$Dispose", - "moveNext", "System$Collections$IEnumerator$moveNext", - "Current", ["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"] - ], - ctors: { - $ctor1: function (list) { - this.$initialize(); - this.list = list; - this.index = 0; - this.version = list._version; - this.current = H5.getDefaultValue(T); - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - Dispose: function () { }, - moveNext: function () { - - var localList = this.list; - - if (this.version === localList._version && ((this.index >>> 0) < (localList._size >>> 0))) { - this.current = localList._items[System.Array.index(this.index, localList._items)]; - this.index = (this.index + 1) | 0; - return true; - } - return this.MoveNextRare(); - }, - MoveNextRare: function () { - if (this.version !== this.list._version) { - throw new System.InvalidOperationException.ctor(); - } - - this.index = (this.list._size + 1) | 0; - this.current = H5.getDefaultValue(T); - return false; - }, - System$Collections$IEnumerator$reset: function () { - if (this.version !== this.list._version) { - throw new System.InvalidOperationException.ctor(); - } - - this.index = 0; - this.current = H5.getDefaultValue(T); - }, - getHashCode: function () { - var h = H5.addHash([3788985113, this.list, this.index, this.version, this.current]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.List$1.Enumerator(T))) { - return false; - } - return H5.equals(this.list, o.list) && H5.equals(this.index, o.index) && H5.equals(this.version, o.version) && H5.equals(this.current, o.current); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.List$1.Enumerator(T))(); - s.list = this.list; - s.index = this.index; - s.version = this.version; - s.current = this.current; - return s; - } - } - }; }); - - // @source Queue.js - - H5.define("System.Collections.Generic.Queue$1", function (T) { return { - inherits: [System.Collections.Generic.IEnumerable$1(T),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(T)], - statics: { - fields: { - MinimumGrow: 0, - GrowFactor: 0, - DefaultCapacity: 0 - }, - ctors: { - init: function () { - this.MinimumGrow = 4; - this.GrowFactor = 200; - this.DefaultCapacity = 4; - } - } - }, - fields: { - _array: null, - _head: 0, - _tail: 0, - _size: 0, - _version: 0 - }, - props: { - Count: { - get: function () { - return this._size; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return this; - } - }, - IsReadOnly: { - get: function () { - return false; - } - } - }, - alias: [ - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(T) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "copyTo", "System$Collections$ICollection$copyTo", - "System$Collections$Generic$IEnumerable$1$GetEnumerator", "System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(T) + "$GetEnumerator" - ], - ctors: { - ctor: function () { - this.$initialize(); - this._array = System.Array.init(0, function (){ - return H5.getDefaultValue(T); - }, T); - }, - $ctor2: function (capacity) { - this.$initialize(); - if (capacity < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("capacity", "Non-negative number required."); - } - this._array = System.Array.init(capacity, function (){ - return H5.getDefaultValue(T); - }, T); - }, - $ctor1: function (collection) { - this.$initialize(); - if (collection == null) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - - this._array = System.Array.init(System.Collections.Generic.Queue$1(T).DefaultCapacity, function (){ - return H5.getDefaultValue(T); - }, T); - - var en = H5.getEnumerator(collection, T); - try { - while (en.System$Collections$IEnumerator$moveNext()) { - this.Enqueue(en[H5.geti(en, "System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1")]); - } - } - finally { - if (H5.hasValue(en)) { - en.System$IDisposable$Dispose(); - } - } - } - }, - methods: { - copyTo: function (array, index) { - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (System.Array.getRank(array) !== 1) { - throw new System.ArgumentException.$ctor1("Only single dimensional arrays are supported for the requested action."); - } - - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - var arrayLen = array.length; - if (((arrayLen - index) | 0) < this._size) { - throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection."); - } - - var numToCopy = this._size; - if (numToCopy === 0) { - return; - } - - var firstPart = (((this._array.length - this._head) | 0) < numToCopy) ? ((this._array.length - this._head) | 0) : numToCopy; - System.Array.copy(this._array, this._head, array, index, firstPart); - - numToCopy = (numToCopy - firstPart) | 0; - if (numToCopy > 0) { - System.Array.copy(this._array, 0, array, ((((index + this._array.length) | 0) - this._head) | 0), numToCopy); - } - }, - CopyTo: function (array, arrayIndex) { - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (arrayIndex < 0 || arrayIndex > array.length) { - throw new System.ArgumentOutOfRangeException.$ctor4("arrayIndex", "Index was out of range. Must be non-negative and less than the size of the collection."); - } - - var arrayLen = array.length; - if (((arrayLen - arrayIndex) | 0) < this._size) { - throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection."); - } - - var numToCopy = (((arrayLen - arrayIndex) | 0) < this._size) ? (((arrayLen - arrayIndex) | 0)) : this._size; - if (numToCopy === 0) { - return; - } - - var firstPart = (((this._array.length - this._head) | 0) < numToCopy) ? ((this._array.length - this._head) | 0) : numToCopy; - System.Array.copy(this._array, this._head, array, arrayIndex, firstPart); - numToCopy = (numToCopy - firstPart) | 0; - if (numToCopy > 0) { - System.Array.copy(this._array, 0, array, ((((arrayIndex + this._array.length) | 0) - this._head) | 0), numToCopy); - } - }, - Clear: function () { - if (this._head < this._tail) { - System.Array.fill(this._array, function () { - return H5.getDefaultValue(T); - }, this._head, this._size); - } else { - System.Array.fill(this._array, function () { - return H5.getDefaultValue(T); - }, this._head, ((this._array.length - this._head) | 0)); - System.Array.fill(this._array, function () { - return H5.getDefaultValue(T); - }, 0, this._tail); - } - - this._head = 0; - this._tail = 0; - this._size = 0; - this._version = (this._version + 1) | 0; - }, - Enqueue: function (item) { - if (this._size === this._array.length) { - var newcapacity = (H5.Int.div(H5.Int.mul(this._array.length, System.Collections.Generic.Queue$1(T).GrowFactor), 100)) | 0; - if (newcapacity < ((this._array.length + System.Collections.Generic.Queue$1(T).MinimumGrow) | 0)) { - newcapacity = (this._array.length + System.Collections.Generic.Queue$1(T).MinimumGrow) | 0; - } - this.SetCapacity(newcapacity); - } - - this._array[System.Array.index(this._tail, this._array)] = item; - this._tail = this.MoveNext(this._tail); - this._size = (this._size + 1) | 0; - this._version = (this._version + 1) | 0; - }, - GetEnumerator: function () { - return new (System.Collections.Generic.Queue$1.Enumerator(T)).$ctor1(this); - }, - System$Collections$Generic$IEnumerable$1$GetEnumerator: function () { - return new (System.Collections.Generic.Queue$1.Enumerator(T)).$ctor1(this).$clone(); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return new (System.Collections.Generic.Queue$1.Enumerator(T)).$ctor1(this).$clone(); - }, - Dequeue: function () { - if (this._size === 0) { - throw new System.InvalidOperationException.$ctor1("Queue empty."); - } - - var removed = this._array[System.Array.index(this._head, this._array)]; - this._array[System.Array.index(this._head, this._array)] = H5.getDefaultValue(T); - this._head = this.MoveNext(this._head); - this._size = (this._size - 1) | 0; - this._version = (this._version + 1) | 0; - return removed; - }, - Peek: function () { - if (this._size === 0) { - throw new System.InvalidOperationException.$ctor1("Queue empty."); - } - - return this._array[System.Array.index(this._head, this._array)]; - }, - Contains: function (item) { - var index = this._head; - var count = this._size; - - var c = System.Collections.Generic.EqualityComparer$1(T).def; - while (H5.identity(count, ((count = (count - 1) | 0))) > 0) { - if (item == null) { - if (this._array[System.Array.index(index, this._array)] == null) { - return true; - } - } else if (this._array[System.Array.index(index, this._array)] != null && c.equals2(this._array[System.Array.index(index, this._array)], item)) { - return true; - } - index = this.MoveNext(index); - } - - return false; - }, - GetElement: function (i) { - return this._array[System.Array.index((((this._head + i) | 0)) % this._array.length, this._array)]; - }, - ToArray: function () { - var arr = System.Array.init(this._size, function (){ - return H5.getDefaultValue(T); - }, T); - if (this._size === 0) { - return arr; - } - - if (this._head < this._tail) { - System.Array.copy(this._array, this._head, arr, 0, this._size); - } else { - System.Array.copy(this._array, this._head, arr, 0, ((this._array.length - this._head) | 0)); - System.Array.copy(this._array, 0, arr, ((this._array.length - this._head) | 0), this._tail); - } - - return arr; - }, - SetCapacity: function (capacity) { - var newarray = System.Array.init(capacity, function (){ - return H5.getDefaultValue(T); - }, T); - if (this._size > 0) { - if (this._head < this._tail) { - System.Array.copy(this._array, this._head, newarray, 0, this._size); - } else { - System.Array.copy(this._array, this._head, newarray, 0, ((this._array.length - this._head) | 0)); - System.Array.copy(this._array, 0, newarray, ((this._array.length - this._head) | 0), this._tail); - } - } - - this._array = newarray; - this._head = 0; - this._tail = (this._size === capacity) ? 0 : this._size; - this._version = (this._version + 1) | 0; - }, - MoveNext: function (index) { - var tmp = (index + 1) | 0; - return (tmp === this._array.length) ? 0 : tmp; - }, - TrimExcess: function () { - var threshold = H5.Int.clip32(this._array.length * 0.9); - if (this._size < threshold) { - this.SetCapacity(this._size); - } - } - } - }; }); - - // @source ICollectionDebugView.js - - H5.define("System.Collections.Generic.ICollectionDebugView$1", function (T) { return { - fields: { - _collection: null - }, - props: { - Items: { - get: function () { - var items = System.Array.init(System.Array.getCount(this._collection, T), function (){ - return H5.getDefaultValue(T); - }, T); - System.Array.copyTo(this._collection, items, 0, T); - return items; - } - } - }, - ctors: { - ctor: function (collection) { - this.$initialize(); - if (collection == null) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - - this._collection = collection; - } - } - }; }); - - // @source IDictionaryDebugView.js - - H5.define("System.Collections.Generic.IDictionaryDebugView$2", function (K, V) { return { - fields: { - _dict: null - }, - props: { - Items: { - get: function () { - var items = System.Array.init(System.Array.getCount(this._dict, System.Collections.Generic.KeyValuePair$2(K,V)), function (){ - return H5.getDefaultValue(System.Collections.Generic.KeyValuePair$2(K,V)); - }, System.Collections.Generic.KeyValuePair$2(K,V)); - System.Array.copyTo(this._dict, items, 0, System.Collections.Generic.KeyValuePair$2(K,V)); - return items; - } - } - }, - ctors: { - ctor: function (dictionary) { - this.$initialize(); - if (dictionary == null) { - throw new System.ArgumentNullException.$ctor1("dictionary"); - } - - this._dict = dictionary; - } - } - }; }); - - // @source Enumerator.js - - H5.define("System.Collections.Generic.Queue$1.Enumerator", function (T) { return { - inherits: [System.Collections.Generic.IEnumerator$1(T),System.Collections.IEnumerator], - $kind: "nested struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $._q = null; - $._index = 0; - $._version = 0; - $._currentElement = null; - return $;} - } - }, - fields: { - _q: null, - _index: 0, - _version: 0, - _currentElement: H5.getDefaultValue(T) - }, - props: { - Current: { - get: function () { - if (this._index < 0) { - if (this._index === -1) { - throw new System.InvalidOperationException.$ctor1("Enumeration has not started. Call MoveNext."); - } else { - throw new System.InvalidOperationException.$ctor1("Enumeration already finished."); - } - } - return this._currentElement; - } - }, - System$Collections$IEnumerator$Current: { - get: function () { - return this.Current; - } - } - }, - alias: [ - "Dispose", "System$IDisposable$Dispose", - "moveNext", "System$Collections$IEnumerator$moveNext", - "Current", ["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"] - ], - ctors: { - $ctor1: function (q) { - this.$initialize(); - this._q = q; - this._version = this._q._version; - this._index = -1; - this._currentElement = H5.getDefaultValue(T); - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - Dispose: function () { - this._index = -2; - this._currentElement = H5.getDefaultValue(T); - }, - moveNext: function () { - if (this._version !== this._q._version) { - throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute."); - } - - if (this._index === -2) { - return false; - } - - this._index = (this._index + 1) | 0; - - if (this._index === this._q._size) { - this._index = -2; - this._currentElement = H5.getDefaultValue(T); - return false; - } - - this._currentElement = this._q.GetElement(this._index); - return true; - }, - System$Collections$IEnumerator$reset: function () { - if (this._version !== this._q._version) { - throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute."); - } - this._index = -1; - this._currentElement = H5.getDefaultValue(T); - }, - getHashCode: function () { - var h = H5.addHash([3788985113, this._q, this._index, this._version, this._currentElement]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.Queue$1.Enumerator(T))) { - return false; - } - return H5.equals(this._q, o._q) && H5.equals(this._index, o._index) && H5.equals(this._version, o._version) && H5.equals(this._currentElement, o._currentElement); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.Queue$1.Enumerator(T))(); - s._q = this._q; - s._index = this._index; - s._version = this._version; - s._currentElement = this._currentElement; - return s; - } - } - }; }); - - // @source Stack.js - - H5.define("System.Collections.Generic.Stack$1", function (T) { return { - inherits: [System.Collections.Generic.IEnumerable$1(T),System.Collections.ICollection,System.Collections.Generic.IReadOnlyCollection$1(T)], - statics: { - fields: { - DefaultCapacity: 0 - }, - ctors: { - init: function () { - this.DefaultCapacity = 4; - } - } - }, - fields: { - _array: null, - _size: 0, - _version: 0 - }, - props: { - Count: { - get: function () { - return this._size; - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return this; - } - }, - IsReadOnly: { - get: function () { - return false; - } - } - }, - alias: [ - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(T) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "copyTo", "System$Collections$ICollection$copyTo", - "System$Collections$Generic$IEnumerable$1$GetEnumerator", "System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(T) + "$GetEnumerator" - ], - ctors: { - ctor: function () { - this.$initialize(); - this._array = System.Array.init(0, function (){ - return H5.getDefaultValue(T); - }, T); - }, - $ctor2: function (capacity) { - this.$initialize(); - if (capacity < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("capacity", "Non-negative number required."); - } - this._array = System.Array.init(capacity, function (){ - return H5.getDefaultValue(T); - }, T); - }, - $ctor1: function (collection) { - this.$initialize(); - if (collection == null) { - throw new System.ArgumentNullException.$ctor1("collection"); - } - var length = { }; - this._array = H5.Collections.EnumerableHelpers.ToArray$1(T, collection, length); - this._size = length.v; - } - }, - methods: { - Clear: function () { - System.Array.fill(this._array, function () { - return H5.getDefaultValue(T); - }, 0, this._size); - this._size = 0; - this._version = (this._version + 1) | 0; - }, - Contains: function (item) { - var count = this._size; - - var c = System.Collections.Generic.EqualityComparer$1(T).def; - while (H5.identity(count, ((count = (count - 1) | 0))) > 0) { - if (item == null) { - if (this._array[System.Array.index(count, this._array)] == null) { - return true; - } - } else if (this._array[System.Array.index(count, this._array)] != null && c.equals2(this._array[System.Array.index(count, this._array)], item)) { - return true; - } - } - return false; - }, - CopyTo: function (array, arrayIndex) { - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (arrayIndex < 0 || arrayIndex > array.length) { - throw new System.ArgumentOutOfRangeException.$ctor4("arrayIndex", "Non-negative number required."); - } - - if (((array.length - arrayIndex) | 0) < this._size) { - throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection."); - } - - if (!H5.referenceEquals(array, this._array)) { - var srcIndex = 0; - var dstIndex = (arrayIndex + this._size) | 0; - for (var i = 0; i < this._size; i = (i + 1) | 0) { - array[System.Array.index(((dstIndex = (dstIndex - 1) | 0)), array)] = this._array[System.Array.index(H5.identity(srcIndex, ((srcIndex = (srcIndex + 1) | 0))), this._array)]; - } - } else { - System.Array.copy(this._array, 0, array, arrayIndex, this._size); - System.Array.reverse(array, arrayIndex, this._size); - } - }, - copyTo: function (array, arrayIndex) { - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (System.Array.getRank(array) !== 1) { - throw new System.ArgumentException.$ctor1("Only single dimensional arrays are supported for the requested action."); - } - - if (System.Array.getLower(array, 0) !== 0) { - throw new System.ArgumentException.$ctor1("The lower bound of target array must be zero."); - } - - if (arrayIndex < 0 || arrayIndex > array.length) { - throw new System.ArgumentOutOfRangeException.$ctor4("arrayIndex", "Non-negative number required."); - } - - if (((array.length - arrayIndex) | 0) < this._size) { - throw new System.ArgumentException.$ctor1("Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection."); - } - - try { - System.Array.copy(this._array, 0, array, arrayIndex, this._size); - System.Array.reverse(array, arrayIndex, this._size); - } catch ($e1) { - $e1 = System.Exception.create($e1); - throw new System.ArgumentException.$ctor1("Target array type is not compatible with the type of items in the collection."); - } - }, - GetEnumerator: function () { - return new (System.Collections.Generic.Stack$1.Enumerator(T)).$ctor1(this); - }, - System$Collections$Generic$IEnumerable$1$GetEnumerator: function () { - return new (System.Collections.Generic.Stack$1.Enumerator(T)).$ctor1(this).$clone(); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return new (System.Collections.Generic.Stack$1.Enumerator(T)).$ctor1(this).$clone(); - }, - TrimExcess: function () { - var threshold = H5.Int.clip32(this._array.length * 0.9); - if (this._size < threshold) { - var localArray = { v : this._array }; - System.Array.resize(localArray, this._size, function () { - return H5.getDefaultValue(T); - }, T); - this._array = localArray.v; - this._version = (this._version + 1) | 0; - } - }, - Peek: function () { - if (this._size === 0) { - throw new System.InvalidOperationException.$ctor1("Stack empty."); - } - return this._array[System.Array.index(((this._size - 1) | 0), this._array)]; - }, - Pop: function () { - if (this._size === 0) { - throw new System.InvalidOperationException.$ctor1("Stack empty."); - } - this._version = (this._version + 1) | 0; - var item = this._array[System.Array.index(((this._size = (this._size - 1) | 0)), this._array)]; - this._array[System.Array.index(this._size, this._array)] = H5.getDefaultValue(T); - return item; - }, - Push: function (item) { - if (this._size === this._array.length) { - var localArray = { v : this._array }; - System.Array.resize(localArray, (this._array.length === 0) ? System.Collections.Generic.Stack$1(T).DefaultCapacity : H5.Int.mul(2, this._array.length), function () { - return H5.getDefaultValue(T); - }, T); - this._array = localArray.v; - } - this._array[System.Array.index(H5.identity(this._size, ((this._size = (this._size + 1) | 0))), this._array)] = item; - this._version = (this._version + 1) | 0; - }, - ToArray: function () { - var objArray = System.Array.init(this._size, function (){ - return H5.getDefaultValue(T); - }, T); - var i = 0; - while (i < this._size) { - objArray[System.Array.index(i, objArray)] = this._array[System.Array.index(((((this._size - i) | 0) - 1) | 0), this._array)]; - i = (i + 1) | 0; - } - return objArray; - } - } - }; }); - - // @source Enumerator.js - - H5.define("System.Collections.Generic.Stack$1.Enumerator", function (T) { return { - inherits: [System.Collections.Generic.IEnumerator$1(T),System.Collections.IEnumerator], - $kind: "nested struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $._stack = null; - $._index = 0; - $._version = 0; - $._currentElement = null; - return $;} - } - }, - fields: { - _stack: null, - _index: 0, - _version: 0, - _currentElement: H5.getDefaultValue(T) - }, - props: { - Current: { - get: function () { - if (this._index === -2) { - throw new System.InvalidOperationException.$ctor1("Enumeration has not started. Call MoveNext."); - } - if (this._index === -1) { - throw new System.InvalidOperationException.$ctor1("Enumeration already finished."); - } - return this._currentElement; - } - }, - System$Collections$IEnumerator$Current: { - get: function () { - if (this._index === -2) { - throw new System.InvalidOperationException.$ctor1("Enumeration has not started. Call MoveNext."); - } - if (this._index === -1) { - throw new System.InvalidOperationException.$ctor1("Enumeration already finished."); - } - return this._currentElement; - } - } - }, - alias: [ - "Dispose", "System$IDisposable$Dispose", - "moveNext", "System$Collections$IEnumerator$moveNext", - "Current", ["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(T) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"] - ], - ctors: { - $ctor1: function (stack) { - this.$initialize(); - this._stack = stack; - this._version = this._stack._version; - this._index = -2; - this._currentElement = H5.getDefaultValue(T); - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - Dispose: function () { - this._index = -1; - }, - moveNext: function () { - var $t, $t1; - var retval; - if (this._version !== this._stack._version) { - throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute."); - } - if (this._index === -2) { - this._index = (this._stack._size - 1) | 0; - retval = (this._index >= 0); - if (retval) { - this._currentElement = ($t = this._stack._array)[System.Array.index(this._index, $t)]; - } - return retval; - } - if (this._index === -1) { - return false; - } - - retval = (((this._index = (this._index - 1) | 0)) >= 0); - if (retval) { - this._currentElement = ($t1 = this._stack._array)[System.Array.index(this._index, $t1)]; - } else { - this._currentElement = H5.getDefaultValue(T); - } - return retval; - }, - System$Collections$IEnumerator$reset: function () { - if (this._version !== this._stack._version) { - throw new System.InvalidOperationException.$ctor1("Collection was modified; enumeration operation may not execute."); - } - this._index = -2; - this._currentElement = H5.getDefaultValue(T); - }, - getHashCode: function () { - var h = H5.addHash([3788985113, this._stack, this._index, this._version, this._currentElement]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Collections.Generic.Stack$1.Enumerator(T))) { - return false; - } - return H5.equals(this._stack, o._stack) && H5.equals(this._index, o._index) && H5.equals(this._version, o._version) && H5.equals(this._currentElement, o._currentElement); - }, - $clone: function (to) { - var s = to || new (System.Collections.Generic.Stack$1.Enumerator(T))(); - s._stack = this._stack; - s._index = this._index; - s._version = this._version; - s._currentElement = this._currentElement; - return s; - } - } - }; }); - - // @source HashHelpers.js - - H5.define("System.Collections.HashHelpers", { - statics: { - fields: { - HashPrime: 0, - MaxPrimeArrayLength: 0, - RandomSeed: 0, - primes: null - }, - ctors: { - init: function () { - this.HashPrime = 101; - this.MaxPrimeArrayLength = 2146435069; - this.RandomSeed = System.Guid.NewGuid().getHashCode(); - this.primes = System.Array.init([ - 3, - 7, - 11, - 17, - 23, - 29, - 37, - 47, - 59, - 71, - 89, - 107, - 131, - 163, - 197, - 239, - 293, - 353, - 431, - 521, - 631, - 761, - 919, - 1103, - 1327, - 1597, - 1931, - 2333, - 2801, - 3371, - 4049, - 4861, - 5839, - 7013, - 8419, - 10103, - 12143, - 14591, - 17519, - 21023, - 25229, - 30293, - 36353, - 43627, - 52361, - 62851, - 75431, - 90523, - 108631, - 130363, - 156437, - 187751, - 225307, - 270371, - 324449, - 389357, - 467237, - 560689, - 672827, - 807403, - 968897, - 1162687, - 1395263, - 1674319, - 2009191, - 2411033, - 2893249, - 3471899, - 4166287, - 4999559, - 5999471, - 7199369 - ], System.Int32); - } - }, - methods: { - Combine: function (h1, h2) { - var rol5 = (((((h1 >>> 0) << 5) >>> 0)) | ((h1 >>> 0) >>> 27)) >>> 0; - return ((((rol5 | 0) + h1) | 0)) ^ h2; - }, - IsPrime: function (candidate) { - if ((candidate & 1) !== 0) { - var limit = H5.Int.clip32(Math.sqrt(candidate)); - for (var divisor = 3; divisor <= limit; divisor = (divisor + 2) | 0) { - if ((candidate % divisor) === 0) { - return false; - } - } - return true; - } - return (candidate === 2); - }, - GetPrime: function (min) { - if (min < 0) { - throw new System.ArgumentException.$ctor1("Hashtable's capacity overflowed and went negative. Check load factor, capacity and the current size of the table."); - } - for (var i = 0; i < System.Collections.HashHelpers.primes.length; i = (i + 1) | 0) { - var prime = System.Collections.HashHelpers.primes[System.Array.index(i, System.Collections.HashHelpers.primes)]; - if (prime >= min) { - return prime; - } - } - for (var i1 = (min | 1); i1 < 2147483647; i1 = (i1 + 2) | 0) { - if (System.Collections.HashHelpers.IsPrime(i1) && ((((i1 - 1) | 0)) % System.Collections.HashHelpers.HashPrime !== 0)) { - return i1; - } - } - return min; - }, - GetMinPrime: function () { - return System.Collections.HashHelpers.primes[System.Array.index(0, System.Collections.HashHelpers.primes)]; - }, - ExpandPrime: function (oldSize) { - var newSize = H5.Int.mul(2, oldSize); - if ((newSize >>> 0) > System.Collections.HashHelpers.MaxPrimeArrayLength && System.Collections.HashHelpers.MaxPrimeArrayLength > oldSize) { - return System.Collections.HashHelpers.MaxPrimeArrayLength; - } - return System.Collections.HashHelpers.GetPrime(newSize); - } - } - } - }); - - // @source Collection.js - - H5.define("System.Collections.ObjectModel.Collection$1", function (T) { return { - inherits: [System.Collections.Generic.IList$1(T),System.Collections.IList,System.Collections.Generic.IReadOnlyList$1(T)], - statics: { - methods: { - IsCompatibleObject: function (value) { - return ((H5.is(value, T)) || (value == null && H5.getDefaultValue(T) == null)); - } - } - }, - fields: { - items: null, - _syncRoot: null - }, - props: { - Count: { - get: function () { - return System.Array.getCount(this.items, T); - } - }, - Items: { - get: function () { - return this.items; - } - }, - System$Collections$Generic$ICollection$1$IsReadOnly: { - get: function () { - return System.Array.getIsReadOnly(this.items, T); - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - if (this._syncRoot == null) { - var c; - if (((c = H5.as(this.items, System.Collections.ICollection))) != null) { - this._syncRoot = c.System$Collections$ICollection$SyncRoot; - } else { - throw System.NotImplemented.ByDesign; - } - } - return this._syncRoot; - } - }, - System$Collections$IList$IsReadOnly: { - get: function () { - return System.Array.getIsReadOnly(this.items, T); - } - }, - System$Collections$IList$IsFixedSize: { - get: function () { - var list; - if (((list = H5.as(this.items, System.Collections.IList))) != null) { - return System.Array.isFixedSize(list); - } - return System.Array.getIsReadOnly(this.items, T); - } - } - }, - alias: [ - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(T) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$Count", - "getItem", ["System$Collections$Generic$IReadOnlyList$1$" + H5.getTypeAlias(T) + "$getItem", "System$Collections$Generic$IReadOnlyList$1$getItem"], - "setItem", ["System$Collections$Generic$IReadOnlyList$1$" + H5.getTypeAlias(T) + "$setItem", "System$Collections$Generic$IReadOnlyList$1$setItem"], - "getItem", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$getItem", - "setItem", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$setItem", - "add", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$add", - "clear", "System$Collections$IList$clear", - "clear", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$clear", - "copyTo", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$copyTo", - "contains", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$contains", - "GetEnumerator", ["System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(T) + "$GetEnumerator", "System$Collections$Generic$IEnumerable$1$GetEnumerator"], - "indexOf", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$indexOf", - "insert", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$insert", - "remove", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$remove", - "removeAt", "System$Collections$IList$removeAt", - "removeAt", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$removeAt", - "System$Collections$Generic$ICollection$1$IsReadOnly", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$IsReadOnly" - ], - ctors: { - ctor: function () { - this.$initialize(); - this.items = new (System.Collections.Generic.List$1(T)).ctor(); - }, - $ctor1: function (list) { - this.$initialize(); - if (list == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.list); - } - this.items = list; - } - }, - methods: { - getItem: function (index) { - return System.Array.getItem(this.items, index, T); - }, - setItem: function (index, value) { - if (System.Array.getIsReadOnly(this.items, T)) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection); - } - - if (index < 0 || index >= System.Array.getCount(this.items, T)) { - System.ThrowHelper.ThrowArgumentOutOfRange_IndexException(); - } - - this.SetItem(index, value); - }, - System$Collections$IList$getItem: function (index) { - return System.Array.getItem(this.items, index, T); - }, - System$Collections$IList$setItem: function (index, value) { - System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(T, value, System.ExceptionArgument.value); - - try { - this.setItem(index, H5.cast(H5.unbox(value, T), T)); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.InvalidCastException)) { - System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object, value, T); - } else { - throw $e1; - } - } - }, - add: function (item) { - if (System.Array.getIsReadOnly(this.items, T)) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection); - } - - var index = System.Array.getCount(this.items, T); - this.InsertItem(index, item); - }, - System$Collections$IList$add: function (value) { - if (System.Array.getIsReadOnly(this.items, T)) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection); - } - System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(T, value, System.ExceptionArgument.value); - - try { - this.add(H5.cast(H5.unbox(value, T), T)); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.InvalidCastException)) { - System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object, value, T); - } else { - throw $e1; - } - } - - return ((this.Count - 1) | 0); - }, - clear: function () { - if (System.Array.getIsReadOnly(this.items, T)) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection); - } - - this.ClearItems(); - }, - copyTo: function (array, index) { - System.Array.copyTo(this.items, array, index, T); - }, - System$Collections$ICollection$copyTo: function (array, index) { - if (array == null) { - System.ThrowHelper.ThrowArgumentNullException(System.ExceptionArgument.array); - } - - if (System.Array.getRank(array) !== 1) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_RankMultiDimNotSupported); - } - - if (System.Array.getLower(array, 0) !== 0) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_NonZeroLowerBound); - } - - if (index < 0) { - System.ThrowHelper.ThrowIndexArgumentOutOfRange_NeedNonNegNumException(); - } - - if (((array.length - index) | 0) < this.Count) { - System.ThrowHelper.ThrowArgumentException(System.ExceptionResource.Arg_ArrayPlusOffTooSmall); - } - var tArray; - if (((tArray = H5.as(array, System.Array.type(T)))) != null) { - System.Array.copyTo(this.items, tArray, index, T); - } else { - var targetType = (H5.getType(array).$elementType || null); - var sourceType = T; - if (!(H5.Reflection.isAssignableFrom(targetType, sourceType) || H5.Reflection.isAssignableFrom(sourceType, targetType))) { - System.ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType(); - } - - var objects = H5.as(array, System.Array.type(System.Object)); - if (objects == null) { - System.ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType(); - } - - var count = System.Array.getCount(this.items, T); - try { - for (var i = 0; i < count; i = (i + 1) | 0) { - objects[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), objects)] = System.Array.getItem(this.items, i, T); - } - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.ArrayTypeMismatchException)) { - System.ThrowHelper.ThrowArgumentException_Argument_InvalidArrayType(); - } else { - throw $e1; - } - } - } - }, - contains: function (item) { - return System.Array.contains(this.items, item, T); - }, - System$Collections$IList$contains: function (value) { - if (System.Collections.ObjectModel.Collection$1(T).IsCompatibleObject(value)) { - return this.contains(H5.cast(H5.unbox(value, T), T)); - } - return false; - }, - GetEnumerator: function () { - return H5.getEnumerator(this.items, T); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return H5.getEnumerator(H5.cast(this.items, System.Collections.IEnumerable)); - }, - indexOf: function (item) { - return System.Array.indexOf(this.items, item, 0, null, T); - }, - System$Collections$IList$indexOf: function (value) { - if (System.Collections.ObjectModel.Collection$1(T).IsCompatibleObject(value)) { - return this.indexOf(H5.cast(H5.unbox(value, T), T)); - } - return -1; - }, - insert: function (index, item) { - if (System.Array.getIsReadOnly(this.items, T)) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection); - } - - if (index < 0 || index > System.Array.getCount(this.items, T)) { - System.ThrowHelper.ThrowArgumentOutOfRangeException$2(System.ExceptionArgument.index, System.ExceptionResource.ArgumentOutOfRange_ListInsert); - } - - this.InsertItem(index, item); - }, - System$Collections$IList$insert: function (index, value) { - if (System.Array.getIsReadOnly(this.items, T)) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection); - } - System.ThrowHelper.IfNullAndNullsAreIllegalThenThrow(T, value, System.ExceptionArgument.value); - - try { - this.insert(index, H5.cast(H5.unbox(value, T), T)); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.InvalidCastException)) { - System.ThrowHelper.ThrowWrongValueTypeArgumentException(System.Object, value, T); - } else { - throw $e1; - } - } - }, - remove: function (item) { - if (System.Array.getIsReadOnly(this.items, T)) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection); - } - - var index = System.Array.indexOf(this.items, item, 0, null, T); - if (index < 0) { - return false; - } - this.RemoveItem(index); - return true; - }, - System$Collections$IList$remove: function (value) { - if (System.Array.getIsReadOnly(this.items, T)) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection); - } - - if (System.Collections.ObjectModel.Collection$1(T).IsCompatibleObject(value)) { - this.remove(H5.cast(H5.unbox(value, T), T)); - } - }, - removeAt: function (index) { - if (System.Array.getIsReadOnly(this.items, T)) { - System.ThrowHelper.ThrowNotSupportedException$1(System.ExceptionResource.NotSupported_ReadOnlyCollection); - } - - if (index < 0 || index >= System.Array.getCount(this.items, T)) { - System.ThrowHelper.ThrowArgumentOutOfRange_IndexException(); - } - - this.RemoveItem(index); - }, - ClearItems: function () { - System.Array.clear(this.items, T); - }, - InsertItem: function (index, item) { - System.Array.insert(this.items, index, item, T); - }, - RemoveItem: function (index) { - System.Array.removeAt(this.items, index, T); - }, - SetItem: function (index, item) { - System.Array.setItem(this.items, index, item, T); - } - } - }; }); - - // @source ReadOnlyCollection.js - - H5.define("System.Collections.ObjectModel.ReadOnlyCollection$1", function (T) { return { - inherits: [System.Collections.Generic.IList$1(T),System.Collections.IList,System.Collections.Generic.IReadOnlyList$1(T)], - statics: { - methods: { - IsCompatibleObject: function (value) { - return ((H5.is(value, T)) || (value == null && H5.getDefaultValue(T) == null)); - } - } - }, - fields: { - list: null - }, - props: { - Count: { - get: function () { - return System.Array.getCount(this.list, T); - } - }, - System$Collections$ICollection$IsSynchronized: { - get: function () { - return false; - } - }, - System$Collections$ICollection$SyncRoot: { - get: function () { - return this; - } - }, - Items: { - get: function () { - return this.list; - } - }, - System$Collections$IList$IsFixedSize: { - get: function () { - return true; - } - }, - System$Collections$Generic$ICollection$1$IsReadOnly: { - get: function () { - return true; - } - }, - System$Collections$IList$IsReadOnly: { - get: function () { - return true; - } - } - }, - alias: [ - "Count", ["System$Collections$Generic$IReadOnlyCollection$1$" + H5.getTypeAlias(T) + "$Count", "System$Collections$Generic$IReadOnlyCollection$1$Count"], - "Count", "System$Collections$ICollection$Count", - "Count", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$Count", - "getItem", ["System$Collections$Generic$IReadOnlyList$1$" + H5.getTypeAlias(T) + "$getItem", "System$Collections$Generic$IReadOnlyList$1$getItem"], - "contains", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$contains", - "copyTo", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$copyTo", - "GetEnumerator", ["System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(T) + "$GetEnumerator", "System$Collections$Generic$IEnumerable$1$GetEnumerator"], - "indexOf", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$indexOf", - "System$Collections$Generic$ICollection$1$IsReadOnly", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$IsReadOnly", - "System$Collections$Generic$IList$1$getItem", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$getItem", - "System$Collections$Generic$IList$1$setItem", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$setItem", - "System$Collections$Generic$ICollection$1$add", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$add", - "System$Collections$Generic$ICollection$1$clear", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$clear", - "System$Collections$Generic$IList$1$insert", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$insert", - "System$Collections$Generic$ICollection$1$remove", "System$Collections$Generic$ICollection$1$" + H5.getTypeAlias(T) + "$remove", - "System$Collections$Generic$IList$1$removeAt", "System$Collections$Generic$IList$1$" + H5.getTypeAlias(T) + "$removeAt" - ], - ctors: { - ctor: function (list) { - this.$initialize(); - if (list == null) { - throw new System.ArgumentNullException.$ctor1("list"); - } - this.list = list; - } - }, - methods: { - getItem: function (index) { - return System.Array.getItem(this.list, index, T); - }, - System$Collections$Generic$IList$1$getItem: function (index) { - return System.Array.getItem(this.list, index, T); - }, - System$Collections$Generic$IList$1$setItem: function (index, value) { - throw new System.NotSupportedException.ctor(); - }, - System$Collections$IList$getItem: function (index) { - return System.Array.getItem(this.list, index, T); - }, - System$Collections$IList$setItem: function (index, value) { - throw new System.NotSupportedException.ctor(); - }, - contains: function (value) { - return System.Array.contains(this.list, value, T); - }, - System$Collections$IList$contains: function (value) { - if (System.Collections.ObjectModel.ReadOnlyCollection$1(T).IsCompatibleObject(value)) { - return this.contains(H5.cast(H5.unbox(value, T), T)); - } - return false; - }, - copyTo: function (array, index) { - System.Array.copyTo(this.list, array, index, T); - }, - System$Collections$ICollection$copyTo: function (array, index) { - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - - if (System.Array.getRank(array) !== 1) { - throw new System.ArgumentException.$ctor1("array"); - } - - if (System.Array.getLower(array, 0) !== 0) { - throw new System.ArgumentException.$ctor1("array"); - } - - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - - if (((array.length - index) | 0) < this.Count) { - throw new System.ArgumentException.ctor(); - } - var items; - if (((items = H5.as(array, System.Array.type(T)))) != null) { - System.Array.copyTo(this.list, items, index, T); - } else { - var targetType = (H5.getType(array).$elementType || null); - var sourceType = T; - if (!(H5.Reflection.isAssignableFrom(targetType, sourceType) || H5.Reflection.isAssignableFrom(sourceType, targetType))) { - throw new System.ArgumentException.ctor(); - } - var objects; - if (!(((objects = H5.as(array, System.Array.type(System.Object)))) != null)) { - throw new System.ArgumentException.ctor(); - } - - var count = System.Array.getCount(this.list, T); - for (var i = 0; i < count; i = (i + 1) | 0) { - objects[System.Array.index(H5.identity(index, ((index = (index + 1) | 0))), objects)] = System.Array.getItem(this.list, i, T); - } - } - }, - GetEnumerator: function () { - return H5.getEnumerator(this.list, T); - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return H5.getEnumerator(H5.cast(this.list, System.Collections.IEnumerable)); - }, - indexOf: function (value) { - return System.Array.indexOf(this.list, value, 0, null, T); - }, - System$Collections$IList$indexOf: function (value) { - if (System.Collections.ObjectModel.ReadOnlyCollection$1(T).IsCompatibleObject(value)) { - return this.indexOf(H5.cast(H5.unbox(value, T), T)); - } - return -1; - }, - System$Collections$Generic$ICollection$1$add: function (value) { - throw new System.NotSupportedException.ctor(); - }, - System$Collections$IList$add: function (value) { - throw new System.NotSupportedException.ctor(); - }, - System$Collections$Generic$ICollection$1$clear: function () { - throw new System.NotSupportedException.ctor(); - }, - System$Collections$IList$clear: function () { - throw new System.NotSupportedException.ctor(); - }, - System$Collections$Generic$IList$1$insert: function (index, value) { - throw new System.NotSupportedException.ctor(); - }, - System$Collections$IList$insert: function (index, value) { - throw new System.NotSupportedException.ctor(); - }, - System$Collections$Generic$ICollection$1$remove: function (value) { - throw new System.NotSupportedException.ctor(); - }, - System$Collections$IList$remove: function (value) { - throw new System.NotSupportedException.ctor(); - }, - System$Collections$Generic$IList$1$removeAt: function (index) { - throw new System.NotSupportedException.ctor(); - }, - System$Collections$IList$removeAt: function (index) { - throw new System.NotSupportedException.ctor(); - } - } - }; }); - - // @source BrowsableAttribute.js - - H5.define("System.ComponentModel.BrowsableAttribute", { - inherits: [System.Attribute], - statics: { - fields: { - yes: null, - no: null, - default: null - }, - ctors: { - init: function () { - this.yes = new System.ComponentModel.BrowsableAttribute(true); - this.no = new System.ComponentModel.BrowsableAttribute(false); - this.default = System.ComponentModel.BrowsableAttribute.yes; - } - } - }, - fields: { - browsable: false - }, - props: { - Browsable: { - get: function () { - return this.browsable; - } - } - }, - ctors: { - init: function () { - this.browsable = true; - }, - ctor: function (browsable) { - this.$initialize(); - System.Attribute.ctor.call(this); - this.browsable = browsable; - } - }, - methods: { - equals: function (obj) { - if (H5.referenceEquals(obj, this)) { - return true; - } - var other; - - return (((other = H5.as(obj, System.ComponentModel.BrowsableAttribute))) != null) && other.Browsable === this.browsable; - }, - getHashCode: function () { - return H5.getHashCode(this.browsable); - } - } - }); - - // @source DefaultValueAttribute.js - - H5.define("System.ComponentModel.DefaultValueAttribute", { - inherits: [System.Attribute], - fields: { - _value: null - }, - props: { - Value: { - get: function () { - return this._value; - } - } - }, - ctors: { - $ctor11: function (type, value) { - this.$initialize(); - System.Attribute.ctor.call(this); - try { - if ((type.prototype instanceof System.Enum)) { - this._value = System.Enum.parse(type, value, true); - } else if (type === System.TimeSpan) { - throw System.NotImplemented.ByDesign; - } else { - throw System.NotImplemented.ByDesign; - } - } catch ($e1) { - $e1 = System.Exception.create($e1); - } - }, - $ctor2: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = H5.box(value, System.Char, String.fromCharCode, System.Char.getHashCode); - }, - $ctor1: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = H5.box(value, System.Byte); - }, - $ctor4: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = H5.box(value, System.Int16); - }, - $ctor5: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = H5.box(value, System.Int32); - }, - $ctor6: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = value; - }, - $ctor9: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = H5.box(value, System.Single, System.Single.format, System.Single.getHashCode); - }, - $ctor3: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = H5.box(value, System.Double, System.Double.format, System.Double.getHashCode); - }, - ctor: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = H5.box(value, System.Boolean, System.Boolean.toString); - }, - $ctor10: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = value; - }, - $ctor7: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = value; - }, - $ctor8: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = H5.box(value, System.SByte); - }, - $ctor12: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = H5.box(value, System.UInt16); - }, - $ctor13: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = H5.box(value, System.UInt32); - }, - $ctor14: function (value) { - this.$initialize(); - System.Attribute.ctor.call(this); - this._value = value; - } - }, - methods: { - equals: function (obj) { - if (H5.referenceEquals(obj, this)) { - return true; - } - var other; - - if (((other = H5.as(obj, System.ComponentModel.DefaultValueAttribute))) != null) { - if (this.Value != null) { - return H5.equals(this.Value, other.Value); - } else { - return (other.Value == null); - } - } - return false; - }, - getHashCode: function () { - return H5.getHashCode(this); - }, - setValue: function (value) { - this._value = value; - } - } - }); - - // @source Console.js - - H5.define("System.Console", { - statics: { - methods: { - write: function (value) { - System.Console.Write(System.DateTime.format(value)); - }, - write$1: function (value) { - System.Console.Write(value.toString()); - }, - Write: function (value) { - var con = H5.global.console; - - if (con && con.log) { - if (!H5.isDefined(H5.unbox(value))) { - con.log(""); - return; - } - - var d = H5.unbox(value); - - if (H5.isDefined(d.constructor) && H5.isDefined(d.constructor.$$name) && H5.isDefined(d.toString)) { - con.log(H5.toString(value)); - } else { - con.log(d); - } - } - }, - writeLine: function (value) { - System.Console.WriteLine(System.DateTime.format(value)); - }, - writeLine$1: function (value) { - System.Console.WriteLine(value.toString()); - }, - WriteLine: function (value) { - var con = H5.global.console; - - if (con && con.log) { - if (!H5.isDefined(H5.unbox(value))) { - con.log(""); - return; - } - - var d = H5.unbox(value); - - if (H5.isDefined(d.constructor) && H5.isDefined(d.constructor.$$name) && H5.isDefined(d.toString)) { - con.log(H5.toString(value)); - } else { - con.log(d); - } - } - }, - Log: function (value) { - var con = H5.global.console; - - if (con && con.log) { - con.log(H5.unbox(value)); - } - }, - TransformChars: function (buffer, all, index, count) { - if (all !== 1) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor1("buffer"); - } - - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("index", "less than zero"); - } - - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "less than zero"); - } - - if (((index + count) | 0) > buffer.length) { - throw new System.ArgumentException.$ctor1("index plus count specify a position that is not within buffer."); - } - } - - var s = ""; - if (buffer != null) { - if (all === 1) { - index = 0; - count = buffer.length; - } - - for (var i = index; i < ((index + count) | 0); i = (i + 1) | 0) { - s = (s || "") + String.fromCharCode(buffer[System.Array.index(i, buffer)]); - } - } - - return s; - }, - Clear: function () { - var con = H5.global.console; - - if (con && con.clear) { - con.clear(); - } - } - } - } - }); - - // @source ConsoleColor.js - - H5.define("System.ConsoleColor", { - $kind: "enum", - statics: { - fields: { - Black: 0, - DarkBlue: 1, - DarkGreen: 2, - DarkCyan: 3, - DarkRed: 4, - DarkMagenta: 5, - DarkYellow: 6, - Gray: 7, - DarkGray: 8, - Blue: 9, - Green: 10, - Cyan: 11, - Red: 12, - Magenta: 13, - Yellow: 14, - White: 15 - } - } - }); - - // @source TokenType.js - - H5.define("System.TokenType", { - $kind: "enum", - statics: { - fields: { - NumberToken: 1, - YearNumberToken: 2, - Am: 3, - Pm: 4, - MonthToken: 5, - EndOfString: 6, - DayOfWeekToken: 7, - TimeZoneToken: 8, - EraToken: 9, - DateWordToken: 10, - UnknownToken: 11, - HebrewNumber: 12, - JapaneseEraToken: 13, - TEraToken: 14, - IgnorableSymbol: 15, - SEP_Unk: 256, - SEP_End: 512, - SEP_Space: 768, - SEP_Am: 1024, - SEP_Pm: 1280, - SEP_Date: 1536, - SEP_Time: 1792, - SEP_YearSuff: 2048, - SEP_MonthSuff: 2304, - SEP_DaySuff: 2560, - SEP_HourSuff: 2816, - SEP_MinuteSuff: 3072, - SEP_SecondSuff: 3328, - SEP_LocalTimeMark: 3584, - SEP_DateOrOffset: 3840, - RegularTokenMask: 255, - SeparatorTokenMask: 65280 - } - } - }); - - // @source UnitySerializationHolder.js - - H5.define("System.UnitySerializationHolder", { - inherits: [System.Runtime.Serialization.ISerializable,System.Runtime.Serialization.IObjectReference], - statics: { - fields: { - NullUnity: 0 - }, - ctors: { - init: function () { - this.NullUnity = 2; - } - } - }, - alias: ["GetRealObject", "System$Runtime$Serialization$IObjectReference$GetRealObject"], - methods: { - GetRealObject: function (context) { - throw System.NotImplemented.ByDesign; - - } - } - }); - - // @source DateTimeKind.js - - H5.define("System.DateTimeKind", { - $kind: "enum", - statics: { - fields: { - Unspecified: 0, - Utc: 1, - Local: 2 - } - } - }); - - // @source DateTimeOffset.js - - H5.define("System.DateTimeOffset", { - inherits: function () { return [System.IComparable,System.IFormattable,System.Runtime.Serialization.ISerializable,System.Runtime.Serialization.IDeserializationCallback,System.IComparable$1(System.DateTimeOffset),System.IEquatable$1(System.DateTimeOffset)]; }, - $kind: "struct", - statics: { - fields: { - MaxOffset: System.Int64(0), - MinOffset: System.Int64(0), - UnixEpochTicks: System.Int64(0), - UnixEpochSeconds: System.Int64(0), - UnixEpochMilliseconds: System.Int64(0), - MinValue: null, - MaxValue: null - }, - props: { - Now: { - get: function () { - return new System.DateTimeOffset.$ctor1(System.DateTime.getNow()); - } - }, - UtcNow: { - get: function () { - return new System.DateTimeOffset.$ctor1(System.DateTime.getUtcNow()); - } - } - }, - ctors: { - init: function () { - this.MinValue = H5.getDefaultValue(System.DateTimeOffset); - this.MaxValue = H5.getDefaultValue(System.DateTimeOffset); - this.MaxOffset = System.Int64([1488826368,117]); - this.MinOffset = System.Int64([-1488826368,-118]); - this.UnixEpochTicks = System.Int64([-139100160,144670709]); - this.UnixEpochSeconds = System.Int64([2006054656,14]); - this.UnixEpochMilliseconds = System.Int64([304928768,14467]); - this.MinValue = new System.DateTimeOffset.$ctor5(System.DateTime.getMinTicks(), System.TimeSpan.zero); - this.MaxValue = new System.DateTimeOffset.$ctor5(System.DateTime.getMaxTicks(), System.TimeSpan.zero); - } - }, - methods: { - Compare: function (first, second) { - return H5.compare(first.UtcDateTime, second.UtcDateTime); - }, - Equals: function (first, second) { - return H5.equalsT(first.UtcDateTime, second.UtcDateTime); - }, - FromFileTime: function (fileTime) { - return new System.DateTimeOffset.$ctor1(System.DateTime.FromFileTime(fileTime)); - }, - FromUnixTimeSeconds: function (seconds) { - var MinSeconds = System.Int64([-2006054656,-15]); - var MaxSeconds = System.Int64([-769665,58]); - - if (seconds.lt(MinSeconds) || seconds.gt(MaxSeconds)) { - throw new System.ArgumentOutOfRangeException.$ctor4("seconds", System.String.format(System.Environment.GetResourceString("ArgumentOutOfRange_Range"), MinSeconds, MaxSeconds)); - } - - var ticks = seconds.mul(System.Int64(10000000)).add(System.DateTimeOffset.UnixEpochTicks); - return new System.DateTimeOffset.$ctor5(ticks, System.TimeSpan.zero); - }, - FromUnixTimeMilliseconds: function (milliseconds) { - var MinMilliseconds = System.Int64([-304928768,-14468]); - var MaxMilliseconds = System.Int64([-769664001,58999]); - - if (milliseconds.lt(MinMilliseconds) || milliseconds.gt(MaxMilliseconds)) { - throw new System.ArgumentOutOfRangeException.$ctor4("milliseconds", System.String.format(System.Environment.GetResourceString("ArgumentOutOfRange_Range"), MinMilliseconds, MaxMilliseconds)); - } - - var ticks = milliseconds.mul(System.Int64(10000)).add(System.DateTimeOffset.UnixEpochTicks); - return new System.DateTimeOffset.$ctor5(ticks, System.TimeSpan.zero); - }, - Parse: function (input) { - var offset = { }; - var dateResult = System.DateTimeParse.Parse$1(input, System.Globalization.DateTimeFormatInfo.currentInfo, 0, offset); - return new System.DateTimeOffset.$ctor5(System.DateTime.getTicks(dateResult), offset.v); - }, - Parse$1: function (input, formatProvider) { - return System.DateTimeOffset.Parse$2(input, formatProvider, 0); - }, - Parse$2: function (input, formatProvider, styles) { - var offset = { }; - var dateResult = System.DateTimeParse.Parse$1(input, System.Globalization.DateTimeFormatInfo.currentInfo, styles, offset); - return new System.DateTimeOffset.$ctor5(System.DateTime.getTicks(dateResult), offset.v); - }, - ParseExact: function (input, format, formatProvider) { - return System.DateTimeOffset.ParseExact$1(input, format, formatProvider, 0); - }, - ParseExact$1: function (input, format, formatProvider, styles) { - throw System.NotImplemented.ByDesign; - }, - TryParse: function (input, result) { - var offset = { }; - var dateResult = { }; - var parsed = System.DateTimeParse.TryParse$1(input, System.Globalization.DateTimeFormatInfo.currentInfo, 0, dateResult, offset); - result.v = new System.DateTimeOffset.$ctor5(System.DateTime.getTicks(dateResult.v), offset.v); - return parsed; - }, - TryParse$1: function (input, formatProvider, styles, result) { - var offset = { }; - var dateResult = { }; - var parsed = System.DateTimeParse.TryParse$1(input, System.Globalization.DateTimeFormatInfo.currentInfo, styles, dateResult, offset); - result.v = new System.DateTimeOffset.$ctor5(System.DateTime.getTicks(dateResult.v), offset.v); - return parsed; - }, - ValidateOffset: function (offset) { - var ticks = offset.getTicks(); - if (ticks.mod(System.Int64(600000000)).ne(System.Int64(0))) { - throw new System.ArgumentException.$ctor3(System.Environment.GetResourceString("Argument_OffsetPrecision"), "offset"); - } - if (ticks.lt(System.DateTimeOffset.MinOffset) || ticks.gt(System.DateTimeOffset.MaxOffset)) { - throw new System.ArgumentOutOfRangeException.$ctor4("offset", System.Environment.GetResourceString("Argument_OffsetOutOfRange")); - } - return System.Int64.clip16(offset.getTicks().div(System.Int64(600000000))); - }, - ValidateDate: function (dateTime, offset) { - var utcTicks = System.DateTime.getTicks(dateTime).sub(offset.getTicks()); - if (utcTicks.lt(System.DateTime.getMinTicks()) || utcTicks.gt(System.DateTime.getMaxTicks())) { - throw new System.ArgumentOutOfRangeException.$ctor4("offset", System.Environment.GetResourceString("Argument_UTCOutOfRange")); - } - return System.DateTime.create$2(utcTicks, 0); - }, - op_Implicit: function (dateTime) { - return new System.DateTimeOffset.$ctor1(dateTime); - }, - op_Addition: function (dateTimeOffset, timeSpan) { - return new System.DateTimeOffset.$ctor2(System.DateTime.adddt(dateTimeOffset.ClockDateTime, timeSpan), dateTimeOffset.Offset); - }, - op_Subtraction: function (dateTimeOffset, timeSpan) { - return new System.DateTimeOffset.$ctor2(System.DateTime.subdt(dateTimeOffset.ClockDateTime, timeSpan), dateTimeOffset.Offset); - }, - op_Subtraction$1: function (left, right) { - return System.DateTime.subdd(left.UtcDateTime, right.UtcDateTime); - }, - op_Equality: function (left, right) { - return H5.equals(left.UtcDateTime, right.UtcDateTime); - }, - op_Inequality: function (left, right) { - return !H5.equals(left.UtcDateTime, right.UtcDateTime); - }, - op_LessThan: function (left, right) { - return System.DateTime.lt(left.UtcDateTime, right.UtcDateTime); - }, - op_LessThanOrEqual: function (left, right) { - return System.DateTime.lte(left.UtcDateTime, right.UtcDateTime); - }, - op_GreaterThan: function (left, right) { - return System.DateTime.gt(left.UtcDateTime, right.UtcDateTime); - }, - op_GreaterThanOrEqual: function (left, right) { - return System.DateTime.gte(left.UtcDateTime, right.UtcDateTime); - }, - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.m_dateTime = System.DateTime.getDefaultValue(); - $.m_offsetMinutes = 0; - return $;} - } - }, - fields: { - m_dateTime: null, - m_offsetMinutes: 0 - }, - props: { - DateTime: { - get: function () { - return this.ClockDateTime; - } - }, - UtcDateTime: { - get: function () { - return System.DateTime.specifyKind(this.m_dateTime, 1); - } - }, - LocalDateTime: { - get: function () { - return System.DateTime.toLocalTime(this.UtcDateTime); - } - }, - ClockDateTime: { - get: function () { - return System.DateTime.create$2(System.DateTime.getTicks((System.DateTime.adddt(this.m_dateTime, this.Offset))), 0); - } - }, - Date: { - get: function () { - return System.DateTime.getDate(this.ClockDateTime); - } - }, - Day: { - get: function () { - return System.DateTime.getDay(this.ClockDateTime); - } - }, - DayOfWeek: { - get: function () { - return System.DateTime.getDayOfWeek(this.ClockDateTime); - } - }, - DayOfYear: { - get: function () { - return System.DateTime.getDayOfYear(this.ClockDateTime); - } - }, - Hour: { - get: function () { - return System.DateTime.getHour(this.ClockDateTime); - } - }, - Millisecond: { - get: function () { - return System.DateTime.getMillisecond(this.ClockDateTime); - } - }, - Minute: { - get: function () { - return System.DateTime.getMinute(this.ClockDateTime); - } - }, - Month: { - get: function () { - return System.DateTime.getMonth(this.ClockDateTime); - } - }, - Offset: { - get: function () { - return new System.TimeSpan(0, this.m_offsetMinutes, 0); - } - }, - Second: { - get: function () { - return System.DateTime.getSecond(this.ClockDateTime); - } - }, - Ticks: { - get: function () { - return System.DateTime.getTicks(this.ClockDateTime); - } - }, - UtcTicks: { - get: function () { - return System.DateTime.getTicks(this.UtcDateTime); - } - }, - TimeOfDay: { - get: function () { - return System.DateTime.getTimeOfDay(this.ClockDateTime); - } - }, - Year: { - get: function () { - return System.DateTime.getYear(this.ClockDateTime); - } - } - }, - alias: [ - "compareTo", ["System$IComparable$1$System$DateTimeOffset$compareTo", "System$IComparable$1$compareTo"], - "equalsT", "System$IEquatable$1$System$DateTimeOffset$equalsT", - "format", "System$IFormattable$format" - ], - ctors: { - init: function () { - this.m_dateTime = System.DateTime.getDefaultValue(); - }, - $ctor5: function (ticks, offset) { - this.$initialize(); - this.m_offsetMinutes = System.DateTimeOffset.ValidateOffset(offset); - var dateTime = System.DateTime.create$2(ticks); - this.m_dateTime = System.DateTimeOffset.ValidateDate(dateTime, offset); - }, - $ctor1: function (dateTime) { - this.$initialize(); - var offset; - - offset = new System.TimeSpan(System.Int64(0)); - this.m_offsetMinutes = System.DateTimeOffset.ValidateOffset(offset); - this.m_dateTime = System.DateTimeOffset.ValidateDate(dateTime, offset); - }, - $ctor2: function (dateTime, offset) { - this.$initialize(); - this.m_offsetMinutes = System.DateTimeOffset.ValidateOffset(offset); - this.m_dateTime = System.DateTimeOffset.ValidateDate(dateTime, offset); - }, - $ctor4: function (year, month, day, hour, minute, second, offset) { - this.$initialize(); - this.m_offsetMinutes = System.DateTimeOffset.ValidateOffset(offset); - this.m_dateTime = System.DateTimeOffset.ValidateDate(System.DateTime.create(year, month, day, hour, minute, second), offset); - }, - $ctor3: function (year, month, day, hour, minute, second, millisecond, offset) { - this.$initialize(); - this.m_offsetMinutes = System.DateTimeOffset.ValidateOffset(offset); - this.m_dateTime = System.DateTimeOffset.ValidateDate(System.DateTime.create(year, month, day, hour, minute, second, millisecond), offset); - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - ToOffset: function (offset) { - return new System.DateTimeOffset.$ctor5(System.DateTime.getTicks((System.DateTime.adddt(this.m_dateTime, offset))), offset); - }, - Add: function (timeSpan) { - return new System.DateTimeOffset.$ctor2(System.DateTime.add(this.ClockDateTime, timeSpan), this.Offset); - }, - AddDays: function (days) { - return new System.DateTimeOffset.$ctor2(System.DateTime.addDays(this.ClockDateTime, days), this.Offset); - }, - AddHours: function (hours) { - return new System.DateTimeOffset.$ctor2(System.DateTime.addHours(this.ClockDateTime, hours), this.Offset); - }, - AddMilliseconds: function (milliseconds) { - return new System.DateTimeOffset.$ctor2(System.DateTime.addMilliseconds(this.ClockDateTime, milliseconds), this.Offset); - }, - AddMinutes: function (minutes) { - return new System.DateTimeOffset.$ctor2(System.DateTime.addMinutes(this.ClockDateTime, minutes), this.Offset); - }, - AddMonths: function (months) { - return new System.DateTimeOffset.$ctor2(System.DateTime.addMonths(this.ClockDateTime, months), this.Offset); - }, - AddSeconds: function (seconds) { - return new System.DateTimeOffset.$ctor2(System.DateTime.addSeconds(this.ClockDateTime, seconds), this.Offset); - }, - AddTicks: function (ticks) { - return new System.DateTimeOffset.$ctor2(System.DateTime.addTicks(this.ClockDateTime, ticks), this.Offset); - }, - AddYears: function (years) { - return new System.DateTimeOffset.$ctor2(System.DateTime.addYears(this.ClockDateTime, years), this.Offset); - }, - System$IComparable$compareTo: function (obj) { - if (obj == null) { - return 1; - } - if (!(H5.is(obj, System.DateTimeOffset))) { - throw new System.ArgumentException.$ctor1(System.Environment.GetResourceString("Arg_MustBeDateTimeOffset")); - } - - var objUtc = System.Nullable.getValue(H5.cast(H5.unbox(obj, System.DateTimeOffset), System.DateTimeOffset)).UtcDateTime; - var utc = this.UtcDateTime; - if (System.DateTime.gt(utc, objUtc)) { - return 1; - } - if (System.DateTime.lt(utc, objUtc)) { - return -1; - } - return 0; - }, - compareTo: function (other) { - var otherUtc = other.UtcDateTime; - var utc = this.UtcDateTime; - if (System.DateTime.gt(utc, otherUtc)) { - return 1; - } - if (System.DateTime.lt(utc, otherUtc)) { - return -1; - } - return 0; - }, - equals: function (obj) { - var offset = new System.DateTimeOffset(); - if (System.Nullable.liftne(System.DateTimeOffset.op_Inequality, ((offset = H5.as(obj, System.DateTimeOffset))), null)) { - return H5.equalsT(this.UtcDateTime, offset.UtcDateTime); - } - return false; - }, - equalsT: function (other) { - return H5.equalsT(this.UtcDateTime, other.UtcDateTime); - }, - EqualsExact: function (other) { - return (H5.equals(this.ClockDateTime, other.ClockDateTime) && System.TimeSpan.eq(this.Offset, other.Offset) && System.DateTime.getKind(this.ClockDateTime) === System.DateTime.getKind(other.ClockDateTime)); - }, - System$Runtime$Serialization$IDeserializationCallback$OnDeserialization: function (sender) { - try { - this.m_offsetMinutes = System.DateTimeOffset.ValidateOffset(this.Offset); - this.m_dateTime = System.DateTimeOffset.ValidateDate(this.ClockDateTime, this.Offset); - } catch ($e1) { - $e1 = System.Exception.create($e1); - var e; - if (H5.is($e1, System.ArgumentException)) { - e = $e1; - throw new System.Runtime.Serialization.SerializationException.$ctor2(System.Environment.GetResourceString("Serialization_InvalidData"), e); - } else { - throw $e1; - } - } - }, - getHashCode: function () { - return H5.getHashCode(this.UtcDateTime); - }, - Subtract$1: function (value) { - return System.DateTime.subdd(this.UtcDateTime, value.UtcDateTime); - }, - Subtract: function (value) { - return new System.DateTimeOffset.$ctor2(System.DateTime.subtract(this.ClockDateTime, value), this.Offset); - }, - ToFileTime: function () { - return System.DateTime.ToFileTime(this.UtcDateTime); - }, - ToUnixTimeSeconds: function () { - var seconds = System.DateTime.getTicks(this.UtcDateTime).div(System.Int64(10000000)); - return seconds.sub(System.DateTimeOffset.UnixEpochSeconds); - }, - ToUnixTimeMilliseconds: function () { - var milliseconds = System.DateTime.getTicks(this.UtcDateTime).div(System.Int64(10000)); - return milliseconds.sub(System.DateTimeOffset.UnixEpochMilliseconds); - }, - ToLocalTime: function () { - return this.ToLocalTime$1(false); - }, - ToLocalTime$1: function (throwOnOverflow) { - return new System.DateTimeOffset.$ctor1(System.DateTime.toLocalTime(this.UtcDateTime, throwOnOverflow)); - }, - toString: function () { - return System.DateTime.format(System.DateTime.specifyKind(this.ClockDateTime, 2)); - - }, - ToString$1: function (format) { - return System.DateTime.format(System.DateTime.specifyKind(this.ClockDateTime, 2), format); - - }, - ToString: function (formatProvider) { - return System.DateTime.format(System.DateTime.specifyKind(this.ClockDateTime, 2), null, formatProvider); - - }, - format: function (format, formatProvider) { - return System.DateTime.format(System.DateTime.specifyKind(this.ClockDateTime, 2), format, formatProvider); - - }, - ToUniversalTime: function () { - return new System.DateTimeOffset.$ctor1(this.UtcDateTime); - }, - $clone: function (to) { - var s = to || new System.DateTimeOffset(); - s.m_dateTime = this.m_dateTime; - s.m_offsetMinutes = this.m_offsetMinutes; - return s; - } - } - }); - - // @source DateTimeParse.js - - H5.define("System.DateTimeParse", { - statics: { - methods: { - TryParseExact: function (s, format, dtfi, style, result) { - return System.DateTime.tryParseExact(s, format, null, result); - - }, - Parse: function (s, dtfi, styles) { - return System.DateTime.parse(s, dtfi); - }, - Parse$1: function (s, dtfi, styles, offset) { - var result = { }; - if (System.DateTimeParse.TryParse$1(s, dtfi, styles, result, offset)) { - return result.v; - } - throw new System.FormatException.$ctor1("String was not recognized as a valid DateTime."); - }, - TryParse: function (s, dtfi, styles, result) { - return System.DateTime.tryParse(s, null, result); - }, - TryParse$1: function (s, dtfi, styles, result, offset) { - result.v = System.DateTime.getMinValue(); - offset.v = System.TimeSpan.zero; - - if (System.String.isNullOrEmpty(s)) { - return false; - } - - if (System.String.endsWith(s, "Z") || System.String.endsWith(s, "z")) { - offset.v = System.TimeSpan.zero; - return System.DateTime.tryParse(s.substr(0, ((s.length - 1) | 0)), null, result); - } - - var lastPlus = s.lastIndexOf(String.fromCharCode(43)); - var lastMinus = s.lastIndexOf(String.fromCharCode(45)); - var signIndex = Math.max(lastPlus, lastMinus); - - if (signIndex > 0 && signIndex < ((s.length - 1) | 0)) { - - var offsetStr = s.substr(signIndex); - if (System.DateTimeParse.TryParseOffset(offsetStr, offset)) { - return System.DateTime.tryParse(s.substr(0, signIndex), null, result); - } - } - - if (System.DateTime.tryParse(s, null, result)) { - offset.v = System.DateTime.subdd(System.DateTime.getNow(), System.DateTime.getUtcNow()); - return true; - } - - return false; - }, - TryParseOffset: function (s, offset) { - offset.v = System.TimeSpan.zero; - if (System.String.isNullOrEmpty(s) || s.length < 3) { - return false; - } - var sign = s.charCodeAt(0); - if (sign !== 43 && sign !== 45) { - return false; - } - - var hours = { v : 0 }; - var minutes = { v : 0 }; - - if (System.String.contains(s,":")) { - if (s.length !== 6) { - return false; - } - if (!System.Int32.tryParse(s.substr(1, 2), hours)) { - return false; - } - if (!System.Int32.tryParse(s.substr(4, 2), minutes)) { - return false; - } - } else { - if (s.length === 3) { - if (!System.Int32.tryParse(s.substr(1, 2), hours)) { - return false; - } - } else if (s.length === 5) { - if (!System.Int32.tryParse(s.substr(1, 2), hours)) { - return false; - } - if (!System.Int32.tryParse(s.substr(3, 2), minutes)) { - return false; - } - } else { - return false; - } - } - - offset.v = new System.TimeSpan(hours.v, minutes.v, 0); - if (sign === 45) { - offset.v = offset.v.negate(); - } - return true; - } - } - } - }); - - // @source DateTimeResult.js - - H5.define("System.DateTimeResult", { - $kind: "struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.Year = 0; - $.Month = 0; - $.Day = 0; - $.Hour = 0; - $.Minute = 0; - $.Second = 0; - $.fraction = 0; - $.era = 0; - $.flags = 0; - $.timeZoneOffset = H5.getDefaultValue(System.TimeSpan); - $.calendar = null; - $.parsedDate = System.DateTime.getDefaultValue(); - $.failure = 0; - $.failureMessageID = null; - $.failureMessageFormatArgument = null; - $.failureArgumentName = null; - return $;} - } - }, - fields: { - Year: 0, - Month: 0, - Day: 0, - Hour: 0, - Minute: 0, - Second: 0, - fraction: 0, - era: 0, - flags: 0, - timeZoneOffset: null, - calendar: null, - parsedDate: null, - failure: 0, - failureMessageID: null, - failureMessageFormatArgument: null, - failureArgumentName: null - }, - ctors: { - init: function () { - this.timeZoneOffset = H5.getDefaultValue(System.TimeSpan); - this.parsedDate = System.DateTime.getDefaultValue(); - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - Init: function () { - this.Year = -1; - this.Month = -1; - this.Day = -1; - this.fraction = -1; - this.era = -1; - }, - SetDate: function (year, month, day) { - this.Year = year; - this.Month = month; - this.Day = day; - }, - SetFailure: function (failure, failureMessageID, failureMessageFormatArgument) { - this.failure = failure; - this.failureMessageID = failureMessageID; - this.failureMessageFormatArgument = failureMessageFormatArgument; - }, - SetFailure$1: function (failure, failureMessageID, failureMessageFormatArgument, failureArgumentName) { - this.failure = failure; - this.failureMessageID = failureMessageID; - this.failureMessageFormatArgument = failureMessageFormatArgument; - this.failureArgumentName = failureArgumentName; - }, - getHashCode: function () { - var h = H5.addHash([5374321750, this.Year, this.Month, this.Day, this.Hour, this.Minute, this.Second, this.fraction, this.era, this.flags, this.timeZoneOffset, this.calendar, this.parsedDate, this.failure, this.failureMessageID, this.failureMessageFormatArgument, this.failureArgumentName]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.DateTimeResult)) { - return false; - } - return H5.equals(this.Year, o.Year) && H5.equals(this.Month, o.Month) && H5.equals(this.Day, o.Day) && H5.equals(this.Hour, o.Hour) && H5.equals(this.Minute, o.Minute) && H5.equals(this.Second, o.Second) && H5.equals(this.fraction, o.fraction) && H5.equals(this.era, o.era) && H5.equals(this.flags, o.flags) && H5.equals(this.timeZoneOffset, o.timeZoneOffset) && H5.equals(this.calendar, o.calendar) && H5.equals(this.parsedDate, o.parsedDate) && H5.equals(this.failure, o.failure) && H5.equals(this.failureMessageID, o.failureMessageID) && H5.equals(this.failureMessageFormatArgument, o.failureMessageFormatArgument) && H5.equals(this.failureArgumentName, o.failureArgumentName); - }, - $clone: function (to) { - var s = to || new System.DateTimeResult(); - s.Year = this.Year; - s.Month = this.Month; - s.Day = this.Day; - s.Hour = this.Hour; - s.Minute = this.Minute; - s.Second = this.Second; - s.fraction = this.fraction; - s.era = this.era; - s.flags = this.flags; - s.timeZoneOffset = this.timeZoneOffset; - s.calendar = this.calendar; - s.parsedDate = this.parsedDate; - s.failure = this.failure; - s.failureMessageID = this.failureMessageID; - s.failureMessageFormatArgument = this.failureMessageFormatArgument; - s.failureArgumentName = this.failureArgumentName; - return s; - } - } - }); - - // @source DayOfWeek.js - - H5.define("System.DayOfWeek", { - $kind: "enum", - statics: { - fields: { - Sunday: 0, - Monday: 1, - Tuesday: 2, - Wednesday: 3, - Thursday: 4, - Friday: 5, - Saturday: 6 - } - } - }); - - // @source DBNull.js - - H5.define("System.DBNull", { - inherits: [System.Runtime.Serialization.ISerializable,System.IConvertible], - statics: { - fields: { - Value: null - }, - ctors: { - init: function () { - this.Value = new System.DBNull(); - } - } - }, - alias: [ - "ToString", "System$IConvertible$ToString", - "GetTypeCode", "System$IConvertible$GetTypeCode" - ], - ctors: { - ctor: function () { - this.$initialize(); - } - }, - methods: { - toString: function () { - return ""; - }, - ToString: function (provider) { - return ""; - }, - GetTypeCode: function () { - return System.TypeCode.DBNull; - }, - System$IConvertible$ToBoolean: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToChar: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToSByte: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToByte: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToInt16: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToUInt16: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToInt32: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToUInt32: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToInt64: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToUInt64: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToSingle: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToDouble: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToDecimal: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToDateTime: function (provider) { - throw new System.InvalidCastException.$ctor1("Object cannot be cast from DBNull to other types."); - }, - System$IConvertible$ToType: function (type, provider) { - return System.Convert.defaultToType(H5.cast(this, System.IConvertible), type, provider); - } - } - }); - - // @source Empty.js - - H5.define("System.Empty", { - statics: { - fields: { - Value: null - }, - ctors: { - init: function () { - this.Value = new System.Empty(); - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - } - }, - methods: { - toString: function () { - return ""; - } - } - }); - - // @source ApplicationException.js - - H5.define("System.ApplicationException", { - inherits: [System.Exception], - ctors: { - ctor: function () { - this.$initialize(); - System.Exception.ctor.call(this, "Error in the application."); - this.HResult = -2146232832; - }, - $ctor1: function (message) { - this.$initialize(); - System.Exception.ctor.call(this, message); - this.HResult = -2146232832; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.Exception.ctor.call(this, message, innerException); - this.HResult = -2146232832; - } - } - }); - - // @source ArgumentException.js - - H5.define("System.ArgumentException", { - inherits: [System.SystemException], - fields: { - _paramName: null - }, - props: { - Message: { - get: function () { - var s = H5.ensureBaseProperty(this, "Message").$System$Exception$Message; - if (!System.String.isNullOrEmpty(this._paramName)) { - var resourceString = System.SR.Format("Parameter name: {0}", this._paramName); - return (s || "") + ("\n" || "") + (resourceString || ""); - } else { - return s; - } - } - }, - ParamName: { - get: function () { - return this._paramName; - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Value does not fall within the expected range."); - this.HResult = -2147024809; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2147024809; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2147024809; - }, - $ctor4: function (message, paramName, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this._paramName = paramName; - this.HResult = -2147024809; - }, - $ctor3: function (message, paramName) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this._paramName = paramName; - this.HResult = -2147024809; - } - } - }); - - // @source ArgumentNullException.js - - H5.define("System.ArgumentNullException", { - inherits: [System.ArgumentException], - ctors: { - ctor: function () { - this.$initialize(); - System.ArgumentException.$ctor1.call(this, "Value cannot be null."); - this.HResult = -2147467261; - }, - $ctor1: function (paramName) { - this.$initialize(); - System.ArgumentException.$ctor3.call(this, "Value cannot be null.", paramName); - this.HResult = -2147467261; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.ArgumentException.$ctor2.call(this, message, innerException); - this.HResult = -2147467261; - }, - $ctor3: function (paramName, message) { - this.$initialize(); - System.ArgumentException.$ctor3.call(this, message, paramName); - this.HResult = -2147467261; - } - } - }); - - // @source ArgumentOutOfRangeException.js - - H5.define("System.ArgumentOutOfRangeException", { - inherits: [System.ArgumentException], - fields: { - _actualValue: null - }, - props: { - Message: { - get: function () { - var s = H5.ensureBaseProperty(this, "Message").$System$ArgumentException$Message; - if (this._actualValue != null) { - var valueMessage = System.SR.Format("Actual value was {0}.", H5.toString(this._actualValue)); - if (s == null) { - return valueMessage; - } - return (s || "") + ("\n" || "") + (valueMessage || ""); - } - return s; - } - }, - ActualValue: { - get: function () { - return this._actualValue; - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.ArgumentException.$ctor1.call(this, "Specified argument was out of the range of valid values."); - this.HResult = -2146233086; - }, - $ctor1: function (paramName) { - this.$initialize(); - System.ArgumentException.$ctor3.call(this, "Specified argument was out of the range of valid values.", paramName); - this.HResult = -2146233086; - }, - $ctor4: function (paramName, message) { - this.$initialize(); - System.ArgumentException.$ctor3.call(this, message, paramName); - this.HResult = -2146233086; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.ArgumentException.$ctor2.call(this, message, innerException); - this.HResult = -2146233086; - }, - $ctor3: function (paramName, actualValue, message) { - this.$initialize(); - System.ArgumentException.$ctor3.call(this, message, paramName); - this._actualValue = actualValue; - this.HResult = -2146233086; - } - } - }); - - // @source ArithmeticException.js - - H5.define("System.ArithmeticException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Overflow or underflow in the arithmetic operation."); - this.HResult = -2147024362; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2147024362; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2147024362; - } - } - }); - - // @source Base64FormattingOptions.js - - H5.define("System.Base64FormattingOptions", { - $kind: "enum", - statics: { - fields: { - None: 0, - InsertLineBreaks: 1 - } - }, - $flags: true - }); - - // @source DivideByZeroException.js - - H5.define("System.DivideByZeroException", { - inherits: [System.ArithmeticException], - ctors: { - ctor: function () { - this.$initialize(); - System.ArithmeticException.$ctor1.call(this, "Attempted to divide by zero."); - this.HResult = -2147352558; - }, - $ctor1: function (message) { - this.$initialize(); - System.ArithmeticException.$ctor1.call(this, message); - this.HResult = -2147352558; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.ArithmeticException.$ctor2.call(this, message, innerException); - this.HResult = -2147352558; - } - } - }); - - // @source ExceptionArgument.js - - H5.define("System.ExceptionArgument", { - $kind: "enum", - statics: { - fields: { - obj: 0, - dictionary: 1, - array: 2, - info: 3, - key: 4, - collection: 5, - list: 6, - match: 7, - converter: 8, - capacity: 9, - index: 10, - startIndex: 11, - value: 12, - count: 13, - arrayIndex: 14, - $name: 15, - item: 16, - options: 17, - view: 18, - sourceBytesToCopy: 19, - action: 20, - comparison: 21, - offset: 22, - newSize: 23, - elementType: 24, - $length: 25, - length1: 26, - length2: 27, - length3: 28, - lengths: 29, - len: 30, - lowerBounds: 31, - sourceArray: 32, - destinationArray: 33, - sourceIndex: 34, - destinationIndex: 35, - indices: 36, - index1: 37, - index2: 38, - index3: 39, - other: 40, - comparer: 41, - endIndex: 42, - keys: 43, - creationOptions: 44, - timeout: 45, - tasks: 46, - scheduler: 47, - continuationFunction: 48, - millisecondsTimeout: 49, - millisecondsDelay: 50, - function: 51, - exceptions: 52, - exception: 53, - cancellationToken: 54, - delay: 55, - asyncResult: 56, - endMethod: 57, - endFunction: 58, - beginMethod: 59, - continuationOptions: 60, - continuationAction: 61, - concurrencyLevel: 62, - text: 63, - callBack: 64, - type: 65, - stateMachine: 66, - pHandle: 67, - values: 68, - task: 69, - s: 70, - keyValuePair: 71, - input: 72, - ownedMemory: 73, - pointer: 74, - start: 75, - format: 76, - culture: 77, - comparable: 78, - source: 79, - state: 80 - } - } - }); - - // @source ExceptionResource.js - - H5.define("System.ExceptionResource", { - $kind: "enum", - statics: { - fields: { - Argument_ImplementIComparable: 0, - Argument_InvalidType: 1, - Argument_InvalidArgumentForComparison: 2, - Argument_InvalidRegistryKeyPermissionCheck: 3, - ArgumentOutOfRange_NeedNonNegNum: 4, - Arg_ArrayPlusOffTooSmall: 5, - Arg_NonZeroLowerBound: 6, - Arg_RankMultiDimNotSupported: 7, - Arg_RegKeyDelHive: 8, - Arg_RegKeyStrLenBug: 9, - Arg_RegSetStrArrNull: 10, - Arg_RegSetMismatchedKind: 11, - Arg_RegSubKeyAbsent: 12, - Arg_RegSubKeyValueAbsent: 13, - Argument_AddingDuplicate: 14, - Serialization_InvalidOnDeser: 15, - Serialization_MissingKeys: 16, - Serialization_NullKey: 17, - Argument_InvalidArrayType: 18, - NotSupported_KeyCollectionSet: 19, - NotSupported_ValueCollectionSet: 20, - ArgumentOutOfRange_SmallCapacity: 21, - ArgumentOutOfRange_Index: 22, - Argument_InvalidOffLen: 23, - Argument_ItemNotExist: 24, - ArgumentOutOfRange_Count: 25, - ArgumentOutOfRange_InvalidThreshold: 26, - ArgumentOutOfRange_ListInsert: 27, - NotSupported_ReadOnlyCollection: 28, - InvalidOperation_CannotRemoveFromStackOrQueue: 29, - InvalidOperation_EmptyQueue: 30, - InvalidOperation_EnumOpCantHappen: 31, - InvalidOperation_EnumFailedVersion: 32, - InvalidOperation_EmptyStack: 33, - ArgumentOutOfRange_BiggerThanCollection: 34, - InvalidOperation_EnumNotStarted: 35, - InvalidOperation_EnumEnded: 36, - NotSupported_SortedListNestedWrite: 37, - InvalidOperation_NoValue: 38, - InvalidOperation_RegRemoveSubKey: 39, - Security_RegistryPermission: 40, - UnauthorizedAccess_RegistryNoWrite: 41, - ObjectDisposed_RegKeyClosed: 42, - NotSupported_InComparableType: 43, - Argument_InvalidRegistryOptionsCheck: 44, - Argument_InvalidRegistryViewCheck: 45, - InvalidOperation_NullArray: 46, - Arg_MustBeType: 47, - Arg_NeedAtLeast1Rank: 48, - ArgumentOutOfRange_HugeArrayNotSupported: 49, - Arg_RanksAndBounds: 50, - Arg_RankIndices: 51, - Arg_Need1DArray: 52, - Arg_Need2DArray: 53, - Arg_Need3DArray: 54, - NotSupported_FixedSizeCollection: 55, - ArgumentException_OtherNotArrayOfCorrectLength: 56, - Rank_MultiDimNotSupported: 57, - InvalidOperation_IComparerFailed: 58, - ArgumentOutOfRange_EndIndexStartIndex: 59, - Arg_LowerBoundsMustMatch: 60, - Arg_BogusIComparer: 61, - Task_WaitMulti_NullTask: 62, - Task_ThrowIfDisposed: 63, - Task_Start_TaskCompleted: 64, - Task_Start_Promise: 65, - Task_Start_ContinuationTask: 66, - Task_Start_AlreadyStarted: 67, - Task_RunSynchronously_TaskCompleted: 68, - Task_RunSynchronously_Continuation: 69, - Task_RunSynchronously_Promise: 70, - Task_RunSynchronously_AlreadyStarted: 71, - Task_MultiTaskContinuation_NullTask: 72, - Task_MultiTaskContinuation_EmptyTaskList: 73, - Task_Dispose_NotCompleted: 74, - Task_Delay_InvalidMillisecondsDelay: 75, - Task_Delay_InvalidDelay: 76, - Task_ctor_LRandSR: 77, - Task_ContinueWith_NotOnAnything: 78, - Task_ContinueWith_ESandLR: 79, - TaskT_TransitionToFinal_AlreadyCompleted: 80, - TaskCompletionSourceT_TrySetException_NullException: 81, - TaskCompletionSourceT_TrySetException_NoExceptions: 82, - MemoryDisposed: 83, - Memory_OutstandingReferences: 84, - InvalidOperation_WrongAsyncResultOrEndCalledMultiple: 85, - ConcurrentDictionary_ConcurrencyLevelMustBePositive: 86, - ConcurrentDictionary_CapacityMustNotBeNegative: 87, - ConcurrentDictionary_TypeOfValueIncorrect: 88, - ConcurrentDictionary_TypeOfKeyIncorrect: 89, - ConcurrentDictionary_KeyAlreadyExisted: 90, - ConcurrentDictionary_ItemKeyIsNull: 91, - ConcurrentDictionary_IndexIsNegative: 92, - ConcurrentDictionary_ArrayNotLargeEnough: 93, - ConcurrentDictionary_ArrayIncorrectType: 94, - ConcurrentCollection_SyncRoot_NotSupported: 95, - ArgumentOutOfRange_Enum: 96, - InvalidOperation_HandleIsNotInitialized: 97, - AsyncMethodBuilder_InstanceNotInitialized: 98, - ArgumentNull_SafeHandle: 99 - } - } - }); - - // @source FormatException.js - - H5.define("System.FormatException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "One of the identified items was in an invalid format."); - this.HResult = -2146233033; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233033; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2146233033; - } - } - }); - - // @source FormattableString.js - - H5.define("System.FormattableString", { - inherits: [System.IFormattable], - statics: { - methods: { - Invariant: function (formattable) { - if (formattable == null) { - throw new System.ArgumentNullException.$ctor1("formattable"); - } - - return formattable.ToString(System.Globalization.CultureInfo.invariantCulture); - } - } - }, - methods: { - System$IFormattable$format: function (ignored, formatProvider) { - return this.ToString(formatProvider); - }, - toString: function () { - return this.ToString(System.Globalization.CultureInfo.getCurrentCulture()); - } - } - }); - - // @source ConcreteFormattableString.js - - H5.define("System.Runtime.CompilerServices.FormattableStringFactory.ConcreteFormattableString", { - inherits: [System.FormattableString], - $kind: "nested class", - fields: { - _format: null, - _arguments: null - }, - props: { - Format: { - get: function () { - return this._format; - } - }, - ArgumentCount: { - get: function () { - return this._arguments.length; - } - } - }, - ctors: { - ctor: function (format, $arguments) { - this.$initialize(); - System.FormattableString.ctor.call(this); - this._format = format; - this._arguments = $arguments; - } - }, - methods: { - GetArguments: function () { - return this._arguments; - }, - GetArgument: function (index) { - return this._arguments[System.Array.index(index, this._arguments)]; - }, - ToString: function (formatProvider) { - return System.String.formatProvider.apply(System.String, [formatProvider, this._format].concat(this._arguments)); - } - } - }); - - // @source FormattableStringFactory.js - - H5.define("System.Runtime.CompilerServices.FormattableStringFactory", { - statics: { - methods: { - Create: function (format, $arguments) { - if ($arguments === void 0) { $arguments = []; } - if (format == null) { - throw new System.ArgumentNullException.$ctor1("format"); - } - - if ($arguments == null) { - throw new System.ArgumentNullException.$ctor1("arguments"); - } - - return new System.Runtime.CompilerServices.FormattableStringFactory.ConcreteFormattableString(format, $arguments); - } - } - } - }); - - // @source ModuleInitializerAttribute.js - - H5.define("System.Runtime.CompilerServices.ModuleInitializerAttribute", { - inherits: [System.Attribute] - }); - - // @source Guid.js - - H5.define("System.Guid", { - inherits: function () { return [System.IEquatable$1(System.Guid),System.IComparable$1(System.Guid),System.IFormattable]; }, - $kind: "struct", - statics: { - fields: { - error1: null, - Valid: null, - Split: null, - NonFormat: null, - Replace: null, - Rnd: null, - Empty: null - }, - ctors: { - init: function () { - this.Empty = H5.getDefaultValue(System.Guid); - this.error1 = "Byte array for GUID must be exactly {0} bytes long"; - this.Valid = new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "i"); - this.Split = new RegExp("^(.{8})(.{4})(.{4})(.{4})(.{12})$"); - this.NonFormat = new RegExp("^[{(]?([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})[)}]?$", "i"); - this.Replace = new RegExp("-", "g"); - this.Rnd = new System.Random.ctor(); - } - }, - methods: { - Parse: function (input) { - return System.Guid.ParseExact(input, null); - }, - ParseExact: function (input, format) { - var r = new System.Guid.ctor(); - r.ParseInternal(input, format, true); - return r; - }, - TryParse: function (input, result) { - return System.Guid.TryParseExact(input, null, result); - }, - TryParseExact: function (input, format, result) { - result.v = new System.Guid.ctor(); - return result.v.ParseInternal(input, format, false); - }, - NewGuid: function () { - var a = System.Array.init(16, 0, System.Byte); - - System.Guid.Rnd.NextBytes(a); - - a[System.Array.index(7, a)] = (a[System.Array.index(7, a)] & 15 | 64) & 255; - a[System.Array.index(8, a)] = (a[System.Array.index(8, a)] & 191 | 128) & 255; - - return new System.Guid.$ctor1(a); - }, - ToHex$1: function (x, precision) { - var result = x.toString(16); - precision = (precision - result.length) | 0; - - for (var i = 0; i < precision; i = (i + 1) | 0) { - result = "0" + (result || ""); - } - - return result; - }, - ToHex: function (x) { - var result = x.toString(16); - - if (result.length === 1) { - result = "0" + (result || ""); - } - - return result; - }, - op_Equality: function (a, b) { - if (H5.referenceEquals(a, null)) { - return H5.referenceEquals(b, null); - } - - return a.equalsT(b); - }, - op_Inequality: function (a, b) { - return !(System.Guid.op_Equality(a, b)); - }, - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $._a = 0; - $._b = 0; - $._c = 0; - $._d = 0; - $._e = 0; - $._f = 0; - $._g = 0; - $._h = 0; - $._i = 0; - $._j = 0; - $._k = 0; - return $;} - } - }, - fields: { - _a: 0, - _b: 0, - _c: 0, - _d: 0, - _e: 0, - _f: 0, - _g: 0, - _h: 0, - _i: 0, - _j: 0, - _k: 0 - }, - alias: [ - "equalsT", "System$IEquatable$1$System$Guid$equalsT", - "compareTo", ["System$IComparable$1$System$Guid$compareTo", "System$IComparable$1$compareTo"], - "format", "System$IFormattable$format" - ], - ctors: { - $ctor4: function (uuid) { - this.$initialize(); - (new System.Guid.ctor()).$clone(this); - - this.ParseInternal(uuid, null, true); - }, - $ctor1: function (b) { - this.$initialize(); - if (b == null) { - throw new System.ArgumentNullException.$ctor1("b"); - } - - if (b.length !== 16) { - throw new System.ArgumentException.$ctor1(System.String.format(System.Guid.error1, [H5.box(16, System.Int32)])); - } - - this._a = (b[System.Array.index(3, b)] << 24) | (b[System.Array.index(2, b)] << 16) | (b[System.Array.index(1, b)] << 8) | b[System.Array.index(0, b)]; - this._b = H5.Int.sxs(((b[System.Array.index(5, b)] << 8) | b[System.Array.index(4, b)]) & 65535); - this._c = H5.Int.sxs(((b[System.Array.index(7, b)] << 8) | b[System.Array.index(6, b)]) & 65535); - this._d = b[System.Array.index(8, b)]; - this._e = b[System.Array.index(9, b)]; - this._f = b[System.Array.index(10, b)]; - this._g = b[System.Array.index(11, b)]; - this._h = b[System.Array.index(12, b)]; - this._i = b[System.Array.index(13, b)]; - this._j = b[System.Array.index(14, b)]; - this._k = b[System.Array.index(15, b)]; - }, - $ctor5: function (a, b, c, d, e, f, g, h, i, j, k) { - this.$initialize(); - this._a = a | 0; - this._b = H5.Int.sxs(b & 65535); - this._c = H5.Int.sxs(c & 65535); - this._d = d; - this._e = e; - this._f = f; - this._g = g; - this._h = h; - this._i = i; - this._j = j; - this._k = k; - }, - $ctor3: function (a, b, c, d) { - this.$initialize(); - if (d == null) { - throw new System.ArgumentNullException.$ctor1("d"); - } - - if (d.length !== 8) { - throw new System.ArgumentException.$ctor1(System.String.format(System.Guid.error1, [H5.box(8, System.Int32)])); - } - - this._a = a; - this._b = b; - this._c = c; - this._d = d[System.Array.index(0, d)]; - this._e = d[System.Array.index(1, d)]; - this._f = d[System.Array.index(2, d)]; - this._g = d[System.Array.index(3, d)]; - this._h = d[System.Array.index(4, d)]; - this._i = d[System.Array.index(5, d)]; - this._j = d[System.Array.index(6, d)]; - this._k = d[System.Array.index(7, d)]; - }, - $ctor2: function (a, b, c, d, e, f, g, h, i, j, k) { - this.$initialize(); - this._a = a; - this._b = b; - this._c = c; - this._d = d; - this._e = e; - this._f = f; - this._g = g; - this._h = h; - this._i = i; - this._j = j; - this._k = k; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - getHashCode: function () { - return this._a ^ ((this._b << 16) | (this._c & 65535)) ^ ((this._f << 24) | this._k); - }, - equals: function (o) { - if (!(H5.is(o, System.Guid))) { - return false; - } - - return this.equalsT(System.Nullable.getValue(H5.cast(H5.unbox(o, System.Guid), System.Guid))); - }, - equalsT: function (o) { - if ((this._a !== o._a) || (this._b !== o._b) || (this._c !== o._c) || (this._d !== o._d) || (this._e !== o._e) || (this._f !== o._f) || (this._g !== o._g) || (this._h !== o._h) || (this._i !== o._i) || (this._j !== o._j) || (this._k !== o._k)) { - return false; - } - - return true; - }, - compareTo: function (value) { - return System.String.compare(this.toString(), value.toString()); - }, - toString: function () { - return this.Format(null); - }, - ToString: function (format) { - return this.Format(format); - }, - format: function (format, formatProvider) { - return this.Format(format); - }, - ToByteArray: function () { - var g = System.Array.init(16, 0, System.Byte); - - g[System.Array.index(0, g)] = this._a & 255; - g[System.Array.index(1, g)] = (this._a >> 8) & 255; - g[System.Array.index(2, g)] = (this._a >> 16) & 255; - g[System.Array.index(3, g)] = (this._a >> 24) & 255; - g[System.Array.index(4, g)] = this._b & 255; - g[System.Array.index(5, g)] = (this._b >> 8) & 255; - g[System.Array.index(6, g)] = this._c & 255; - g[System.Array.index(7, g)] = (this._c >> 8) & 255; - g[System.Array.index(8, g)] = this._d; - g[System.Array.index(9, g)] = this._e; - g[System.Array.index(10, g)] = this._f; - g[System.Array.index(11, g)] = this._g; - g[System.Array.index(12, g)] = this._h; - g[System.Array.index(13, g)] = this._i; - g[System.Array.index(14, g)] = this._j; - g[System.Array.index(15, g)] = this._k; - - return g; - }, - ParseInternal: function (input, format, check) { - var r = null; - - if (System.String.isNullOrEmpty(input)) { - if (check) { - throw new System.ArgumentNullException.$ctor1("input"); - } - return false; - } - - if (System.String.isNullOrEmpty(format)) { - var m = System.Guid.NonFormat.exec(input); - - if (m != null) { - var list = new (System.Collections.Generic.List$1(System.String)).ctor(); - for (var i = 1; i <= m.length; i = (i + 1) | 0) { - if (m[i] != null) { - list.add(m[i]); - } - } - - r = list.ToArray().join("-").toLowerCase(); - } - } else { - format = format.toUpperCase(); - - var p = false; - - if (H5.referenceEquals(format, "N")) { - var m1 = System.Guid.Split.exec(input); - - if (m1 != null) { - var list1 = new (System.Collections.Generic.List$1(System.String)).ctor(); - for (var i1 = 1; i1 <= m1.length; i1 = (i1 + 1) | 0) { - if (m1[i1] != null) { - list1.add(m1[i1]); - } - } - - p = true; - input = list1.ToArray().join("-"); - } - } else if (H5.referenceEquals(format, "B") || H5.referenceEquals(format, "P")) { - var b = H5.referenceEquals(format, "B") ? System.Array.init([123, 125], System.Char) : System.Array.init([40, 41], System.Char); - - if ((input.charCodeAt(0) === b[System.Array.index(0, b)]) && (input.charCodeAt(((input.length - 1) | 0)) === b[System.Array.index(1, b)])) { - p = true; - input = input.substr(1, ((input.length - 2) | 0)); - } - } else { - p = true; - } - - if (p && System.Guid.Valid.test(input)) { - r = input.toLowerCase(); - } - } - - if (r != null) { - this.FromString(r); - return true; - } - - if (check) { - throw new System.FormatException.$ctor1("input is not in a recognized format"); - } - - return false; - }, - Format: function (format) { - var s = (System.Guid.ToHex$1((this._a >>> 0), 8) || "") + (System.Guid.ToHex$1((this._b & 65535), 4) || "") + (System.Guid.ToHex$1((this._c & 65535), 4) || ""); - s = (s || "") + ((System.Array.init([this._d, this._e, this._f, this._g, this._h, this._i, this._j, this._k], System.Byte)).map(System.Guid.ToHex).join("") || ""); - - var m = /^(.{8})(.{4})(.{4})(.{4})(.{12})$/.exec(s); - var list = System.Array.init(0, null, System.String); - for (var i = 1; i < m.length; i = (i + 1) | 0) { - if (m[System.Array.index(i, m)] != null) { - list.push(m[System.Array.index(i, m)]); - } - } - s = list.join("-"); - - switch (format) { - case "n": - case "N": - return s.replace(System.Guid.Replace, ""); - case "b": - case "B": - return String.fromCharCode(123) + (s || "") + String.fromCharCode(125); - case "p": - case "P": - return String.fromCharCode(40) + (s || "") + String.fromCharCode(41); - default: - return s; - } - }, - FromString: function (s) { - if (System.String.isNullOrEmpty(s)) { - return; - } - - s = s.replace(System.Guid.Replace, ""); - - var r = System.Array.init(8, 0, System.Byte); - - this._a = (System.UInt32.parse(s.substr(0, 8), 16)) | 0; - this._b = H5.Int.sxs((System.UInt16.parse(s.substr(8, 4), 16)) & 65535); - this._c = H5.Int.sxs((System.UInt16.parse(s.substr(12, 4), 16)) & 65535); - for (var i = 8; i < 16; i = (i + 1) | 0) { - r[System.Array.index(((i - 8) | 0), r)] = System.Byte.parse(s.substr(H5.Int.mul(i, 2), 2), 16); - } - - this._d = r[System.Array.index(0, r)]; - this._e = r[System.Array.index(1, r)]; - this._f = r[System.Array.index(2, r)]; - this._g = r[System.Array.index(3, r)]; - this._h = r[System.Array.index(4, r)]; - this._i = r[System.Array.index(5, r)]; - this._j = r[System.Array.index(6, r)]; - this._k = r[System.Array.index(7, r)]; - }, - toJSON: function () { - return this.toString(); - }, - $clone: function (to) { return this; } - } - }); - - // @source Index.js - - H5.define("System.Index", { - inherits: function () { return [System.IEquatable$1(System.Index)]; }, - $kind: "struct", - statics: { - props: { - Start: { - get: function () { - return new System.Index.$ctor1(0); - } - }, - End: { - get: function () { - return new System.Index.$ctor1(-1); - } - } - }, - methods: { - FromStart: function (value) { - if (value < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("value", "value must be non-negative"); - } - - return new System.Index.$ctor1(value); - }, - FromEnd: function (value) { - if (value < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("value", "value must be non-negative"); - } - - return new System.Index.$ctor1(~value); - }, - op_Implicit: function (value) { - return System.Index.FromStart(value); - }, - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $._value = 0; - return $;} - } - }, - fields: { - _value: 0 - }, - props: { - Value: { - get: function () { - if (this._value < 0) { - return ~this._value; - } else { - return this._value; - } - } - }, - IsFromEnd: { - get: function () { - return this._value < 0; - } - } - }, - alias: ["equalsT", "System$IEquatable$1$System$Index$equalsT"], - ctors: { - $ctor1: function (value, fromEnd) { - if (fromEnd === void 0) { fromEnd = false; } - - this.$initialize(); - if (value < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("value", "value must be non-negative"); - } - - if (fromEnd) { - this._value = ~value; - } else { - this._value = value; - } - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - GetOffset: function (length) { - var offset = this._value; - if (this.IsFromEnd) { - offset = (length - (~offset)) | 0; - } - return offset; - }, - equals: function (value) { - return H5.is(value, System.Index) && this._value === System.Nullable.getValue(H5.cast(H5.unbox(value, System.Index), System.Index))._value; - }, - equalsT: function (other) { - return this._value === other._value; - }, - getHashCode: function () { - return this._value; - }, - toString: function () { - if (this.IsFromEnd) { - return "^" + (H5.toString(this.Value) || ""); - } - - return H5.toString(this.Value); - }, - $clone: function (to) { - var s = to || new System.Index(); - s._value = this._value; - return s; - } - } - }); - - // @source Range.js - - H5.define("System.Range", { - inherits: function () { return [System.IEquatable$1(System.Range)]; }, - $kind: "struct", - statics: { - props: { - All: { - get: function () { - return new System.Range.$ctor1(System.Index.Start, System.Index.End); - } - } - }, - methods: { - StartAt: function (start) { - return new System.Range.$ctor1(start, System.Index.End); - }, - EndAt: function (end) { - return new System.Range.$ctor1(System.Index.Start, end); - }, - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.Start = H5.getDefaultValue(System.Index); - $.End = H5.getDefaultValue(System.Index); - return $;} - } - }, - props: { - Start: null, - End: null - }, - alias: ["equalsT", "System$IEquatable$1$System$Range$equalsT"], - ctors: { - init: function () { - this.Start = H5.getDefaultValue(System.Index); - this.End = H5.getDefaultValue(System.Index); - }, - $ctor1: function (start, end) { - this.$initialize(); - this.Start = start; - this.End = end; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - equals: function (value) { - var r = new System.Range(); - return ((r = H5.as(value, System.Range))) != null && r.Start.equalsT(this.Start) && r.End.equalsT(this.End); - }, - equalsT: function (other) { - return other.Start.equalsT(this.Start) && other.End.equalsT(this.End); - }, - getHashCode: function () { - return ((H5.Int.mul(this.Start.getHashCode(), 31) + this.End.getHashCode()) | 0); - }, - toString: function () { - return this.Start + ".." + this.End; - }, - GetOffsetAndLength: function (length) { - var start = this.Start.GetOffset(length); - var end = this.End.GetOffset(length); - - if ((end >>> 0) > (length >>> 0) || (start >>> 0) > (end >>> 0)) { - throw new System.ArgumentOutOfRangeException.$ctor1("length"); - } - - return new (System.ValueTuple$2(System.Int32,System.Int32)).$ctor1(start, ((end - start) | 0)); - }, - $clone: function (to) { return this; } - } - }); - - // @source Span.js - - H5.define("System.Span$1", function (T) { return { - $kind: "struct", - statics: { - methods: { - op_Implicit: function (array) { - return new (System.Span$1(T)).$ctor1(array); - }, - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $._array = null; - $._offset = 0; - $._length = 0; - return $;} - } - }, - fields: { - _array: null, - _offset: 0, - _length: 0 - }, - props: { - Length: { - get: function () { - return this._length; - } - } - }, - ctors: { - $ctor1: function (array) { - this.$initialize(); - this._array = array; - this._offset = 0; - this._length = array != null ? array.length : 0; - }, - $ctor2: function (array, start, length) { - this.$initialize(); - this._array = array; - this._offset = start; - this._length = length; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - getItem: function (index) { - if ((index >>> 0) >= (this._length >>> 0)) { - throw new System.IndexOutOfRangeException.ctor(); - } - return new (H5.Ref$1(T))(H5.fn.bind(this, function () { - return this._array[System.Array.index(((this._offset + index) | 0), this._array)]; - }), H5.fn.bind(this, function (_v_) { - return (this._array[System.Array.index(((this._offset + index) | 0), this._array)] = _v_, _v_); - })); - }, - ToArray: function () { - if (this._length === 0) { - return System.Array.init([], T); - } - var destination = System.Array.init(this._length, function (){ - return H5.getDefaultValue(T); - }, T); - System.Array.copy(this._array, this._offset, destination, 0, this._length); - return destination; - }, - getHashCode: function () { - var h = H5.addHash([1851879507, this._array, this._offset, this._length]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Span$1(T))) { - return false; - } - return H5.equals(this._array, o._array) && H5.equals(this._offset, o._offset) && H5.equals(this._length, o._length); - }, - $clone: function (to) { - var s = to || new (System.Span$1(T))(); - s._array = this._array; - s._offset = this._offset; - s._length = this._length; - return s; - } - } - }; }); - - // @source ReadOnlySpan.js - - H5.define("System.ReadOnlySpan$1", function (T) { return { - $kind: "struct", - statics: { - methods: { - op_Implicit: function (array) { - return new (System.ReadOnlySpan$1(T)).$ctor1(array); - }, - op_Implicit$1: function (span) { - return new (System.ReadOnlySpan$1(T)).$ctor3(span); - }, - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $._array = null; - $._offset = 0; - $._length = 0; - return $;} - } - }, - fields: { - _array: null, - _offset: 0, - _length: 0 - }, - props: { - Length: { - get: function () { - return this._length; - } - } - }, - ctors: { - $ctor1: function (array) { - this.$initialize(); - this._array = array; - this._offset = 0; - this._length = array != null ? array.length : 0; - }, - $ctor2: function (array, start, length) { - this.$initialize(); - this._array = array; - this._offset = start; - this._length = length; - }, - $ctor3: function (span) { - this.$initialize(); - this._array = span._array; - this._offset = span._offset; - this._length = span._length; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - getItem: function (index) { - if ((index >>> 0) >= (this._length >>> 0)) { - throw new System.IndexOutOfRangeException.ctor(); - } - return new (H5.Ref$1(T))(H5.fn.bind(this, function () { - return this._array[System.Array.index(((this._offset + index) | 0), this._array)]; - }), H5.fn.bind(this, function (_v_) { - return (this._array[System.Array.index(((this._offset + index) | 0), this._array)] = _v_, _v_); - })); - }, - ToArray: function () { - if (this._length === 0) { - return System.Array.init([], T); - } - var destination = System.Array.init(this._length, function (){ - return H5.getDefaultValue(T); - }, T); - System.Array.copy(this._array, this._offset, destination, 0, this._length); - return destination; - }, - getHashCode: function () { - var h = H5.addHash([5573133300, this._array, this._offset, this._length]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.ReadOnlySpan$1(T))) { - return false; - } - return H5.equals(this._array, o._array) && H5.equals(this._offset, o._offset) && H5.equals(this._length, o._length); - }, - $clone: function (to) { - var s = to || new (System.ReadOnlySpan$1(T))(); - s._array = this._array; - s._offset = this._offset; - s._length = this._length; - return s; - } - } - }; }); - - // @source MemoryExtensions.js - - H5.define("System.MemoryExtensions", { - statics: { - methods: { - AsSpan: function (text) { - if (text == null) { - return H5.getDefaultValue(System.ReadOnlySpan$1(System.Char)); - } - return new (System.ReadOnlySpan$1(System.Char)).$ctor1(System.String.toCharArray(text, 0, text.length)); - }, - AsSpan$1: function (text, start) { - if (text == null) { - if (start !== 0) { - throw new System.ArgumentOutOfRangeException.ctor(); - } - return H5.getDefaultValue(System.ReadOnlySpan$1(System.Char)); - } - - return System.MemoryExtensions.AsSpan$2(text, start, ((text.length - start) | 0)); - }, - AsSpan$2: function (text, start, length) { - if (text == null) { - if (start !== 0 || length !== 0) { - throw new System.ArgumentOutOfRangeException.ctor(); - } - return H5.getDefaultValue(System.ReadOnlySpan$1(System.Char)); - } - - return new (System.ReadOnlySpan$1(System.Char)).$ctor2(System.String.toCharArray(text, 0, text.length), start, length); - }, - SequenceEqual: function (T, span, other) { - if (span.Length !== other.Length) { - return false; - } - for (var i = 0; i < span.Length; i = (i + 1) | 0) { - if (!System.Collections.Generic.EqualityComparer$1(T).def.equals2(H5.Ref$1(T).op_Implicit(span.getItem(i)), H5.Ref$1(T).op_Implicit(other.getItem(i)))) { - return false; - } - } - return true; - } - } - } - }); - - // @source ITupleInternal.js - - H5.define("System.ITupleInternal", { - $kind: "interface" - }); - - // @source Tuple.js - - H5.define("System.Tuple"); - - H5.define("System.Tuple$1", function (T1) { return { - - }; }); - - H5.define("System.Tuple$2", function (T1, T2) { return { - - }; }); - - H5.define("System.Tuple$3", function (T1, T2, T3) { return { - - }; }); - - H5.define("System.Tuple$4", function (T1, T2, T3, T4) { return { - - }; }); - - H5.define("System.Tuple$5", function (T1, T2, T3, T4, T5) { return { - - }; }); - - H5.define("System.Tuple$6", function (T1, T2, T3, T4, T5, T6) { return { - - }; }); - - H5.define("System.Tuple$7", function (T1, T2, T3, T4, T5, T6, T7) { return { - - }; }); - - H5.define("System.Tuple$8", function (T1, T2, T3, T4, T5, T6, T7, TRest) { return { - - }; }); - - // @source ValueTuple.js - - H5.define("System.ValueTuple", { - inherits: function () { return [System.IEquatable$1(System.ValueTuple),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple)]; }, - $kind: "struct", - statics: { - methods: { - Create: function () { - return new System.ValueTuple(); - }, - Create$1: function (T1, item1) { - return new (System.ValueTuple$1(T1)).$ctor1(item1); - }, - Create$2: function (T1, T2, item1, item2) { - return new (System.ValueTuple$2(T1,T2)).$ctor1(item1, item2); - }, - Create$3: function (T1, T2, T3, item1, item2, item3) { - return new (System.ValueTuple$3(T1,T2,T3)).$ctor1(item1, item2, item3); - }, - Create$4: function (T1, T2, T3, T4, item1, item2, item3, item4) { - return new (System.ValueTuple$4(T1,T2,T3,T4)).$ctor1(item1, item2, item3, item4); - }, - Create$5: function (T1, T2, T3, T4, T5, item1, item2, item3, item4, item5) { - return new (System.ValueTuple$5(T1,T2,T3,T4,T5)).$ctor1(item1, item2, item3, item4, item5); - }, - Create$6: function (T1, T2, T3, T4, T5, T6, item1, item2, item3, item4, item5, item6) { - return new (System.ValueTuple$6(T1,T2,T3,T4,T5,T6)).$ctor1(item1, item2, item3, item4, item5, item6); - }, - Create$7: function (T1, T2, T3, T4, T5, T6, T7, item1, item2, item3, item4, item5, item6, item7) { - return new (System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)).$ctor1(item1, item2, item3, item4, item5, item6, item7); - }, - Create$8: function (T1, T2, T3, T4, T5, T6, T7, T8, item1, item2, item3, item4, item5, item6, item7, item8) { - return new (System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,System.ValueTuple$1(T8))).$ctor1(item1, item2, item3, item4, item5, item6, item7, System.ValueTuple.Create$1(T8, item8)); - }, - CombineHashCodes: function (h1, h2) { - return System.Collections.HashHelpers.Combine(System.Collections.HashHelpers.Combine(System.Collections.HashHelpers.RandomSeed, h1), h2); - }, - CombineHashCodes$1: function (h1, h2, h3) { - return System.Collections.HashHelpers.Combine(System.ValueTuple.CombineHashCodes(h1, h2), h3); - }, - CombineHashCodes$2: function (h1, h2, h3, h4) { - return System.Collections.HashHelpers.Combine(System.ValueTuple.CombineHashCodes$1(h1, h2, h3), h4); - }, - CombineHashCodes$3: function (h1, h2, h3, h4, h5) { - return System.Collections.HashHelpers.Combine(System.ValueTuple.CombineHashCodes$2(h1, h2, h3, h4), h5); - }, - CombineHashCodes$4: function (h1, h2, h3, h4, h5, h6) { - return System.Collections.HashHelpers.Combine(System.ValueTuple.CombineHashCodes$3(h1, h2, h3, h4, h5), h6); - }, - CombineHashCodes$5: function (h1, h2, h3, h4, h5, h6, h7) { - return System.Collections.HashHelpers.Combine(System.ValueTuple.CombineHashCodes$4(h1, h2, h3, h4, h5, h6), h7); - }, - CombineHashCodes$6: function (h1, h2, h3, h4, h5, h6, h7, h8) { - return System.Collections.HashHelpers.Combine(System.ValueTuple.CombineHashCodes$5(h1, h2, h3, h4, h5, h6, h7), h8); - }, - getDefaultValue: function () { - var $ = Object.create(this.prototype); - return $;} - } - }, - alias: [ - "equalsT", "System$IEquatable$1$System$ValueTuple$equalsT", - "compareTo", ["System$IComparable$1$System$ValueTuple$compareTo", "System$IComparable$1$compareTo"] - ], - ctors: { - ctor: function () { - this.$initialize(); - } - }, - methods: { - equals: function (obj) { - return H5.is(obj, System.ValueTuple); - }, - equalsT: function (other) { - return true; - }, - System$Collections$IStructuralEquatable$Equals: function (other, comparer) { - return H5.is(other, System.ValueTuple); - }, - System$IComparable$compareTo: function (other) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - return 0; - }, - compareTo: function (other) { - return 0; - }, - System$Collections$IStructuralComparable$CompareTo: function (other, comparer) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - return 0; - }, - getHashCode: function () { - return 0; - }, - System$Collections$IStructuralEquatable$GetHashCode: function (comparer) { - return 0; - }, - toString: function () { - return "()"; - }, - $clone: function (to) { return this; } - } - }); - - H5.define("System.ValueTuple$1", function (T1) { return { - inherits: function () { return [System.IEquatable$1(System.ValueTuple$1(T1)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$1(T1)),System.ITupleInternal]; }, - $kind: "struct", - statics: { - props: { - s_t1Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T1).def; - } - } - }, - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.Item1 = null; - return $;} - } - }, - fields: { - Item1: H5.getDefaultValue(T1) - }, - props: { - System$ITupleInternal$Size: { - get: function () { - return 1; - } - } - }, - alias: [ - "equalsT", "System$IEquatable$1$System$ValueTuple$1$" + H5.getTypeAlias(T1) + "$equalsT", - "compareTo", ["System$IComparable$1$System$ValueTuple$1$" + H5.getTypeAlias(T1) + "$compareTo", "System$IComparable$1$compareTo"] - ], - ctors: { - $ctor1: function (item1) { - this.$initialize(); - this.Item1 = item1; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - equals: function (obj) { - return H5.is(obj, System.ValueTuple$1(T1)) && this.equalsT(System.Nullable.getValue(H5.cast(H5.unbox(obj, System.ValueTuple$1(T1)), System.ValueTuple$1(T1)))); - }, - equalsT: function (other) { - return System.ValueTuple$1(T1).s_t1Comparer.equals2(this.Item1, other.Item1); - }, - System$Collections$IStructuralEquatable$Equals: function (other, comparer) { - if (other == null || !(H5.is(other, System.ValueTuple$1(T1)))) { - return false; - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$1(T1)), System.ValueTuple$1(T1))); - - return comparer.System$Collections$IEqualityComparer$equals(this.Item1, objTuple.Item1); - }, - System$IComparable$compareTo: function (other) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$1(T1)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$1(T1)), System.ValueTuple$1(T1))); - - return new (System.Collections.Generic.Comparer$1(T1))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1, objTuple.Item1); - }, - compareTo: function (other) { - return new (System.Collections.Generic.Comparer$1(T1))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1, other.Item1); - }, - System$Collections$IStructuralComparable$CompareTo: function (other, comparer) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$1(T1)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$1(T1)), System.ValueTuple$1(T1))); - - return comparer.System$Collections$IComparer$compare(this.Item1, objTuple.Item1); - }, - getHashCode: function () { - return System.ValueTuple$1(T1).s_t1Comparer.getHashCode2(this.Item1); - }, - System$Collections$IStructuralEquatable$GetHashCode: function (comparer) { - return comparer.System$Collections$IEqualityComparer$getHashCode(this.Item1); - }, - System$ITupleInternal$GetHashCode: function (comparer) { - return comparer.System$Collections$IEqualityComparer$getHashCode(this.Item1); - }, - toString: function () { - return "(" + ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ")"; - }, - System$ITupleInternal$ToStringEnd: function () { - return ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ")"; - }, - $clone: function (to) { - var s = to || new (System.ValueTuple$1(T1))(); - s.Item1 = this.Item1; - return s; - } - } - }; }); - - H5.define("System.ValueTuple$2", function (T1, T2) { return { - inherits: function () { return [System.IEquatable$1(System.ValueTuple$2(T1,T2)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$2(T1,T2)),System.ITupleInternal]; }, - $kind: "struct", - statics: { - props: { - s_t1Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T1).def; - } - }, - s_t2Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T2).def; - } - } - }, - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.Item1 = null; - $.Item2 = null; - return $;} - } - }, - fields: { - Item1: H5.getDefaultValue(T1), - Item2: H5.getDefaultValue(T2) - }, - props: { - System$ITupleInternal$Size: { - get: function () { - return 2; - } - } - }, - alias: [ - "equalsT", "System$IEquatable$1$System$ValueTuple$2$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$equalsT", - "compareTo", ["System$IComparable$1$System$ValueTuple$2$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$compareTo", "System$IComparable$1$compareTo"] - ], - ctors: { - $ctor1: function (item1, item2) { - this.$initialize(); - this.Item1 = item1; - this.Item2 = item2; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - equals: function (obj) { - return H5.is(obj, System.ValueTuple$2(T1,T2)) && this.equalsT(System.Nullable.getValue(H5.cast(H5.unbox(obj, System.ValueTuple$2(T1,T2)), System.ValueTuple$2(T1,T2)))); - }, - equalsT: function (other) { - return System.ValueTuple$2(T1,T2).s_t1Comparer.equals2(this.Item1, other.Item1) && System.ValueTuple$2(T1,T2).s_t2Comparer.equals2(this.Item2, other.Item2); - }, - System$Collections$IStructuralEquatable$Equals: function (other, comparer) { - if (other == null || !(H5.is(other, System.ValueTuple$2(T1,T2)))) { - return false; - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$2(T1,T2)), System.ValueTuple$2(T1,T2))); - - return comparer.System$Collections$IEqualityComparer$equals(this.Item1, objTuple.Item1) && comparer.System$Collections$IEqualityComparer$equals(this.Item2, objTuple.Item2); - }, - System$IComparable$compareTo: function (other) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$2(T1,T2)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - return this.compareTo(System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$2(T1,T2)), System.ValueTuple$2(T1,T2)))); - }, - compareTo: function (other) { - var c = new (System.Collections.Generic.Comparer$1(T1))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1, other.Item1); - if (c !== 0) { - return c; - } - - return new (System.Collections.Generic.Comparer$1(T2))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2, other.Item2); - }, - System$Collections$IStructuralComparable$CompareTo: function (other, comparer) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$2(T1,T2)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$2(T1,T2)), System.ValueTuple$2(T1,T2))); - - var c = comparer.System$Collections$IComparer$compare(this.Item1, objTuple.Item1); - if (c !== 0) { - return c; - } - - return comparer.System$Collections$IComparer$compare(this.Item2, objTuple.Item2); - }, - getHashCode: function () { - return System.ValueTuple.CombineHashCodes(System.ValueTuple$2(T1,T2).s_t1Comparer.getHashCode2(this.Item1), System.ValueTuple$2(T1,T2).s_t2Comparer.getHashCode2(this.Item2)); - }, - System$Collections$IStructuralEquatable$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - System$ITupleInternal$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - GetHashCodeCore: function (comparer) { - return System.ValueTuple.CombineHashCodes(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item1), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item2)); - }, - toString: function () { - return "(" + ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ")"; - }, - System$ITupleInternal$ToStringEnd: function () { - return ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ")"; - }, - $clone: function (to) { - var s = to || new (System.ValueTuple$2(T1,T2))(); - s.Item1 = this.Item1; - s.Item2 = this.Item2; - return s; - } - } - }; }); - - H5.define("System.ValueTuple$3", function (T1, T2, T3) { return { - inherits: function () { return [System.IEquatable$1(System.ValueTuple$3(T1,T2,T3)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$3(T1,T2,T3)),System.ITupleInternal]; }, - $kind: "struct", - statics: { - props: { - s_t1Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T1).def; - } - }, - s_t2Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T2).def; - } - }, - s_t3Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T3).def; - } - } - }, - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.Item1 = null; - $.Item2 = null; - $.Item3 = null; - return $;} - } - }, - fields: { - Item1: H5.getDefaultValue(T1), - Item2: H5.getDefaultValue(T2), - Item3: H5.getDefaultValue(T3) - }, - props: { - System$ITupleInternal$Size: { - get: function () { - return 3; - } - } - }, - alias: [ - "equalsT", "System$IEquatable$1$System$ValueTuple$3$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$" + H5.getTypeAlias(T3) + "$equalsT", - "compareTo", ["System$IComparable$1$System$ValueTuple$3$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$" + H5.getTypeAlias(T3) + "$compareTo", "System$IComparable$1$compareTo"] - ], - ctors: { - $ctor1: function (item1, item2, item3) { - this.$initialize(); - this.Item1 = item1; - this.Item2 = item2; - this.Item3 = item3; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - equals: function (obj) { - return H5.is(obj, System.ValueTuple$3(T1,T2,T3)) && this.equalsT(System.Nullable.getValue(H5.cast(H5.unbox(obj, System.ValueTuple$3(T1,T2,T3)), System.ValueTuple$3(T1,T2,T3)))); - }, - equalsT: function (other) { - return System.ValueTuple$3(T1,T2,T3).s_t1Comparer.equals2(this.Item1, other.Item1) && System.ValueTuple$3(T1,T2,T3).s_t2Comparer.equals2(this.Item2, other.Item2) && System.ValueTuple$3(T1,T2,T3).s_t3Comparer.equals2(this.Item3, other.Item3); - }, - System$Collections$IStructuralEquatable$Equals: function (other, comparer) { - if (other == null || !(H5.is(other, System.ValueTuple$3(T1,T2,T3)))) { - return false; - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$3(T1,T2,T3)), System.ValueTuple$3(T1,T2,T3))); - - return comparer.System$Collections$IEqualityComparer$equals(this.Item1, objTuple.Item1) && comparer.System$Collections$IEqualityComparer$equals(this.Item2, objTuple.Item2) && comparer.System$Collections$IEqualityComparer$equals(this.Item3, objTuple.Item3); - }, - System$IComparable$compareTo: function (other) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$3(T1,T2,T3)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - return this.compareTo(System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$3(T1,T2,T3)), System.ValueTuple$3(T1,T2,T3)))); - }, - compareTo: function (other) { - var c = new (System.Collections.Generic.Comparer$1(T1))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1, other.Item1); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T2))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2, other.Item2); - if (c !== 0) { - return c; - } - - return new (System.Collections.Generic.Comparer$1(T3))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item3, other.Item3); - }, - System$Collections$IStructuralComparable$CompareTo: function (other, comparer) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$3(T1,T2,T3)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$3(T1,T2,T3)), System.ValueTuple$3(T1,T2,T3))); - - var c = comparer.System$Collections$IComparer$compare(this.Item1, objTuple.Item1); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item2, objTuple.Item2); - if (c !== 0) { - return c; - } - - return comparer.System$Collections$IComparer$compare(this.Item3, objTuple.Item3); - }, - getHashCode: function () { - return System.ValueTuple.CombineHashCodes$1(System.ValueTuple$3(T1,T2,T3).s_t1Comparer.getHashCode2(this.Item1), System.ValueTuple$3(T1,T2,T3).s_t2Comparer.getHashCode2(this.Item2), System.ValueTuple$3(T1,T2,T3).s_t3Comparer.getHashCode2(this.Item3)); - }, - System$Collections$IStructuralEquatable$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - System$ITupleInternal$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - GetHashCodeCore: function (comparer) { - return System.ValueTuple.CombineHashCodes$1(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item1), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item2), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item3)); - }, - toString: function () { - return "(" + ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ")"; - }, - System$ITupleInternal$ToStringEnd: function () { - return ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ")"; - }, - $clone: function (to) { - var s = to || new (System.ValueTuple$3(T1,T2,T3))(); - s.Item1 = this.Item1; - s.Item2 = this.Item2; - s.Item3 = this.Item3; - return s; - } - } - }; }); - - H5.define("System.ValueTuple$4", function (T1, T2, T3, T4) { return { - inherits: function () { return [System.IEquatable$1(System.ValueTuple$4(T1,T2,T3,T4)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$4(T1,T2,T3,T4)),System.ITupleInternal]; }, - $kind: "struct", - statics: { - props: { - s_t1Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T1).def; - } - }, - s_t2Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T2).def; - } - }, - s_t3Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T3).def; - } - }, - s_t4Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T4).def; - } - } - }, - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.Item1 = null; - $.Item2 = null; - $.Item3 = null; - $.Item4 = null; - return $;} - } - }, - fields: { - Item1: H5.getDefaultValue(T1), - Item2: H5.getDefaultValue(T2), - Item3: H5.getDefaultValue(T3), - Item4: H5.getDefaultValue(T4) - }, - props: { - System$ITupleInternal$Size: { - get: function () { - return 4; - } - } - }, - alias: [ - "equalsT", "System$IEquatable$1$System$ValueTuple$4$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$" + H5.getTypeAlias(T3) + "$" + H5.getTypeAlias(T4) + "$equalsT", - "compareTo", ["System$IComparable$1$System$ValueTuple$4$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$" + H5.getTypeAlias(T3) + "$" + H5.getTypeAlias(T4) + "$compareTo", "System$IComparable$1$compareTo"] - ], - ctors: { - $ctor1: function (item1, item2, item3, item4) { - this.$initialize(); - this.Item1 = item1; - this.Item2 = item2; - this.Item3 = item3; - this.Item4 = item4; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - equals: function (obj) { - return H5.is(obj, System.ValueTuple$4(T1,T2,T3,T4)) && this.equalsT(System.Nullable.getValue(H5.cast(H5.unbox(obj, System.ValueTuple$4(T1,T2,T3,T4)), System.ValueTuple$4(T1,T2,T3,T4)))); - }, - equalsT: function (other) { - return System.ValueTuple$4(T1,T2,T3,T4).s_t1Comparer.equals2(this.Item1, other.Item1) && System.ValueTuple$4(T1,T2,T3,T4).s_t2Comparer.equals2(this.Item2, other.Item2) && System.ValueTuple$4(T1,T2,T3,T4).s_t3Comparer.equals2(this.Item3, other.Item3) && System.ValueTuple$4(T1,T2,T3,T4).s_t4Comparer.equals2(this.Item4, other.Item4); - }, - System$Collections$IStructuralEquatable$Equals: function (other, comparer) { - if (other == null || !(H5.is(other, System.ValueTuple$4(T1,T2,T3,T4)))) { - return false; - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$4(T1,T2,T3,T4)), System.ValueTuple$4(T1,T2,T3,T4))); - - return comparer.System$Collections$IEqualityComparer$equals(this.Item1, objTuple.Item1) && comparer.System$Collections$IEqualityComparer$equals(this.Item2, objTuple.Item2) && comparer.System$Collections$IEqualityComparer$equals(this.Item3, objTuple.Item3) && comparer.System$Collections$IEqualityComparer$equals(this.Item4, objTuple.Item4); - }, - System$IComparable$compareTo: function (other) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$4(T1,T2,T3,T4)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - return this.compareTo(System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$4(T1,T2,T3,T4)), System.ValueTuple$4(T1,T2,T3,T4)))); - }, - compareTo: function (other) { - var c = new (System.Collections.Generic.Comparer$1(T1))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1, other.Item1); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T2))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2, other.Item2); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T3))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item3, other.Item3); - if (c !== 0) { - return c; - } - - return new (System.Collections.Generic.Comparer$1(T4))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item4, other.Item4); - }, - System$Collections$IStructuralComparable$CompareTo: function (other, comparer) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$4(T1,T2,T3,T4)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$4(T1,T2,T3,T4)), System.ValueTuple$4(T1,T2,T3,T4))); - - var c = comparer.System$Collections$IComparer$compare(this.Item1, objTuple.Item1); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item2, objTuple.Item2); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item3, objTuple.Item3); - if (c !== 0) { - return c; - } - - return comparer.System$Collections$IComparer$compare(this.Item4, objTuple.Item4); - }, - getHashCode: function () { - return System.ValueTuple.CombineHashCodes$2(System.ValueTuple$4(T1,T2,T3,T4).s_t1Comparer.getHashCode2(this.Item1), System.ValueTuple$4(T1,T2,T3,T4).s_t2Comparer.getHashCode2(this.Item2), System.ValueTuple$4(T1,T2,T3,T4).s_t3Comparer.getHashCode2(this.Item3), System.ValueTuple$4(T1,T2,T3,T4).s_t4Comparer.getHashCode2(this.Item4)); - }, - System$Collections$IStructuralEquatable$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - System$ITupleInternal$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - GetHashCodeCore: function (comparer) { - return System.ValueTuple.CombineHashCodes$2(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item1), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item2), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item3), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item4)); - }, - toString: function () { - return "(" + ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ", " + ((this.Item4 != null ? H5.toString(this.Item4) : null) || "") + ")"; - }, - System$ITupleInternal$ToStringEnd: function () { - return ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ", " + ((this.Item4 != null ? H5.toString(this.Item4) : null) || "") + ")"; - }, - $clone: function (to) { - var s = to || new (System.ValueTuple$4(T1,T2,T3,T4))(); - s.Item1 = this.Item1; - s.Item2 = this.Item2; - s.Item3 = this.Item3; - s.Item4 = this.Item4; - return s; - } - } - }; }); - - H5.define("System.ValueTuple$5", function (T1, T2, T3, T4, T5) { return { - inherits: function () { return [System.IEquatable$1(System.ValueTuple$5(T1,T2,T3,T4,T5)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$5(T1,T2,T3,T4,T5)),System.ITupleInternal]; }, - $kind: "struct", - statics: { - props: { - s_t1Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T1).def; - } - }, - s_t2Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T2).def; - } - }, - s_t3Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T3).def; - } - }, - s_t4Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T4).def; - } - }, - s_t5Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T5).def; - } - } - }, - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.Item1 = null; - $.Item2 = null; - $.Item3 = null; - $.Item4 = null; - $.Item5 = null; - return $;} - } - }, - fields: { - Item1: H5.getDefaultValue(T1), - Item2: H5.getDefaultValue(T2), - Item3: H5.getDefaultValue(T3), - Item4: H5.getDefaultValue(T4), - Item5: H5.getDefaultValue(T5) - }, - props: { - System$ITupleInternal$Size: { - get: function () { - return 5; - } - } - }, - alias: [ - "equalsT", "System$IEquatable$1$System$ValueTuple$5$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$" + H5.getTypeAlias(T3) + "$" + H5.getTypeAlias(T4) + "$" + H5.getTypeAlias(T5) + "$equalsT", - "compareTo", ["System$IComparable$1$System$ValueTuple$5$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$" + H5.getTypeAlias(T3) + "$" + H5.getTypeAlias(T4) + "$" + H5.getTypeAlias(T5) + "$compareTo", "System$IComparable$1$compareTo"] - ], - ctors: { - $ctor1: function (item1, item2, item3, item4, item5) { - this.$initialize(); - this.Item1 = item1; - this.Item2 = item2; - this.Item3 = item3; - this.Item4 = item4; - this.Item5 = item5; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - equals: function (obj) { - return H5.is(obj, System.ValueTuple$5(T1,T2,T3,T4,T5)) && this.equalsT(System.Nullable.getValue(H5.cast(H5.unbox(obj, System.ValueTuple$5(T1,T2,T3,T4,T5)), System.ValueTuple$5(T1,T2,T3,T4,T5)))); - }, - equalsT: function (other) { - return System.ValueTuple$5(T1,T2,T3,T4,T5).s_t1Comparer.equals2(this.Item1, other.Item1) && System.ValueTuple$5(T1,T2,T3,T4,T5).s_t2Comparer.equals2(this.Item2, other.Item2) && System.ValueTuple$5(T1,T2,T3,T4,T5).s_t3Comparer.equals2(this.Item3, other.Item3) && System.ValueTuple$5(T1,T2,T3,T4,T5).s_t4Comparer.equals2(this.Item4, other.Item4) && System.ValueTuple$5(T1,T2,T3,T4,T5).s_t5Comparer.equals2(this.Item5, other.Item5); - }, - System$Collections$IStructuralEquatable$Equals: function (other, comparer) { - if (other == null || !(H5.is(other, System.ValueTuple$5(T1,T2,T3,T4,T5)))) { - return false; - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$5(T1,T2,T3,T4,T5)), System.ValueTuple$5(T1,T2,T3,T4,T5))); - - return comparer.System$Collections$IEqualityComparer$equals(this.Item1, objTuple.Item1) && comparer.System$Collections$IEqualityComparer$equals(this.Item2, objTuple.Item2) && comparer.System$Collections$IEqualityComparer$equals(this.Item3, objTuple.Item3) && comparer.System$Collections$IEqualityComparer$equals(this.Item4, objTuple.Item4) && comparer.System$Collections$IEqualityComparer$equals(this.Item5, objTuple.Item5); - }, - System$IComparable$compareTo: function (other) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$5(T1,T2,T3,T4,T5)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - return this.compareTo(System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$5(T1,T2,T3,T4,T5)), System.ValueTuple$5(T1,T2,T3,T4,T5)))); - }, - compareTo: function (other) { - var c = new (System.Collections.Generic.Comparer$1(T1))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1, other.Item1); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T2))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2, other.Item2); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T3))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item3, other.Item3); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T4))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item4, other.Item4); - if (c !== 0) { - return c; - } - - return new (System.Collections.Generic.Comparer$1(T5))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item5, other.Item5); - }, - System$Collections$IStructuralComparable$CompareTo: function (other, comparer) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$5(T1,T2,T3,T4,T5)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$5(T1,T2,T3,T4,T5)), System.ValueTuple$5(T1,T2,T3,T4,T5))); - - var c = comparer.System$Collections$IComparer$compare(this.Item1, objTuple.Item1); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item2, objTuple.Item2); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item3, objTuple.Item3); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item4, objTuple.Item4); - if (c !== 0) { - return c; - } - - return comparer.System$Collections$IComparer$compare(this.Item5, objTuple.Item5); - }, - getHashCode: function () { - return System.ValueTuple.CombineHashCodes$3(System.ValueTuple$5(T1,T2,T3,T4,T5).s_t1Comparer.getHashCode2(this.Item1), System.ValueTuple$5(T1,T2,T3,T4,T5).s_t2Comparer.getHashCode2(this.Item2), System.ValueTuple$5(T1,T2,T3,T4,T5).s_t3Comparer.getHashCode2(this.Item3), System.ValueTuple$5(T1,T2,T3,T4,T5).s_t4Comparer.getHashCode2(this.Item4), System.ValueTuple$5(T1,T2,T3,T4,T5).s_t5Comparer.getHashCode2(this.Item5)); - }, - System$Collections$IStructuralEquatable$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - System$ITupleInternal$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - GetHashCodeCore: function (comparer) { - return System.ValueTuple.CombineHashCodes$3(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item1), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item2), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item3), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item4), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item5)); - }, - toString: function () { - return "(" + ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ", " + ((this.Item4 != null ? H5.toString(this.Item4) : null) || "") + ", " + ((this.Item5 != null ? H5.toString(this.Item5) : null) || "") + ")"; - }, - System$ITupleInternal$ToStringEnd: function () { - return ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ", " + ((this.Item4 != null ? H5.toString(this.Item4) : null) || "") + ", " + ((this.Item5 != null ? H5.toString(this.Item5) : null) || "") + ")"; - }, - $clone: function (to) { - var s = to || new (System.ValueTuple$5(T1,T2,T3,T4,T5))(); - s.Item1 = this.Item1; - s.Item2 = this.Item2; - s.Item3 = this.Item3; - s.Item4 = this.Item4; - s.Item5 = this.Item5; - return s; - } - } - }; }); - - H5.define("System.ValueTuple$6", function (T1, T2, T3, T4, T5, T6) { return { - inherits: function () { return [System.IEquatable$1(System.ValueTuple$6(T1,T2,T3,T4,T5,T6)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$6(T1,T2,T3,T4,T5,T6)),System.ITupleInternal]; }, - $kind: "struct", - statics: { - props: { - s_t1Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T1).def; - } - }, - s_t2Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T2).def; - } - }, - s_t3Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T3).def; - } - }, - s_t4Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T4).def; - } - }, - s_t5Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T5).def; - } - }, - s_t6Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T6).def; - } - } - }, - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.Item1 = null; - $.Item2 = null; - $.Item3 = null; - $.Item4 = null; - $.Item5 = null; - $.Item6 = null; - return $;} - } - }, - fields: { - Item1: H5.getDefaultValue(T1), - Item2: H5.getDefaultValue(T2), - Item3: H5.getDefaultValue(T3), - Item4: H5.getDefaultValue(T4), - Item5: H5.getDefaultValue(T5), - Item6: H5.getDefaultValue(T6) - }, - props: { - System$ITupleInternal$Size: { - get: function () { - return 6; - } - } - }, - alias: [ - "equalsT", "System$IEquatable$1$System$ValueTuple$6$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$" + H5.getTypeAlias(T3) + "$" + H5.getTypeAlias(T4) + "$" + H5.getTypeAlias(T5) + "$" + H5.getTypeAlias(T6) + "$equalsT", - "compareTo", ["System$IComparable$1$System$ValueTuple$6$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$" + H5.getTypeAlias(T3) + "$" + H5.getTypeAlias(T4) + "$" + H5.getTypeAlias(T5) + "$" + H5.getTypeAlias(T6) + "$compareTo", "System$IComparable$1$compareTo"] - ], - ctors: { - $ctor1: function (item1, item2, item3, item4, item5, item6) { - this.$initialize(); - this.Item1 = item1; - this.Item2 = item2; - this.Item3 = item3; - this.Item4 = item4; - this.Item5 = item5; - this.Item6 = item6; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - equals: function (obj) { - return H5.is(obj, System.ValueTuple$6(T1,T2,T3,T4,T5,T6)) && this.equalsT(System.Nullable.getValue(H5.cast(H5.unbox(obj, System.ValueTuple$6(T1,T2,T3,T4,T5,T6)), System.ValueTuple$6(T1,T2,T3,T4,T5,T6)))); - }, - equalsT: function (other) { - return System.ValueTuple$6(T1,T2,T3,T4,T5,T6).s_t1Comparer.equals2(this.Item1, other.Item1) && System.ValueTuple$6(T1,T2,T3,T4,T5,T6).s_t2Comparer.equals2(this.Item2, other.Item2) && System.ValueTuple$6(T1,T2,T3,T4,T5,T6).s_t3Comparer.equals2(this.Item3, other.Item3) && System.ValueTuple$6(T1,T2,T3,T4,T5,T6).s_t4Comparer.equals2(this.Item4, other.Item4) && System.ValueTuple$6(T1,T2,T3,T4,T5,T6).s_t5Comparer.equals2(this.Item5, other.Item5) && System.ValueTuple$6(T1,T2,T3,T4,T5,T6).s_t6Comparer.equals2(this.Item6, other.Item6); - }, - System$Collections$IStructuralEquatable$Equals: function (other, comparer) { - if (other == null || !(H5.is(other, System.ValueTuple$6(T1,T2,T3,T4,T5,T6)))) { - return false; - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$6(T1,T2,T3,T4,T5,T6)), System.ValueTuple$6(T1,T2,T3,T4,T5,T6))); - - return comparer.System$Collections$IEqualityComparer$equals(this.Item1, objTuple.Item1) && comparer.System$Collections$IEqualityComparer$equals(this.Item2, objTuple.Item2) && comparer.System$Collections$IEqualityComparer$equals(this.Item3, objTuple.Item3) && comparer.System$Collections$IEqualityComparer$equals(this.Item4, objTuple.Item4) && comparer.System$Collections$IEqualityComparer$equals(this.Item5, objTuple.Item5) && comparer.System$Collections$IEqualityComparer$equals(this.Item6, objTuple.Item6); - }, - System$IComparable$compareTo: function (other) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$6(T1,T2,T3,T4,T5,T6)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - return this.compareTo(System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$6(T1,T2,T3,T4,T5,T6)), System.ValueTuple$6(T1,T2,T3,T4,T5,T6)))); - }, - compareTo: function (other) { - var c = new (System.Collections.Generic.Comparer$1(T1))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1, other.Item1); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T2))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2, other.Item2); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T3))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item3, other.Item3); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T4))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item4, other.Item4); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T5))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item5, other.Item5); - if (c !== 0) { - return c; - } - - return new (System.Collections.Generic.Comparer$1(T6))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item6, other.Item6); - }, - System$Collections$IStructuralComparable$CompareTo: function (other, comparer) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$6(T1,T2,T3,T4,T5,T6)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$6(T1,T2,T3,T4,T5,T6)), System.ValueTuple$6(T1,T2,T3,T4,T5,T6))); - - var c = comparer.System$Collections$IComparer$compare(this.Item1, objTuple.Item1); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item2, objTuple.Item2); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item3, objTuple.Item3); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item4, objTuple.Item4); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item5, objTuple.Item5); - if (c !== 0) { - return c; - } - - return comparer.System$Collections$IComparer$compare(this.Item6, objTuple.Item6); - }, - getHashCode: function () { - return System.ValueTuple.CombineHashCodes$4(System.ValueTuple$6(T1,T2,T3,T4,T5,T6).s_t1Comparer.getHashCode2(this.Item1), System.ValueTuple$6(T1,T2,T3,T4,T5,T6).s_t2Comparer.getHashCode2(this.Item2), System.ValueTuple$6(T1,T2,T3,T4,T5,T6).s_t3Comparer.getHashCode2(this.Item3), System.ValueTuple$6(T1,T2,T3,T4,T5,T6).s_t4Comparer.getHashCode2(this.Item4), System.ValueTuple$6(T1,T2,T3,T4,T5,T6).s_t5Comparer.getHashCode2(this.Item5), System.ValueTuple$6(T1,T2,T3,T4,T5,T6).s_t6Comparer.getHashCode2(this.Item6)); - }, - System$Collections$IStructuralEquatable$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - System$ITupleInternal$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - GetHashCodeCore: function (comparer) { - return System.ValueTuple.CombineHashCodes$4(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item1), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item2), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item3), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item4), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item5), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item6)); - }, - toString: function () { - return "(" + ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ", " + ((this.Item4 != null ? H5.toString(this.Item4) : null) || "") + ", " + ((this.Item5 != null ? H5.toString(this.Item5) : null) || "") + ", " + ((this.Item6 != null ? H5.toString(this.Item6) : null) || "") + ")"; - }, - System$ITupleInternal$ToStringEnd: function () { - return ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ", " + ((this.Item4 != null ? H5.toString(this.Item4) : null) || "") + ", " + ((this.Item5 != null ? H5.toString(this.Item5) : null) || "") + ", " + ((this.Item6 != null ? H5.toString(this.Item6) : null) || "") + ")"; - }, - $clone: function (to) { - var s = to || new (System.ValueTuple$6(T1,T2,T3,T4,T5,T6))(); - s.Item1 = this.Item1; - s.Item2 = this.Item2; - s.Item3 = this.Item3; - s.Item4 = this.Item4; - s.Item5 = this.Item5; - s.Item6 = this.Item6; - return s; - } - } - }; }); - - H5.define("System.ValueTuple$7", function (T1, T2, T3, T4, T5, T6, T7) { return { - inherits: function () { return [System.IEquatable$1(System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)),System.ITupleInternal]; }, - $kind: "struct", - statics: { - props: { - s_t1Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T1).def; - } - }, - s_t2Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T2).def; - } - }, - s_t3Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T3).def; - } - }, - s_t4Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T4).def; - } - }, - s_t5Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T5).def; - } - }, - s_t6Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T6).def; - } - }, - s_t7Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T7).def; - } - } - }, - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.Item1 = null; - $.Item2 = null; - $.Item3 = null; - $.Item4 = null; - $.Item5 = null; - $.Item6 = null; - $.Item7 = null; - return $;} - } - }, - fields: { - Item1: H5.getDefaultValue(T1), - Item2: H5.getDefaultValue(T2), - Item3: H5.getDefaultValue(T3), - Item4: H5.getDefaultValue(T4), - Item5: H5.getDefaultValue(T5), - Item6: H5.getDefaultValue(T6), - Item7: H5.getDefaultValue(T7) - }, - props: { - System$ITupleInternal$Size: { - get: function () { - return 7; - } - } - }, - alias: [ - "equalsT", "System$IEquatable$1$System$ValueTuple$7$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$" + H5.getTypeAlias(T3) + "$" + H5.getTypeAlias(T4) + "$" + H5.getTypeAlias(T5) + "$" + H5.getTypeAlias(T6) + "$" + H5.getTypeAlias(T7) + "$equalsT", - "compareTo", ["System$IComparable$1$System$ValueTuple$7$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$" + H5.getTypeAlias(T3) + "$" + H5.getTypeAlias(T4) + "$" + H5.getTypeAlias(T5) + "$" + H5.getTypeAlias(T6) + "$" + H5.getTypeAlias(T7) + "$compareTo", "System$IComparable$1$compareTo"] - ], - ctors: { - $ctor1: function (item1, item2, item3, item4, item5, item6, item7) { - this.$initialize(); - this.Item1 = item1; - this.Item2 = item2; - this.Item3 = item3; - this.Item4 = item4; - this.Item5 = item5; - this.Item6 = item6; - this.Item7 = item7; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - equals: function (obj) { - return H5.is(obj, System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)) && this.equalsT(System.Nullable.getValue(H5.cast(H5.unbox(obj, System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)), System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)))); - }, - equalsT: function (other) { - return System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t1Comparer.equals2(this.Item1, other.Item1) && System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t2Comparer.equals2(this.Item2, other.Item2) && System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t3Comparer.equals2(this.Item3, other.Item3) && System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t4Comparer.equals2(this.Item4, other.Item4) && System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t5Comparer.equals2(this.Item5, other.Item5) && System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t6Comparer.equals2(this.Item6, other.Item6) && System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t7Comparer.equals2(this.Item7, other.Item7); - }, - System$Collections$IStructuralEquatable$Equals: function (other, comparer) { - if (other == null || !(H5.is(other, System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)))) { - return false; - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)), System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7))); - - return comparer.System$Collections$IEqualityComparer$equals(this.Item1, objTuple.Item1) && comparer.System$Collections$IEqualityComparer$equals(this.Item2, objTuple.Item2) && comparer.System$Collections$IEqualityComparer$equals(this.Item3, objTuple.Item3) && comparer.System$Collections$IEqualityComparer$equals(this.Item4, objTuple.Item4) && comparer.System$Collections$IEqualityComparer$equals(this.Item5, objTuple.Item5) && comparer.System$Collections$IEqualityComparer$equals(this.Item6, objTuple.Item6) && comparer.System$Collections$IEqualityComparer$equals(this.Item7, objTuple.Item7); - }, - System$IComparable$compareTo: function (other) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - return this.compareTo(System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)), System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)))); - }, - compareTo: function (other) { - var c = new (System.Collections.Generic.Comparer$1(T1))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1, other.Item1); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T2))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2, other.Item2); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T3))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item3, other.Item3); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T4))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item4, other.Item4); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T5))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item5, other.Item5); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T6))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item6, other.Item6); - if (c !== 0) { - return c; - } - - return new (System.Collections.Generic.Comparer$1(T7))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item7, other.Item7); - }, - System$Collections$IStructuralComparable$CompareTo: function (other, comparer) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)), System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7))); - - var c = comparer.System$Collections$IComparer$compare(this.Item1, objTuple.Item1); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item2, objTuple.Item2); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item3, objTuple.Item3); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item4, objTuple.Item4); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item5, objTuple.Item5); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item6, objTuple.Item6); - if (c !== 0) { - return c; - } - - return comparer.System$Collections$IComparer$compare(this.Item7, objTuple.Item7); - }, - getHashCode: function () { - return System.ValueTuple.CombineHashCodes$5(System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t1Comparer.getHashCode2(this.Item1), System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t2Comparer.getHashCode2(this.Item2), System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t3Comparer.getHashCode2(this.Item3), System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t4Comparer.getHashCode2(this.Item4), System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t5Comparer.getHashCode2(this.Item5), System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t6Comparer.getHashCode2(this.Item6), System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7).s_t7Comparer.getHashCode2(this.Item7)); - }, - System$Collections$IStructuralEquatable$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - System$ITupleInternal$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - GetHashCodeCore: function (comparer) { - return System.ValueTuple.CombineHashCodes$5(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item1), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item2), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item3), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item4), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item5), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item6), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item7)); - }, - toString: function () { - return "(" + ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ", " + ((this.Item4 != null ? H5.toString(this.Item4) : null) || "") + ", " + ((this.Item5 != null ? H5.toString(this.Item5) : null) || "") + ", " + ((this.Item6 != null ? H5.toString(this.Item6) : null) || "") + ", " + ((this.Item7 != null ? H5.toString(this.Item7) : null) || "") + ")"; - }, - System$ITupleInternal$ToStringEnd: function () { - return ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ", " + ((this.Item4 != null ? H5.toString(this.Item4) : null) || "") + ", " + ((this.Item5 != null ? H5.toString(this.Item5) : null) || "") + ", " + ((this.Item6 != null ? H5.toString(this.Item6) : null) || "") + ", " + ((this.Item7 != null ? H5.toString(this.Item7) : null) || "") + ")"; - }, - $clone: function (to) { - var s = to || new (System.ValueTuple$7(T1,T2,T3,T4,T5,T6,T7))(); - s.Item1 = this.Item1; - s.Item2 = this.Item2; - s.Item3 = this.Item3; - s.Item4 = this.Item4; - s.Item5 = this.Item5; - s.Item6 = this.Item6; - s.Item7 = this.Item7; - return s; - } - } - }; }); - - H5.define("System.ValueTuple$8", function (T1, T2, T3, T4, T5, T6, T7, TRest) { return { - inherits: function () { return [System.IEquatable$1(System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)),System.Collections.IStructuralEquatable,System.Collections.IStructuralComparable,System.IComparable,System.IComparable$1(System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)),System.ITupleInternal]; }, - $kind: "struct", - statics: { - props: { - s_t1Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T1).def; - } - }, - s_t2Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T2).def; - } - }, - s_t3Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T3).def; - } - }, - s_t4Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T4).def; - } - }, - s_t5Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T5).def; - } - }, - s_t6Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T6).def; - } - }, - s_t7Comparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(T7).def; - } - }, - s_tRestComparer: { - get: function () { - return System.Collections.Generic.EqualityComparer$1(TRest).def; - } - } - }, - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.Item1 = null; - $.Item2 = null; - $.Item3 = null; - $.Item4 = null; - $.Item5 = null; - $.Item6 = null; - $.Item7 = null; - $.Rest = null; - return $;} - } - }, - fields: { - Item1: H5.getDefaultValue(T1), - Item2: H5.getDefaultValue(T2), - Item3: H5.getDefaultValue(T3), - Item4: H5.getDefaultValue(T4), - Item5: H5.getDefaultValue(T5), - Item6: H5.getDefaultValue(T6), - Item7: H5.getDefaultValue(T7), - Rest: H5.getDefaultValue(TRest) - }, - props: { - System$ITupleInternal$Size: { - get: function () { - var rest = H5.as(this.Rest, System.ITupleInternal); - return rest == null ? 8 : ((7 + rest.System$ITupleInternal$Size) | 0); - } - } - }, - alias: [ - "equalsT", "System$IEquatable$1$System$ValueTuple$8$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$" + H5.getTypeAlias(T3) + "$" + H5.getTypeAlias(T4) + "$" + H5.getTypeAlias(T5) + "$" + H5.getTypeAlias(T6) + "$" + H5.getTypeAlias(T7) + "$" + H5.getTypeAlias(TRest) + "$equalsT", - "compareTo", ["System$IComparable$1$System$ValueTuple$8$" + H5.getTypeAlias(T1) + "$" + H5.getTypeAlias(T2) + "$" + H5.getTypeAlias(T3) + "$" + H5.getTypeAlias(T4) + "$" + H5.getTypeAlias(T5) + "$" + H5.getTypeAlias(T6) + "$" + H5.getTypeAlias(T7) + "$" + H5.getTypeAlias(TRest) + "$compareTo", "System$IComparable$1$compareTo"] - ], - ctors: { - $ctor1: function (item1, item2, item3, item4, item5, item6, item7, rest) { - this.$initialize(); - if (!(H5.is(rest, System.ITupleInternal))) { - throw new System.ArgumentException.$ctor1(System.SR.ArgumentException_ValueTupleLastArgumentNotAValueTuple); - } - - this.Item1 = item1; - this.Item2 = item2; - this.Item3 = item3; - this.Item4 = item4; - this.Item5 = item5; - this.Item6 = item6; - this.Item7 = item7; - this.Rest = rest; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - equals: function (obj) { - return H5.is(obj, System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)) && this.equalsT(System.Nullable.getValue(H5.cast(H5.unbox(obj, System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)))); - }, - equalsT: function (other) { - return System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t1Comparer.equals2(this.Item1, other.Item1) && System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t2Comparer.equals2(this.Item2, other.Item2) && System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t3Comparer.equals2(this.Item3, other.Item3) && System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t4Comparer.equals2(this.Item4, other.Item4) && System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t5Comparer.equals2(this.Item5, other.Item5) && System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t6Comparer.equals2(this.Item6, other.Item6) && System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t7Comparer.equals2(this.Item7, other.Item7) && System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_tRestComparer.equals2(this.Rest, other.Rest); - }, - System$Collections$IStructuralEquatable$Equals: function (other, comparer) { - if (other == null || !(H5.is(other, System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)))) { - return false; - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest))); - - return comparer.System$Collections$IEqualityComparer$equals(this.Item1, objTuple.Item1) && comparer.System$Collections$IEqualityComparer$equals(this.Item2, objTuple.Item2) && comparer.System$Collections$IEqualityComparer$equals(this.Item3, objTuple.Item3) && comparer.System$Collections$IEqualityComparer$equals(this.Item4, objTuple.Item4) && comparer.System$Collections$IEqualityComparer$equals(this.Item5, objTuple.Item5) && comparer.System$Collections$IEqualityComparer$equals(this.Item6, objTuple.Item6) && comparer.System$Collections$IEqualityComparer$equals(this.Item7, objTuple.Item7) && comparer.System$Collections$IEqualityComparer$equals(this.Rest, objTuple.Rest); - }, - System$IComparable$compareTo: function (other) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - return this.compareTo(System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)))); - }, - compareTo: function (other) { - var c = new (System.Collections.Generic.Comparer$1(T1))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item1, other.Item1); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T2))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item2, other.Item2); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T3))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item3, other.Item3); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T4))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item4, other.Item4); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T5))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item5, other.Item5); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T6))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item6, other.Item6); - if (c !== 0) { - return c; - } - - c = new (System.Collections.Generic.Comparer$1(T7))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Item7, other.Item7); - if (c !== 0) { - return c; - } - - return new (System.Collections.Generic.Comparer$1(TRest))(System.Collections.Generic.Comparer$1.$default.fn).compare(this.Rest, other.Rest); - }, - System$Collections$IStructuralComparable$CompareTo: function (other, comparer) { - if (other == null) { - return 1; - } - - if (!(H5.is(other, System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)))) { - throw new System.ArgumentException.$ctor3(System.SR.ArgumentException_ValueTupleIncorrectType, "other"); - } - - var objTuple = System.Nullable.getValue(H5.cast(H5.unbox(other, System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest))); - - var c = comparer.System$Collections$IComparer$compare(this.Item1, objTuple.Item1); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item2, objTuple.Item2); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item3, objTuple.Item3); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item4, objTuple.Item4); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item5, objTuple.Item5); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item6, objTuple.Item6); - if (c !== 0) { - return c; - } - - c = comparer.System$Collections$IComparer$compare(this.Item7, objTuple.Item7); - if (c !== 0) { - return c; - } - - return comparer.System$Collections$IComparer$compare(this.Rest, objTuple.Rest); - }, - getHashCode: function () { - var rest = H5.as(this.Rest, System.ITupleInternal); - if (rest == null) { - return System.ValueTuple.CombineHashCodes$5(System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t1Comparer.getHashCode2(this.Item1), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t2Comparer.getHashCode2(this.Item2), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t3Comparer.getHashCode2(this.Item3), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t4Comparer.getHashCode2(this.Item4), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t5Comparer.getHashCode2(this.Item5), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t6Comparer.getHashCode2(this.Item6), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t7Comparer.getHashCode2(this.Item7)); - } - - var size = rest.System$ITupleInternal$Size; - if (size >= 8) { - return H5.getHashCode(rest); - } - - var k = (8 - size) | 0; - switch (k) { - case 1: - return System.ValueTuple.CombineHashCodes(System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t7Comparer.getHashCode2(this.Item7), H5.getHashCode(rest)); - case 2: - return System.ValueTuple.CombineHashCodes$1(System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t6Comparer.getHashCode2(this.Item6), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t7Comparer.getHashCode2(this.Item7), H5.getHashCode(rest)); - case 3: - return System.ValueTuple.CombineHashCodes$2(System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t5Comparer.getHashCode2(this.Item5), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t6Comparer.getHashCode2(this.Item6), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t7Comparer.getHashCode2(this.Item7), H5.getHashCode(rest)); - case 4: - return System.ValueTuple.CombineHashCodes$3(System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t4Comparer.getHashCode2(this.Item4), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t5Comparer.getHashCode2(this.Item5), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t6Comparer.getHashCode2(this.Item6), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t7Comparer.getHashCode2(this.Item7), H5.getHashCode(rest)); - case 5: - return System.ValueTuple.CombineHashCodes$4(System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t3Comparer.getHashCode2(this.Item3), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t4Comparer.getHashCode2(this.Item4), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t5Comparer.getHashCode2(this.Item5), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t6Comparer.getHashCode2(this.Item6), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t7Comparer.getHashCode2(this.Item7), H5.getHashCode(rest)); - case 6: - return System.ValueTuple.CombineHashCodes$5(System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t2Comparer.getHashCode2(this.Item2), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t3Comparer.getHashCode2(this.Item3), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t4Comparer.getHashCode2(this.Item4), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t5Comparer.getHashCode2(this.Item5), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t6Comparer.getHashCode2(this.Item6), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t7Comparer.getHashCode2(this.Item7), H5.getHashCode(rest)); - case 7: - case 8: - return System.ValueTuple.CombineHashCodes$6(System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t1Comparer.getHashCode2(this.Item1), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t2Comparer.getHashCode2(this.Item2), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t3Comparer.getHashCode2(this.Item3), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t4Comparer.getHashCode2(this.Item4), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t5Comparer.getHashCode2(this.Item5), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t6Comparer.getHashCode2(this.Item6), System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest).s_t7Comparer.getHashCode2(this.Item7), H5.getHashCode(rest)); - } - - return -1; - }, - System$Collections$IStructuralEquatable$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - System$ITupleInternal$GetHashCode: function (comparer) { - return this.GetHashCodeCore(comparer); - }, - GetHashCodeCore: function (comparer) { - var rest = H5.as(this.Rest, System.ITupleInternal); - if (rest == null) { - return System.ValueTuple.CombineHashCodes$5(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item1), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item2), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item3), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item4), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item5), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item6), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item7)); - } - - var size = rest.System$ITupleInternal$Size; - if (size >= 8) { - return rest.System$ITupleInternal$GetHashCode(comparer); - } - - var k = (8 - size) | 0; - switch (k) { - case 1: - return System.ValueTuple.CombineHashCodes(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item7), rest.System$ITupleInternal$GetHashCode(comparer)); - case 2: - return System.ValueTuple.CombineHashCodes$1(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item6), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item7), rest.System$ITupleInternal$GetHashCode(comparer)); - case 3: - return System.ValueTuple.CombineHashCodes$2(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item5), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item6), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item7), rest.System$ITupleInternal$GetHashCode(comparer)); - case 4: - return System.ValueTuple.CombineHashCodes$3(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item4), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item5), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item6), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item7), rest.System$ITupleInternal$GetHashCode(comparer)); - case 5: - return System.ValueTuple.CombineHashCodes$4(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item3), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item4), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item5), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item6), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item7), rest.System$ITupleInternal$GetHashCode(comparer)); - case 6: - return System.ValueTuple.CombineHashCodes$5(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item2), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item3), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item4), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item5), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item6), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item7), rest.System$ITupleInternal$GetHashCode(comparer)); - case 7: - case 8: - return System.ValueTuple.CombineHashCodes$6(comparer.System$Collections$IEqualityComparer$getHashCode(this.Item1), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item2), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item3), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item4), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item5), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item6), comparer.System$Collections$IEqualityComparer$getHashCode(this.Item7), rest.System$ITupleInternal$GetHashCode(comparer)); - } - - return -1; - }, - toString: function () { - var rest = H5.as(this.Rest, System.ITupleInternal); - if (rest == null) { - return "(" + ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ", " + ((this.Item4 != null ? H5.toString(this.Item4) : null) || "") + ", " + ((this.Item5 != null ? H5.toString(this.Item5) : null) || "") + ", " + ((this.Item6 != null ? H5.toString(this.Item6) : null) || "") + ", " + ((this.Item7 != null ? H5.toString(this.Item7) : null) || "") + ", " + (H5.toString(this.Rest) || "") + ")"; - } else { - return "(" + ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ", " + ((this.Item4 != null ? H5.toString(this.Item4) : null) || "") + ", " + ((this.Item5 != null ? H5.toString(this.Item5) : null) || "") + ", " + ((this.Item6 != null ? H5.toString(this.Item6) : null) || "") + ", " + ((this.Item7 != null ? H5.toString(this.Item7) : null) || "") + ", " + (rest.System$ITupleInternal$ToStringEnd() || ""); - } - }, - System$ITupleInternal$ToStringEnd: function () { - var rest = H5.as(this.Rest, System.ITupleInternal); - if (rest == null) { - return ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ", " + ((this.Item4 != null ? H5.toString(this.Item4) : null) || "") + ", " + ((this.Item5 != null ? H5.toString(this.Item5) : null) || "") + ", " + ((this.Item6 != null ? H5.toString(this.Item6) : null) || "") + ", " + ((this.Item7 != null ? H5.toString(this.Item7) : null) || "") + ", " + (H5.toString(this.Rest) || "") + ")"; - } else { - return ((this.Item1 != null ? H5.toString(this.Item1) : null) || "") + ", " + ((this.Item2 != null ? H5.toString(this.Item2) : null) || "") + ", " + ((this.Item3 != null ? H5.toString(this.Item3) : null) || "") + ", " + ((this.Item4 != null ? H5.toString(this.Item4) : null) || "") + ", " + ((this.Item5 != null ? H5.toString(this.Item5) : null) || "") + ", " + ((this.Item6 != null ? H5.toString(this.Item6) : null) || "") + ", " + ((this.Item7 != null ? H5.toString(this.Item7) : null) || "") + ", " + (rest.System$ITupleInternal$ToStringEnd() || ""); - } - }, - $clone: function (to) { - var s = to || new (System.ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest))(); - s.Item1 = this.Item1; - s.Item2 = this.Item2; - s.Item3 = this.Item3; - s.Item4 = this.Item4; - s.Item5 = this.Item5; - s.Item6 = this.Item6; - s.Item7 = this.Item7; - s.Rest = this.Rest; - return s; - } - } - }; }); - - // @source IndexOutOfRangeException.js - - H5.define("System.IndexOutOfRangeException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Index was outside the bounds of the array."); - this.HResult = -2146233080; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233080; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2146233080; - } - } - }); - - // @source InvalidCastException.js - - H5.define("System.InvalidCastException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Specified cast is not valid."); - this.HResult = -2147467262; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2147467262; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2147467262; - }, - $ctor3: function (message, errorCode) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = errorCode; - } - } - }); - - // @source InvalidOperationException.js - - H5.define("System.InvalidOperationException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Operation is not valid due to the current state of the object."); - this.HResult = -2146233079; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233079; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2146233079; - } - } - }); - - // @source ObjectDisposedException.js - - H5.define("System.ObjectDisposedException", { - inherits: [System.InvalidOperationException], - fields: { - _objectName: null - }, - props: { - Message: { - get: function () { - var name = this.ObjectName; - if (name == null || name.length === 0) { - return H5.ensureBaseProperty(this, "Message").$System$Exception$Message; - } - - var objectDisposed = System.SR.Format("Object name: '{0}'.", name); - return (H5.ensureBaseProperty(this, "Message").$System$Exception$Message || "") + ("\n" || "") + (objectDisposed || ""); - } - }, - ObjectName: { - get: function () { - if (this._objectName == null) { - return ""; - } - return this._objectName; - } - } - }, - ctors: { - ctor: function () { - System.ObjectDisposedException.$ctor3.call(this, null, "Cannot access a disposed object."); - }, - $ctor1: function (objectName) { - System.ObjectDisposedException.$ctor3.call(this, objectName, "Cannot access a disposed object."); - }, - $ctor3: function (objectName, message) { - this.$initialize(); - System.InvalidOperationException.$ctor1.call(this, message); - this.HResult = -2146232798; - this._objectName = objectName; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.InvalidOperationException.$ctor2.call(this, message, innerException); - this.HResult = -2146232798; - } - } - }); - - // @source InvalidProgramException.js - - H5.define("System.InvalidProgramException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Common Language Runtime detected an invalid program."); - this.HResult = -2146233030; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233030; - }, - $ctor2: function (message, inner) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, inner); - this.HResult = -2146233030; - } - } - }); - - // @source MissingMethodException.js - - H5.define("System.MissingMethodException", { - inherits: [System.Exception], - ctors: { - ctor: function () { - this.$initialize(); - System.Exception.ctor.call(this, "Attempted to access a missing method."); - }, - $ctor1: function (message) { - this.$initialize(); - System.Exception.ctor.call(this, message); - }, - $ctor2: function (message, inner) { - this.$initialize(); - System.Exception.ctor.call(this, message, inner); - }, - $ctor3: function (className, methodName) { - this.$initialize(); - System.Exception.ctor.call(this, (className || "") + "." + (methodName || "") + " Due to: Attempted to access a missing member."); - } - } - }); - - // @source Calendar.js - - H5.define("System.Globalization.Calendar", { - inherits: [System.ICloneable], - statics: { - fields: { - TicksPerMillisecond: System.Int64(0), - TicksPerSecond: System.Int64(0), - TicksPerMinute: System.Int64(0), - TicksPerHour: System.Int64(0), - TicksPerDay: System.Int64(0), - MillisPerSecond: 0, - MillisPerMinute: 0, - MillisPerHour: 0, - MillisPerDay: 0, - DaysPerYear: 0, - DaysPer4Years: 0, - DaysPer100Years: 0, - DaysPer400Years: 0, - DaysTo10000: 0, - MaxMillis: System.Int64(0), - CurrentEra: 0 - }, - ctors: { - init: function () { - this.TicksPerMillisecond = System.Int64(10000); - this.TicksPerSecond = System.Int64(10000000); - this.TicksPerMinute = System.Int64(600000000); - this.TicksPerHour = System.Int64([1640261632,8]); - this.TicksPerDay = System.Int64([711573504,201]); - this.MillisPerSecond = 1000; - this.MillisPerMinute = 60000; - this.MillisPerHour = 3600000; - this.MillisPerDay = 86400000; - this.DaysPerYear = 365; - this.DaysPer4Years = 1461; - this.DaysPer100Years = 36524; - this.DaysPer400Years = 146097; - this.DaysTo10000 = 3652059; - this.MaxMillis = System.Int64([-464735232,73466]); - this.CurrentEra = 0; - } - }, - methods: { - ReadOnly: function (calendar) { - if (calendar == null) { - throw new System.ArgumentNullException.$ctor1("calendar"); - } - if (calendar.IsReadOnly) { - return (calendar); - } - - var clonedCalendar = H5.cast((H5.clone(calendar)), System.Globalization.Calendar); - clonedCalendar.SetReadOnlyState(true); - - return (clonedCalendar); - }, - CheckAddResult: function (ticks, minValue, maxValue) { - if (ticks.lt(System.DateTime.getTicks(minValue)) || ticks.gt(System.DateTime.getTicks(maxValue))) { - throw new System.ArgumentException.$ctor1(System.String.formatProvider(System.Globalization.CultureInfo.invariantCulture, System.SR.Format$1("The result is out of the supported range for this calendar. The result should be between {0} (Gregorian date) and {1} (Gregorian date), inclusive.", H5.box(minValue, System.DateTime, System.DateTime.format), H5.box(maxValue, System.DateTime, System.DateTime.format)), null)); - } - }, - GetSystemTwoDigitYearSetting: function (CalID, defaultYearValue) { - var twoDigitYearMax = 2029; - if (twoDigitYearMax < 0) { - twoDigitYearMax = defaultYearValue; - } - return (twoDigitYearMax); - } - } - }, - fields: { - _isReadOnly: false, - twoDigitYearMax: 0 - }, - props: { - MinSupportedDateTime: { - get: function () { - return (System.DateTime.getMinValue()); - } - }, - MaxSupportedDateTime: { - get: function () { - return (System.DateTime.getMaxValue()); - } - }, - AlgorithmType: { - get: function () { - return 0; - } - }, - ID: { - get: function () { - return 0; - } - }, - BaseCalendarID: { - get: function () { - return this.ID; - } - }, - IsReadOnly: { - get: function () { - return (this._isReadOnly); - } - }, - CurrentEraValue: { - get: function () { - throw System.NotImplemented.ByDesign; - } - }, - DaysInYearBeforeMinSupportedYear: { - get: function () { - return 365; - } - }, - TwoDigitYearMax: { - get: function () { - return (this.twoDigitYearMax); - }, - set: function (value) { - this.VerifyWritable(); - this.twoDigitYearMax = value; - } - } - }, - alias: ["clone", "System$ICloneable$clone"], - ctors: { - init: function () { - this._isReadOnly = false; - this.twoDigitYearMax = -1; - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - clone: function () { - var o = H5.clone(this); - H5.cast(o, System.Globalization.Calendar).SetReadOnlyState(false); - return (o); - }, - VerifyWritable: function () { - if (this._isReadOnly) { - throw new System.InvalidOperationException.$ctor1("Instance is read-only."); - } - }, - SetReadOnlyState: function (readOnly) { - this._isReadOnly = readOnly; - }, - Add: function (time, value, scale) { - var tempMillis = (value * scale + (value >= 0 ? 0.5 : -0.5)); - if (!((tempMillis > -315537897600000.0) && (tempMillis < 315537897600000.0))) { - throw new System.ArgumentOutOfRangeException.$ctor4("value", "Value to add was out of range."); - } - - var millis = H5.Int.clip64(tempMillis); - var ticks = System.DateTime.getTicks(time).add(millis.mul(System.Globalization.Calendar.TicksPerMillisecond)); - System.Globalization.Calendar.CheckAddResult(ticks, this.MinSupportedDateTime, this.MaxSupportedDateTime); - return (System.DateTime.create$2(ticks)); - }, - AddMilliseconds: function (time, milliseconds) { - return (this.Add(time, milliseconds, 1)); - }, - AddDays: function (time, days) { - return (this.Add(time, days, System.Globalization.Calendar.MillisPerDay)); - }, - AddHours: function (time, hours) { - return (this.Add(time, hours, System.Globalization.Calendar.MillisPerHour)); - }, - AddMinutes: function (time, minutes) { - return (this.Add(time, minutes, System.Globalization.Calendar.MillisPerMinute)); - }, - AddSeconds: function (time, seconds) { - return this.Add(time, seconds, System.Globalization.Calendar.MillisPerSecond); - }, - AddWeeks: function (time, weeks) { - return (this.AddDays(time, H5.Int.mul(weeks, 7))); - }, - GetDaysInMonth: function (year, month) { - return (this.GetDaysInMonth$1(year, month, System.Globalization.Calendar.CurrentEra)); - }, - GetDaysInYear: function (year) { - return (this.GetDaysInYear$1(year, System.Globalization.Calendar.CurrentEra)); - }, - GetHour: function (time) { - return (System.Int64.clip32((System.DateTime.getTicks(time).div(System.Globalization.Calendar.TicksPerHour)).mod(System.Int64(24)))); - }, - GetMilliseconds: function (time) { - return System.Int64.toNumber((System.DateTime.getTicks(time).div(System.Globalization.Calendar.TicksPerMillisecond)).mod(System.Int64(1000))); - }, - GetMinute: function (time) { - return (System.Int64.clip32((System.DateTime.getTicks(time).div(System.Globalization.Calendar.TicksPerMinute)).mod(System.Int64(60)))); - }, - GetMonthsInYear: function (year) { - return (this.GetMonthsInYear$1(year, System.Globalization.Calendar.CurrentEra)); - }, - GetSecond: function (time) { - return (System.Int64.clip32((System.DateTime.getTicks(time).div(System.Globalization.Calendar.TicksPerSecond)).mod(System.Int64(60)))); - }, - GetFirstDayWeekOfYear: function (time, firstDayOfWeek) { - var dayOfYear = (this.GetDayOfYear(time) - 1) | 0; - var dayForJan1 = (this.GetDayOfWeek(time) - (dayOfYear % 7)) | 0; - var offset = (((((dayForJan1 - firstDayOfWeek) | 0) + 14) | 0)) % 7; - return (((((H5.Int.div((((dayOfYear + offset) | 0)), 7)) | 0) + 1) | 0)); - }, - GetWeekOfYearFullDays: function (time, firstDayOfWeek, fullDays) { - var dayForJan1; - var offset; - var day; - - var dayOfYear = (this.GetDayOfYear(time) - 1) | 0; - - - - dayForJan1 = (this.GetDayOfWeek(time) - (dayOfYear % 7)) | 0; - - offset = (((((firstDayOfWeek - dayForJan1) | 0) + 14) | 0)) % 7; - if (offset !== 0 && offset >= fullDays) { - offset = (offset - 7) | 0; - } - day = (dayOfYear - offset) | 0; - if (day >= 0) { - return (((((H5.Int.div(day, 7)) | 0) + 1) | 0)); - } - if (System.DateTime.lte(time, System.DateTime.addDays(this.MinSupportedDateTime, dayOfYear))) { - return this.GetWeekOfYearOfMinSupportedDateTime(firstDayOfWeek, fullDays); - } - return (this.GetWeekOfYearFullDays(System.DateTime.addDays(time, ((-(((dayOfYear + 1) | 0))) | 0)), firstDayOfWeek, fullDays)); - }, - GetWeekOfYearOfMinSupportedDateTime: function (firstDayOfWeek, minimumDaysInFirstWeek) { - var dayOfYear = (this.GetDayOfYear(this.MinSupportedDateTime) - 1) | 0; - var dayOfWeekOfFirstOfYear = (this.GetDayOfWeek(this.MinSupportedDateTime) - dayOfYear % 7) | 0; - - var offset = (((((firstDayOfWeek + 7) | 0) - dayOfWeekOfFirstOfYear) | 0)) % 7; - if (offset === 0 || offset >= minimumDaysInFirstWeek) { - return 1; - } - - var daysInYearBeforeMinSupportedYear = (this.DaysInYearBeforeMinSupportedYear - 1) | 0; - var dayOfWeekOfFirstOfPreviousYear = (((dayOfWeekOfFirstOfYear - 1) | 0) - (daysInYearBeforeMinSupportedYear % 7)) | 0; - - var daysInInitialPartialWeek = (((((firstDayOfWeek - dayOfWeekOfFirstOfPreviousYear) | 0) + 14) | 0)) % 7; - var day = (daysInYearBeforeMinSupportedYear - daysInInitialPartialWeek) | 0; - if (daysInInitialPartialWeek >= minimumDaysInFirstWeek) { - day = (day + 7) | 0; - } - - return (((((H5.Int.div(day, 7)) | 0) + 1) | 0)); - }, - GetWeekOfYear: function (time, rule, firstDayOfWeek) { - if (firstDayOfWeek < 0 || firstDayOfWeek > 6) { - throw new System.ArgumentOutOfRangeException.$ctor4("firstDayOfWeek", System.SR.Format$1("Valid values are between {0} and {1}, inclusive.", H5.box(System.DayOfWeek.Sunday, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek)), H5.box(System.DayOfWeek.Saturday, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek)))); - } - switch (rule) { - case 0: - return (this.GetFirstDayWeekOfYear(time, firstDayOfWeek)); - case 1: - return (this.GetWeekOfYearFullDays(time, firstDayOfWeek, 7)); - case 2: - return (this.GetWeekOfYearFullDays(time, firstDayOfWeek, 4)); - } - throw new System.ArgumentOutOfRangeException.$ctor4("rule", System.SR.Format$1("Valid values are between {0} and {1}, inclusive.", H5.box(0, System.Globalization.CalendarWeekRule, System.Enum.toStringFn(System.Globalization.CalendarWeekRule)), H5.box(2, System.Globalization.CalendarWeekRule, System.Enum.toStringFn(System.Globalization.CalendarWeekRule)))); - }, - IsLeapDay: function (year, month, day) { - return (this.IsLeapDay$1(year, month, day, System.Globalization.Calendar.CurrentEra)); - }, - IsLeapMonth: function (year, month) { - return (this.IsLeapMonth$1(year, month, System.Globalization.Calendar.CurrentEra)); - }, - GetLeapMonth: function (year) { - return (this.GetLeapMonth$1(year, System.Globalization.Calendar.CurrentEra)); - }, - GetLeapMonth$1: function (year, era) { - if (!this.IsLeapYear$1(year, era)) { - return 0; - } - - var monthsCount = this.GetMonthsInYear$1(year, era); - for (var month = 1; month <= monthsCount; month = (month + 1) | 0) { - if (this.IsLeapMonth$1(year, month, era)) { - return month; - } - } - - return 0; - }, - IsLeapYear: function (year) { - return (this.IsLeapYear$1(year, System.Globalization.Calendar.CurrentEra)); - }, - ToDateTime: function (year, month, day, hour, minute, second, millisecond) { - return (this.ToDateTime$1(year, month, day, hour, minute, second, millisecond, System.Globalization.Calendar.CurrentEra)); - }, - TryToDateTime: function (year, month, day, hour, minute, second, millisecond, era, result) { - result.v = System.DateTime.getMinValue(); - try { - result.v = this.ToDateTime$1(year, month, day, hour, minute, second, millisecond, era); - return true; - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.ArgumentException)) { - return false; - } else { - throw $e1; - } - } - }, - IsValidYear: function (year, era) { - return (year >= this.GetYear(this.MinSupportedDateTime) && year <= this.GetYear(this.MaxSupportedDateTime)); - }, - IsValidMonth: function (year, month, era) { - return (this.IsValidYear(year, era) && month >= 1 && month <= this.GetMonthsInYear$1(year, era)); - }, - IsValidDay: function (year, month, day, era) { - return (this.IsValidMonth(year, month, era) && day >= 1 && day <= this.GetDaysInMonth$1(year, month, era)); - }, - ToFourDigitYear: function (year) { - if (year < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("year", "Non-negative number required."); - } - if (year < 100) { - return (((H5.Int.mul((((((H5.Int.div(this.TwoDigitYearMax, 100)) | 0) - (year > this.TwoDigitYearMax % 100 ? 1 : 0)) | 0)), 100) + year) | 0)); - } - return (year); - } - } - }); - - // @source CalendarAlgorithmType.js - - H5.define("System.Globalization.CalendarAlgorithmType", { - $kind: "enum", - statics: { - fields: { - Unknown: 0, - SolarCalendar: 1, - LunarCalendar: 2, - LunisolarCalendar: 3 - } - } - }); - - // @source CalendarId.js - - H5.define("System.Globalization.CalendarId", { - $kind: "enum", - statics: { - fields: { - UNINITIALIZED_VALUE: 0, - GREGORIAN: 1, - GREGORIAN_US: 2, - JAPAN: 3, - TAIWAN: 4, - KOREA: 5, - HIJRI: 6, - THAI: 7, - HEBREW: 8, - GREGORIAN_ME_FRENCH: 9, - GREGORIAN_ARABIC: 10, - GREGORIAN_XLIT_ENGLISH: 11, - GREGORIAN_XLIT_FRENCH: 12, - JULIAN: 13, - JAPANESELUNISOLAR: 14, - CHINESELUNISOLAR: 15, - SAKA: 16, - LUNAR_ETO_CHN: 17, - LUNAR_ETO_KOR: 18, - LUNAR_ETO_ROKUYOU: 19, - KOREANLUNISOLAR: 20, - TAIWANLUNISOLAR: 21, - PERSIAN: 22, - UMALQURA: 23, - LAST_CALENDAR: 23 - } - }, - $utype: System.UInt16 - }); - - // @source CalendarWeekRule.js - - H5.define("System.Globalization.CalendarWeekRule", { - $kind: "enum", - statics: { - fields: { - FirstDay: 0, - FirstFullWeek: 1, - FirstFourDayWeek: 2 - } - } - }); - - // @source CultureNotFoundException.js - - H5.define("System.Globalization.CultureNotFoundException", { - inherits: [System.ArgumentException], - statics: { - props: { - DefaultMessage: { - get: function () { - return "Culture is not supported."; - } - } - } - }, - fields: { - _invalidCultureName: null, - _invalidCultureId: null - }, - props: { - InvalidCultureId: { - get: function () { - return this._invalidCultureId; - } - }, - InvalidCultureName: { - get: function () { - return this._invalidCultureName; - } - }, - FormatedInvalidCultureId: { - get: function () { - return this.InvalidCultureId != null ? System.String.formatProvider(System.Globalization.CultureInfo.invariantCulture, "{0} (0x{0:x4})", [H5.box(System.Nullable.getValue(this.InvalidCultureId), System.Int32)]) : this.InvalidCultureName; - } - }, - Message: { - get: function () { - var s = H5.ensureBaseProperty(this, "Message").$System$ArgumentException$Message; - if (this._invalidCultureId != null || this._invalidCultureName != null) { - var valueMessage = System.SR.Format("{0} is an invalid culture identifier.", this.FormatedInvalidCultureId); - if (s == null) { - return valueMessage; - } - - return (s || "") + ("\n" || "") + (valueMessage || ""); - } - return s; - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.ArgumentException.$ctor1.call(this, System.Globalization.CultureNotFoundException.DefaultMessage); - }, - $ctor1: function (message) { - this.$initialize(); - System.ArgumentException.$ctor1.call(this, message); - }, - $ctor5: function (paramName, message) { - this.$initialize(); - System.ArgumentException.$ctor3.call(this, message, paramName); - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.ArgumentException.$ctor2.call(this, message, innerException); - }, - $ctor7: function (paramName, invalidCultureName, message) { - this.$initialize(); - System.ArgumentException.$ctor3.call(this, message, paramName); - this._invalidCultureName = invalidCultureName; - }, - $ctor6: function (message, invalidCultureName, innerException) { - this.$initialize(); - System.ArgumentException.$ctor2.call(this, message, innerException); - this._invalidCultureName = invalidCultureName; - }, - $ctor3: function (message, invalidCultureId, innerException) { - this.$initialize(); - System.ArgumentException.$ctor2.call(this, message, innerException); - this._invalidCultureId = invalidCultureId; - }, - $ctor4: function (paramName, invalidCultureId, message) { - this.$initialize(); - System.ArgumentException.$ctor3.call(this, message, paramName); - this._invalidCultureId = invalidCultureId; - } - } - }); - - // @source DateTimeFormatInfoScanner.js - - H5.define("System.Globalization.DateTimeFormatInfoScanner", { - statics: { - fields: { - MonthPostfixChar: 0, - IgnorableSymbolChar: 0, - CJKYearSuff: null, - CJKMonthSuff: null, - CJKDaySuff: null, - KoreanYearSuff: null, - KoreanMonthSuff: null, - KoreanDaySuff: null, - KoreanHourSuff: null, - KoreanMinuteSuff: null, - KoreanSecondSuff: null, - CJKHourSuff: null, - ChineseHourSuff: null, - CJKMinuteSuff: null, - CJKSecondSuff: null, - s_knownWords: null - }, - props: { - KnownWords: { - get: function () { - if (System.Globalization.DateTimeFormatInfoScanner.s_knownWords == null) { - var temp = new (System.Collections.Generic.Dictionary$2(System.String,System.String)).ctor(); - - temp.add("/", ""); - temp.add("-", ""); - temp.add(".", ""); - temp.add(System.Globalization.DateTimeFormatInfoScanner.CJKYearSuff, ""); - temp.add(System.Globalization.DateTimeFormatInfoScanner.CJKMonthSuff, ""); - temp.add(System.Globalization.DateTimeFormatInfoScanner.CJKDaySuff, ""); - temp.add(System.Globalization.DateTimeFormatInfoScanner.KoreanYearSuff, ""); - temp.add(System.Globalization.DateTimeFormatInfoScanner.KoreanMonthSuff, ""); - temp.add(System.Globalization.DateTimeFormatInfoScanner.KoreanDaySuff, ""); - temp.add(System.Globalization.DateTimeFormatInfoScanner.KoreanHourSuff, ""); - temp.add(System.Globalization.DateTimeFormatInfoScanner.KoreanMinuteSuff, ""); - temp.add(System.Globalization.DateTimeFormatInfoScanner.KoreanSecondSuff, ""); - temp.add(System.Globalization.DateTimeFormatInfoScanner.CJKHourSuff, ""); - temp.add(System.Globalization.DateTimeFormatInfoScanner.ChineseHourSuff, ""); - temp.add(System.Globalization.DateTimeFormatInfoScanner.CJKMinuteSuff, ""); - temp.add(System.Globalization.DateTimeFormatInfoScanner.CJKSecondSuff, ""); - - System.Globalization.DateTimeFormatInfoScanner.s_knownWords = temp; - } - return (System.Globalization.DateTimeFormatInfoScanner.s_knownWords); - } - } - }, - ctors: { - init: function () { - this.MonthPostfixChar = 57344; - this.IgnorableSymbolChar = 57345; - this.CJKYearSuff = "\u5e74"; - this.CJKMonthSuff = "\u6708"; - this.CJKDaySuff = "\u65e5"; - this.KoreanYearSuff = "\ub144"; - this.KoreanMonthSuff = "\uc6d4"; - this.KoreanDaySuff = "\uc77c"; - this.KoreanHourSuff = "\uc2dc"; - this.KoreanMinuteSuff = "\ubd84"; - this.KoreanSecondSuff = "\ucd08"; - this.CJKHourSuff = "\u6642"; - this.ChineseHourSuff = "\u65f6"; - this.CJKMinuteSuff = "\u5206"; - this.CJKSecondSuff = "\u79d2"; - } - }, - methods: { - SkipWhiteSpacesAndNonLetter: function (pattern, currentIndex) { - while (currentIndex < pattern.length) { - var ch = pattern.charCodeAt(currentIndex); - if (ch === 92) { - currentIndex = (currentIndex + 1) | 0; - if (currentIndex < pattern.length) { - ch = pattern.charCodeAt(currentIndex); - if (ch === 39) { - continue; - } - } else { - break; - } - } - if (System.Char.isLetter(ch) || ch === 39 || ch === 46) { - break; - } - currentIndex = (currentIndex + 1) | 0; - } - return (currentIndex); - }, - ScanRepeatChar: function (pattern, ch, index, count) { - count.v = 1; - while (((index = (index + 1) | 0)) < pattern.length && pattern.charCodeAt(index) === ch) { - count.v = (count.v + 1) | 0; - } - return (index); - }, - GetFormatFlagGenitiveMonth: function (monthNames, genitveMonthNames, abbrevMonthNames, genetiveAbbrevMonthNames) { - return ((!System.Globalization.DateTimeFormatInfoScanner.EqualStringArrays(monthNames, genitveMonthNames) || !System.Globalization.DateTimeFormatInfoScanner.EqualStringArrays(abbrevMonthNames, genetiveAbbrevMonthNames)) ? 1 : 0); - }, - GetFormatFlagUseSpaceInMonthNames: function (monthNames, genitveMonthNames, abbrevMonthNames, genetiveAbbrevMonthNames) { - var formatFlags = 0; - formatFlags |= (System.Globalization.DateTimeFormatInfoScanner.ArrayElementsBeginWithDigit(monthNames) || System.Globalization.DateTimeFormatInfoScanner.ArrayElementsBeginWithDigit(genitveMonthNames) || System.Globalization.DateTimeFormatInfoScanner.ArrayElementsBeginWithDigit(abbrevMonthNames) || System.Globalization.DateTimeFormatInfoScanner.ArrayElementsBeginWithDigit(genetiveAbbrevMonthNames) ? 32 : 0); - - formatFlags |= (System.Globalization.DateTimeFormatInfoScanner.ArrayElementsHaveSpace(monthNames) || System.Globalization.DateTimeFormatInfoScanner.ArrayElementsHaveSpace(genitveMonthNames) || System.Globalization.DateTimeFormatInfoScanner.ArrayElementsHaveSpace(abbrevMonthNames) || System.Globalization.DateTimeFormatInfoScanner.ArrayElementsHaveSpace(genetiveAbbrevMonthNames) ? 4 : 0); - return (formatFlags); - }, - GetFormatFlagUseSpaceInDayNames: function (dayNames, abbrevDayNames) { - return ((System.Globalization.DateTimeFormatInfoScanner.ArrayElementsHaveSpace(dayNames) || System.Globalization.DateTimeFormatInfoScanner.ArrayElementsHaveSpace(abbrevDayNames)) ? 16 : 0); - }, - GetFormatFlagUseHebrewCalendar: function (calID) { - return (calID === 8 ? 10 : 0); - }, - EqualStringArrays: function (array1, array2) { - if (H5.referenceEquals(array1, array2)) { - return true; - } - - if (array1.length !== array2.length) { - return false; - } - - for (var i = 0; i < array1.length; i = (i + 1) | 0) { - if (!System.String.equals(array1[System.Array.index(i, array1)], array2[System.Array.index(i, array2)])) { - return false; - } - } - - return true; - }, - ArrayElementsHaveSpace: function (array) { - for (var i = 0; i < array.length; i = (i + 1) | 0) { - for (var j = 0; j < array[System.Array.index(i, array)].length; j = (j + 1) | 0) { - if (System.Char.isWhiteSpace(String.fromCharCode(array[System.Array.index(i, array)].charCodeAt(j)))) { - return true; - } - } - } - - return false; - }, - ArrayElementsBeginWithDigit: function (array) { - for (var i = 0; i < array.length; i = (i + 1) | 0) { - if (array[System.Array.index(i, array)].length > 0 && array[System.Array.index(i, array)].charCodeAt(0) >= 48 && array[System.Array.index(i, array)].charCodeAt(0) <= 57) { - var index = 1; - while (index < array[System.Array.index(i, array)].length && array[System.Array.index(i, array)].charCodeAt(index) >= 48 && array[System.Array.index(i, array)].charCodeAt(index) <= 57) { - index = (index + 1) | 0; - } - if (index === array[System.Array.index(i, array)].length) { - return (false); - } - - if (index === ((array[System.Array.index(i, array)].length - 1) | 0)) { - switch (array[System.Array.index(i, array)].charCodeAt(index)) { - case 26376: - case 50900: - return (false); - } - } - - if (index === ((array[System.Array.index(i, array)].length - 4) | 0)) { - if (array[System.Array.index(i, array)].charCodeAt(index) === 39 && array[System.Array.index(i, array)].charCodeAt(((index + 1) | 0)) === 32 && array[System.Array.index(i, array)].charCodeAt(((index + 2) | 0)) === 26376 && array[System.Array.index(i, array)].charCodeAt(((index + 3) | 0)) === 39) { - return (false); - } - } - return (true); - } - } - - return false; - } - } - }, - fields: { - m_dateWords: null, - _ymdFlags: 0 - }, - ctors: { - init: function () { - this.m_dateWords = new (System.Collections.Generic.List$1(System.String)).ctor(); - this._ymdFlags = System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.None; - } - }, - methods: { - AddDateWordOrPostfix: function (formatPostfix, str) { - if (str.length > 0) { - if (System.String.equals(str, ".")) { - this.AddIgnorableSymbols("."); - return; - } - var words = { }; - if (System.Globalization.DateTimeFormatInfoScanner.KnownWords.tryGetValue(str, words) === false) { - if (this.m_dateWords == null) { - this.m_dateWords = new (System.Collections.Generic.List$1(System.String)).ctor(); - } - if (H5.referenceEquals(formatPostfix, "MMMM")) { - var temp = String.fromCharCode(System.Globalization.DateTimeFormatInfoScanner.MonthPostfixChar) + (str || ""); - if (!this.m_dateWords.contains(temp)) { - this.m_dateWords.add(temp); - } - } else { - if (!this.m_dateWords.contains(str)) { - this.m_dateWords.add(str); - } - if (str.charCodeAt(((str.length - 1) | 0)) === 46) { - var strWithoutDot = str.substr(0, ((str.length - 1) | 0)); - if (!this.m_dateWords.contains(strWithoutDot)) { - this.m_dateWords.add(strWithoutDot); - } - } - } - } - } - }, - AddDateWords: function (pattern, index, formatPostfix) { - var newIndex = System.Globalization.DateTimeFormatInfoScanner.SkipWhiteSpacesAndNonLetter(pattern, index); - if (newIndex !== index && formatPostfix != null) { - formatPostfix = null; - } - index = newIndex; - - var dateWord = new System.Text.StringBuilder(); - - while (index < pattern.length) { - var ch = pattern.charCodeAt(index); - if (ch === 39) { - this.AddDateWordOrPostfix(formatPostfix, dateWord.toString()); - index = (index + 1) | 0; - break; - } else if (ch === 92) { - - index = (index + 1) | 0; - if (index < pattern.length) { - dateWord.append(String.fromCharCode(pattern.charCodeAt(index))); - index = (index + 1) | 0; - } - } else if (System.Char.isWhiteSpace(String.fromCharCode(ch))) { - this.AddDateWordOrPostfix(formatPostfix, dateWord.toString()); - if (formatPostfix != null) { - formatPostfix = null; - } - dateWord.setLength(0); - index = (index + 1) | 0; - } else { - dateWord.append(String.fromCharCode(ch)); - index = (index + 1) | 0; - } - } - return (index); - }, - AddIgnorableSymbols: function (text) { - if (this.m_dateWords == null) { - this.m_dateWords = new (System.Collections.Generic.List$1(System.String)).ctor(); - } - var temp = String.fromCharCode(System.Globalization.DateTimeFormatInfoScanner.IgnorableSymbolChar) + (text || ""); - if (!this.m_dateWords.contains(temp)) { - this.m_dateWords.add(temp); - } - }, - ScanDateWord: function (pattern) { - this._ymdFlags = System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.None; - - var i = 0; - while (i < pattern.length) { - var ch = pattern.charCodeAt(i); - var chCount = { }; - - switch (ch) { - case 39: - i = this.AddDateWords(pattern, ((i + 1) | 0), null); - break; - case 77: - i = System.Globalization.DateTimeFormatInfoScanner.ScanRepeatChar(pattern, 77, i, chCount); - if (chCount.v >= 4) { - if (i < pattern.length && pattern.charCodeAt(i) === 39) { - i = this.AddDateWords(pattern, ((i + 1) | 0), "MMMM"); - } - } - this._ymdFlags |= System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.FoundMonthPatternFlag; - break; - case 121: - i = System.Globalization.DateTimeFormatInfoScanner.ScanRepeatChar(pattern, 121, i, chCount); - this._ymdFlags |= System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.FoundYearPatternFlag; - break; - case 100: - i = System.Globalization.DateTimeFormatInfoScanner.ScanRepeatChar(pattern, 100, i, chCount); - if (chCount.v <= 2) { - this._ymdFlags |= System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.FoundDayPatternFlag; - } - break; - case 92: - i = (i + 2) | 0; - break; - case 46: - if (this._ymdFlags === System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.FoundYMDPatternFlag) { - this.AddIgnorableSymbols("."); - this._ymdFlags = System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.None; - } - i = (i + 1) | 0; - break; - default: - if (this._ymdFlags === System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.FoundYMDPatternFlag && !System.Char.isWhiteSpace(String.fromCharCode(ch))) { - this._ymdFlags = System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern.None; - } - i = (i + 1) | 0; - break; - } - } - }, - GetDateWordsOfDTFI: function (dtfi) { - var datePatterns = dtfi.getAllDateTimePatterns(68); - var i; - - for (i = 0; i < datePatterns.length; i = (i + 1) | 0) { - this.ScanDateWord(datePatterns[System.Array.index(i, datePatterns)]); - } - - datePatterns = dtfi.getAllDateTimePatterns(100); - for (i = 0; i < datePatterns.length; i = (i + 1) | 0) { - this.ScanDateWord(datePatterns[System.Array.index(i, datePatterns)]); - } - datePatterns = dtfi.getAllDateTimePatterns(121); - for (i = 0; i < datePatterns.length; i = (i + 1) | 0) { - this.ScanDateWord(datePatterns[System.Array.index(i, datePatterns)]); - } - - this.ScanDateWord(dtfi.monthDayPattern); - - datePatterns = dtfi.getAllDateTimePatterns(84); - for (i = 0; i < datePatterns.length; i = (i + 1) | 0) { - this.ScanDateWord(datePatterns[System.Array.index(i, datePatterns)]); - } - - datePatterns = dtfi.getAllDateTimePatterns(116); - for (i = 0; i < datePatterns.length; i = (i + 1) | 0) { - this.ScanDateWord(datePatterns[System.Array.index(i, datePatterns)]); - } - - var result = null; - if (this.m_dateWords != null && this.m_dateWords.Count > 0) { - result = System.Array.init(this.m_dateWords.Count, null, System.String); - for (i = 0; i < this.m_dateWords.Count; i = (i + 1) | 0) { - result[System.Array.index(i, result)] = this.m_dateWords.getItem(i); - } - } - return (result); - } - } - }); - - // @source DateTimeStyles.js - - H5.define("System.Globalization.DateTimeStyles", { - $kind: "enum", - statics: { - fields: { - None: 0, - AllowLeadingWhite: 1, - AllowTrailingWhite: 2, - AllowInnerWhite: 4, - AllowWhiteSpaces: 7, - NoCurrentDateDefault: 8, - AdjustToUniversal: 16, - AssumeLocal: 32, - AssumeUniversal: 64, - RoundtripKind: 128 - } - }, - $flags: true - }); - - // @source FORMATFLAGS.js - - H5.define("System.Globalization.FORMATFLAGS", { - $kind: "enum", - statics: { - fields: { - None: 0, - UseGenitiveMonth: 1, - UseLeapYearMonth: 2, - UseSpacesInMonthNames: 4, - UseHebrewParsing: 8, - UseSpacesInDayNames: 16, - UseDigitPrefixInTokens: 32 - } - } - }); - - // @source GlobalizationMode.js - - H5.define("System.Globalization.GlobalizationMode", { - statics: { - props: { - Invariant: false - }, - ctors: { - init: function () { - this.Invariant = System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode(); - } - }, - methods: { - GetInvariantSwitchValue: function () { - return true; - - - }, - GetGlobalizationInvariantMode: function () { - return System.Globalization.GlobalizationMode.GetInvariantSwitchValue(); - } - } - } - }); - - // @source FoundDatePattern.js - - H5.define("System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern", { - $kind: "nested enum", - statics: { - fields: { - None: 0, - FoundYearPatternFlag: 1, - FoundMonthPatternFlag: 2, - FoundDayPatternFlag: 4, - FoundYMDPatternFlag: 7 - } - } - }); - - // @source NotImplemented.js - - H5.define("System.NotImplemented", { - statics: { - props: { - ByDesign: { - get: function () { - return new System.NotImplementedException.ctor(); - } - } - }, - methods: { - ByDesignWithMessage: function (message) { - return new System.NotImplementedException.$ctor1(message); - } - } - } - }); - - // @source NotImplementedException.js - - H5.define("System.NotImplementedException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "The method or operation is not implemented."); - this.HResult = -2147467263; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2147467263; - }, - $ctor2: function (message, inner) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, inner); - this.HResult = -2147467263; - } - } - }); - - // @source NotSupportedException.js - - H5.define("System.NotSupportedException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Specified method is not supported."); - this.HResult = -2146233067; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233067; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2146233067; - } - } - }); - - // @source NullReferenceException.js - - H5.define("System.NullReferenceException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Object reference not set to an instance of an object."); - this.HResult = -2147467261; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2147467261; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2147467261; - } - } - }); - - // @source OperationCanceledException.js - - H5.define("System.OperationCanceledException", { - inherits: [System.SystemException], - fields: { - _cancellationToken: null - }, - props: { - CancellationToken: { - get: function () { - return this._cancellationToken; - }, - set: function (value) { - this._cancellationToken = value; - } - } - }, - ctors: { - init: function () { - this._cancellationToken = H5.getDefaultValue(System.Threading.CancellationToken); - }, - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "The operation was canceled."); - this.HResult = -2146233029; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233029; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2146233029; - }, - $ctor5: function (token) { - System.OperationCanceledException.ctor.call(this); - this.CancellationToken = token; - }, - $ctor4: function (message, token) { - System.OperationCanceledException.$ctor1.call(this, message); - this.CancellationToken = token; - }, - $ctor3: function (message, innerException, token) { - System.OperationCanceledException.$ctor2.call(this, message, innerException); - this.CancellationToken = token; - } - } - }); - - // @source OverflowException.js - - H5.define("System.OverflowException", { - inherits: [System.ArithmeticException], - ctors: { - ctor: function () { - this.$initialize(); - System.ArithmeticException.$ctor1.call(this, "Arithmetic operation resulted in an overflow."); - this.HResult = -2146233066; - }, - $ctor1: function (message) { - this.$initialize(); - System.ArithmeticException.$ctor1.call(this, message); - this.HResult = -2146233066; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.ArithmeticException.$ctor2.call(this, message, innerException); - this.HResult = -2146233066; - } - } - }); - - // @source ParseFailureKind.js - - H5.define("System.ParseFailureKind", { - $kind: "enum", - statics: { - fields: { - None: 0, - ArgumentNull: 1, - Format: 2, - FormatWithParameter: 3, - FormatBadDateTimeCalendar: 4 - } - } - }); - - // @source ParseFlags.js - - H5.define("System.ParseFlags", { - $kind: "enum", - statics: { - fields: { - HaveYear: 1, - HaveMonth: 2, - HaveDay: 4, - HaveHour: 8, - HaveMinute: 16, - HaveSecond: 32, - HaveTime: 64, - HaveDate: 128, - TimeZoneUsed: 256, - TimeZoneUtc: 512, - ParsedMonthName: 1024, - CaptureOffset: 2048, - YearDefault: 4096, - Rfc1123Pattern: 8192, - UtcSortPattern: 16384 - } - }, - $flags: true - }); - - // @source StringBuilderCache.js - - H5.define("System.Text.StringBuilderCache", { - statics: { - fields: { - MAX_BUILDER_SIZE: 0, - DEFAULT_CAPACITY: 0, - t_cachedInstance: null - }, - ctors: { - init: function () { - this.MAX_BUILDER_SIZE = 260; - this.DEFAULT_CAPACITY = 16; - } - }, - methods: { - Acquire: function (capacity) { - if (capacity === void 0) { capacity = 16; } - if (capacity <= System.Text.StringBuilderCache.MAX_BUILDER_SIZE) { - var sb = System.Text.StringBuilderCache.t_cachedInstance; - if (sb != null) { - if (capacity <= sb.getCapacity()) { - System.Text.StringBuilderCache.t_cachedInstance = null; - sb.clear(); - return sb; - } - } - } - return new System.Text.StringBuilder("", capacity); - }, - Release: function (sb) { - if (sb.getCapacity() <= System.Text.StringBuilderCache.MAX_BUILDER_SIZE) { - System.Text.StringBuilderCache.t_cachedInstance = sb; - } - }, - GetStringAndRelease: function (sb) { - var result = sb.toString(); - System.Text.StringBuilderCache.Release(sb); - return result; - } - } - } - }); - - // @source BinaryReader.js - - H5.define("System.IO.BinaryReader", { - inherits: [System.IDisposable], - statics: { - fields: { - MaxCharBytesSize: 0 - }, - ctors: { - init: function () { - this.MaxCharBytesSize = 128; - } - } - }, - fields: { - m_stream: null, - m_buffer: null, - m_encoding: null, - m_charBytes: null, - m_singleChar: null, - m_charBuffer: null, - m_maxCharsSize: 0, - m_2BytesPerChar: false, - m_isMemoryStream: false, - m_leaveOpen: false, - lastCharsRead: 0 - }, - props: { - BaseStream: { - get: function () { - return this.m_stream; - } - } - }, - alias: ["Dispose", "System$IDisposable$Dispose"], - ctors: { - init: function () { - this.lastCharsRead = 0; - }, - ctor: function (input) { - System.IO.BinaryReader.$ctor2.call(this, input, new System.Text.UTF8Encoding.ctor(), false); - }, - $ctor1: function (input, encoding) { - System.IO.BinaryReader.$ctor2.call(this, input, encoding, false); - }, - $ctor2: function (input, encoding, leaveOpen) { - this.$initialize(); - if (input == null) { - throw new System.ArgumentNullException.$ctor1("input"); - } - if (encoding == null) { - throw new System.ArgumentNullException.$ctor1("encoding"); - } - if (!input.CanRead) { - throw new System.ArgumentException.$ctor1("Argument_StreamNotReadable"); - } - this.m_stream = input; - this.m_encoding = encoding; - this.m_maxCharsSize = encoding.GetMaxCharCount(System.IO.BinaryReader.MaxCharBytesSize); - var minBufferSize = encoding.GetMaxByteCount(1); - if (minBufferSize < 23) { - minBufferSize = 23; - } - this.m_buffer = System.Array.init(minBufferSize, 0, System.Byte); - - this.m_2BytesPerChar = H5.is(encoding, System.Text.UnicodeEncoding); - this.m_isMemoryStream = (H5.getType(this.m_stream) === System.IO.MemoryStream); - this.m_leaveOpen = leaveOpen; - - } - }, - methods: { - Close: function () { - this.Dispose$1(true); - }, - Dispose$1: function (disposing) { - if (disposing) { - var copyOfStream = this.m_stream; - this.m_stream = null; - if (copyOfStream != null && !this.m_leaveOpen) { - copyOfStream.Close(); - } - } - this.m_stream = null; - this.m_buffer = null; - this.m_encoding = null; - this.m_charBytes = null; - this.m_singleChar = null; - this.m_charBuffer = null; - }, - Dispose: function () { - this.Dispose$1(true); - }, - PeekChar: function () { - - if (this.m_stream == null) { - System.IO.__Error.FileNotOpen(); - } - - if (!this.m_stream.CanSeek) { - return -1; - } - var origPos = this.m_stream.Position; - var ch = this.Read(); - this.m_stream.Position = origPos; - return ch; - }, - Read: function () { - - if (this.m_stream == null) { - System.IO.__Error.FileNotOpen(); - } - return this.InternalReadOneChar(); - }, - Read$2: function (buffer, index, count) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor3("buffer", "ArgumentNull_Buffer"); - } - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("index", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (((buffer.length - index) | 0) < count) { - throw new System.ArgumentException.$ctor1("Argument_InvalidOffLen"); - } - - if (this.m_stream == null) { - System.IO.__Error.FileNotOpen(); - } - - return this.InternalReadChars(buffer, index, count); - }, - Read$1: function (buffer, index, count) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor3("buffer", "ArgumentNull_Buffer"); - } - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("index", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (((buffer.length - index) | 0) < count) { - throw new System.ArgumentException.$ctor1("Argument_InvalidOffLen"); - } - - if (this.m_stream == null) { - System.IO.__Error.FileNotOpen(); - } - return this.m_stream.Read(buffer, index, count); - }, - ReadBoolean: function () { - this.FillBuffer(1); - return (this.m_buffer[System.Array.index(0, this.m_buffer)] !== 0); - }, - ReadByte: function () { - if (this.m_stream == null) { - System.IO.__Error.FileNotOpen(); - } - - var b = this.m_stream.ReadByte(); - if (b === -1) { - System.IO.__Error.EndOfFile(); - } - return (b & 255); - }, - ReadSByte: function () { - this.FillBuffer(1); - return H5.Int.sxb((this.m_buffer[System.Array.index(0, this.m_buffer)]) & 255); - }, - ReadChar: function () { - var value = this.Read(); - if (value === -1) { - System.IO.__Error.EndOfFile(); - } - return (value & 65535); - }, - ReadInt16: function () { - this.FillBuffer(2); - return H5.Int.sxs((this.m_buffer[System.Array.index(0, this.m_buffer)] | this.m_buffer[System.Array.index(1, this.m_buffer)] << 8) & 65535); - }, - ReadUInt16: function () { - this.FillBuffer(2); - return ((this.m_buffer[System.Array.index(0, this.m_buffer)] | this.m_buffer[System.Array.index(1, this.m_buffer)] << 8) & 65535); - }, - ReadInt32: function () { - if (this.m_isMemoryStream) { - if (this.m_stream == null) { - System.IO.__Error.FileNotOpen(); - } - var mStream = H5.as(this.m_stream, System.IO.MemoryStream); - - return mStream.InternalReadInt32(); - } else { - this.FillBuffer(4); - return this.m_buffer[System.Array.index(0, this.m_buffer)] | this.m_buffer[System.Array.index(1, this.m_buffer)] << 8 | this.m_buffer[System.Array.index(2, this.m_buffer)] << 16 | this.m_buffer[System.Array.index(3, this.m_buffer)] << 24; - } - }, - ReadUInt32: function () { - this.FillBuffer(4); - return ((this.m_buffer[System.Array.index(0, this.m_buffer)] | this.m_buffer[System.Array.index(1, this.m_buffer)] << 8 | this.m_buffer[System.Array.index(2, this.m_buffer)] << 16 | this.m_buffer[System.Array.index(3, this.m_buffer)] << 24) >>> 0); - }, - ReadInt64: function () { - this.FillBuffer(8); - var lo = (this.m_buffer[System.Array.index(0, this.m_buffer)] | this.m_buffer[System.Array.index(1, this.m_buffer)] << 8 | this.m_buffer[System.Array.index(2, this.m_buffer)] << 16 | this.m_buffer[System.Array.index(3, this.m_buffer)] << 24) >>> 0; - var hi = (this.m_buffer[System.Array.index(4, this.m_buffer)] | this.m_buffer[System.Array.index(5, this.m_buffer)] << 8 | this.m_buffer[System.Array.index(6, this.m_buffer)] << 16 | this.m_buffer[System.Array.index(7, this.m_buffer)] << 24) >>> 0; - return System.Int64.clip64(System.UInt64(hi)).shl(32).or(System.Int64(lo)); - }, - ReadUInt64: function () { - this.FillBuffer(8); - var lo = (this.m_buffer[System.Array.index(0, this.m_buffer)] | this.m_buffer[System.Array.index(1, this.m_buffer)] << 8 | this.m_buffer[System.Array.index(2, this.m_buffer)] << 16 | this.m_buffer[System.Array.index(3, this.m_buffer)] << 24) >>> 0; - var hi = (this.m_buffer[System.Array.index(4, this.m_buffer)] | this.m_buffer[System.Array.index(5, this.m_buffer)] << 8 | this.m_buffer[System.Array.index(6, this.m_buffer)] << 16 | this.m_buffer[System.Array.index(7, this.m_buffer)] << 24) >>> 0; - return System.UInt64(hi).shl(32).or(System.UInt64(lo)); - }, - ReadSingle: function () { - this.FillBuffer(4); - var tmpBuffer = (this.m_buffer[System.Array.index(0, this.m_buffer)] | this.m_buffer[System.Array.index(1, this.m_buffer)] << 8 | this.m_buffer[System.Array.index(2, this.m_buffer)] << 16 | this.m_buffer[System.Array.index(3, this.m_buffer)] << 24) >>> 0; - return System.BitConverter.toSingle(System.BitConverter.getBytes$8(tmpBuffer), 0); - }, - ReadDouble: function () { - this.FillBuffer(8); - var lo = (this.m_buffer[System.Array.index(0, this.m_buffer)] | this.m_buffer[System.Array.index(1, this.m_buffer)] << 8 | this.m_buffer[System.Array.index(2, this.m_buffer)] << 16 | this.m_buffer[System.Array.index(3, this.m_buffer)] << 24) >>> 0; - var hi = (this.m_buffer[System.Array.index(4, this.m_buffer)] | this.m_buffer[System.Array.index(5, this.m_buffer)] << 8 | this.m_buffer[System.Array.index(6, this.m_buffer)] << 16 | this.m_buffer[System.Array.index(7, this.m_buffer)] << 24) >>> 0; - - var tmpBuffer = System.UInt64(hi).shl(32).or(System.UInt64(lo)); - return System.BitConverter.toDouble(System.BitConverter.getBytes$9(tmpBuffer), 0); - }, - ReadDecimal: function () { - this.FillBuffer(23); - try { - return System.Decimal.fromBytes(this.m_buffer); - } catch ($e1) { - $e1 = System.Exception.create($e1); - var e; - if (H5.is($e1, System.ArgumentException)) { - e = $e1; - throw new System.IO.IOException.$ctor2("Arg_DecBitCtor", e); - } else { - throw $e1; - } - } - }, - ReadString: function () { - - if (this.m_stream == null) { - System.IO.__Error.FileNotOpen(); - } - - var currPos = 0; - var n; - var stringLength; - var readLength; - var charsRead; - - stringLength = this.Read7BitEncodedInt(); - if (stringLength < 0) { - throw new System.IO.IOException.$ctor1("IO.IO_InvalidStringLen_Len"); - } - - if (stringLength === 0) { - return ""; - } - - if (this.m_charBytes == null) { - this.m_charBytes = System.Array.init(System.IO.BinaryReader.MaxCharBytesSize, 0, System.Byte); - } - - if (this.m_charBuffer == null) { - this.m_charBuffer = System.Array.init(this.m_maxCharsSize, 0, System.Char); - } - - var sb = null; - do { - readLength = ((((stringLength - currPos) | 0)) > System.IO.BinaryReader.MaxCharBytesSize) ? System.IO.BinaryReader.MaxCharBytesSize : (((stringLength - currPos) | 0)); - - n = this.m_stream.Read(this.m_charBytes, 0, readLength); - if (n === 0) { - System.IO.__Error.EndOfFile(); - } - - charsRead = this.m_encoding.GetChars$2(this.m_charBytes, 0, n, this.m_charBuffer, 0); - - if (currPos === 0 && n === stringLength) { - return System.String.fromCharArray(this.m_charBuffer, 0, charsRead); - } - - if (sb == null) { - sb = new System.Text.StringBuilder("", stringLength); - } - - for (var i = 0; i < charsRead; i = (i + 1) | 0) { - sb.append(String.fromCharCode(this.m_charBuffer[System.Array.index(i, this.m_charBuffer)])); - } - - currPos = (currPos + n) | 0; - - } while (currPos < stringLength); - - return sb.toString(); - }, - InternalReadChars: function (buffer, index, count) { - - var charsRemaining = count; - - if (this.m_charBytes == null) { - this.m_charBytes = System.Array.init(System.IO.BinaryReader.MaxCharBytesSize, 0, System.Byte); - } - - if (index < 0 || charsRemaining < 0 || ((index + charsRemaining) | 0) > buffer.length) { - throw new System.ArgumentOutOfRangeException.$ctor1("charsRemaining"); - } - - while (charsRemaining > 0) { - - var ch = this.InternalReadOneChar(true); - - if (ch === -1) { - break; - } - - buffer[System.Array.index(index, buffer)] = ch & 65535; - - if (this.lastCharsRead === 2) { - buffer[System.Array.index(((index = (index + 1) | 0)), buffer)] = this.m_singleChar[System.Array.index(1, this.m_singleChar)]; - charsRemaining = (charsRemaining - 1) | 0; - } - - charsRemaining = (charsRemaining - 1) | 0; - index = (index + 1) | 0; - } - - - return (((count - charsRemaining) | 0)); - }, - InternalReadOneChar: function (allowSurrogate) { - if (allowSurrogate === void 0) { allowSurrogate = false; } - var charsRead = 0; - var numBytes = 0; - var posSav = System.Int64(0); - - if (this.m_stream.CanSeek) { - posSav = this.m_stream.Position; - } - - if (this.m_charBytes == null) { - this.m_charBytes = System.Array.init(System.IO.BinaryReader.MaxCharBytesSize, 0, System.Byte); - } - if (this.m_singleChar == null) { - this.m_singleChar = System.Array.init(2, 0, System.Char); - } - - var addByte = false; - var internalPos = 0; - while (charsRead === 0) { - numBytes = this.m_2BytesPerChar ? 2 : 1; - - if (H5.is(this.m_encoding, System.Text.UTF32Encoding)) { - numBytes = 4; - } - - if (addByte) { - var r = this.m_stream.ReadByte(); - this.m_charBytes[System.Array.index(((internalPos = (internalPos + 1) | 0)), this.m_charBytes)] = r & 255; - if (r === -1) { - numBytes = 0; - } - - if (numBytes === 2) { - r = this.m_stream.ReadByte(); - this.m_charBytes[System.Array.index(((internalPos = (internalPos + 1) | 0)), this.m_charBytes)] = r & 255; - if (r === -1) { - numBytes = 1; - } - } - } else { - var r1 = this.m_stream.ReadByte(); - this.m_charBytes[System.Array.index(0, this.m_charBytes)] = r1 & 255; - internalPos = 0; - if (r1 === -1) { - numBytes = 0; - } - - if (numBytes === 2) { - r1 = this.m_stream.ReadByte(); - this.m_charBytes[System.Array.index(1, this.m_charBytes)] = r1 & 255; - if (r1 === -1) { - numBytes = 1; - } - internalPos = 1; - } else if (numBytes === 4) { - r1 = this.m_stream.ReadByte(); - this.m_charBytes[System.Array.index(1, this.m_charBytes)] = r1 & 255; - if (r1 === -1) { - return -1; - } - - r1 = this.m_stream.ReadByte(); - this.m_charBytes[System.Array.index(2, this.m_charBytes)] = r1 & 255; - if (r1 === -1) { - return -1; - } - - r1 = this.m_stream.ReadByte(); - this.m_charBytes[System.Array.index(3, this.m_charBytes)] = r1 & 255; - if (r1 === -1) { - return -1; - } - - internalPos = 3; - } - } - - - if (numBytes === 0) { - return -1; - } - - addByte = false; - try { - charsRead = this.m_encoding.GetChars$2(this.m_charBytes, 0, ((internalPos + 1) | 0), this.m_singleChar, 0); - - if (!allowSurrogate && charsRead === 2) { - throw new System.ArgumentException.ctor(); - } - } catch ($e1) { - $e1 = System.Exception.create($e1); - - if (this.m_stream.CanSeek) { - this.m_stream.Seek((posSav.sub(this.m_stream.Position)), 1); - } - - throw $e1; - } - - if (this.m_encoding._hasError) { - charsRead = 0; - addByte = true; - } - - if (!allowSurrogate) { - } - } - - this.lastCharsRead = charsRead; - - if (charsRead === 0) { - return -1; - } - - return this.m_singleChar[System.Array.index(0, this.m_singleChar)]; - }, - ReadChars: function (count) { - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (this.m_stream == null) { - System.IO.__Error.FileNotOpen(); - } - - if (count === 0) { - return System.Array.init(0, 0, System.Char); - } - - var chars = System.Array.init(count, 0, System.Char); - var n = this.InternalReadChars(chars, 0, count); - if (n !== count) { - var copy = System.Array.init(n, 0, System.Char); - System.Array.copy(chars, 0, copy, 0, H5.Int.mul(2, n)); - chars = copy; - } - - return chars; - }, - ReadBytes: function (count) { - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (this.m_stream == null) { - System.IO.__Error.FileNotOpen(); - } - - if (count === 0) { - return System.Array.init(0, 0, System.Byte); - } - - var result = System.Array.init(count, 0, System.Byte); - - var numRead = 0; - do { - var n = this.m_stream.Read(result, numRead, count); - if (n === 0) { - break; - } - numRead = (numRead + n) | 0; - count = (count - n) | 0; - } while (count > 0); - - if (numRead !== result.length) { - var copy = System.Array.init(numRead, 0, System.Byte); - System.Array.copy(result, 0, copy, 0, numRead); - result = copy; - } - - return result; - }, - FillBuffer: function (numBytes) { - if (this.m_buffer != null && (numBytes < 0 || numBytes > this.m_buffer.length)) { - throw new System.ArgumentOutOfRangeException.$ctor4("numBytes", "ArgumentOutOfRange_BinaryReaderFillBuffer"); - } - var bytesRead = 0; - var n = 0; - - if (this.m_stream == null) { - System.IO.__Error.FileNotOpen(); - } - - if (numBytes === 1) { - n = this.m_stream.ReadByte(); - if (n === -1) { - System.IO.__Error.EndOfFile(); - } - this.m_buffer[System.Array.index(0, this.m_buffer)] = n & 255; - return; - } - - do { - n = this.m_stream.Read(this.m_buffer, bytesRead, ((numBytes - bytesRead) | 0)); - if (n === 0) { - System.IO.__Error.EndOfFile(); - } - bytesRead = (bytesRead + n) | 0; - } while (bytesRead < numBytes); - }, - Read7BitEncodedInt: function () { - var count = 0; - var shift = 0; - var b; - do { - if (shift === 35) { - throw new System.FormatException.$ctor1("Format_Bad7BitInt32"); - } - - b = this.ReadByte(); - count = count | ((b & 127) << shift); - shift = (shift + 7) | 0; - } while ((b & 128) !== 0); - return count; - } - } - }); - - // @source BinaryWriter.js - - H5.define("System.IO.BinaryWriter", { - inherits: [System.IDisposable], - statics: { - fields: { - LargeByteBufferSize: 0, - Null: null - }, - ctors: { - init: function () { - this.LargeByteBufferSize = 256; - this.Null = new System.IO.BinaryWriter.ctor(); - } - } - }, - fields: { - OutStream: null, - _buffer: null, - _encoding: null, - _leaveOpen: false, - _tmpOneCharBuffer: null - }, - props: { - BaseStream: { - get: function () { - this.Flush(); - return this.OutStream; - } - } - }, - alias: ["Dispose", "System$IDisposable$Dispose"], - ctors: { - ctor: function () { - this.$initialize(); - this.OutStream = System.IO.Stream.Null; - this._buffer = System.Array.init(16, 0, System.Byte); - this._encoding = new System.Text.UTF8Encoding.$ctor2(false, true); - }, - $ctor1: function (output) { - System.IO.BinaryWriter.$ctor3.call(this, output, new System.Text.UTF8Encoding.$ctor2(false, true), false); - }, - $ctor2: function (output, encoding) { - System.IO.BinaryWriter.$ctor3.call(this, output, encoding, false); - }, - $ctor3: function (output, encoding, leaveOpen) { - this.$initialize(); - if (output == null) { - throw new System.ArgumentNullException.$ctor1("output"); - } - if (encoding == null) { - throw new System.ArgumentNullException.$ctor1("encoding"); - } - if (!output.CanWrite) { - throw new System.ArgumentException.$ctor1("Argument_StreamNotWritable"); - } - - this.OutStream = output; - this._buffer = System.Array.init(16, 0, System.Byte); - this._encoding = encoding; - this._leaveOpen = leaveOpen; - } - }, - methods: { - Close: function () { - this.Dispose$1(true); - }, - Dispose$1: function (disposing) { - if (disposing) { - if (this._leaveOpen) { - this.OutStream.Flush(); - } else { - this.OutStream.Close(); - } - } - }, - Dispose: function () { - this.Dispose$1(true); - }, - Flush: function () { - this.OutStream.Flush(); - }, - Seek: function (offset, origin) { - return this.OutStream.Seek(System.Int64(offset), origin); - }, - Write: function (value) { - this._buffer[System.Array.index(0, this._buffer)] = (value ? 1 : 0) & 255; - this.OutStream.Write(this._buffer, 0, 1); - }, - Write$1: function (value) { - this.OutStream.WriteByte(value); - }, - Write$12: function (value) { - this.OutStream.WriteByte((value & 255)); - }, - Write$2: function (buffer) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor1("buffer"); - } - this.OutStream.Write(buffer, 0, buffer.length); - }, - Write$3: function (buffer, index, count) { - this.OutStream.Write(buffer, index, count); - }, - Write$4: function (ch) { - if (System.Char.isSurrogate(ch)) { - throw new System.ArgumentException.$ctor1("Arg_SurrogatesNotAllowedAsSingleChar"); - } - - var numBytes = 0; - numBytes = this._encoding.GetBytes$3(System.Array.init([ch], System.Char), 0, 1, this._buffer, 0); - - this.OutStream.Write(this._buffer, 0, numBytes); - }, - Write$5: function (chars) { - if (chars == null) { - throw new System.ArgumentNullException.$ctor1("chars"); - } - - var bytes = this._encoding.GetBytes$1(chars, 0, chars.length); - this.OutStream.Write(bytes, 0, bytes.length); - }, - Write$6: function (chars, index, count) { - var bytes = this._encoding.GetBytes$1(chars, index, count); - this.OutStream.Write(bytes, 0, bytes.length); - }, - Write$8: function (value) { - var TmpValue = System.Int64.clipu64(System.BitConverter.doubleToInt64Bits(value)); - this._buffer[System.Array.index(0, this._buffer)] = System.Int64.clipu8(TmpValue); - this._buffer[System.Array.index(1, this._buffer)] = System.Int64.clipu8(TmpValue.shru(8)); - this._buffer[System.Array.index(2, this._buffer)] = System.Int64.clipu8(TmpValue.shru(16)); - this._buffer[System.Array.index(3, this._buffer)] = System.Int64.clipu8(TmpValue.shru(24)); - this._buffer[System.Array.index(4, this._buffer)] = System.Int64.clipu8(TmpValue.shru(32)); - this._buffer[System.Array.index(5, this._buffer)] = System.Int64.clipu8(TmpValue.shru(40)); - this._buffer[System.Array.index(6, this._buffer)] = System.Int64.clipu8(TmpValue.shru(48)); - this._buffer[System.Array.index(7, this._buffer)] = System.Int64.clipu8(TmpValue.shru(56)); - this.OutStream.Write(this._buffer, 0, 8); - }, - Write$7: function (value) { - var buf = value.getBytes(); - this.OutStream.Write(buf, 0, 23); - }, - Write$9: function (value) { - this._buffer[System.Array.index(0, this._buffer)] = value & 255; - this._buffer[System.Array.index(1, this._buffer)] = (value >> 8) & 255; - this.OutStream.Write(this._buffer, 0, 2); - }, - Write$15: function (value) { - this._buffer[System.Array.index(0, this._buffer)] = value & 255; - this._buffer[System.Array.index(1, this._buffer)] = (value >> 8) & 255; - this.OutStream.Write(this._buffer, 0, 2); - }, - Write$10: function (value) { - this._buffer[System.Array.index(0, this._buffer)] = value & 255; - this._buffer[System.Array.index(1, this._buffer)] = (value >> 8) & 255; - this._buffer[System.Array.index(2, this._buffer)] = (value >> 16) & 255; - this._buffer[System.Array.index(3, this._buffer)] = (value >> 24) & 255; - this.OutStream.Write(this._buffer, 0, 4); - }, - Write$16: function (value) { - this._buffer[System.Array.index(0, this._buffer)] = value & 255; - this._buffer[System.Array.index(1, this._buffer)] = (value >>> 8) & 255; - this._buffer[System.Array.index(2, this._buffer)] = (value >>> 16) & 255; - this._buffer[System.Array.index(3, this._buffer)] = (value >>> 24) & 255; - this.OutStream.Write(this._buffer, 0, 4); - }, - Write$11: function (value) { - this._buffer[System.Array.index(0, this._buffer)] = System.Int64.clipu8(value); - this._buffer[System.Array.index(1, this._buffer)] = System.Int64.clipu8(value.shr(8)); - this._buffer[System.Array.index(2, this._buffer)] = System.Int64.clipu8(value.shr(16)); - this._buffer[System.Array.index(3, this._buffer)] = System.Int64.clipu8(value.shr(24)); - this._buffer[System.Array.index(4, this._buffer)] = System.Int64.clipu8(value.shr(32)); - this._buffer[System.Array.index(5, this._buffer)] = System.Int64.clipu8(value.shr(40)); - this._buffer[System.Array.index(6, this._buffer)] = System.Int64.clipu8(value.shr(48)); - this._buffer[System.Array.index(7, this._buffer)] = System.Int64.clipu8(value.shr(56)); - this.OutStream.Write(this._buffer, 0, 8); - }, - Write$17: function (value) { - this._buffer[System.Array.index(0, this._buffer)] = System.Int64.clipu8(value); - this._buffer[System.Array.index(1, this._buffer)] = System.Int64.clipu8(value.shru(8)); - this._buffer[System.Array.index(2, this._buffer)] = System.Int64.clipu8(value.shru(16)); - this._buffer[System.Array.index(3, this._buffer)] = System.Int64.clipu8(value.shru(24)); - this._buffer[System.Array.index(4, this._buffer)] = System.Int64.clipu8(value.shru(32)); - this._buffer[System.Array.index(5, this._buffer)] = System.Int64.clipu8(value.shru(40)); - this._buffer[System.Array.index(6, this._buffer)] = System.Int64.clipu8(value.shru(48)); - this._buffer[System.Array.index(7, this._buffer)] = System.Int64.clipu8(value.shru(56)); - this.OutStream.Write(this._buffer, 0, 8); - }, - Write$13: function (value) { - var TmpValue = System.BitConverter.toUInt32(System.BitConverter.getBytes$6(value), 0); - this._buffer[System.Array.index(0, this._buffer)] = TmpValue & 255; - this._buffer[System.Array.index(1, this._buffer)] = (TmpValue >>> 8) & 255; - this._buffer[System.Array.index(2, this._buffer)] = (TmpValue >>> 16) & 255; - this._buffer[System.Array.index(3, this._buffer)] = (TmpValue >>> 24) & 255; - this.OutStream.Write(this._buffer, 0, 4); - }, - Write$14: function (value) { - if (value == null) { - throw new System.ArgumentNullException.$ctor1("value"); - } - - var buffer = this._encoding.GetBytes$2(value); - var len = buffer.length; - this.Write7BitEncodedInt(len); - this.OutStream.Write(buffer, 0, len); - }, - Write7BitEncodedInt: function (value) { - var v = value >>> 0; - while (v >= 128) { - this.Write$1(((((v | 128) >>> 0)) & 255)); - v = v >>> 7; - } - this.Write$1((v & 255)); - } - } - }); - - // @source Stream.js - - H5.define("System.IO.Stream", { - inherits: [System.IDisposable], - statics: { - fields: { - _DefaultCopyBufferSize: 0, - Null: null - }, - ctors: { - init: function () { - this._DefaultCopyBufferSize = 81920; - this.Null = new System.IO.Stream.NullStream(); - } - }, - methods: { - Synchronized: function (stream) { - if (stream == null) { - throw new System.ArgumentNullException.$ctor1("stream"); - } - - return stream; - }, - BlockingEndRead: function (asyncResult) { - - return System.IO.Stream.SynchronousAsyncResult.EndRead(asyncResult); - }, - BlockingEndWrite: function (asyncResult) { - System.IO.Stream.SynchronousAsyncResult.EndWrite(asyncResult); - } - } - }, - props: { - CanTimeout: { - get: function () { - return false; - } - }, - ReadTimeout: { - get: function () { - throw new System.InvalidOperationException.ctor(); - }, - set: function (value) { - throw new System.InvalidOperationException.ctor(); - } - }, - WriteTimeout: { - get: function () { - throw new System.InvalidOperationException.ctor(); - }, - set: function (value) { - throw new System.InvalidOperationException.ctor(); - } - } - }, - alias: ["Dispose", "System$IDisposable$Dispose"], - methods: { - CopyTo: function (destination) { - if (destination == null) { - throw new System.ArgumentNullException.$ctor1("destination"); - } - if (!this.CanRead && !this.CanWrite) { - throw new System.Exception(); - } - if (!destination.CanRead && !destination.CanWrite) { - throw new System.Exception("destination"); - } - if (!this.CanRead) { - throw new System.NotSupportedException.ctor(); - } - if (!destination.CanWrite) { - throw new System.NotSupportedException.ctor(); - } - - this.InternalCopyTo(destination, System.IO.Stream._DefaultCopyBufferSize); - }, - CopyTo$1: function (destination, bufferSize) { - if (destination == null) { - throw new System.ArgumentNullException.$ctor1("destination"); - } - if (bufferSize <= 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("bufferSize"); - } - if (!this.CanRead && !this.CanWrite) { - throw new System.Exception(); - } - if (!destination.CanRead && !destination.CanWrite) { - throw new System.Exception("destination"); - } - if (!this.CanRead) { - throw new System.NotSupportedException.ctor(); - } - if (!destination.CanWrite) { - throw new System.NotSupportedException.ctor(); - } - - this.InternalCopyTo(destination, bufferSize); - }, - InternalCopyTo: function (destination, bufferSize) { - - var buffer = System.Array.init(bufferSize, 0, System.Byte); - var read; - while (((read = this.Read(buffer, 0, buffer.length))) !== 0) { - destination.Write(buffer, 0, read); - } - }, - Close: function () { - /* These are correct, but we'd have to fix PipeStream & NetworkStream very carefully. - Contract.Ensures(CanRead == false); - Contract.Ensures(CanWrite == false); - Contract.Ensures(CanSeek == false); - */ - - this.Dispose$1(true); - }, - Dispose: function () { - /* These are correct, but we'd have to fix PipeStream & NetworkStream very carefully. - Contract.Ensures(CanRead == false); - Contract.Ensures(CanWrite == false); - Contract.Ensures(CanSeek == false); - */ - - this.Close(); - }, - Dispose$1: function (disposing) { }, - BeginRead: function (buffer, offset, count, callback, state) { - return this.BeginReadInternal(buffer, offset, count, callback, state, false); - }, - BeginReadInternal: function (buffer, offset, count, callback, state, serializeAsynchronously) { - if (!this.CanRead) { - System.IO.__Error.ReadNotSupported(); - } - - return this.BlockingBeginRead(buffer, offset, count, callback, state); - }, - EndRead: function (asyncResult) { - if (asyncResult == null) { - throw new System.ArgumentNullException.$ctor1("asyncResult"); - } - - return System.IO.Stream.BlockingEndRead(asyncResult); - }, - BeginWrite: function (buffer, offset, count, callback, state) { - return this.BeginWriteInternal(buffer, offset, count, callback, state, false); - }, - BeginWriteInternal: function (buffer, offset, count, callback, state, serializeAsynchronously) { - if (!this.CanWrite) { - System.IO.__Error.WriteNotSupported(); - } - return this.BlockingBeginWrite(buffer, offset, count, callback, state); - }, - EndWrite: function (asyncResult) { - if (asyncResult == null) { - throw new System.ArgumentNullException.$ctor1("asyncResult"); - } - - System.IO.Stream.BlockingEndWrite(asyncResult); - }, - ReadByte: function () { - - var oneByteArray = System.Array.init(1, 0, System.Byte); - var r = this.Read(oneByteArray, 0, 1); - if (r === 0) { - return -1; - } - return oneByteArray[System.Array.index(0, oneByteArray)]; - }, - WriteByte: function (value) { - var oneByteArray = System.Array.init(1, 0, System.Byte); - oneByteArray[System.Array.index(0, oneByteArray)] = value; - this.Write(oneByteArray, 0, 1); - }, - BlockingBeginRead: function (buffer, offset, count, callback, state) { - - var asyncResult; - try { - var numRead = this.Read(buffer, offset, count); - asyncResult = new System.IO.Stream.SynchronousAsyncResult.$ctor1(numRead, state); - } catch ($e1) { - $e1 = System.Exception.create($e1); - var ex; - if (H5.is($e1, System.IO.IOException)) { - ex = $e1; - asyncResult = new System.IO.Stream.SynchronousAsyncResult.ctor(ex, state, false); - } else { - throw $e1; - } - } - - if (!H5.staticEquals(callback, null)) { - callback(asyncResult); - } - - return asyncResult; - }, - BlockingBeginWrite: function (buffer, offset, count, callback, state) { - - var asyncResult; - try { - this.Write(buffer, offset, count); - asyncResult = new System.IO.Stream.SynchronousAsyncResult.$ctor2(state); - } catch ($e1) { - $e1 = System.Exception.create($e1); - var ex; - if (H5.is($e1, System.IO.IOException)) { - ex = $e1; - asyncResult = new System.IO.Stream.SynchronousAsyncResult.ctor(ex, state, true); - } else { - throw $e1; - } - } - - if (!H5.staticEquals(callback, null)) { - callback(asyncResult); - } - - return asyncResult; - } - } - }); - - // @source BufferedStream.js - - H5.define("System.IO.BufferedStream", { - inherits: [System.IO.Stream], - statics: { - fields: { - _DefaultBufferSize: 0, - MaxShadowBufferSize: 0 - }, - ctors: { - init: function () { - this._DefaultBufferSize = 4096; - this.MaxShadowBufferSize = 81920; - } - } - }, - fields: { - _stream: null, - _buffer: null, - _bufferSize: 0, - _readPos: 0, - _readLen: 0, - _writePos: 0 - }, - props: { - UnderlyingStream: { - get: function () { - return this._stream; - } - }, - BufferSize: { - get: function () { - return this._bufferSize; - } - }, - CanRead: { - get: function () { - return this._stream != null && this._stream.CanRead; - } - }, - CanWrite: { - get: function () { - return this._stream != null && this._stream.CanWrite; - } - }, - CanSeek: { - get: function () { - return this._stream != null && this._stream.CanSeek; - } - }, - Length: { - get: function () { - this.EnsureNotClosed(); - - if (this._writePos > 0) { - this.FlushWrite(); - } - - return this._stream.Length; - } - }, - Position: { - get: function () { - this.EnsureNotClosed(); - this.EnsureCanSeek(); - - return this._stream.Position.add(System.Int64((((((this._readPos - this._readLen) | 0) + this._writePos) | 0)))); - }, - set: function (value) { - if (value.lt(System.Int64(0))) { - throw new System.ArgumentOutOfRangeException.$ctor1("value"); - } - - this.EnsureNotClosed(); - this.EnsureCanSeek(); - - if (this._writePos > 0) { - this.FlushWrite(); - } - - this._readPos = 0; - this._readLen = 0; - this._stream.Seek(value, 0); - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.IO.Stream.ctor.call(this); - }, - $ctor1: function (stream) { - System.IO.BufferedStream.$ctor2.call(this, stream, System.IO.BufferedStream._DefaultBufferSize); - }, - $ctor2: function (stream, bufferSize) { - this.$initialize(); - System.IO.Stream.ctor.call(this); - - if (stream == null) { - throw new System.ArgumentNullException.$ctor1("stream"); - } - - if (bufferSize <= 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("bufferSize"); - } - - this._stream = stream; - this._bufferSize = bufferSize; - - - if (!this._stream.CanRead && !this._stream.CanWrite) { - System.IO.__Error.StreamIsClosed(); - } - } - }, - methods: { - EnsureNotClosed: function () { - - if (this._stream == null) { - System.IO.__Error.StreamIsClosed(); - } - }, - EnsureCanSeek: function () { - - - if (!this._stream.CanSeek) { - System.IO.__Error.SeekNotSupported(); - } - }, - EnsureCanRead: function () { - - - if (!this._stream.CanRead) { - System.IO.__Error.ReadNotSupported(); - } - }, - EnsureCanWrite: function () { - - - if (!this._stream.CanWrite) { - System.IO.__Error.WriteNotSupported(); - } - }, - EnsureShadowBufferAllocated: function () { - - - if (this._buffer.length !== this._bufferSize || this._bufferSize >= System.IO.BufferedStream.MaxShadowBufferSize) { - return; - } - - var shadowBuffer = System.Array.init(Math.min(((this._bufferSize + this._bufferSize) | 0), System.IO.BufferedStream.MaxShadowBufferSize), 0, System.Byte); - System.Array.copy(this._buffer, 0, shadowBuffer, 0, this._writePos); - this._buffer = shadowBuffer; - }, - EnsureBufferAllocated: function () { - - - if (this._buffer == null) { - this._buffer = System.Array.init(this._bufferSize, 0, System.Byte); - } - }, - Dispose$1: function (disposing) { - - try { - if (disposing && this._stream != null) { - try { - this.Flush(); - } finally { - this._stream.Close(); - } - } - } finally { - this._stream = null; - this._buffer = null; - - System.IO.Stream.prototype.Dispose$1.call(this, disposing); - } - }, - Flush: function () { - - this.EnsureNotClosed(); - - if (this._writePos > 0) { - - this.FlushWrite(); - return; - } - - if (this._readPos < this._readLen) { - - if (!this._stream.CanSeek) { - return; - } - - this.FlushRead(); - - if (this._stream.CanWrite || H5.is(this._stream, System.IO.BufferedStream)) { - this._stream.Flush(); - } - - return; - } - - if (this._stream.CanWrite || H5.is(this._stream, System.IO.BufferedStream)) { - this._stream.Flush(); - } - - this._writePos = (this._readPos = (this._readLen = 0)); - }, - FlushRead: function () { - - - if (((this._readPos - this._readLen) | 0) !== 0) { - this._stream.Seek(System.Int64(this._readPos - this._readLen), 1); - } - - this._readPos = 0; - this._readLen = 0; - }, - ClearReadBufferBeforeWrite: function () { - - - - if (this._readPos === this._readLen) { - - this._readPos = (this._readLen = 0); - return; - } - - - if (!this._stream.CanSeek) { - throw new System.NotSupportedException.ctor(); - } - - this.FlushRead(); - }, - FlushWrite: function () { - - - this._stream.Write(this._buffer, 0, this._writePos); - this._writePos = 0; - this._stream.Flush(); - }, - ReadFromBuffer: function (array, offset, count) { - - var readBytes = (this._readLen - this._readPos) | 0; - - if (readBytes === 0) { - return 0; - } - - - if (readBytes > count) { - readBytes = count; - } - - System.Array.copy(this._buffer, this._readPos, array, offset, readBytes); - this._readPos = (this._readPos + readBytes) | 0; - - return readBytes; - }, - ReadFromBuffer$1: function (array, offset, count, error) { - - try { - - error.v = null; - return this.ReadFromBuffer(array, offset, count); - - } catch (ex) { - ex = System.Exception.create(ex); - error.v = ex; - return 0; - } - }, - Read: function (array, offset, count) { - - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - if (offset < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("offset"); - } - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - if (((array.length - offset) | 0) < count) { - throw new System.ArgumentException.ctor(); - } - - this.EnsureNotClosed(); - this.EnsureCanRead(); - - var bytesFromBuffer = this.ReadFromBuffer(array, offset, count); - - - if (bytesFromBuffer === count) { - return bytesFromBuffer; - } - - var alreadySatisfied = bytesFromBuffer; - if (bytesFromBuffer > 0) { - count = (count - bytesFromBuffer) | 0; - offset = (offset + bytesFromBuffer) | 0; - } - - this._readPos = (this._readLen = 0); - - if (this._writePos > 0) { - this.FlushWrite(); - } - - if (count >= this._bufferSize) { - - return ((this._stream.Read(array, offset, count) + alreadySatisfied) | 0); - } - - this.EnsureBufferAllocated(); - this._readLen = this._stream.Read(this._buffer, 0, this._bufferSize); - - bytesFromBuffer = this.ReadFromBuffer(array, offset, count); - - - return ((bytesFromBuffer + alreadySatisfied) | 0); - }, - ReadByte: function () { - - this.EnsureNotClosed(); - this.EnsureCanRead(); - - if (this._readPos === this._readLen) { - - if (this._writePos > 0) { - this.FlushWrite(); - } - - this.EnsureBufferAllocated(); - this._readLen = this._stream.Read(this._buffer, 0, this._bufferSize); - this._readPos = 0; - } - - if (this._readPos === this._readLen) { - return -1; - } - - var b = this._buffer[System.Array.index(H5.identity(this._readPos, ((this._readPos = (this._readPos + 1) | 0))), this._buffer)]; - return b; - }, - WriteToBuffer: function (array, offset, count) { - - var bytesToWrite = Math.min(((this._bufferSize - this._writePos) | 0), count.v); - - if (bytesToWrite <= 0) { - return; - } - - this.EnsureBufferAllocated(); - System.Array.copy(array, offset.v, this._buffer, this._writePos, bytesToWrite); - - this._writePos = (this._writePos + bytesToWrite) | 0; - count.v = (count.v - bytesToWrite) | 0; - offset.v = (offset.v + bytesToWrite) | 0; - }, - WriteToBuffer$1: function (array, offset, count, error) { - - try { - - error.v = null; - this.WriteToBuffer(array, offset, count); - - } catch (ex) { - ex = System.Exception.create(ex); - error.v = ex; - } - }, - Write: function (array, offset, count) { - offset = {v:offset}; - count = {v:count}; - - if (array == null) { - throw new System.ArgumentNullException.$ctor1("array"); - } - if (offset.v < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("offset"); - } - if (count.v < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - if (((array.length - offset.v) | 0) < count.v) { - throw new System.ArgumentException.ctor(); - } - - this.EnsureNotClosed(); - this.EnsureCanWrite(); - - if (this._writePos === 0) { - this.ClearReadBufferBeforeWrite(); - } - - - - var totalUserBytes; - var useBuffer; - totalUserBytes = H5.Int.check(this._writePos + count.v, System.Int32); - useBuffer = (H5.Int.check(totalUserBytes + count.v, System.Int32) < (H5.Int.check(this._bufferSize + this._bufferSize, System.Int32))); - - if (useBuffer) { - - this.WriteToBuffer(array, offset, count); - - if (this._writePos < this._bufferSize) { - - return; - } - - - this._stream.Write(this._buffer, 0, this._writePos); - this._writePos = 0; - - this.WriteToBuffer(array, offset, count); - - - } else { - - if (this._writePos > 0) { - - - if (totalUserBytes <= (((this._bufferSize + this._bufferSize) | 0)) && totalUserBytes <= System.IO.BufferedStream.MaxShadowBufferSize) { - - this.EnsureShadowBufferAllocated(); - System.Array.copy(array, offset.v, this._buffer, this._writePos, count.v); - this._stream.Write(this._buffer, 0, totalUserBytes); - this._writePos = 0; - return; - } - - this._stream.Write(this._buffer, 0, this._writePos); - this._writePos = 0; - } - - this._stream.Write(array, offset.v, count.v); - } - }, - WriteByte: function (value) { - - this.EnsureNotClosed(); - - if (this._writePos === 0) { - - this.EnsureCanWrite(); - this.ClearReadBufferBeforeWrite(); - this.EnsureBufferAllocated(); - } - - if (this._writePos >= ((this._bufferSize - 1) | 0)) { - this.FlushWrite(); - } - - this._buffer[System.Array.index(H5.identity(this._writePos, ((this._writePos = (this._writePos + 1) | 0))), this._buffer)] = value; - - }, - Seek: function (offset, origin) { - - this.EnsureNotClosed(); - this.EnsureCanSeek(); - - if (this._writePos > 0) { - - this.FlushWrite(); - return this._stream.Seek(offset, origin); - } - - - if (((this._readLen - this._readPos) | 0) > 0 && origin === 1) { - - offset = offset.sub(System.Int64((((this._readLen - this._readPos) | 0)))); - } - - var oldPos = this.Position; - - var newPos = this._stream.Seek(offset, origin); - - - this._readPos = System.Int64.clip32(newPos.sub((oldPos.sub(System.Int64(this._readPos))))); - - if (0 <= this._readPos && this._readPos < this._readLen) { - - this._stream.Seek(System.Int64(this._readLen - this._readPos), 1); - - } else { - - this._readPos = (this._readLen = 0); - } - - return newPos; - }, - SetLength: function (value) { - - if (value.lt(System.Int64(0))) { - throw new System.ArgumentOutOfRangeException.$ctor1("value"); - } - - this.EnsureNotClosed(); - this.EnsureCanSeek(); - this.EnsureCanWrite(); - - this.Flush(); - this._stream.SetLength(value); - } - } - }); - - // @source IOException.js - - H5.define("System.IO.IOException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "I/O error occurred."); - this.HResult = -2146232800; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146232800; - }, - $ctor3: function (message, hresult) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = hresult; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2146232800; - } - } - }); - - // @source EndOfStreamException.js - - H5.define("System.IO.EndOfStreamException", { - inherits: [System.IO.IOException], - ctors: { - ctor: function () { - this.$initialize(); - System.IO.IOException.$ctor1.call(this, "Arg_EndOfStreamException"); - }, - $ctor1: function (message) { - this.$initialize(); - System.IO.IOException.$ctor1.call(this, message); - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.IO.IOException.$ctor2.call(this, message, innerException); - } - } - }); - - // @source File.js - - H5.define("System.IO.File", { - statics: { - methods: { - OpenText: function (path) { - if (path == null) { - throw new System.ArgumentNullException.$ctor1("path"); - } - return new System.IO.StreamReader.$ctor7(path); - }, - OpenRead: function (path) { - return new System.IO.FileStream.$ctor1(path, 3); - }, - ReadAllText: function (path) { - if (path == null) { - throw new System.ArgumentNullException.$ctor1("path"); - } - if (path.length === 0) { - throw new System.ArgumentException.$ctor1("Argument_EmptyPath"); - } - - return System.IO.File.InternalReadAllText(path, System.Text.Encoding.UTF8, true); - }, - ReadAllText$1: function (path, encoding) { - if (path == null) { - throw new System.ArgumentNullException.$ctor1("path"); - } - if (encoding == null) { - throw new System.ArgumentNullException.$ctor1("encoding"); - } - if (path.length === 0) { - throw new System.ArgumentException.$ctor1("Argument_EmptyPath"); - } - - return System.IO.File.InternalReadAllText(path, encoding, true); - }, - InternalReadAllText: function (path, encoding, checkHost) { - - var sr = new System.IO.StreamReader.$ctor12(path, encoding, true, System.IO.StreamReader.DefaultBufferSize, checkHost); - try { - return sr.ReadToEnd(); - } - finally { - if (H5.hasValue(sr)) { - sr.System$IDisposable$Dispose(); - } - } - }, - ReadAllBytes: function (path) { - return System.IO.File.InternalReadAllBytes(path, true); - }, - InternalReadAllBytes: function (path, checkHost) { - var bytes; - var fs = new System.IO.FileStream.$ctor1(path, 3); - try { - var index = 0; - var fileLength = fs.Length; - if (fileLength.gt(System.Int64(2147483647))) { - throw new System.IO.IOException.$ctor1("IO.IO_FileTooLong2GB"); - } - var count = System.Int64.clip32(fileLength); - bytes = System.Array.init(count, 0, System.Byte); - while (count > 0) { - var n = fs.Read(bytes, index, count); - if (n === 0) { - System.IO.__Error.EndOfFile(); - } - index = (index + n) | 0; - count = (count - n) | 0; - } - } - finally { - if (H5.hasValue(fs)) { - fs.System$IDisposable$Dispose(); - } - } - return bytes; - }, - ReadAllLines: function (path) { - if (path == null) { - throw new System.ArgumentNullException.$ctor1("path"); - } - if (path.length === 0) { - throw new System.ArgumentException.$ctor1("Argument_EmptyPath"); - } - - return System.IO.File.InternalReadAllLines(path, System.Text.Encoding.UTF8); - }, - ReadAllLines$1: function (path, encoding) { - if (path == null) { - throw new System.ArgumentNullException.$ctor1("path"); - } - if (encoding == null) { - throw new System.ArgumentNullException.$ctor1("encoding"); - } - if (path.length === 0) { - throw new System.ArgumentException.$ctor1("Argument_EmptyPath"); - } - - return System.IO.File.InternalReadAllLines(path, encoding); - }, - InternalReadAllLines: function (path, encoding) { - - var line; - var lines = new (System.Collections.Generic.List$1(System.String)).ctor(); - - var sr = new System.IO.StreamReader.$ctor9(path, encoding); - try { - while (((line = sr.ReadLine())) != null) { - lines.add(line); - } - } - finally { - if (H5.hasValue(sr)) { - sr.System$IDisposable$Dispose(); - } - } - - return lines.ToArray(); - }, - ReadLines: function (path) { - if (path == null) { - throw new System.ArgumentNullException.$ctor1("path"); - } - if (path.length === 0) { - throw new System.ArgumentException.$ctor3("Argument_EmptyPath", "path"); - } - - return System.IO.ReadLinesIterator.CreateIterator(path, System.Text.Encoding.UTF8); - }, - ReadLines$1: function (path, encoding) { - if (path == null) { - throw new System.ArgumentNullException.$ctor1("path"); - } - if (encoding == null) { - throw new System.ArgumentNullException.$ctor1("encoding"); - } - if (path.length === 0) { - throw new System.ArgumentException.$ctor3("Argument_EmptyPath", "path"); - } - - return System.IO.ReadLinesIterator.CreateIterator(path, encoding); - } - } - } - }); - - // @source FileMode.js - - H5.define("System.IO.FileMode", { - $kind: "enum", - statics: { - fields: { - CreateNew: 1, - Create: 2, - Open: 3, - OpenOrCreate: 4, - Truncate: 5, - Append: 6 - } - } - }); - - // @source FileOptions.js - - H5.define("System.IO.FileOptions", { - $kind: "enum", - statics: { - fields: { - None: 0, - WriteThrough: -2147483648, - Asynchronous: 1073741824, - RandomAccess: 268435456, - DeleteOnClose: 67108864, - SequentialScan: 134217728, - Encrypted: 16384 - } - }, - $flags: true - }); - - // @source FileShare.js - - H5.define("System.IO.FileShare", { - $kind: "enum", - statics: { - fields: { - None: 0, - Read: 1, - Write: 2, - ReadWrite: 3, - Delete: 4, - Inheritable: 16 - } - }, - $flags: true - }); - - // @source FileStream.js - - H5.define("System.IO.FileStream", { - inherits: [System.IO.Stream], - statics: { - methods: { - FromFile: function (file) { - var completer = new System.Threading.Tasks.TaskCompletionSource(); - var fileReader = new FileReader(); - fileReader.onload = function () { - completer.setResult(new System.IO.FileStream.ctor(fileReader.result, file.name)); - }; - fileReader.onerror = function (e) { - completer.setException(new System.SystemException.$ctor1(H5.unbox(e).target.error.As())); - }; - fileReader.readAsArrayBuffer(file); - - return completer.task; - }, - ReadBytes: function (path) { - if (H5.isNode) { - var fs = require("fs"); - return H5.cast(fs.readFileSync(path), ArrayBuffer); - } else { - var req = new XMLHttpRequest(); - req.open("GET", path, false); - req.overrideMimeType("text/plain; charset=x-user-defined"); - req.send(null); - if (req.status !== 200) { - throw new System.IO.IOException.$ctor1(System.String.concat("Status of request to " + (path || "") + " returned status: ", req.status)); - } - - var text = req.responseText; - var resultArray = new Uint8Array(text.length); - System.String.toCharArray(text, 0, text.length).forEach(function (v, index, array) { - var $t; - return ($t = (v & 255) & 255, resultArray[index] = $t, $t); - }); - return resultArray.buffer; - } - }, - ReadBytesAsync: function (path) { - var tcs = new System.Threading.Tasks.TaskCompletionSource(); - - if (H5.isNode) { - var fs = require("fs"); - fs.readFile(path, H5.fn.$build([function (err, data) { - if (err != null) { - throw new System.IO.IOException.ctor(); - } - - tcs.setResult(data); - }])); - } else { - var req = new XMLHttpRequest(); - req.open("GET", path, true); - req.overrideMimeType("text/plain; charset=binary-data"); - req.send(null); - - req.onreadystatechange = function () { - if (req.readyState !== 4) { - return; - } - - if (req.status !== 200) { - throw new System.IO.IOException.$ctor1(System.String.concat("Status of request to " + (path || "") + " returned status: ", req.status)); - } - - var text = req.responseText; - var resultArray = new Uint8Array(text.length); - System.String.toCharArray(text, 0, text.length).forEach(function (v, index, array) { - var $t; - return ($t = (v & 255) & 255, resultArray[index] = $t, $t); - }); - tcs.setResult(resultArray.buffer); - }; - } - - return tcs.task; - } - } - }, - fields: { - name: null, - _buffer: null - }, - props: { - CanRead: { - get: function () { - return true; - } - }, - CanWrite: { - get: function () { - return false; - } - }, - CanSeek: { - get: function () { - return false; - } - }, - IsAsync: { - get: function () { - return false; - } - }, - Name: { - get: function () { - return this.name; - } - }, - Length: { - get: function () { - return System.Int64(this.GetInternalBuffer().byteLength); - } - }, - Position: System.Int64(0) - }, - ctors: { - $ctor1: function (path, mode) { - this.$initialize(); - System.IO.Stream.ctor.call(this); - this.name = path; - }, - ctor: function (buffer, name) { - this.$initialize(); - System.IO.Stream.ctor.call(this); - this._buffer = buffer; - this.name = name; - } - }, - methods: { - Flush: function () { }, - Seek: function (offset, origin) { - throw new System.NotImplementedException.ctor(); - }, - SetLength: function (value) { - throw new System.NotImplementedException.ctor(); - }, - Write: function (buffer, offset, count) { - throw new System.NotImplementedException.ctor(); - }, - GetInternalBuffer: function () { - if (this._buffer == null) { - this._buffer = System.IO.FileStream.ReadBytes(this.name); - - } - - return this._buffer; - }, - EnsureBufferAsync: function () { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - if (this._buffer == null) { - this._buffer = (await H5.toPromise(System.IO.FileStream.ReadBytesAsync(this.name))); - } - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - Read: function (buffer, offset, count) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor1("buffer"); - } - - if (offset < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("offset"); - } - - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - - if ((((buffer.length - offset) | 0)) < count) { - throw new System.ArgumentException.ctor(); - } - - var num = this.Length.sub(this.Position); - if (num.gt(System.Int64(count))) { - num = System.Int64(count); - } - - if (num.lte(System.Int64(0))) { - return 0; - } - - var byteBuffer = new Uint8Array(this.GetInternalBuffer()); - if (num.gt(System.Int64(8))) { - for (var n = 0; System.Int64(n).lt(num); n = (n + 1) | 0) { - buffer[System.Array.index(((n + offset) | 0), buffer)] = byteBuffer[this.Position.add(System.Int64(n))]; - } - } else { - var num1 = num; - while (true) { - var num2 = num1.sub(System.Int64(1)); - num1 = num2; - if (num2.lt(System.Int64(0))) { - break; - } - buffer[System.Array.index(System.Int64.toNumber(System.Int64(offset).add(num1)), buffer)] = byteBuffer[this.Position.add(num1)]; - } - } - this.Position = this.Position.add(num); - return System.Int64.clip32(num); - } - } - }); - - // @source Iterator.js - - H5.define("System.IO.Iterator$1", function (TSource) { return { - inherits: [System.Collections.Generic.IEnumerable$1(TSource),System.Collections.Generic.IEnumerator$1(TSource)], - fields: { - state: 0, - current: H5.getDefaultValue(TSource) - }, - props: { - Current: { - get: function () { - return this.current; - } - }, - System$Collections$IEnumerator$Current: { - get: function () { - return this.Current; - } - } - }, - alias: [ - "Current", ["System$Collections$Generic$IEnumerator$1$" + H5.getTypeAlias(TSource) + "$Current$1", "System$Collections$Generic$IEnumerator$1$Current$1"], - "Dispose", "System$IDisposable$Dispose", - "GetEnumerator", ["System$Collections$Generic$IEnumerable$1$" + H5.getTypeAlias(TSource) + "$GetEnumerator", "System$Collections$Generic$IEnumerable$1$GetEnumerator"] - ], - ctors: { - ctor: function () { - this.$initialize(); - } - }, - methods: { - Dispose: function () { - this.Dispose$1(true); - }, - Dispose$1: function (disposing) { - this.current = H5.getDefaultValue(TSource); - this.state = -1; - }, - GetEnumerator: function () { - if (this.state === 0) { - this.state = 1; - return this; - } - - var duplicate = this.Clone(); - duplicate.state = 1; - return duplicate; - }, - System$Collections$IEnumerable$GetEnumerator: function () { - return this.GetEnumerator(); - }, - System$Collections$IEnumerator$reset: function () { - throw new System.NotSupportedException.ctor(); - } - } - }; }); - - // @source MemoryStream.js - - H5.define("System.IO.MemoryStream", { - inherits: [System.IO.Stream], - statics: { - fields: { - MemStreamMaxLength: 0 - }, - ctors: { - init: function () { - this.MemStreamMaxLength = 2147483647; - } - } - }, - fields: { - _buffer: null, - _origin: 0, - _position: 0, - _length: 0, - _capacity: 0, - _expandable: false, - _writable: false, - _exposable: false, - _isOpen: false - }, - props: { - CanRead: { - get: function () { - return this._isOpen; - } - }, - CanSeek: { - get: function () { - return this._isOpen; - } - }, - CanWrite: { - get: function () { - return this._writable; - } - }, - Capacity: { - get: function () { - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - return ((this._capacity - this._origin) | 0); - }, - set: function (value) { - if (System.Int64(value).lt(this.Length)) { - throw new System.ArgumentOutOfRangeException.$ctor4("value", "ArgumentOutOfRange_SmallCapacity"); - } - - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - if (!this._expandable && (value !== this.Capacity)) { - System.IO.__Error.MemoryStreamNotExpandable(); - } - - if (this._expandable && value !== this._capacity) { - if (value > 0) { - var newBuffer = System.Array.init(value, 0, System.Byte); - if (this._length > 0) { - System.Array.copy(this._buffer, 0, newBuffer, 0, this._length); - } - this._buffer = newBuffer; - } else { - this._buffer = null; - } - this._capacity = value; - } - } - }, - Length: { - get: function () { - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - return System.Int64(this._length - this._origin); - } - }, - Position: { - get: function () { - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - return System.Int64(this._position - this._origin); - }, - set: function (value) { - if (value.lt(System.Int64(0))) { - throw new System.ArgumentOutOfRangeException.$ctor4("value", "ArgumentOutOfRange_NeedNonNegNum"); - } - - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - - if (value.gt(System.Int64(System.IO.MemoryStream.MemStreamMaxLength))) { - throw new System.ArgumentOutOfRangeException.$ctor4("value", "ArgumentOutOfRange_StreamLength"); - } - this._position = (this._origin + System.Int64.clip32(value)) | 0; - } - } - }, - ctors: { - ctor: function () { - System.IO.MemoryStream.$ctor6.call(this, 0); - }, - $ctor6: function (capacity) { - this.$initialize(); - System.IO.Stream.ctor.call(this); - if (capacity < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("capacity", "ArgumentOutOfRange_NegativeCapacity"); - } - - this._buffer = System.Array.init(capacity, 0, System.Byte); - this._capacity = capacity; - this._expandable = true; - this._writable = true; - this._exposable = true; - this._origin = 0; - this._isOpen = true; - }, - $ctor1: function (buffer) { - System.IO.MemoryStream.$ctor2.call(this, buffer, true); - }, - $ctor2: function (buffer, writable) { - this.$initialize(); - System.IO.Stream.ctor.call(this); - if (buffer == null) { - throw new System.ArgumentNullException.$ctor3("buffer", "ArgumentNull_Buffer"); - } - this._buffer = buffer; - this._length = (this._capacity = buffer.length); - this._writable = writable; - this._exposable = false; - this._origin = 0; - this._isOpen = true; - }, - $ctor3: function (buffer, index, count) { - System.IO.MemoryStream.$ctor5.call(this, buffer, index, count, true, false); - }, - $ctor4: function (buffer, index, count, writable) { - System.IO.MemoryStream.$ctor5.call(this, buffer, index, count, writable, false); - }, - $ctor5: function (buffer, index, count, writable, publiclyVisible) { - this.$initialize(); - System.IO.Stream.ctor.call(this); - if (buffer == null) { - throw new System.ArgumentNullException.$ctor3("buffer", "ArgumentNull_Buffer"); - } - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("index", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (((buffer.length - index) | 0) < count) { - throw new System.ArgumentException.$ctor1("Argument_InvalidOffLen"); - } - - this._buffer = buffer; - this._origin = (this._position = index); - this._length = (this._capacity = (index + count) | 0); - this._writable = writable; - this._exposable = publiclyVisible; - this._expandable = false; - this._isOpen = true; - } - }, - methods: { - EnsureWriteable: function () { - if (!this.CanWrite) { - System.IO.__Error.WriteNotSupported(); - } - }, - Dispose$1: function (disposing) { - try { - if (disposing) { - this._isOpen = false; - this._writable = false; - this._expandable = false; - } - } finally { - System.IO.Stream.prototype.Dispose$1.call(this, disposing); - } - }, - EnsureCapacity: function (value) { - if (value < 0) { - throw new System.IO.IOException.$ctor1("IO.IO_StreamTooLong"); - } - if (value > this._capacity) { - var newCapacity = value; - if (newCapacity < 256) { - newCapacity = 256; - } - if (newCapacity < H5.Int.mul(this._capacity, 2)) { - newCapacity = H5.Int.mul(this._capacity, 2); - } - if ((((H5.Int.mul(this._capacity, 2))) >>> 0) > 2147483591) { - newCapacity = value > 2147483591 ? value : 2147483591; - } - - this.Capacity = newCapacity; - return true; - } - return false; - }, - Flush: function () { }, - GetBuffer: function () { - if (!this._exposable) { - throw new System.Exception("UnauthorizedAccess_MemStreamBuffer"); - } - return this._buffer; - }, - TryGetBuffer: function (buffer) { - if (!this._exposable) { - buffer.v = H5.getDefaultValue(System.ArraySegment); - return false; - } - - buffer.v = new System.ArraySegment(this._buffer, this._origin, (((this._length - this._origin) | 0))); - return true; - }, - InternalGetBuffer: function () { - return this._buffer; - }, - InternalGetPosition: function () { - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - return this._position; - }, - InternalReadInt32: function () { - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - - var pos = ((this._position = (this._position + 4) | 0)); - if (pos > this._length) { - this._position = this._length; - System.IO.__Error.EndOfFile(); - } - return this._buffer[System.Array.index(((pos - 4) | 0), this._buffer)] | this._buffer[System.Array.index(((pos - 3) | 0), this._buffer)] << 8 | this._buffer[System.Array.index(((pos - 2) | 0), this._buffer)] << 16 | this._buffer[System.Array.index(((pos - 1) | 0), this._buffer)] << 24; - }, - InternalEmulateRead: function (count) { - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - - var n = (this._length - this._position) | 0; - if (n > count) { - n = count; - } - if (n < 0) { - n = 0; - } - - this._position = (this._position + n) | 0; - return n; - }, - Read: function (buffer, offset, count) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor3("buffer", "ArgumentNull_Buffer"); - } - if (offset < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("offset", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (((buffer.length - offset) | 0) < count) { - throw new System.ArgumentException.$ctor1("Argument_InvalidOffLen"); - } - - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - - var n = (this._length - this._position) | 0; - if (n > count) { - n = count; - } - if (n <= 0) { - return 0; - } - - - if (n <= 8) { - var byteCount = n; - while (((byteCount = (byteCount - 1) | 0)) >= 0) { - buffer[System.Array.index(((offset + byteCount) | 0), buffer)] = this._buffer[System.Array.index(((this._position + byteCount) | 0), this._buffer)]; - } - } else { - System.Array.copy(this._buffer, this._position, buffer, offset, n); - } - this._position = (this._position + n) | 0; - - return n; - }, - ReadByte: function () { - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - - if (this._position >= this._length) { - return -1; - } - - return this._buffer[System.Array.index(H5.identity(this._position, ((this._position = (this._position + 1) | 0))), this._buffer)]; - }, - Seek: function (offset, loc) { - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - - if (offset.gt(System.Int64(System.IO.MemoryStream.MemStreamMaxLength))) { - throw new System.ArgumentOutOfRangeException.$ctor4("offset", "ArgumentOutOfRange_StreamLength"); - } - switch (loc) { - case 0: - { - var tempPosition = ((this._origin + System.Int64.clip32(offset)) | 0); - if (offset.lt(System.Int64(0)) || tempPosition < this._origin) { - throw new System.IO.IOException.$ctor1("IO.IO_SeekBeforeBegin"); - } - this._position = tempPosition; - break; - } - case 1: - { - var tempPosition1 = ((this._position + System.Int64.clip32(offset)) | 0); - if (System.Int64(this._position).add(offset).lt(System.Int64(this._origin)) || tempPosition1 < this._origin) { - throw new System.IO.IOException.$ctor1("IO.IO_SeekBeforeBegin"); - } - this._position = tempPosition1; - break; - } - case 2: - { - var tempPosition2 = ((this._length + System.Int64.clip32(offset)) | 0); - if (System.Int64(this._length).add(offset).lt(System.Int64(this._origin)) || tempPosition2 < this._origin) { - throw new System.IO.IOException.$ctor1("IO.IO_SeekBeforeBegin"); - } - this._position = tempPosition2; - break; - } - default: - throw new System.ArgumentException.$ctor1("Argument_InvalidSeekOrigin"); - } - - return System.Int64(this._position); - }, - SetLength: function (value) { - if (value.lt(System.Int64(0)) || value.gt(System.Int64(2147483647))) { - throw new System.ArgumentOutOfRangeException.$ctor4("value", "ArgumentOutOfRange_StreamLength"); - } - this.EnsureWriteable(); - - if (value.gt(System.Int64((((2147483647 - this._origin) | 0))))) { - throw new System.ArgumentOutOfRangeException.$ctor4("value", "ArgumentOutOfRange_StreamLength"); - } - - var newLength = (this._origin + System.Int64.clip32(value)) | 0; - var allocatedNewArray = this.EnsureCapacity(newLength); - if (!allocatedNewArray && newLength > this._length) { - System.Array.fill(this._buffer, 0, this._length, ((newLength - this._length) | 0)); - } - this._length = newLength; - if (this._position > newLength) { - this._position = newLength; - } - - }, - ToArray: function () { - var copy = System.Array.init(((this._length - this._origin) | 0), 0, System.Byte); - System.Array.copy(this._buffer, this._origin, copy, 0, ((this._length - this._origin) | 0)); - return copy; - }, - Write: function (buffer, offset, count) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor3("buffer", "ArgumentNull_Buffer"); - } - if (offset < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("offset", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (((buffer.length - offset) | 0) < count) { - throw new System.ArgumentException.$ctor1("Argument_InvalidOffLen"); - } - - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - this.EnsureWriteable(); - - var i = (this._position + count) | 0; - if (i < 0) { - throw new System.IO.IOException.$ctor1("IO.IO_StreamTooLong"); - } - - if (i > this._length) { - var mustZero = this._position > this._length; - if (i > this._capacity) { - var allocatedNewArray = this.EnsureCapacity(i); - if (allocatedNewArray) { - mustZero = false; - } - } - if (mustZero) { - System.Array.fill(this._buffer, 0, this._length, ((i - this._length) | 0)); - } - this._length = i; - } - if ((count <= 8) && (!H5.referenceEquals(buffer, this._buffer))) { - var byteCount = count; - while (((byteCount = (byteCount - 1) | 0)) >= 0) { - this._buffer[System.Array.index(((this._position + byteCount) | 0), this._buffer)] = buffer[System.Array.index(((offset + byteCount) | 0), buffer)]; - } - } else { - System.Array.copy(buffer, offset, this._buffer, this._position, count); - } - this._position = i; - - }, - WriteByte: function (value) { - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - this.EnsureWriteable(); - - if (this._position >= this._length) { - var newLength = (this._position + 1) | 0; - var mustZero = this._position > this._length; - if (newLength >= this._capacity) { - var allocatedNewArray = this.EnsureCapacity(newLength); - if (allocatedNewArray) { - mustZero = false; - } - } - if (mustZero) { - System.Array.fill(this._buffer, 0, this._length, ((this._position - this._length) | 0)); - } - this._length = newLength; - } - this._buffer[System.Array.index(H5.identity(this._position, ((this._position = (this._position + 1) | 0))), this._buffer)] = value; - - }, - WriteTo: function (stream) { - if (stream == null) { - throw new System.ArgumentNullException.$ctor3("stream", "ArgumentNull_Stream"); - } - - if (!this._isOpen) { - System.IO.__Error.StreamIsClosed(); - } - stream.Write(this._buffer, this._origin, ((this._length - this._origin) | 0)); - } - } - }); - - // @source ReadLinesIterator.js - - H5.define("System.IO.ReadLinesIterator", { - inherits: [System.IO.Iterator$1(System.String)], - statics: { - methods: { - CreateIterator: function (path, encoding) { - return System.IO.ReadLinesIterator.CreateIterator$1(path, encoding, null); - }, - CreateIterator$1: function (path, encoding, reader) { - return new System.IO.ReadLinesIterator(path, encoding, reader || new System.IO.StreamReader.$ctor9(path, encoding)); - } - } - }, - fields: { - _path: null, - _encoding: null, - _reader: null - }, - alias: ["moveNext", "System$Collections$IEnumerator$moveNext"], - ctors: { - ctor: function (path, encoding, reader) { - this.$initialize(); - System.IO.Iterator$1(System.String).ctor.call(this); - - this._path = path; - this._encoding = encoding; - this._reader = reader; - } - }, - methods: { - moveNext: function () { - if (this._reader != null) { - this.current = this._reader.ReadLine(); - if (this.current != null) { - return true; - } - - this.Dispose(); - } - - return false; - }, - Clone: function () { - return System.IO.ReadLinesIterator.CreateIterator$1(this._path, this._encoding, this._reader); - }, - Dispose$1: function (disposing) { - try { - if (disposing) { - if (this._reader != null) { - this._reader.Dispose(); - } - } - } finally { - this._reader = null; - System.IO.Iterator$1(System.String).prototype.Dispose$1.call(this, disposing); - } - } - } - }); - - // @source SeekOrigin.js - - H5.define("System.IO.SeekOrigin", { - $kind: "enum", - statics: { - fields: { - Begin: 0, - Current: 1, - End: 2 - } - } - }); - - // @source NullStream.js - - H5.define("System.IO.Stream.NullStream", { - inherits: [System.IO.Stream], - $kind: "nested class", - props: { - CanRead: { - get: function () { - return true; - } - }, - CanWrite: { - get: function () { - return true; - } - }, - CanSeek: { - get: function () { - return true; - } - }, - Length: { - get: function () { - return System.Int64(0); - } - }, - Position: { - get: function () { - return System.Int64(0); - }, - set: function (value) { } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.IO.Stream.ctor.call(this); - } - }, - methods: { - Dispose$1: function (disposing) { }, - Flush: function () { }, - BeginRead: function (buffer, offset, count, callback, state) { - if (!this.CanRead) { - System.IO.__Error.ReadNotSupported(); - } - - return this.BlockingBeginRead(buffer, offset, count, callback, state); - }, - EndRead: function (asyncResult) { - if (asyncResult == null) { - throw new System.ArgumentNullException.$ctor1("asyncResult"); - } - - return System.IO.Stream.BlockingEndRead(asyncResult); - }, - BeginWrite: function (buffer, offset, count, callback, state) { - if (!this.CanWrite) { - System.IO.__Error.WriteNotSupported(); - } - - return this.BlockingBeginWrite(buffer, offset, count, callback, state); - }, - EndWrite: function (asyncResult) { - if (asyncResult == null) { - throw new System.ArgumentNullException.$ctor1("asyncResult"); - } - - System.IO.Stream.BlockingEndWrite(asyncResult); - }, - Read: function (buffer, offset, count) { - return 0; - }, - ReadByte: function () { - return -1; - }, - Write: function (buffer, offset, count) { }, - WriteByte: function (value) { }, - Seek: function (offset, origin) { - return System.Int64(0); - }, - SetLength: function (length) { } - } - }); - - // @source SynchronousAsyncResult.js - - H5.define("System.IO.Stream.SynchronousAsyncResult", { - inherits: [System.IAsyncResult], - $kind: "nested class", - statics: { - methods: { - EndRead: function (asyncResult) { - - var ar = H5.as(asyncResult, System.IO.Stream.SynchronousAsyncResult); - if (ar == null || ar._isWrite) { - System.IO.__Error.WrongAsyncResult(); - } - - if (ar._endXxxCalled) { - System.IO.__Error.EndReadCalledTwice(); - } - - ar._endXxxCalled = true; - - ar.ThrowIfError(); - return ar._bytesRead; - }, - EndWrite: function (asyncResult) { - - var ar = H5.as(asyncResult, System.IO.Stream.SynchronousAsyncResult); - if (ar == null || !ar._isWrite) { - System.IO.__Error.WrongAsyncResult(); - } - - if (ar._endXxxCalled) { - System.IO.__Error.EndWriteCalledTwice(); - } - - ar._endXxxCalled = true; - - ar.ThrowIfError(); - } - } - }, - fields: { - _stateObject: null, - _isWrite: false, - _exceptionInfo: null, - _endXxxCalled: false, - _bytesRead: 0 - }, - props: { - IsCompleted: { - get: function () { - return true; - } - }, - AsyncState: { - get: function () { - return this._stateObject; - } - }, - CompletedSynchronously: { - get: function () { - return true; - } - } - }, - alias: [ - "IsCompleted", "System$IAsyncResult$IsCompleted", - "AsyncState", "System$IAsyncResult$AsyncState", - "CompletedSynchronously", "System$IAsyncResult$CompletedSynchronously" - ], - ctors: { - $ctor1: function (bytesRead, asyncStateObject) { - this.$initialize(); - this._bytesRead = bytesRead; - this._stateObject = asyncStateObject; - }, - $ctor2: function (asyncStateObject) { - this.$initialize(); - this._stateObject = asyncStateObject; - this._isWrite = true; - }, - ctor: function (ex, asyncStateObject, isWrite) { - this.$initialize(); - this._exceptionInfo = ex; - this._stateObject = asyncStateObject; - this._isWrite = isWrite; - } - }, - methods: { - ThrowIfError: function () { - if (this._exceptionInfo != null) { - throw this._exceptionInfo; - } - } - } - }); - - // @source TextReader.js - - H5.define("System.IO.TextReader", { - inherits: [System.IDisposable], - statics: { - fields: { - Null: null - }, - ctors: { - init: function () { - this.Null = new System.IO.TextReader.NullTextReader(); - } - }, - methods: { - Synchronized: function (reader) { - if (reader == null) { - throw new System.ArgumentNullException.$ctor1("reader"); - } - - return reader; - } - } - }, - alias: ["Dispose", "System$IDisposable$Dispose"], - ctors: { - ctor: function () { - this.$initialize(); - } - }, - methods: { - Close: function () { - this.Dispose$1(true); - }, - Dispose: function () { - this.Dispose$1(true); - }, - Dispose$1: function (disposing) { }, - Peek: function () { - - return -1; - }, - Read: function () { - return -1; - }, - Read$1: function (buffer, index, count) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor1("buffer"); - } - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - if (((buffer.length - index) | 0) < count) { - throw new System.ArgumentException.ctor(); - } - - var n = 0; - do { - var ch = this.Read(); - if (ch === -1) { - break; - } - buffer[System.Array.index(((index + H5.identity(n, ((n = (n + 1) | 0)))) | 0), buffer)] = ch & 65535; - } while (n < count); - return n; - }, - ReadToEndAsync: function () { - return System.Threading.Tasks.Task.fromResult(this.ReadToEnd(), System.String); - }, - ReadToEnd: function () { - - var chars = System.Array.init(4096, 0, System.Char); - var len; - var sb = new System.Text.StringBuilder("", 4096); - while (((len = this.Read$1(chars, 0, chars.length))) !== 0) { - sb.append(System.String.fromCharArray(chars, 0, len)); - } - return sb.toString(); - }, - ReadBlock: function (buffer, index, count) { - - var i, n = 0; - do { - n = (n + ((i = this.Read$1(buffer, ((index + n) | 0), ((count - n) | 0))))) | 0; - } while (i > 0 && n < count); - return n; - }, - ReadLine: function () { - var sb = new System.Text.StringBuilder(); - while (true) { - var ch = this.Read(); - if (ch === -1) { - break; - } - if (ch === 13 || ch === 10) { - if (ch === 13 && this.Peek() === 10) { - this.Read(); - } - return sb.toString(); - } - sb.append(String.fromCharCode((ch & 65535))); - } - if (sb.getLength() > 0) { - return sb.toString(); - } - return null; - } - } - }); - - // @source StreamReader.js - - H5.define("System.IO.StreamReader", { - inherits: [System.IO.TextReader], - statics: { - fields: { - DefaultFileStreamBufferSize: 0, - MinBufferSize: 0, - Null: null - }, - props: { - DefaultBufferSize: { - get: function () { - return 1024; - } - } - }, - ctors: { - init: function () { - this.DefaultFileStreamBufferSize = 4096; - this.MinBufferSize = 128; - this.Null = new System.IO.StreamReader.NullStreamReader(); - } - } - }, - fields: { - stream: null, - encoding: null, - byteBuffer: null, - charBuffer: null, - charPos: 0, - charLen: 0, - byteLen: 0, - bytePos: 0, - _maxCharsPerBuffer: 0, - _detectEncoding: false, - _isBlocked: false, - _closable: false - }, - props: { - CurrentEncoding: { - get: function () { - return this.encoding; - } - }, - BaseStream: { - get: function () { - return this.stream; - } - }, - LeaveOpen: { - get: function () { - return !this._closable; - } - }, - EndOfStream: { - get: function () { - if (this.stream == null) { - System.IO.__Error.ReaderClosed(); - } - - - if (this.charPos < this.charLen) { - return false; - } - - var numRead = this.ReadBuffer(); - return numRead === 0; - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.IO.TextReader.ctor.call(this); - }, - $ctor1: function (stream) { - System.IO.StreamReader.$ctor2.call(this, stream, true); - }, - $ctor2: function (stream, detectEncodingFromByteOrderMarks) { - System.IO.StreamReader.$ctor6.call(this, stream, System.Text.Encoding.UTF8, detectEncodingFromByteOrderMarks, System.IO.StreamReader.DefaultBufferSize, false); - }, - $ctor3: function (stream, encoding) { - System.IO.StreamReader.$ctor6.call(this, stream, encoding, true, System.IO.StreamReader.DefaultBufferSize, false); - }, - $ctor4: function (stream, encoding, detectEncodingFromByteOrderMarks) { - System.IO.StreamReader.$ctor6.call(this, stream, encoding, detectEncodingFromByteOrderMarks, System.IO.StreamReader.DefaultBufferSize, false); - }, - $ctor5: function (stream, encoding, detectEncodingFromByteOrderMarks, bufferSize) { - System.IO.StreamReader.$ctor6.call(this, stream, encoding, detectEncodingFromByteOrderMarks, bufferSize, false); - }, - $ctor6: function (stream, encoding, detectEncodingFromByteOrderMarks, bufferSize, leaveOpen) { - this.$initialize(); - System.IO.TextReader.ctor.call(this); - if (stream == null || encoding == null) { - throw new System.ArgumentNullException.$ctor1((stream == null ? "stream" : "encoding")); - } - if (!stream.CanRead) { - throw new System.ArgumentException.ctor(); - } - if (bufferSize <= 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("bufferSize"); - } - - this.Init$1(stream, encoding, detectEncodingFromByteOrderMarks, bufferSize, leaveOpen); - }, - $ctor7: function (path) { - System.IO.StreamReader.$ctor8.call(this, path, true); - }, - $ctor8: function (path, detectEncodingFromByteOrderMarks) { - System.IO.StreamReader.$ctor11.call(this, path, System.Text.Encoding.UTF8, detectEncodingFromByteOrderMarks, System.IO.StreamReader.DefaultBufferSize); - }, - $ctor9: function (path, encoding) { - System.IO.StreamReader.$ctor11.call(this, path, encoding, true, System.IO.StreamReader.DefaultBufferSize); - }, - $ctor10: function (path, encoding, detectEncodingFromByteOrderMarks) { - System.IO.StreamReader.$ctor11.call(this, path, encoding, detectEncodingFromByteOrderMarks, System.IO.StreamReader.DefaultBufferSize); - }, - $ctor11: function (path, encoding, detectEncodingFromByteOrderMarks, bufferSize) { - System.IO.StreamReader.$ctor12.call(this, path, encoding, detectEncodingFromByteOrderMarks, bufferSize, true); - }, - $ctor12: function (path, encoding, detectEncodingFromByteOrderMarks, bufferSize, checkHost) { - this.$initialize(); - System.IO.TextReader.ctor.call(this); - if (path == null || encoding == null) { - throw new System.ArgumentNullException.$ctor1((path == null ? "path" : "encoding")); - } - if (path.length === 0) { - throw new System.ArgumentException.ctor(); - } - if (bufferSize <= 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("bufferSize"); - } - - var stream = new System.IO.FileStream.$ctor1(path, 3); - this.Init$1(stream, encoding, detectEncodingFromByteOrderMarks, bufferSize, false); - } - }, - methods: { - Init$1: function (stream, encoding, detectEncodingFromByteOrderMarks, bufferSize, leaveOpen) { - this.stream = stream; - this.encoding = encoding; - if (bufferSize < System.IO.StreamReader.MinBufferSize) { - bufferSize = System.IO.StreamReader.MinBufferSize; - } - this.byteBuffer = System.Array.init(bufferSize, 0, System.Byte); - this._maxCharsPerBuffer = encoding.GetMaxCharCount(bufferSize); - this.charBuffer = System.Array.init(this._maxCharsPerBuffer, 0, System.Char); - this.byteLen = 0; - this.bytePos = 0; - this._detectEncoding = detectEncodingFromByteOrderMarks; - this._isBlocked = false; - this._closable = !leaveOpen; - }, - Init: function (stream) { - this.stream = stream; - this._closable = true; - }, - Close: function () { - this.Dispose$1(true); - }, - Dispose$1: function (disposing) { - try { - if (!this.LeaveOpen && disposing && (this.stream != null)) { - this.stream.Close(); - } - } finally { - if (!this.LeaveOpen && (this.stream != null)) { - this.stream = null; - this.encoding = null; - this.byteBuffer = null; - this.charBuffer = null; - this.charPos = 0; - this.charLen = 0; - System.IO.TextReader.prototype.Dispose$1.call(this, disposing); - } - } - }, - DiscardBufferedData: function () { - - this.byteLen = 0; - this.charLen = 0; - this.charPos = 0; - this._isBlocked = false; - }, - Peek: function () { - if (this.stream == null) { - System.IO.__Error.ReaderClosed(); - } - - if (this.charPos === this.charLen) { - if (this._isBlocked || this.ReadBuffer() === 0) { - return -1; - } - } - return this.charBuffer[System.Array.index(this.charPos, this.charBuffer)]; - }, - Read: function () { - if (this.stream == null) { - System.IO.__Error.ReaderClosed(); - } - - - if (this.charPos === this.charLen) { - if (this.ReadBuffer() === 0) { - return -1; - } - } - var result = this.charBuffer[System.Array.index(this.charPos, this.charBuffer)]; - this.charPos = (this.charPos + 1) | 0; - return result; - }, - Read$1: function (buffer, index, count) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor1("buffer"); - } - if (index < 0 || count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1((index < 0 ? "index" : "count")); - } - if (((buffer.length - index) | 0) < count) { - throw new System.ArgumentException.ctor(); - } - - if (this.stream == null) { - System.IO.__Error.ReaderClosed(); - } - - - var charsRead = 0; - var readToUserBuffer = { v : false }; - while (count > 0) { - var n = (this.charLen - this.charPos) | 0; - if (n === 0) { - n = this.ReadBuffer$1(buffer, ((index + charsRead) | 0), count, readToUserBuffer); - } - if (n === 0) { - break; - } - if (n > count) { - n = count; - } - if (!readToUserBuffer.v) { - System.Array.copy(this.charBuffer, this.charPos, buffer, (((index + charsRead) | 0)), n); - this.charPos = (this.charPos + n) | 0; - } - charsRead = (charsRead + n) | 0; - count = (count - n) | 0; - if (this._isBlocked) { - break; - } - } - - return charsRead; - }, - ReadToEndAsync: function () { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - if (H5.is(this.stream, System.IO.FileStream)) { - (await H5.toPromise(this.stream.EnsureBufferAsync())); - } - - return (await H5.toPromise(System.IO.TextReader.prototype.ReadToEndAsync.call(this))); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - ReadToEnd: function () { - if (this.stream == null) { - System.IO.__Error.ReaderClosed(); - } - - var sb = new System.Text.StringBuilder("", ((this.charLen - this.charPos) | 0)); - do { - sb.append(System.String.fromCharArray(this.charBuffer, this.charPos, ((this.charLen - this.charPos) | 0))); - this.charPos = this.charLen; - this.ReadBuffer(); - } while (this.charLen > 0); - return sb.toString(); - }, - ReadBlock: function (buffer, index, count) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor1("buffer"); - } - if (index < 0 || count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1((index < 0 ? "index" : "count")); - } - if (((buffer.length - index) | 0) < count) { - throw new System.ArgumentException.ctor(); - } - - if (this.stream == null) { - System.IO.__Error.ReaderClosed(); - } - - return System.IO.TextReader.prototype.ReadBlock.call(this, buffer, index, count); - }, - CompressBuffer: function (n) { - System.Array.copy(this.byteBuffer, n, this.byteBuffer, 0, ((this.byteLen - n) | 0)); - this.byteLen = (this.byteLen - n) | 0; - }, - DetectEncoding: function () { - if (this.byteLen < 2) { - return; - } - this._detectEncoding = false; - var changedEncoding = false; - if (this.byteBuffer[System.Array.index(0, this.byteBuffer)] === 254 && this.byteBuffer[System.Array.index(1, this.byteBuffer)] === 255) { - - this.encoding = new System.Text.UnicodeEncoding.$ctor1(true, true); - this.CompressBuffer(2); - changedEncoding = true; - } else if (this.byteBuffer[System.Array.index(0, this.byteBuffer)] === 255 && this.byteBuffer[System.Array.index(1, this.byteBuffer)] === 254) { - if (this.byteLen < 4 || this.byteBuffer[System.Array.index(2, this.byteBuffer)] !== 0 || this.byteBuffer[System.Array.index(3, this.byteBuffer)] !== 0) { - this.encoding = new System.Text.UnicodeEncoding.$ctor1(false, true); - this.CompressBuffer(2); - changedEncoding = true; - } else { - this.encoding = new System.Text.UTF32Encoding.$ctor1(false, true); - this.CompressBuffer(4); - changedEncoding = true; - } - } else if (this.byteLen >= 3 && this.byteBuffer[System.Array.index(0, this.byteBuffer)] === 239 && this.byteBuffer[System.Array.index(1, this.byteBuffer)] === 187 && this.byteBuffer[System.Array.index(2, this.byteBuffer)] === 191) { - this.encoding = System.Text.Encoding.UTF8; - this.CompressBuffer(3); - changedEncoding = true; - } else if (this.byteLen >= 4 && this.byteBuffer[System.Array.index(0, this.byteBuffer)] === 0 && this.byteBuffer[System.Array.index(1, this.byteBuffer)] === 0 && this.byteBuffer[System.Array.index(2, this.byteBuffer)] === 254 && this.byteBuffer[System.Array.index(3, this.byteBuffer)] === 255) { - this.encoding = new System.Text.UTF32Encoding.$ctor1(true, true); - this.CompressBuffer(4); - changedEncoding = true; - } else if (this.byteLen === 2) { - this._detectEncoding = true; - } - - if (changedEncoding) { - this._maxCharsPerBuffer = this.encoding.GetMaxCharCount(this.byteBuffer.length); - this.charBuffer = System.Array.init(this._maxCharsPerBuffer, 0, System.Char); - } - }, - IsPreamble: function () { - return false; - }, - ReadBuffer: function () { - this.charLen = 0; - this.charPos = 0; - - this.byteLen = 0; - do { - this.byteLen = this.stream.Read(this.byteBuffer, 0, this.byteBuffer.length); - - if (this.byteLen === 0) { - return this.charLen; - } - - this._isBlocked = (this.byteLen < this.byteBuffer.length); - - if (this.IsPreamble()) { - continue; - } - - if (this._detectEncoding && this.byteLen >= 2) { - this.DetectEncoding(); - } - - this.charLen = (this.charLen + (this.encoding.GetChars$2(this.byteBuffer, 0, this.byteLen, this.charBuffer, this.charLen))) | 0; - } while (this.charLen === 0); - return this.charLen; - }, - ReadBuffer$1: function (userBuffer, userOffset, desiredChars, readToUserBuffer) { - this.charLen = 0; - this.charPos = 0; - - this.byteLen = 0; - - var charsRead = 0; - - readToUserBuffer.v = desiredChars >= this._maxCharsPerBuffer; - - do { - - - this.byteLen = this.stream.Read(this.byteBuffer, 0, this.byteBuffer.length); - - - if (this.byteLen === 0) { - break; - } - - this._isBlocked = (this.byteLen < this.byteBuffer.length); - - if (this.IsPreamble()) { - continue; - } - - if (this._detectEncoding && this.byteLen >= 2) { - this.DetectEncoding(); - readToUserBuffer.v = desiredChars >= this._maxCharsPerBuffer; - } - - this.charPos = 0; - if (readToUserBuffer.v) { - charsRead = (charsRead + (this.encoding.GetChars$2(this.byteBuffer, 0, this.byteLen, userBuffer, ((userOffset + charsRead) | 0)))) | 0; - this.charLen = 0; - } else { - charsRead = this.encoding.GetChars$2(this.byteBuffer, 0, this.byteLen, this.charBuffer, charsRead); - this.charLen = (this.charLen + charsRead) | 0; - } - } while (charsRead === 0); - - this._isBlocked = !!(this._isBlocked & charsRead < desiredChars); - - return charsRead; - }, - ReadLine: function () { - if (this.stream == null) { - System.IO.__Error.ReaderClosed(); - } - - if (this.charPos === this.charLen) { - if (this.ReadBuffer() === 0) { - return null; - } - } - - var sb = null; - do { - var i = this.charPos; - do { - var ch = this.charBuffer[System.Array.index(i, this.charBuffer)]; - if (ch === 13 || ch === 10) { - var s; - if (sb != null) { - sb.append(System.String.fromCharArray(this.charBuffer, this.charPos, ((i - this.charPos) | 0))); - s = sb.toString(); - } else { - s = System.String.fromCharArray(this.charBuffer, this.charPos, ((i - this.charPos) | 0)); - } - this.charPos = (i + 1) | 0; - if (ch === 13 && (this.charPos < this.charLen || this.ReadBuffer() > 0)) { - if (this.charBuffer[System.Array.index(this.charPos, this.charBuffer)] === 10) { - this.charPos = (this.charPos + 1) | 0; - } - } - return s; - } - i = (i + 1) | 0; - } while (i < this.charLen); - i = (this.charLen - this.charPos) | 0; - if (sb == null) { - sb = new System.Text.StringBuilder("", ((i + 80) | 0)); - } - sb.append(System.String.fromCharArray(this.charBuffer, this.charPos, i)); - } while (this.ReadBuffer() > 0); - return sb.toString(); - } - } - }); - - // @source NullStreamReader.js - - H5.define("System.IO.StreamReader.NullStreamReader", { - inherits: [System.IO.StreamReader], - $kind: "nested class", - props: { - BaseStream: { - get: function () { - return System.IO.Stream.Null; - } - }, - CurrentEncoding: { - get: function () { - return System.Text.Encoding.Unicode; - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.IO.StreamReader.ctor.call(this); - this.Init(System.IO.Stream.Null); - } - }, - methods: { - Dispose$1: function (disposing) { }, - Peek: function () { - return -1; - }, - Read: function () { - return -1; - }, - Read$1: function (buffer, index, count) { - return 0; - }, - ReadLine: function () { - return null; - }, - ReadToEnd: function () { - return ""; - }, - ReadBuffer: function () { - return 0; - } - } - }); - - // @source TextWriter.js - - H5.define("System.IO.TextWriter", { - inherits: [System.IDisposable], - statics: { - fields: { - InitialNewLine: null, - Null: null - }, - ctors: { - init: function () { - this.InitialNewLine = "\r\n"; - this.Null = new System.IO.TextWriter.NullTextWriter(); - } - }, - methods: { - Synchronized: function (writer) { - if (writer == null) { - throw new System.ArgumentNullException.$ctor1("writer"); - } - - return writer; - } - } - }, - fields: { - CoreNewLine: null, - InternalFormatProvider: null - }, - props: { - FormatProvider: { - get: function () { - if (this.InternalFormatProvider == null) { - return System.Globalization.CultureInfo.getCurrentCulture(); - } else { - return this.InternalFormatProvider; - } - } - }, - NewLine: { - get: function () { - return System.String.fromCharArray(this.CoreNewLine); - }, - set: function (value) { - if (value == null) { - value = System.IO.TextWriter.InitialNewLine; - } - this.CoreNewLine = System.String.toCharArray(value, 0, value.length); - } - } - }, - alias: ["Dispose", "System$IDisposable$Dispose"], - ctors: { - init: function () { - this.CoreNewLine = System.Array.init([13, 10], System.Char); - }, - ctor: function () { - this.$initialize(); - this.InternalFormatProvider = null; - }, - $ctor1: function (formatProvider) { - this.$initialize(); - this.InternalFormatProvider = formatProvider; - } - }, - methods: { - Close: function () { - this.Dispose$1(true); - }, - Dispose$1: function (disposing) { }, - Dispose: function () { - this.Dispose$1(true); - }, - Flush: function () { }, - Write$1: function (value) { }, - Write$2: function (buffer) { - if (buffer != null) { - this.Write$3(buffer, 0, buffer.length); - } - }, - Write$3: function (buffer, index, count) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor1("buffer"); - } - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - if (((buffer.length - index) | 0) < count) { - throw new System.ArgumentException.ctor(); - } - - for (var i = 0; i < count; i = (i + 1) | 0) { - this.Write$1(buffer[System.Array.index(((index + i) | 0), buffer)]); - } - }, - Write: function (value) { - this.Write$10(value ? System.Boolean.trueString : System.Boolean.falseString); - }, - Write$6: function (value) { - this.Write$10(System.Int32.format(value, "G", this.FormatProvider)); - }, - Write$15: function (value) { - this.Write$10(System.UInt32.format(value, "G", this.FormatProvider)); - }, - Write$7: function (value) { - this.Write$10(value.format("G", this.FormatProvider)); - }, - Write$16: function (value) { - this.Write$10(value.format("G", this.FormatProvider)); - }, - Write$9: function (value) { - this.Write$10(System.Single.format(value, "G", this.FormatProvider)); - }, - Write$5: function (value) { - this.Write$10(System.Double.format(value, "G", this.FormatProvider)); - }, - Write$4: function (value) { - this.Write$10(H5.Int.format(value, "G", this.FormatProvider)); - }, - Write$10: function (value) { - if (value != null) { - this.Write$2(System.String.toCharArray(value, 0, value.length)); - } - }, - Write$8: function (value) { - if (value != null) { - var f; - if (((f = H5.as(value, System.IFormattable))) != null) { - this.Write$10(H5.format(f, null, this.FormatProvider)); - } else { - this.Write$10(H5.toString(value)); - } - } - }, - Write$11: function (format, arg0) { - this.Write$10(System.String.formatProvider(this.FormatProvider, format, [arg0])); - }, - Write$12: function (format, arg0, arg1) { - this.Write$10(System.String.formatProvider(this.FormatProvider, format, arg0, arg1)); - }, - Write$13: function (format, arg0, arg1, arg2) { - this.Write$10(System.String.formatProvider(this.FormatProvider, format, arg0, arg1, arg2)); - }, - Write$14: function (format, arg) { - if (arg === void 0) { arg = []; } - this.Write$10(System.String.formatProvider.apply(System.String, [this.FormatProvider, format].concat(arg))); - }, - WriteLine: function () { - this.Write$2(this.CoreNewLine); - }, - WriteLine$2: function (value) { - this.Write$1(value); - this.WriteLine(); - }, - WriteLine$3: function (buffer) { - this.Write$2(buffer); - this.WriteLine(); - }, - WriteLine$4: function (buffer, index, count) { - this.Write$3(buffer, index, count); - this.WriteLine(); - }, - WriteLine$1: function (value) { - this.Write(value); - this.WriteLine(); - }, - WriteLine$7: function (value) { - this.Write$6(value); - this.WriteLine(); - }, - WriteLine$16: function (value) { - this.Write$15(value); - this.WriteLine(); - }, - WriteLine$8: function (value) { - this.Write$7(value); - this.WriteLine(); - }, - WriteLine$17: function (value) { - this.Write$16(value); - this.WriteLine(); - }, - WriteLine$10: function (value) { - this.Write$9(value); - this.WriteLine(); - }, - WriteLine$6: function (value) { - this.Write$5(value); - this.WriteLine(); - }, - WriteLine$5: function (value) { - this.Write$4(value); - this.WriteLine(); - }, - WriteLine$11: function (value) { - - if (value == null) { - this.WriteLine(); - } else { - var vLen = value.length; - var nlLen = this.CoreNewLine.length; - var chars = System.Array.init(((vLen + nlLen) | 0), 0, System.Char); - System.String.copyTo(value, 0, chars, 0, vLen); - if (nlLen === 2) { - chars[System.Array.index(vLen, chars)] = this.CoreNewLine[System.Array.index(0, this.CoreNewLine)]; - chars[System.Array.index(((vLen + 1) | 0), chars)] = this.CoreNewLine[System.Array.index(1, this.CoreNewLine)]; - } else if (nlLen === 1) { - chars[System.Array.index(vLen, chars)] = this.CoreNewLine[System.Array.index(0, this.CoreNewLine)]; - } else { - System.Array.copy(this.CoreNewLine, 0, chars, H5.Int.mul(vLen, 2), H5.Int.mul(nlLen, 2)); - } - this.Write$3(chars, 0, ((vLen + nlLen) | 0)); - } - /* - Write(value); // We could call Write(String) on StreamWriter... - WriteLine(); - */ - }, - WriteLine$9: function (value) { - if (value == null) { - this.WriteLine(); - } else { - var f; - if (((f = H5.as(value, System.IFormattable))) != null) { - this.WriteLine$11(H5.format(f, null, this.FormatProvider)); - } else { - this.WriteLine$11(H5.toString(value)); - } - } - }, - WriteLine$12: function (format, arg0) { - this.WriteLine$11(System.String.formatProvider(this.FormatProvider, format, [arg0])); - }, - WriteLine$13: function (format, arg0, arg1) { - this.WriteLine$11(System.String.formatProvider(this.FormatProvider, format, arg0, arg1)); - }, - WriteLine$14: function (format, arg0, arg1, arg2) { - this.WriteLine$11(System.String.formatProvider(this.FormatProvider, format, arg0, arg1, arg2)); - }, - WriteLine$15: function (format, arg) { - if (arg === void 0) { arg = []; } - this.WriteLine$11(System.String.formatProvider.apply(System.String, [this.FormatProvider, format].concat(arg))); - } - } - }); - - // @source StreamWriter.js - - H5.define("System.IO.StreamWriter", { - inherits: [System.IO.TextWriter], - statics: { - fields: { - DefaultBufferSize: 0, - DefaultFileStreamBufferSize: 0, - MinBufferSize: 0, - Null: null, - _UTF8NoBOM: null - }, - props: { - UTF8NoBOM: { - get: function () { - if (System.IO.StreamWriter._UTF8NoBOM == null) { - var noBOM = new System.Text.UTF8Encoding.$ctor2(false, true); - System.IO.StreamWriter._UTF8NoBOM = noBOM; - } - return System.IO.StreamWriter._UTF8NoBOM; - } - } - }, - ctors: { - init: function () { - this.DefaultBufferSize = 1024; - this.DefaultFileStreamBufferSize = 4096; - this.MinBufferSize = 128; - this.Null = new System.IO.StreamWriter.$ctor4(System.IO.Stream.Null, new System.Text.UTF8Encoding.$ctor2(false, true), System.IO.StreamWriter.MinBufferSize, true); - } - } - }, - fields: { - stream: null, - encoding: null, - byteBuffer: null, - charBuffer: null, - charPos: 0, - charLen: 0, - autoFlush: false, - haveWrittenPreamble: false, - closable: false - }, - props: { - AutoFlush: { - get: function () { - return this.autoFlush; - }, - set: function (value) { - this.autoFlush = value; - if (value) { - this.Flush$1(true, false); - } - } - }, - BaseStream: { - get: function () { - return this.stream; - } - }, - LeaveOpen: { - get: function () { - return !this.closable; - } - }, - HaveWrittenPreamble: { - set: function (value) { - this.haveWrittenPreamble = value; - } - }, - Encoding: { - get: function () { - return this.encoding; - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.IO.TextWriter.$ctor1.call(this, null); - }, - $ctor1: function (stream) { - System.IO.StreamWriter.$ctor4.call(this, stream, System.IO.StreamWriter.UTF8NoBOM, System.IO.StreamWriter.DefaultBufferSize, false); - }, - $ctor2: function (stream, encoding) { - System.IO.StreamWriter.$ctor4.call(this, stream, encoding, System.IO.StreamWriter.DefaultBufferSize, false); - }, - $ctor3: function (stream, encoding, bufferSize) { - System.IO.StreamWriter.$ctor4.call(this, stream, encoding, bufferSize, false); - }, - $ctor4: function (stream, encoding, bufferSize, leaveOpen) { - this.$initialize(); - System.IO.TextWriter.$ctor1.call(this, null); - if (stream == null || encoding == null) { - throw new System.ArgumentNullException.$ctor1((stream == null ? "stream" : "encoding")); - } - if (!stream.CanWrite) { - throw new System.ArgumentException.$ctor1("Argument_StreamNotWritable"); - } - if (bufferSize <= 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("bufferSize", "ArgumentOutOfRange_NeedPosNum"); - } - - this.Init(stream, encoding, bufferSize, leaveOpen); - }, - $ctor5: function (path) { - System.IO.StreamWriter.$ctor8.call(this, path, false, System.IO.StreamWriter.UTF8NoBOM, System.IO.StreamWriter.DefaultBufferSize); - }, - $ctor6: function (path, append) { - System.IO.StreamWriter.$ctor8.call(this, path, append, System.IO.StreamWriter.UTF8NoBOM, System.IO.StreamWriter.DefaultBufferSize); - }, - $ctor7: function (path, append, encoding) { - System.IO.StreamWriter.$ctor8.call(this, path, append, encoding, System.IO.StreamWriter.DefaultBufferSize); - }, - $ctor8: function (path, append, encoding, bufferSize) { - System.IO.StreamWriter.$ctor9.call(this, path, append, encoding, bufferSize, true); - }, - $ctor9: function (path, append, encoding, bufferSize, checkHost) { - this.$initialize(); - System.IO.TextWriter.$ctor1.call(this, null); - throw new System.NotSupportedException.ctor(); - } - }, - methods: { - Init: function (streamArg, encodingArg, bufferSize, shouldLeaveOpen) { - this.stream = streamArg; - this.encoding = encodingArg; - if (bufferSize < System.IO.StreamWriter.MinBufferSize) { - bufferSize = System.IO.StreamWriter.MinBufferSize; - } - this.charBuffer = System.Array.init(bufferSize, 0, System.Char); - this.byteBuffer = System.Array.init(this.encoding.GetMaxByteCount(bufferSize), 0, System.Byte); - this.charLen = bufferSize; - if (this.stream.CanSeek && this.stream.Position.gt(System.Int64(0))) { - this.haveWrittenPreamble = true; - } - this.closable = !shouldLeaveOpen; - }, - Close: function () { - this.Dispose$1(true); - }, - Dispose$1: function (disposing) { - try { - if (this.stream != null) { - if (disposing) { - this.Flush$1(true, true); - } - } - } finally { - if (!this.LeaveOpen && this.stream != null) { - try { - if (disposing) { - this.stream.Close(); - } - } finally { - this.stream = null; - this.byteBuffer = null; - this.charBuffer = null; - this.encoding = null; - this.charLen = 0; - System.IO.TextWriter.prototype.Dispose$1.call(this, disposing); - } - } - } - }, - Flush: function () { - this.Flush$1(true, true); - }, - Flush$1: function (flushStream, flushEncoder) { - if (this.stream == null) { - System.IO.__Error.WriterClosed(); - } - - if (this.charPos === 0 && (!flushStream && !flushEncoder)) { - return; - } - - /* if (!haveWrittenPreamble) { - haveWrittenPreamble = true; - byte[] preamble = encoding.GetPreamble(); - if (preamble.Length > 0) - stream.Write(preamble, 0, preamble.Length); - }*/ - - var count = this.encoding.GetBytes$3(this.charBuffer, 0, this.charPos, this.byteBuffer, 0); - this.charPos = 0; - if (count > 0) { - this.stream.Write(this.byteBuffer, 0, count); - } - if (flushStream) { - this.stream.Flush(); - } - }, - Write$1: function (value) { - if (this.charPos === this.charLen) { - this.Flush$1(false, false); - } - this.charBuffer[System.Array.index(this.charPos, this.charBuffer)] = value; - this.charPos = (this.charPos + 1) | 0; - if (this.autoFlush) { - this.Flush$1(true, false); - } - }, - Write$2: function (buffer) { - if (buffer == null) { - return; - } - - var index = 0; - var count = buffer.length; - while (count > 0) { - if (this.charPos === this.charLen) { - this.Flush$1(false, false); - } - var n = (this.charLen - this.charPos) | 0; - if (n > count) { - n = count; - } - System.Array.copy(buffer, index, this.charBuffer, this.charPos, n); - this.charPos = (this.charPos + n) | 0; - index = (index + n) | 0; - count = (count - n) | 0; - } - if (this.autoFlush) { - this.Flush$1(true, false); - } - }, - Write$3: function (buffer, index, count) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor3("buffer", "ArgumentNull_Buffer"); - } - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("index", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("count", "ArgumentOutOfRange_NeedNonNegNum"); - } - if (((buffer.length - index) | 0) < count) { - throw new System.ArgumentException.$ctor1("Argument_InvalidOffLen"); - } - - while (count > 0) { - if (this.charPos === this.charLen) { - this.Flush$1(false, false); - } - var n = (this.charLen - this.charPos) | 0; - if (n > count) { - n = count; - } - System.Array.copy(buffer, index, this.charBuffer, this.charPos, n); - this.charPos = (this.charPos + n) | 0; - index = (index + n) | 0; - count = (count - n) | 0; - } - if (this.autoFlush) { - this.Flush$1(true, false); - } - }, - Write$10: function (value) { - if (value != null) { - var count = value.length; - var index = 0; - while (count > 0) { - if (this.charPos === this.charLen) { - this.Flush$1(false, false); - } - var n = (this.charLen - this.charPos) | 0; - if (n > count) { - n = count; - } - System.String.copyTo(value, index, this.charBuffer, this.charPos, n); - this.charPos = (this.charPos + n) | 0; - index = (index + n) | 0; - count = (count - n) | 0; - } - if (this.autoFlush) { - this.Flush$1(true, false); - } - } - } - } - }); - - // @source StringReader.js - - H5.define("System.IO.StringReader", { - inherits: [System.IO.TextReader], - fields: { - _s: null, - _pos: 0, - _length: 0 - }, - ctors: { - ctor: function (s) { - this.$initialize(); - System.IO.TextReader.ctor.call(this); - if (s == null) { - throw new System.ArgumentNullException.$ctor1("s"); - } - this._s = s; - this._length = s == null ? 0 : s.length; - } - }, - methods: { - Close: function () { - this.Dispose$1(true); - }, - Dispose$1: function (disposing) { - this._s = null; - this._pos = 0; - this._length = 0; - System.IO.TextReader.prototype.Dispose$1.call(this, disposing); - }, - Peek: function () { - if (this._s == null) { - System.IO.__Error.ReaderClosed(); - } - if (this._pos === this._length) { - return -1; - } - return this._s.charCodeAt(this._pos); - }, - Read: function () { - if (this._s == null) { - System.IO.__Error.ReaderClosed(); - } - if (this._pos === this._length) { - return -1; - } - return this._s.charCodeAt(H5.identity(this._pos, ((this._pos = (this._pos + 1) | 0)))); - }, - Read$1: function (buffer, index, count) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor1("buffer"); - } - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - if (((buffer.length - index) | 0) < count) { - throw new System.ArgumentException.ctor(); - } - if (this._s == null) { - System.IO.__Error.ReaderClosed(); - } - - var n = (this._length - this._pos) | 0; - if (n > 0) { - if (n > count) { - n = count; - } - System.String.copyTo(this._s, this._pos, buffer, index, n); - this._pos = (this._pos + n) | 0; - } - return n; - }, - ReadToEnd: function () { - if (this._s == null) { - System.IO.__Error.ReaderClosed(); - } - var s; - if (this._pos === 0) { - s = this._s; - } else { - s = this._s.substr(this._pos, ((this._length - this._pos) | 0)); - } - this._pos = this._length; - return s; - }, - ReadLine: function () { - if (this._s == null) { - System.IO.__Error.ReaderClosed(); - } - var i = this._pos; - while (i < this._length) { - var ch = this._s.charCodeAt(i); - if (ch === 13 || ch === 10) { - var result = this._s.substr(this._pos, ((i - this._pos) | 0)); - this._pos = (i + 1) | 0; - if (ch === 13 && this._pos < this._length && this._s.charCodeAt(this._pos) === 10) { - this._pos = (this._pos + 1) | 0; - } - return result; - } - i = (i + 1) | 0; - } - if (i > this._pos) { - var result1 = this._s.substr(this._pos, ((i - this._pos) | 0)); - this._pos = i; - return result1; - } - return null; - } - } - }); - - // @source StringWriter.js - - H5.define("System.IO.StringWriter", { - inherits: [System.IO.TextWriter], - statics: { - fields: { - m_encoding: null - } - }, - fields: { - _sb: null, - _isOpen: false - }, - props: { - Encoding: { - get: function () { - if (System.IO.StringWriter.m_encoding == null) { - System.IO.StringWriter.m_encoding = new System.Text.UnicodeEncoding.$ctor1(false, false); - } - return System.IO.StringWriter.m_encoding; - } - } - }, - ctors: { - ctor: function () { - System.IO.StringWriter.$ctor3.call(this, new System.Text.StringBuilder(), System.Globalization.CultureInfo.getCurrentCulture()); - }, - $ctor1: function (formatProvider) { - System.IO.StringWriter.$ctor3.call(this, new System.Text.StringBuilder(), formatProvider); - }, - $ctor2: function (sb) { - System.IO.StringWriter.$ctor3.call(this, sb, System.Globalization.CultureInfo.getCurrentCulture()); - }, - $ctor3: function (sb, formatProvider) { - this.$initialize(); - System.IO.TextWriter.$ctor1.call(this, formatProvider); - if (sb == null) { - throw new System.ArgumentNullException.$ctor1("sb"); - } - this._sb = sb; - this._isOpen = true; - } - }, - methods: { - Close: function () { - this.Dispose$1(true); - }, - Dispose$1: function (disposing) { - this._isOpen = false; - System.IO.TextWriter.prototype.Dispose$1.call(this, disposing); - }, - GetStringBuilder: function () { - return this._sb; - }, - Write$1: function (value) { - if (!this._isOpen) { - System.IO.__Error.WriterClosed(); - } - this._sb.append(String.fromCharCode(value)); - }, - Write$3: function (buffer, index, count) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor1("buffer"); - } - if (index < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("index"); - } - if (count < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("count"); - } - if (((buffer.length - index) | 0) < count) { - throw new System.ArgumentException.ctor(); - } - - if (!this._isOpen) { - System.IO.__Error.WriterClosed(); - } - - this._sb.append(System.String.fromCharArray(buffer, index, count)); - }, - Write$10: function (value) { - if (!this._isOpen) { - System.IO.__Error.WriterClosed(); - } - if (value != null) { - this._sb.append(value); - } - }, - toString: function () { - return this._sb.toString(); - } - } - }); - - // @source NullTextReader.js - - H5.define("System.IO.TextReader.NullTextReader", { - inherits: [System.IO.TextReader], - $kind: "nested class", - ctors: { - ctor: function () { - this.$initialize(); - System.IO.TextReader.ctor.call(this); - } - }, - methods: { - Read$1: function (buffer, index, count) { - return 0; - }, - ReadLine: function () { - return null; - } - } - }); - - // @source NullTextWriter.js - - H5.define("System.IO.TextWriter.NullTextWriter", { - inherits: [System.IO.TextWriter], - $kind: "nested class", - props: { - Encoding: { - get: function () { - return System.Text.Encoding.Default; - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.IO.TextWriter.$ctor1.call(this, System.Globalization.CultureInfo.invariantCulture); - } - }, - methods: { - Write$3: function (buffer, index, count) { }, - Write$10: function (value) { }, - WriteLine: function () { }, - WriteLine$11: function (value) { }, - WriteLine$9: function (value) { } - } - }); - - // @source __Error.js - - H5.define("System.IO.__Error", { - statics: { - methods: { - EndOfFile: function () { - throw new System.IO.EndOfStreamException.$ctor1("IO.EOF_ReadBeyondEOF"); - }, - FileNotOpen: function () { - throw new System.Exception("ObjectDisposed_FileClosed"); - }, - StreamIsClosed: function () { - throw new System.Exception("ObjectDisposed_StreamClosed"); - }, - MemoryStreamNotExpandable: function () { - throw new System.NotSupportedException.$ctor1("NotSupported_MemStreamNotExpandable"); - }, - ReaderClosed: function () { - throw new System.Exception("ObjectDisposed_ReaderClosed"); - }, - ReadNotSupported: function () { - throw new System.NotSupportedException.$ctor1("NotSupported_UnreadableStream"); - }, - SeekNotSupported: function () { - throw new System.NotSupportedException.$ctor1("NotSupported_UnseekableStream"); - }, - WrongAsyncResult: function () { - throw new System.ArgumentException.$ctor1("Arg_WrongAsyncResult"); - }, - EndReadCalledTwice: function () { - throw new System.ArgumentException.$ctor1("InvalidOperation_EndReadCalledMultiple"); - }, - EndWriteCalledTwice: function () { - throw new System.ArgumentException.$ctor1("InvalidOperation_EndWriteCalledMultiple"); - }, - WriteNotSupported: function () { - throw new System.NotSupportedException.$ctor1("NotSupported_UnwritableStream"); - }, - WriterClosed: function () { - throw new System.Exception("ObjectDisposed_WriterClosed"); - } - } - } - }); - - // @source AmbiguousMatchException.js - - H5.define("System.Reflection.AmbiguousMatchException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Ambiguous match found."); - this.HResult = -2147475171; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2147475171; - }, - $ctor2: function (message, inner) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, inner); - this.HResult = -2147475171; - } - } - }); - - // @source Binder.js - - H5.define("System.Reflection.Binder", { - ctors: { - ctor: function () { - this.$initialize(); - } - } - }); - - // @source BindingFlags.js - - H5.define("System.Reflection.BindingFlags", { - $kind: "enum", - statics: { - fields: { - Default: 0, - IgnoreCase: 1, - DeclaredOnly: 2, - Instance: 4, - Static: 8, - Public: 16, - NonPublic: 32, - FlattenHierarchy: 64, - InvokeMethod: 256, - CreateInstance: 512, - GetField: 1024, - SetField: 2048, - GetProperty: 4096, - SetProperty: 8192, - PutDispProperty: 16384, - PutRefDispProperty: 32768, - ExactBinding: 65536, - SuppressChangeType: 131072, - OptionalParamBinding: 262144, - IgnoreReturn: 16777216, - DoNotWrapExceptions: 33554432 - } - }, - $flags: true - }); - - // @source CallingConventions.js - - H5.define("System.Reflection.CallingConventions", { - $kind: "enum", - statics: { - fields: { - Standard: 1, - VarArgs: 2, - Any: 3, - HasThis: 32, - ExplicitThis: 64 - } - }, - $flags: true - }); - - // @source ICustomAttributeProvider.js - - H5.define("System.Reflection.ICustomAttributeProvider", { - $kind: "interface" - }); - - // @source InvalidFilterCriteriaException.js - - H5.define("System.Reflection.InvalidFilterCriteriaException", { - inherits: [System.ApplicationException], - ctors: { - ctor: function () { - System.Reflection.InvalidFilterCriteriaException.$ctor1.call(this, "Specified filter criteria was invalid."); - }, - $ctor1: function (message) { - System.Reflection.InvalidFilterCriteriaException.$ctor2.call(this, message, null); - }, - $ctor2: function (message, inner) { - this.$initialize(); - System.ApplicationException.$ctor2.call(this, message, inner); - this.HResult = -2146232831; - } - } - }); - - // @source IReflect.js - - H5.define("System.Reflection.IReflect", { - $kind: "interface" - }); - - // @source MemberTypes.js - - H5.define("System.Reflection.MemberTypes", { - $kind: "enum", - statics: { - fields: { - Constructor: 1, - Event: 2, - Field: 4, - Method: 8, - Property: 16, - TypeInfo: 32, - Custom: 64, - NestedType: 128, - All: 191 - } - }, - $flags: true - }); - - // @source Module.js - - H5.define("System.Reflection.Module", { - inherits: [System.Reflection.ICustomAttributeProvider,System.Runtime.Serialization.ISerializable], - statics: { - fields: { - DefaultLookup: 0, - FilterTypeName: null, - FilterTypeNameIgnoreCase: null - }, - ctors: { - init: function () { - this.DefaultLookup = 28; - this.FilterTypeName = System.Reflection.Module.FilterTypeNameImpl; - this.FilterTypeNameIgnoreCase = System.Reflection.Module.FilterTypeNameIgnoreCaseImpl; - } - }, - methods: { - FilterTypeNameImpl: function (cls, filterCriteria) { - if (filterCriteria == null || !(H5.is(filterCriteria, System.String))) { - throw new System.Reflection.InvalidFilterCriteriaException.$ctor1("A String must be provided for the filter criteria."); - } - - var str = H5.cast(filterCriteria, System.String); - - if (str.length > 0 && str.charCodeAt(((str.length - 1) | 0)) === 42) { - str = str.substr(0, ((str.length - 1) | 0)); - return System.String.startsWith(H5.Reflection.getTypeName(cls), str, 4); - } - - return System.String.equals(H5.Reflection.getTypeName(cls), str); - }, - FilterTypeNameIgnoreCaseImpl: function (cls, filterCriteria) { - var $t; - if (filterCriteria == null || !(H5.is(filterCriteria, System.String))) { - throw new System.Reflection.InvalidFilterCriteriaException.$ctor1("A String must be provided for the filter criteria."); - } - - var str = H5.cast(filterCriteria, System.String); - - if (str.length > 0 && str.charCodeAt(((str.length - 1) | 0)) === 42) { - str = str.substr(0, ((str.length - 1) | 0)); - var name = H5.Reflection.getTypeName(cls); - if (name.length >= str.length) { - return (($t = str.length, System.String.compare(name.substr(0, $t), str.substr(0, $t), 5)) === 0); - } else { - return false; - } - } - return (System.String.compare(str, H5.Reflection.getTypeName(cls), 5) === 0); - }, - op_Equality: function (left, right) { - if (H5.referenceEquals(left, right)) { - return true; - } - - if (left == null || right == null) { - return false; - } - - return left.equals(right); - }, - op_Inequality: function (left, right) { - return !(System.Reflection.Module.op_Equality(left, right)); - } - } - }, - props: { - Assembly: { - get: function () { - throw System.NotImplemented.ByDesign; - } - }, - FullyQualifiedName: { - get: function () { - throw System.NotImplemented.ByDesign; - } - }, - Name: { - get: function () { - throw System.NotImplemented.ByDesign; - } - }, - MDStreamVersion: { - get: function () { - throw System.NotImplemented.ByDesign; - } - }, - ModuleVersionId: { - get: function () { - throw System.NotImplemented.ByDesign; - } - }, - ScopeName: { - get: function () { - throw System.NotImplemented.ByDesign; - } - }, - MetadataToken: { - get: function () { - throw System.NotImplemented.ByDesign; - } - } - }, - alias: [ - "IsDefined", "System$Reflection$ICustomAttributeProvider$IsDefined", - "GetCustomAttributes", "System$Reflection$ICustomAttributeProvider$GetCustomAttributes", - "GetCustomAttributes$1", "System$Reflection$ICustomAttributeProvider$GetCustomAttributes$1" - ], - ctors: { - ctor: function () { - this.$initialize(); - } - }, - methods: { - IsResource: function () { - throw System.NotImplemented.ByDesign; - }, - IsDefined: function (attributeType, inherit) { - throw System.NotImplemented.ByDesign; - }, - GetCustomAttributes: function (inherit) { - throw System.NotImplemented.ByDesign; - }, - GetCustomAttributes$1: function (attributeType, inherit) { - throw System.NotImplemented.ByDesign; - }, - GetMethod: function (name) { - if (name == null) { - throw new System.ArgumentNullException.$ctor1("name"); - } - - return this.GetMethodImpl(name, System.Reflection.Module.DefaultLookup, null, 3, null, null); - }, - GetMethod$2: function (name, types) { - return this.GetMethod$1(name, System.Reflection.Module.DefaultLookup, null, 3, types, null); - }, - GetMethod$1: function (name, bindingAttr, binder, callConvention, types, modifiers) { - if (name == null) { - throw new System.ArgumentNullException.$ctor1("name"); - } - if (types == null) { - throw new System.ArgumentNullException.$ctor1("types"); - } - for (var i = 0; i < types.length; i = (i + 1) | 0) { - if (types[System.Array.index(i, types)] === null) { - throw new System.ArgumentNullException.$ctor1("types"); - } - } - return this.GetMethodImpl(name, bindingAttr, binder, callConvention, types, modifiers); - }, - GetMethodImpl: function (name, bindingAttr, binder, callConvention, types, modifiers) { - throw System.NotImplemented.ByDesign; - }, - GetMethods: function () { - return this.GetMethods$1(System.Reflection.Module.DefaultLookup); - }, - GetMethods$1: function (bindingFlags) { - throw System.NotImplemented.ByDesign; - }, - GetField: function (name) { - return this.GetField$1(name, System.Reflection.Module.DefaultLookup); - }, - GetField$1: function (name, bindingAttr) { - throw System.NotImplemented.ByDesign; - }, - GetFields: function () { - return this.GetFields$1(System.Reflection.Module.DefaultLookup); - }, - GetFields$1: function (bindingFlags) { - throw System.NotImplemented.ByDesign; - }, - GetTypes: function () { - throw System.NotImplemented.ByDesign; - }, - GetType: function (className) { - return this.GetType$2(className, false, false); - }, - GetType$1: function (className, ignoreCase) { - return this.GetType$2(className, false, ignoreCase); - }, - GetType$2: function (className, throwOnError, ignoreCase) { - throw System.NotImplemented.ByDesign; - }, - FindTypes: function (filter, filterCriteria) { - var c = this.GetTypes(); - var cnt = 0; - for (var i = 0; i < c.length; i = (i + 1) | 0) { - if (!H5.staticEquals(filter, null) && !filter(c[System.Array.index(i, c)], filterCriteria)) { - c[System.Array.index(i, c)] = null; - } else { - cnt = (cnt + 1) | 0; - } - } - if (cnt === c.length) { - return c; - } - - var ret = System.Array.init(cnt, null, System.Type); - cnt = 0; - for (var i1 = 0; i1 < c.length; i1 = (i1 + 1) | 0) { - if (c[System.Array.index(i1, c)] !== null) { - ret[System.Array.index(H5.identity(cnt, ((cnt = (cnt + 1) | 0))), ret)] = c[System.Array.index(i1, c)]; - } - } - return ret; - }, - ResolveField: function (metadataToken) { - return this.ResolveField$1(metadataToken, null, null); - }, - ResolveField$1: function (metadataToken, genericTypeArguments, genericMethodArguments) { - throw System.NotImplemented.ByDesign; - }, - ResolveMember: function (metadataToken) { - return this.ResolveMember$1(metadataToken, null, null); - }, - ResolveMember$1: function (metadataToken, genericTypeArguments, genericMethodArguments) { - throw System.NotImplemented.ByDesign; - }, - ResolveMethod: function (metadataToken) { - return this.ResolveMethod$1(metadataToken, null, null); - }, - ResolveMethod$1: function (metadataToken, genericTypeArguments, genericMethodArguments) { - throw System.NotImplemented.ByDesign; - }, - ResolveSignature: function (metadataToken) { - throw System.NotImplemented.ByDesign; - }, - ResolveString: function (metadataToken) { - throw System.NotImplemented.ByDesign; - }, - ResolveType: function (metadataToken) { - return this.ResolveType$1(metadataToken, null, null); - }, - ResolveType$1: function (metadataToken, genericTypeArguments, genericMethodArguments) { - throw System.NotImplemented.ByDesign; - }, - equals: function (o) { - return H5.equals(this, o); - }, - getHashCode: function () { - return H5.getHashCode(this); - }, - toString: function () { - return this.ScopeName; - } - } - }); - - // @source ParameterModifier.js - - H5.define("System.Reflection.ParameterModifier", { - $kind: "struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $._byRef = null; - return $;} - } - }, - fields: { - _byRef: null - }, - ctors: { - $ctor1: function (parameterCount) { - this.$initialize(); - if (parameterCount <= 0) { - throw new System.ArgumentException.$ctor1("Must specify one or more parameters."); - } - - this._byRef = System.Array.init(parameterCount, false, System.Boolean); - }, - ctor: function () { - this.$initialize(); - } - }, - methods: { - getItem: function (index) { - return this._byRef[System.Array.index(index, this._byRef)]; - }, - setItem: function (index, value) { - this._byRef[System.Array.index(index, this._byRef)] = value; - }, - getHashCode: function () { - var h = H5.addHash([6723435274, this._byRef]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Reflection.ParameterModifier)) { - return false; - } - return H5.equals(this._byRef, o._byRef); - }, - $clone: function (to) { - var s = to || new System.Reflection.ParameterModifier(); - s._byRef = this._byRef; - return s; - } - } - }); - - // @source TypeAttributes.js - - H5.define("System.Reflection.TypeAttributes", { - $kind: "enum", - statics: { - fields: { - VisibilityMask: 7, - NotPublic: 0, - Public: 1, - NestedPublic: 2, - NestedPrivate: 3, - NestedFamily: 4, - NestedAssembly: 5, - NestedFamANDAssem: 6, - NestedFamORAssem: 7, - LayoutMask: 24, - AutoLayout: 0, - SequentialLayout: 8, - ExplicitLayout: 16, - ClassSemanticsMask: 32, - Class: 0, - Interface: 32, - Abstract: 128, - Sealed: 256, - SpecialName: 1024, - Import: 4096, - Serializable: 8192, - WindowsRuntime: 16384, - StringFormatMask: 196608, - AnsiClass: 0, - UnicodeClass: 65536, - AutoClass: 131072, - CustomFormatClass: 196608, - CustomFormatMask: 12582912, - BeforeFieldInit: 1048576, - RTSpecialName: 2048, - HasSecurity: 262144, - ReservedMask: 264192 - } - }, - $flags: true - }); - - // @source Random.js - - H5.define("System.Random", { - statics: { - fields: { - MBIG: 0, - MSEED: 0, - MZ: 0, - t_shared: null - }, - props: { - Shared: { - get: function () { - if (System.Random.t_shared == null) { - System.Random.t_shared = new System.Random.ctor(); - } - - return System.Random.t_shared; - } - } - }, - ctors: { - init: function () { - this.MBIG = 2147483647; - this.MSEED = 161803398; - this.MZ = 0; - } - } - }, - fields: { - inext: 0, - inextp: 0, - SeedArray: null - }, - ctors: { - init: function () { - this.SeedArray = System.Array.init(56, 0, System.Int32); - }, - ctor: function () { - System.Random.$ctor1.call(this, System.Int64.clip32(System.DateTime.getTicks(System.DateTime.getNow()))); - }, - $ctor1: function (seed) { - this.$initialize(); - var ii; - var mj, mk; - - var subtraction = (seed === -2147483648) ? 2147483647 : Math.abs(seed); - mj = (System.Random.MSEED - subtraction) | 0; - this.SeedArray[System.Array.index(55, this.SeedArray)] = mj; - mk = 1; - for (var i = 1; i < 55; i = (i + 1) | 0) { - ii = (H5.Int.mul(21, i)) % 55; - this.SeedArray[System.Array.index(ii, this.SeedArray)] = mk; - mk = (mj - mk) | 0; - if (mk < 0) { - mk = (mk + System.Random.MBIG) | 0; - } - mj = this.SeedArray[System.Array.index(ii, this.SeedArray)]; - } - for (var k = 1; k < 5; k = (k + 1) | 0) { - for (var i1 = 1; i1 < 56; i1 = (i1 + 1) | 0) { - this.SeedArray[System.Array.index(i1, this.SeedArray)] = (this.SeedArray[System.Array.index(i1, this.SeedArray)] - this.SeedArray[System.Array.index(((1 + (((i1 + 30) | 0)) % 55) | 0), this.SeedArray)]) | 0; - if (this.SeedArray[System.Array.index(i1, this.SeedArray)] < 0) { - this.SeedArray[System.Array.index(i1, this.SeedArray)] = (this.SeedArray[System.Array.index(i1, this.SeedArray)] + System.Random.MBIG) | 0; - } - } - } - this.inext = 0; - this.inextp = 21; - seed = 1; - } - }, - methods: { - Sample: function () { - return (this.InternalSample() * (4.656612875245797E-10)); - }, - InternalSample: function () { - var retVal; - var locINext = this.inext; - var locINextp = this.inextp; - - if (((locINext = (locINext + 1) | 0)) >= 56) { - locINext = 1; - } - - if (((locINextp = (locINextp + 1) | 0)) >= 56) { - locINextp = 1; - } - - retVal = (this.SeedArray[System.Array.index(locINext, this.SeedArray)] - this.SeedArray[System.Array.index(locINextp, this.SeedArray)]) | 0; - - if (retVal === System.Random.MBIG) { - retVal = (retVal - 1) | 0; - } - - if (retVal < 0) { - retVal = (retVal + System.Random.MBIG) | 0; - } - - this.SeedArray[System.Array.index(locINext, this.SeedArray)] = retVal; - - this.inext = locINext; - this.inextp = locINextp; - - return retVal; - }, - Next: function () { - return this.InternalSample(); - }, - Next$2: function (minValue, maxValue) { - if (minValue > maxValue) { - throw new System.ArgumentOutOfRangeException.$ctor4("minValue", "'minValue' cannot be greater than maxValue."); - } - - var range = System.Int64(maxValue).sub(System.Int64(minValue)); - if (range.lte(System.Int64(2147483647))) { - return (((H5.Int.clip32((this.Sample() * System.Int64.toNumber(range))) + minValue) | 0)); - } else { - return System.Int64.clip32(H5.Int.clip64((this.GetSampleForLargeRange() * System.Int64.toNumber(range))).add(System.Int64(minValue))); - } - }, - Next$1: function (maxValue) { - if (maxValue < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("maxValue", "'maxValue' must be greater than zero."); - } - return H5.Int.clip32(this.Sample() * maxValue); - }, - GetSampleForLargeRange: function () { - - var result = this.InternalSample(); - var negative = (this.InternalSample() % 2 === 0) ? true : false; - if (negative) { - result = (-result) | 0; - } - var d = result; - d += (2147483646); - d /= 4294967293; - return d; - }, - NextDouble: function () { - return this.Sample(); - }, - NextBytes: function (buffer) { - if (buffer == null) { - throw new System.ArgumentNullException.$ctor1("buffer"); - } - for (var i = 0; i < buffer.length; i = (i + 1) | 0) { - buffer[System.Array.index(i, buffer)] = (this.InternalSample() % (256)) & 255; - } - }, - NextInt64: function () { - return this.NextInt64$1(System.Int64.MaxValue); - }, - NextInt64$1: function (maxValue) { - if (maxValue.lt(System.Int64(0))) { - throw new System.ArgumentOutOfRangeException.$ctor4("maxValue", "maxValue must be greater than or equal to 0"); - } - - return this.NextInt64$2(System.Int64(0), maxValue); - }, - NextInt64$2: function (minValue, maxValue) { - if (minValue.gt(maxValue)) { - throw new System.ArgumentOutOfRangeException.$ctor4("minValue", "minValue must be less than or equal to maxValue"); - } - - var range = System.Int64.clipu64(maxValue.sub(minValue)); - - if (range.equals(System.UInt64(0))) { - return minValue; - } - - if (range.lte(System.UInt64(2147483647))) { - return System.Int64(this.Next$1(System.Int64.clip32(range))).add(minValue); - } - - var buffer = System.Array.init(8, 0, System.Byte); - var result; - var limit = System.UInt64.MaxValue.sub((System.UInt64.MaxValue.mod(range))); - - do { - this.NextBytes(buffer); - result = System.BitConverter.toUInt64(buffer, 0); - } while (result.gte(limit)); - - return System.Int64.clip64((result.mod(range))).add(minValue); - }, - NextSingle: function () { - return this.Sample(); - } - } - }); - - // @source RankException.js - - H5.define("System.RankException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "Attempted to operate on an array with the incorrect number of dimensions."); - this.HResult = -2146233065; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233065; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2146233065; - } - } - }); - - // @source SR.js - - H5.define("System.SR", { - statics: { - fields: { - ArgumentException_ValueTupleIncorrectType: null, - ArgumentException_ValueTupleLastArgumentNotAValueTuple: null - }, - props: { - ResourceManager: null - }, - ctors: { - init: function () { - this.ArgumentException_ValueTupleIncorrectType = "Argument must be of type {0}."; - this.ArgumentException_ValueTupleLastArgumentNotAValueTuple = "The last element of an eight element ValueTuple must be a ValueTuple."; - } - }, - methods: { - UsingResourceKeys: function () { - return false; - }, - GetResourceString: function (resourceKey) { - return System.SR.GetResourceString$1(resourceKey, null); - }, - GetResourceString$1: function (resourceKey, defaultString) { - var resourceString = null; - try { - resourceString = System.SR.InternalGetResourceString(resourceKey); - } catch ($e1) { - $e1 = System.Exception.create($e1); - if (H5.is($e1, System.Resources.MissingManifestResourceException)) { - } else { - throw $e1; - } - } - - if (defaultString != null && System.String.equals(resourceKey, resourceString, 4)) { - return defaultString; - } - - return resourceString; - }, - InternalGetResourceString: function (key) { - if (key == null || key.length === 0) { - return key; - } - - return key; - }, - Format$3: function (resourceFormat, args) { - if (args === void 0) { args = []; } - if (args != null) { - if (System.SR.UsingResourceKeys()) { - return (resourceFormat || "") + ((args).join(", ") || ""); - } - - return System.String.format.apply(System.String, [resourceFormat].concat(args)); - } - - return resourceFormat; - }, - Format: function (resourceFormat, p1) { - if (System.SR.UsingResourceKeys()) { - return ([resourceFormat, p1]).join(", "); - } - - return System.String.format(resourceFormat, [p1]); - }, - Format$1: function (resourceFormat, p1, p2) { - if (System.SR.UsingResourceKeys()) { - return ([resourceFormat, p1, p2]).join(", "); - } - - return System.String.format(resourceFormat, p1, p2); - }, - Format$2: function (resourceFormat, p1, p2, p3) { - if (System.SR.UsingResourceKeys()) { - return ([resourceFormat, p1, p2, p3]).join(", "); - } - return System.String.format(resourceFormat, p1, p2, p3); - } - } - } - }); - - // @source StringComparison.js - - H5.define("System.StringComparison", { - $kind: "enum", - statics: { - fields: { - CurrentCulture: 0, - CurrentCultureIgnoreCase: 1, - InvariantCulture: 2, - InvariantCultureIgnoreCase: 3, - Ordinal: 4, - OrdinalIgnoreCase: 5 - } - } - }); - - // @source AggregateException.js - - H5.define("System.AggregateException", { - inherits: [System.Exception], - - ctor: function (message, innerExceptions) { - this.$initialize(); - this.innerExceptions = new(System.Collections.ObjectModel.ReadOnlyCollection$1(System.Exception))(H5.hasValue(innerExceptions) ? H5.toArray(innerExceptions) : []); - System.Exception.ctor.call(this, message || 'One or more errors occurred.', this.innerExceptions.Count > 0 ? this.innerExceptions.getItem(0) : null); - }, - - handle: function (predicate) { - if (!H5.hasValue(predicate)) { - throw new System.ArgumentNullException.$ctor1("predicate"); - } - - var count = this.innerExceptions.Count, - unhandledExceptions = []; - - for (var i = 0; i < count; i++) { - if (!predicate(this.innerExceptions.get(i))) { - unhandledExceptions.push(this.innerExceptions.getItem(i)); - } - } - - if (unhandledExceptions.length > 0) { - throw new System.AggregateException(this.Message, unhandledExceptions); - } - }, - - getBaseException: function () { - var back = this; - var backAsAggregate = this; - - while (backAsAggregate != null && backAsAggregate.innerExceptions.Count === 1) - { - back = back.InnerException; - backAsAggregate = H5.as(back, System.AggregateException); - } - - return back; - }, - - hasTaskCanceledException: function () { - for (var i = 0; i < this.innerExceptions.Count; i++) { - var e = this.innerExceptions.getItem(i); - if (H5.is(e, System.Threading.Tasks.TaskCanceledException) || (H5.is(e, System.AggregateException) && e.hasTaskCanceledException())) { - return true; - } - } - return false; - }, - - flatten: function () { - // Initialize a collection to contain the flattened exceptions. - var flattenedExceptions = new(System.Collections.Generic.List$1(System.Exception))(); - - // Create a list to remember all aggregates to be flattened, this will be accessed like a FIFO queue - var exceptionsToFlatten = new(System.Collections.Generic.List$1(System.AggregateException))(); - exceptionsToFlatten.add(this); - var nDequeueIndex = 0; - - // Continue removing and recursively flattening exceptions, until there are no more. - while (exceptionsToFlatten.Count > nDequeueIndex) { - // dequeue one from exceptionsToFlatten - var currentInnerExceptions = exceptionsToFlatten.getItem(nDequeueIndex++).innerExceptions, - count = currentInnerExceptions.Count; - - for (var i = 0; i < count; i++) { - var currentInnerException = currentInnerExceptions.getItem(i); - - if (!H5.hasValue(currentInnerException)) { - continue; - } - - var currentInnerAsAggregate = H5.as(currentInnerException, System.AggregateException); - - // If this exception is an aggregate, keep it around for later. Otherwise, - // simply add it to the list of flattened exceptions to be returned. - if (H5.hasValue(currentInnerAsAggregate)) { - exceptionsToFlatten.add(currentInnerAsAggregate); - } else { - flattenedExceptions.add(currentInnerException); - } - } - } - - return new System.AggregateException(this.Message, flattenedExceptions); - } - }); - - - // @source PromiseException.js - - H5.define("H5.PromiseException", { - inherits: [System.Exception], - - ctor: function (args, message, innerException) { - this.$initialize(); - this.arguments = System.Array.clone(args); - - if (message == null) { - message = "Promise exception: ["; - message += this.arguments.map(function (item) { return item == null ? "null" : item.toString(); }).join(", "); - message += "]"; - } - - System.Exception.ctor.call(this, message, innerException); - }, - - getArguments: function () { - return this.arguments; - } - }); - - // @source ThrowHelper.js - - H5.define("System.ThrowHelper", { - statics: { - methods: { - ThrowArrayTypeMismatchException: function () { - throw new System.ArrayTypeMismatchException.ctor(); - }, - ThrowInvalidTypeWithPointersNotSupported: function (targetType) { - throw new System.ArgumentException.$ctor1(System.SR.Format("Cannot use type '{0}'. Only value types without pointers or references are supported.", targetType)); - }, - ThrowIndexOutOfRangeException: function () { - throw new System.IndexOutOfRangeException.ctor(); - }, - ThrowArgumentOutOfRangeException: function () { - throw new System.ArgumentOutOfRangeException.ctor(); - }, - ThrowArgumentOutOfRangeException$1: function (argument) { - throw new System.ArgumentOutOfRangeException.$ctor1(System.ThrowHelper.GetArgumentName(argument)); - }, - ThrowArgumentOutOfRangeException$2: function (argument, resource) { - throw System.ThrowHelper.GetArgumentOutOfRangeException(argument, resource); - }, - ThrowArgumentOutOfRangeException$3: function (argument, paramNumber, resource) { - throw System.ThrowHelper.GetArgumentOutOfRangeException$1(argument, paramNumber, resource); - }, - ThrowArgumentException_DestinationTooShort: function () { - throw new System.ArgumentException.$ctor1("Destination is too short."); - }, - ThrowArgumentException_OverlapAlignmentMismatch: function () { - throw new System.ArgumentException.$ctor1("Overlapping spans have mismatching alignment."); - }, - ThrowArgumentOutOfRange_IndexException: function () { - throw System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.index, System.ExceptionResource.ArgumentOutOfRange_Index); - }, - ThrowIndexArgumentOutOfRange_NeedNonNegNumException: function () { - throw System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.index, System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - }, - ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum: function () { - throw System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.$length, System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - }, - ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index: function () { - throw System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.startIndex, System.ExceptionResource.ArgumentOutOfRange_Index); - }, - ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count: function () { - throw System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.count, System.ExceptionResource.ArgumentOutOfRange_Count); - }, - ThrowWrongKeyTypeArgumentException: function (T, key, targetType) { - throw System.ThrowHelper.GetWrongKeyTypeArgumentException(key, targetType); - }, - ThrowWrongValueTypeArgumentException: function (T, value, targetType) { - throw System.ThrowHelper.GetWrongValueTypeArgumentException(value, targetType); - }, - GetAddingDuplicateWithKeyArgumentException: function (key) { - return new System.ArgumentException.$ctor1(System.SR.Format("An item with the same key has already been added. Key: {0}", key)); - }, - ThrowAddingDuplicateWithKeyArgumentException: function (T, key) { - throw System.ThrowHelper.GetAddingDuplicateWithKeyArgumentException(key); - }, - ThrowKeyNotFoundException: function (T, key) { - throw System.ThrowHelper.GetKeyNotFoundException(key); - }, - ThrowArgumentException: function (resource) { - throw System.ThrowHelper.GetArgumentException(resource); - }, - ThrowArgumentException$1: function (resource, argument) { - throw System.ThrowHelper.GetArgumentException$1(resource, argument); - }, - GetArgumentNullException: function (argument) { - return new System.ArgumentNullException.$ctor1(System.ThrowHelper.GetArgumentName(argument)); - }, - ThrowArgumentNullException: function (argument) { - throw System.ThrowHelper.GetArgumentNullException(argument); - }, - ThrowArgumentNullException$2: function (resource) { - throw new System.ArgumentNullException.$ctor1(System.ThrowHelper.GetResourceString(resource)); - }, - ThrowArgumentNullException$1: function (argument, resource) { - throw new System.ArgumentNullException.$ctor3(System.ThrowHelper.GetArgumentName(argument), System.ThrowHelper.GetResourceString(resource)); - }, - ThrowInvalidOperationException: function (resource) { - throw System.ThrowHelper.GetInvalidOperationException(resource); - }, - ThrowInvalidOperationException$1: function (resource, e) { - throw new System.InvalidOperationException.$ctor2(System.ThrowHelper.GetResourceString(resource), e); - }, - ThrowInvalidOperationException_OutstandingReferences: function () { - System.ThrowHelper.ThrowInvalidOperationException(System.ExceptionResource.Memory_OutstandingReferences); - }, - ThrowSerializationException: function (resource) { - throw new System.Runtime.Serialization.SerializationException.$ctor1(System.ThrowHelper.GetResourceString(resource)); - }, - ThrowSecurityException: function (resource) { - throw new System.Security.SecurityException.$ctor1(System.ThrowHelper.GetResourceString(resource)); - }, - ThrowRankException: function (resource) { - throw new System.RankException.$ctor1(System.ThrowHelper.GetResourceString(resource)); - }, - ThrowNotSupportedException$1: function (resource) { - throw new System.NotSupportedException.$ctor1(System.ThrowHelper.GetResourceString(resource)); - }, - ThrowNotSupportedException: function () { - throw new System.NotSupportedException.ctor(); - }, - ThrowUnauthorizedAccessException: function (resource) { - throw new System.UnauthorizedAccessException.$ctor1(System.ThrowHelper.GetResourceString(resource)); - }, - ThrowObjectDisposedException$1: function (objectName, resource) { - throw new System.ObjectDisposedException.$ctor3(objectName, System.ThrowHelper.GetResourceString(resource)); - }, - ThrowObjectDisposedException: function (resource) { - throw new System.ObjectDisposedException.$ctor3(null, System.ThrowHelper.GetResourceString(resource)); - }, - ThrowObjectDisposedException_MemoryDisposed: function () { - throw new System.ObjectDisposedException.$ctor3("OwnedMemory", System.ThrowHelper.GetResourceString(System.ExceptionResource.MemoryDisposed)); - }, - ThrowAggregateException: function (exceptions) { - throw new System.AggregateException(null, exceptions); - }, - ThrowOutOfMemoryException: function () { - throw new System.OutOfMemoryException.ctor(); - }, - ThrowArgumentException_Argument_InvalidArrayType: function () { - throw System.ThrowHelper.GetArgumentException(System.ExceptionResource.Argument_InvalidArrayType); - }, - ThrowInvalidOperationException_InvalidOperation_EnumNotStarted: function () { - throw System.ThrowHelper.GetInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumNotStarted); - }, - ThrowInvalidOperationException_InvalidOperation_EnumEnded: function () { - throw System.ThrowHelper.GetInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumEnded); - }, - ThrowInvalidOperationException_EnumCurrent: function (index) { - throw System.ThrowHelper.GetInvalidOperationException_EnumCurrent(index); - }, - ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion: function () { - throw System.ThrowHelper.GetInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumFailedVersion); - }, - ThrowInvalidOperationException_InvalidOperation_EnumOpCantHappen: function () { - throw System.ThrowHelper.GetInvalidOperationException(System.ExceptionResource.InvalidOperation_EnumOpCantHappen); - }, - ThrowInvalidOperationException_InvalidOperation_NoValue: function () { - throw System.ThrowHelper.GetInvalidOperationException(System.ExceptionResource.InvalidOperation_NoValue); - }, - ThrowArraySegmentCtorValidationFailedExceptions: function (array, offset, count) { - throw System.ThrowHelper.GetArraySegmentCtorValidationFailedException(array, offset, count); - }, - GetArraySegmentCtorValidationFailedException: function (array, offset, count) { - if (array == null) { - return System.ThrowHelper.GetArgumentNullException(System.ExceptionArgument.array); - } - if (offset < 0) { - return System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.offset, System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - } - if (count < 0) { - return System.ThrowHelper.GetArgumentOutOfRangeException(System.ExceptionArgument.count, System.ExceptionResource.ArgumentOutOfRange_NeedNonNegNum); - } - - return System.ThrowHelper.GetArgumentException(System.ExceptionResource.Argument_InvalidOffLen); - }, - GetArgumentException: function (resource) { - return new System.ArgumentException.$ctor1(System.ThrowHelper.GetResourceString(resource)); - }, - GetArgumentException$1: function (resource, argument) { - return new System.ArgumentException.$ctor3(System.ThrowHelper.GetResourceString(resource), System.ThrowHelper.GetArgumentName(argument)); - }, - GetInvalidOperationException: function (resource) { - return new System.InvalidOperationException.$ctor1(System.ThrowHelper.GetResourceString(resource)); - }, - GetWrongKeyTypeArgumentException: function (key, targetType) { - return new System.ArgumentException.$ctor3(System.SR.Format$1("The value \"{0}\" is not of type \"{1}\" and cannot be used in this generic collection.", key, targetType), "key"); - }, - GetWrongValueTypeArgumentException: function (value, targetType) { - return new System.ArgumentException.$ctor3(System.SR.Format$1("The value \"{0}\" is not of type \"{1}\" and cannot be used in this generic collection.", value, targetType), "value"); - }, - GetKeyNotFoundException: function (key) { - return new System.Collections.Generic.KeyNotFoundException.$ctor1(System.SR.Format("The given key '{0}' was not present in the dictionary.", H5.toString(key))); - }, - GetArgumentOutOfRangeException: function (argument, resource) { - return new System.ArgumentOutOfRangeException.$ctor4(System.ThrowHelper.GetArgumentName(argument), System.ThrowHelper.GetResourceString(resource)); - }, - GetArgumentOutOfRangeException$1: function (argument, paramNumber, resource) { - return new System.ArgumentOutOfRangeException.$ctor4((System.ThrowHelper.GetArgumentName(argument) || "") + "[" + (H5.toString(paramNumber) || "") + "]", System.ThrowHelper.GetResourceString(resource)); - }, - GetInvalidOperationException_EnumCurrent: function (index) { - return System.ThrowHelper.GetInvalidOperationException(index < 0 ? System.ExceptionResource.InvalidOperation_EnumNotStarted : System.ExceptionResource.InvalidOperation_EnumEnded); - }, - IfNullAndNullsAreIllegalThenThrow: function (T, value, argName) { - if (!(H5.getDefaultValue(T) == null) && value == null) { - System.ThrowHelper.ThrowArgumentNullException(argName); - } - }, - GetArgumentName: function (argument) { - - return System.Enum.toString(System.ExceptionArgument, argument); - }, - GetResourceString: function (resource) { - - return System.SR.GetResourceString(System.Enum.toString(System.ExceptionResource, resource)); - }, - ThrowNotSupportedExceptionIfNonNumericType: function (T) { - if (T !== System.Byte && T !== System.SByte && T !== System.Int16 && T !== System.UInt16 && T !== System.Int32 && T !== System.UInt32 && T !== System.Int64 && T !== System.UInt64 && T !== System.Single && T !== System.Double) { - throw new System.NotSupportedException.$ctor1("Specified type is not supported"); - } - } - } - } - }); - - // @source TimeoutException.js - - H5.define("System.TimeoutException", { - inherits: [System.SystemException], - ctors: { - ctor: function () { - this.$initialize(); - System.SystemException.$ctor1.call(this, "The operation has timed out."); - this.HResult = -2146233083; - }, - $ctor1: function (message) { - this.$initialize(); - System.SystemException.$ctor1.call(this, message); - this.HResult = -2146233083; - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.SystemException.$ctor2.call(this, message, innerException); - this.HResult = -2146233083; - } - } - }); - - // @source RegexMatchTimeoutException.js - - H5.define("System.RegexMatchTimeoutException", { - inherits: [System.TimeoutException], - - _regexInput: "", - - _regexPattern: "", - - _matchTimeout: null, - - config: { - init: function () { - this._matchTimeout = System.TimeSpan.fromTicks(-1); - } - }, - - ctor: function (message, innerException, matchTimeout) { - this.$initialize(); - - if (arguments.length == 3) { - this._regexInput = message; - this._regexPattern = innerException; - this._matchTimeout = matchTimeout; - - message = "The RegEx engine has timed out while trying to match a pattern to an input string. This can occur for many reasons, including very large inputs or excessive backtracking caused by nested quantifiers, back-references and other factors."; - innerException = null; - } - - System.TimeoutException.ctor.call(this, message, innerException); - }, - - getPattern: function () { - return this._regexPattern; - }, - - getInput: function () { - return this._regexInput; - }, - - getMatchTimeout: function () { - return this._matchTimeout; - } - }); - - // @source Encoding.js - - H5.define("System.Text.Encoding", { - statics: { - fields: { - _encodings: null - }, - props: { - Default: null, - Unicode: null, - ASCII: null, - BigEndianUnicode: null, - UTF7: null, - UTF8: null, - UTF32: null - }, - ctors: { - init: function () { - this.Default = new System.Text.UnicodeEncoding.$ctor1(false, true); - this.Unicode = new System.Text.UnicodeEncoding.$ctor1(false, true); - this.ASCII = new System.Text.ASCIIEncoding(); - this.BigEndianUnicode = new System.Text.UnicodeEncoding.$ctor1(true, true); - this.UTF7 = new System.Text.UTF7Encoding.ctor(); - this.UTF8 = new System.Text.UTF8Encoding.ctor(); - this.UTF32 = new System.Text.UTF32Encoding.$ctor1(false, true); - } - }, - methods: { - Convert: function (srcEncoding, dstEncoding, bytes) { - return System.Text.Encoding.Convert$1(srcEncoding, dstEncoding, bytes, 0, bytes.length); - }, - Convert$1: function (srcEncoding, dstEncoding, bytes, index, count) { - if (srcEncoding == null || dstEncoding == null) { - throw new System.ArgumentNullException.$ctor1(srcEncoding == null ? "srcEncoding" : "dstEncoding"); - } - - if (bytes == null) { - throw new System.ArgumentNullException.$ctor1("bytes"); - } - - return dstEncoding.GetBytes(srcEncoding.GetChars$1(bytes, index, count)); - }, - GetEncoding: function (codepage) { - switch (codepage) { - case 1200: - return System.Text.Encoding.Unicode; - case 20127: - return System.Text.Encoding.ASCII; - case 1201: - return System.Text.Encoding.BigEndianUnicode; - case 65000: - return System.Text.Encoding.UTF7; - case 65001: - return System.Text.Encoding.UTF8; - case 12000: - return System.Text.Encoding.UTF32; - } - throw new System.NotSupportedException.ctor(); - }, - GetEncoding$1: function (codepage) { - switch (codepage) { - case "utf-16": - return System.Text.Encoding.Unicode; - case "us-ascii": - return System.Text.Encoding.ASCII; - case "utf-16BE": - return System.Text.Encoding.BigEndianUnicode; - case "utf-7": - return System.Text.Encoding.UTF7; - case "utf-8": - return System.Text.Encoding.UTF8; - case "utf-32": - return System.Text.Encoding.UTF32; - } - throw new System.NotSupportedException.ctor(); - }, - GetEncodings: function () { - if (System.Text.Encoding._encodings != null) { - return System.Text.Encoding._encodings; - } - System.Text.Encoding._encodings = System.Array.init(6, null, System.Text.EncodingInfo); - var result = System.Text.Encoding._encodings; - - result[System.Array.index(0, result)] = new System.Text.EncodingInfo(20127, "us-ascii", "US-ASCII"); - result[System.Array.index(1, result)] = new System.Text.EncodingInfo(1200, "utf-16", "Unicode"); - result[System.Array.index(2, result)] = new System.Text.EncodingInfo(1201, "utf-16BE", "Unicode (Big-Endian)"); - result[System.Array.index(3, result)] = new System.Text.EncodingInfo(65000, "utf-7", "Unicode (UTF-7)"); - result[System.Array.index(4, result)] = new System.Text.EncodingInfo(65001, "utf-8", "Unicode (UTF-8)"); - result[System.Array.index(5, result)] = new System.Text.EncodingInfo(1200, "utf-32", "Unicode (UTF-32)"); - return result; - } - } - }, - fields: { - _hasError: false, - fallbackCharacter: 0 - }, - props: { - CodePage: { - get: function () { - return 0; - } - }, - EncodingName: { - get: function () { - return null; - } - } - }, - ctors: { - init: function () { - this.fallbackCharacter = 63; - } - }, - methods: { - Encode$1: function (chars, index, count) { - var writtenCount = { }; - return this.Encode$3(System.String.fromCharArray(chars, index, count), null, 0, writtenCount); - }, - Encode$5: function (s, index, count, outputBytes, outputIndex) { - var writtenBytes = { }; - this.Encode$3(s.substr(index, count), outputBytes, outputIndex, writtenBytes); - return writtenBytes.v; - }, - Encode$4: function (chars, index, count, outputBytes, outputIndex) { - var writtenBytes = { }; - this.Encode$3(System.String.fromCharArray(chars, index, count), outputBytes, outputIndex, writtenBytes); - return writtenBytes.v; - }, - Encode: function (chars) { - var count = { }; - return this.Encode$3(System.String.fromCharArray(chars), null, 0, count); - }, - Encode$2: function (str) { - var count = { }; - return this.Encode$3(str, null, 0, count); - }, - Decode$1: function (bytes, index, count) { - return this.Decode$2(bytes, index, count, null, 0); - }, - Decode: function (bytes) { - return this.Decode$2(bytes, 0, bytes.length, null, 0); - }, - GetByteCount: function (chars) { - return this.GetByteCount$1(chars, 0, chars.length); - }, - GetByteCount$2: function (s) { - return this.Encode$2(s).length; - }, - GetByteCount$1: function (chars, index, count) { - return this.Encode$1(chars, index, count).length; - }, - GetBytes: function (chars) { - return this.GetBytes$1(chars, 0, chars.length); - }, - GetBytes$1: function (chars, index, count) { - return this.Encode$2(System.String.fromCharArray(chars, index, count)); - }, - GetBytes$3: function (chars, charIndex, charCount, bytes, byteIndex) { - return this.Encode$4(chars, charIndex, charCount, bytes, byteIndex); - }, - GetBytes$2: function (s) { - return this.Encode$2(s); - }, - GetBytes$4: function (s, charIndex, charCount, bytes, byteIndex) { - return this.Encode$5(s, charIndex, charCount, bytes, byteIndex); - }, - GetCharCount: function (bytes) { - return this.Decode(bytes).length; - }, - GetCharCount$1: function (bytes, index, count) { - return this.Decode$1(bytes, index, count).length; - }, - GetChars: function (bytes) { - var $t; - return ($t = this.Decode(bytes), System.String.toCharArray($t, 0, $t.length)); - }, - GetChars$1: function (bytes, index, count) { - var $t; - return ($t = this.Decode$1(bytes, index, count), System.String.toCharArray($t, 0, $t.length)); - }, - GetChars$2: function (bytes, byteIndex, byteCount, chars, charIndex) { - var s = this.Decode$1(bytes, byteIndex, byteCount); - var arr = System.String.toCharArray(s, 0, s.length); - - if (chars.length < (((arr.length + charIndex) | 0))) { - throw new System.ArgumentException.$ctor3(null, "chars"); - } - - for (var i = 0; i < arr.length; i = (i + 1) | 0) { - chars[System.Array.index(((charIndex + i) | 0), chars)] = arr[System.Array.index(i, arr)]; - } - - return arr.length; - }, - GetString: function (bytes) { - return this.Decode(bytes); - }, - GetString$1: function (bytes, index, count) { - return this.Decode$1(bytes, index, count); - } - } - }); - - // @source ASCIIEncoding.js - - H5.define("System.Text.ASCIIEncoding", { - inherits: [System.Text.Encoding], - props: { - CodePage: { - get: function () { - return 20127; - } - }, - EncodingName: { - get: function () { - return "US-ASCII"; - } - } - }, - methods: { - Encode$3: function (s, outputBytes, outputIndex, writtenBytes) { - var hasBuffer = outputBytes != null; - - if (!hasBuffer) { - outputBytes = System.Array.init(0, 0, System.Byte); - } - - var recorded = 0; - for (var i = 0; i < s.length; i = (i + 1) | 0) { - var ch = s.charCodeAt(i); - var byteCode = (ch <= 127 ? ch : this.fallbackCharacter) & 255; - - if (hasBuffer) { - if ((((i + outputIndex) | 0)) >= outputBytes.length) { - throw new System.ArgumentException.$ctor1("bytes"); - } - outputBytes[System.Array.index(((i + outputIndex) | 0), outputBytes)] = byteCode; - } else { - outputBytes.push(byteCode); - } - recorded = (recorded + 1) | 0; - } - - writtenBytes.v = recorded; - - if (hasBuffer) { - return null; - } - - return outputBytes; - }, - Decode$2: function (bytes, index, count, chars, charIndex) { - var position = index; - var result = ""; - var endpoint = (position + count) | 0; - - for (; position < endpoint; position = (position + 1) | 0) { - var byteCode = bytes[System.Array.index(position, bytes)]; - - if (byteCode > 127) { - result = (result || "") + String.fromCharCode(this.fallbackCharacter); - } else { - result = (result || "") + ((String.fromCharCode(byteCode)) || ""); - } - } - - return result; - }, - GetMaxByteCount: function (charCount) { - if (charCount < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("charCount"); - } - - var byteCount = System.Int64(charCount).add(System.Int64(1)); - - if (byteCount.gt(System.Int64(2147483647))) { - throw new System.ArgumentOutOfRangeException.$ctor1("charCount"); - } - - return System.Int64.clip32(byteCount); - }, - GetMaxCharCount: function (byteCount) { - if (byteCount < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("byteCount"); - } - - var charCount = System.Int64(byteCount); - - if (charCount.gt(System.Int64(2147483647))) { - throw new System.ArgumentOutOfRangeException.$ctor1("byteCount"); - } - - return System.Int64.clip32(charCount); - } - } - }); - - // @source EncodingInfo.js - - H5.define("System.Text.EncodingInfo", { - props: { - CodePage: 0, - Name: null, - DisplayName: null - }, - ctors: { - ctor: function (codePage, name, displayName) { - var $t; - this.$initialize(); - this.CodePage = codePage; - this.Name = name; - this.DisplayName = ($t = displayName, $t != null ? $t : name); - } - }, - methods: { - GetEncoding: function () { - return System.Text.Encoding.GetEncoding(this.CodePage); - }, - getHashCode: function () { - return this.CodePage; - }, - equals: function (o) { - var that = H5.as(o, System.Text.EncodingInfo); - return System.Nullable.eq(this.CodePage, (that != null ? that.CodePage : null)); - } - } - }); - - // @source UnicodeEncoding.js - - H5.define("System.Text.UnicodeEncoding", { - inherits: [System.Text.Encoding], - fields: { - bigEndian: false, - byteOrderMark: false, - throwOnInvalid: false - }, - props: { - CodePage: { - get: function () { - return this.bigEndian ? 1201 : 1200; - } - }, - EncodingName: { - get: function () { - return this.bigEndian ? "Unicode (Big-Endian)" : "Unicode"; - } - } - }, - ctors: { - ctor: function () { - System.Text.UnicodeEncoding.$ctor1.call(this, false, true); - }, - $ctor1: function (bigEndian, byteOrderMark) { - System.Text.UnicodeEncoding.$ctor2.call(this, bigEndian, byteOrderMark, false); - }, - $ctor2: function (bigEndian, byteOrderMark, throwOnInvalidBytes) { - this.$initialize(); - System.Text.Encoding.ctor.call(this); - this.bigEndian = bigEndian; - this.byteOrderMark = byteOrderMark; - this.throwOnInvalid = throwOnInvalidBytes; - this.fallbackCharacter = 65533; - } - }, - methods: { - Encode$3: function (s, outputBytes, outputIndex, writtenBytes) { - var hasBuffer = outputBytes != null; - var recorded = 0; - var surrogate_1st = 0; - var fallbackCharacterCode = this.fallbackCharacter; - - var write = function (ch) { - if (hasBuffer) { - if (outputIndex >= outputBytes.length) { - throw new System.ArgumentException.$ctor1("bytes"); - } - - outputBytes[System.Array.index(H5.identity(outputIndex, ((outputIndex = (outputIndex + 1) | 0))), outputBytes)] = ch; - } else { - outputBytes.push(ch); - } - recorded = (recorded + 1) | 0; - }; - - var writePair = function (a, b) { - write(a); - write(b); - }; - - var swap = $asm.$.System.Text.UnicodeEncoding.f1; - - var fallback = H5.fn.bind(this, function () { - if (this.throwOnInvalid) { - throw new System.Exception("Invalid character in UTF16 text"); - } - - writePair((fallbackCharacterCode & 255), ((fallbackCharacterCode >> 8) & 255)); - }); - - if (!hasBuffer) { - outputBytes = System.Array.init(0, 0, System.Byte); - } - - if (this.bigEndian) { - fallbackCharacterCode = swap(fallbackCharacterCode); - } - - for (var i = 0; i < s.length; i = (i + 1) | 0) { - var ch = s.charCodeAt(i); - - if (surrogate_1st !== 0) { - if (ch >= 56320 && ch <= 57343) { - if (this.bigEndian) { - surrogate_1st = swap(surrogate_1st); - ch = swap(ch); - } - writePair((surrogate_1st & 255), ((surrogate_1st >> 8) & 255)); - writePair((ch & 255), ((ch >> 8) & 255)); - surrogate_1st = 0; - continue; - } - fallback(); - surrogate_1st = 0; - } - - if (55296 <= ch && ch <= 56319) { - surrogate_1st = ch; - continue; - } else if (56320 <= ch && ch <= 57343) { - fallback(); - surrogate_1st = 0; - continue; - } - - if (ch < 65536) { - if (this.bigEndian) { - ch = swap(ch); - } - writePair((ch & 255), ((ch >> 8) & 255)); - } else if (ch <= 1114111) { - ch = ch - 0x10000; - - var lowBits = ((ch & 1023) | 56320) & 65535; - var highBits = (((ch >> 10) & 1023) | 55296) & 65535; - - if (this.bigEndian) { - highBits = swap(highBits); - lowBits = swap(lowBits); - } - writePair((highBits & 255), ((highBits >> 8) & 255)); - writePair((lowBits & 255), ((lowBits >> 8) & 255)); - } else { - fallback(); - } - } - - if (surrogate_1st !== 0) { - fallback(); - } - - writtenBytes.v = recorded; - - if (hasBuffer) { - return null; - } - - return outputBytes; - }, - Decode$2: function (bytes, index, count, chars, charIndex) { - var position = index; - var result = ""; - var endpoint = (position + count) | 0; - this._hasError = false; - - var fallback = H5.fn.bind(this, function () { - if (this.throwOnInvalid) { - throw new System.Exception("Invalid character in UTF16 text"); - } - - result = (result || "") + String.fromCharCode(this.fallbackCharacter); - }); - - var swap = $asm.$.System.Text.UnicodeEncoding.f2; - - var readPair = H5.fn.bind(this, function () { - if ((((position + 2) | 0)) > endpoint) { - position = (position + 2) | 0; - return null; - } - - var a = bytes[System.Array.index(H5.identity(position, ((position = (position + 1) | 0))), bytes)]; - var b = bytes[System.Array.index(H5.identity(position, ((position = (position + 1) | 0))), bytes)]; - - var point = ((a << 8) | b) & 65535; - if (!this.bigEndian) { - point = swap(point); - } - - return point; - }); - - while (position < endpoint) { - var firstWord = readPair(); - - if (!System.Nullable.hasValue(firstWord)) { - fallback(); - this._hasError = true; - } else if ((System.Nullable.lt(firstWord, 55296)) || (System.Nullable.gt(firstWord, 57343))) { - result = (result || "") + ((System.String.fromCharCode(System.Nullable.getValue(firstWord))) || ""); - } else if ((System.Nullable.gte(firstWord, 55296)) && (System.Nullable.lte(firstWord, 56319))) { - var end = position >= endpoint; - var secondWord = readPair(); - if (end) { - fallback(); - this._hasError = true; - } else if (!System.Nullable.hasValue(secondWord)) { - fallback(); - fallback(); - } else if ((System.Nullable.gte(secondWord, 56320)) && (System.Nullable.lte(secondWord, 57343))) { - var highBits = System.Nullable.band(firstWord, 1023); - var lowBits = System.Nullable.band(secondWord, 1023); - - var charCode = H5.Int.clip32(System.Nullable.add((System.Nullable.bor((System.Nullable.sl(highBits, 10)), lowBits)), 65536)); - - result = (result || "") + ((System.String.fromCharCode(System.Nullable.getValue(charCode))) || ""); - } else { - fallback(); - position = (position - 2) | 0; - } - } else { - fallback(); - } - } - - return result; - }, - GetMaxByteCount: function (charCount) { - if (charCount < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("charCount"); - } - - var byteCount = System.Int64(charCount).add(System.Int64(1)); - byteCount = byteCount.shl(1); - - if (byteCount.gt(System.Int64(2147483647))) { - throw new System.ArgumentOutOfRangeException.$ctor1("charCount"); - } - - return System.Int64.clip32(byteCount); - }, - GetMaxCharCount: function (byteCount) { - if (byteCount < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("byteCount"); - } - - var charCount = System.Int64((byteCount >> 1)).add(System.Int64((byteCount & 1))).add(System.Int64(1)); - - if (charCount.gt(System.Int64(2147483647))) { - throw new System.ArgumentOutOfRangeException.$ctor1("byteCount"); - } - - return System.Int64.clip32(charCount); - } - } - }); - - H5.ns("System.Text.UnicodeEncoding", $asm.$); - - H5.apply($asm.$.System.Text.UnicodeEncoding, { - f1: function (ch) { - return ((((ch & 255) << 8) | ((ch >> 8) & 255)) & 65535); - }, - f2: function (ch) { - return ((((ch & 255) << 8) | (((ch >> 8)) & 255)) & 65535); - } - }); - - // @source UTF32Encoding.js - - H5.define("System.Text.UTF32Encoding", { - inherits: [System.Text.Encoding], - fields: { - bigEndian: false, - byteOrderMark: false, - throwOnInvalid: false - }, - props: { - CodePage: { - get: function () { - return this.bigEndian ? 1201 : 1200; - } - }, - EncodingName: { - get: function () { - return this.bigEndian ? "Unicode (UTF-32 Big-Endian)" : "Unicode (UTF-32)"; - } - } - }, - ctors: { - ctor: function () { - System.Text.UTF32Encoding.$ctor2.call(this, false, true, false); - }, - $ctor1: function (bigEndian, byteOrderMark) { - System.Text.UTF32Encoding.$ctor2.call(this, bigEndian, byteOrderMark, false); - }, - $ctor2: function (bigEndian, byteOrderMark, throwOnInvalidBytes) { - this.$initialize(); - System.Text.Encoding.ctor.call(this); - this.bigEndian = bigEndian; - this.byteOrderMark = byteOrderMark; - this.throwOnInvalid = throwOnInvalidBytes; - this.fallbackCharacter = 65533; - } - }, - methods: { - ToCodePoints: function (str) { - var surrogate_1st = 0; - var unicode_codes = System.Array.init(0, 0, System.Char); - var fallback = H5.fn.bind(this, function () { - if (this.throwOnInvalid) { - throw new System.Exception("Invalid character in UTF32 text"); - } - unicode_codes.push(this.fallbackCharacter); - }); - - for (var i = 0; i < str.length; i = (i + 1) | 0) { - var utf16_code = str.charCodeAt(i); - - if (surrogate_1st !== 0) { - if (utf16_code >= 56320 && utf16_code <= 57343) { - var surrogate_2nd = utf16_code; - var unicode_code = (((H5.Int.mul((((surrogate_1st - 55296) | 0)), (1024)) + (65536)) | 0) + (((surrogate_2nd - 56320) | 0))) | 0; - unicode_codes.push(unicode_code); - } else { - fallback(); - i = (i - 1) | 0; - } - surrogate_1st = 0; - } else if (utf16_code >= 55296 && utf16_code <= 56319) { - surrogate_1st = utf16_code; - } else if ((utf16_code >= 56320) && (utf16_code <= 57343)) { - fallback(); - } else { - unicode_codes.push(utf16_code); - } - } - - if (surrogate_1st !== 0) { - fallback(); - } - - return unicode_codes; - }, - Encode$3: function (s, outputBytes, outputIndex, writtenBytes) { - var hasBuffer = outputBytes != null; - var recorded = 0; - - var write = function (ch) { - if (hasBuffer) { - if (outputIndex >= outputBytes.length) { - throw new System.ArgumentException.$ctor1("bytes"); - } - - outputBytes[System.Array.index(H5.identity(outputIndex, ((outputIndex = (outputIndex + 1) | 0))), outputBytes)] = ch; - } else { - outputBytes.push(ch); - } - recorded = (recorded + 1) | 0; - }; - - var write32 = H5.fn.bind(this, function (a) { - var r = System.Array.init(4, 0, System.Byte); - r[System.Array.index(0, r)] = (((a & 255) >>> 0)); - r[System.Array.index(1, r)] = ((((a & 65280) >>> 0)) >>> 8); - r[System.Array.index(2, r)] = ((((a & 16711680) >>> 0)) >>> 16); - r[System.Array.index(3, r)] = ((((a & 4278190080) >>> 0)) >>> 24); - - if (this.bigEndian) { - r.reverse(); - } - - write(r[System.Array.index(0, r)]); - write(r[System.Array.index(1, r)]); - write(r[System.Array.index(2, r)]); - write(r[System.Array.index(3, r)]); - }); - - if (!hasBuffer) { - outputBytes = System.Array.init(0, 0, System.Byte); - } - - var unicode_codes = this.ToCodePoints(s); - for (var i = 0; i < unicode_codes.length; i = (i + 1) | 0) { - write32(unicode_codes[System.Array.index(i, unicode_codes)]); - } - - writtenBytes.v = recorded; - - if (hasBuffer) { - return null; - } - - return outputBytes; - }, - Decode$2: function (bytes, index, count, chars, charIndex) { - var position = index; - var result = ""; - var endpoint = (position + count) | 0; - this._hasError = false; - - var fallback = H5.fn.bind(this, function () { - if (this.throwOnInvalid) { - throw new System.Exception("Invalid character in UTF32 text"); - } - - result = (result || "") + ((String.fromCharCode(this.fallbackCharacter)) || ""); - }); - - var read32 = H5.fn.bind(this, function () { - if ((((position + 4) | 0)) > endpoint) { - position = (position + 4) | 0; - return null; - } - - var a = bytes[System.Array.index(H5.identity(position, ((position = (position + 1) | 0))), bytes)]; - var b = bytes[System.Array.index(H5.identity(position, ((position = (position + 1) | 0))), bytes)]; - var c = bytes[System.Array.index(H5.identity(position, ((position = (position + 1) | 0))), bytes)]; - var d = bytes[System.Array.index(H5.identity(position, ((position = (position + 1) | 0))), bytes)]; - - if (this.bigEndian) { - var tmp = b; - b = c; - c = tmp; - - tmp = a; - a = d; - d = tmp; - } - - return ((d << 24) | (c << 16) | (b << 8) | a); - }); - - while (position < endpoint) { - var unicode_code = read32(); - - if (unicode_code == null) { - fallback(); - this._hasError = true; - continue; - } - - if (System.Nullable.lt(unicode_code, 65536) || System.Nullable.gt(unicode_code, 1114111)) { - if (System.Nullable.lt(unicode_code, 0) || System.Nullable.gt(unicode_code, 1114111) || (System.Nullable.gte(unicode_code, 55296) && System.Nullable.lte(unicode_code, 57343))) { - fallback(); - } else { - result = (result || "") + ((String.fromCharCode(unicode_code)) || ""); - } - } else { - result = (result || "") + ((String.fromCharCode((H5.Int.clipu32(System.Nullable.add((H5.Int.clipu32(H5.Int.div((H5.Int.clipu32(System.Nullable.sub(unicode_code, (65536)))), (1024)))), 55296))))) || ""); - result = (result || "") + ((String.fromCharCode((H5.Int.clipu32(System.Nullable.add((System.Nullable.mod(unicode_code, (1024))), 56320))))) || ""); - } - } - - return result; - }, - GetMaxByteCount: function (charCount) { - if (charCount < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("charCount"); - } - - var byteCount = System.Int64(charCount).add(System.Int64(1)); - byteCount = byteCount.mul(System.Int64(4)); - - if (byteCount.gt(System.Int64(2147483647))) { - throw new System.ArgumentOutOfRangeException.$ctor1("charCount"); - } - - return System.Int64.clip32(byteCount); - }, - GetMaxCharCount: function (byteCount) { - if (byteCount < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("byteCount"); - } - - var charCount = (((H5.Int.div(byteCount, 2)) | 0) + 2) | 0; - - if (charCount > 2147483647) { - throw new System.ArgumentOutOfRangeException.$ctor1("byteCount"); - } - - return charCount; - } - } - }); - - // @source UTF7Encoding.js - - H5.define("System.Text.UTF7Encoding", { - inherits: [System.Text.Encoding], - statics: { - methods: { - Escape: function (chars) { - return chars.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } - }, - fields: { - allowOptionals: false - }, - props: { - CodePage: { - get: function () { - return 65000; - } - }, - EncodingName: { - get: function () { - return "Unicode (UTF-7)"; - } - } - }, - ctors: { - ctor: function () { - System.Text.UTF7Encoding.$ctor1.call(this, false); - }, - $ctor1: function (allowOptionals) { - this.$initialize(); - System.Text.Encoding.ctor.call(this); - this.allowOptionals = allowOptionals; - this.fallbackCharacter = 65533; - } - }, - methods: { - Encode$3: function (s, outputBytes, outputIndex, writtenBytes) { - var setD = "A-Za-z0-9" + (System.Text.UTF7Encoding.Escape("'(),-./:?") || ""); - - var encode = $asm.$.System.Text.UTF7Encoding.f1; - - var setO = System.Text.UTF7Encoding.Escape("!\"#$%&*;<=>@[]^_`{|}"); - var setW = System.Text.UTF7Encoding.Escape(" \r\n\t"); - - s = s.replace(new RegExp("[^" + setW + setD + (this.allowOptionals ? setO : "") + "]+", "g"), function (chunk) { return "+" + (chunk === "+" ? "" : encode(chunk)) + "-"; }); - - var arr = System.String.toCharArray(s, 0, s.length); - - if (outputBytes != null) { - var recorded = 0; - - if (arr.length > (((outputBytes.length - outputIndex) | 0))) { - throw new System.ArgumentException.$ctor1("bytes"); - } - - for (var j = 0; j < arr.length; j = (j + 1) | 0) { - outputBytes[System.Array.index(((j + outputIndex) | 0), outputBytes)] = arr[System.Array.index(j, arr)]; - recorded = (recorded + 1) | 0; - } - - writtenBytes.v = recorded; - return null; - } - - writtenBytes.v = arr.length; - - return arr; - }, - Decode$2: function (bytes, index, count, chars, charIndex) { - var _base64ToArrayBuffer = $asm.$.System.Text.UTF7Encoding.f2; - - var decode = function (s) { - var b = _base64ToArrayBuffer(s); - var r = System.Array.init(0, 0, System.Char); - for (var i = 0; i < b.length; ) { - r.push(((b[System.Array.index(H5.identity(i, ((i = (i + 1) | 0))), b)] << 8 | b[System.Array.index(H5.identity(i, ((i = (i + 1) | 0))), b)]) & 65535)); - } - return System.String.fromCharArray(r); - }; - - var str = System.String.fromCharArray(bytes, index, count); - return str.replace(/\+([A-Za-z0-9\/]*)-?/gi, function (_, chunk) { if (chunk === "") { return _ == "+-" ? "+" : ""; } return decode(chunk); }); - }, - GetMaxByteCount: function (charCount) { - if (charCount < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("charCount"); - } - - var byteCount = System.Int64(charCount).mul(System.Int64(3)).add(System.Int64(2)); - - if (byteCount.gt(System.Int64(2147483647))) { - throw new System.ArgumentOutOfRangeException.$ctor1("charCount"); - } - - return System.Int64.clip32(byteCount); - }, - GetMaxCharCount: function (byteCount) { - if (byteCount < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("byteCount"); - } - - var charCount = byteCount; - if (charCount === 0) { - charCount = 1; - } - - return charCount | 0; - } - } - }); - - H5.ns("System.Text.UTF7Encoding", $asm.$); - - H5.apply($asm.$.System.Text.UTF7Encoding, { - f1: function (str) { - var b = System.Array.init(H5.Int.mul(str.length, 2), 0, System.Byte); - var bi = 0; - for (var i = 0; i < str.length; i = (i + 1) | 0) { - var c = str.charCodeAt(i); - b[System.Array.index(H5.identity(bi, ((bi = (bi + 1) | 0))), b)] = (c >> 8); - b[System.Array.index(H5.identity(bi, ((bi = (bi + 1) | 0))), b)] = (c & 255); - } - var base64Str = System.Convert.toBase64String(b, null, null, null); - return base64Str.replace(/=+$/, ""); - }, - f2: function (base64) { - try { - if (typeof window === "undefined") { throw new System.Exception(); }; - var binary_string = window.atob(base64); - var len = binary_string.length; - var arr = System.Array.init(len, 0, System.Char); - - if (len === 1 && binary_string.charCodeAt(0) === 0) { - return System.Array.init(0, 0, System.Char); - } - - for (var i = 0; i < len; i = (i + 1) | 0) { - arr[System.Array.index(i, arr)] = binary_string.charCodeAt(i); - } - - return arr; - } catch ($e1) { - $e1 = System.Exception.create($e1); - return System.Array.init(0, 0, System.Char); - } - } - }); - - // @source UTF8Encoding.js - - H5.define("System.Text.UTF8Encoding", { - inherits: [System.Text.Encoding], - fields: { - encoderShouldEmitUTF8Identifier: false, - throwOnInvalid: false - }, - props: { - CodePage: { - get: function () { - return 65001; - } - }, - EncodingName: { - get: function () { - return "Unicode (UTF-8)"; - } - } - }, - ctors: { - ctor: function () { - System.Text.UTF8Encoding.$ctor1.call(this, false); - }, - $ctor1: function (encoderShouldEmitUTF8Identifier) { - System.Text.UTF8Encoding.$ctor2.call(this, encoderShouldEmitUTF8Identifier, false); - }, - $ctor2: function (encoderShouldEmitUTF8Identifier, throwOnInvalidBytes) { - this.$initialize(); - System.Text.Encoding.ctor.call(this); - this.encoderShouldEmitUTF8Identifier = encoderShouldEmitUTF8Identifier; - this.throwOnInvalid = throwOnInvalidBytes; - this.fallbackCharacter = 65533; - } - }, - methods: { - Encode$3: function (s, outputBytes, outputIndex, writtenBytes) { - var hasBuffer = outputBytes != null; - var record = 0; - - var write = function (args) { - var len = args.length; - for (var j = 0; j < len; j = (j + 1) | 0) { - var code = args[System.Array.index(j, args)]; - if (hasBuffer) { - if (outputIndex >= outputBytes.length) { - throw new System.ArgumentException.$ctor1("bytes"); - } - - outputBytes[System.Array.index(H5.identity(outputIndex, ((outputIndex = (outputIndex + 1) | 0))), outputBytes)] = code; - } else { - outputBytes.push(code); - } - record = (record + 1) | 0; - } - }; - - var fallback = H5.fn.bind(this, $asm.$.System.Text.UTF8Encoding.f1); - - if (!hasBuffer) { - outputBytes = System.Array.init(0, 0, System.Byte); - } - - for (var i = 0; i < s.length; i = (i + 1) | 0) { - var charcode = s.charCodeAt(i); - - if ((charcode >= 55296) && (charcode <= 56319)) { - var next = s.charCodeAt(((i + 1) | 0)); - if (!((next >= 56320) && (next <= 57343))) { - charcode = fallback(); - } - } else if ((charcode >= 56320) && (charcode <= 57343)) { - charcode = fallback(); - } - - if (charcode < 128) { - write(System.Array.init([charcode], System.Byte)); - } else if (charcode < 2048) { - write(System.Array.init([(192 | (charcode >> 6)), (128 | (charcode & 63))], System.Byte)); - } else if (charcode < 55296 || charcode >= 57344) { - write(System.Array.init([(224 | (charcode >> 12)), (128 | ((charcode >> 6) & 63)), (128 | (charcode & 63))], System.Byte)); - } else { - i = (i + 1) | 0; - var code = (65536 + (((charcode & 1023) << 10) | (s.charCodeAt(i) & 1023))) | 0; - write(System.Array.init([(240 | (code >> 18)), (128 | ((code >> 12) & 63)), (128 | ((code >> 6) & 63)), (128 | (code & 63))], System.Byte)); - } - } - - writtenBytes.v = record; - - if (hasBuffer) { - return null; - } - - return outputBytes; - }, - Decode$2: function (bytes, index, count, chars, charIndex) { - this._hasError = false; - var position = index; - var result = ""; - var surrogate1 = 0; - var addFallback = false; - var endpoint = (position + count) | 0; - - for (; position < endpoint; position = (position + 1) | 0) { - var accumulator = 0; - var extraBytes = 0; - var hasError = false; - var firstByte = bytes[System.Array.index(position, bytes)]; - - if (firstByte <= 127) { - accumulator = firstByte; - } else if ((firstByte & 64) === 0) { - hasError = true; - } else if ((firstByte & 224) === 192) { - accumulator = firstByte & 31; - extraBytes = 1; - } else if ((firstByte & 240) === 224) { - accumulator = firstByte & 15; - extraBytes = 2; - } else if ((firstByte & 248) === 240) { - accumulator = firstByte & 7; - extraBytes = 3; - } else if ((firstByte & 252) === 248) { - accumulator = firstByte & 3; - extraBytes = 4; - hasError = true; - } else if ((firstByte & 254) === 252) { - accumulator = firstByte & 3; - extraBytes = 5; - hasError = true; - } else { - accumulator = firstByte; - hasError = false; - } - - while (extraBytes > 0) { - position = (position + 1) | 0; - - if (position >= endpoint) { - hasError = true; - break; - } - - var extraByte = bytes[System.Array.index(position, bytes)]; - extraBytes = (extraBytes - 1) | 0; - - if ((extraByte & 192) !== 128) { - position = (position - 1) | 0; - hasError = true; - break; - } - - accumulator = (accumulator << 6) | (extraByte & 63); - } - - /* if ((accumulator == 0xFFFE) || (accumulator == 0xFFFF)) { - hasError = true; - }*/ - - var characters = null; - addFallback = false; - if (!hasError) { - if (surrogate1 > 0 && !((accumulator >= 56320) && (accumulator <= 57343))) { - hasError = true; - surrogate1 = 0; - } else if ((accumulator >= 55296) && (accumulator <= 56319)) { - surrogate1 = accumulator & 65535; - } else if ((accumulator >= 56320) && (accumulator <= 57343)) { - hasError = true; - addFallback = true; - surrogate1 = 0; - } else { - characters = System.String.fromCharCode(accumulator); - surrogate1 = 0; - } - } - - if (hasError) { - if (this.throwOnInvalid) { - throw new System.Exception("Invalid character in UTF8 text"); - } - - result = (result || "") + String.fromCharCode(this.fallbackCharacter); - this._hasError = true; - } else if (surrogate1 === 0) { - result = (result || "") + (characters || ""); - } - } - - if (surrogate1 > 0 || addFallback) { - if (this.throwOnInvalid) { - throw new System.Exception("Invalid character in UTF8 text"); - } - - if (result.length > 0 && result.charCodeAt(((result.length - 1) | 0)) === this.fallbackCharacter) { - result = (result || "") + String.fromCharCode(this.fallbackCharacter); - } else { - result = (result || "") + (((this.fallbackCharacter + this.fallbackCharacter) | 0)); - } - - this._hasError = true; - } - - return result; - }, - GetMaxByteCount: function (charCount) { - if (charCount < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("charCount"); - } - - - var byteCount = System.Int64(charCount).add(System.Int64(1)); - byteCount = byteCount.mul(System.Int64(3)); - - if (byteCount.gt(System.Int64(2147483647))) { - throw new System.ArgumentOutOfRangeException.$ctor1("charCount"); - } - - return System.Int64.clip32(byteCount); - }, - GetMaxCharCount: function (byteCount) { - if (byteCount < 0) { - throw new System.ArgumentOutOfRangeException.$ctor1("byteCount"); - } - - var charCount = System.Int64(byteCount).add(System.Int64(1)); - - if (charCount.gt(System.Int64(2147483647))) { - throw new System.ArgumentOutOfRangeException.$ctor1("byteCount"); - } - - return System.Int64.clip32(charCount); - } - } - }); - - H5.ns("System.Text.UTF8Encoding", $asm.$); - - H5.apply($asm.$.System.Text.UTF8Encoding, { - f1: function () { - if (this.throwOnInvalid) { - throw new System.Exception("Invalid character in UTF8 text"); - } - - return this.fallbackCharacter; - } - }); - - // @source Timer.js - - H5.define("System.Threading.Timer", { - inherits: [System.IDisposable], - statics: { - fields: { - MAX_SUPPORTED_TIMEOUT: 0, - EXC_LESS: null, - EXC_MORE: null, - EXC_DISPOSED: null - }, - ctors: { - init: function () { - this.MAX_SUPPORTED_TIMEOUT = 4294967294; - this.EXC_LESS = "Number must be either non-negative and less than or equal to Int32.MaxValue or -1."; - this.EXC_MORE = "Time-out interval must be less than 2^32-2."; - this.EXC_DISPOSED = "The timer has been already disposed."; - } - } - }, - fields: { - dueTime: System.Int64(0), - period: System.Int64(0), - timerCallback: null, - state: null, - id: null, - disposed: false - }, - alias: ["Dispose", "System$IDisposable$Dispose"], - ctors: { - $ctor1: function (callback, state, dueTime, period) { - this.$initialize(); - this.TimerSetup(callback, state, System.Int64(dueTime), System.Int64(period)); - }, - $ctor3: function (callback, state, dueTime, period) { - this.$initialize(); - var dueTm = H5.Int.clip64(dueTime.getTotalMilliseconds()); - var periodTm = H5.Int.clip64(period.getTotalMilliseconds()); - - this.TimerSetup(callback, state, dueTm, periodTm); - }, - $ctor4: function (callback, state, dueTime, period) { - this.$initialize(); - this.TimerSetup(callback, state, System.Int64(dueTime), System.Int64(period)); - }, - $ctor2: function (callback, state, dueTime, period) { - this.$initialize(); - this.TimerSetup(callback, state, dueTime, period); - }, - ctor: function (callback) { - this.$initialize(); - var dueTime = -1; - var period = -1; - - this.TimerSetup(callback, this, System.Int64(dueTime), System.Int64(period)); - } - }, - methods: { - TimerSetup: function (callback, state, dueTime, period) { - if (this.disposed) { - throw new System.InvalidOperationException.$ctor1(System.Threading.Timer.EXC_DISPOSED); - } - - if (H5.staticEquals(callback, null)) { - throw new System.ArgumentNullException.$ctor1("TimerCallback"); - } - - if (dueTime.lt(System.Int64(-1))) { - throw new System.ArgumentOutOfRangeException.$ctor4("dueTime", System.Threading.Timer.EXC_LESS); - } - if (period.lt(System.Int64(-1))) { - throw new System.ArgumentOutOfRangeException.$ctor4("period", System.Threading.Timer.EXC_LESS); - } - if (dueTime.gt(System.Int64(System.Threading.Timer.MAX_SUPPORTED_TIMEOUT))) { - throw new System.ArgumentOutOfRangeException.$ctor4("dueTime", System.Threading.Timer.EXC_MORE); - } - if (period.gt(System.Int64(System.Threading.Timer.MAX_SUPPORTED_TIMEOUT))) { - throw new System.ArgumentOutOfRangeException.$ctor4("period", System.Threading.Timer.EXC_MORE); - } - - this.dueTime = dueTime; - this.period = period; - - this.state = state; - this.timerCallback = callback; - - return this.RunTimer(this.dueTime); - }, - HandleCallback: function () { - if (this.disposed) { - return; - } - - if (!H5.staticEquals(this.timerCallback, null)) { - var myId = this.id; - this.timerCallback(this.state); - - if (System.Nullable.eq(this.id, myId)) { - this.RunTimer(this.period, false); - } - } - }, - RunTimer: function (period, checkDispose) { - if (checkDispose === void 0) { checkDispose = true; } - if (checkDispose && this.disposed) { - throw new System.InvalidOperationException.$ctor1(System.Threading.Timer.EXC_DISPOSED); - } - - if (period.ne(System.Int64(-1)) && !this.disposed) { - var p = period.toNumber(); - this.id = H5.global.setTimeout(H5.fn.cacheBind(this, this.HandleCallback), p); - return true; - } - - return false; - }, - Change: function (dueTime, period) { - return this.ChangeTimer(System.Int64(dueTime), System.Int64(period)); - }, - Change$2: function (dueTime, period) { - return this.ChangeTimer(H5.Int.clip64(dueTime.getTotalMilliseconds()), H5.Int.clip64(period.getTotalMilliseconds())); - }, - Change$3: function (dueTime, period) { - return this.ChangeTimer(System.Int64(dueTime), System.Int64(period)); - }, - Change$1: function (dueTime, period) { - return this.ChangeTimer(dueTime, period); - }, - ChangeTimer: function (dueTime, period) { - this.ClearTimeout(); - return this.TimerSetup(this.timerCallback, this.state, dueTime, period); - }, - ClearTimeout: function () { - if (System.Nullable.hasValue(this.id)) { - H5.global.clearTimeout(System.Nullable.getValue(this.id)); - this.id = null; - } - }, - Dispose: function () { - this.ClearTimeout(); - this.disposed = true; - } - } - }); - - // @source Lock.js - - H5.define("System.Threading.Lock", { - methods: { - Enter: function () { }, - Exit: function () { }, - EnterScope: function () { - return new System.Threading.Lock.Scope(); - } - } - }); - - // @source Scope.js - - H5.define("System.Threading.Lock.Scope", { - $kind: "nested struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - return $;} - } - }, - ctors: { - ctor: function () { - this.$initialize(); - } - }, - methods: { - System$IDisposable$Dispose: function () { }, - $clone: function (to) { return this; } - } - }); - - // @source TaskCanceledException.js - - H5.define("System.Threading.Tasks.TaskCanceledException", { - inherits: [System.OperationCanceledException], - fields: { - _canceledTask: null - }, - props: { - Task: { - get: function () { - return this._canceledTask; - } - } - }, - ctors: { - ctor: function () { - this.$initialize(); - System.OperationCanceledException.$ctor1.call(this, "A task was canceled."); - }, - $ctor1: function (message) { - this.$initialize(); - System.OperationCanceledException.$ctor1.call(this, message); - }, - $ctor2: function (message, innerException) { - this.$initialize(); - System.OperationCanceledException.$ctor2.call(this, message, innerException); - }, - $ctor3: function (task) { - this.$initialize(); - System.OperationCanceledException.$ctor4.call(this, "A task was canceled.", task != null ? new System.Threading.CancellationToken() : new System.Threading.CancellationToken()); - this._canceledTask = task; - } - } - }); - - // @source TaskSchedulerException.js - - H5.define("System.Threading.Tasks.TaskSchedulerException", { - inherits: [System.Exception], - ctors: { - ctor: function () { - this.$initialize(); - System.Exception.ctor.call(this, "An exception was thrown by a TaskScheduler."); - }, - $ctor2: function (message) { - this.$initialize(); - System.Exception.ctor.call(this, message); - }, - $ctor1: function (innerException) { - this.$initialize(); - System.Exception.ctor.call(this, "An exception was thrown by a TaskScheduler.", innerException); - }, - $ctor3: function (message, innerException) { - this.$initialize(); - System.Exception.ctor.call(this, message, innerException); - } - } - }); - - // @source Version.js - - H5.define("System.Version", { - inherits: function () { return [System.ICloneable,System.IComparable$1(System.Version),System.IEquatable$1(System.Version)]; }, - statics: { - fields: { - ZERO_CHAR_VALUE: 0, - separatorsArray: 0 - }, - ctors: { - init: function () { - this.ZERO_CHAR_VALUE = 48; - this.separatorsArray = 46; - } - }, - methods: { - appendPositiveNumber: function (num, sb) { - var index = sb.getLength(); - var reminder; - - do { - reminder = num % 10; - num = (H5.Int.div(num, 10)) | 0; - sb.insert(index, String.fromCharCode(((((System.Version.ZERO_CHAR_VALUE + reminder) | 0)) & 65535))); - } while (num > 0); - }, - parse: function (input) { - if (input == null) { - throw new System.ArgumentNullException.$ctor1("input"); - } - - var r = { v : new System.Version.VersionResult() }; - r.v.init("input", true); - if (!System.Version.tryParseVersion(input, r)) { - throw r.v.getVersionParseException(); - } - return r.v.m_parsedVersion; - }, - tryParse: function (input, result) { - var r = { v : new System.Version.VersionResult() }; - r.v.init("input", false); - var b = System.Version.tryParseVersion(input, r); - result.v = r.v.m_parsedVersion; - return b; - }, - tryParseVersion: function (version, result) { - var major = { }, minor = { }, build = { }, revision = { }; - - if (version == null) { - result.v.setFailure(System.Version.ParseFailureKind.ArgumentNullException); - - return false; - } - - var parsedComponents = System.String.split(version, [System.Version.separatorsArray].map(function (i) {{ return String.fromCharCode(i); }})); - var parsedComponentsLength = parsedComponents.length; - - if ((parsedComponentsLength < 2) || (parsedComponentsLength > 4)) { - result.v.setFailure(System.Version.ParseFailureKind.ArgumentException); - return false; - } - - if (!System.Version.tryParseComponent(parsedComponents[System.Array.index(0, parsedComponents)], "version", result, major)) { - return false; - } - - if (!System.Version.tryParseComponent(parsedComponents[System.Array.index(1, parsedComponents)], "version", result, minor)) { - return false; - } - - parsedComponentsLength = (parsedComponentsLength - 2) | 0; - - if (parsedComponentsLength > 0) { - if (!System.Version.tryParseComponent(parsedComponents[System.Array.index(2, parsedComponents)], "build", result, build)) { - return false; - } - - parsedComponentsLength = (parsedComponentsLength - 1) | 0; - - if (parsedComponentsLength > 0) { - if (!System.Version.tryParseComponent(parsedComponents[System.Array.index(3, parsedComponents)], "revision", result, revision)) { - return false; - } else { - result.v.m_parsedVersion = new System.Version.$ctor3(major.v, minor.v, build.v, revision.v); - } - } else { - result.v.m_parsedVersion = new System.Version.$ctor2(major.v, minor.v, build.v); - } - } else { - result.v.m_parsedVersion = new System.Version.$ctor1(major.v, minor.v); - } - - return true; - }, - tryParseComponent: function (component, componentName, result, parsedComponent) { - if (!System.Int32.tryParse(component, parsedComponent)) { - result.v.setFailure$1(System.Version.ParseFailureKind.FormatException, component); - return false; - } - - if (parsedComponent.v < 0) { - result.v.setFailure$1(System.Version.ParseFailureKind.ArgumentOutOfRangeException, componentName); - return false; - } - - return true; - }, - op_Equality: function (v1, v2) { - if (H5.referenceEquals(v1, null)) { - return H5.referenceEquals(v2, null); - } - - return v1.equalsT(v2); - }, - op_Inequality: function (v1, v2) { - return !(System.Version.op_Equality(v1, v2)); - }, - op_LessThan: function (v1, v2) { - if (v1 == null) { - throw new System.ArgumentNullException.$ctor1("v1"); - } - - return (v1.compareTo(v2) < 0); - }, - op_LessThanOrEqual: function (v1, v2) { - if (v1 == null) { - throw new System.ArgumentNullException.$ctor1("v1"); - } - - return (v1.compareTo(v2) <= 0); - }, - op_GreaterThan: function (v1, v2) { - return (System.Version.op_LessThan(v2, v1)); - }, - op_GreaterThanOrEqual: function (v1, v2) { - return (System.Version.op_LessThanOrEqual(v2, v1)); - } - } - }, - fields: { - _Major: 0, - _Minor: 0, - _Build: 0, - _Revision: 0 - }, - props: { - Major: { - get: function () { - return this._Major; - } - }, - Minor: { - get: function () { - return this._Minor; - } - }, - Build: { - get: function () { - return this._Build; - } - }, - Revision: { - get: function () { - return this._Revision; - } - }, - MajorRevision: { - get: function () { - return H5.Int.sxs((this._Revision >> 16) & 65535); - } - }, - MinorRevision: { - get: function () { - return H5.Int.sxs((this._Revision & 65535) & 65535); - } - } - }, - alias: [ - "clone", "System$ICloneable$clone", - "compareTo", ["System$IComparable$1$System$Version$compareTo", "System$IComparable$1$compareTo"], - "equalsT", "System$IEquatable$1$System$Version$equalsT" - ], - ctors: { - init: function () { - this._Build = -1; - this._Revision = -1; - }, - $ctor3: function (major, minor, build, revision) { - this.$initialize(); - if (major < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("major", "Cannot be < 0"); - } - - if (minor < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("minor", "Cannot be < 0"); - } - - if (build < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("build", "Cannot be < 0"); - } - - if (revision < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("revision", "Cannot be < 0"); - } - - this._Major = major; - this._Minor = minor; - this._Build = build; - this._Revision = revision; - }, - $ctor2: function (major, minor, build) { - this.$initialize(); - if (major < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("major", "Cannot be < 0"); - } - - if (minor < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("minor", "Cannot be < 0"); - } - - if (build < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("build", "Cannot be < 0"); - } - - this._Major = major; - this._Minor = minor; - this._Build = build; - }, - $ctor1: function (major, minor) { - this.$initialize(); - if (major < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("major", "Cannot be < 0"); - } - - if (minor < 0) { - throw new System.ArgumentOutOfRangeException.$ctor4("minor", "Cannot be < 0"); - } - - this._Major = major; - this._Minor = minor; - }, - $ctor4: function (version) { - this.$initialize(); - var v = System.Version.parse(version); - this._Major = v.Major; - this._Minor = v.Minor; - this._Build = v.Build; - this._Revision = v.Revision; - }, - ctor: function () { - this.$initialize(); - this._Major = 0; - this._Minor = 0; - } - }, - methods: { - clone: function () { - var v = new System.Version.ctor(); - v._Major = this._Major; - v._Minor = this._Minor; - v._Build = this._Build; - v._Revision = this._Revision; - return (v); - }, - compareTo$1: function (version) { - if (version == null) { - return 1; - } - - var v = H5.as(version, System.Version); - if (System.Version.op_Equality(v, null)) { - throw new System.ArgumentException.$ctor1("version should be of System.Version type"); - } - - if (this._Major !== v._Major) { - if (this._Major > v._Major) { - return 1; - } else { - return -1; - } - } - - if (this._Minor !== v._Minor) { - if (this._Minor > v._Minor) { - return 1; - } else { - return -1; - } - } - - if (this._Build !== v._Build) { - if (this._Build > v._Build) { - return 1; - } else { - return -1; - } - } - - if (this._Revision !== v._Revision) { - if (this._Revision > v._Revision) { - return 1; - } else { - return -1; - } - } - - return 0; - }, - compareTo: function (value) { - if (System.Version.op_Equality(value, null)) { - return 1; - } - - if (this._Major !== value._Major) { - if (this._Major > value._Major) { - return 1; - } else { - return -1; - } - } - - if (this._Minor !== value._Minor) { - if (this._Minor > value._Minor) { - return 1; - } else { - return -1; - } - } - - if (this._Build !== value._Build) { - if (this._Build > value._Build) { - return 1; - } else { - return -1; - } - } - - if (this._Revision !== value._Revision) { - if (this._Revision > value._Revision) { - return 1; - } else { - return -1; - } - } - - return 0; - }, - equals: function (obj) { - return this.equalsT(H5.as(obj, System.Version)); - }, - equalsT: function (obj) { - if (System.Version.op_Equality(obj, null)) { - return false; - } - - if ((this._Major !== obj._Major) || (this._Minor !== obj._Minor) || (this._Build !== obj._Build) || (this._Revision !== obj._Revision)) { - return false; - } - - return true; - }, - getHashCode: function () { - - var accumulator = 0; - - accumulator = accumulator | ((this._Major & 15) << 28); - accumulator = accumulator | ((this._Minor & 255) << 20); - accumulator = accumulator | ((this._Build & 255) << 12); - accumulator = accumulator | (this._Revision & 4095); - - return accumulator; - }, - toString: function () { - if (this._Build === -1) { - return (this.toString$1(2)); - } - if (this._Revision === -1) { - return (this.toString$1(3)); - } - return (this.toString$1(4)); - }, - toString$1: function (fieldCount) { - var sb; - switch (fieldCount) { - case 0: - return (""); - case 1: - return (H5.toString(this._Major)); - case 2: - sb = new System.Text.StringBuilder(); - System.Version.appendPositiveNumber(this._Major, sb); - sb.append(String.fromCharCode(46)); - System.Version.appendPositiveNumber(this._Minor, sb); - return sb.toString(); - default: - if (this._Build === -1) { - throw new System.ArgumentException.$ctor3("Build should be > 0 if fieldCount > 2", "fieldCount"); - } - if (fieldCount === 3) { - sb = new System.Text.StringBuilder(); - System.Version.appendPositiveNumber(this._Major, sb); - sb.append(String.fromCharCode(46)); - System.Version.appendPositiveNumber(this._Minor, sb); - sb.append(String.fromCharCode(46)); - System.Version.appendPositiveNumber(this._Build, sb); - return sb.toString(); - } - if (this._Revision === -1) { - throw new System.ArgumentException.$ctor3("Revision should be > 0 if fieldCount > 3", "fieldCount"); - } - if (fieldCount === 4) { - sb = new System.Text.StringBuilder(); - System.Version.appendPositiveNumber(this._Major, sb); - sb.append(String.fromCharCode(46)); - System.Version.appendPositiveNumber(this._Minor, sb); - sb.append(String.fromCharCode(46)); - System.Version.appendPositiveNumber(this._Build, sb); - sb.append(String.fromCharCode(46)); - System.Version.appendPositiveNumber(this._Revision, sb); - return sb.toString(); - } - throw new System.ArgumentException.$ctor3("Should be < 5", "fieldCount"); - } - } - } - }); - - // @source ParseFailureKind.js - - H5.define("System.Version.ParseFailureKind", { - $kind: "nested enum", - statics: { - fields: { - ArgumentNullException: 0, - ArgumentException: 1, - ArgumentOutOfRangeException: 2, - FormatException: 3 - } - } - }); - - // @source VersionResult.js - - H5.define("System.Version.VersionResult", { - $kind: "nested struct", - statics: { - methods: { - getDefaultValue: function () { - var $ = Object.create(this.prototype); - $.m_parsedVersion = null; - $.m_failure = 0; - $.m_exceptionArgument = null; - $.m_argumentName = null; - $.m_canThrow = false; - return $;} - } - }, - fields: { - m_parsedVersion: null, - m_failure: 0, - m_exceptionArgument: null, - m_argumentName: null, - m_canThrow: false - }, - ctors: { - ctor: function () { - this.$initialize(); - } - }, - methods: { - init: function (argumentName, canThrow) { - this.m_canThrow = canThrow; - this.m_argumentName = argumentName; - }, - setFailure: function (failure) { - this.setFailure$1(failure, ""); - }, - setFailure$1: function (failure, argument) { - this.m_failure = failure; - this.m_exceptionArgument = argument; - if (this.m_canThrow) { - throw this.getVersionParseException(); - } - }, - getVersionParseException: function () { - switch (this.m_failure) { - case System.Version.ParseFailureKind.ArgumentNullException: - return new System.ArgumentNullException.$ctor1(this.m_argumentName); - case System.Version.ParseFailureKind.ArgumentException: - return new System.ArgumentException.$ctor1("VersionString"); - case System.Version.ParseFailureKind.ArgumentOutOfRangeException: - return new System.ArgumentOutOfRangeException.$ctor4(this.m_exceptionArgument, "Cannot be < 0"); - case System.Version.ParseFailureKind.FormatException: - try { - System.Int32.parse(this.m_exceptionArgument); - } catch ($e1) { - $e1 = System.Exception.create($e1); - var e; - if (H5.is($e1, System.FormatException)) { - e = $e1; - return e; - } else if (H5.is($e1, System.OverflowException)) { - e = $e1; - return e; - } else { - throw $e1; - } - } - return new System.FormatException.$ctor1("InvalidString"); - default: - return new System.ArgumentException.$ctor1("VersionString"); - } - }, - getHashCode: function () { - var h = H5.addHash([5139482776, this.m_parsedVersion, this.m_failure, this.m_exceptionArgument, this.m_argumentName, this.m_canThrow]); - return h; - }, - equals: function (o) { - if (!H5.is(o, System.Version.VersionResult)) { - return false; - } - return H5.equals(this.m_parsedVersion, o.m_parsedVersion) && H5.equals(this.m_failure, o.m_failure) && H5.equals(this.m_exceptionArgument, o.m_exceptionArgument) && H5.equals(this.m_argumentName, o.m_argumentName) && H5.equals(this.m_canThrow, o.m_canThrow); - }, - $clone: function (to) { - var s = to || new System.Version.VersionResult(); - s.m_parsedVersion = this.m_parsedVersion; - s.m_failure = this.m_failure; - s.m_exceptionArgument = this.m_exceptionArgument; - s.m_argumentName = this.m_argumentName; - s.m_canThrow = this.m_canThrow; - return s; - } - } - }); - - // @source End.js - - // module export - if (typeof define === "function" && define.amd) { - // AMD - define("h5", [], function () { return H5; }); - } else if (typeof module !== "undefined" && module.exports) { - // Node - module.exports = H5; - } - - // @source Finally.js - -})(typeof this === "undefined" ? typeof self !== "undefined" ? self : this : this); - -/** - * @version : - H5.NET - * @author : Object.NET, Inc., Curiosity GmbH. - * @copyright : Copyright 2008-2019 Object.NET, Inc., Copyright 2019-2026 Curiosity GmbH - * @license : See https://github.com/curiosity-ai/h5/blob/master/LICENSE. - */ - - - var $m = H5.setMetadata, - $n = ["System","System.Globalization","System.Threading","System.Collections.Generic","System.Runtime.Serialization","System.Collections.ObjectModel","System.Collections","H5","System.Text","System.Net.WebSockets","System.Threading.Tasks","System.Text.RegularExpressions","System.Reflection","System.Runtime.CompilerServices","System.IO","System.ComponentModel"]; - $m("System.ApplicationException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.ArgumentException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"paramName","pt":$n[0].String,"ps":1}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"paramName","pt":$n[0].String,"ps":1},{"n":"innerException","pt":$n[0].Exception,"ps":2}],"sn":"$ctor4"},{"ov":true,"a":2,"n":"Message","t":16,"rt":$n[0].String,"g":{"ov":true,"a":2,"n":"get_Message","t":8,"rt":$n[0].String,"fg":"Message"},"fn":"Message"},{"v":true,"a":2,"n":"ParamName","t":16,"rt":$n[0].String,"g":{"v":true,"a":2,"n":"get_ParamName","t":8,"rt":$n[0].String,"fg":"ParamName"},"fn":"ParamName"},{"a":1,"n":"_paramName","t":4,"rt":$n[0].String,"sn":"_paramName"}]}; }, $n); - $m("System.ArgumentNullException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"paramName","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].String],"pi":[{"n":"paramName","pt":$n[0].String,"ps":0},{"n":"message","pt":$n[0].String,"ps":1}],"sn":"$ctor3"}]}; }, $n); - $m("System.ArgumentOutOfRangeException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"paramName","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].String],"pi":[{"n":"paramName","pt":$n[0].String,"ps":0},{"n":"message","pt":$n[0].String,"ps":1}],"sn":"$ctor4"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Object,$n[0].String],"pi":[{"n":"paramName","pt":$n[0].String,"ps":0},{"n":"actualValue","pt":$n[0].Object,"ps":1},{"n":"message","pt":$n[0].String,"ps":2}],"sn":"$ctor3"},{"v":true,"a":2,"n":"ActualValue","t":16,"rt":$n[0].Object,"g":{"v":true,"a":2,"n":"get_ActualValue","t":8,"rt":$n[0].Object,"fg":"ActualValue"},"fn":"ActualValue"},{"ov":true,"a":2,"n":"Message","t":16,"rt":$n[0].String,"g":{"ov":true,"a":2,"n":"get_Message","t":8,"rt":$n[0].String,"fg":"Message"},"fn":"Message"},{"a":1,"n":"_actualValue","t":4,"rt":$n[0].Object,"sn":"_actualValue"}]}; }, $n); - $m("System.ArithmeticException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.ArrayTypeMismatchException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.CharEnumerator", function () { return {"att":1048833,"a":2,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"str","pt":$n[0].String,"ps":0}],"sn":"ctor"},{"a":2,"n":"Clone","t":8,"sn":"clone","rt":$n[0].Object},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Reset","t":8,"sn":"reset","rt":$n[0].Void},{"a":2,"n":"Current","t":16,"rt":$n[0].Char,"g":{"a":2,"n":"get_Current","t":8,"rt":$n[0].Char,"fg":"Current","box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},"fn":"Current"},{"a":1,"n":"_currentElement","t":4,"rt":$n[0].Char,"sn":"_currentElement","box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":1,"n":"_index","t":4,"rt":$n[0].Int32,"sn":"_index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_str","t":4,"rt":$n[0].String,"sn":"_str"}]}; }, $n); - $m("System.Base64FormattingOptions", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"InsertLineBreaks","is":true,"t":4,"rt":$n[0].Base64FormattingOptions,"sn":"InsertLineBreaks","box":function ($v) { return H5.box($v, System.Base64FormattingOptions, System.Enum.toStringFn(System.Base64FormattingOptions));}},{"a":2,"n":"None","is":true,"t":4,"rt":$n[0].Base64FormattingOptions,"sn":"None","box":function ($v) { return H5.box($v, System.Base64FormattingOptions, System.Enum.toStringFn(System.Base64FormattingOptions));}}]}; }, $n); - $m("System.DateTimeKind", function () { return {"att":8449,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Local","is":true,"t":4,"rt":$n[0].DateTimeKind,"sn":"Local","box":function ($v) { return H5.box($v, System.DateTimeKind, System.Enum.toStringFn(System.DateTimeKind));}},{"a":2,"n":"Unspecified","is":true,"t":4,"rt":$n[0].DateTimeKind,"sn":"Unspecified","box":function ($v) { return H5.box($v, System.DateTimeKind, System.Enum.toStringFn(System.DateTimeKind));}},{"a":2,"n":"Utc","is":true,"t":4,"rt":$n[0].DateTimeKind,"sn":"Utc","box":function ($v) { return H5.box($v, System.DateTimeKind, System.Enum.toStringFn(System.DateTimeKind));}}]}; }, $n); - $m("System.DateTimeOffset", function () { return {"att":1057025,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].DateTime],"pi":[{"n":"dateTime","pt":$n[0].DateTime,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].DateTime,$n[0].TimeSpan],"pi":[{"n":"dateTime","pt":$n[0].DateTime,"ps":0},{"n":"offset","pt":$n[0].TimeSpan,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int64,$n[0].TimeSpan],"pi":[{"n":"ticks","pt":$n[0].Int64,"ps":0},{"n":"offset","pt":$n[0].TimeSpan,"ps":1}],"sn":"$ctor5"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].TimeSpan],"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2},{"n":"hour","pt":$n[0].Int32,"ps":3},{"n":"minute","pt":$n[0].Int32,"ps":4},{"n":"second","pt":$n[0].Int32,"ps":5},{"n":"offset","pt":$n[0].TimeSpan,"ps":6}],"sn":"$ctor4"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].TimeSpan],"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2},{"n":"hour","pt":$n[0].Int32,"ps":3},{"n":"minute","pt":$n[0].Int32,"ps":4},{"n":"second","pt":$n[0].Int32,"ps":5},{"n":"millisecond","pt":$n[0].Int32,"ps":6},{"n":"offset","pt":$n[0].TimeSpan,"ps":7}],"sn":"$ctor3"},{"a":2,"n":"Add","t":8,"pi":[{"n":"timeSpan","pt":$n[0].TimeSpan,"ps":0}],"sn":"Add","rt":$n[0].DateTimeOffset,"p":[$n[0].TimeSpan]},{"a":2,"n":"AddDays","t":8,"pi":[{"n":"days","pt":$n[0].Double,"ps":0}],"sn":"AddDays","rt":$n[0].DateTimeOffset,"p":[$n[0].Double]},{"a":2,"n":"AddHours","t":8,"pi":[{"n":"hours","pt":$n[0].Double,"ps":0}],"sn":"AddHours","rt":$n[0].DateTimeOffset,"p":[$n[0].Double]},{"a":2,"n":"AddMilliseconds","t":8,"pi":[{"n":"milliseconds","pt":$n[0].Double,"ps":0}],"sn":"AddMilliseconds","rt":$n[0].DateTimeOffset,"p":[$n[0].Double]},{"a":2,"n":"AddMinutes","t":8,"pi":[{"n":"minutes","pt":$n[0].Double,"ps":0}],"sn":"AddMinutes","rt":$n[0].DateTimeOffset,"p":[$n[0].Double]},{"a":2,"n":"AddMonths","t":8,"pi":[{"n":"months","pt":$n[0].Int32,"ps":0}],"sn":"AddMonths","rt":$n[0].DateTimeOffset,"p":[$n[0].Int32]},{"a":2,"n":"AddSeconds","t":8,"pi":[{"n":"seconds","pt":$n[0].Double,"ps":0}],"sn":"AddSeconds","rt":$n[0].DateTimeOffset,"p":[$n[0].Double]},{"a":2,"n":"AddTicks","t":8,"pi":[{"n":"ticks","pt":$n[0].Int64,"ps":0}],"sn":"AddTicks","rt":$n[0].DateTimeOffset,"p":[$n[0].Int64]},{"a":2,"n":"AddYears","t":8,"pi":[{"n":"years","pt":$n[0].Int32,"ps":0}],"sn":"AddYears","rt":$n[0].DateTimeOffset,"p":[$n[0].Int32]},{"a":2,"n":"Compare","is":true,"t":8,"pi":[{"n":"first","pt":$n[0].DateTimeOffset,"ps":0},{"n":"second","pt":$n[0].DateTimeOffset,"ps":1}],"sn":"Compare","rt":$n[0].Int32,"p":[$n[0].DateTimeOffset,$n[0].DateTimeOffset],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].DateTimeOffset,"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].DateTimeOffset],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].DateTimeOffset,"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].DateTimeOffset],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","is":true,"t":8,"pi":[{"n":"first","pt":$n[0].DateTimeOffset,"ps":0},{"n":"second","pt":$n[0].DateTimeOffset,"ps":1}],"sn":"Equals","rt":$n[0].Boolean,"p":[$n[0].DateTimeOffset,$n[0].DateTimeOffset],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"EqualsExact","t":8,"pi":[{"n":"other","pt":$n[0].DateTimeOffset,"ps":0}],"sn":"EqualsExact","rt":$n[0].Boolean,"p":[$n[0].DateTimeOffset],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"FromFileTime","is":true,"t":8,"pi":[{"n":"fileTime","pt":$n[0].Int64,"ps":0}],"sn":"FromFileTime","rt":$n[0].DateTimeOffset,"p":[$n[0].Int64]},{"a":2,"n":"FromUnixTimeMilliseconds","is":true,"t":8,"pi":[{"n":"milliseconds","pt":$n[0].Int64,"ps":0}],"sn":"FromUnixTimeMilliseconds","rt":$n[0].DateTimeOffset,"p":[$n[0].Int64]},{"a":2,"n":"FromUnixTimeSeconds","is":true,"t":8,"pi":[{"n":"seconds","pt":$n[0].Int64,"ps":0}],"sn":"FromUnixTimeSeconds","rt":$n[0].DateTimeOffset,"p":[$n[0].Int64]},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0}],"sn":"Parse","rt":$n[0].DateTimeOffset,"p":[$n[0].String]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":1}],"sn":"Parse$1","rt":$n[0].DateTimeOffset,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":1},{"n":"styles","pt":$n[1].DateTimeStyles,"ps":2}],"sn":"Parse$2","rt":$n[0].DateTimeOffset,"p":[$n[0].String,$n[0].IFormatProvider,$n[1].DateTimeStyles]},{"a":2,"n":"ParseExact","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"format","pt":$n[0].String,"ps":1},{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":2}],"sn":"ParseExact","rt":$n[0].DateTimeOffset,"p":[$n[0].String,$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"ParseExact","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"format","pt":$n[0].String,"ps":1},{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":2},{"n":"styles","pt":$n[1].DateTimeStyles,"ps":3}],"sn":"ParseExact$1","rt":$n[0].DateTimeOffset,"p":[$n[0].String,$n[0].String,$n[0].IFormatProvider,$n[1].DateTimeStyles]},{"a":2,"n":"Subtract","t":8,"pi":[{"n":"value","pt":$n[0].DateTimeOffset,"ps":0}],"sn":"Subtract$1","rt":$n[0].TimeSpan,"p":[$n[0].DateTimeOffset]},{"a":2,"n":"Subtract","t":8,"pi":[{"n":"value","pt":$n[0].TimeSpan,"ps":0}],"sn":"Subtract","rt":$n[0].DateTimeOffset,"p":[$n[0].TimeSpan]},{"a":2,"n":"ToFileTime","t":8,"sn":"ToFileTime","rt":$n[0].Int64},{"a":2,"n":"ToLocalTime","t":8,"sn":"ToLocalTime","rt":$n[0].DateTimeOffset},{"a":4,"n":"ToLocalTime","t":8,"pi":[{"n":"throwOnOverflow","pt":$n[0].Boolean,"ps":0}],"sn":"ToLocalTime$1","rt":$n[0].DateTimeOffset,"p":[$n[0].Boolean]},{"a":2,"n":"ToOffset","t":8,"pi":[{"n":"offset","pt":$n[0].TimeSpan,"ps":0}],"sn":"ToOffset","rt":$n[0].DateTimeOffset,"p":[$n[0].TimeSpan]},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":2,"n":"ToString","t":8,"pi":[{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"ToString","rt":$n[0].String,"p":[$n[0].IFormatProvider]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"sn":"ToString$1","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":1}],"sn":"format","rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"ToUniversalTime","t":8,"sn":"ToUniversalTime","rt":$n[0].DateTimeOffset},{"a":2,"n":"ToUnixTimeMilliseconds","t":8,"sn":"ToUnixTimeMilliseconds","rt":$n[0].Int64},{"a":2,"n":"ToUnixTimeSeconds","t":8,"sn":"ToUnixTimeSeconds","rt":$n[0].Int64},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].DateTimeOffset,"ps":1}],"sn":"TryParse","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].DateTimeOffset],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":1},{"n":"styles","pt":$n[1].DateTimeStyles,"ps":2},{"n":"result","out":true,"pt":$n[0].DateTimeOffset,"ps":3}],"sn":"TryParse$1","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].IFormatProvider,$n[1].DateTimeStyles,$n[0].DateTimeOffset],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"ValidateDate","is":true,"t":8,"pi":[{"n":"dateTime","pt":$n[0].DateTime,"ps":0},{"n":"offset","pt":$n[0].TimeSpan,"ps":1}],"sn":"ValidateDate","rt":$n[0].DateTime,"p":[$n[0].DateTime,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":1,"n":"ValidateOffset","is":true,"t":8,"pi":[{"n":"offset","pt":$n[0].TimeSpan,"ps":0}],"sn":"ValidateOffset","rt":$n[0].Int16,"p":[$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Int16);}},{"a":2,"n":"op_Addition","is":true,"t":8,"pi":[{"n":"dateTimeOffset","pt":$n[0].DateTimeOffset,"ps":0},{"n":"timeSpan","pt":$n[0].TimeSpan,"ps":1}],"sn":"op_Addition","rt":$n[0].DateTimeOffset,"p":[$n[0].DateTimeOffset,$n[0].TimeSpan]},{"a":2,"n":"op_Equality","is":true,"t":8,"pi":[{"n":"left","pt":$n[0].DateTimeOffset,"ps":0},{"n":"right","pt":$n[0].DateTimeOffset,"ps":1}],"sn":"op_Equality","rt":$n[0].Boolean,"p":[$n[0].DateTimeOffset,$n[0].DateTimeOffset],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_GreaterThan","is":true,"t":8,"pi":[{"n":"left","pt":$n[0].DateTimeOffset,"ps":0},{"n":"right","pt":$n[0].DateTimeOffset,"ps":1}],"sn":"op_GreaterThan","rt":$n[0].Boolean,"p":[$n[0].DateTimeOffset,$n[0].DateTimeOffset],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_GreaterThanOrEqual","is":true,"t":8,"pi":[{"n":"left","pt":$n[0].DateTimeOffset,"ps":0},{"n":"right","pt":$n[0].DateTimeOffset,"ps":1}],"sn":"op_GreaterThanOrEqual","rt":$n[0].Boolean,"p":[$n[0].DateTimeOffset,$n[0].DateTimeOffset],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"dateTime","pt":$n[0].DateTime,"ps":0}],"sn":"op_Implicit","rt":$n[0].DateTimeOffset,"p":[$n[0].DateTime]},{"a":2,"n":"op_Inequality","is":true,"t":8,"pi":[{"n":"left","pt":$n[0].DateTimeOffset,"ps":0},{"n":"right","pt":$n[0].DateTimeOffset,"ps":1}],"sn":"op_Inequality","rt":$n[0].Boolean,"p":[$n[0].DateTimeOffset,$n[0].DateTimeOffset],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_LessThan","is":true,"t":8,"pi":[{"n":"left","pt":$n[0].DateTimeOffset,"ps":0},{"n":"right","pt":$n[0].DateTimeOffset,"ps":1}],"sn":"op_LessThan","rt":$n[0].Boolean,"p":[$n[0].DateTimeOffset,$n[0].DateTimeOffset],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_LessThanOrEqual","is":true,"t":8,"pi":[{"n":"left","pt":$n[0].DateTimeOffset,"ps":0},{"n":"right","pt":$n[0].DateTimeOffset,"ps":1}],"sn":"op_LessThanOrEqual","rt":$n[0].Boolean,"p":[$n[0].DateTimeOffset,$n[0].DateTimeOffset],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Subtraction","is":true,"t":8,"pi":[{"n":"left","pt":$n[0].DateTimeOffset,"ps":0},{"n":"right","pt":$n[0].DateTimeOffset,"ps":1}],"sn":"op_Subtraction$1","rt":$n[0].TimeSpan,"p":[$n[0].DateTimeOffset,$n[0].DateTimeOffset]},{"a":2,"n":"op_Subtraction","is":true,"t":8,"pi":[{"n":"dateTimeOffset","pt":$n[0].DateTimeOffset,"ps":0},{"n":"timeSpan","pt":$n[0].TimeSpan,"ps":1}],"sn":"op_Subtraction","rt":$n[0].DateTimeOffset,"p":[$n[0].DateTimeOffset,$n[0].TimeSpan]},{"a":1,"n":"ClockDateTime","t":16,"rt":$n[0].DateTime,"g":{"a":1,"n":"get_ClockDateTime","t":8,"rt":$n[0].DateTime,"fg":"ClockDateTime","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},"fn":"ClockDateTime"},{"a":2,"n":"Date","t":16,"rt":$n[0].DateTime,"g":{"a":2,"n":"get_Date","t":8,"rt":$n[0].DateTime,"fg":"Date","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},"fn":"Date"},{"a":2,"n":"DateTime","t":16,"rt":$n[0].DateTime,"g":{"a":2,"n":"get_DateTime","t":8,"rt":$n[0].DateTime,"fg":"DateTime","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},"fn":"DateTime"},{"a":2,"n":"Day","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Day","t":8,"rt":$n[0].Int32,"fg":"Day","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Day"},{"a":2,"n":"DayOfWeek","t":16,"rt":$n[0].DayOfWeek,"g":{"a":2,"n":"get_DayOfWeek","t":8,"rt":$n[0].DayOfWeek,"fg":"DayOfWeek","box":function ($v) { return H5.box($v, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek));}},"fn":"DayOfWeek"},{"a":2,"n":"DayOfYear","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_DayOfYear","t":8,"rt":$n[0].Int32,"fg":"DayOfYear","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"DayOfYear"},{"a":2,"n":"Hour","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Hour","t":8,"rt":$n[0].Int32,"fg":"Hour","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Hour"},{"a":2,"n":"LocalDateTime","t":16,"rt":$n[0].DateTime,"g":{"a":2,"n":"get_LocalDateTime","t":8,"rt":$n[0].DateTime,"fg":"LocalDateTime","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},"fn":"LocalDateTime"},{"a":2,"n":"Millisecond","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Millisecond","t":8,"rt":$n[0].Int32,"fg":"Millisecond","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Millisecond"},{"a":2,"n":"Minute","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Minute","t":8,"rt":$n[0].Int32,"fg":"Minute","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Minute"},{"a":2,"n":"Month","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Month","t":8,"rt":$n[0].Int32,"fg":"Month","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Month"},{"a":2,"n":"Now","is":true,"t":16,"rt":$n[0].DateTimeOffset,"g":{"a":2,"n":"get_Now","t":8,"rt":$n[0].DateTimeOffset,"fg":"Now","is":true},"fn":"Now"},{"a":2,"n":"Offset","t":16,"rt":$n[0].TimeSpan,"g":{"a":2,"n":"get_Offset","t":8,"rt":$n[0].TimeSpan,"fg":"Offset"},"fn":"Offset"},{"a":2,"n":"Second","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Second","t":8,"rt":$n[0].Int32,"fg":"Second","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Second"},{"a":2,"n":"Ticks","t":16,"rt":$n[0].Int64,"g":{"a":2,"n":"get_Ticks","t":8,"rt":$n[0].Int64,"fg":"Ticks"},"fn":"Ticks"},{"a":2,"n":"TimeOfDay","t":16,"rt":$n[0].TimeSpan,"g":{"a":2,"n":"get_TimeOfDay","t":8,"rt":$n[0].TimeSpan,"fg":"TimeOfDay"},"fn":"TimeOfDay"},{"a":2,"n":"UtcDateTime","t":16,"rt":$n[0].DateTime,"g":{"a":2,"n":"get_UtcDateTime","t":8,"rt":$n[0].DateTime,"fg":"UtcDateTime","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},"fn":"UtcDateTime"},{"a":2,"n":"UtcNow","is":true,"t":16,"rt":$n[0].DateTimeOffset,"g":{"a":2,"n":"get_UtcNow","t":8,"rt":$n[0].DateTimeOffset,"fg":"UtcNow","is":true},"fn":"UtcNow"},{"a":2,"n":"UtcTicks","t":16,"rt":$n[0].Int64,"g":{"a":2,"n":"get_UtcTicks","t":8,"rt":$n[0].Int64,"fg":"UtcTicks"},"fn":"UtcTicks"},{"a":2,"n":"Year","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Year","t":8,"rt":$n[0].Int32,"fg":"Year","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Year"},{"a":4,"n":"MaxOffset","is":true,"t":4,"rt":$n[0].Int64,"sn":"MaxOffset"},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].DateTimeOffset,"sn":"MaxValue","ro":true},{"a":4,"n":"MinOffset","is":true,"t":4,"rt":$n[0].Int64,"sn":"MinOffset"},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].DateTimeOffset,"sn":"MinValue","ro":true},{"a":1,"n":"UnixEpochMilliseconds","is":true,"t":4,"rt":$n[0].Int64,"sn":"UnixEpochMilliseconds"},{"a":1,"n":"UnixEpochSeconds","is":true,"t":4,"rt":$n[0].Int64,"sn":"UnixEpochSeconds"},{"a":1,"n":"UnixEpochTicks","is":true,"t":4,"rt":$n[0].Int64,"sn":"UnixEpochTicks"},{"a":1,"n":"m_dateTime","t":4,"rt":$n[0].DateTime,"sn":"m_dateTime","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":1,"n":"m_offsetMinutes","t":4,"rt":$n[0].Int16,"sn":"m_offsetMinutes","box":function ($v) { return H5.box($v, System.Int16);}}]}; }, $n); - $m("System.DBNull", function () { return {"att":1057025,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":1,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"GetTypeCode","t":8,"sn":"GetTypeCode","rt":$n[0].TypeCode,"box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":2,"n":"ToString","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"ToString","rt":$n[0].String,"p":[$n[0].IFormatProvider]},{"a":2,"n":"Value","is":true,"t":4,"rt":$n[0].DBNull,"sn":"Value","ro":true}]}; }, $n); - $m("System.DivideByZeroException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.Empty", function () { return {"att":1048832,"a":4,"m":[{"a":1,"n":".ctor","t":1,"sn":"ctor"},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":2,"n":"Value","is":true,"t":4,"rt":$n[0].Empty,"sn":"Value","ro":true}]}; }, $n); - $m("System.FormatException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.FormattableString", function () { return {"att":1048705,"a":2,"m":[{"a":3,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"ab":true,"a":2,"n":"GetArgument","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"GetArgument","rt":$n[0].Object,"p":[$n[0].Int32]},{"ab":true,"a":2,"n":"GetArguments","t":8,"sn":"GetArguments","rt":$n[0].Array.type(System.Object)},{"a":2,"n":"Invariant","is":true,"t":8,"pi":[{"n":"formattable","pt":$n[0].FormattableString,"ps":0}],"sn":"Invariant","rt":$n[0].String,"p":[$n[0].FormattableString]},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"ab":true,"a":2,"n":"ToString","t":8,"pi":[{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"ToString","rt":$n[0].String,"p":[$n[0].IFormatProvider]},{"ab":true,"a":2,"n":"ArgumentCount","t":16,"rt":$n[0].Int32,"g":{"ab":true,"a":2,"n":"get_ArgumentCount","t":8,"rt":$n[0].Int32,"fg":"ArgumentCount","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"ArgumentCount"},{"ab":true,"a":2,"n":"Format","t":16,"rt":$n[0].String,"g":{"ab":true,"a":2,"n":"get_Format","t":8,"rt":$n[0].String,"fg":"Format"},"fn":"Format"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"ArgumentCount","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Format"}]}; }, $n); - $m("System.DateTimeParse", function () { return {"att":1048960,"a":4,"s":true,"m":[{"a":4,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"dtfi","pt":$n[1].DateTimeFormatInfo,"ps":1},{"n":"styles","pt":$n[1].DateTimeStyles,"ps":2}],"sn":"Parse","rt":$n[0].DateTime,"p":[$n[0].String,$n[1].DateTimeFormatInfo,$n[1].DateTimeStyles],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":4,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"dtfi","pt":$n[1].DateTimeFormatInfo,"ps":1},{"n":"styles","pt":$n[1].DateTimeStyles,"ps":2},{"n":"offset","out":true,"pt":$n[0].TimeSpan,"ps":3}],"sn":"Parse$1","rt":$n[0].DateTime,"p":[$n[0].String,$n[1].DateTimeFormatInfo,$n[1].DateTimeStyles,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":4,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"dtfi","pt":$n[1].DateTimeFormatInfo,"ps":1},{"n":"styles","pt":$n[1].DateTimeStyles,"ps":2},{"n":"result","out":true,"pt":$n[0].DateTime,"ps":3}],"sn":"TryParse","rt":$n[0].Boolean,"p":[$n[0].String,$n[1].DateTimeFormatInfo,$n[1].DateTimeStyles,$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":4,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"dtfi","pt":$n[1].DateTimeFormatInfo,"ps":1},{"n":"styles","pt":$n[1].DateTimeStyles,"ps":2},{"n":"result","out":true,"pt":$n[0].DateTime,"ps":3},{"n":"offset","out":true,"pt":$n[0].TimeSpan,"ps":4}],"sn":"TryParse$1","rt":$n[0].Boolean,"p":[$n[0].String,$n[1].DateTimeFormatInfo,$n[1].DateTimeStyles,$n[0].DateTime,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":4,"n":"TryParseExact","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"format","pt":$n[0].String,"ps":1},{"n":"dtfi","pt":$n[1].DateTimeFormatInfo,"ps":2},{"n":"style","pt":$n[1].DateTimeStyles,"ps":3},{"n":"result","out":true,"pt":$n[0].DateTime,"ps":4}],"sn":"TryParseExact","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String,$n[1].DateTimeFormatInfo,$n[1].DateTimeStyles,$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"TryParseOffset","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"offset","out":true,"pt":$n[0].TimeSpan,"ps":1}],"sn":"TryParseOffset","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.ParseFailureKind", function () { return {"att":256,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"ArgumentNull","is":true,"t":4,"rt":$n[0].ParseFailureKind,"sn":"ArgumentNull","box":function ($v) { return H5.box($v, System.ParseFailureKind, System.Enum.toStringFn(System.ParseFailureKind));}},{"a":2,"n":"Format","is":true,"t":4,"rt":$n[0].ParseFailureKind,"sn":"Format","box":function ($v) { return H5.box($v, System.ParseFailureKind, System.Enum.toStringFn(System.ParseFailureKind));}},{"a":2,"n":"FormatBadDateTimeCalendar","is":true,"t":4,"rt":$n[0].ParseFailureKind,"sn":"FormatBadDateTimeCalendar","box":function ($v) { return H5.box($v, System.ParseFailureKind, System.Enum.toStringFn(System.ParseFailureKind));}},{"a":2,"n":"FormatWithParameter","is":true,"t":4,"rt":$n[0].ParseFailureKind,"sn":"FormatWithParameter","box":function ($v) { return H5.box($v, System.ParseFailureKind, System.Enum.toStringFn(System.ParseFailureKind));}},{"a":2,"n":"None","is":true,"t":4,"rt":$n[0].ParseFailureKind,"sn":"None","box":function ($v) { return H5.box($v, System.ParseFailureKind, System.Enum.toStringFn(System.ParseFailureKind));}}]}; }, $n); - $m("System.ParseFlags", function () { return {"att":256,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"CaptureOffset","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"CaptureOffset","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"HaveDate","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"HaveDate","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"HaveDay","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"HaveDay","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"HaveHour","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"HaveHour","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"HaveMinute","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"HaveMinute","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"HaveMonth","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"HaveMonth","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"HaveSecond","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"HaveSecond","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"HaveTime","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"HaveTime","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"HaveYear","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"HaveYear","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"ParsedMonthName","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"ParsedMonthName","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"Rfc1123Pattern","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"Rfc1123Pattern","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"TimeZoneUsed","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"TimeZoneUsed","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"TimeZoneUtc","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"TimeZoneUtc","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"UtcSortPattern","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"UtcSortPattern","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":2,"n":"YearDefault","is":true,"t":4,"rt":$n[0].ParseFlags,"sn":"YearDefault","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}}]}; }, $n); - $m("System.DateTimeResult", function () { return {"att":1048840,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":"Init","t":8,"sn":"Init","rt":$n[0].Void},{"a":4,"n":"SetDate","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2}],"sn":"SetDate","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32]},{"a":4,"n":"SetFailure","t":8,"pi":[{"n":"failure","pt":$n[0].ParseFailureKind,"ps":0},{"n":"failureMessageID","pt":$n[0].String,"ps":1},{"n":"failureMessageFormatArgument","pt":$n[0].Object,"ps":2}],"sn":"SetFailure","rt":$n[0].Void,"p":[$n[0].ParseFailureKind,$n[0].String,$n[0].Object]},{"a":4,"n":"SetFailure","t":8,"pi":[{"n":"failure","pt":$n[0].ParseFailureKind,"ps":0},{"n":"failureMessageID","pt":$n[0].String,"ps":1},{"n":"failureMessageFormatArgument","pt":$n[0].Object,"ps":2},{"n":"failureArgumentName","pt":$n[0].String,"ps":3}],"sn":"SetFailure$1","rt":$n[0].Void,"p":[$n[0].ParseFailureKind,$n[0].String,$n[0].Object,$n[0].String]},{"a":4,"n":"Day","t":4,"rt":$n[0].Int32,"sn":"Day","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"Hour","t":4,"rt":$n[0].Int32,"sn":"Hour","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"Minute","t":4,"rt":$n[0].Int32,"sn":"Minute","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"Month","t":4,"rt":$n[0].Int32,"sn":"Month","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"Second","t":4,"rt":$n[0].Int32,"sn":"Second","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"Year","t":4,"rt":$n[0].Int32,"sn":"Year","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"calendar","t":4,"rt":$n[1].Calendar,"sn":"calendar"},{"a":4,"n":"era","t":4,"rt":$n[0].Int32,"sn":"era","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"failure","t":4,"rt":$n[0].ParseFailureKind,"sn":"failure","box":function ($v) { return H5.box($v, System.ParseFailureKind, System.Enum.toStringFn(System.ParseFailureKind));}},{"a":4,"n":"failureArgumentName","t":4,"rt":$n[0].String,"sn":"failureArgumentName"},{"a":4,"n":"failureMessageFormatArgument","t":4,"rt":$n[0].Object,"sn":"failureMessageFormatArgument"},{"a":4,"n":"failureMessageID","t":4,"rt":$n[0].String,"sn":"failureMessageID"},{"a":4,"n":"flags","t":4,"rt":$n[0].ParseFlags,"sn":"flags","box":function ($v) { return H5.box($v, System.ParseFlags, System.Enum.toStringFn(System.ParseFlags));}},{"a":4,"n":"fraction","t":4,"rt":$n[0].Double,"sn":"fraction","box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":4,"n":"parsedDate","t":4,"rt":$n[0].DateTime,"sn":"parsedDate","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":4,"n":"timeZoneOffset","t":4,"rt":$n[0].TimeSpan,"sn":"timeZoneOffset"}]}; }, $n); - $m("System.TokenType", function () { return {"att":256,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Am","is":true,"t":4,"rt":$n[0].TokenType,"sn":"Am","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"DateWordToken","is":true,"t":4,"rt":$n[0].TokenType,"sn":"DateWordToken","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"DayOfWeekToken","is":true,"t":4,"rt":$n[0].TokenType,"sn":"DayOfWeekToken","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"EndOfString","is":true,"t":4,"rt":$n[0].TokenType,"sn":"EndOfString","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"EraToken","is":true,"t":4,"rt":$n[0].TokenType,"sn":"EraToken","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"HebrewNumber","is":true,"t":4,"rt":$n[0].TokenType,"sn":"HebrewNumber","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"IgnorableSymbol","is":true,"t":4,"rt":$n[0].TokenType,"sn":"IgnorableSymbol","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"JapaneseEraToken","is":true,"t":4,"rt":$n[0].TokenType,"sn":"JapaneseEraToken","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"MonthToken","is":true,"t":4,"rt":$n[0].TokenType,"sn":"MonthToken","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"NumberToken","is":true,"t":4,"rt":$n[0].TokenType,"sn":"NumberToken","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"Pm","is":true,"t":4,"rt":$n[0].TokenType,"sn":"Pm","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"RegularTokenMask","is":true,"t":4,"rt":$n[0].TokenType,"sn":"RegularTokenMask","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_Am","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_Am","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_Date","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_Date","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_DateOrOffset","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_DateOrOffset","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_DaySuff","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_DaySuff","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_End","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_End","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_HourSuff","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_HourSuff","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_LocalTimeMark","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_LocalTimeMark","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_MinuteSuff","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_MinuteSuff","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_MonthSuff","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_MonthSuff","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_Pm","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_Pm","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_SecondSuff","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_SecondSuff","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_Space","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_Space","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_Time","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_Time","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_Unk","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_Unk","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SEP_YearSuff","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SEP_YearSuff","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"SeparatorTokenMask","is":true,"t":4,"rt":$n[0].TokenType,"sn":"SeparatorTokenMask","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"TEraToken","is":true,"t":4,"rt":$n[0].TokenType,"sn":"TEraToken","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"TimeZoneToken","is":true,"t":4,"rt":$n[0].TokenType,"sn":"TimeZoneToken","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"UnknownToken","is":true,"t":4,"rt":$n[0].TokenType,"sn":"UnknownToken","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}},{"a":2,"n":"YearNumberToken","is":true,"t":4,"rt":$n[0].TokenType,"sn":"YearNumberToken","box":function ($v) { return H5.box($v, System.TokenType, System.Enum.toStringFn(System.TokenType));}}]}; }, $n); - $m("System.HResults", function () { return {"att":1048960,"a":4,"s":true,"m":[{"a":4,"n":"COR_E_ABANDONEDMUTEX","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_ABANDONEDMUTEX","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_AMBIGUOUSMATCH","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_AMBIGUOUSMATCH","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_APPDOMAINUNLOADED","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_APPDOMAINUNLOADED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_APPLICATION","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_APPLICATION","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_ARGUMENT","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_ARGUMENT","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_ARGUMENTOUTOFRANGE","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_ARGUMENTOUTOFRANGE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_ARITHMETIC","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_ARITHMETIC","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_ARRAYTYPEMISMATCH","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_ARRAYTYPEMISMATCH","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_BADEXEFORMAT","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_BADEXEFORMAT","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_BADIMAGEFORMAT","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_BADIMAGEFORMAT","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_CANNOTUNLOADAPPDOMAIN","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_CANNOTUNLOADAPPDOMAIN","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_COMEMULATE","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_COMEMULATE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_CONTEXTMARSHAL","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_CONTEXTMARSHAL","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_CUSTOMATTRIBUTEFORMAT","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_CUSTOMATTRIBUTEFORMAT","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_DATAMISALIGNED","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_DATAMISALIGNED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_DIRECTORYNOTFOUND","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_DIRECTORYNOTFOUND","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_DIVIDEBYZERO","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_DIVIDEBYZERO","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_DLLNOTFOUND","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_DLLNOTFOUND","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_DUPLICATEWAITOBJECT","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_DUPLICATEWAITOBJECT","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_ENDOFSTREAM","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_ENDOFSTREAM","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_ENTRYPOINTNOTFOUND","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_ENTRYPOINTNOTFOUND","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_EXCEPTION","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_EXCEPTION","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_EXECUTIONENGINE","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_EXECUTIONENGINE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_FIELDACCESS","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_FIELDACCESS","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_FILELOAD","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_FILELOAD","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_FILENOTFOUND","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_FILENOTFOUND","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_FORMAT","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_FORMAT","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_HOSTPROTECTION","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_HOSTPROTECTION","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_INDEXOUTOFRANGE","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_INDEXOUTOFRANGE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_INSUFFICIENTEXECUTIONSTACK","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_INSUFFICIENTEXECUTIONSTACK","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_INSUFFICIENTMEMORY","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_INSUFFICIENTMEMORY","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_INVALIDCAST","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_INVALIDCAST","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_INVALIDCOMOBJECT","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_INVALIDCOMOBJECT","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_INVALIDFILTERCRITERIA","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_INVALIDFILTERCRITERIA","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_INVALIDOLEVARIANTTYPE","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_INVALIDOLEVARIANTTYPE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_INVALIDOPERATION","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_INVALIDOPERATION","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_INVALIDPROGRAM","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_INVALIDPROGRAM","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_IO","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_IO","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_KEYNOTFOUND","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_KEYNOTFOUND","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_MARSHALDIRECTIVE","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_MARSHALDIRECTIVE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_MEMBERACCESS","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_MEMBERACCESS","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_METHODACCESS","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_METHODACCESS","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_MISSINGFIELD","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_MISSINGFIELD","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_MISSINGMANIFESTRESOURCE","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_MISSINGMANIFESTRESOURCE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_MISSINGMEMBER","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_MISSINGMEMBER","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_MISSINGMETHOD","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_MISSINGMETHOD","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_MISSINGSATELLITEASSEMBLY","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_MISSINGSATELLITEASSEMBLY","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_NOTFINITENUMBER","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_NOTFINITENUMBER","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_NOTSUPPORTED","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_NOTSUPPORTED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_NULLREFERENCE","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_NULLREFERENCE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_OBJECTDISPOSED","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_OBJECTDISPOSED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_OPERATIONCANCELED","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_OPERATIONCANCELED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_OUTOFMEMORY","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_OUTOFMEMORY","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_OVERFLOW","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_OVERFLOW","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_PATHTOOLONG","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_PATHTOOLONG","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_PLATFORMNOTSUPPORTED","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_PLATFORMNOTSUPPORTED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_RANK","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_RANK","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_REFLECTIONTYPELOAD","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_REFLECTIONTYPELOAD","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_RUNTIMEWRAPPED","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_RUNTIMEWRAPPED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_SAFEARRAYRANKMISMATCH","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_SAFEARRAYRANKMISMATCH","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_SAFEARRAYTYPEMISMATCH","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_SAFEARRAYTYPEMISMATCH","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_SAFEHANDLEMISSINGATTRIBUTE","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_SAFEHANDLEMISSINGATTRIBUTE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_SECURITY","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_SECURITY","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_SEMAPHOREFULL","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_SEMAPHOREFULL","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_SERIALIZATION","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_SERIALIZATION","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_STACKOVERFLOW","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_STACKOVERFLOW","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_SYNCHRONIZATIONLOCK","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_SYNCHRONIZATIONLOCK","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_SYSTEM","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_SYSTEM","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_TARGET","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_TARGET","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_TARGETINVOCATION","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_TARGETINVOCATION","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_TARGETPARAMCOUNT","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_TARGETPARAMCOUNT","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_THREADABORTED","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_THREADABORTED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_THREADINTERRUPTED","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_THREADINTERRUPTED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_THREADSTART","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_THREADSTART","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_THREADSTOP","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_THREADSTOP","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_TIMEOUT","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_TIMEOUT","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_TYPEACCESS","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_TYPEACCESS","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_TYPEINITIALIZATION","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_TYPEINITIALIZATION","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_TYPELOAD","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_TYPELOAD","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_TYPEUNLOADED","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_TYPEUNLOADED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_UNAUTHORIZEDACCESS","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_UNAUTHORIZEDACCESS","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_UNSUPPORTEDFORMAT","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_UNSUPPORTEDFORMAT","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_VERIFICATION","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_VERIFICATION","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COR_E_WAITHANDLECANNOTBEOPENED","is":true,"t":4,"rt":$n[0].Int32,"sn":"COR_E_WAITHANDLECANNOTBEOPENED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"COvR_E_THREADSTATE","is":true,"t":4,"rt":$n[0].Int32,"sn":"COvR_E_THREADSTATE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"CvOR_E_MULTICASTNOTSUPPORTED","is":true,"t":4,"rt":$n[0].Int32,"sn":"CvOR_E_MULTICASTNOTSUPPORTED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"DISP_E_OVERFLOW","is":true,"t":4,"rt":$n[0].Int32,"sn":"DISP_E_OVERFLOW","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"ERROR_MRM_MAP_NOT_FOUND","is":true,"t":4,"rt":$n[0].Int32,"sn":"ERROR_MRM_MAP_NOT_FOUND","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"E_BOUNDS","is":true,"t":4,"rt":$n[0].Int32,"sn":"E_BOUNDS","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"E_CHANGED_STATE","is":true,"t":4,"rt":$n[0].Int32,"sn":"E_CHANGED_STATE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"E_FAIL","is":true,"t":4,"rt":$n[0].Int32,"sn":"E_FAIL","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"E_HANDLE","is":true,"t":4,"rt":$n[0].Int32,"sn":"E_HANDLE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"E_INVALIDARG","is":true,"t":4,"rt":$n[0].Int32,"sn":"E_INVALIDARG","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"E_NOTIMPL","is":true,"t":4,"rt":$n[0].Int32,"sn":"E_NOTIMPL","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"E_POINTER","is":true,"t":4,"rt":$n[0].Int32,"sn":"E_POINTER","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"RO_E_CLOSED","is":true,"t":4,"rt":$n[0].Int32,"sn":"RO_E_CLOSED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"TYPE_E_TYPEMISMATCH","is":true,"t":4,"rt":$n[0].Int32,"sn":"TYPE_E_TYPEMISMATCH","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.IConvertible", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"GetTypeCode","t":8,"sn":"System$IConvertible$GetTypeCode","rt":$n[0].TypeCode,"box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"ab":true,"a":2,"n":"ToBoolean","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToBoolean","rt":$n[0].Boolean,"p":[$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"ToByte","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToByte","rt":$n[0].Byte,"p":[$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.Byte);}},{"ab":true,"a":2,"n":"ToChar","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToChar","rt":$n[0].Char,"p":[$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"ab":true,"a":2,"n":"ToDateTime","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToDateTime","rt":$n[0].DateTime,"p":[$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"ab":true,"a":2,"n":"ToDecimal","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToDecimal","rt":$n[0].Decimal,"p":[$n[0].IFormatProvider]},{"ab":true,"a":2,"n":"ToDouble","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToDouble","rt":$n[0].Double,"p":[$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"ab":true,"a":2,"n":"ToInt16","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToInt16","rt":$n[0].Int16,"p":[$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.Int16);}},{"ab":true,"a":2,"n":"ToInt32","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToInt32","rt":$n[0].Int32,"p":[$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"ToInt64","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToInt64","rt":$n[0].Int64,"p":[$n[0].IFormatProvider]},{"ab":true,"a":2,"n":"ToSByte","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToSByte","rt":$n[0].SByte,"p":[$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.SByte);}},{"ab":true,"a":2,"n":"ToSingle","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToSingle","rt":$n[0].Single,"p":[$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"ab":true,"a":2,"n":"ToString","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToString","rt":$n[0].String,"p":[$n[0].IFormatProvider]},{"ab":true,"a":2,"n":"ToType","t":8,"pi":[{"n":"conversionType","pt":$n[0].Type,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"sn":"System$IConvertible$ToType","rt":$n[0].Object,"p":[$n[0].Type,$n[0].IFormatProvider]},{"ab":true,"a":2,"n":"ToUInt16","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToUInt16","rt":$n[0].UInt16,"p":[$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.UInt16);}},{"ab":true,"a":2,"n":"ToUInt32","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToUInt32","rt":$n[0].UInt32,"p":[$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.UInt32);}},{"ab":true,"a":2,"n":"ToUInt64","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"System$IConvertible$ToUInt64","rt":$n[0].UInt64,"p":[$n[0].IFormatProvider]}]}; }, $n); - $m("System.IndexOutOfRangeException", function () { return {"att":1057025,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.InvalidCastException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Int32],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"errorCode","pt":$n[0].Int32,"ps":1}],"sn":"$ctor3"}]}; }, $n); - $m("System.InvalidOperationException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.InvalidProgramException", function () { return {"att":1057025,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"inner","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.NotImplemented", function () { return {"att":1048960,"a":4,"s":true,"m":[{"a":4,"n":"ByDesignWithMessage","is":true,"t":8,"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"ByDesignWithMessage","rt":$n[0].Exception,"p":[$n[0].String]},{"a":4,"n":"ByDesign","is":true,"t":16,"rt":$n[0].Exception,"g":{"a":4,"n":"get_ByDesign","t":8,"rt":$n[0].Exception,"fg":"ByDesign","is":true},"fn":"ByDesign"}]}; }, $n); - $m("System.NotImplementedException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"inner","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.NotSupportedException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.NullReferenceException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.ObjectDisposedException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":1,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"objectName","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].String],"pi":[{"n":"objectName","pt":$n[0].String,"ps":0},{"n":"message","pt":$n[0].String,"ps":1}],"sn":"$ctor3"},{"ov":true,"a":2,"n":"Message","t":16,"rt":$n[0].String,"g":{"ov":true,"a":2,"n":"get_Message","t":8,"rt":$n[0].String,"fg":"Message"},"fn":"Message"},{"a":2,"n":"ObjectName","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_ObjectName","t":8,"rt":$n[0].String,"fg":"ObjectName"},"fn":"ObjectName"},{"a":1,"n":"_objectName","t":4,"rt":$n[0].String,"sn":"_objectName"}]}; }, $n); - $m("System.OperationCanceledException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[2].CancellationToken],"pi":[{"n":"token","pt":$n[2].CancellationToken,"ps":0}],"sn":"$ctor5"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[2].CancellationToken],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"token","pt":$n[2].CancellationToken,"ps":1}],"sn":"$ctor4"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception,$n[2].CancellationToken],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1},{"n":"token","pt":$n[2].CancellationToken,"ps":2}],"sn":"$ctor3"},{"a":2,"n":"CancellationToken","t":16,"rt":$n[2].CancellationToken,"g":{"a":2,"n":"get_CancellationToken","t":8,"rt":$n[2].CancellationToken,"fg":"CancellationToken"},"s":{"a":1,"n":"set_CancellationToken","t":8,"p":[$n[2].CancellationToken],"rt":$n[0].Void,"fs":"CancellationToken"},"fn":"CancellationToken"},{"a":1,"n":"_cancellationToken","t":4,"rt":$n[2].CancellationToken,"sn":"_cancellationToken"}]}; }, $n); - $m("System.OutOfMemoryException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.OverflowException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.Random", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"seed","pt":$n[0].Int32,"ps":0}],"sn":"$ctor1"},{"a":1,"n":"GetSampleForLargeRange","t":8,"sn":"GetSampleForLargeRange","rt":$n[0].Double,"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":1,"n":"InternalSample","t":8,"sn":"InternalSample","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"Next","t":8,"sn":"Next","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"Next","t":8,"pi":[{"n":"maxValue","pt":$n[0].Int32,"ps":0}],"sn":"Next$1","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"Next","t":8,"pi":[{"n":"minValue","pt":$n[0].Int32,"ps":0},{"n":"maxValue","pt":$n[0].Int32,"ps":1}],"sn":"Next$2","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"NextBytes","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0}],"sn":"NextBytes","rt":$n[0].Void,"p":[$n[0].Array.type(System.Byte)]},{"v":true,"a":2,"n":"NextDouble","t":8,"sn":"NextDouble","rt":$n[0].Double,"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"v":true,"a":2,"n":"NextInt64","t":8,"sn":"NextInt64","rt":$n[0].Int64},{"v":true,"a":2,"n":"NextInt64","t":8,"pi":[{"n":"maxValue","pt":$n[0].Int64,"ps":0}],"sn":"NextInt64$1","rt":$n[0].Int64,"p":[$n[0].Int64]},{"v":true,"a":2,"n":"NextInt64","t":8,"pi":[{"n":"minValue","pt":$n[0].Int64,"ps":0},{"n":"maxValue","pt":$n[0].Int64,"ps":1}],"sn":"NextInt64$2","rt":$n[0].Int64,"p":[$n[0].Int64,$n[0].Int64]},{"v":true,"a":2,"n":"NextSingle","t":8,"sn":"NextSingle","rt":$n[0].Single,"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"v":true,"a":3,"n":"Sample","t":8,"sn":"Sample","rt":$n[0].Double,"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":2,"n":"Shared","is":true,"t":16,"rt":$n[0].Random,"g":{"a":2,"n":"get_Shared","t":8,"rt":$n[0].Random,"fg":"Shared","is":true},"fn":"Shared"},{"a":1,"n":"MBIG","is":true,"t":4,"rt":$n[0].Int32,"sn":"MBIG","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"MSEED","is":true,"t":4,"rt":$n[0].Int32,"sn":"MSEED","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"MZ","is":true,"t":4,"rt":$n[0].Int32,"sn":"MZ","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"SeedArray","t":4,"rt":$n[0].Array.type(System.Int32),"sn":"SeedArray"},{"a":1,"n":"inext","t":4,"rt":$n[0].Int32,"sn":"inext","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"inextp","t":4,"rt":$n[0].Int32,"sn":"inextp","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"t_shared","is":true,"t":4,"rt":$n[0].Random,"sn":"t_shared"}]}; }, $n); - $m("System.RankException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.SerializableAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"}],"ni":true}; }, $n); - $m("System.SR", function () { return {"att":1048960,"a":4,"s":true,"m":[{"a":4,"n":"Format","is":true,"t":8,"pi":[{"n":"resourceFormat","pt":$n[0].String,"ps":0},{"n":"p1","pt":$n[0].Object,"ps":1}],"sn":"Format","rt":$n[0].String,"p":[$n[0].String,$n[0].Object]},{"a":4,"n":"Format","is":true,"t":8,"pi":[{"n":"resourceFormat","pt":$n[0].String,"ps":0},{"n":"args","ip":true,"pt":$n[0].Array.type(System.Object),"ps":1}],"sn":"Format$3","rt":$n[0].String,"p":[$n[0].String,$n[0].Array.type(System.Object)]},{"a":4,"n":"Format","is":true,"t":8,"pi":[{"n":"resourceFormat","pt":$n[0].String,"ps":0},{"n":"p1","pt":$n[0].Object,"ps":1},{"n":"p2","pt":$n[0].Object,"ps":2}],"sn":"Format$1","rt":$n[0].String,"p":[$n[0].String,$n[0].Object,$n[0].Object]},{"a":4,"n":"Format","is":true,"t":8,"pi":[{"n":"resourceFormat","pt":$n[0].String,"ps":0},{"n":"p1","pt":$n[0].Object,"ps":1},{"n":"p2","pt":$n[0].Object,"ps":2},{"n":"p3","pt":$n[0].Object,"ps":3}],"sn":"Format$2","rt":$n[0].String,"p":[$n[0].String,$n[0].Object,$n[0].Object,$n[0].Object]},{"a":4,"n":"GetResourceString","is":true,"t":8,"pi":[{"n":"resourceKey","pt":$n[0].String,"ps":0}],"sn":"GetResourceString","rt":$n[0].String,"p":[$n[0].String]},{"a":4,"n":"GetResourceString","is":true,"t":8,"pi":[{"n":"resourceKey","pt":$n[0].String,"ps":0},{"n":"defaultString","pt":$n[0].String,"ps":1}],"sn":"GetResourceString$1","rt":$n[0].String,"p":[$n[0].String,$n[0].String]},{"a":1,"n":"InternalGetResourceString","is":true,"t":8,"pi":[{"n":"key","pt":$n[0].String,"ps":0}],"sn":"InternalGetResourceString","rt":$n[0].String,"p":[$n[0].String]},{"a":1,"n":"UsingResourceKeys","is":true,"t":8,"sn":"UsingResourceKeys","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"ResourceManager","is":true,"t":16,"rt":System.Object,"g":{"a":1,"n":"get_ResourceManager","t":8,"rt":System.Object,"fg":"ResourceManager","is":true},"s":{"a":1,"n":"set_ResourceManager","t":8,"p":[System.Object],"rt":$n[0].Void,"fs":"ResourceManager","is":true},"fn":"ResourceManager"},{"a":2,"n":"ArgumentException_ValueTupleIncorrectType","is":true,"t":4,"rt":$n[0].String,"sn":"ArgumentException_ValueTupleIncorrectType"},{"a":2,"n":"ArgumentException_ValueTupleLastArgumentNotAValueTuple","is":true,"t":4,"rt":$n[0].String,"sn":"ArgumentException_ValueTupleLastArgumentNotAValueTuple"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":System.Object,"sn":"ResourceManager"}]}; }, $n); - $m("System.StringComparison", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"CurrentCulture","is":true,"t":4,"rt":$n[0].StringComparison,"sn":"CurrentCulture","box":function ($v) { return H5.box($v, System.StringComparison, System.Enum.toStringFn(System.StringComparison));}},{"a":2,"n":"CurrentCultureIgnoreCase","is":true,"t":4,"rt":$n[0].StringComparison,"sn":"CurrentCultureIgnoreCase","box":function ($v) { return H5.box($v, System.StringComparison, System.Enum.toStringFn(System.StringComparison));}},{"a":2,"n":"InvariantCulture","is":true,"t":4,"rt":$n[0].StringComparison,"sn":"InvariantCulture","box":function ($v) { return H5.box($v, System.StringComparison, System.Enum.toStringFn(System.StringComparison));}},{"a":2,"n":"InvariantCultureIgnoreCase","is":true,"t":4,"rt":$n[0].StringComparison,"sn":"InvariantCultureIgnoreCase","box":function ($v) { return H5.box($v, System.StringComparison, System.Enum.toStringFn(System.StringComparison));}},{"a":2,"n":"Ordinal","is":true,"t":4,"rt":$n[0].StringComparison,"sn":"Ordinal","box":function ($v) { return H5.box($v, System.StringComparison, System.Enum.toStringFn(System.StringComparison));}},{"a":2,"n":"OrdinalIgnoreCase","is":true,"t":4,"rt":$n[0].StringComparison,"sn":"OrdinalIgnoreCase","box":function ($v) { return H5.box($v, System.StringComparison, System.Enum.toStringFn(System.StringComparison));}}]}; }, $n); - $m("System.StringSplitOptions", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"None","is":true,"t":4,"rt":$n[0].StringSplitOptions,"sn":"None","box":function ($v) { return H5.box($v, System.StringSplitOptions, System.Enum.toStringFn(System.StringSplitOptions));}},{"a":2,"n":"RemoveEmptyEntries","is":true,"t":4,"rt":$n[0].StringSplitOptions,"sn":"RemoveEmptyEntries","box":function ($v) { return H5.box($v, System.StringSplitOptions, System.Enum.toStringFn(System.StringSplitOptions));}}]}; }, $n); - $m("System.SystemException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.ThrowHelper", function () { return {"att":1048960,"a":4,"s":true,"m":[{"a":1,"n":"GetAddingDuplicateWithKeyArgumentException","is":true,"t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"GetAddingDuplicateWithKeyArgumentException","rt":$n[0].ArgumentException,"p":[$n[0].Object]},{"a":1,"n":"GetArgumentException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0}],"sn":"GetArgumentException","rt":$n[0].ArgumentException,"p":[$n[0].ExceptionResource]},{"a":1,"n":"GetArgumentException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0},{"n":"argument","pt":$n[0].ExceptionArgument,"ps":1}],"sn":"GetArgumentException$1","rt":$n[0].ArgumentException,"p":[$n[0].ExceptionResource,$n[0].ExceptionArgument]},{"a":1,"n":"GetArgumentName","is":true,"t":8,"pi":[{"n":"argument","pt":$n[0].ExceptionArgument,"ps":0}],"sn":"GetArgumentName","rt":$n[0].String,"p":[$n[0].ExceptionArgument]},{"a":1,"n":"GetArgumentNullException","is":true,"t":8,"pi":[{"n":"argument","pt":$n[0].ExceptionArgument,"ps":0}],"sn":"GetArgumentNullException","rt":$n[0].ArgumentNullException,"p":[$n[0].ExceptionArgument]},{"a":4,"n":"GetArgumentOutOfRangeException","is":true,"t":8,"pi":[{"n":"argument","pt":$n[0].ExceptionArgument,"ps":0},{"n":"resource","pt":$n[0].ExceptionResource,"ps":1}],"sn":"GetArgumentOutOfRangeException","rt":$n[0].ArgumentOutOfRangeException,"p":[$n[0].ExceptionArgument,$n[0].ExceptionResource]},{"a":1,"n":"GetArgumentOutOfRangeException","is":true,"t":8,"pi":[{"n":"argument","pt":$n[0].ExceptionArgument,"ps":0},{"n":"paramNumber","pt":$n[0].Int32,"ps":1},{"n":"resource","pt":$n[0].ExceptionResource,"ps":2}],"sn":"GetArgumentOutOfRangeException$1","rt":$n[0].ArgumentOutOfRangeException,"p":[$n[0].ExceptionArgument,$n[0].Int32,$n[0].ExceptionResource]},{"a":1,"n":"GetArraySegmentCtorValidationFailedException","is":true,"t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"GetArraySegmentCtorValidationFailedException","rt":$n[0].Exception,"p":[Array,$n[0].Int32,$n[0].Int32]},{"a":4,"n":"GetInvalidOperationException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0}],"sn":"GetInvalidOperationException","rt":$n[0].InvalidOperationException,"p":[$n[0].ExceptionResource]},{"a":1,"n":"GetInvalidOperationException_EnumCurrent","is":true,"t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"GetInvalidOperationException_EnumCurrent","rt":$n[0].InvalidOperationException,"p":[$n[0].Int32]},{"a":1,"n":"GetKeyNotFoundException","is":true,"t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"GetKeyNotFoundException","rt":$n[3].KeyNotFoundException,"p":[$n[0].Object]},{"a":1,"n":"GetResourceString","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0}],"sn":"GetResourceString","rt":$n[0].String,"p":[$n[0].ExceptionResource]},{"a":1,"n":"GetWrongKeyTypeArgumentException","is":true,"t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0},{"n":"targetType","pt":$n[0].Type,"ps":1}],"sn":"GetWrongKeyTypeArgumentException","rt":$n[0].ArgumentException,"p":[$n[0].Object,$n[0].Type]},{"a":1,"n":"GetWrongValueTypeArgumentException","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0},{"n":"targetType","pt":$n[0].Type,"ps":1}],"sn":"GetWrongValueTypeArgumentException","rt":$n[0].ArgumentException,"p":[$n[0].Object,$n[0].Type]},{"a":4,"n":"IfNullAndNullsAreIllegalThenThrow","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0},{"n":"argName","pt":$n[0].ExceptionArgument,"ps":1}],"tpc":1,"tprm":["T"],"sn":"IfNullAndNullsAreIllegalThenThrow","rt":$n[0].Void,"p":[$n[0].Object,$n[0].ExceptionArgument]},{"a":4,"n":"ThrowAddingDuplicateWithKeyArgumentException","is":true,"t":8,"pi":[{"n":"key","pt":System.Object,"ps":0}],"tpc":1,"tprm":["T"],"sn":"ThrowAddingDuplicateWithKeyArgumentException","rt":$n[0].Void,"p":[System.Object]},{"a":4,"n":"ThrowAggregateException","is":true,"t":8,"pi":[{"n":"exceptions","pt":$n[3].List$1(System.Exception),"ps":0}],"sn":"ThrowAggregateException","rt":$n[0].Void,"p":[$n[3].List$1(System.Exception)]},{"a":4,"n":"ThrowArgumentException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0}],"sn":"ThrowArgumentException","rt":$n[0].Void,"p":[$n[0].ExceptionResource]},{"a":4,"n":"ThrowArgumentException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0},{"n":"argument","pt":$n[0].ExceptionArgument,"ps":1}],"sn":"ThrowArgumentException$1","rt":$n[0].Void,"p":[$n[0].ExceptionResource,$n[0].ExceptionArgument]},{"a":4,"n":"ThrowArgumentException_Argument_InvalidArrayType","is":true,"t":8,"sn":"ThrowArgumentException_Argument_InvalidArrayType","rt":$n[0].Void},{"a":4,"n":"ThrowArgumentException_DestinationTooShort","is":true,"t":8,"sn":"ThrowArgumentException_DestinationTooShort","rt":$n[0].Void},{"a":4,"n":"ThrowArgumentException_OverlapAlignmentMismatch","is":true,"t":8,"sn":"ThrowArgumentException_OverlapAlignmentMismatch","rt":$n[0].Void},{"a":4,"n":"ThrowArgumentNullException","is":true,"t":8,"pi":[{"n":"argument","pt":$n[0].ExceptionArgument,"ps":0}],"sn":"ThrowArgumentNullException","rt":$n[0].Void,"p":[$n[0].ExceptionArgument]},{"a":4,"n":"ThrowArgumentNullException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0}],"sn":"ThrowArgumentNullException$2","rt":$n[0].Void,"p":[$n[0].ExceptionResource]},{"a":4,"n":"ThrowArgumentNullException","is":true,"t":8,"pi":[{"n":"argument","pt":$n[0].ExceptionArgument,"ps":0},{"n":"resource","pt":$n[0].ExceptionResource,"ps":1}],"sn":"ThrowArgumentNullException$1","rt":$n[0].Void,"p":[$n[0].ExceptionArgument,$n[0].ExceptionResource]},{"a":4,"n":"ThrowArgumentOutOfRangeException","is":true,"t":8,"sn":"ThrowArgumentOutOfRangeException","rt":$n[0].Void},{"a":4,"n":"ThrowArgumentOutOfRangeException","is":true,"t":8,"pi":[{"n":"argument","pt":$n[0].ExceptionArgument,"ps":0}],"sn":"ThrowArgumentOutOfRangeException$1","rt":$n[0].Void,"p":[$n[0].ExceptionArgument]},{"a":4,"n":"ThrowArgumentOutOfRangeException","is":true,"t":8,"pi":[{"n":"argument","pt":$n[0].ExceptionArgument,"ps":0},{"n":"resource","pt":$n[0].ExceptionResource,"ps":1}],"sn":"ThrowArgumentOutOfRangeException$2","rt":$n[0].Void,"p":[$n[0].ExceptionArgument,$n[0].ExceptionResource]},{"a":4,"n":"ThrowArgumentOutOfRangeException","is":true,"t":8,"pi":[{"n":"argument","pt":$n[0].ExceptionArgument,"ps":0},{"n":"paramNumber","pt":$n[0].Int32,"ps":1},{"n":"resource","pt":$n[0].ExceptionResource,"ps":2}],"sn":"ThrowArgumentOutOfRangeException$3","rt":$n[0].Void,"p":[$n[0].ExceptionArgument,$n[0].Int32,$n[0].ExceptionResource]},{"a":4,"n":"ThrowArgumentOutOfRange_IndexException","is":true,"t":8,"sn":"ThrowArgumentOutOfRange_IndexException","rt":$n[0].Void},{"a":4,"n":"ThrowArraySegmentCtorValidationFailedExceptions","is":true,"t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"ThrowArraySegmentCtorValidationFailedExceptions","rt":$n[0].Void,"p":[Array,$n[0].Int32,$n[0].Int32]},{"a":4,"n":"ThrowArrayTypeMismatchException","is":true,"t":8,"sn":"ThrowArrayTypeMismatchException","rt":$n[0].Void},{"a":4,"n":"ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count","is":true,"t":8,"sn":"ThrowCountArgumentOutOfRange_ArgumentOutOfRange_Count","rt":$n[0].Void},{"a":4,"n":"ThrowIndexArgumentOutOfRange_NeedNonNegNumException","is":true,"t":8,"sn":"ThrowIndexArgumentOutOfRange_NeedNonNegNumException","rt":$n[0].Void},{"a":4,"n":"ThrowIndexOutOfRangeException","is":true,"t":8,"sn":"ThrowIndexOutOfRangeException","rt":$n[0].Void},{"a":4,"n":"ThrowInvalidOperationException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0}],"sn":"ThrowInvalidOperationException","rt":$n[0].Void,"p":[$n[0].ExceptionResource]},{"a":4,"n":"ThrowInvalidOperationException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0},{"n":"e","pt":$n[0].Exception,"ps":1}],"sn":"ThrowInvalidOperationException$1","rt":$n[0].Void,"p":[$n[0].ExceptionResource,$n[0].Exception]},{"a":4,"n":"ThrowInvalidOperationException_EnumCurrent","is":true,"t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"ThrowInvalidOperationException_EnumCurrent","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":4,"n":"ThrowInvalidOperationException_InvalidOperation_EnumEnded","is":true,"t":8,"sn":"ThrowInvalidOperationException_InvalidOperation_EnumEnded","rt":$n[0].Void},{"a":4,"n":"ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion","is":true,"t":8,"sn":"ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion","rt":$n[0].Void},{"a":4,"n":"ThrowInvalidOperationException_InvalidOperation_EnumNotStarted","is":true,"t":8,"sn":"ThrowInvalidOperationException_InvalidOperation_EnumNotStarted","rt":$n[0].Void},{"a":4,"n":"ThrowInvalidOperationException_InvalidOperation_EnumOpCantHappen","is":true,"t":8,"sn":"ThrowInvalidOperationException_InvalidOperation_EnumOpCantHappen","rt":$n[0].Void},{"a":4,"n":"ThrowInvalidOperationException_InvalidOperation_NoValue","is":true,"t":8,"sn":"ThrowInvalidOperationException_InvalidOperation_NoValue","rt":$n[0].Void},{"a":4,"n":"ThrowInvalidOperationException_OutstandingReferences","is":true,"t":8,"sn":"ThrowInvalidOperationException_OutstandingReferences","rt":$n[0].Void},{"a":4,"n":"ThrowInvalidTypeWithPointersNotSupported","is":true,"t":8,"pi":[{"n":"targetType","pt":$n[0].Type,"ps":0}],"sn":"ThrowInvalidTypeWithPointersNotSupported","rt":$n[0].Void,"p":[$n[0].Type]},{"a":4,"n":"ThrowKeyNotFoundException","is":true,"t":8,"pi":[{"n":"key","pt":System.Object,"ps":0}],"tpc":1,"tprm":["T"],"sn":"ThrowKeyNotFoundException","rt":$n[0].Void,"p":[System.Object]},{"a":4,"n":"ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum","is":true,"t":8,"sn":"ThrowLengthArgumentOutOfRange_ArgumentOutOfRange_NeedNonNegNum","rt":$n[0].Void},{"a":4,"n":"ThrowNotSupportedException","is":true,"t":8,"sn":"ThrowNotSupportedException","rt":$n[0].Void},{"a":4,"n":"ThrowNotSupportedException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0}],"sn":"ThrowNotSupportedException$1","rt":$n[0].Void,"p":[$n[0].ExceptionResource]},{"a":4,"n":"ThrowNotSupportedExceptionIfNonNumericType","is":true,"t":8,"tpc":1,"tprm":["T"],"sn":"ThrowNotSupportedExceptionIfNonNumericType","rt":$n[0].Void},{"a":4,"n":"ThrowObjectDisposedException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0}],"sn":"ThrowObjectDisposedException","rt":$n[0].Void,"p":[$n[0].ExceptionResource]},{"a":4,"n":"ThrowObjectDisposedException","is":true,"t":8,"pi":[{"n":"objectName","pt":$n[0].String,"ps":0},{"n":"resource","pt":$n[0].ExceptionResource,"ps":1}],"sn":"ThrowObjectDisposedException$1","rt":$n[0].Void,"p":[$n[0].String,$n[0].ExceptionResource]},{"a":4,"n":"ThrowObjectDisposedException_MemoryDisposed","is":true,"t":8,"sn":"ThrowObjectDisposedException_MemoryDisposed","rt":$n[0].Void},{"a":4,"n":"ThrowOutOfMemoryException","is":true,"t":8,"sn":"ThrowOutOfMemoryException","rt":$n[0].Void},{"a":4,"n":"ThrowRankException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0}],"sn":"ThrowRankException","rt":$n[0].Void,"p":[$n[0].ExceptionResource]},{"a":4,"n":"ThrowSecurityException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0}],"sn":"ThrowSecurityException","rt":$n[0].Void,"p":[$n[0].ExceptionResource]},{"a":4,"n":"ThrowSerializationException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0}],"sn":"ThrowSerializationException","rt":$n[0].Void,"p":[$n[0].ExceptionResource]},{"a":4,"n":"ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index","is":true,"t":8,"sn":"ThrowStartIndexArgumentOutOfRange_ArgumentOutOfRange_Index","rt":$n[0].Void},{"a":4,"n":"ThrowUnauthorizedAccessException","is":true,"t":8,"pi":[{"n":"resource","pt":$n[0].ExceptionResource,"ps":0}],"sn":"ThrowUnauthorizedAccessException","rt":$n[0].Void,"p":[$n[0].ExceptionResource]},{"a":4,"n":"ThrowWrongKeyTypeArgumentException","is":true,"t":8,"pi":[{"n":"key","pt":System.Object,"ps":0},{"n":"targetType","pt":$n[0].Type,"ps":1}],"tpc":1,"tprm":["T"],"sn":"ThrowWrongKeyTypeArgumentException","rt":$n[0].Void,"p":[System.Object,$n[0].Type]},{"a":4,"n":"ThrowWrongValueTypeArgumentException","is":true,"t":8,"pi":[{"n":"value","pt":System.Object,"ps":0},{"n":"targetType","pt":$n[0].Type,"ps":1}],"tpc":1,"tprm":["T"],"sn":"ThrowWrongValueTypeArgumentException","rt":$n[0].Void,"p":[System.Object,$n[0].Type]}]}; }, $n); - $m("System.ExceptionArgument", function () { return {"att":256,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"action","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"action","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"array","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"array","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"arrayIndex","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"arrayIndex","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"asyncResult","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"asyncResult","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"beginMethod","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"beginMethod","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"callBack","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"callBack","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"cancellationToken","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"cancellationToken","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"capacity","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"capacity","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"collection","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"collection","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"comparable","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"comparable","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"comparer","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"comparer","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"comparison","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"comparison","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"concurrencyLevel","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"concurrencyLevel","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"continuationAction","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"continuationAction","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"continuationFunction","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"continuationFunction","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"continuationOptions","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"continuationOptions","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"converter","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"converter","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"count","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"count","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"creationOptions","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"creationOptions","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"culture","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"culture","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"delay","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"delay","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"destinationArray","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"destinationArray","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"destinationIndex","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"destinationIndex","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"dictionary","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"dictionary","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"elementType","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"elementType","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"endFunction","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"endFunction","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"endIndex","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"endIndex","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"endMethod","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"endMethod","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"exception","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"exception","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"exceptions","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"exceptions","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"format","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"format","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"function","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"function","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"index","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"index","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"index1","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"index1","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"index2","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"index2","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"index3","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"index3","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"indices","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"indices","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"info","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"info","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"input","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"input","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"item","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"item","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"key","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"key","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"keyValuePair","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"keyValuePair","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"keys","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"keys","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"len","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"len","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"length","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"$length","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"length1","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"length1","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"length2","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"length2","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"length3","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"length3","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"lengths","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"lengths","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"list","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"list","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"lowerBounds","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"lowerBounds","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"match","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"match","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"millisecondsDelay","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"millisecondsDelay","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"millisecondsTimeout","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"millisecondsTimeout","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"name","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"$name","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"newSize","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"newSize","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"obj","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"obj","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"offset","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"offset","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"options","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"options","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"other","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"other","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"ownedMemory","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"ownedMemory","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"pHandle","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"pHandle","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"pointer","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"pointer","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"s","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"s","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"scheduler","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"scheduler","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"source","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"source","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"sourceArray","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"sourceArray","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"sourceBytesToCopy","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"sourceBytesToCopy","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"sourceIndex","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"sourceIndex","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"start","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"start","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"startIndex","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"startIndex","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"state","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"state","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"stateMachine","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"stateMachine","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"task","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"task","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"tasks","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"tasks","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"text","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"text","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"timeout","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"timeout","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"type","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"type","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"value","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"value","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"values","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"values","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}},{"a":2,"n":"view","is":true,"t":4,"rt":$n[0].ExceptionArgument,"sn":"view","box":function ($v) { return H5.box($v, System.ExceptionArgument, System.Enum.toStringFn(System.ExceptionArgument));}}]}; }, $n); - $m("System.ExceptionResource", function () { return {"att":256,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Arg_ArrayPlusOffTooSmall","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_ArrayPlusOffTooSmall","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_BogusIComparer","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_BogusIComparer","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_LowerBoundsMustMatch","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_LowerBoundsMustMatch","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_MustBeType","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_MustBeType","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_Need1DArray","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_Need1DArray","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_Need2DArray","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_Need2DArray","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_Need3DArray","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_Need3DArray","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_NeedAtLeast1Rank","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_NeedAtLeast1Rank","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_NonZeroLowerBound","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_NonZeroLowerBound","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_RankIndices","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_RankIndices","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_RankMultiDimNotSupported","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_RankMultiDimNotSupported","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_RanksAndBounds","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_RanksAndBounds","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_RegKeyDelHive","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_RegKeyDelHive","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_RegKeyStrLenBug","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_RegKeyStrLenBug","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_RegSetMismatchedKind","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_RegSetMismatchedKind","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_RegSetStrArrNull","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_RegSetStrArrNull","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_RegSubKeyAbsent","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_RegSubKeyAbsent","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Arg_RegSubKeyValueAbsent","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Arg_RegSubKeyValueAbsent","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ArgumentException_OtherNotArrayOfCorrectLength","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ArgumentException_OtherNotArrayOfCorrectLength","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ArgumentNull_SafeHandle","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ArgumentNull_SafeHandle","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ArgumentOutOfRange_BiggerThanCollection","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ArgumentOutOfRange_BiggerThanCollection","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ArgumentOutOfRange_Count","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ArgumentOutOfRange_Count","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ArgumentOutOfRange_EndIndexStartIndex","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ArgumentOutOfRange_EndIndexStartIndex","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ArgumentOutOfRange_Enum","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ArgumentOutOfRange_Enum","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ArgumentOutOfRange_HugeArrayNotSupported","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ArgumentOutOfRange_HugeArrayNotSupported","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ArgumentOutOfRange_Index","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ArgumentOutOfRange_Index","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ArgumentOutOfRange_InvalidThreshold","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ArgumentOutOfRange_InvalidThreshold","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ArgumentOutOfRange_ListInsert","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ArgumentOutOfRange_ListInsert","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ArgumentOutOfRange_NeedNonNegNum","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ArgumentOutOfRange_NeedNonNegNum","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ArgumentOutOfRange_SmallCapacity","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ArgumentOutOfRange_SmallCapacity","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Argument_AddingDuplicate","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Argument_AddingDuplicate","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Argument_ImplementIComparable","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Argument_ImplementIComparable","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Argument_InvalidArgumentForComparison","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Argument_InvalidArgumentForComparison","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Argument_InvalidArrayType","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Argument_InvalidArrayType","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Argument_InvalidOffLen","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Argument_InvalidOffLen","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Argument_InvalidRegistryKeyPermissionCheck","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Argument_InvalidRegistryKeyPermissionCheck","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Argument_InvalidRegistryOptionsCheck","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Argument_InvalidRegistryOptionsCheck","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Argument_InvalidRegistryViewCheck","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Argument_InvalidRegistryViewCheck","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Argument_InvalidType","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Argument_InvalidType","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Argument_ItemNotExist","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Argument_ItemNotExist","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"AsyncMethodBuilder_InstanceNotInitialized","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"AsyncMethodBuilder_InstanceNotInitialized","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ConcurrentCollection_SyncRoot_NotSupported","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ConcurrentCollection_SyncRoot_NotSupported","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ConcurrentDictionary_ArrayIncorrectType","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ConcurrentDictionary_ArrayIncorrectType","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ConcurrentDictionary_ArrayNotLargeEnough","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ConcurrentDictionary_ArrayNotLargeEnough","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ConcurrentDictionary_CapacityMustNotBeNegative","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ConcurrentDictionary_CapacityMustNotBeNegative","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ConcurrentDictionary_ConcurrencyLevelMustBePositive","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ConcurrentDictionary_ConcurrencyLevelMustBePositive","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ConcurrentDictionary_IndexIsNegative","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ConcurrentDictionary_IndexIsNegative","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ConcurrentDictionary_ItemKeyIsNull","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ConcurrentDictionary_ItemKeyIsNull","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ConcurrentDictionary_KeyAlreadyExisted","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ConcurrentDictionary_KeyAlreadyExisted","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ConcurrentDictionary_TypeOfKeyIncorrect","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ConcurrentDictionary_TypeOfKeyIncorrect","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ConcurrentDictionary_TypeOfValueIncorrect","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ConcurrentDictionary_TypeOfValueIncorrect","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"InvalidOperation_CannotRemoveFromStackOrQueue","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"InvalidOperation_CannotRemoveFromStackOrQueue","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"InvalidOperation_EmptyQueue","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"InvalidOperation_EmptyQueue","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"InvalidOperation_EmptyStack","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"InvalidOperation_EmptyStack","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"InvalidOperation_EnumEnded","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"InvalidOperation_EnumEnded","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"InvalidOperation_EnumFailedVersion","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"InvalidOperation_EnumFailedVersion","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"InvalidOperation_EnumNotStarted","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"InvalidOperation_EnumNotStarted","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"InvalidOperation_EnumOpCantHappen","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"InvalidOperation_EnumOpCantHappen","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"InvalidOperation_HandleIsNotInitialized","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"InvalidOperation_HandleIsNotInitialized","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"InvalidOperation_IComparerFailed","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"InvalidOperation_IComparerFailed","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"InvalidOperation_NoValue","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"InvalidOperation_NoValue","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"InvalidOperation_NullArray","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"InvalidOperation_NullArray","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"InvalidOperation_RegRemoveSubKey","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"InvalidOperation_RegRemoveSubKey","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"InvalidOperation_WrongAsyncResultOrEndCalledMultiple","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"InvalidOperation_WrongAsyncResultOrEndCalledMultiple","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"MemoryDisposed","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"MemoryDisposed","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Memory_OutstandingReferences","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Memory_OutstandingReferences","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"NotSupported_FixedSizeCollection","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"NotSupported_FixedSizeCollection","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"NotSupported_InComparableType","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"NotSupported_InComparableType","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"NotSupported_KeyCollectionSet","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"NotSupported_KeyCollectionSet","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"NotSupported_ReadOnlyCollection","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"NotSupported_ReadOnlyCollection","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"NotSupported_SortedListNestedWrite","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"NotSupported_SortedListNestedWrite","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"NotSupported_ValueCollectionSet","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"NotSupported_ValueCollectionSet","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"ObjectDisposed_RegKeyClosed","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"ObjectDisposed_RegKeyClosed","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Rank_MultiDimNotSupported","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Rank_MultiDimNotSupported","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Security_RegistryPermission","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Security_RegistryPermission","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Serialization_InvalidOnDeser","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Serialization_InvalidOnDeser","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Serialization_MissingKeys","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Serialization_MissingKeys","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Serialization_NullKey","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Serialization_NullKey","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"TaskCompletionSourceT_TrySetException_NoExceptions","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"TaskCompletionSourceT_TrySetException_NoExceptions","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"TaskCompletionSourceT_TrySetException_NullException","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"TaskCompletionSourceT_TrySetException_NullException","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"TaskT_TransitionToFinal_AlreadyCompleted","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"TaskT_TransitionToFinal_AlreadyCompleted","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_ContinueWith_ESandLR","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_ContinueWith_ESandLR","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_ContinueWith_NotOnAnything","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_ContinueWith_NotOnAnything","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_Delay_InvalidDelay","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_Delay_InvalidDelay","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_Delay_InvalidMillisecondsDelay","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_Delay_InvalidMillisecondsDelay","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_Dispose_NotCompleted","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_Dispose_NotCompleted","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_MultiTaskContinuation_EmptyTaskList","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_MultiTaskContinuation_EmptyTaskList","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_MultiTaskContinuation_NullTask","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_MultiTaskContinuation_NullTask","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_RunSynchronously_AlreadyStarted","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_RunSynchronously_AlreadyStarted","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_RunSynchronously_Continuation","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_RunSynchronously_Continuation","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_RunSynchronously_Promise","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_RunSynchronously_Promise","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_RunSynchronously_TaskCompleted","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_RunSynchronously_TaskCompleted","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_Start_AlreadyStarted","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_Start_AlreadyStarted","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_Start_ContinuationTask","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_Start_ContinuationTask","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_Start_Promise","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_Start_Promise","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_Start_TaskCompleted","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_Start_TaskCompleted","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_ThrowIfDisposed","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_ThrowIfDisposed","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_WaitMulti_NullTask","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_WaitMulti_NullTask","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"Task_ctor_LRandSR","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"Task_ctor_LRandSR","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}},{"a":2,"n":"UnauthorizedAccess_RegistryNoWrite","is":true,"t":4,"rt":$n[0].ExceptionResource,"sn":"UnauthorizedAccess_RegistryNoWrite","box":function ($v) { return H5.box($v, System.ExceptionResource, System.Enum.toStringFn(System.ExceptionResource));}}]}; }, $n); - $m("System.TimeoutException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.UnauthorizedAccessException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"inner","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.UnhandledExceptionEventArgs", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].Object,$n[0].Boolean],"pi":[{"n":"exception","pt":$n[0].Object,"ps":0},{"n":"isTerminating","pt":$n[0].Boolean,"ps":1}],"sn":"ctor"},{"a":2,"n":"ExceptionObject","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_ExceptionObject","t":8,"rt":$n[0].Object,"fg":"ExceptionObject"},"fn":"ExceptionObject"},{"a":2,"n":"IsTerminating","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsTerminating","t":8,"rt":$n[0].Boolean,"fg":"IsTerminating","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsTerminating"},{"a":1,"n":"_exception","t":4,"rt":$n[0].Object,"sn":"_exception"},{"a":1,"n":"_isTerminating","t":4,"rt":$n[0].Boolean,"sn":"_isTerminating","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.UnitySerializationHolder", function () { return {"att":1057024,"a":4,"at":[new System.SerializableAttribute()],"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"GetRealObject","t":8,"pi":[{"n":"context","pt":$n[4].StreamingContext,"ps":0}],"sn":"GetRealObject","rt":$n[0].Object,"p":[$n[4].StreamingContext]},{"a":4,"n":"NullUnity","is":true,"t":4,"rt":$n[0].Int32,"sn":"NullUnity","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Void", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"}]}; }, $n); - $m("System.AggregateException", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IEnumerable$1(System.Exception)],"pi":[{"n":"innerExceptions","pt":$n[3].IEnumerable$1(System.Exception),"ps":0}],"def":function (innerExceptions) { return new System.AggregateException(null, innerExceptions); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Exception)],"pi":[{"n":"innerExceptions","ip":true,"pt":$n[0].Array.type(System.Exception),"ps":0}],"def":function (innerExceptions) { return new System.AggregateException(null, Array.prototype.slice.call((arguments, 0))); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[3].IEnumerable$1(System.Exception)],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerExceptions","pt":$n[3].IEnumerable$1(System.Exception),"ps":1}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Array.type(System.Exception)],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerExceptions","ip":true,"pt":$n[0].Array.type(System.Exception),"ps":1}],"def":function (message, innerExceptions) { return new System.AggregateException(message, Array.prototype.slice.call((arguments, 1))); }},{"a":2,"n":"Flatten","t":8,"sn":"flatten","rt":$n[0].AggregateException},{"a":2,"n":"Handle","t":8,"pi":[{"n":"predicate","pt":Function,"ps":0}],"sn":"handle","rt":$n[0].Void,"p":[Function]},{"a":2,"n":"InnerExceptions","t":16,"rt":$n[5].ReadOnlyCollection$1(System.Exception),"g":{"a":2,"n":"get_InnerExceptions","t":8,"rt":$n[5].ReadOnlyCollection$1(System.Exception),"fg":"innerExceptions"},"fn":"innerExceptions"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[5].ReadOnlyCollection$1(System.Exception),"sn":"innerExceptions"}]}; }, $n); - $m("System.ArraySegment", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[System.Array.type(System.Object)],"pi":[{"n":"array","pt":System.Array.type(System.Object),"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[System.Array.type(System.Object),$n[0].Int32,$n[0].Int32],"pi":[{"n":"array","pt":System.Array.type(System.Object),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"ctor"},{"a":2,"n":"Array","t":16,"rt":System.Array.type(System.Object),"g":{"a":2,"n":"get_Array","t":8,"tpc":0,"def":function () { return this.getArray(); },"rt":System.Array.type(System.Object)}},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"tpc":0,"def":function () { return this.getCount(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Offset","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Offset","t":8,"tpc":0,"def":function () { return this.getOffset(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":System.Array.type(System.Object),"sn":"Array"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Count","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Offset","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.BitConverter", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":1,"n":"CheckArguments","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"size","pt":$n[0].Int32,"ps":2}],"sn":"checkArguments","rt":$n[0].Void,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"a":1,"n":"CreateLong","is":true,"t":8,"pi":[{"n":"low","pt":$n[0].Int32,"ps":0},{"n":"high","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (low, high) { return System.Int64([low, high]); },"rt":$n[0].Int64,"p":[$n[0].Int32,$n[0].Int32]},{"a":1,"n":"CreateULong","is":true,"t":8,"pi":[{"n":"low","pt":$n[0].Int32,"ps":0},{"n":"high","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (low, high) { return System.UInt64([low, high]); },"rt":$n[0].UInt64,"p":[$n[0].Int32,$n[0].Int32]},{"a":2,"n":"DoubleToInt64Bits","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"doubleToInt64Bits","rt":$n[0].Int64,"p":[$n[0].Double]},{"a":2,"n":"GetBytes","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Boolean,"ps":0}],"sn":"getBytes","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Boolean]},{"a":2,"n":"GetBytes","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"sn":"getBytes$1","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Char]},{"a":2,"n":"GetBytes","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"getBytes$2","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Double]},{"a":2,"n":"GetBytes","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int16,"ps":0}],"sn":"getBytes$3","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Int16]},{"a":2,"n":"GetBytes","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"getBytes$4","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Int32]},{"a":2,"n":"GetBytes","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"getBytes$5","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Int64]},{"a":2,"n":"GetBytes","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"sn":"getBytes$6","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Single]},{"a":2,"n":"GetBytes","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt16,"ps":0}],"sn":"getBytes$7","rt":$n[0].Array.type(System.Byte),"p":[$n[0].UInt16]},{"a":2,"n":"GetBytes","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt32,"ps":0}],"sn":"getBytes$8","rt":$n[0].Array.type(System.Byte),"p":[$n[0].UInt32]},{"a":2,"n":"GetBytes","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"getBytes$9","rt":$n[0].Array.type(System.Byte),"p":[$n[0].UInt64]},{"a":1,"n":"GetHexValue","is":true,"t":8,"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"sn":"getHexValue","rt":$n[0].Char,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":1,"n":"GetIsLittleEndian","is":true,"t":8,"sn":"getIsLittleEndian","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"GetLongHigh","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"tpc":0,"def":function (value) { return value.value.high; },"rt":$n[0].Int32,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"GetLongLow","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"tpc":0,"def":function (value) { return value.value.low; },"rt":$n[0].Int32,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"GetView","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"getView","rt":$n[0].Object,"p":[$n[0].Int64]},{"a":1,"n":"GetViewBytes","is":true,"t":8,"pi":[{"n":"view","pt":$n[0].Object,"ps":0},{"n":"count","dv":-1,"o":true,"pt":$n[0].Int32,"ps":1},{"n":"startIndex","dv":0,"o":true,"pt":$n[0].Int32,"ps":2}],"sn":"getViewBytes","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Object,$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Int32BitsToSingle","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"int32BitsToSingle","rt":$n[0].Single,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Int64BitsToDouble","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"int64BitsToDouble","rt":$n[0].Double,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":1,"n":"SetViewBytes","is":true,"t":8,"pi":[{"n":"view","pt":$n[0].Object,"ps":0},{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":1},{"n":"count","dv":-1,"o":true,"pt":$n[0].Int32,"ps":2},{"n":"startIndex","dv":0,"o":true,"pt":$n[0].Int32,"ps":3}],"sn":"setViewBytes","rt":$n[0].Void,"p":[$n[0].Object,$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"a":2,"n":"SingleToInt32Bits","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"sn":"singleToInt32Bits","rt":$n[0].Int32,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"ToBoolean","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"sn":"toBoolean","rt":$n[0].Boolean,"p":[$n[0].Array.type(System.Byte),$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"ToChar","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"sn":"toChar","rt":$n[0].Char,"p":[$n[0].Array.type(System.Byte),$n[0].Int32],"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":2,"n":"ToDouble","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"sn":"toDouble","rt":$n[0].Double,"p":[$n[0].Array.type(System.Byte),$n[0].Int32],"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":2,"n":"ToInt16","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"sn":"toInt16","rt":$n[0].Int16,"p":[$n[0].Array.type(System.Byte),$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int16);}},{"a":2,"n":"ToInt32","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"sn":"toInt32","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Byte),$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"ToInt64","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"sn":"toInt64","rt":$n[0].Int64,"p":[$n[0].Array.type(System.Byte),$n[0].Int32]},{"a":2,"n":"ToSingle","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"sn":"toSingle","rt":$n[0].Single,"p":[$n[0].Array.type(System.Byte),$n[0].Int32],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"ToString","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].Array.type(System.Byte)]},{"a":2,"n":"ToString","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"sn":"toString$1","rt":$n[0].String,"p":[$n[0].Array.type(System.Byte),$n[0].Int32]},{"a":2,"n":"ToString","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"length","pt":$n[0].Int32,"ps":2}],"sn":"toString$2","rt":$n[0].String,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"a":2,"n":"ToUInt16","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"sn":"toUInt16","rt":$n[0].UInt16,"p":[$n[0].Array.type(System.Byte),$n[0].Int32],"box":function ($v) { return H5.box($v, System.UInt16);}},{"a":2,"n":"ToUInt32","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"sn":"toUInt32","rt":$n[0].UInt32,"p":[$n[0].Array.type(System.Byte),$n[0].Int32],"box":function ($v) { return H5.box($v, System.UInt32);}},{"a":2,"n":"ToUInt64","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"sn":"toUInt64","rt":$n[0].UInt64,"p":[$n[0].Array.type(System.Byte),$n[0].Int32]},{"a":1,"n":"View","is":true,"t":8,"pi":[{"n":"length","pt":$n[0].Int32,"ps":0}],"sn":"view","rt":$n[0].Object,"p":[$n[0].Int32]},{"a":1,"n":"Arg_ArrayPlusOffTooSmall","is":true,"t":4,"rt":$n[0].String,"sn":"arg_ArrayPlusOffTooSmall"},{"a":2,"n":"IsLittleEndian","is":true,"t":4,"rt":$n[0].Boolean,"sn":"isLittleEndian","ro":true,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.Boolean", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":1,"n":".ctor","t":1,"p":[System.Object],"pi":[{"n":"_","pt":System.Object,"ps":0}],"def":function (_) { return false; }},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].Boolean,"ps":0}],"tpc":0,"def":function (other) { return H5.compare(this, other); },"rt":$n[0].Int32,"p":[$n[0].Boolean],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (obj) { return H5.compare(this, other); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Boolean,"ps":0}],"tpc":0,"def":function (other) { return this === other; },"rt":$n[0].Boolean,"p":[$n[0].Boolean],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (value) { return System.Boolean.parse(value); },"rt":$n[0].Boolean,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"ToString","t":8,"tpc":0,"def":function () { return System.Boolean.toString(this); },"rt":$n[0].String},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].Boolean,"ps":1}],"tpc":0,"def":function (value, result) { return System.Boolean.tryParse(value, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Boolean],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":4,"n":"False","is":true,"t":4,"rt":$n[0].Int32,"sn":"False","box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"FalseString","is":true,"t":4,"rt":$n[0].String,"sn":"falseString","ro":true},{"a":4,"n":"True","is":true,"t":4,"rt":$n[0].Int32,"sn":"True","box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"TrueString","is":true,"t":4,"rt":$n[0].String,"sn":"trueString","ro":true}]}; }, $n); - $m("System.Byte", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"def":function () { return Number; }},{"a":1,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"def":function (i) { return Number; }},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].Byte,"ps":0}],"tpc":0,"def":function (other) { return H5.compare(this, other); },"rt":$n[0].Int32,"p":[$n[0].Byte],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (obj) { return H5.compare(this, obj); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Byte,"ps":0}],"tpc":0,"def":function (other) { return this === other; },"rt":$n[0].Boolean,"p":[$n[0].Byte],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (other) { return System.Byte.equals(this, other); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.Byte.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.Byte.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (s) { return System.Byte.parse(s); },"rt":$n[0].Byte,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Byte);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"radix","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, radix) { return System.Byte.parse(s, radix); },"rt":$n[0].Byte,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Byte);}},{"a":2,"n":"ToString","t":8,"pi":[{"n":"radix","pt":$n[0].Int32,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.Byte.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.Byte.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].Byte,"ps":1}],"tpc":0,"def":function (s, result) { return System.Byte.tryParse(s, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Byte],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].Byte,"ps":1},{"n":"radix","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (s, result, radix) { return System.Byte.tryParse(s, result, radix); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Byte,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].Byte,"sn":"MaxValue","box":function ($v) { return H5.box($v, System.Byte);}},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].Byte,"sn":"MinValue","box":function ($v) { return H5.box($v, System.Byte);}}]}; }, $n); - $m("System.Char", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"def":function () { return Number; }},{"a":1,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"def":function (i) { return Number; }},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (value) { return H5.compare(this, value); },"rt":$n[0].Int32,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (value) { return H5.compare(this, value); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (obj) { return this === obj; },"rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (obj) { return System.Char.equals(this, obj); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.Char.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.Char.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"ov":true,"a":2,"n":"GetHashCode","t":8,"tpc":0,"def":function () { return System.Char.getHashCode(this); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IsControl","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"sn":"isControl","rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsControl","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, index) { return System.Char.isControl((s).charCodeAt(index)); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsDigit","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"sn":"isDigit","rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsDigit","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, index) { return System.Char.isDigit((s).charCodeAt(index)); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsHighSurrogate","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"sn":"isHighSurrogate","rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsHighSurrogate","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, index) { return System.Char.isHighSurrogate((s).charCodeAt(index)); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsLetter","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"sn":"isLetter","rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsLetter","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, index) { return System.Char.isLetter((s).charCodeAt(index)); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsLetterOrDigit","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (c) { return (System.Char.isDigit(c) || System.Char.isLetter(c)); },"rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsLetterOrDigit","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, index) { return (System.Char.isDigit((s).charCodeAt(index)) || System.Char.isLetter((s).charCodeAt(index))); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsLowSurrogate","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"sn":"isLowSurrogate","rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsLowSurrogate","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, index) { return System.Char.isLowSurrogate((s).charCodeAt(index)); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsLower","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (s) { return H5.isLower(s); },"rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsNumber","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"sn":"isNumber","rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsNumber","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, index) { return System.Char.isNumber((s).charCodeAt(index)); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsPunctuation","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"sn":"isPunctuation","rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsPunctuation","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, index) { return System.Char.isPunctuation((s).charCodeAt(index)); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsSeparator","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"sn":"isSeparator","rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsSeparator","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, index) { return System.Char.isSeparator((s).charCodeAt(index)); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsSurrogate","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"sn":"isSurrogate","rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsSurrogate","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, index) { return System.Char.isSurrogate((s).charCodeAt(index)); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsSurrogatePair","is":true,"t":8,"pi":[{"n":"highSurrogate","pt":$n[0].Char,"ps":0},{"n":"lowSurrogate","pt":$n[0].Char,"ps":1}],"tpc":0,"def":function (highSurrogate, lowSurrogate) { return (System.Char.isHighSurrogate(highSurrogate) && System.Char.isLowSurrogate(lowSurrogate)); },"rt":$n[0].Boolean,"p":[$n[0].Char,$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsSurrogatePair","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, index) { return (System.Char.isHighSurrogate((s).charCodeAt(index)) && System.Char.isLowSurrogate((s).charCodeAt(index + 1))); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsSymbol","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"sn":"isSymbol","rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsSymbol","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, index) { return System.Char.isSymbol((s).charCodeAt(index)); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsUpper","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (s) { return H5.isUpper(s); },"rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsUpper","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"sn":"isUpper","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsWhiteSpace","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (c) { return System.Char.isWhiteSpace(String.fromCharCode(c)); },"rt":$n[0].Boolean,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsWhiteSpace","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, index) { return System.Char.isWhiteSpace((s).charAt(index)); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (s) { return System.Char.charCodeAt(s, 0); },"rt":$n[0].Char,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":2,"n":"ToLower","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (c) { return String.fromCharCode(c).toLowerCase().charCodeAt(0); },"rt":$n[0].Char,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"ov":true,"a":2,"n":"ToString","t":8,"tpc":0,"def":function () { return String.fromCharCode(this); },"rt":$n[0].String},{"a":2,"n":"ToString","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (c) { return String.fromCharCode(c); },"rt":$n[0].String,"p":[$n[0].Char]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.Char.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.Char.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"ToUpper","is":true,"t":8,"pi":[{"n":"c","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (c) { return String.fromCharCode(c).toUpperCase().charCodeAt(0); },"rt":$n[0].Char,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].Char,"sn":"MaxValue","box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].Char,"sn":"MinValue","box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}}]}; }, $n); - $m("System.Console", function () { return {"att":1048833,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Clear","is":true,"t":8,"sn":"Clear","rt":$n[0].Void},{"a":2,"n":"Log","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"Log","rt":$n[0].Void,"p":[$n[0].Object]},{"a":2,"n":"Read","is":true,"t":8,"tpc":0,"def":function () { return prompt(); },"rt":$n[0].String},{"a":2,"n":"ReadLine","is":true,"t":8,"tpc":0,"def":function () { return prompt(); },"rt":$n[0].String},{"a":2,"n":"ReadLine","is":true,"t":8,"pi":[{"n":"text","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (text) { return prompt(text); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ReadLine","is":true,"t":8,"pi":[{"n":"text","pt":$n[0].String,"ps":0},{"n":"value","pt":$n[0].String,"ps":1}],"tpc":0,"def":function (text, value) { return prompt(text, value); },"rt":$n[0].String,"p":[$n[0].String,$n[0].String]},{"a":1,"n":"TransformChars","is":true,"t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"all","pt":$n[0].Int32,"ps":1},{"n":"index","pt":$n[0].Int32,"ps":2},{"n":"count","pt":$n[0].Int32,"ps":3}],"sn":"TransformChars","rt":$n[0].String,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Boolean,"ps":0}],"tpc":0,"def":function (value) { return System.Console.Write(System.Boolean.toString(value)); },"rt":$n[0].Void,"p":[$n[0].Boolean]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (value) { return System.Console.Write(String.fromCharCode(value)); },"rt":$n[0].Void,"p":[$n[0].Char]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0}],"tpc":0,"def":function (buffer) { return System.Console.Write(System.Console.TransformChars(buffer, 1)); },"rt":$n[0].Void,"p":[$n[0].Array.type(System.Char)]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].DateTime,"ps":0}],"sn":"write","rt":$n[0].Void,"p":[$n[0].DateTime]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].DateTimeOffset,"ps":0}],"sn":"write$1","rt":$n[0].Void,"p":[$n[0].DateTimeOffset]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return System.Console.Write(value.toString("G")); },"rt":$n[0].Void,"p":[$n[0].Decimal]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (value) { return System.Console.Write(System.Double.format(value)); },"rt":$n[0].Void,"p":[$n[0].Double]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].Int64]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].Object]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].Single]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].String]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt32,"ps":0}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].UInt32]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].UInt64]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1}],"tpc":0,"def":function (format, arg0) { return System.Console.Write(System.String.format(format, arg0)); },"rt":$n[0].Void,"p":[$n[0].String,$n[0].Object]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg","ip":true,"pt":$n[0].Array.type(System.Object),"ps":1}],"tpc":0,"def":function (format, arg) { return System.Console.Write(System.String.format(format, arg)); },"rt":$n[0].Void,"p":[$n[0].String,$n[0].Array.type(System.Object)]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (buffer, index, count) { return System.Console.Write(System.Console.TransformChars(buffer, 0, index, count)); },"rt":$n[0].Void,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1},{"n":"arg1","pt":$n[0].Object,"ps":2}],"tpc":0,"def":function (format, arg0, arg1) { return System.Console.Write(System.String.format(format, arg0, arg1)); },"rt":$n[0].Void,"p":[$n[0].String,$n[0].Object,$n[0].Object]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1},{"n":"arg1","pt":$n[0].Object,"ps":2},{"n":"arg2","pt":$n[0].Object,"ps":3}],"tpc":0,"def":function (format, arg0, arg1, arg2) { return System.Console.Write(System.String.format(format, arg0, arg1, arg2)); },"rt":$n[0].Void,"p":[$n[0].String,$n[0].Object,$n[0].Object,$n[0].Object]},{"a":2,"n":"Write","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1},{"n":"arg1","pt":$n[0].Object,"ps":2},{"n":"arg2","pt":$n[0].Object,"ps":3},{"n":"arg3","pt":$n[0].Object,"ps":4}],"tpc":0,"def":function (format, arg0, arg1, arg2, arg3) { return System.Console.Write(System.String.format(format, [arg0, arg1, arg2, arg3])); },"rt":$n[0].Void,"p":[$n[0].String,$n[0].Object,$n[0].Object,$n[0].Object,$n[0].Object]},{"a":2,"n":"WriteLine","is":true,"t":8,"sn":"WriteLine","rt":$n[0].Void},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Boolean,"ps":0}],"tpc":0,"def":function (value) { return System.Console.WriteLine(System.Boolean.toString(value)); },"rt":$n[0].Void,"p":[$n[0].Boolean]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (value) { return System.Console.WriteLine(String.fromCharCode(value)); },"rt":$n[0].Void,"p":[$n[0].Char]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0}],"tpc":0,"def":function (buffer) { return System.Console.WriteLine(System.Console.TransformChars(buffer, 1)); },"rt":$n[0].Void,"p":[$n[0].Array.type(System.Char)]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].DateTime,"ps":0}],"sn":"writeLine","rt":$n[0].Void,"p":[$n[0].DateTime]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].DateTimeOffset,"ps":0}],"sn":"writeLine$1","rt":$n[0].Void,"p":[$n[0].DateTimeOffset]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return System.Console.WriteLine(value.toString("G")); },"rt":$n[0].Void,"p":[$n[0].Decimal]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (value) { return System.Console.WriteLine(System.Double.format(value)); },"rt":$n[0].Void,"p":[$n[0].Double]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"WriteLine","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"tpc":0,"def":function (value) { return System.Console.WriteLine(value.toString()); },"rt":$n[0].Void,"p":[$n[0].Int64]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Nullable$1(System.Decimal),"ps":0}],"tpc":0,"def":function (value) { return System.Console.WriteLine(value && value.toString("G")); },"rt":$n[0].Void,"p":[$n[0].Nullable$1(System.Decimal)]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"WriteLine","rt":$n[0].Void,"p":[$n[0].Object]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (value) { return System.Console.WriteLine(System.Single.format(value)); },"rt":$n[0].Void,"p":[$n[0].Single]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"WriteLine","rt":$n[0].Void,"p":[$n[0].String]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Type,"ps":0}],"tpc":0,"def":function (value) { return System.Console.WriteLine(H5.getTypeName(value)); },"rt":$n[0].Void,"p":[$n[0].Type]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt32,"ps":0}],"sn":"WriteLine","rt":$n[0].Void,"p":[$n[0].UInt32]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"tpc":0,"def":function (value) { return System.Console.WriteLine(value.toString()); },"rt":$n[0].Void,"p":[$n[0].UInt64]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1}],"tpc":0,"def":function (format, arg0) { return System.Console.WriteLine(System.String.format(format, arg0)); },"rt":$n[0].Void,"p":[$n[0].String,$n[0].Object]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg","ip":true,"pt":$n[0].Array.type(System.Object),"ps":1}],"tpc":0,"def":function (format, arg) { return System.Console.WriteLine(System.String.format(format, arg)); },"rt":$n[0].Void,"p":[$n[0].String,$n[0].Array.type(System.Object)]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (buffer, index, count) { return System.Console.WriteLine(System.Console.TransformChars(buffer, 0, index, count)); },"rt":$n[0].Void,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1},{"n":"arg1","pt":$n[0].Object,"ps":2}],"tpc":0,"def":function (format, arg0, arg1) { return System.Console.WriteLine(System.String.format(format, arg0, arg1)); },"rt":$n[0].Void,"p":[$n[0].String,$n[0].Object,$n[0].Object]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1},{"n":"arg1","pt":$n[0].Object,"ps":2},{"n":"arg2","pt":$n[0].Object,"ps":3}],"tpc":0,"def":function (format, arg0, arg1, arg2) { return System.Console.WriteLine(System.String.format(format, arg0, arg1, arg2)); },"rt":$n[0].Void,"p":[$n[0].String,$n[0].Object,$n[0].Object,$n[0].Object]},{"a":2,"n":"WriteLine","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1},{"n":"arg1","pt":$n[0].Object,"ps":2},{"n":"arg2","pt":$n[0].Object,"ps":3},{"n":"arg3","pt":$n[0].Object,"ps":4}],"tpc":0,"def":function (format, arg0, arg1, arg2, arg3) { return System.Console.WriteLine(System.String.format(format, [arg0, arg1, arg2, arg3])); },"rt":$n[0].Void,"p":[$n[0].String,$n[0].Object,$n[0].Object,$n[0].Object,$n[0].Object]}]}; }, $n); - $m("System.ConsoleColor", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Black","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"Black","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"Blue","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"Blue","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"Cyan","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"Cyan","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"DarkBlue","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"DarkBlue","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"DarkCyan","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"DarkCyan","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"DarkGray","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"DarkGray","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"DarkGreen","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"DarkGreen","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"DarkMagenta","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"DarkMagenta","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"DarkRed","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"DarkRed","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"DarkYellow","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"DarkYellow","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"Gray","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"Gray","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"Green","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"Green","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"Magenta","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"Magenta","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"Red","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"Red","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"White","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"White","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}},{"a":2,"n":"Yellow","is":true,"t":4,"rt":$n[0].ConsoleColor,"sn":"Yellow","box":function ($v) { return H5.box($v, System.ConsoleColor, System.Enum.toStringFn(System.ConsoleColor));}}]}; }, $n); - $m("System.DateTime", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int64],"pi":[{"n":"ticks","pt":$n[0].Int64,"ps":0}],"def":function (ticks) { return System.DateTime.create$2(ticks); }},{"a":1,"n":".ctor","t":1,"p":[System.Object],"pi":[{"n":"_","pt":System.Object,"ps":0}],"def":function (_) { return System.DateTime.getDefaultValue(); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int64,$n[0].DateTimeKind],"pi":[{"n":"ticks","pt":$n[0].Int64,"ps":0},{"n":"kind","pt":$n[0].DateTimeKind,"ps":1}],"def":function (ticks, kind) { return System.DateTime.create$2(ticks, kind); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32],"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2}],"def":function (year, month, day) { return System.DateTime.create(year, month, day); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2},{"n":"hour","pt":$n[0].Int32,"ps":3},{"n":"minute","pt":$n[0].Int32,"ps":4},{"n":"second","pt":$n[0].Int32,"ps":5}],"def":function (year, month, day, hour, minute, second) { return System.DateTime.create(year, month, day, hour, minute, second); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].DateTimeKind],"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2},{"n":"hour","pt":$n[0].Int32,"ps":3},{"n":"minute","pt":$n[0].Int32,"ps":4},{"n":"second","pt":$n[0].Int32,"ps":5},{"n":"kind","pt":$n[0].DateTimeKind,"ps":6}],"def":function (year, month, day, hour, minute, second, kind) { return System.DateTime.create(year, month, day, hour, minute, second, 0, kind); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2},{"n":"hour","pt":$n[0].Int32,"ps":3},{"n":"minute","pt":$n[0].Int32,"ps":4},{"n":"second","pt":$n[0].Int32,"ps":5},{"n":"millisecond","pt":$n[0].Int32,"ps":6}],"def":function (year, month, day, hour, minute, second, millisecond) { return System.DateTime.create(year, month, day, hour, minute, second, millisecond); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].DateTimeKind],"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2},{"n":"hour","pt":$n[0].Int32,"ps":3},{"n":"minute","pt":$n[0].Int32,"ps":4},{"n":"second","pt":$n[0].Int32,"ps":5},{"n":"millisecond","pt":$n[0].Int32,"ps":6},{"n":"kind","pt":$n[0].DateTimeKind,"ps":7}],"def":function (year, month, day, hour, minute, second, millisecond, kind) { return System.DateTime.create(year, month, day, hour, minute, second, millisecond, kind); }},{"a":2,"n":"Add","t":8,"pi":[{"n":"value","pt":$n[0].TimeSpan,"ps":0}],"tpc":0,"def":function (value) { return System.DateTime.add(this, value); },"rt":$n[0].DateTime,"p":[$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"AddDays","t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (value) { return System.DateTime.addDays(this, value); },"rt":$n[0].DateTime,"p":[$n[0].Double],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"AddHours","t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (value) { return System.DateTime.addHours(this, value); },"rt":$n[0].DateTime,"p":[$n[0].Double],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"AddMilliseconds","t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (value) { return System.DateTime.addMilliseconds(this, value); },"rt":$n[0].DateTime,"p":[$n[0].Double],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"AddMinutes","t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (value) { return System.DateTime.addMinutes(this, value); },"rt":$n[0].DateTime,"p":[$n[0].Double],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"AddMonths","t":8,"pi":[{"n":"months","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (months) { return System.DateTime.addMonths(this, months); },"rt":$n[0].DateTime,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"AddSeconds","t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (value) { return System.DateTime.addSeconds(this, value); },"rt":$n[0].DateTime,"p":[$n[0].Double],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"AddTicks","t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"tpc":0,"def":function (value) { return System.DateTime.addTicks(this, value); },"rt":$n[0].DateTime,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"AddYears","t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (value) { return System.DateTime.addYears(this, value); },"rt":$n[0].DateTime,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"Compare","is":true,"t":8,"pi":[{"n":"t1","pt":$n[0].DateTime,"ps":0},{"n":"t2","pt":$n[0].DateTime,"ps":1}],"tpc":0,"def":function (t1, t2) { return H5.compare(t1, t2); },"rt":$n[0].Int32,"p":[$n[0].DateTime,$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].DateTime,"ps":0}],"tpc":0,"def":function (other) { return H5.compare(this, other); },"rt":$n[0].Int32,"p":[$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (other) { return H5.compare(this, other); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"DaysInMonth","is":true,"t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (year, month) { return System.DateTime.getDaysInMonth(year, month); },"rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].DateTime,"ps":0}],"tpc":0,"def":function (other) { return H5.equalsT(this, other); },"rt":$n[0].Boolean,"p":[$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","is":true,"t":8,"pi":[{"n":"t1","pt":$n[0].DateTime,"ps":0},{"n":"t2","pt":$n[0].DateTime,"ps":1}],"tpc":0,"def":function (t1, t2) { return H5.equalsT(t1, t2); },"rt":$n[0].Boolean,"p":[$n[0].DateTime,$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"FromFileTime","is":true,"t":8,"pi":[{"n":"fileTime","pt":$n[0].Int64,"ps":0}],"tpc":0,"def":function (fileTime) { return System.DateTime.FromFileTime(fileTime); },"rt":$n[0].DateTime,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"FromFileTimeUtc","is":true,"t":8,"pi":[{"n":"fileTime","pt":$n[0].Int64,"ps":0}],"tpc":0,"def":function (fileTime) { return System.DateTime.FromFileTimeUtc(fileTime); },"rt":$n[0].DateTime,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"IsDaylightSavingTime","t":8,"tpc":0,"def":function () { return System.DateTime.isDaylightSavingTime(this); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsLeapYear","is":true,"t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (year) { return System.DateTime.getIsLeapYear(year); },"rt":$n[0].Boolean,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (s) { return System.DateTime.parse(s); },"rt":$n[0].DateTime,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (s, provider) { return System.DateTime.parse(s, provider); },"rt":$n[0].DateTime,"p":[$n[0].String,$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"ParseExact","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"format","pt":$n[0].String,"ps":1},{"n":"provider","pt":$n[0].IFormatProvider,"ps":2}],"tpc":0,"def":function (s, format, provider) { return System.DateTime.parseExact(s, format, provider); },"rt":$n[0].DateTime,"p":[$n[0].String,$n[0].String,$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"SpecifyKind","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].DateTime,"ps":0},{"n":"kind","pt":$n[0].DateTimeKind,"ps":1}],"tpc":0,"def":function (value, kind) { return System.DateTime.specifyKind(value, kind); },"rt":$n[0].DateTime,"p":[$n[0].DateTime,$n[0].DateTimeKind],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"Subtract","t":8,"pi":[{"n":"value","pt":$n[0].DateTime,"ps":0}],"tpc":0,"def":function (value) { return System.DateTime.subdd(this, value); },"rt":$n[0].TimeSpan,"p":[$n[0].DateTime]},{"a":2,"n":"Subtract","t":8,"pi":[{"n":"value","pt":$n[0].TimeSpan,"ps":0}],"tpc":0,"def":function (value) { return System.DateTime.subtract(this, value); },"rt":$n[0].DateTime,"p":[$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"ToFileTime","t":8,"tpc":0,"def":function () { return System.DateTime.ToFileTime(this); },"rt":$n[0].Int64},{"a":2,"n":"ToFileTimeUtc","t":8,"tpc":0,"def":function () { return System.DateTime.ToFileTimeUtc(this); },"rt":$n[0].Int64},{"a":2,"n":"ToLocalTime","t":8,"tpc":0,"def":function () { return System.DateTime.toLocalTime(this); },"rt":$n[0].DateTime,"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"ToLocalTime","t":8,"pi":[{"n":"throwOnOverflow","pt":$n[0].Boolean,"ps":0}],"tpc":0,"def":function (throwOnOverflow) { return System.DateTime.toLocalTime(this, throwOnOverflow); },"rt":$n[0].DateTime,"p":[$n[0].Boolean],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"ToShortDateString","t":8,"tpc":0,"def":function () { return System.DateTime.format(this, "d"); },"rt":$n[0].String},{"a":2,"n":"ToShortTimeString","t":8,"tpc":0,"def":function () { return System.DateTime.format(this, "t"); },"rt":$n[0].String},{"ov":true,"a":2,"n":"ToString","t":8,"tpc":0,"def":function () { return System.DateTime.format(this); },"rt":$n[0].String},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.DateTime.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.DateTime.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"ToUniversalTime","t":8,"tpc":0,"def":function () { return System.DateTime.toUniversalTime(this); },"rt":$n[0].DateTime,"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].DateTime,"ps":1}],"tpc":0,"def":function (s, result) { return System.DateTime.tryParse(s, null, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParseExact","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"format","pt":$n[0].String,"ps":1},{"n":"provider","pt":$n[0].IFormatProvider,"ps":2},{"n":"result","out":true,"pt":$n[0].DateTime,"ps":3}],"tpc":0,"def":function (s, format, provider, result) { return System.DateTime.tryParseExact(s, format, provider, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String,$n[0].IFormatProvider,$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Addition","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].DateTime,"ps":0},{"n":"t","pt":$n[0].TimeSpan,"ps":1}],"tpc":0,"def":function (d, t) { return System.DateTime.adddt(d, t); },"rt":$n[0].DateTime,"p":[$n[0].DateTime,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"op_Equality","is":true,"t":8,"pi":[{"n":"a","pt":$n[0].DateTime,"ps":0},{"n":"b","pt":$n[0].DateTime,"ps":1}],"tpc":0,"def":function (a, b) { return H5.equals(a, b); },"rt":$n[0].Boolean,"p":[$n[0].DateTime,$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_GreaterThan","is":true,"t":8,"pi":[{"n":"a","pt":$n[0].DateTime,"ps":0},{"n":"b","pt":$n[0].DateTime,"ps":1}],"tpc":0,"def":function (a, b) { return System.DateTime.gt(a, b); },"rt":$n[0].Boolean,"p":[$n[0].DateTime,$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_GreaterThanOrEqual","is":true,"t":8,"pi":[{"n":"a","pt":$n[0].DateTime,"ps":0},{"n":"b","pt":$n[0].DateTime,"ps":1}],"tpc":0,"def":function (a, b) { return System.DateTime.gte(a, b); },"rt":$n[0].Boolean,"p":[$n[0].DateTime,$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Inequality","is":true,"t":8,"pi":[{"n":"a","pt":$n[0].DateTime,"ps":0},{"n":"b","pt":$n[0].DateTime,"ps":1}],"tpc":0,"def":function (a, b) { return !H5.equals(a, b); },"rt":$n[0].Boolean,"p":[$n[0].DateTime,$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_LessThan","is":true,"t":8,"pi":[{"n":"a","pt":$n[0].DateTime,"ps":0},{"n":"b","pt":$n[0].DateTime,"ps":1}],"tpc":0,"def":function (a, b) { return System.DateTime.lt(a, b); },"rt":$n[0].Boolean,"p":[$n[0].DateTime,$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_LessThanOrEqual","is":true,"t":8,"pi":[{"n":"a","pt":$n[0].DateTime,"ps":0},{"n":"b","pt":$n[0].DateTime,"ps":1}],"tpc":0,"def":function (a, b) { return System.DateTime.lte(a, b); },"rt":$n[0].Boolean,"p":[$n[0].DateTime,$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Subtraction","is":true,"t":8,"pi":[{"n":"a","pt":$n[0].DateTime,"ps":0},{"n":"b","pt":$n[0].DateTime,"ps":1}],"tpc":0,"def":function (a, b) { return System.DateTime.subdd(a, b); },"rt":$n[0].TimeSpan,"p":[$n[0].DateTime,$n[0].DateTime]},{"a":2,"n":"op_Subtraction","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].DateTime,"ps":0},{"n":"t","pt":$n[0].TimeSpan,"ps":1}],"tpc":0,"def":function (d, t) { return System.DateTime.subdt(d, t); },"rt":$n[0].DateTime,"p":[$n[0].DateTime,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"Date","t":16,"rt":$n[0].DateTime,"g":{"a":2,"n":"get_Date","t":8,"tpc":0,"def":function () { return System.DateTime.getDate(this); },"rt":$n[0].DateTime,"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}}},{"a":2,"n":"Day","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Day","t":8,"tpc":0,"def":function () { return System.DateTime.getDay(this); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"DayOfWeek","t":16,"rt":$n[0].DayOfWeek,"g":{"a":2,"n":"get_DayOfWeek","t":8,"tpc":0,"def":function () { return System.DateTime.getDayOfWeek(this); },"rt":$n[0].DayOfWeek,"box":function ($v) { return H5.box($v, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek));}}},{"a":2,"n":"DayOfYear","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_DayOfYear","t":8,"tpc":0,"def":function () { return System.DateTime.getDayOfYear(this); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Hour","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Hour","t":8,"tpc":0,"def":function () { return System.DateTime.getHour(this); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Kind","t":16,"rt":$n[0].DateTimeKind,"g":{"a":2,"n":"get_Kind","t":8,"tpc":0,"def":function () { return System.DateTime.getKind(this); },"rt":$n[0].DateTimeKind,"box":function ($v) { return H5.box($v, System.DateTimeKind, System.Enum.toStringFn(System.DateTimeKind));}}},{"a":2,"n":"Millisecond","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Millisecond","t":8,"tpc":0,"def":function () { return System.DateTime.getMillisecond(this); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Minute","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Minute","t":8,"tpc":0,"def":function () { return System.DateTime.getMinute(this); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Month","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Month","t":8,"tpc":0,"def":function () { return System.DateTime.getMonth(this); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Now","is":true,"t":16,"rt":$n[0].DateTime,"g":{"a":2,"n":"get_Now","is":true,"t":8,"tpc":0,"def":function () { return System.DateTime.getNow(); },"rt":$n[0].DateTime,"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}}},{"a":2,"n":"Second","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Second","t":8,"tpc":0,"def":function () { return System.DateTime.getSecond(this); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Ticks","t":16,"rt":$n[0].Int64,"g":{"a":2,"n":"get_Ticks","t":8,"tpc":0,"def":function () { return System.DateTime.getTicks(this); },"rt":$n[0].Int64}},{"a":2,"n":"TimeOfDay","t":16,"rt":$n[0].TimeSpan,"g":{"a":2,"n":"get_TimeOfDay","t":8,"tpc":0,"def":function () { return System.DateTime.getTimeOfDay(this); },"rt":$n[0].TimeSpan}},{"a":2,"n":"Today","is":true,"t":16,"rt":$n[0].DateTime,"g":{"a":2,"n":"get_Today","is":true,"t":8,"tpc":0,"def":function () { return System.DateTime.getToday(); },"rt":$n[0].DateTime,"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}}},{"a":2,"n":"UtcNow","is":true,"t":16,"rt":$n[0].DateTime,"g":{"a":2,"n":"get_UtcNow","is":true,"t":8,"tpc":0,"def":function () { return System.DateTime.getUtcNow(); },"rt":$n[0].DateTime,"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}}},{"a":2,"n":"Year","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Year","t":8,"tpc":0,"def":function () { return System.DateTime.getYear(this); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":4,"n":"DaysTo1970","is":true,"t":4,"rt":$n[0].Int32,"sn":"DaysTo1970","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"MaxTicks","is":true,"t":4,"rt":$n[0].Int64,"sn":"MaxTicks"},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].DateTime,"sn":"maxValue","ro":true,"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":4,"n":"MinTicks","is":true,"t":4,"rt":$n[0].Int64,"sn":"MinTicks"},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].DateTime,"sn":"minValue","ro":true,"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":1,"n":"TicksPerDay","is":true,"t":4,"rt":$n[0].Int64,"sn":"TicksPerDay"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].DateTime,"sn":"Date","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Day","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].DayOfWeek,"sn":"DayOfWeek","box":function ($v) { return H5.box($v, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek));}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"DayOfYear","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Hour","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].DateTimeKind,"sn":"Kind","box":function ($v) { return H5.box($v, System.DateTimeKind, System.Enum.toStringFn(System.DateTimeKind));}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Millisecond","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Minute","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Month","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].DateTime,"sn":"Now","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Second","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int64,"sn":"Ticks"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].TimeSpan,"sn":"TimeOfDay"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].DateTime,"sn":"Today","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].DateTime,"sn":"UtcNow","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Year","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.DayOfWeek", function () { return {"att":8449,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Friday","is":true,"t":4,"rt":$n[0].DayOfWeek,"sn":"Friday","box":function ($v) { return H5.box($v, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek));}},{"a":2,"n":"Monday","is":true,"t":4,"rt":$n[0].DayOfWeek,"sn":"Monday","box":function ($v) { return H5.box($v, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek));}},{"a":2,"n":"Saturday","is":true,"t":4,"rt":$n[0].DayOfWeek,"sn":"Saturday","box":function ($v) { return H5.box($v, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek));}},{"a":2,"n":"Sunday","is":true,"t":4,"rt":$n[0].DayOfWeek,"sn":"Sunday","box":function ($v) { return H5.box($v, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek));}},{"a":2,"n":"Thursday","is":true,"t":4,"rt":$n[0].DayOfWeek,"sn":"Thursday","box":function ($v) { return H5.box($v, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek));}},{"a":2,"n":"Tuesday","is":true,"t":4,"rt":$n[0].DayOfWeek,"sn":"Tuesday","box":function ($v) { return H5.box($v, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek));}},{"a":2,"n":"Wednesday","is":true,"t":4,"rt":$n[0].DayOfWeek,"sn":"Wednesday","box":function ($v) { return H5.box($v, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek));}}]}; }, $n); - $m("System.Decimal", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"def":function () { return System.Decimal; }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Double],"pi":[{"n":"d","pt":$n[0].Double,"ps":0}],"def":function (d) { return System.Decimal(d); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"def":function (i) { return System.Decimal(i); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int64],"pi":[{"n":"n","pt":$n[0].Int64,"ps":0}],"def":function (n) { return System.Decimal(n); }},{"a":1,"n":".ctor","t":1,"p":[System.Object],"pi":[{"n":"_","pt":System.Object,"ps":0}],"def":function (_) { return System.Decimal(0); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Single],"pi":[{"n":"f","pt":$n[0].Single,"ps":0}],"def":function (f) { return System.Decimal(f); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].UInt32],"pi":[{"n":"i","pt":$n[0].UInt32,"ps":0}],"def":function (i) { return System.Decimal(i); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].UInt64],"pi":[{"n":"n","pt":$n[0].UInt64,"ps":0}],"def":function (n) { return System.Decimal(n); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Boolean,$n[0].Byte],"pi":[{"n":"lo","pt":$n[0].Int32,"ps":0},{"n":"mid","pt":$n[0].Int32,"ps":1},{"n":"hi","pt":$n[0].Int32,"ps":2},{"n":"isNegative","pt":$n[0].Boolean,"ps":3},{"n":"scale","pt":$n[0].Byte,"ps":4}],"def":function (lo, mid, hi, isNegative, scale) { return System.Decimal; }},{"a":2,"n":"Abs","t":8,"sn":"abs","rt":$n[0].Decimal},{"a":2,"n":"Add","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.add(d2); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Decimal]},{"a":2,"n":"Ceiling","t":8,"sn":"ceil","rt":$n[0].Decimal},{"a":2,"n":"Ceiling","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (d) { return d.ceil(); },"rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"Compare","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.compareTo(d2); },"rt":$n[0].Int32,"p":[$n[0].Decimal,$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (other) { return this.compareTo(other); },"rt":$n[0].Int32,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (obj) { return this.compareTo(obj); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"ComparedTo","t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"sn":"comparedTo","rt":$n[0].Int32,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"DecimalPlaces","t":8,"sn":"decimalPlaces","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Divide","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.div(d2); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Decimal]},{"a":2,"n":"DividedToIntegerBy","t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"sn":"dividedToIntegerBy","rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Decimal,"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"o","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.equals(d2); },"rt":$n[0].Boolean,"p":[$n[0].Decimal,$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Exp","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (d) { return System.Decimal.exp(d); },"rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"Exponential","t":8,"sn":"exponential","rt":$n[0].Decimal},{"a":2,"n":"Floor","t":8,"sn":"floor","rt":$n[0].Decimal},{"a":2,"n":"Floor","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (d) { return d.floor(); },"rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return H5.Int.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return H5.Int.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":4,"n":"FromBytes","is":true,"t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0}],"tpc":0,"def":function (bytes) { return System.Decimal.fromBytes(bytes); },"rt":$n[0].Decimal,"p":[$n[0].Array.type(System.Byte)]},{"a":4,"n":"GetBytes","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return value.getBytes(); },"rt":$n[0].Array.type(System.Byte),"p":[$n[0].Decimal]},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IsFinite","t":8,"sn":"isFinite","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsInteger","t":8,"sn":"isInteger","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsNaN","t":8,"sn":"isNaN","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsNegative","t":8,"sn":"isNegative","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsZero","t":8,"sn":"isZero","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Ln","t":8,"sn":"ln","rt":$n[0].Decimal},{"a":2,"n":"Ln","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (d) { return System.Decimal.ln(d); },"rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"Log","t":8,"pi":[{"n":"logBase","pt":$n[0].Decimal,"ps":0}],"sn":"log","rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"Log","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0},{"n":"logBase","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d, logBase) { return System.Decimal.log(d, logBase); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Decimal]},{"a":2,"n":"Max","is":true,"t":8,"pi":[{"n":"values","ip":true,"pt":$n[0].Array.type(System.Decimal),"ps":0}],"sn":"max","rt":$n[0].Decimal,"p":[$n[0].Array.type(System.Decimal)]},{"a":2,"n":"Min","is":true,"t":8,"pi":[{"n":"values","ip":true,"pt":$n[0].Array.type(System.Decimal),"ps":0}],"sn":"min","rt":$n[0].Decimal,"p":[$n[0].Array.type(System.Decimal)]},{"a":2,"n":"Multiply","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.mul(d2); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Decimal]},{"a":2,"n":"Negate","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (d) { return System.Decimal(0).sub(d); },"rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (s) { return System.Decimal(s); },"rt":$n[0].Decimal,"p":[$n[0].String]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (s, provider) { return System.Decimal(s, provider); },"rt":$n[0].Decimal,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"Pow","t":8,"pi":[{"n":"n","pt":$n[0].Double,"ps":0}],"sn":"pow","rt":$n[0].Decimal,"p":[$n[0].Double]},{"a":2,"n":"Pow","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0},{"n":"exponent","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d, exponent) { return System.Decimal.pow(d, exponent); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Decimal]},{"a":2,"n":"Precision","t":8,"sn":"precision","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Random","is":true,"t":8,"pi":[{"n":"dp","pt":$n[0].Int32,"ps":0}],"sn":"random","rt":$n[0].Decimal,"p":[$n[0].Int32]},{"a":2,"n":"Remainder","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.mod(d2); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Decimal]},{"a":2,"n":"Round","t":8,"sn":"round","rt":$n[0].Decimal},{"a":2,"n":"Round","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (d) { return System.Decimal.round(d, 6); },"rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"Round","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0},{"n":"decimals","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (d, decimals) { return System.Decimal.toDecimalPlaces(d, decimals, 6); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Int32]},{"a":2,"n":"Round","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0},{"n":"mode","pt":Number,"ps":1}],"tpc":0,"def":function (d, mode) { return System.Decimal.round(d, mode); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,Number]},{"a":2,"n":"Round","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0},{"n":"decimals","pt":$n[0].Int32,"ps":1},{"n":"mode","pt":Number,"ps":2}],"tpc":0,"def":function (d, decimals, mode) { return System.Decimal.toDecimalPlaces(d, decimals, mode); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Int32,Number]},{"a":2,"n":"SetConfig","is":true,"t":8,"pi":[{"n":"config","pt":$n[0].Object,"ps":0}],"sn":"setConfig","rt":$n[0].Void,"p":[$n[0].Object]},{"a":2,"n":"Sqrt","t":8,"sn":"sqrt","rt":$n[0].Decimal},{"a":2,"n":"Sqrt","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (d) { return System.Decimal.sqrt(d); },"rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"Subtract","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.sub(d2); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Decimal]},{"a":2,"n":"ToByte","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return System.Decimal.toInt(value); },"rt":$n[0].Byte,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Byte);}},{"a":2,"n":"ToChar","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return System.Decimal.toInt(value); },"rt":$n[0].Char,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":2,"n":"ToDecimalPlaces","t":8,"pi":[{"n":"dp","pt":$n[0].Int32,"ps":0},{"n":"rm","pt":Number,"ps":1}],"sn":"toDecimalPlaces","rt":$n[0].Decimal,"p":[$n[0].Int32,Number]},{"a":2,"n":"ToDouble","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return System.Decimal.toFloat(value); },"rt":$n[0].Double,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":2,"n":"ToExponential","t":8,"pi":[{"n":"dp","pt":$n[0].Int32,"ps":0},{"n":"rm","pt":Number,"ps":1}],"sn":"toExponential","rt":$n[0].String,"p":[$n[0].Int32,Number]},{"a":2,"n":"ToFixed","t":8,"pi":[{"n":"dp","pt":$n[0].Int32,"ps":0},{"n":"rm","pt":Number,"ps":1}],"sn":"toFixed","rt":$n[0].String,"p":[$n[0].Int32,Number]},{"a":2,"n":"ToFormat","t":8,"sn":"toFormat","rt":$n[0].String},{"a":2,"n":"ToFormat","t":8,"pi":[{"n":"config","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (config) { return this.toFormat(null, null,config); },"rt":$n[0].String,"p":[$n[0].Object]},{"a":2,"n":"ToFormat","t":8,"pi":[{"n":"dp","pt":$n[0].Int32,"ps":0}],"sn":"toFormat","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToFormat","t":8,"pi":[{"n":"dp","pt":$n[0].Int32,"ps":0},{"n":"rm","pt":Number,"ps":1}],"sn":"toFormat","rt":$n[0].String,"p":[$n[0].Int32,Number]},{"a":2,"n":"ToFormat","t":8,"pi":[{"n":"dp","pt":$n[0].Int32,"ps":0},{"n":"rm","pt":Number,"ps":1},{"n":"config","pt":$n[0].Object,"ps":2}],"sn":"toFormat","rt":$n[0].String,"p":[$n[0].Int32,Number,$n[0].Object]},{"a":2,"n":"ToFormat","t":8,"pi":[{"n":"dp","pt":$n[0].Int32,"ps":0},{"n":"rm","pt":Number,"ps":1},{"n":"provider","pt":$n[0].IFormatProvider,"ps":2}],"sn":"toFormat","rt":$n[0].String,"p":[$n[0].Int32,Number,$n[0].IFormatProvider]},{"a":2,"n":"ToInt16","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return System.Decimal.toInt(value); },"rt":$n[0].Int16,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Int16);}},{"a":2,"n":"ToInt32","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return System.Decimal.toInt(value); },"rt":$n[0].Int32,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"ToInt64","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return System.Decimal.toInt(value, System.Int64); },"rt":$n[0].Int64,"p":[$n[0].Decimal]},{"a":2,"n":"ToPrecision","t":8,"pi":[{"n":"sd","pt":$n[0].Int32,"ps":0},{"n":"rm","pt":Number,"ps":1}],"sn":"toPrecision","rt":$n[0].String,"p":[$n[0].Int32,Number]},{"a":2,"n":"ToSByte","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return System.Decimal.toInt(value); },"rt":$n[0].SByte,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.SByte);}},{"a":2,"n":"ToSignificantDigits","t":8,"pi":[{"n":"sd","pt":$n[0].Int32,"ps":0},{"n":"rm","pt":Number,"ps":1}],"sn":"toSignificantDigits","rt":$n[0].Decimal,"p":[$n[0].Int32,Number]},{"a":2,"n":"ToSingle","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return System.Decimal.toFloat(value); },"rt":$n[0].Single,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":2,"n":"ToString","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"tpc":0,"def":function (provider) { return H5.Int.format(this, "G", provider); },"rt":$n[0].String,"p":[$n[0].IFormatProvider]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return H5.Int.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return H5.Int.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"ToUInt16","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return System.Decimal.toInt(value); },"rt":$n[0].UInt16,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.UInt16);}},{"a":2,"n":"ToUInt32","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return System.Decimal.toInt(value); },"rt":$n[0].UInt32,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.UInt32);}},{"a":2,"n":"ToUInt64","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (value) { return System.Decimal.toInt(value, System.UInt64); },"rt":$n[0].UInt64,"p":[$n[0].Decimal]},{"a":2,"n":"Truncate","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (d) { return d.trunc(); },"rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (s, result) { return System.Decimal.tryParse(s, null, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1},{"n":"result","out":true,"pt":$n[0].Decimal,"ps":2}],"tpc":0,"def":function (s, provider, result) { return System.Decimal.tryParse(s, provider, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].IFormatProvider,$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Addition","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.add(d2); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Decimal]},{"a":2,"n":"op_Decrement","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (d) { return d.dec(); },"rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"op_Division","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.div(d2); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Decimal]},{"a":2,"n":"op_Equality","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.equalsT(d2); },"rt":$n[0].Boolean,"p":[$n[0].Decimal,$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"op_Explicit","rt":$n[0].Byte,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Byte);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"op_Explicit","rt":$n[0].Char,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"op_Explicit","rt":$n[0].Double,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"op_Explicit","rt":$n[0].Int16,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Int16);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"op_Explicit","rt":$n[0].Int32,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"op_Explicit","rt":$n[0].Int64,"p":[$n[0].Decimal]},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"op_Explicit","rt":$n[0].SByte,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.SByte);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"op_Explicit","rt":$n[0].Single,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"op_Explicit","rt":$n[0].UInt16,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.UInt16);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"op_Explicit","rt":$n[0].UInt32,"p":[$n[0].Decimal],"box":function ($v) { return H5.box($v, System.UInt32);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"op_Explicit","rt":$n[0].UInt64,"p":[$n[0].Decimal]},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"op_Explicit","rt":$n[0].Decimal,"p":[$n[0].Double]},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"sn":"op_Explicit","rt":$n[0].Decimal,"p":[$n[0].Single]},{"a":2,"n":"op_GreaterThan","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.gt(d2); },"rt":$n[0].Boolean,"p":[$n[0].Decimal,$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_GreaterThanOrEqual","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.gte(d2); },"rt":$n[0].Boolean,"p":[$n[0].Decimal,$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Byte,"ps":0}],"sn":"op_Implicit","rt":$n[0].Decimal,"p":[$n[0].Byte]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"sn":"op_Implicit","rt":$n[0].Decimal,"p":[$n[0].Char]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int16,"ps":0}],"sn":"op_Implicit","rt":$n[0].Decimal,"p":[$n[0].Int16]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"op_Implicit","rt":$n[0].Decimal,"p":[$n[0].Int32]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"op_Implicit","rt":$n[0].Decimal,"p":[$n[0].Int64]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].SByte,"ps":0}],"sn":"op_Implicit","rt":$n[0].Decimal,"p":[$n[0].SByte]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt16,"ps":0}],"sn":"op_Implicit","rt":$n[0].Decimal,"p":[$n[0].UInt16]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt32,"ps":0}],"sn":"op_Implicit","rt":$n[0].Decimal,"p":[$n[0].UInt32]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"op_Implicit","rt":$n[0].Decimal,"p":[$n[0].UInt64]},{"a":2,"n":"op_Increment","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (d) { return d.inc(); },"rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"op_Inequality","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.ne(d2); },"rt":$n[0].Boolean,"p":[$n[0].Decimal,$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_LessThan","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.lt(d2); },"rt":$n[0].Boolean,"p":[$n[0].Decimal,$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_LessThanOrEqual","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.lte(d2); },"rt":$n[0].Boolean,"p":[$n[0].Decimal,$n[0].Decimal],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Modulus","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.mod(d2); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Decimal]},{"a":2,"n":"op_Multiply","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.mul(d2); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Decimal]},{"a":2,"n":"op_Subtraction","is":true,"t":8,"pi":[{"n":"d1","pt":$n[0].Decimal,"ps":0},{"n":"d2","pt":$n[0].Decimal,"ps":1}],"tpc":0,"def":function (d1, d2) { return d1.sub(d2); },"rt":$n[0].Decimal,"p":[$n[0].Decimal,$n[0].Decimal]},{"a":2,"n":"op_UnaryNegation","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (d) { return d.neg(); },"rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"op_UnaryPlus","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Decimal,"ps":0}],"tpc":0,"def":function (d) { return d.clone(); },"rt":$n[0].Decimal,"p":[$n[0].Decimal]},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].Decimal,"sn":"MaxValue"},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].Decimal,"sn":"MinValue"},{"a":2,"n":"MinusOne","is":true,"t":4,"rt":$n[0].Decimal,"sn":"MinusOne"},{"a":2,"n":"One","is":true,"t":4,"rt":$n[0].Decimal,"sn":"One"},{"a":2,"n":"Zero","is":true,"t":4,"rt":$n[0].Decimal,"sn":"Zero"}]}; }, $n); - $m("System.Double", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"def":function () { return Number; }},{"a":1,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"def":function (i) { return Number; }},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (other) { return H5.compare(this, other); },"rt":$n[0].Int32,"p":[$n[0].Double],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (obj) { return H5.compare(this, obj); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (other) { return this === other; },"rt":$n[0].Boolean,"p":[$n[0].Double],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (other) { return System.Double.equals(this, other); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.Double.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.Double.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"ov":true,"a":2,"n":"GetHashCode","t":8,"tpc":0,"def":function () { return System.Double.getHashCode(this); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IsFinite","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (d) { return isFinite(d); },"rt":$n[0].Boolean,"p":[$n[0].Double],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsInfinity","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (d) { return (Math.abs(d) === Number.POSITIVE_INFINITY); },"rt":$n[0].Boolean,"p":[$n[0].Double],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsNaN","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (d) { return isNaN(d); },"rt":$n[0].Boolean,"p":[$n[0].Double],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsNegativeInfinity","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (d) { return (d === Number.NEGATIVE_INFINITY); },"rt":$n[0].Boolean,"p":[$n[0].Double],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsPositiveInfinity","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Double,"ps":0}],"tpc":0,"def":function (d) { return (d === Number.POSITIVE_INFINITY); },"rt":$n[0].Boolean,"p":[$n[0].Double],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (s) { return System.Double.parse(s); },"rt":$n[0].Double,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (s, provider) { return H5.Int.parseFloat(s, provider); },"rt":$n[0].Double,"p":[$n[0].String,$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":2,"n":"ToExponential","t":8,"sn":"toExponential","rt":$n[0].String},{"a":2,"n":"ToExponential","t":8,"pi":[{"n":"fractionDigits","pt":$n[0].Int32,"ps":0}],"sn":"toExponential","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToFixed","t":8,"sn":"toFixed","rt":$n[0].String},{"a":2,"n":"ToFixed","t":8,"pi":[{"n":"fractionDigits","pt":$n[0].Int32,"ps":0}],"sn":"toFixed","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToPrecision","t":8,"sn":"toPrecision","rt":$n[0].String},{"a":2,"n":"ToPrecision","t":8,"pi":[{"n":"precision","pt":$n[0].Int32,"ps":0}],"sn":"toPrecision","rt":$n[0].String,"p":[$n[0].Int32]},{"ov":true,"a":2,"n":"ToString","t":8,"tpc":0,"def":function () { return System.Double.format(this); },"rt":$n[0].String},{"a":2,"n":"ToString","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"tpc":0,"def":function (provider) { return System.Double.format(this, "G", provider); },"rt":$n[0].String,"p":[$n[0].IFormatProvider]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"radix","pt":$n[0].Int32,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.Double.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.Double.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].Double,"ps":1}],"tpc":0,"def":function (s, result) { return System.Double.tryParse(s, null, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Double],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1},{"n":"result","out":true,"pt":$n[0].Double,"ps":2}],"tpc":0,"def":function (s, provider, result) { return System.Double.tryParse(s, provider, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].IFormatProvider,$n[0].Double],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Epsilon","is":true,"t":4,"rt":$n[0].Double,"sn":"Epsilon","box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].Double,"sn":"MaxValue","box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].Double,"sn":"MinValue","box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":2,"n":"NaN","is":true,"t":4,"rt":$n[0].Double,"sn":"NaN","box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":2,"n":"NegativeInfinity","is":true,"t":4,"rt":$n[0].Double,"sn":"NegativeInfinity","box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":2,"n":"PositiveInfinity","is":true,"t":4,"rt":$n[0].Double,"sn":"PositiveInfinity","box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}}]}; }, $n); - $m("System.Enum", function () { return {"att":1048705,"a":2,"m":[{"a":3,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"target","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (target) { return H5.compare(this, target); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (other) { return System.Enum.equals(this, other, H5.getType(this)); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","is":true,"t":8,"pi":[{"n":"enumType","pt":$n[0].Type,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1},{"n":"format","pt":$n[0].String,"ps":2}],"sn":"format","rt":$n[0].String,"p":[$n[0].Type,$n[0].Object,$n[0].String]},{"a":2,"n":"GetName","is":true,"t":8,"pi":[{"n":"enumType","pt":$n[0].Type,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"getName","rt":$n[0].String,"p":[$n[0].Type,$n[0].Object]},{"a":2,"n":"GetNames","is":true,"t":8,"tpc":1,"def":function (TEnum) { return System.Enum.getNames(TEnum); },"rt":$n[0].Array.type(System.String)},{"a":2,"n":"GetNames","is":true,"t":8,"pi":[{"n":"enumType","pt":$n[0].Type,"ps":0}],"sn":"getNames","rt":$n[0].Array.type(System.String),"p":[$n[0].Type]},{"a":2,"n":"GetValues","is":true,"t":8,"tpc":1,"def":function (TEnum) { return System.Enum.getValues(TEnum); },"rt":System.Array.type(System.Object)},{"a":2,"n":"GetValues","is":true,"t":8,"pi":[{"n":"enumType","pt":$n[0].Type,"ps":0}],"sn":"getValues","rt":Array,"p":[$n[0].Type]},{"a":2,"n":"HasFlag","t":8,"pi":[{"n":"flag","pt":$n[0].Enum,"ps":0}],"tpc":0,"def":function (flag) { return System.Enum.hasFlag(this, flag); },"rt":$n[0].Boolean,"p":[$n[0].Enum],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsDefined","is":true,"t":8,"pi":[{"n":"value","pt":System.Object,"ps":0}],"tpc":1,"def":function (TEnum, value) { return System.Enum.isDefined(TEnum, value); },"rt":$n[0].Boolean,"p":[System.Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsDefined","is":true,"t":8,"pi":[{"n":"enumType","pt":$n[0].Type,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"isDefined","rt":$n[0].Boolean,"p":[$n[0].Type,$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"tpc":1,"def":function (TEnum, value) { return System.Enum.parse(TEnum, value, result); },"rt":System.Object,"p":[$n[0].String]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"ignoreCase","pt":$n[0].Boolean,"ps":1}],"tpc":1,"def":function (TEnum, value, ignoreCase) { return System.Enum.parse(TEnum, value, result); },"rt":System.Object,"p":[$n[0].String,$n[0].Boolean]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"enumType","pt":$n[0].Type,"ps":0},{"n":"value","pt":$n[0].String,"ps":1}],"sn":"parse","rt":$n[0].Object,"p":[$n[0].Type,$n[0].String]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"enumType","pt":$n[0].Type,"ps":0},{"n":"value","pt":$n[0].String,"ps":1},{"n":"ignoreCase","pt":$n[0].Boolean,"ps":2}],"sn":"parse","rt":$n[0].Object,"p":[$n[0].Type,$n[0].String,$n[0].Boolean]},{"a":2,"n":"ToObject","is":true,"t":8,"pi":[{"n":"enumType","pt":$n[0].Type,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"tpc":0,"def":function (enumType, value) { return System.Enum.toObject(enumType, value); },"rt":$n[0].Object,"p":[$n[0].Type,$n[0].Object]},{"ov":true,"a":2,"n":"ToString","t":8,"tpc":0,"def":function () { return System.Enum.toString(H5.getType(this), this); },"rt":$n[0].String},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.Enum.format(H5.getType(this), this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, formatProvider) { return System.Enum.format(H5.getType(this), this, format); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"ToString","is":true,"t":8,"pi":[{"n":"enumType","pt":$n[0].Type,"ps":0},{"n":"value","pt":$n[0].Enum,"ps":1}],"sn":"toString","rt":$n[0].String,"p":[$n[0].Type,$n[0].Enum]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":System.Object,"ps":1}],"tpc":1,"def":function (TEnum, value, result) { return System.Enum.tryParse(TEnum, value, result); },"rt":$n[0].Boolean,"p":[$n[0].String,System.Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"ignoreCase","pt":$n[0].Boolean,"ps":1},{"n":"result","out":true,"pt":System.Object,"ps":2}],"tpc":1,"def":function (TEnum, value, ignoreCase, result) { return System.Enum.tryParse(TEnum, value, result, ignoreCase); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Boolean,System.Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.Environment", function () { return {"nested":[System.Object,System.Object],"att":385,"a":2,"s":true,"m":[{"n":".cctor","t":1,"sn":"ctor","sm":true},{"a":2,"n":"Exit","is":true,"t":8,"pi":[{"n":"exitCode","pt":$n[0].Int32,"ps":0}],"sn":"Exit","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":2,"n":"ExpandEnvironmentVariables","is":true,"t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0}],"sn":"ExpandEnvironmentVariables","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"FailFast","is":true,"t":8,"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"FailFast","rt":$n[0].Void,"p":[$n[0].String]},{"a":2,"n":"FailFast","is":true,"t":8,"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"exception","pt":$n[0].Exception,"ps":1}],"sn":"FailFast$1","rt":$n[0].Void,"p":[$n[0].String,$n[0].Exception]},{"a":2,"n":"GetCommandLineArgs","is":true,"t":8,"sn":"GetCommandLineArgs","rt":$n[0].Array.type(System.String)},{"a":2,"n":"GetEnvironmentVariable","is":true,"t":8,"pi":[{"n":"variable","pt":$n[0].String,"ps":0}],"sn":"GetEnvironmentVariable","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"GetEnvironmentVariable","is":true,"t":8,"pi":[{"n":"variable","pt":$n[0].String,"ps":0},{"n":"target","pt":$n[0].EnvironmentVariableTarget,"ps":1}],"sn":"GetEnvironmentVariable$1","rt":$n[0].String,"p":[$n[0].String,$n[0].EnvironmentVariableTarget]},{"a":2,"n":"GetEnvironmentVariables","is":true,"t":8,"sn":"GetEnvironmentVariables","rt":$n[6].IDictionary},{"a":2,"n":"GetEnvironmentVariables","is":true,"t":8,"pi":[{"n":"target","pt":$n[0].EnvironmentVariableTarget,"ps":0}],"sn":"GetEnvironmentVariables$1","rt":$n[6].IDictionary,"p":[$n[0].EnvironmentVariableTarget]},{"a":2,"n":"GetFolderPath","is":true,"t":8,"pi":[{"n":"folder","pt":System.Object,"ps":0}],"tpc":0,"def":function (folder) { return ""; },"rt":$n[0].String,"p":[System.Object]},{"a":2,"n":"GetFolderPath","is":true,"t":8,"pi":[{"n":"folder","pt":System.Object,"ps":0},{"n":"option","pt":System.Object,"ps":1}],"tpc":0,"def":function (folder, option) { return ""; },"rt":$n[0].String,"p":[System.Object,System.Object]},{"a":2,"n":"GetLogicalDrives","is":true,"t":8,"sn":"GetLogicalDrives","rt":$n[0].Array.type(System.String)},{"a":4,"n":"GetResourceString","is":true,"t":8,"pi":[{"n":"key","pt":$n[0].String,"ps":0}],"sn":"GetResourceString","rt":$n[0].String,"p":[$n[0].String]},{"a":4,"n":"GetResourceString","is":true,"t":8,"pi":[{"n":"key","pt":$n[0].String,"ps":0},{"n":"values","ip":true,"pt":$n[0].Array.type(System.Object),"ps":1}],"sn":"GetResourceString$1","rt":$n[0].String,"p":[$n[0].String,$n[0].Array.type(System.Object)]},{"a":1,"n":"PatchDictionary","is":true,"t":8,"pi":[{"n":"d","pt":$n[3].Dictionary$2(System.String,System.String),"ps":0}],"sn":"PatchDictionary","rt":$n[3].Dictionary$2(System.String,System.String),"p":[$n[3].Dictionary$2(System.String,System.String)]},{"a":2,"n":"SetEnvironmentVariable","is":true,"t":8,"pi":[{"n":"variable","pt":$n[0].String,"ps":0},{"n":"value","pt":$n[0].String,"ps":1}],"sn":"SetEnvironmentVariable","rt":$n[0].Void,"p":[$n[0].String,$n[0].String]},{"a":2,"n":"SetEnvironmentVariable","is":true,"t":8,"pi":[{"n":"variable","pt":$n[0].String,"ps":0},{"n":"value","pt":$n[0].String,"ps":1},{"n":"target","pt":$n[0].EnvironmentVariableTarget,"ps":2}],"sn":"SetEnvironmentVariable$1","rt":$n[0].Void,"p":[$n[0].String,$n[0].String,$n[0].EnvironmentVariableTarget]},{"a":2,"n":"CommandLine","is":true,"t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_CommandLine","t":8,"rt":$n[0].String,"fg":"CommandLine","is":true},"fn":"CommandLine"},{"a":2,"n":"CurrentDirectory","is":true,"t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_CurrentDirectory","t":8,"rt":$n[0].String,"fg":"CurrentDirectory","is":true},"s":{"a":2,"n":"set_CurrentDirectory","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"CurrentDirectory","is":true},"fn":"CurrentDirectory"},{"a":2,"n":"CurrentManagedThreadId","is":true,"t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_CurrentManagedThreadId","is":true,"t":8,"tpc":0,"def":function () { return 0; },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"ExitCode","is":true,"t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_ExitCode","t":8,"rt":$n[0].Int32,"fg":"ExitCode","is":true,"box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_ExitCode","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"ExitCode","is":true},"fn":"ExitCode"},{"a":1,"n":"Global","is":true,"t":16,"rt":System.Object,"g":{"a":1,"n":"get_Global","is":true,"t":8,"tpc":0,"def":function () { return H5.global; },"rt":System.Object}},{"a":2,"n":"HasShutdownStarted","is":true,"t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_HasShutdownStarted","is":true,"t":8,"tpc":0,"def":function () { return false; },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"Is64BitOperatingSystem","is":true,"t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Is64BitOperatingSystem","t":8,"rt":$n[0].Boolean,"fg":"Is64BitOperatingSystem","is":true,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"Is64BitOperatingSystem"},{"a":2,"n":"Is64BitProcess","is":true,"t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Is64BitProcess","is":true,"t":8,"tpc":0,"def":function () { return false; },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":1,"n":"Location","is":true,"t":16,"rt":System.Object,"g":{"a":1,"n":"get_Location","t":8,"rt":System.Object,"fg":"Location","is":true},"fn":"Location"},{"a":2,"n":"MachineName","is":true,"t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_MachineName","is":true,"t":8,"tpc":0,"def":function () { return ""; },"rt":$n[0].String}},{"a":2,"n":"NewLine","is":true,"t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_NewLine","is":true,"t":8,"tpc":0,"def":function () { return "\n"; },"rt":$n[0].String}},{"a":2,"n":"OSVersion","is":true,"t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_OSVersion","is":true,"t":8,"tpc":0,"def":function () { return null; },"rt":$n[0].Object}},{"a":2,"n":"ProcessorCount","is":true,"t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_ProcessorCount","t":8,"rt":$n[0].Int32,"fg":"ProcessorCount","is":true,"box":function ($v) { return H5.box($v, System.Int32);}},"fn":"ProcessorCount"},{"a":2,"n":"StackTrace","is":true,"t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_StackTrace","t":8,"rt":$n[0].String,"fg":"StackTrace","is":true},"fn":"StackTrace"},{"a":2,"n":"SystemDirectory","is":true,"t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_SystemDirectory","is":true,"t":8,"tpc":0,"def":function () { return ""; },"rt":$n[0].String}},{"a":2,"n":"SystemPageSize","is":true,"t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_SystemPageSize","is":true,"t":8,"tpc":0,"def":function () { return 1; },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"TickCount","is":true,"t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_TickCount","is":true,"t":8,"tpc":0,"def":function () { return Date.now(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"UserDomainName","is":true,"t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_UserDomainName","is":true,"t":8,"tpc":0,"def":function () { return ""; },"rt":$n[0].String}},{"a":2,"n":"UserInteractive","is":true,"t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_UserInteractive","is":true,"t":8,"tpc":0,"def":function () { return true; },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"UserName","is":true,"t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_UserName","is":true,"t":8,"tpc":0,"def":function () { return ""; },"rt":$n[0].String}},{"a":2,"n":"Version","is":true,"t":16,"rt":$n[0].Version,"g":{"a":2,"n":"get_Version","t":8,"rt":$n[0].Version,"fg":"Version","is":true},"fn":"Version"},{"a":2,"n":"WorkingSet","is":true,"t":16,"rt":$n[0].Int64,"g":{"a":2,"n":"get_WorkingSet","is":true,"t":8,"tpc":0,"def":function () { return System.Int64(0); },"rt":$n[0].Int64}},{"a":1,"n":"Variables","is":true,"t":4,"rt":$n[3].Dictionary$2(System.String,System.String),"sn":"Variables"},{"a":1,"n":"__Property__Initializer__ExitCode","is":true,"t":4,"rt":$n[0].Int32,"sn":"__Property__Initializer__ExitCode","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].Int32,"sn":"CurrentManagedThreadId","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].Int32,"sn":"ExitCode","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":System.Object,"sn":"Global"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].Boolean,"sn":"HasShutdownStarted","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].Boolean,"sn":"Is64BitProcess","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].String,"sn":"MachineName"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].String,"sn":"NewLine"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].Object,"sn":"OSVersion"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].String,"sn":"SystemDirectory"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].Int32,"sn":"SystemPageSize","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].Int32,"sn":"TickCount","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].String,"sn":"UserDomainName"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].Boolean,"sn":"UserInteractive","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].String,"sn":"UserName"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].Int64,"sn":"WorkingSet"}]}; }, $n); - $m("System.Exception", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"ctor"},{"v":true,"a":2,"n":"GetBaseException","t":8,"sn":"getBaseException","rt":$n[0].Exception},{"v":true,"a":2,"n":"Data","t":16,"rt":$n[3].IDictionary$2(System.Object,System.Object),"g":{"v":true,"a":2,"n":"get_Data","t":8,"rt":$n[3].IDictionary$2(System.Object,System.Object),"fg":"Data"},"fn":"Data"},{"a":2,"n":"HResult","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_HResult","t":8,"rt":$n[0].Int32,"fg":"HResult","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":3,"n":"set_HResult","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"HResult"},"fn":"HResult"},{"v":true,"a":2,"n":"InnerException","t":16,"rt":$n[0].Exception,"g":{"v":true,"a":2,"n":"get_InnerException","t":8,"rt":$n[0].Exception,"fg":"InnerException"},"fn":"InnerException"},{"v":true,"a":2,"n":"Message","t":16,"rt":$n[0].String,"g":{"v":true,"a":2,"n":"get_Message","t":8,"rt":$n[0].String,"fg":"Message"},"fn":"Message"},{"v":true,"a":2,"n":"StackTrace","t":16,"rt":$n[0].String,"g":{"v":true,"a":2,"n":"get_StackTrace","t":8,"rt":$n[0].String,"fg":"StackTrace"},"fn":"StackTrace"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[3].IDictionary$2(System.Object,System.Object),"sn":"Data"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"HResult","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Exception,"sn":"InnerException"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Message"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"StackTrace"}]}; }, $n); - $m("System.Guid", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Byte)],"pi":[{"n":"b","pt":$n[0].Array.type(System.Byte),"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"uuid","pt":$n[0].String,"ps":0}],"sn":"$ctor4"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int16,$n[0].Int16,$n[0].Array.type(System.Byte)],"pi":[{"n":"a","pt":$n[0].Int32,"ps":0},{"n":"b","pt":$n[0].Int16,"ps":1},{"n":"c","pt":$n[0].Int16,"ps":2},{"n":"d","pt":$n[0].Array.type(System.Byte),"ps":3}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int16,$n[0].Int16,$n[0].Byte,$n[0].Byte,$n[0].Byte,$n[0].Byte,$n[0].Byte,$n[0].Byte,$n[0].Byte,$n[0].Byte],"pi":[{"n":"a","pt":$n[0].Int32,"ps":0},{"n":"b","pt":$n[0].Int16,"ps":1},{"n":"c","pt":$n[0].Int16,"ps":2},{"n":"d","pt":$n[0].Byte,"ps":3},{"n":"e","pt":$n[0].Byte,"ps":4},{"n":"f","pt":$n[0].Byte,"ps":5},{"n":"g","pt":$n[0].Byte,"ps":6},{"n":"h","pt":$n[0].Byte,"ps":7},{"n":"i","pt":$n[0].Byte,"ps":8},{"n":"j","pt":$n[0].Byte,"ps":9},{"n":"k","pt":$n[0].Byte,"ps":10}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].UInt32,$n[0].UInt16,$n[0].UInt16,$n[0].Byte,$n[0].Byte,$n[0].Byte,$n[0].Byte,$n[0].Byte,$n[0].Byte,$n[0].Byte,$n[0].Byte],"pi":[{"n":"a","pt":$n[0].UInt32,"ps":0},{"n":"b","pt":$n[0].UInt16,"ps":1},{"n":"c","pt":$n[0].UInt16,"ps":2},{"n":"d","pt":$n[0].Byte,"ps":3},{"n":"e","pt":$n[0].Byte,"ps":4},{"n":"f","pt":$n[0].Byte,"ps":5},{"n":"g","pt":$n[0].Byte,"ps":6},{"n":"h","pt":$n[0].Byte,"ps":7},{"n":"i","pt":$n[0].Byte,"ps":8},{"n":"j","pt":$n[0].Byte,"ps":9},{"n":"k","pt":$n[0].Byte,"ps":10}],"sn":"$ctor5"},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"value","pt":$n[0].Guid,"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].Guid],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"o","pt":$n[0].Guid,"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].Guid],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"o","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"sn":"Format","rt":$n[0].String,"p":[$n[0].String]},{"a":1,"n":"FromString","t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"sn":"FromString","rt":$n[0].Void,"p":[$n[0].String]},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"NewGuid","is":true,"t":8,"sn":"NewGuid","rt":$n[0].Guid},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0}],"sn":"Parse","rt":$n[0].Guid,"p":[$n[0].String]},{"a":2,"n":"ParseExact","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"format","pt":$n[0].String,"ps":1}],"sn":"ParseExact","rt":$n[0].Guid,"p":[$n[0].String,$n[0].String]},{"a":1,"n":"ParseInternal","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"format","pt":$n[0].String,"ps":1},{"n":"check","pt":$n[0].Boolean,"ps":2}],"sn":"ParseInternal","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String,$n[0].Boolean],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"ToByteArray","t":8,"sn":"ToByteArray","rt":$n[0].Array.type(System.Byte)},{"a":1,"n":"ToHex","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Byte,"ps":0}],"sn":"ToHex","rt":$n[0].String,"p":[$n[0].Byte]},{"a":1,"n":"ToHex","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].UInt32,"ps":0},{"n":"precision","pt":$n[0].Int32,"ps":1}],"sn":"ToHex$1","rt":$n[0].String,"p":[$n[0].UInt32,$n[0].Int32]},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"sn":"ToString","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":1}],"sn":"format","rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].Guid,"ps":1}],"sn":"TryParse","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Guid],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParseExact","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"format","pt":$n[0].String,"ps":1},{"n":"result","out":true,"pt":$n[0].Guid,"ps":2}],"sn":"TryParseExact","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String,$n[0].Guid],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Equality","is":true,"t":8,"pi":[{"n":"a","pt":$n[0].Guid,"ps":0},{"n":"b","pt":$n[0].Guid,"ps":1}],"sn":"op_Equality","rt":$n[0].Boolean,"p":[$n[0].Guid,$n[0].Guid],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Inequality","is":true,"t":8,"pi":[{"n":"a","pt":$n[0].Guid,"ps":0},{"n":"b","pt":$n[0].Guid,"ps":1}],"sn":"op_Inequality","rt":$n[0].Boolean,"p":[$n[0].Guid,$n[0].Guid],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"toJSON","t":8,"sn":"toJSON","rt":$n[0].String},{"a":2,"n":"Empty","is":true,"t":4,"rt":$n[0].Guid,"sn":"Empty","ro":true},{"a":1,"n":"NonFormat","is":true,"t":4,"rt":RegExp,"sn":"NonFormat","ro":true},{"a":1,"n":"Replace","is":true,"t":4,"rt":RegExp,"sn":"Replace","ro":true},{"a":1,"n":"Rnd","is":true,"t":4,"rt":$n[0].Random,"sn":"Rnd","ro":true},{"a":1,"n":"Split","is":true,"t":4,"rt":RegExp,"sn":"Split","ro":true},{"a":1,"n":"Valid","is":true,"t":4,"rt":RegExp,"sn":"Valid","ro":true},{"a":1,"n":"_a","t":4,"rt":$n[0].Int32,"sn":"_a","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_b","t":4,"rt":$n[0].Int16,"sn":"_b","box":function ($v) { return H5.box($v, System.Int16);}},{"a":1,"n":"_c","t":4,"rt":$n[0].Int16,"sn":"_c","box":function ($v) { return H5.box($v, System.Int16);}},{"a":1,"n":"_d","t":4,"rt":$n[0].Byte,"sn":"_d","box":function ($v) { return H5.box($v, System.Byte);}},{"a":1,"n":"_e","t":4,"rt":$n[0].Byte,"sn":"_e","box":function ($v) { return H5.box($v, System.Byte);}},{"a":1,"n":"_f","t":4,"rt":$n[0].Byte,"sn":"_f","box":function ($v) { return H5.box($v, System.Byte);}},{"a":1,"n":"_g","t":4,"rt":$n[0].Byte,"sn":"_g","box":function ($v) { return H5.box($v, System.Byte);}},{"a":1,"n":"_h","t":4,"rt":$n[0].Byte,"sn":"_h","box":function ($v) { return H5.box($v, System.Byte);}},{"a":1,"n":"_i","t":4,"rt":$n[0].Byte,"sn":"_i","box":function ($v) { return H5.box($v, System.Byte);}},{"a":1,"n":"_j","t":4,"rt":$n[0].Byte,"sn":"_j","box":function ($v) { return H5.box($v, System.Byte);}},{"a":1,"n":"_k","t":4,"rt":$n[0].Byte,"sn":"_k","box":function ($v) { return H5.box($v, System.Byte);}},{"a":1,"n":"error1","is":true,"t":4,"rt":$n[0].String,"sn":"error1"}]}; }, $n); - $m("System.IAsyncResult", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"AsyncState","t":16,"rt":$n[0].Object,"g":{"ab":true,"a":2,"n":"get_AsyncState","t":8,"rt":$n[0].Object,"fg":"System$IAsyncResult$AsyncState"},"fn":"System$IAsyncResult$AsyncState"},{"ab":true,"a":2,"n":"CompletedSynchronously","t":16,"rt":$n[0].Boolean,"g":{"ab":true,"a":2,"n":"get_CompletedSynchronously","t":8,"rt":$n[0].Boolean,"fg":"System$IAsyncResult$CompletedSynchronously","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"System$IAsyncResult$CompletedSynchronously"},{"ab":true,"a":2,"n":"IsCompleted","t":16,"rt":$n[0].Boolean,"g":{"ab":true,"a":2,"n":"get_IsCompleted","t":8,"rt":$n[0].Boolean,"fg":"System$IAsyncResult$IsCompleted","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"System$IAsyncResult$IsCompleted"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"System$IAsyncResult$AsyncState"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"System$IAsyncResult$CompletedSynchronously","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"System$IAsyncResult$IsCompleted","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.ICloneable", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Clone","t":8,"tpc":0,"def":function () { return H5.clone(this); },"rt":$n[0].Object}]}; }, $n); - $m("System.IComparable", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"CompareTo","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (obj) { return H5.compare(this, obj); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.IComparable$1", function (T) { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":T,"ps":0}],"tpc":0,"def":function (other) { return H5.compare(this, other, false, T); },"rt":$n[0].Int32,"p":[T],"box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.IDisposable", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Dispose","t":8,"sn":"System$IDisposable$Dispose","rt":$n[0].Void}]}; }, $n); - $m("System.IEquatable$1", function (T) { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":T,"ps":0}],"tpc":0,"def":function (other) { return H5.equalsT(this, other, T); },"rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.IFormatProvider", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"GetFormat","t":8,"pi":[{"n":"formatType","pt":$n[0].Type,"ps":0}],"sn":"System$IFormatProvider$getFormat","rt":$n[0].Object,"p":[$n[0].Type]}]}; }, $n); - $m("System.IFormattable", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, formatProvider) { return H5.format(this, format, formatProvider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]}]}; }, $n); - $m("System.Index", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Boolean],"pi":[{"n":"value","pt":$n[0].Int32,"ps":0},{"n":"fromEnd","dv":false,"o":true,"pt":$n[0].Boolean,"ps":1}],"sn":"$ctor1"},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Index,"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].Index],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"FromEnd","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"FromEnd","rt":$n[0].Index,"p":[$n[0].Int32]},{"a":2,"n":"FromStart","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"FromStart","rt":$n[0].Index,"p":[$n[0].Int32]},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"GetOffset","t":8,"pi":[{"n":"length","pt":$n[0].Int32,"ps":0}],"sn":"GetOffset","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"op_Implicit","rt":$n[0].Index,"p":[$n[0].Int32]},{"a":2,"n":"End","is":true,"t":16,"rt":$n[0].Index,"g":{"a":2,"n":"get_End","t":8,"rt":$n[0].Index,"fg":"End","is":true},"fn":"End"},{"a":2,"n":"IsFromEnd","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsFromEnd","t":8,"rt":$n[0].Boolean,"fg":"IsFromEnd","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsFromEnd"},{"a":2,"n":"Start","is":true,"t":16,"rt":$n[0].Index,"g":{"a":2,"n":"get_Start","t":8,"rt":$n[0].Index,"fg":"Start","is":true},"fn":"Start"},{"a":2,"n":"Value","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Value","t":8,"rt":$n[0].Int32,"fg":"Value","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Value"},{"a":1,"n":"_value","t":4,"rt":$n[0].Int32,"sn":"_value","ro":true,"box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Int16", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"def":function () { return Number; }},{"a":1,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"def":function (i) { return Number; }},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].Int16,"ps":0}],"tpc":0,"def":function (other) { return H5.compare(this, other); },"rt":$n[0].Int32,"p":[$n[0].Int16],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (obj) { return H5.compare(this, obj); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Int16,"ps":0}],"tpc":0,"def":function (other) { return this === other; },"rt":$n[0].Boolean,"p":[$n[0].Int16],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (other) { return System.Int16.equals(this, other); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.Int16.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.Int16.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (s) { return System.Int16.parse(s); },"rt":$n[0].Int16,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Int16);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"radix","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, radix) { return System.Int16.parse(s, radix); },"rt":$n[0].Int16,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int16);}},{"a":2,"n":"ToString","t":8,"pi":[{"n":"radix","pt":$n[0].Int32,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.Int16.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.Int16.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].Int16,"ps":1}],"tpc":0,"def":function (s, result) { return System.Int16.tryParse(s, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int16],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].Int16,"ps":1},{"n":"radix","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (s, result, radix) { return System.Int16.tryParse(s, result, radix); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int16,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].Int16,"sn":"MaxValue","box":function ($v) { return H5.box($v, System.Int16);}},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].Int16,"sn":"MinValue","box":function ($v) { return H5.box($v, System.Int16);}}]}; }, $n); - $m("System.Int32", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"def":function () { return Number; }},{"a":1,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"def":function (i) { return Number; }},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (other) { return H5.compare(this, other); },"rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (obj) { return H5.compare(this, obj); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (other) { return this === other; },"rt":$n[0].Boolean,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (other) { return System.Int32.equals(this, other); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.Int32.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.Int32.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (s) { return System.Int32.parse(s); },"rt":$n[0].Int32,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"radix","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, radix) { return System.Int32.parse(s, radix); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"ToString","t":8,"pi":[{"n":"radix","pt":$n[0].Int32,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.Int32.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.Int32.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, result) { return System.Int32.tryParse(s, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].Int32,"ps":1},{"n":"radix","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (s, result, radix) { return System.Int32.tryParse(s, result, radix); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].Int32,"sn":"MaxValue","box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].Int32,"sn":"MinValue","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Int64", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":1,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"sn":"ctor"},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].Int64,"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Int64,"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"sn":"format","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"sn":"format","rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (s) { return System.Int64.parse(s); },"rt":$n[0].Int64,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"radix","pt":$n[0].Int32,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"sn":"format","rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].Int64,"ps":1}],"tpc":0,"def":function (s, result) { return System.Int64.tryParse(s, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int64],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"op_Explicit","rt":$n[0].Int64,"p":[$n[0].Double]},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"op_Explicit","rt":$n[0].Byte,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.Byte);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"op_Explicit","rt":$n[0].Char,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"op_Explicit","rt":$n[0].Double,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"op_Explicit","rt":$n[0].Int16,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.Int16);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"op_Explicit","rt":$n[0].Int32,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"op_Explicit","rt":$n[0].SByte,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.SByte);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"op_Explicit","rt":$n[0].Single,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"op_Explicit","rt":$n[0].UInt16,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.UInt16);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"op_Explicit","rt":$n[0].UInt32,"p":[$n[0].Int64],"box":function ($v) { return H5.box($v, System.UInt32);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"op_Explicit","rt":$n[0].UInt64,"p":[$n[0].Int64]},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"sn":"op_Explicit","rt":$n[0].Int64,"p":[$n[0].Single]},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"op_Explicit","rt":$n[0].Int64,"p":[$n[0].UInt64]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Byte,"ps":0}],"sn":"op_Implicit","rt":$n[0].Int64,"p":[$n[0].Byte]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"sn":"op_Implicit","rt":$n[0].Int64,"p":[$n[0].Char]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int16,"ps":0}],"sn":"op_Implicit","rt":$n[0].Int64,"p":[$n[0].Int16]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"op_Implicit","rt":$n[0].Int64,"p":[$n[0].Int32]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].SByte,"ps":0}],"sn":"op_Implicit","rt":$n[0].Int64,"p":[$n[0].SByte]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt16,"ps":0}],"sn":"op_Implicit","rt":$n[0].Int64,"p":[$n[0].UInt16]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt32,"ps":0}],"sn":"op_Implicit","rt":$n[0].Int64,"p":[$n[0].UInt32]},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].Int64,"sn":"MaxValue"},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].Int64,"sn":"MinValue"}]}; }, $n); - $m("System.MathF", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":2,"n":"Abs","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return Math.abs(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Acos","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return Math.acos(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Asin","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return Math.asin(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Atan","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return Math.atan(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Atan2","is":true,"t":8,"pi":[{"n":"y","pt":$n[0].Single,"ps":0},{"n":"x","pt":$n[0].Single,"ps":1}],"tpc":0,"def":function (y, x) { return Math.atan2(y, x); },"rt":$n[0].Single,"p":[$n[0].Single,$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"BitDecrement","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return H5.Int.bitDecrement(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"BitIncrement","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return H5.Int.bitIncrement(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Ceiling","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return Math.ceil(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"CopySign","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0},{"n":"y","pt":$n[0].Single,"ps":1}],"tpc":0,"def":function (x, y) { return ((1.0 / y) < 0 ? -1.0 : 1.0) * Math.abs(x); },"rt":$n[0].Single,"p":[$n[0].Single,$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Cos","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return Math.cos(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Cosh","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (value) { return H5.Math.cosh(value); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Exp","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return Math.exp(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Floor","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return Math.floor(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"FusedMultiplyAdd","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0},{"n":"y","pt":$n[0].Single,"ps":1},{"n":"z","pt":$n[0].Single,"ps":2}],"tpc":0,"def":function (x, y, z) { return ((x * y) + z); },"rt":$n[0].Single,"p":[$n[0].Single,$n[0].Single,$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"IEEERemainder","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0},{"n":"y","pt":$n[0].Single,"ps":1}],"tpc":0,"def":function (x, y) { return H5.Math.IEEERemainder(x, y); },"rt":$n[0].Single,"p":[$n[0].Single,$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Log","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return H5.Math.log(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Log","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0},{"n":"y","pt":$n[0].Single,"ps":1}],"tpc":0,"def":function (x, y) { return H5.Math.logWithBase(x, y); },"rt":$n[0].Single,"p":[$n[0].Single,$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Log10","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return H5.Math.logWithBase(x, 10.0); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Log2","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return H5.Math.logWithBase(x, 2.0); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Max","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0},{"n":"y","pt":$n[0].Single,"ps":1}],"tpc":0,"def":function (x, y) { return Math.max(x, y); },"rt":$n[0].Single,"p":[$n[0].Single,$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"MaxMagnitude","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0},{"n":"y","pt":$n[0].Single,"ps":1}],"tpc":0,"def":function (x, y) { return (function(x, y) { - var ax = Math.abs(x); - var ay = Math.abs(y); - - if (ax > ay) { return x; } - if (ax === ay) { return (x > y) ? x : y; } - return y; - })(x, y); },"rt":$n[0].Single,"p":[$n[0].Single,$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Min","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0},{"n":"y","pt":$n[0].Single,"ps":1}],"tpc":0,"def":function (x, y) { return Math.min(x, y); },"rt":$n[0].Single,"p":[$n[0].Single,$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"MinMagnitude","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0},{"n":"y","pt":$n[0].Single,"ps":1}],"tpc":0,"def":function (x, y) { return (function(x, y) { - var ax = Math.abs(x); - var ay = Math.abs(y); - - if (ax < ay) { return x; } - if (ax === ay) { return (x < y) ? x : y; } - return y; - })(x, y); },"rt":$n[0].Single,"p":[$n[0].Single,$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Pow","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0},{"n":"y","pt":$n[0].Single,"ps":1}],"tpc":0,"def":function (x, y) { return Math.pow(x, y); },"rt":$n[0].Single,"p":[$n[0].Single,$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"ReciprocalEstimate","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return (1.0 / x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"ReciprocalSqrtEstimate","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return (1.0 / Math.sqrt(x)); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Round","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return H5.Math.round(x, 0, 6); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Round","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0},{"n":"digits","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (x, digits) { return H5.Math.round(x, digits, 6); },"rt":$n[0].Single,"p":[$n[0].Single,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Round","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0},{"n":"mode","pt":Number,"ps":1}],"tpc":0,"def":function (x, mode) { return H5.Math.round(x, 0, mode); },"rt":$n[0].Single,"p":[$n[0].Single,Number],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Round","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0},{"n":"digits","pt":$n[0].Int32,"ps":1},{"n":"mode","pt":Number,"ps":2}],"tpc":0,"def":function (x, digits, mode) { return H5.Math.round(x, digits, mode); },"rt":$n[0].Single,"p":[$n[0].Single,$n[0].Int32,Number],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Sign","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (value) { return H5.Int.sign(value); },"rt":$n[0].Int32,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Sin","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return Math.sin(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Sinh","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (value) { return H5.Math.sinh(value); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Sqrt","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return Math.sqrt(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Tan","is":true,"t":8,"pi":[{"n":"x","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (x) { return Math.tan(x); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Tanh","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (value) { return H5.Math.tanh(value); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Truncate","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (d) { return H5.Int.trunc(d); },"rt":$n[0].Single,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"E","is":true,"t":4,"rt":$n[0].Single,"sn":"E","box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"PI","is":true,"t":4,"rt":$n[0].Single,"sn":"PI","box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}}]}; }, $n); - $m("System.MemoryExtensions", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":2,"n":"AsSpan","is":true,"t":8,"pi":[{"n":"text","pt":$n[0].String,"ps":0}],"sn":"AsSpan","rt":$n[0].ReadOnlySpan$1(System.Char),"p":[$n[0].String]},{"a":2,"n":"AsSpan","is":true,"t":8,"pi":[{"n":"text","pt":$n[0].String,"ps":0},{"n":"start","pt":$n[0].Int32,"ps":1}],"sn":"AsSpan$1","rt":$n[0].ReadOnlySpan$1(System.Char),"p":[$n[0].String,$n[0].Int32]},{"a":2,"n":"AsSpan","is":true,"t":8,"pi":[{"n":"text","pt":$n[0].String,"ps":0},{"n":"start","pt":$n[0].Int32,"ps":1},{"n":"length","pt":$n[0].Int32,"ps":2}],"sn":"AsSpan$2","rt":$n[0].ReadOnlySpan$1(System.Char),"p":[$n[0].String,$n[0].Int32,$n[0].Int32]},{"a":2,"n":"SequenceEqual","is":true,"t":8,"pi":[{"n":"span","pt":$n[0].ReadOnlySpan$1(System.Object),"ps":0},{"n":"other","pt":$n[0].ReadOnlySpan$1(System.Object),"ps":1}],"tpc":1,"tprm":["T"],"sn":"SequenceEqual","rt":$n[0].Boolean,"p":[$n[0].ReadOnlySpan$1(System.Object),$n[0].ReadOnlySpan$1(System.Object)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.MissingMethodException", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"inner","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].String],"pi":[{"n":"className","pt":$n[0].String,"ps":0},{"n":"methodName","pt":$n[0].String,"ps":1}],"sn":"$ctor3"}]}; }, $n); - $m("System.Nullable$1", function (T) { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[T],"pi":[{"n":"value","pt":T,"ps":0}],"def":function (value) { return value; }},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (other) { return System.Nullable.equalsT(this, other); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"tpc":0,"def":function () { return System.Nullable.getHashCode(this, T); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"GetValueOrDefault","t":8,"tpc":0,"def":function () { return System.Nullable.getValueOrDefault(this, T); },"rt":T},{"a":2,"n":"GetValueOrDefault","t":8,"pi":[{"n":"defaultValue","pt":T,"ps":0}],"tpc":0,"def":function (defaultValue) { return System.Nullable.getValueOrDefault(this, defaultValue); },"rt":T,"p":[T]},{"ov":true,"a":2,"n":"ToString","t":8,"tpc":0,"def":function () { return System.Nullable.toString(this, T); },"rt":$n[0].String},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Nullable$1(T),"ps":0}],"tpc":0,"def":function (value) { return System.Nullable.getValue(this); },"rt":T,"p":[$n[0].Nullable$1(T)]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":T,"ps":0}],"sn":"op_Implicit","rt":$n[0].Nullable$1(T),"p":[T]},{"a":2,"n":"HasValue","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_HasValue","t":8,"tpc":0,"def":function () { return System.Nullable.hasValue(this); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"Value","t":16,"rt":T,"g":{"a":2,"n":"get_Value","t":8,"tpc":0,"def":function () { return System.Nullable.getValue(this); },"rt":T}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"HasValue","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T,"sn":"Value"}]}; }, $n); - $m("System.Range", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Index,$n[0].Index],"pi":[{"n":"start","pt":$n[0].Index,"ps":0},{"n":"end","pt":$n[0].Index,"ps":1}],"sn":"$ctor1"},{"a":2,"n":"EndAt","is":true,"t":8,"pi":[{"n":"end","pt":$n[0].Index,"ps":0}],"sn":"EndAt","rt":$n[0].Range,"p":[$n[0].Index]},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Range,"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].Range],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"GetOffsetAndLength","t":8,"pi":[{"n":"length","pt":$n[0].Int32,"ps":0}],"sn":"GetOffsetAndLength","rt":$n[0].ValueTuple$2(System.Int32,System.Int32),"p":[$n[0].Int32]},{"a":2,"n":"StartAt","is":true,"t":8,"pi":[{"n":"start","pt":$n[0].Index,"ps":0}],"sn":"StartAt","rt":$n[0].Range,"p":[$n[0].Index]},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":2,"n":"All","is":true,"t":16,"rt":$n[0].Range,"g":{"a":2,"n":"get_All","t":8,"rt":$n[0].Range,"fg":"All","is":true},"fn":"All"},{"a":2,"n":"End","t":16,"rt":$n[0].Index,"g":{"a":2,"n":"get_End","t":8,"rt":$n[0].Index,"fg":"End"},"fn":"End"},{"a":2,"n":"Start","t":16,"rt":$n[0].Index,"g":{"a":2,"n":"get_Start","t":8,"rt":$n[0].Index,"fg":"Start"},"fn":"Start"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Index,"sn":"End"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Index,"sn":"Start"}]}; }, $n); - $m("System.ReadOnlySpan$1", function (T) { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Span$1(T)],"pi":[{"n":"span","pt":$n[0].Span$1(T),"ps":0}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[System.Array.type(T)],"pi":[{"n":"array","pt":System.Array.type(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[System.Array.type(T),$n[0].Int32,$n[0].Int32],"pi":[{"n":"array","pt":System.Array.type(T),"ps":0},{"n":"start","pt":$n[0].Int32,"ps":1},{"n":"length","pt":$n[0].Int32,"ps":2}],"sn":"$ctor2"},{"a":2,"n":"ToArray","t":8,"sn":"ToArray","rt":System.Array.type(T)},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"span","pt":$n[0].Span$1(T),"ps":0}],"sn":"op_Implicit$1","rt":$n[0].ReadOnlySpan$1(T),"p":[$n[0].Span$1(T)]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0}],"sn":"op_Implicit","rt":$n[0].ReadOnlySpan$1(T),"p":[System.Array.type(T)]},{"a":2,"n":"Item","t":16,"rt":$n[7].Ref$1(T),"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"getItem","rt":$n[7].Ref$1(T),"p":[$n[0].Int32]}},{"a":2,"n":"Length","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Length","t":8,"rt":$n[0].Int32,"fg":"Length","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Length"},{"a":4,"n":"_array","t":4,"rt":System.Array.type(T),"sn":"_array","ro":true},{"a":4,"n":"_length","t":4,"rt":$n[0].Int32,"sn":"_length","ro":true,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"_offset","t":4,"rt":$n[0].Int32,"sn":"_offset","ro":true,"box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.SByte", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"def":function () { return Number; }},{"a":1,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"def":function (i) { return Number; }},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (obj) { return H5.compare(this, obj); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].SByte,"ps":0}],"tpc":0,"def":function (other) { return H5.compare(this, other); },"rt":$n[0].Int32,"p":[$n[0].SByte],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (other) { return System.SByte.equals(this, other); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].SByte,"ps":0}],"tpc":0,"def":function (other) { return this === other; },"rt":$n[0].Boolean,"p":[$n[0].SByte],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.SByte.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.SByte.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (s) { return System.SByte.parse(s); },"rt":$n[0].SByte,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.SByte);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"radix","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, radix) { return System.SByte.parse(s, radix); },"rt":$n[0].SByte,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.SByte);}},{"a":2,"n":"ToString","t":8,"pi":[{"n":"radix","pt":$n[0].Int32,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.SByte.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.SByte.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].SByte,"ps":1}],"tpc":0,"def":function (s, result) { return System.SByte.tryParse(s, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].SByte],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].SByte,"ps":1},{"n":"radix","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (s, result, radix) { return System.SByte.tryParse(s, result, radix); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].SByte,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].SByte,"sn":"MaxValue","box":function ($v) { return H5.box($v, System.SByte);}},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].SByte,"sn":"MinValue","box":function ($v) { return H5.box($v, System.SByte);}}]}; }, $n); - $m("System.Single", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"def":function () { return Number; }},{"a":1,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"def":function (i) { return Number; }},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (obj) { return H5.compare(this, obj); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (other) { return H5.compare(this, other); },"rt":$n[0].Int32,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (other) { return System.Single.equals(this, other); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (other) { return this === other; },"rt":$n[0].Boolean,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.Single.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.Single.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"ov":true,"a":2,"n":"GetHashCode","t":8,"tpc":0,"def":function () { return System.Single.getHashCode(this); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IsFinite","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (d) { return isFinite(d); },"rt":$n[0].Boolean,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsInfinity","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (d) { return (Math.abs(d) === Number.POSITIVE_INFINITY); },"rt":$n[0].Boolean,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsNaN","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (d) { return isNaN(d); },"rt":$n[0].Boolean,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsNegativeInfinity","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (d) { return (d === Number.NEGATIVE_INFINITY); },"rt":$n[0].Boolean,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsPositiveInfinity","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].Single,"ps":0}],"tpc":0,"def":function (d) { return (d === Number.POSITIVE_INFINITY); },"rt":$n[0].Boolean,"p":[$n[0].Single],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (s) { return System.Single.parse(s); },"rt":$n[0].Single,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (s, provider) { return System.Single.parse(s, provider); },"rt":$n[0].Single,"p":[$n[0].String,$n[0].IFormatProvider],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"ToExponential","t":8,"sn":"toExponential","rt":$n[0].String},{"a":2,"n":"ToExponential","t":8,"pi":[{"n":"fractionDigits","pt":$n[0].Int32,"ps":0}],"sn":"toExponential","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToFixed","t":8,"sn":"toFixed","rt":$n[0].String},{"a":2,"n":"ToFixed","t":8,"pi":[{"n":"fractionDigits","pt":$n[0].Int32,"ps":0}],"sn":"toFixed","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToPrecision","t":8,"sn":"toPrecision","rt":$n[0].String},{"a":2,"n":"ToPrecision","t":8,"pi":[{"n":"precision","pt":$n[0].Int32,"ps":0}],"sn":"toPrecision","rt":$n[0].String,"p":[$n[0].Int32]},{"ov":true,"a":2,"n":"ToString","t":8,"tpc":0,"def":function () { return System.Single.format(this); },"rt":$n[0].String},{"a":2,"n":"ToString","t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0}],"tpc":0,"def":function (provider) { return System.Single.format(this, "G", provider); },"rt":$n[0].String,"p":[$n[0].IFormatProvider]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"radix","pt":$n[0].Int32,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.Single.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.Single.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].Single,"ps":1}],"tpc":0,"def":function (s, result) { return System.Single.tryParse(s, null, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Single],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1},{"n":"result","out":true,"pt":$n[0].Single,"ps":2}],"tpc":0,"def":function (s, provider, result) { return System.Single.tryParse(s, provider, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].IFormatProvider,$n[0].Single],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Epsilon","is":true,"t":4,"rt":$n[0].Single,"sn":"Epsilon","box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].Single,"sn":"MaxValue","box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].Single,"sn":"MinValue","box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"NaN","is":true,"t":4,"rt":$n[0].Single,"sn":"NaN","box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"NegativeInfinity","is":true,"t":4,"rt":$n[0].Single,"sn":"NegativeInfinity","box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"PositiveInfinity","is":true,"t":4,"rt":$n[0].Single,"sn":"PositiveInfinity","box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}}]}; }, $n); - $m("System.Span$1", function (T) { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[System.Array.type(T)],"pi":[{"n":"array","pt":System.Array.type(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[System.Array.type(T),$n[0].Int32,$n[0].Int32],"pi":[{"n":"array","pt":System.Array.type(T),"ps":0},{"n":"start","pt":$n[0].Int32,"ps":1},{"n":"length","pt":$n[0].Int32,"ps":2}],"sn":"$ctor2"},{"a":2,"n":"ToArray","t":8,"sn":"ToArray","rt":System.Array.type(T)},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0}],"sn":"op_Implicit","rt":$n[0].Span$1(T),"p":[System.Array.type(T)]},{"a":2,"n":"Item","t":16,"rt":$n[7].Ref$1(T),"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"getItem","rt":$n[7].Ref$1(T),"p":[$n[0].Int32]}},{"a":2,"n":"Length","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Length","t":8,"rt":$n[0].Int32,"fg":"Length","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Length"},{"a":4,"n":"_array","t":4,"rt":System.Array.type(T),"sn":"_array","ro":true},{"a":4,"n":"_length","t":4,"rt":$n[0].Int32,"sn":"_length","ro":true,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"_offset","t":4,"rt":$n[0].Int32,"sn":"_offset","ro":true,"box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.String", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"def":function () { return ""; }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Char)],"pi":[{"n":"value","pt":$n[0].Array.type(System.Char),"ps":0}],"def":function (value) { return System.String.fromCharArray(value); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Char,$n[0].Int32],"pi":[{"n":"c","pt":$n[0].Char,"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1}],"def":function (c, count) { return System.String.fromCharCount(c, count); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32],"pi":[{"n":"value","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"length","pt":$n[0].Int32,"ps":2}],"def":function (value, startIndex, length) { return System.String.fromCharArray(value, startIndex, length); }},{"a":2,"n":"Clone","t":8,"tpc":0,"def":function () { return this; },"rt":$n[0].Object},{"a":2,"n":"Compare","is":true,"t":8,"pi":[{"n":"strA","pt":$n[0].String,"ps":0},{"n":"strB","pt":$n[0].String,"ps":1}],"tpc":0,"def":function (strA, strB) { return System.String.compare(strA, strB); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].String],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Compare","is":true,"t":8,"pi":[{"n":"strA","pt":$n[0].String,"ps":0},{"n":"strB","pt":$n[0].String,"ps":1},{"n":"ignoreCase","pt":$n[0].Boolean,"ps":2}],"tpc":0,"def":function (strA, strB, ignoreCase) { return System.String.compare(strA, strB, ignoreCase); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].String,$n[0].Boolean],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Compare","is":true,"t":8,"pi":[{"n":"strA","pt":$n[0].String,"ps":0},{"n":"strB","pt":$n[0].String,"ps":1},{"n":"comparisonType","pt":$n[0].StringComparison,"ps":2}],"tpc":0,"def":function (strA, strB, comparisonType) { return System.String.compare(strA, strB, comparisonType); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].String,$n[0].StringComparison],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Compare","is":true,"t":8,"pi":[{"n":"strA","pt":$n[0].String,"ps":0},{"n":"strB","pt":$n[0].String,"ps":1},{"n":"ignoreCase","pt":$n[0].Boolean,"ps":2},{"n":"culture","pt":$n[1].CultureInfo,"ps":3}],"tpc":0,"def":function (strA, strB, ignoreCase, culture) { return System.String.compare(strA, strB, ignoreCase, culture); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].String,$n[0].Boolean,$n[1].CultureInfo],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Compare","is":true,"t":8,"pi":[{"n":"strA","pt":$n[0].String,"ps":0},{"n":"indexA","pt":$n[0].Int32,"ps":1},{"n":"strB","pt":$n[0].String,"ps":2},{"n":"indexB","pt":$n[0].Int32,"ps":3},{"n":"length","pt":$n[0].Int32,"ps":4}],"tpc":0,"def":function (strA, indexA, strB, indexB, length) { return System.String.compare(strA.substr(indexA, length), strB.substr(indexB, length)); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32,$n[0].String,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Compare","is":true,"t":8,"pi":[{"n":"strA","pt":$n[0].String,"ps":0},{"n":"indexA","pt":$n[0].Int32,"ps":1},{"n":"strB","pt":$n[0].String,"ps":2},{"n":"indexB","pt":$n[0].Int32,"ps":3},{"n":"length","pt":$n[0].Int32,"ps":4},{"n":"ignoreCase","pt":$n[0].Boolean,"ps":5}],"tpc":0,"def":function (strA, indexA, strB, indexB, length, ignoreCase) { return System.String.compare(strA.substr(indexA, length), strB.substr(indexB, length), ignoreCase); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32,$n[0].String,$n[0].Int32,$n[0].Int32,$n[0].Boolean],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Compare","is":true,"t":8,"pi":[{"n":"strA","pt":$n[0].String,"ps":0},{"n":"indexA","pt":$n[0].Int32,"ps":1},{"n":"strB","pt":$n[0].String,"ps":2},{"n":"indexB","pt":$n[0].Int32,"ps":3},{"n":"length","pt":$n[0].Int32,"ps":4},{"n":"comparisonType","pt":$n[0].StringComparison,"ps":5}],"tpc":0,"def":function (strA, indexA, strB, indexB, length, comparisonType) { return System.String.compare(strA.substr(indexA, length), strB.substr(indexB, length), comparisonType); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32,$n[0].String,$n[0].Int32,$n[0].Int32,$n[0].StringComparison],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Compare","is":true,"t":8,"pi":[{"n":"strA","pt":$n[0].String,"ps":0},{"n":"indexA","pt":$n[0].Int32,"ps":1},{"n":"strB","pt":$n[0].String,"ps":2},{"n":"indexB","pt":$n[0].Int32,"ps":3},{"n":"length","pt":$n[0].Int32,"ps":4},{"n":"ignoreCase","pt":$n[0].Boolean,"ps":5},{"n":"culture","pt":$n[1].CultureInfo,"ps":6}],"tpc":0,"def":function (strA, indexA, strB, indexB, length, ignoreCase, culture) { return System.String.compare(strA.substr(indexA, length), strB.substr(indexB, length), ignoreCase, culture); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32,$n[0].String,$n[0].Int32,$n[0].Int32,$n[0].Boolean,$n[1].CultureInfo],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (value) { return System.String.compare(this, value.toString()); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"strB","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (strB) { return System.String.compare(this, strB); },"rt":$n[0].Int32,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Concat","is":true,"t":8,"pi":[{"n":"values","pt":$n[3].IEnumerable$1(System.String),"ps":0}],"tpc":0,"def":function (values) { return System.String.concat(H5.toArray(values)); },"rt":$n[0].String,"p":[$n[3].IEnumerable$1(System.String)]},{"a":2,"n":"Concat","is":true,"t":8,"pi":[{"n":"values","pt":$n[3].IEnumerable$1(System.Object),"ps":0}],"tpc":1,"def":function (T, values) { return System.String.concat(H5.toArray(values)); },"rt":$n[0].String,"p":[$n[3].IEnumerable$1(System.Object)]},{"a":2,"n":"Concat","is":true,"t":8,"pi":[{"n":"arg0","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (arg0) { return System.String.concat(arg0); },"rt":$n[0].String,"p":[$n[0].Object]},{"a":2,"n":"Concat","is":true,"t":8,"pi":[{"n":"args","ip":true,"pt":$n[0].Array.type(System.Object),"ps":0}],"tpc":0,"def":function (args) { return System.String.concat(Array.prototype.slice.call((arguments, 0))); },"rt":$n[0].String,"p":[$n[0].Array.type(System.Object)]},{"a":2,"n":"Concat","is":true,"t":8,"pi":[{"n":"values","ip":true,"pt":$n[0].Array.type(System.String),"ps":0}],"tpc":0,"def":function (values) { return System.String.concat(Array.prototype.slice.call((arguments, 0))); },"rt":$n[0].String,"p":[$n[0].Array.type(System.String)]},{"a":2,"n":"Concat","is":true,"t":8,"pi":[{"n":"arg0","pt":$n[0].Object,"ps":0},{"n":"arg1","pt":$n[0].Object,"ps":1}],"tpc":0,"def":function (arg0, arg1) { return System.String.concat(arg0, arg1); },"rt":$n[0].String,"p":[$n[0].Object,$n[0].Object]},{"a":2,"n":"Concat","is":true,"t":8,"pi":[{"n":"str0","pt":$n[0].String,"ps":0},{"n":"str1","pt":$n[0].String,"ps":1}],"tpc":0,"def":function (str0, str1) { return System.String.concat(str0, str1); },"rt":$n[0].String,"p":[$n[0].String,$n[0].String]},{"a":2,"n":"Concat","is":true,"t":8,"pi":[{"n":"arg0","pt":$n[0].Object,"ps":0},{"n":"arg1","pt":$n[0].Object,"ps":1},{"n":"arg2","pt":$n[0].Object,"ps":2}],"tpc":0,"def":function (arg0, arg1, arg2) { return System.String.concat(arg0, arg1, arg2); },"rt":$n[0].String,"p":[$n[0].Object,$n[0].Object,$n[0].Object]},{"a":2,"n":"Concat","is":true,"t":8,"pi":[{"n":"str0","pt":$n[0].String,"ps":0},{"n":"str1","pt":$n[0].String,"ps":1},{"n":"str2","pt":$n[0].String,"ps":2}],"tpc":0,"def":function (str0, str1, str2) { return System.String.concat(str0, str1, str2); },"rt":$n[0].String,"p":[$n[0].String,$n[0].String,$n[0].String]},{"a":2,"n":"Concat","is":true,"t":8,"pi":[{"n":"arg0","pt":$n[0].Object,"ps":0},{"n":"arg1","pt":$n[0].Object,"ps":1},{"n":"arg2","pt":$n[0].Object,"ps":2},{"n":"arg3","pt":$n[0].Object,"ps":3}],"tpc":0,"def":function (arg0, arg1, arg2, arg3) { return System.String.concat(arg0, arg1, arg2, arg3); },"rt":$n[0].String,"p":[$n[0].Object,$n[0].Object,$n[0].Object,$n[0].Object]},{"a":2,"n":"Concat","is":true,"t":8,"pi":[{"n":"str0","pt":$n[0].String,"ps":0},{"n":"str1","pt":$n[0].String,"ps":1},{"n":"str2","pt":$n[0].String,"ps":2},{"n":"str3","pt":$n[0].String,"ps":3}],"tpc":0,"def":function (str0, str1, str2, str3) { return System.String.concat(str0, str1, str2, str3); },"rt":$n[0].String,"p":[$n[0].String,$n[0].String,$n[0].String,$n[0].String]},{"a":2,"n":"Concat","is":true,"t":8,"pi":[{"n":"arg0","pt":$n[0].Object,"ps":0},{"n":"arg1","pt":$n[0].Object,"ps":1},{"n":"arg2","pt":$n[0].Object,"ps":2},{"n":"arg3","pt":$n[0].Object,"ps":3},{"n":"args","ip":true,"pt":$n[0].Array.type(System.Object),"ps":4}],"tpc":0,"def":function (arg0, arg1, arg2, arg3, args) { return System.String.concat(arg0, arg1, arg2, arg3, args); },"rt":$n[0].String,"p":[$n[0].Object,$n[0].Object,$n[0].Object,$n[0].Object,$n[0].Array.type(System.Object)]},{"a":2,"n":"Contains","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (value) { return System.String.contains(this,value); },"rt":$n[0].Boolean,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"sourceIndex","pt":$n[0].Int32,"ps":0},{"n":"destination","pt":$n[0].Array.type(System.Char),"ps":1},{"n":"destinationIndex","pt":$n[0].Int32,"ps":2},{"n":"count","pt":$n[0].Int32,"ps":3}],"tpc":0,"def":function (sourceIndex, destination, destinationIndex, count) { return System.String.copyTo(this, sourceIndex, destination, destinationIndex, count); },"rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32]},{"a":2,"n":"EndsWith","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (value) { return System.String.endsWith(this, value); },"rt":$n[0].Boolean,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"EndsWith","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"comparisonType","pt":$n[0].StringComparison,"ps":1}],"tpc":0,"def":function (value, comparisonType) { return System.String.endsWith(this, value, comparisonType); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].StringComparison],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (value) { return System.String.equals(this, value); },"rt":$n[0].Boolean,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","is":true,"t":8,"pi":[{"n":"a","pt":$n[0].String,"ps":0},{"n":"b","pt":$n[0].String,"ps":1}],"tpc":0,"def":function (a, b) { return System.String.equals(a, b); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"comparisonType","pt":$n[0].StringComparison,"ps":1}],"tpc":0,"def":function (value, comparisonType) { return System.String.equals(this, value, comparisonType); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].StringComparison],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","is":true,"t":8,"pi":[{"n":"a","pt":$n[0].String,"ps":0},{"n":"b","pt":$n[0].String,"ps":1},{"n":"comparisonType","pt":$n[0].StringComparison,"ps":2}],"tpc":0,"def":function (a, b, comparisonType) { return System.String.equals(a, b, comparisonType); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String,$n[0].StringComparison],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1}],"tpc":0,"def":function (format, arg0) { return System.String.format(format, [arg0]); },"rt":$n[0].String,"p":[$n[0].String,$n[0].Object]},{"a":2,"n":"Format","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"args","ip":true,"pt":$n[0].Array.type(System.Object),"ps":1}],"tpc":0,"def":function (format, args) { return System.String.format(format, args); },"rt":$n[0].String,"p":[$n[0].String,$n[0].Array.type(System.Object)]},{"a":2,"n":"Format","is":true,"t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0},{"n":"format","pt":$n[0].String,"ps":1},{"n":"arg0","pt":$n[0].Object,"ps":2}],"tpc":0,"def":function (provider, format, arg0) { return System.String.formatProvider(provider, format, [arg0]); },"rt":$n[0].String,"p":[$n[0].IFormatProvider,$n[0].String,$n[0].Object]},{"a":2,"n":"Format","is":true,"t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0},{"n":"format","pt":$n[0].String,"ps":1},{"n":"args","ip":true,"pt":$n[0].Array.type(System.Object),"ps":2}],"tpc":0,"def":function (provider, format, args) { return System.String.formatProvider(provider, format, args); },"rt":$n[0].String,"p":[$n[0].IFormatProvider,$n[0].String,$n[0].Array.type(System.Object)]},{"a":2,"n":"Format","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1},{"n":"arg1","pt":$n[0].Object,"ps":2}],"tpc":0,"def":function (format, arg0, arg1) { return System.String.format(format, arg0, arg1); },"rt":$n[0].String,"p":[$n[0].String,$n[0].Object,$n[0].Object]},{"a":2,"n":"Format","is":true,"t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0},{"n":"format","pt":$n[0].String,"ps":1},{"n":"arg0","pt":$n[0].Object,"ps":2},{"n":"arg1","pt":$n[0].Object,"ps":3}],"tpc":0,"def":function (provider, format, arg0, arg1) { return System.String.formatProvider(provider, format, arg0, arg1); },"rt":$n[0].String,"p":[$n[0].IFormatProvider,$n[0].String,$n[0].Object,$n[0].Object]},{"a":2,"n":"Format","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1},{"n":"arg1","pt":$n[0].Object,"ps":2},{"n":"arg2","pt":$n[0].Object,"ps":3}],"tpc":0,"def":function (format, arg0, arg1, arg2) { return System.String.format(format, arg0, arg1, arg2); },"rt":$n[0].String,"p":[$n[0].String,$n[0].Object,$n[0].Object,$n[0].Object]},{"a":2,"n":"Format","is":true,"t":8,"pi":[{"n":"provider","pt":$n[0].IFormatProvider,"ps":0},{"n":"format","pt":$n[0].String,"ps":1},{"n":"arg0","pt":$n[0].Object,"ps":2},{"n":"arg1","pt":$n[0].Object,"ps":3},{"n":"arg2","pt":$n[0].Object,"ps":4}],"tpc":0,"def":function (provider, format, arg0, arg1, arg2) { return System.String.formatProvider(provider, format, arg0, arg1, arg2); },"rt":$n[0].String,"p":[$n[0].IFormatProvider,$n[0].String,$n[0].Object,$n[0].Object,$n[0].Object]},{"a":2,"n":"GetEnumerator","t":8,"tpc":0,"def":function () { return H5.getEnumerator(this); },"rt":$n[0].CharEnumerator},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (value) { return System.String.indexOf(this, String.fromCharCode(value)); },"rt":$n[0].Int32,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (value) { return System.String.indexOf(this, value); },"rt":$n[0].Int32,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (value, startIndex) { return System.String.indexOf(this, String.fromCharCode(value), startIndex); },"rt":$n[0].Int32,"p":[$n[0].Char,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (value, startIndex) { return System.String.indexOf(this, value, startIndex); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"comparisonType","pt":$n[0].StringComparison,"ps":1}],"tpc":0,"def":function (value, comparisonType) { return System.String.indexOf(this, value, 0, null, comparisonType); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].StringComparison],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (value, startIndex, count) { return System.String.indexOf(this, String.fromCharCode(value), startIndex, count); },"rt":$n[0].Int32,"p":[$n[0].Char,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"searchValue","pt":$n[0].String,"ps":0},{"n":"fromIndex","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (searchValue, fromIndex, count) { return System.String.indexOf(this, searchValue, fromIndex, count); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"comparisonType","pt":$n[0].StringComparison,"ps":2}],"tpc":0,"def":function (value, startIndex, comparisonType) { return System.String.indexOf(this, value, startIndex, null, comparisonType); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32,$n[0].StringComparison],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"comparisonType","pt":$n[0].StringComparison,"ps":3}],"tpc":0,"def":function (value, startIndex, count, comparisonType) { return System.String.indexOf(this, value, startIndex, count, comparisonType); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32,$n[0].Int32,$n[0].StringComparison],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOfAny","t":8,"pi":[{"n":"anyOf","pt":$n[0].Array.type(System.Char),"ps":0}],"tpc":0,"def":function (anyOf) { return System.String.indexOfAny(this, anyOf); },"rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char)],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOfAny","t":8,"pi":[{"n":"anyOf","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (anyOf, startIndex) { return System.String.indexOfAny(this, anyOf, startIndex); },"rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOfAny","t":8,"pi":[{"n":"anyOf","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (anyOf, startIndex, count) { return System.String.indexOfAny(this, anyOf, startIndex, count); },"rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Insert","t":8,"pi":[{"n":"startIndex","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].String,"ps":1}],"tpc":0,"def":function (startIndex, value) { return System.String.insert(startIndex, this, value); },"rt":$n[0].String,"p":[$n[0].Int32,$n[0].String]},{"a":2,"n":"IsNullOrEmpty","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (value) { return System.String.isNullOrEmpty(value); },"rt":$n[0].Boolean,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsNullOrWhiteSpace","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (value) { return System.String.isNullOrWhiteSpace(value); },"rt":$n[0].Boolean,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Join","is":true,"t":8,"pi":[{"n":"separator","pt":$n[0].String,"ps":0},{"n":"values","pt":$n[3].IEnumerable$1(System.String),"ps":1}],"tpc":0,"def":function (separator, values) { return H5.toArray(values).join(separator); },"rt":$n[0].String,"p":[$n[0].String,$n[3].IEnumerable$1(System.String)]},{"a":2,"n":"Join","is":true,"t":8,"pi":[{"n":"separator","pt":$n[0].String,"ps":0},{"n":"values","pt":$n[3].IEnumerable$1(System.Object),"ps":1}],"tpc":1,"def":function (T, separator, values) { return H5.toArray(values).join(separator); },"rt":$n[0].String,"p":[$n[0].String,$n[3].IEnumerable$1(System.Object)]},{"a":2,"n":"Join","is":true,"t":8,"pi":[{"n":"separator","pt":$n[0].String,"ps":0},{"n":"values","ip":true,"pt":$n[0].Array.type(System.Object),"ps":1}],"tpc":0,"def":function (separator, values) { return (Array.prototype.slice.call((arguments, 1))).join(separator); },"rt":$n[0].String,"p":[$n[0].String,$n[0].Array.type(System.Object)]},{"a":2,"n":"Join","is":true,"t":8,"pi":[{"n":"separator","pt":$n[0].String,"ps":0},{"n":"value","ip":true,"pt":$n[0].Array.type(System.String),"ps":1}],"tpc":0,"def":function (separator, value) { return (Array.prototype.slice.call((arguments, 1))).join(separator); },"rt":$n[0].String,"p":[$n[0].String,$n[0].Array.type(System.String)]},{"a":2,"n":"Join","is":true,"t":8,"pi":[{"n":"separator","pt":$n[0].String,"ps":0},{"n":"value","pt":$n[0].Array.type(System.String),"ps":1},{"n":"startIndex","pt":$n[0].Int32,"ps":2},{"n":"count","pt":$n[0].Int32,"ps":3}],"tpc":0,"def":function (separator, value, startIndex, count) { return (value).slice(startIndex, startIndex + count).join(separator); },"rt":$n[0].String,"p":[$n[0].String,$n[0].Array.type(System.String),$n[0].Int32,$n[0].Int32]},{"a":2,"n":"LastIndexOf","t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (value) { return this.lastIndexOf(String.fromCharCode(value)); },"rt":$n[0].Int32,"p":[$n[0].Char],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"LastIndexOf","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"lastIndexOf","rt":$n[0].Int32,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"LastIndexOf","t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (value, startIndex) { return this.lastIndexOf(String.fromCharCode(value), startIndex); },"rt":$n[0].Int32,"p":[$n[0].Char,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"LastIndexOf","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"sn":"lastIndexOf","rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"LastIndexOf","t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (value, startIndex, count) { return System.String.lastIndexOf(this, String.fromCharCode(value), startIndex, count); },"rt":$n[0].Int32,"p":[$n[0].Char,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"LastIndexOf","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (value, startIndex, count) { return System.String.lastIndexOf(this, value, startIndex, count); },"rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"LastIndexOfAny","t":8,"pi":[{"n":"anyOf","ip":true,"pt":$n[0].Array.type(System.Char),"ps":0}],"tpc":0,"def":function (anyOf) { return System.String.lastIndexOfAny(this, Array.prototype.slice.call((arguments, 0))); },"rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char)],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"LastIndexOfAny","t":8,"pi":[{"n":"anyOf","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (anyOf, startIndex) { return System.String.lastIndexOfAny(this, anyOf, startIndex); },"rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"LastIndexOfAny","t":8,"pi":[{"n":"anyOf","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (anyOf, startIndex, count) { return System.String.lastIndexOfAny(this, anyOf, startIndex, count); },"rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"PadLeft","t":8,"pi":[{"n":"totalWidth","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (totalWidth) { return System.String.alignString(this, totalWidth); },"rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"PadLeft","t":8,"pi":[{"n":"totalWidth","pt":$n[0].Int32,"ps":0},{"n":"paddingChar","pt":$n[0].Char,"ps":1}],"tpc":0,"def":function (totalWidth, paddingChar) { return System.String.alignString(this, totalWidth, paddingChar); },"rt":$n[0].String,"p":[$n[0].Int32,$n[0].Char]},{"a":2,"n":"PadRight","t":8,"pi":[{"n":"totalWidth","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (totalWidth) { return System.String.alignString(this, -totalWidth); },"rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"PadRight","t":8,"pi":[{"n":"totalWidth","pt":$n[0].Int32,"ps":0},{"n":"paddingChar","pt":$n[0].Char,"ps":1}],"tpc":0,"def":function (totalWidth, paddingChar) { return System.String.alignString(this, -totalWidth, paddingChar); },"rt":$n[0].String,"p":[$n[0].Int32,$n[0].Char]},{"a":2,"n":"Remove","t":8,"pi":[{"n":"startIndex","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (startIndex) { return System.String.remove(this, startIndex); },"rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"Remove","t":8,"pi":[{"n":"startIndex","pt":$n[0].Int32,"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (startIndex, count) { return System.String.remove(this, startIndex, count); },"rt":$n[0].String,"p":[$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Replace","t":8,"pi":[{"n":"oldChar","pt":$n[0].Char,"ps":0},{"n":"newChar","pt":$n[0].Char,"ps":1}],"tpc":0,"def":function (oldChar, newChar) { return System.String.replaceAll(this, String.fromCharCode(oldChar), String.fromCharCode(newChar)); },"rt":$n[0].String,"p":[$n[0].Char,$n[0].Char]},{"a":2,"n":"Replace","t":8,"pi":[{"n":"oldValue","pt":$n[0].String,"ps":0},{"n":"newValue","pt":$n[0].String,"ps":1}],"tpc":0,"def":function (oldValue, newValue) { return System.String.replaceAll(this, oldValue, newValue); },"rt":$n[0].String,"p":[$n[0].String,$n[0].String]},{"a":2,"n":"Split","t":8,"pi":[{"n":"separator","ip":true,"pt":$n[0].Array.type(System.Char),"ps":0}],"tpc":0,"def":function (separator) { return System.String.split(this, Array.prototype.slice.call((arguments, 0)).map(function (i) {{ return String.fromCharCode(i); }})); },"rt":$n[0].Array.type(System.String),"p":[$n[0].Array.type(System.Char)]},{"a":2,"n":"Split","t":8,"pi":[{"n":"separator","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (separator, count) { return System.String.split(this, separator.map(function (i) {{ return String.fromCharCode(i); }}), count); },"rt":$n[0].Array.type(System.String),"p":[$n[0].Array.type(System.Char),$n[0].Int32]},{"a":2,"n":"Split","t":8,"pi":[{"n":"separator","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"options","pt":$n[0].StringSplitOptions,"ps":1}],"tpc":0,"def":function (separator, options) { return System.String.split(this, separator.map(function (i) {{ return String.fromCharCode(i); }}), null, options); },"rt":$n[0].Array.type(System.String),"p":[$n[0].Array.type(System.Char),$n[0].StringSplitOptions]},{"a":2,"n":"Split","t":8,"pi":[{"n":"separator","pt":$n[0].Array.type(System.String),"ps":0},{"n":"options","pt":$n[0].StringSplitOptions,"ps":1}],"tpc":0,"def":function (separator, options) { return System.String.split(this, separator, null, options); },"rt":$n[0].Array.type(System.String),"p":[$n[0].Array.type(System.String),$n[0].StringSplitOptions]},{"a":2,"n":"Split","t":8,"pi":[{"n":"separator","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1},{"n":"options","pt":$n[0].StringSplitOptions,"ps":2}],"tpc":0,"def":function (separator, count, options) { return System.String.split(this, separator.map(function (i) {{ return String.fromCharCode(i); }}), count, options); },"rt":$n[0].Array.type(System.String),"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].StringSplitOptions]},{"a":2,"n":"Split","t":8,"pi":[{"n":"separator","pt":$n[0].Array.type(System.String),"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1},{"n":"options","pt":$n[0].StringSplitOptions,"ps":2}],"tpc":0,"def":function (separator, count, options) { return System.String.split(this, separator, count, options); },"rt":$n[0].Array.type(System.String),"p":[$n[0].Array.type(System.String),$n[0].Int32,$n[0].StringSplitOptions]},{"a":2,"n":"StartsWith","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (value) { return System.String.startsWith(this, value); },"rt":$n[0].Boolean,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"StartsWith","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"comparisonType","pt":$n[0].StringComparison,"ps":1}],"tpc":0,"def":function (value, comparisonType) { return System.String.startsWith(this, value, comparisonType); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].StringComparison],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Substring","t":8,"pi":[{"n":"startIndex","pt":$n[0].Int32,"ps":0}],"sn":"substr","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"Substring","t":8,"pi":[{"n":"startIndex","pt":$n[0].Int32,"ps":0},{"n":"length","pt":$n[0].Int32,"ps":1}],"sn":"substr","rt":$n[0].String,"p":[$n[0].Int32,$n[0].Int32]},{"a":2,"n":"ToCharArray","t":8,"tpc":0,"def":function () { return ($t = this, System.String.toCharArray($t, 0, $t.length)); },"rt":$n[0].Array.type(System.Char)},{"a":2,"n":"ToCharArray","t":8,"pi":[{"n":"startIndex","pt":$n[0].Int32,"ps":0},{"n":"length","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (startIndex, length) { return System.String.toCharArray(this, startIndex, length); },"rt":$n[0].Array.type(System.Char),"p":[$n[0].Int32,$n[0].Int32]},{"a":2,"n":"ToLower","t":8,"tpc":0,"def":function () { return this.toLowerCase(); },"rt":$n[0].String},{"a":2,"n":"ToUpper","t":8,"tpc":0,"def":function () { return this.toUpperCase(); },"rt":$n[0].String},{"a":2,"n":"Trim","t":8,"sn":"trim","rt":$n[0].String},{"a":2,"n":"Trim","t":8,"pi":[{"n":"trimChars","ip":true,"pt":$n[0].Array.type(System.Char),"ps":0}],"tpc":0,"def":function (trimChars) { return System.String.trim(this, Array.prototype.slice.call((arguments, 0))); },"rt":$n[0].String,"p":[$n[0].Array.type(System.Char)]},{"a":2,"n":"TrimEnd","t":8,"tpc":0,"def":function () { return System.String.trimEnd(this); },"rt":$n[0].String},{"a":2,"n":"TrimEnd","t":8,"pi":[{"n":"trimChars","ip":true,"pt":$n[0].Array.type(System.Char),"ps":0}],"tpc":0,"def":function (trimChars) { return System.String.trimEnd(this, Array.prototype.slice.call((arguments, 0))); },"rt":$n[0].String,"p":[$n[0].Array.type(System.Char)]},{"a":2,"n":"TrimStart","t":8,"tpc":0,"def":function () { return System.String.trimStart(this); },"rt":$n[0].String},{"a":2,"n":"TrimStart","t":8,"pi":[{"n":"trimChars","ip":true,"pt":$n[0].Array.type(System.Char),"ps":0}],"tpc":0,"def":function (trimChars) { return System.String.trimStart(this, Array.prototype.slice.call((arguments, 0))); },"rt":$n[0].String,"p":[$n[0].Array.type(System.Char)]},{"a":2,"n":"op_Equality","is":true,"t":8,"pi":[{"n":"s1","pt":$n[0].String,"ps":0},{"n":"s2","pt":$n[0].String,"ps":1}],"sn":"op_Equality","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Inequality","is":true,"t":8,"pi":[{"n":"s1","pt":$n[0].String,"ps":0},{"n":"s2","pt":$n[0].String,"ps":1}],"sn":"op_Inequality","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Item","t":16,"rt":$n[0].Char,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (index) { return this.charCodeAt(index); },"rt":$n[0].Char,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}}},{"a":2,"n":"Length","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Length","t":8,"rt":$n[0].Int32,"fg":"length","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"length"},{"a":2,"n":"Empty","is":true,"t":4,"rt":$n[0].String,"sn":"Empty"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Char,"sn":"Item","box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"length","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.StringComparer", function () { return {"att":1048705,"a":2,"m":[{"a":3,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Compare","t":8,"pi":[{"n":"x","pt":$n[0].Object,"ps":0},{"n":"y","pt":$n[0].Object,"ps":1}],"sn":"Compare","rt":$n[0].Int32,"p":[$n[0].Object,$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"Compare","t":8,"pi":[{"n":"x","pt":$n[0].String,"ps":0},{"n":"y","pt":$n[0].String,"ps":1}],"sn":"compare","rt":$n[0].Int32,"p":[$n[0].String,$n[0].String],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"x","pt":$n[0].Object,"ps":0},{"n":"y","pt":$n[0].Object,"ps":1}],"sn":"Equals","rt":$n[0].Boolean,"p":[$n[0].Object,$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"x","pt":$n[0].String,"ps":0},{"n":"y","pt":$n[0].String,"ps":1}],"sn":"equals2","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"GetHashCode","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"GetHashCode","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"GetHashCode","t":8,"pi":[{"n":"obj","pt":$n[0].String,"ps":0}],"sn":"getHashCode2","rt":$n[0].Int32,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Ordinal","is":true,"t":16,"rt":$n[0].StringComparer,"g":{"a":2,"n":"get_Ordinal","t":8,"rt":$n[0].StringComparer,"fg":"Ordinal","is":true},"fn":"Ordinal"},{"a":2,"n":"OrdinalIgnoreCase","is":true,"t":16,"rt":$n[0].StringComparer,"g":{"a":2,"n":"get_OrdinalIgnoreCase","t":8,"rt":$n[0].StringComparer,"fg":"OrdinalIgnoreCase","is":true},"fn":"OrdinalIgnoreCase"},{"a":1,"n":"_ordinal","is":true,"t":4,"rt":$n[0].StringComparer,"sn":"_ordinal","ro":true},{"a":1,"n":"_ordinalIgnoreCase","is":true,"t":4,"rt":$n[0].StringComparer,"sn":"_ordinalIgnoreCase","ro":true}]}; }, $n); - $m("System.OrdinalComparer", function () { return {"att":1048832,"a":4,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[0].Boolean],"pi":[{"n":"ignoreCase","pt":$n[0].Boolean,"ps":0}],"sn":"ctor"},{"ov":true,"a":2,"n":"Compare","t":8,"pi":[{"n":"x","pt":$n[0].String,"ps":0},{"n":"y","pt":$n[0].String,"ps":1}],"sn":"compare","rt":$n[0].Int32,"p":[$n[0].String,$n[0].String],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"x","pt":$n[0].String,"ps":0},{"n":"y","pt":$n[0].String,"ps":1}],"sn":"equals2","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"pi":[{"n":"obj","pt":$n[0].String,"ps":0}],"sn":"getHashCode2","rt":$n[0].Int32,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_ignoreCase","t":4,"rt":$n[0].Boolean,"sn":"_ignoreCase","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.TimeSpan", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int64],"pi":[{"n":"ticks","pt":$n[0].Int64,"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32],"pi":[{"n":"hours","pt":$n[0].Int32,"ps":0},{"n":"minutes","pt":$n[0].Int32,"ps":1},{"n":"seconds","pt":$n[0].Int32,"ps":2}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"pi":[{"n":"days","pt":$n[0].Int32,"ps":0},{"n":"hours","pt":$n[0].Int32,"ps":1},{"n":"minutes","pt":$n[0].Int32,"ps":2},{"n":"seconds","pt":$n[0].Int32,"ps":3}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"pi":[{"n":"days","pt":$n[0].Int32,"ps":0},{"n":"hours","pt":$n[0].Int32,"ps":1},{"n":"minutes","pt":$n[0].Int32,"ps":2},{"n":"seconds","pt":$n[0].Int32,"ps":3},{"n":"milliseconds","pt":$n[0].Int32,"ps":4}],"sn":"ctor"},{"a":2,"n":"Add","t":8,"pi":[{"n":"ts","pt":$n[0].TimeSpan,"ps":0}],"sn":"add","rt":$n[0].TimeSpan,"p":[$n[0].TimeSpan]},{"a":2,"n":"Compare","is":true,"t":8,"pi":[{"n":"t1","pt":$n[0].TimeSpan,"ps":0},{"n":"t2","pt":$n[0].TimeSpan,"ps":1}],"tpc":0,"def":function (t1, t2) { return t1.compareTo(t2); },"rt":$n[0].Int32,"p":[$n[0].TimeSpan,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"value","pt":$n[0].TimeSpan,"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Duration","t":8,"sn":"duration","rt":$n[0].TimeSpan},{"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].TimeSpan,"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","is":true,"t":8,"pi":[{"n":"t1","pt":$n[0].TimeSpan,"ps":0},{"n":"t2","pt":$n[0].TimeSpan,"ps":1}],"tpc":0,"def":function (t1, t2) { return (t1).ticks.eq((t2).ticks); },"rt":$n[0].Boolean,"p":[$n[0].TimeSpan,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"sn":"toString","rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"FromDays","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"fromDays","rt":$n[0].TimeSpan,"p":[$n[0].Double]},{"a":2,"n":"FromHours","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"fromHours","rt":$n[0].TimeSpan,"p":[$n[0].Double]},{"a":2,"n":"FromMilliseconds","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"fromMilliseconds","rt":$n[0].TimeSpan,"p":[$n[0].Double]},{"a":2,"n":"FromMinutes","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"fromMinutes","rt":$n[0].TimeSpan,"p":[$n[0].Double]},{"a":2,"n":"FromSeconds","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"fromSeconds","rt":$n[0].TimeSpan,"p":[$n[0].Double]},{"a":2,"n":"FromTicks","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"fromTicks","rt":$n[0].TimeSpan,"p":[$n[0].Int64]},{"a":2,"n":"Negate","t":8,"sn":"negate","rt":$n[0].TimeSpan},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"sn":"parse","rt":$n[0].TimeSpan,"p":[$n[0].String]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"sn":"parse","rt":$n[0].TimeSpan,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"Subtract","t":8,"pi":[{"n":"ts","pt":$n[0].TimeSpan,"ps":0}],"sn":"subtract","rt":$n[0].TimeSpan,"p":[$n[0].TimeSpan]},{"a":4,"n":"TimeToTicks","is":true,"t":8,"pi":[{"n":"hour","pt":$n[0].Int32,"ps":0},{"n":"minute","pt":$n[0].Int32,"ps":1},{"n":"second","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (hour, minute, second) { return TimeToTicks(hour, minute, second); },"rt":$n[0].Int64,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"sn":"format","rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].TimeSpan,"ps":1}],"tpc":0,"def":function (s, result) { return System.TimeSpan.tryParse(s, null, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1},{"n":"result","out":true,"pt":$n[0].TimeSpan,"ps":2}],"tpc":0,"def":function (s, provider, result) { return System.TimeSpan.tryParse(s, provider, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].IFormatProvider,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Addition","is":true,"t":8,"pi":[{"n":"t1","pt":$n[0].TimeSpan,"ps":0},{"n":"t2","pt":$n[0].TimeSpan,"ps":1}],"tpc":0,"def":function (t1, t2) { return System.TimeSpan.add(t1, t2); },"rt":$n[0].TimeSpan,"p":[$n[0].TimeSpan,$n[0].TimeSpan]},{"a":2,"n":"op_Equality","is":true,"t":8,"pi":[{"n":"t1","pt":$n[0].TimeSpan,"ps":0},{"n":"t2","pt":$n[0].TimeSpan,"ps":1}],"tpc":0,"def":function (t1, t2) { return System.TimeSpan.eq(t1, t2); },"rt":$n[0].Boolean,"p":[$n[0].TimeSpan,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_GreaterThan","is":true,"t":8,"pi":[{"n":"t1","pt":$n[0].TimeSpan,"ps":0},{"n":"t2","pt":$n[0].TimeSpan,"ps":1}],"tpc":0,"def":function (t1, t2) { return System.TimeSpan.gt(t1, t2); },"rt":$n[0].Boolean,"p":[$n[0].TimeSpan,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_GreaterThanOrEqual","is":true,"t":8,"pi":[{"n":"t1","pt":$n[0].TimeSpan,"ps":0},{"n":"t2","pt":$n[0].TimeSpan,"ps":1}],"tpc":0,"def":function (t1, t2) { return System.TimeSpan.gte(t1, t2); },"rt":$n[0].Boolean,"p":[$n[0].TimeSpan,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Inequality","is":true,"t":8,"pi":[{"n":"t1","pt":$n[0].TimeSpan,"ps":0},{"n":"t2","pt":$n[0].TimeSpan,"ps":1}],"tpc":0,"def":function (t1, t2) { return System.TimeSpan.neq(t1, t2); },"rt":$n[0].Boolean,"p":[$n[0].TimeSpan,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_LessThan","is":true,"t":8,"pi":[{"n":"t1","pt":$n[0].TimeSpan,"ps":0},{"n":"t2","pt":$n[0].TimeSpan,"ps":1}],"tpc":0,"def":function (t1, t2) { return System.TimeSpan.lt(t1, t2); },"rt":$n[0].Boolean,"p":[$n[0].TimeSpan,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_LessThanOrEqual","is":true,"t":8,"pi":[{"n":"t1","pt":$n[0].TimeSpan,"ps":0},{"n":"t2","pt":$n[0].TimeSpan,"ps":1}],"tpc":0,"def":function (t1, t2) { return System.TimeSpan.lte(t1, t2); },"rt":$n[0].Boolean,"p":[$n[0].TimeSpan,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Subtraction","is":true,"t":8,"pi":[{"n":"t1","pt":$n[0].TimeSpan,"ps":0},{"n":"t2","pt":$n[0].TimeSpan,"ps":1}],"tpc":0,"def":function (t1, t2) { return System.TimeSpan.sub(t1, t2); },"rt":$n[0].TimeSpan,"p":[$n[0].TimeSpan,$n[0].TimeSpan]},{"a":2,"n":"op_UnaryNegation","is":true,"t":8,"pi":[{"n":"t","pt":$n[0].TimeSpan,"ps":0}],"tpc":0,"def":function (t) { return System.TimeSpan.neg(t); },"rt":$n[0].TimeSpan,"p":[$n[0].TimeSpan]},{"a":2,"n":"op_UnaryPlus","is":true,"t":8,"pi":[{"n":"t","pt":$n[0].TimeSpan,"ps":0}],"tpc":0,"def":function (t) { return System.TimeSpan.plus(t); },"rt":$n[0].TimeSpan,"p":[$n[0].TimeSpan]},{"a":2,"n":"Days","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Days","t":8,"tpc":0,"def":function () { return this.getDays(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Hours","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Hours","t":8,"tpc":0,"def":function () { return this.getHours(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Milliseconds","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Milliseconds","t":8,"tpc":0,"def":function () { return this.getMilliseconds(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Minutes","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Minutes","t":8,"tpc":0,"def":function () { return this.getMinutes(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Seconds","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Seconds","t":8,"tpc":0,"def":function () { return this.getSeconds(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Ticks","t":16,"rt":$n[0].Int64,"g":{"a":2,"n":"get_Ticks","t":8,"tpc":0,"def":function () { return this.getTicks(); },"rt":$n[0].Int64}},{"a":2,"n":"TotalDays","t":16,"rt":$n[0].Double,"g":{"a":2,"n":"get_TotalDays","t":8,"tpc":0,"def":function () { return this.getTotalDays(); },"rt":$n[0].Double,"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}}},{"a":2,"n":"TotalHours","t":16,"rt":$n[0].Double,"g":{"a":2,"n":"get_TotalHours","t":8,"tpc":0,"def":function () { return this.getTotalHours(); },"rt":$n[0].Double,"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}}},{"a":2,"n":"TotalMilliseconds","t":16,"rt":$n[0].Double,"g":{"a":2,"n":"get_TotalMilliseconds","t":8,"tpc":0,"def":function () { return this.getTotalMilliseconds(); },"rt":$n[0].Double,"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}}},{"a":2,"n":"TotalMinutes","t":16,"rt":$n[0].Double,"g":{"a":2,"n":"get_TotalMinutes","t":8,"tpc":0,"def":function () { return this.getTotalMinutes(); },"rt":$n[0].Double,"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}}},{"a":2,"n":"TotalSeconds","t":16,"rt":$n[0].Double,"g":{"a":2,"n":"get_TotalSeconds","t":8,"tpc":0,"def":function () { return this.getTotalSeconds(); },"rt":$n[0].Double,"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}}},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].TimeSpan,"sn":"maxValue","ro":true},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].TimeSpan,"sn":"minValue","ro":true},{"a":2,"n":"TicksPerDay","is":true,"t":4,"rt":$n[0].Int64,"sn":"TicksPerDay"},{"a":2,"n":"TicksPerHour","is":true,"t":4,"rt":$n[0].Int64,"sn":"TicksPerHour"},{"a":2,"n":"TicksPerMillisecond","is":true,"t":4,"rt":$n[0].Int64,"sn":"TicksPerMillisecond"},{"a":2,"n":"TicksPerMinute","is":true,"t":4,"rt":$n[0].Int64,"sn":"TicksPerMinute"},{"a":2,"n":"TicksPerSecond","is":true,"t":4,"rt":$n[0].Int64,"sn":"TicksPerSecond"},{"a":2,"n":"Zero","is":true,"t":4,"rt":$n[0].TimeSpan,"sn":"zero","ro":true},{"a":4,"n":"_ticks","t":4,"rt":$n[0].Int64,"sn":"_ticks"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Days","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Hours","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Milliseconds","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Minutes","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Seconds","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int64,"sn":"Ticks"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Double,"sn":"TotalDays","box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Double,"sn":"TotalHours","box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Double,"sn":"TotalMilliseconds","box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Double,"sn":"TotalMinutes","box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Double,"sn":"TotalSeconds","box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}}]}; }, $n); - $m("System.Tuple$1", function (T1) { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[T1],"pi":[{"n":"item1","pt":T1,"ps":0}],"def":function (item1) { return { Item1: item1 }; }},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"o","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (o) { return H5.objectEquals(this, o, true); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"tpc":0,"def":function () { return H5.getHashCode(this, false, true); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Item1","t":16,"rt":T1,"g":{"a":2,"n":"get_Item1","t":8,"tpc":0,"def":function () { return this.Item1; },"rt":T1}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T1,"sn":"Item1"}]}; }, $n); - $m("System.Tuple$2", function (T1, T2) { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[T1,T2],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1}],"def":function (item1, item2) { return { Item1: item1, Item2: item2 }; }},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"o","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (o) { return H5.objectEquals(this, o, true); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"tpc":0,"def":function () { return H5.getHashCode(this, false, true); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Item1","t":16,"rt":T1,"g":{"a":2,"n":"get_Item1","t":8,"tpc":0,"def":function () { return this.Item1; },"rt":T1}},{"a":2,"n":"Item2","t":16,"rt":T2,"g":{"a":2,"n":"get_Item2","t":8,"tpc":0,"def":function () { return this.Item2; },"rt":T2}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T1,"sn":"Item1"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T2,"sn":"Item2"}]}; }, $n); - $m("System.Tuple$3", function (T1, T2, T3) { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[T1,T2,T3],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1},{"n":"item3","pt":T3,"ps":2}],"def":function (item1, item2, item3) { return { Item1: item1, Item2: item2, Item3: item3 }; }},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"o","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (o) { return H5.objectEquals(this, o, true); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"tpc":0,"def":function () { return H5.getHashCode(this, false, true); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Item1","t":16,"rt":T1,"g":{"a":2,"n":"get_Item1","t":8,"tpc":0,"def":function () { return this.Item1; },"rt":T1}},{"a":2,"n":"Item2","t":16,"rt":T2,"g":{"a":2,"n":"get_Item2","t":8,"tpc":0,"def":function () { return this.Item2; },"rt":T2}},{"a":2,"n":"Item3","t":16,"rt":T3,"g":{"a":2,"n":"get_Item3","t":8,"tpc":0,"def":function () { return this.Item3; },"rt":T3}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T1,"sn":"Item1"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T2,"sn":"Item2"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T3,"sn":"Item3"}]}; }, $n); - $m("System.Tuple$4", function (T1, T2, T3, T4) { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[T1,T2,T3,T4],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1},{"n":"item3","pt":T3,"ps":2},{"n":"item4","pt":T4,"ps":3}],"def":function (item1, item2, item3, item4) { return { Item1: item1, Item2: item2, Item3: item3, Item4: item4 }; }},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"o","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (o) { return H5.objectEquals(this, o, true); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"tpc":0,"def":function () { return H5.getHashCode(this, false, true); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Item1","t":16,"rt":T1,"g":{"a":2,"n":"get_Item1","t":8,"tpc":0,"def":function () { return this.Item1; },"rt":T1}},{"a":2,"n":"Item2","t":16,"rt":T2,"g":{"a":2,"n":"get_Item2","t":8,"tpc":0,"def":function () { return this.Item2; },"rt":T2}},{"a":2,"n":"Item3","t":16,"rt":T3,"g":{"a":2,"n":"get_Item3","t":8,"tpc":0,"def":function () { return this.Item3; },"rt":T3}},{"a":2,"n":"Item4","t":16,"rt":T4,"g":{"a":2,"n":"get_Item4","t":8,"tpc":0,"def":function () { return this.Item4; },"rt":T4}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T1,"sn":"Item1"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T2,"sn":"Item2"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T3,"sn":"Item3"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T4,"sn":"Item4"}]}; }, $n); - $m("System.Tuple$5", function (T1, T2, T3, T4, T5) { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[T1,T2,T3,T4,T5],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1},{"n":"item3","pt":T3,"ps":2},{"n":"item4","pt":T4,"ps":3},{"n":"item5","pt":T5,"ps":4}],"def":function (item1, item2, item3, item4, item5) { return { Item1: item1, Item2: item2, Item3: item3, Item4: item4, Item5: item5 }; }},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"o","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (o) { return H5.objectEquals(this, o, true); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"tpc":0,"def":function () { return H5.getHashCode(this, false, true); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Item1","t":16,"rt":T1,"g":{"a":2,"n":"get_Item1","t":8,"tpc":0,"def":function () { return this.Item1; },"rt":T1}},{"a":2,"n":"Item2","t":16,"rt":T2,"g":{"a":2,"n":"get_Item2","t":8,"tpc":0,"def":function () { return this.Item2; },"rt":T2}},{"a":2,"n":"Item3","t":16,"rt":T3,"g":{"a":2,"n":"get_Item3","t":8,"tpc":0,"def":function () { return this.Item3; },"rt":T3}},{"a":2,"n":"Item4","t":16,"rt":T4,"g":{"a":2,"n":"get_Item4","t":8,"tpc":0,"def":function () { return this.Item4; },"rt":T4}},{"a":2,"n":"Item5","t":16,"rt":T5,"g":{"a":2,"n":"get_Item5","t":8,"tpc":0,"def":function () { return this.Item5; },"rt":T5}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T1,"sn":"Item1"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T2,"sn":"Item2"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T3,"sn":"Item3"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T4,"sn":"Item4"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T5,"sn":"Item5"}]}; }, $n); - $m("System.Tuple$6", function (T1, T2, T3, T4, T5, T6) { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[T1,T2,T3,T4,T5,T6],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1},{"n":"item3","pt":T3,"ps":2},{"n":"item4","pt":T4,"ps":3},{"n":"item5","pt":T5,"ps":4},{"n":"item6","pt":T6,"ps":5}],"def":function (item1, item2, item3, item4, item5, item6) { return { Item1: item1, Item2: item2, Item3: item3, Item4: item4, Item5: item5, Item6: item6 }; }},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"o","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (o) { return H5.objectEquals(this, o, true); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"tpc":0,"def":function () { return H5.getHashCode(this, false, true); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Item1","t":16,"rt":T1,"g":{"a":2,"n":"get_Item1","t":8,"tpc":0,"def":function () { return this.Item1; },"rt":T1}},{"a":2,"n":"Item2","t":16,"rt":T2,"g":{"a":2,"n":"get_Item2","t":8,"tpc":0,"def":function () { return this.Item2; },"rt":T2}},{"a":2,"n":"Item3","t":16,"rt":T3,"g":{"a":2,"n":"get_Item3","t":8,"tpc":0,"def":function () { return this.Item3; },"rt":T3}},{"a":2,"n":"Item4","t":16,"rt":T4,"g":{"a":2,"n":"get_Item4","t":8,"tpc":0,"def":function () { return this.Item4; },"rt":T4}},{"a":2,"n":"Item5","t":16,"rt":T5,"g":{"a":2,"n":"get_Item5","t":8,"tpc":0,"def":function () { return this.Item5; },"rt":T5}},{"a":2,"n":"Item6","t":16,"rt":T6,"g":{"a":2,"n":"get_Item6","t":8,"tpc":0,"def":function () { return this.Item6; },"rt":T6}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T1,"sn":"Item1"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T2,"sn":"Item2"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T3,"sn":"Item3"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T4,"sn":"Item4"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T5,"sn":"Item5"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T6,"sn":"Item6"}]}; }, $n); - $m("System.Tuple$7", function (T1, T2, T3, T4, T5, T6, T7) { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[T1,T2,T3,T4,T5,T6,T7],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1},{"n":"item3","pt":T3,"ps":2},{"n":"item4","pt":T4,"ps":3},{"n":"item5","pt":T5,"ps":4},{"n":"item6","pt":T6,"ps":5},{"n":"item7","pt":T7,"ps":6}],"def":function (item1, item2, item3, item4, item5, item6, item7) { return { Item1: item1, Item2: item2, Item3: item3, Item4: item4, Item5: item5, Item6: item6, Item7: item7 }; }},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"o","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (o) { return H5.objectEquals(this, o, true); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"tpc":0,"def":function () { return H5.getHashCode(this, false, true); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Item1","t":16,"rt":T1,"g":{"a":2,"n":"get_Item1","t":8,"tpc":0,"def":function () { return this.Item1; },"rt":T1}},{"a":2,"n":"Item2","t":16,"rt":T2,"g":{"a":2,"n":"get_Item2","t":8,"tpc":0,"def":function () { return this.Item2; },"rt":T2}},{"a":2,"n":"Item3","t":16,"rt":T3,"g":{"a":2,"n":"get_Item3","t":8,"tpc":0,"def":function () { return this.Item3; },"rt":T3}},{"a":2,"n":"Item4","t":16,"rt":T4,"g":{"a":2,"n":"get_Item4","t":8,"tpc":0,"def":function () { return this.Item4; },"rt":T4}},{"a":2,"n":"Item5","t":16,"rt":T5,"g":{"a":2,"n":"get_Item5","t":8,"tpc":0,"def":function () { return this.Item5; },"rt":T5}},{"a":2,"n":"Item6","t":16,"rt":T6,"g":{"a":2,"n":"get_Item6","t":8,"tpc":0,"def":function () { return this.Item6; },"rt":T6}},{"a":2,"n":"Item7","t":16,"rt":T7,"g":{"a":2,"n":"get_Item7","t":8,"tpc":0,"def":function () { return this.Item7; },"rt":T7}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T1,"sn":"Item1"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T2,"sn":"Item2"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T3,"sn":"Item3"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T4,"sn":"Item4"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T5,"sn":"Item5"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T6,"sn":"Item6"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T7,"sn":"Item7"}]}; }, $n); - $m("System.Tuple$8", function (T1, T2, T3, T4, T5, T6, T7, TRest) { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[T1,T2,T3,T4,T5,T6,T7,TRest],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1},{"n":"item3","pt":T3,"ps":2},{"n":"item4","pt":T4,"ps":3},{"n":"item5","pt":T5,"ps":4},{"n":"item6","pt":T6,"ps":5},{"n":"item7","pt":T7,"ps":6},{"n":"rest","pt":TRest,"ps":7}],"def":function (item1, item2, item3, item4, item5, item6, item7, rest) { return { Item1: item1, Item2: item2, Item3: item3, Item4: item4, Item5: item5, Item6: item6, Item7: item7, rest: rest }; }},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"o","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (o) { return H5.objectEquals(this, o, true); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"tpc":0,"def":function () { return H5.getHashCode(this, false, true); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Item1","t":16,"rt":T1,"g":{"a":2,"n":"get_Item1","t":8,"tpc":0,"def":function () { return this.Item1; },"rt":T1}},{"a":2,"n":"Item2","t":16,"rt":T2,"g":{"a":2,"n":"get_Item2","t":8,"tpc":0,"def":function () { return this.Item2; },"rt":T2}},{"a":2,"n":"Item3","t":16,"rt":T3,"g":{"a":2,"n":"get_Item3","t":8,"tpc":0,"def":function () { return this.Item3; },"rt":T3}},{"a":2,"n":"Item4","t":16,"rt":T4,"g":{"a":2,"n":"get_Item4","t":8,"tpc":0,"def":function () { return this.Item4; },"rt":T4}},{"a":2,"n":"Item5","t":16,"rt":T5,"g":{"a":2,"n":"get_Item5","t":8,"tpc":0,"def":function () { return this.Item5; },"rt":T5}},{"a":2,"n":"Item6","t":16,"rt":T6,"g":{"a":2,"n":"get_Item6","t":8,"tpc":0,"def":function () { return this.Item6; },"rt":T6}},{"a":2,"n":"Item7","t":16,"rt":T7,"g":{"a":2,"n":"get_Item7","t":8,"tpc":0,"def":function () { return this.Item7; },"rt":T7}},{"a":2,"n":"Rest","t":16,"rt":TRest,"g":{"a":2,"n":"get_Rest","t":8,"tpc":0,"def":function () { return this.rest; },"rt":TRest}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T1,"sn":"Item1"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T2,"sn":"Item2"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T3,"sn":"Item3"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T4,"sn":"Item4"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T5,"sn":"Item5"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T6,"sn":"Item6"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T7,"sn":"Item7"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":TRest,"sn":"Rest"}]}; }, $n); - $m("System.Tuple", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0}],"tpc":1,"def":function (T1, item1) { return { Item1: item1 }; },"rt":$n[0].Tuple$1(System.Object),"p":[System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1}],"tpc":2,"def":function (T1, T2, item1, item2) { return { Item1: item1, Item2: item2 }; },"rt":$n[0].Tuple$2(System.Object,System.Object),"p":[System.Object,System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1},{"n":"item3","pt":System.Object,"ps":2}],"tpc":3,"def":function (T1, T2, T3, item1, item2, item3) { return { Item1: item1, Item2: item2, Item3: item3 }; },"rt":$n[0].Tuple$3(System.Object,System.Object,System.Object),"p":[System.Object,System.Object,System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1},{"n":"item3","pt":System.Object,"ps":2},{"n":"item4","pt":System.Object,"ps":3}],"tpc":4,"def":function (T1, T2, T3, T4, item1, item2, item3, item4) { return { Item1: item1, Item2: item2, Item3: item3, Item4: item4 }; },"rt":$n[0].Tuple$4(System.Object,System.Object,System.Object,System.Object),"p":[System.Object,System.Object,System.Object,System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1},{"n":"item3","pt":System.Object,"ps":2},{"n":"item4","pt":System.Object,"ps":3},{"n":"item5","pt":System.Object,"ps":4}],"tpc":5,"def":function (T1, T2, T3, T4, T5, item1, item2, item3, item4, item5) { return { Item1: item1, Item2: item2, Item3: item3, Item4: item4, Item5: item5 }; },"rt":$n[0].Tuple$5(System.Object,System.Object,System.Object,System.Object,System.Object),"p":[System.Object,System.Object,System.Object,System.Object,System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1},{"n":"item3","pt":System.Object,"ps":2},{"n":"item4","pt":System.Object,"ps":3},{"n":"item5","pt":System.Object,"ps":4},{"n":"item6","pt":System.Object,"ps":5}],"tpc":6,"def":function (T1, T2, T3, T4, T5, T6, item1, item2, item3, item4, item5, item6) { return { Item1: item1, Item2: item2, Item3: item3, Item4: item4, Item5: item5, Item6: item6 }; },"rt":$n[0].Tuple$6(System.Object,System.Object,System.Object,System.Object,System.Object,System.Object),"p":[System.Object,System.Object,System.Object,System.Object,System.Object,System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1},{"n":"item3","pt":System.Object,"ps":2},{"n":"item4","pt":System.Object,"ps":3},{"n":"item5","pt":System.Object,"ps":4},{"n":"item6","pt":System.Object,"ps":5},{"n":"item7","pt":System.Object,"ps":6}],"tpc":7,"def":function (T1, T2, T3, T4, T5, T6, T7, item1, item2, item3, item4, item5, item6, item7) { return { Item1: item1, Item2: item2, Item3: item3, Item4: item4, Item5: item5, Item6: item6, Item7: item7 }; },"rt":$n[0].Tuple$7(System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object),"p":[System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1},{"n":"item3","pt":System.Object,"ps":2},{"n":"item4","pt":System.Object,"ps":3},{"n":"item5","pt":System.Object,"ps":4},{"n":"item6","pt":System.Object,"ps":5},{"n":"item7","pt":System.Object,"ps":6},{"n":"rest","pt":System.Object,"ps":7}],"tpc":8,"def":function (T1, T2, T3, T4, T5, T6, T7, TRest, item1, item2, item3, item4, item5, item6, item7, rest) { return { Item1: item1, Item2: item2, Item3: item3, Item4: item4, Item5: item5, Item6: item6, Item7: item7, rest: rest }; },"rt":$n[0].Tuple$8(System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object),"p":[System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object]}]}; }, $n); - $m("System.TypeCode", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Boolean","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"Boolean","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"Byte","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"Byte","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"Char","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"Char","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"DBNull","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"DBNull","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"DateTime","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"DateTime","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"Decimal","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"Decimal","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"Double","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"Double","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"Empty","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"Empty","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"Int16","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"Int16","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"Int32","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"Int32","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"Int64","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"Int64","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"Object","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"Object","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"SByte","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"SByte","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"Single","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"Single","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"String","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"String","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"UInt16","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"UInt16","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"UInt32","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"UInt32","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}},{"a":2,"n":"UInt64","is":true,"t":4,"rt":$n[0].TypeCode,"sn":"UInt64","box":function ($v) { return H5.box($v, System.TypeCode, System.Enum.toStringFn(System.TypeCode));}}]}; }, $n); - $m("System.TypeCodeValues", function () { return {"att":1048960,"a":4,"s":true,"m":[{"a":2,"n":"Boolean","is":true,"t":4,"rt":$n[0].String,"sn":"Boolean"},{"a":2,"n":"Byte","is":true,"t":4,"rt":$n[0].String,"sn":"Byte"},{"a":2,"n":"Char","is":true,"t":4,"rt":$n[0].String,"sn":"Char"},{"a":2,"n":"DBNull","is":true,"t":4,"rt":$n[0].String,"sn":"DBNull"},{"a":2,"n":"DateTime","is":true,"t":4,"rt":$n[0].String,"sn":"DateTime"},{"a":2,"n":"Decimal","is":true,"t":4,"rt":$n[0].String,"sn":"Decimal"},{"a":2,"n":"Double","is":true,"t":4,"rt":$n[0].String,"sn":"Double"},{"a":2,"n":"Empty","is":true,"t":4,"rt":$n[0].String,"sn":"Empty"},{"a":2,"n":"Int16","is":true,"t":4,"rt":$n[0].String,"sn":"Int16"},{"a":2,"n":"Int32","is":true,"t":4,"rt":$n[0].String,"sn":"Int32"},{"a":2,"n":"Int64","is":true,"t":4,"rt":$n[0].String,"sn":"Int64"},{"a":2,"n":"Object","is":true,"t":4,"rt":$n[0].String,"sn":"Object"},{"a":2,"n":"SByte","is":true,"t":4,"rt":$n[0].String,"sn":"SByte"},{"a":2,"n":"Single","is":true,"t":4,"rt":$n[0].String,"sn":"Single"},{"a":2,"n":"String","is":true,"t":4,"rt":$n[0].String,"sn":"String"},{"a":2,"n":"UInt16","is":true,"t":4,"rt":$n[0].String,"sn":"UInt16"},{"a":2,"n":"UInt32","is":true,"t":4,"rt":$n[0].String,"sn":"UInt32"},{"a":2,"n":"UInt64","is":true,"t":4,"rt":$n[0].String,"sn":"UInt64"}]}; }, $n); - $m("System.UInt16", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"def":function () { return Number; }},{"a":1,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"def":function (i) { return Number; }},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (obj) { return H5.compare(this, obj); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].UInt16,"ps":0}],"tpc":0,"def":function (other) { return H5.compare(this, other); },"rt":$n[0].Int32,"p":[$n[0].UInt16],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (other) { return System.UInt16.equals(this, other); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].UInt16,"ps":0}],"tpc":0,"def":function (other) { return this === other; },"rt":$n[0].Boolean,"p":[$n[0].UInt16],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.UInt16.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.UInt16.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (s) { return System.UInt16.parse(s); },"rt":$n[0].UInt16,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.UInt16);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"radix","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, radix) { return System.UInt16.parse(s, radix); },"rt":$n[0].UInt16,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.UInt16);}},{"a":2,"n":"ToString","t":8,"pi":[{"n":"radix","pt":$n[0].Int32,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.UInt16.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.UInt16.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].UInt16,"ps":1}],"tpc":0,"def":function (s, result) { return System.UInt16.tryParse(s, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].UInt16],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].UInt16,"ps":1},{"n":"radix","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (s, result, radix) { return System.UInt16.tryParse(s, result, radix); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].UInt16,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].UInt16,"sn":"MaxValue","box":function ($v) { return H5.box($v, System.UInt16);}},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].UInt16,"sn":"MinValue","box":function ($v) { return H5.box($v, System.UInt16);}}]}; }, $n); - $m("System.UInt32", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"def":function () { return Number; }},{"a":1,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"def":function (i) { return Number; }},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (obj) { return H5.compare(this, obj); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].UInt32,"ps":0}],"tpc":0,"def":function (other) { return H5.compare(this, other); },"rt":$n[0].Int32,"p":[$n[0].UInt32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (other) { return System.UInt32.equals(this, other); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].UInt32,"ps":0}],"tpc":0,"def":function (other) { return this === other; },"rt":$n[0].Boolean,"p":[$n[0].UInt32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.UInt32.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.UInt32.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (s) { return System.UInt32.parse(s); },"rt":$n[0].UInt32,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.UInt32);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"radix","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (s, radix) { return System.UInt32.parse(s, radix); },"rt":$n[0].UInt32,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.UInt32);}},{"a":2,"n":"ToString","t":8,"pi":[{"n":"radix","pt":$n[0].Int32,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (format) { return System.UInt32.format(this, format); },"rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"tpc":0,"def":function (format, provider) { return System.UInt32.format(this, format, provider); },"rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].UInt32,"ps":1}],"tpc":0,"def":function (s, result) { return System.UInt32.tryParse(s, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].UInt32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].UInt32,"ps":1},{"n":"radix","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (s, result, radix) { return System.UInt32.tryParse(s, result, radix); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].UInt32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].UInt32,"sn":"MaxValue","box":function ($v) { return H5.box($v, System.UInt32);}},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].UInt32,"sn":"MinValue","box":function ($v) { return H5.box($v, System.UInt32);}}]}; }, $n); - $m("System.UInt64", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":1,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"sn":"ctor"},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].UInt64,"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].UInt64],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].UInt64,"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].UInt64],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"sn":"format","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Format","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"sn":"format","rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (s) { return System.UInt64.parse(s); },"rt":$n[0].UInt64,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"radix","pt":$n[0].Int32,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0}],"sn":"toString","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ToString","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"provider","pt":$n[0].IFormatProvider,"ps":1}],"sn":"format","rt":$n[0].String,"p":[$n[0].String,$n[0].IFormatProvider]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].UInt64,"ps":1}],"tpc":0,"def":function (s, result) { return System.UInt64.tryParse(s, result); },"rt":$n[0].Boolean,"p":[$n[0].String,$n[0].UInt64],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"op_Explicit","rt":$n[0].UInt64,"p":[$n[0].Double]},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"sn":"op_Explicit","rt":$n[0].UInt64,"p":[$n[0].Single]},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"op_Explicit","rt":$n[0].Byte,"p":[$n[0].UInt64],"box":function ($v) { return H5.box($v, System.Byte);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"op_Explicit","rt":$n[0].Char,"p":[$n[0].UInt64],"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"op_Explicit","rt":$n[0].Double,"p":[$n[0].UInt64],"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"op_Explicit","rt":$n[0].Int16,"p":[$n[0].UInt64],"box":function ($v) { return H5.box($v, System.Int16);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"op_Explicit","rt":$n[0].Int32,"p":[$n[0].UInt64],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"op_Explicit","rt":$n[0].SByte,"p":[$n[0].UInt64],"box":function ($v) { return H5.box($v, System.SByte);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"op_Explicit","rt":$n[0].Single,"p":[$n[0].UInt64],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"op_Explicit","rt":$n[0].UInt16,"p":[$n[0].UInt64],"box":function ($v) { return H5.box($v, System.UInt16);}},{"a":2,"n":"op_Explicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"op_Explicit","rt":$n[0].UInt32,"p":[$n[0].UInt64],"box":function ($v) { return H5.box($v, System.UInt32);}},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Byte,"ps":0}],"sn":"op_Implicit","rt":$n[0].UInt64,"p":[$n[0].Byte]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"sn":"op_Implicit","rt":$n[0].UInt64,"p":[$n[0].Char]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int16,"ps":0}],"sn":"op_Implicit","rt":$n[0].UInt64,"p":[$n[0].Int16]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"op_Implicit","rt":$n[0].UInt64,"p":[$n[0].Int32]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].SByte,"ps":0}],"sn":"op_Implicit","rt":$n[0].UInt64,"p":[$n[0].SByte]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt16,"ps":0}],"sn":"op_Implicit","rt":$n[0].UInt64,"p":[$n[0].UInt16]},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].UInt32,"ps":0}],"sn":"op_Implicit","rt":$n[0].UInt64,"p":[$n[0].UInt32]},{"a":2,"n":"MaxValue","is":true,"t":4,"rt":$n[0].UInt64,"sn":"MaxValue"},{"a":2,"n":"MinValue","is":true,"t":4,"rt":$n[0].UInt64,"sn":"MinValue"}]}; }, $n); - $m("System.Uri", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"uriString","pt":$n[0].String,"ps":0}],"sn":"ctor"},{"a":2,"n":"op_Equality","is":true,"t":8,"pi":[{"n":"uri1","pt":$n[0].Uri,"ps":0},{"n":"uri2","pt":$n[0].Uri,"ps":1}],"tpc":0,"def":function (uri1, uri2) { return System.Uri.equals(uri1, uri2); },"rt":$n[0].Boolean,"p":[$n[0].Uri,$n[0].Uri],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Inequality","is":true,"t":8,"pi":[{"n":"uri1","pt":$n[0].Uri,"ps":0},{"n":"uri2","pt":$n[0].Uri,"ps":1}],"tpc":0,"def":function (uri1, uri2) { return System.Uri.notEquals(uri1, uri2); },"rt":$n[0].Boolean,"p":[$n[0].Uri,$n[0].Uri],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"AbsoluteUri","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_AbsoluteUri","t":8,"tpc":0,"def":function () { return this.getAbsoluteUri(); },"rt":$n[0].String}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"AbsoluteUri"}]}; }, $n); - $m("System.ITupleInternal", function () { return {"att":1048736,"a":4,"m":[{"ab":true,"a":2,"n":"GetHashCode","t":8,"pi":[{"n":"comparer","pt":$n[6].IEqualityComparer,"ps":0}],"sn":"System$ITupleInternal$GetHashCode","rt":$n[0].Int32,"p":[$n[6].IEqualityComparer],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"ToStringEnd","t":8,"sn":"System$ITupleInternal$ToStringEnd","rt":$n[0].String},{"ab":true,"a":2,"n":"Size","t":16,"rt":$n[0].Int32,"g":{"ab":true,"a":2,"n":"get_Size","t":8,"rt":$n[0].Int32,"fg":"System$ITupleInternal$Size","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"System$ITupleInternal$Size"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"System$ITupleInternal$Size","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.ValueTuple$1", function (T1) { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[T1],"pi":[{"n":"item1","pt":T1,"ps":0}],"sn":"$ctor1"},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$1(T1),"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].ValueTuple$1(T1)],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$1(T1),"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].ValueTuple$1(T1)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":1,"n":"s_t1Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T1),"g":{"a":1,"n":"get_s_t1Comparer","t":8,"rt":$n[3].EqualityComparer$1(T1),"fg":"s_t1Comparer","is":true},"fn":"s_t1Comparer"},{"a":2,"n":"Item1","t":4,"rt":T1,"sn":"Item1"}]}; }, $n); - $m("System.ValueTuple$2", function (T1, T2) { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[T1,T2],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1}],"sn":"$ctor1"},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$2(T1,T2),"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].ValueTuple$2(T1,T2)],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$2(T1,T2),"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].ValueTuple$2(T1,T2)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"GetHashCodeCore","t":8,"pi":[{"n":"comparer","pt":$n[6].IEqualityComparer,"ps":0}],"sn":"GetHashCodeCore","rt":$n[0].Int32,"p":[$n[6].IEqualityComparer],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":1,"n":"s_t1Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T1),"g":{"a":1,"n":"get_s_t1Comparer","t":8,"rt":$n[3].EqualityComparer$1(T1),"fg":"s_t1Comparer","is":true},"fn":"s_t1Comparer"},{"a":1,"n":"s_t2Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T2),"g":{"a":1,"n":"get_s_t2Comparer","t":8,"rt":$n[3].EqualityComparer$1(T2),"fg":"s_t2Comparer","is":true},"fn":"s_t2Comparer"},{"a":2,"n":"Item1","t":4,"rt":T1,"sn":"Item1"},{"a":2,"n":"Item2","t":4,"rt":T2,"sn":"Item2"}]}; }, $n); - $m("System.ValueTuple$3", function (T1, T2, T3) { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[T1,T2,T3],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1},{"n":"item3","pt":T3,"ps":2}],"sn":"$ctor1"},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$3(T1,T2,T3),"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].ValueTuple$3(T1,T2,T3)],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$3(T1,T2,T3),"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].ValueTuple$3(T1,T2,T3)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"GetHashCodeCore","t":8,"pi":[{"n":"comparer","pt":$n[6].IEqualityComparer,"ps":0}],"sn":"GetHashCodeCore","rt":$n[0].Int32,"p":[$n[6].IEqualityComparer],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":1,"n":"s_t1Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T1),"g":{"a":1,"n":"get_s_t1Comparer","t":8,"rt":$n[3].EqualityComparer$1(T1),"fg":"s_t1Comparer","is":true},"fn":"s_t1Comparer"},{"a":1,"n":"s_t2Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T2),"g":{"a":1,"n":"get_s_t2Comparer","t":8,"rt":$n[3].EqualityComparer$1(T2),"fg":"s_t2Comparer","is":true},"fn":"s_t2Comparer"},{"a":1,"n":"s_t3Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T3),"g":{"a":1,"n":"get_s_t3Comparer","t":8,"rt":$n[3].EqualityComparer$1(T3),"fg":"s_t3Comparer","is":true},"fn":"s_t3Comparer"},{"a":2,"n":"Item1","t":4,"rt":T1,"sn":"Item1"},{"a":2,"n":"Item2","t":4,"rt":T2,"sn":"Item2"},{"a":2,"n":"Item3","t":4,"rt":T3,"sn":"Item3"}]}; }, $n); - $m("System.ValueTuple$4", function (T1, T2, T3, T4) { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[T1,T2,T3,T4],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1},{"n":"item3","pt":T3,"ps":2},{"n":"item4","pt":T4,"ps":3}],"sn":"$ctor1"},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$4(T1,T2,T3,T4),"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].ValueTuple$4(T1,T2,T3,T4)],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$4(T1,T2,T3,T4),"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].ValueTuple$4(T1,T2,T3,T4)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"GetHashCodeCore","t":8,"pi":[{"n":"comparer","pt":$n[6].IEqualityComparer,"ps":0}],"sn":"GetHashCodeCore","rt":$n[0].Int32,"p":[$n[6].IEqualityComparer],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":1,"n":"s_t1Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T1),"g":{"a":1,"n":"get_s_t1Comparer","t":8,"rt":$n[3].EqualityComparer$1(T1),"fg":"s_t1Comparer","is":true},"fn":"s_t1Comparer"},{"a":1,"n":"s_t2Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T2),"g":{"a":1,"n":"get_s_t2Comparer","t":8,"rt":$n[3].EqualityComparer$1(T2),"fg":"s_t2Comparer","is":true},"fn":"s_t2Comparer"},{"a":1,"n":"s_t3Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T3),"g":{"a":1,"n":"get_s_t3Comparer","t":8,"rt":$n[3].EqualityComparer$1(T3),"fg":"s_t3Comparer","is":true},"fn":"s_t3Comparer"},{"a":1,"n":"s_t4Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T4),"g":{"a":1,"n":"get_s_t4Comparer","t":8,"rt":$n[3].EqualityComparer$1(T4),"fg":"s_t4Comparer","is":true},"fn":"s_t4Comparer"},{"a":2,"n":"Item1","t":4,"rt":T1,"sn":"Item1"},{"a":2,"n":"Item2","t":4,"rt":T2,"sn":"Item2"},{"a":2,"n":"Item3","t":4,"rt":T3,"sn":"Item3"},{"a":2,"n":"Item4","t":4,"rt":T4,"sn":"Item4"}]}; }, $n); - $m("System.ValueTuple$5", function (T1, T2, T3, T4, T5) { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[T1,T2,T3,T4,T5],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1},{"n":"item3","pt":T3,"ps":2},{"n":"item4","pt":T4,"ps":3},{"n":"item5","pt":T5,"ps":4}],"sn":"$ctor1"},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$5(T1,T2,T3,T4,T5),"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].ValueTuple$5(T1,T2,T3,T4,T5)],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$5(T1,T2,T3,T4,T5),"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].ValueTuple$5(T1,T2,T3,T4,T5)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"GetHashCodeCore","t":8,"pi":[{"n":"comparer","pt":$n[6].IEqualityComparer,"ps":0}],"sn":"GetHashCodeCore","rt":$n[0].Int32,"p":[$n[6].IEqualityComparer],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":1,"n":"s_t1Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T1),"g":{"a":1,"n":"get_s_t1Comparer","t":8,"rt":$n[3].EqualityComparer$1(T1),"fg":"s_t1Comparer","is":true},"fn":"s_t1Comparer"},{"a":1,"n":"s_t2Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T2),"g":{"a":1,"n":"get_s_t2Comparer","t":8,"rt":$n[3].EqualityComparer$1(T2),"fg":"s_t2Comparer","is":true},"fn":"s_t2Comparer"},{"a":1,"n":"s_t3Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T3),"g":{"a":1,"n":"get_s_t3Comparer","t":8,"rt":$n[3].EqualityComparer$1(T3),"fg":"s_t3Comparer","is":true},"fn":"s_t3Comparer"},{"a":1,"n":"s_t4Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T4),"g":{"a":1,"n":"get_s_t4Comparer","t":8,"rt":$n[3].EqualityComparer$1(T4),"fg":"s_t4Comparer","is":true},"fn":"s_t4Comparer"},{"a":1,"n":"s_t5Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T5),"g":{"a":1,"n":"get_s_t5Comparer","t":8,"rt":$n[3].EqualityComparer$1(T5),"fg":"s_t5Comparer","is":true},"fn":"s_t5Comparer"},{"a":2,"n":"Item1","t":4,"rt":T1,"sn":"Item1"},{"a":2,"n":"Item2","t":4,"rt":T2,"sn":"Item2"},{"a":2,"n":"Item3","t":4,"rt":T3,"sn":"Item3"},{"a":2,"n":"Item4","t":4,"rt":T4,"sn":"Item4"},{"a":2,"n":"Item5","t":4,"rt":T5,"sn":"Item5"}]}; }, $n); - $m("System.ValueTuple$6", function (T1, T2, T3, T4, T5, T6) { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[T1,T2,T3,T4,T5,T6],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1},{"n":"item3","pt":T3,"ps":2},{"n":"item4","pt":T4,"ps":3},{"n":"item5","pt":T5,"ps":4},{"n":"item6","pt":T6,"ps":5}],"sn":"$ctor1"},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$6(T1,T2,T3,T4,T5,T6),"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].ValueTuple$6(T1,T2,T3,T4,T5,T6)],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$6(T1,T2,T3,T4,T5,T6),"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].ValueTuple$6(T1,T2,T3,T4,T5,T6)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"GetHashCodeCore","t":8,"pi":[{"n":"comparer","pt":$n[6].IEqualityComparer,"ps":0}],"sn":"GetHashCodeCore","rt":$n[0].Int32,"p":[$n[6].IEqualityComparer],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":1,"n":"s_t1Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T1),"g":{"a":1,"n":"get_s_t1Comparer","t":8,"rt":$n[3].EqualityComparer$1(T1),"fg":"s_t1Comparer","is":true},"fn":"s_t1Comparer"},{"a":1,"n":"s_t2Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T2),"g":{"a":1,"n":"get_s_t2Comparer","t":8,"rt":$n[3].EqualityComparer$1(T2),"fg":"s_t2Comparer","is":true},"fn":"s_t2Comparer"},{"a":1,"n":"s_t3Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T3),"g":{"a":1,"n":"get_s_t3Comparer","t":8,"rt":$n[3].EqualityComparer$1(T3),"fg":"s_t3Comparer","is":true},"fn":"s_t3Comparer"},{"a":1,"n":"s_t4Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T4),"g":{"a":1,"n":"get_s_t4Comparer","t":8,"rt":$n[3].EqualityComparer$1(T4),"fg":"s_t4Comparer","is":true},"fn":"s_t4Comparer"},{"a":1,"n":"s_t5Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T5),"g":{"a":1,"n":"get_s_t5Comparer","t":8,"rt":$n[3].EqualityComparer$1(T5),"fg":"s_t5Comparer","is":true},"fn":"s_t5Comparer"},{"a":1,"n":"s_t6Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T6),"g":{"a":1,"n":"get_s_t6Comparer","t":8,"rt":$n[3].EqualityComparer$1(T6),"fg":"s_t6Comparer","is":true},"fn":"s_t6Comparer"},{"a":2,"n":"Item1","t":4,"rt":T1,"sn":"Item1"},{"a":2,"n":"Item2","t":4,"rt":T2,"sn":"Item2"},{"a":2,"n":"Item3","t":4,"rt":T3,"sn":"Item3"},{"a":2,"n":"Item4","t":4,"rt":T4,"sn":"Item4"},{"a":2,"n":"Item5","t":4,"rt":T5,"sn":"Item5"},{"a":2,"n":"Item6","t":4,"rt":T6,"sn":"Item6"}]}; }, $n); - $m("System.ValueTuple$7", function (T1, T2, T3, T4, T5, T6, T7) { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[T1,T2,T3,T4,T5,T6,T7],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1},{"n":"item3","pt":T3,"ps":2},{"n":"item4","pt":T4,"ps":3},{"n":"item5","pt":T5,"ps":4},{"n":"item6","pt":T6,"ps":5},{"n":"item7","pt":T7,"ps":6}],"sn":"$ctor1"},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$7(T1,T2,T3,T4,T5,T6,T7),"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$7(T1,T2,T3,T4,T5,T6,T7),"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].ValueTuple$7(T1,T2,T3,T4,T5,T6,T7)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"GetHashCodeCore","t":8,"pi":[{"n":"comparer","pt":$n[6].IEqualityComparer,"ps":0}],"sn":"GetHashCodeCore","rt":$n[0].Int32,"p":[$n[6].IEqualityComparer],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":1,"n":"s_t1Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T1),"g":{"a":1,"n":"get_s_t1Comparer","t":8,"rt":$n[3].EqualityComparer$1(T1),"fg":"s_t1Comparer","is":true},"fn":"s_t1Comparer"},{"a":1,"n":"s_t2Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T2),"g":{"a":1,"n":"get_s_t2Comparer","t":8,"rt":$n[3].EqualityComparer$1(T2),"fg":"s_t2Comparer","is":true},"fn":"s_t2Comparer"},{"a":1,"n":"s_t3Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T3),"g":{"a":1,"n":"get_s_t3Comparer","t":8,"rt":$n[3].EqualityComparer$1(T3),"fg":"s_t3Comparer","is":true},"fn":"s_t3Comparer"},{"a":1,"n":"s_t4Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T4),"g":{"a":1,"n":"get_s_t4Comparer","t":8,"rt":$n[3].EqualityComparer$1(T4),"fg":"s_t4Comparer","is":true},"fn":"s_t4Comparer"},{"a":1,"n":"s_t5Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T5),"g":{"a":1,"n":"get_s_t5Comparer","t":8,"rt":$n[3].EqualityComparer$1(T5),"fg":"s_t5Comparer","is":true},"fn":"s_t5Comparer"},{"a":1,"n":"s_t6Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T6),"g":{"a":1,"n":"get_s_t6Comparer","t":8,"rt":$n[3].EqualityComparer$1(T6),"fg":"s_t6Comparer","is":true},"fn":"s_t6Comparer"},{"a":1,"n":"s_t7Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T7),"g":{"a":1,"n":"get_s_t7Comparer","t":8,"rt":$n[3].EqualityComparer$1(T7),"fg":"s_t7Comparer","is":true},"fn":"s_t7Comparer"},{"a":2,"n":"Item1","t":4,"rt":T1,"sn":"Item1"},{"a":2,"n":"Item2","t":4,"rt":T2,"sn":"Item2"},{"a":2,"n":"Item3","t":4,"rt":T3,"sn":"Item3"},{"a":2,"n":"Item4","t":4,"rt":T4,"sn":"Item4"},{"a":2,"n":"Item5","t":4,"rt":T5,"sn":"Item5"},{"a":2,"n":"Item6","t":4,"rt":T6,"sn":"Item6"},{"a":2,"n":"Item7","t":4,"rt":T7,"sn":"Item7"}]}; }, $n); - $m("System.ValueTuple$8", function (T1, T2, T3, T4, T5, T6, T7, TRest) { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[T1,T2,T3,T4,T5,T6,T7,TRest],"pi":[{"n":"item1","pt":T1,"ps":0},{"n":"item2","pt":T2,"ps":1},{"n":"item3","pt":T3,"ps":2},{"n":"item4","pt":T4,"ps":3},{"n":"item5","pt":T5,"ps":4},{"n":"item6","pt":T6,"ps":5},{"n":"item7","pt":T7,"ps":6},{"n":"rest","pt":TRest,"ps":7}],"sn":"$ctor1"},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest),"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest),"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].ValueTuple$8(T1,T2,T3,T4,T5,T6,T7,TRest)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"GetHashCodeCore","t":8,"pi":[{"n":"comparer","pt":$n[6].IEqualityComparer,"ps":0}],"sn":"GetHashCodeCore","rt":$n[0].Int32,"p":[$n[6].IEqualityComparer],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":1,"n":"s_t1Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T1),"g":{"a":1,"n":"get_s_t1Comparer","t":8,"rt":$n[3].EqualityComparer$1(T1),"fg":"s_t1Comparer","is":true},"fn":"s_t1Comparer"},{"a":1,"n":"s_t2Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T2),"g":{"a":1,"n":"get_s_t2Comparer","t":8,"rt":$n[3].EqualityComparer$1(T2),"fg":"s_t2Comparer","is":true},"fn":"s_t2Comparer"},{"a":1,"n":"s_t3Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T3),"g":{"a":1,"n":"get_s_t3Comparer","t":8,"rt":$n[3].EqualityComparer$1(T3),"fg":"s_t3Comparer","is":true},"fn":"s_t3Comparer"},{"a":1,"n":"s_t4Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T4),"g":{"a":1,"n":"get_s_t4Comparer","t":8,"rt":$n[3].EqualityComparer$1(T4),"fg":"s_t4Comparer","is":true},"fn":"s_t4Comparer"},{"a":1,"n":"s_t5Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T5),"g":{"a":1,"n":"get_s_t5Comparer","t":8,"rt":$n[3].EqualityComparer$1(T5),"fg":"s_t5Comparer","is":true},"fn":"s_t5Comparer"},{"a":1,"n":"s_t6Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T6),"g":{"a":1,"n":"get_s_t6Comparer","t":8,"rt":$n[3].EqualityComparer$1(T6),"fg":"s_t6Comparer","is":true},"fn":"s_t6Comparer"},{"a":1,"n":"s_t7Comparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T7),"g":{"a":1,"n":"get_s_t7Comparer","t":8,"rt":$n[3].EqualityComparer$1(T7),"fg":"s_t7Comparer","is":true},"fn":"s_t7Comparer"},{"a":1,"n":"s_tRestComparer","is":true,"t":16,"rt":$n[3].EqualityComparer$1(TRest),"g":{"a":1,"n":"get_s_tRestComparer","t":8,"rt":$n[3].EqualityComparer$1(TRest),"fg":"s_tRestComparer","is":true},"fn":"s_tRestComparer"},{"a":2,"n":"Item1","t":4,"rt":T1,"sn":"Item1"},{"a":2,"n":"Item2","t":4,"rt":T2,"sn":"Item2"},{"a":2,"n":"Item3","t":4,"rt":T3,"sn":"Item3"},{"a":2,"n":"Item4","t":4,"rt":T4,"sn":"Item4"},{"a":2,"n":"Item5","t":4,"rt":T5,"sn":"Item5"},{"a":2,"n":"Item6","t":4,"rt":T6,"sn":"Item6"},{"a":2,"n":"Item7","t":4,"rt":T7,"sn":"Item7"},{"a":2,"n":"Rest","t":4,"rt":TRest,"sn":"Rest"}]}; }, $n); - $m("System.ValueTuple", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":"CombineHashCodes","is":true,"t":8,"pi":[{"n":"h1","pt":$n[0].Int32,"ps":0},{"n":"h2","pt":$n[0].Int32,"ps":1}],"sn":"CombineHashCodes","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"CombineHashCodes","is":true,"t":8,"pi":[{"n":"h1","pt":$n[0].Int32,"ps":0},{"n":"h2","pt":$n[0].Int32,"ps":1},{"n":"h3","pt":$n[0].Int32,"ps":2}],"sn":"CombineHashCodes$1","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"CombineHashCodes","is":true,"t":8,"pi":[{"n":"h1","pt":$n[0].Int32,"ps":0},{"n":"h2","pt":$n[0].Int32,"ps":1},{"n":"h3","pt":$n[0].Int32,"ps":2},{"n":"h4","pt":$n[0].Int32,"ps":3}],"sn":"CombineHashCodes$2","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"CombineHashCodes","is":true,"t":8,"pi":[{"n":"h1","pt":$n[0].Int32,"ps":0},{"n":"h2","pt":$n[0].Int32,"ps":1},{"n":"h3","pt":$n[0].Int32,"ps":2},{"n":"h4","pt":$n[0].Int32,"ps":3},{"n":"h5","pt":$n[0].Int32,"ps":4}],"sn":"CombineHashCodes$3","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"CombineHashCodes","is":true,"t":8,"pi":[{"n":"h1","pt":$n[0].Int32,"ps":0},{"n":"h2","pt":$n[0].Int32,"ps":1},{"n":"h3","pt":$n[0].Int32,"ps":2},{"n":"h4","pt":$n[0].Int32,"ps":3},{"n":"h5","pt":$n[0].Int32,"ps":4},{"n":"h6","pt":$n[0].Int32,"ps":5}],"sn":"CombineHashCodes$4","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"CombineHashCodes","is":true,"t":8,"pi":[{"n":"h1","pt":$n[0].Int32,"ps":0},{"n":"h2","pt":$n[0].Int32,"ps":1},{"n":"h3","pt":$n[0].Int32,"ps":2},{"n":"h4","pt":$n[0].Int32,"ps":3},{"n":"h5","pt":$n[0].Int32,"ps":4},{"n":"h6","pt":$n[0].Int32,"ps":5},{"n":"h7","pt":$n[0].Int32,"ps":6}],"sn":"CombineHashCodes$5","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"CombineHashCodes","is":true,"t":8,"pi":[{"n":"h1","pt":$n[0].Int32,"ps":0},{"n":"h2","pt":$n[0].Int32,"ps":1},{"n":"h3","pt":$n[0].Int32,"ps":2},{"n":"h4","pt":$n[0].Int32,"ps":3},{"n":"h5","pt":$n[0].Int32,"ps":4},{"n":"h6","pt":$n[0].Int32,"ps":5},{"n":"h7","pt":$n[0].Int32,"ps":6},{"n":"h8","pt":$n[0].Int32,"ps":7}],"sn":"CombineHashCodes$6","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple,"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].ValueTuple],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Create","is":true,"t":8,"sn":"Create","rt":$n[0].ValueTuple},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0}],"tpc":1,"tprm":["T1"],"sn":"Create$1","rt":$n[0].ValueTuple$1(System.Object),"p":[System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1}],"tpc":2,"tprm":["T1","T2"],"sn":"Create$2","rt":$n[0].ValueTuple$2(System.Object,System.Object),"p":[System.Object,System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1},{"n":"item3","pt":System.Object,"ps":2}],"tpc":3,"tprm":["T1","T2","T3"],"sn":"Create$3","rt":$n[0].ValueTuple$3(System.Object,System.Object,System.Object),"p":[System.Object,System.Object,System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1},{"n":"item3","pt":System.Object,"ps":2},{"n":"item4","pt":System.Object,"ps":3}],"tpc":4,"tprm":["T1","T2","T3","T4"],"sn":"Create$4","rt":$n[0].ValueTuple$4(System.Object,System.Object,System.Object,System.Object),"p":[System.Object,System.Object,System.Object,System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1},{"n":"item3","pt":System.Object,"ps":2},{"n":"item4","pt":System.Object,"ps":3},{"n":"item5","pt":System.Object,"ps":4}],"tpc":5,"tprm":["T1","T2","T3","T4","T5"],"sn":"Create$5","rt":$n[0].ValueTuple$5(System.Object,System.Object,System.Object,System.Object,System.Object),"p":[System.Object,System.Object,System.Object,System.Object,System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1},{"n":"item3","pt":System.Object,"ps":2},{"n":"item4","pt":System.Object,"ps":3},{"n":"item5","pt":System.Object,"ps":4},{"n":"item6","pt":System.Object,"ps":5}],"tpc":6,"tprm":["T1","T2","T3","T4","T5","T6"],"sn":"Create$6","rt":$n[0].ValueTuple$6(System.Object,System.Object,System.Object,System.Object,System.Object,System.Object),"p":[System.Object,System.Object,System.Object,System.Object,System.Object,System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1},{"n":"item3","pt":System.Object,"ps":2},{"n":"item4","pt":System.Object,"ps":3},{"n":"item5","pt":System.Object,"ps":4},{"n":"item6","pt":System.Object,"ps":5},{"n":"item7","pt":System.Object,"ps":6}],"tpc":7,"tprm":["T1","T2","T3","T4","T5","T6","T7"],"sn":"Create$7","rt":$n[0].ValueTuple$7(System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object),"p":[System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object]},{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"item1","pt":System.Object,"ps":0},{"n":"item2","pt":System.Object,"ps":1},{"n":"item3","pt":System.Object,"ps":2},{"n":"item4","pt":System.Object,"ps":3},{"n":"item5","pt":System.Object,"ps":4},{"n":"item6","pt":System.Object,"ps":5},{"n":"item7","pt":System.Object,"ps":6},{"n":"item8","pt":System.Object,"ps":7}],"tpc":8,"tprm":["T1","T2","T3","T4","T5","T6","T7","T8"],"sn":"Create$8","rt":$n[0].ValueTuple$8(System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.ValueTuple$1(System.Object)),"p":[System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object,System.Object]},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].ValueTuple,"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].ValueTuple],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String}]}; }, $n); - $m("System.Version", function () { return {"nested":[$n[0].Version.ParseFailureKind,$n[0].Version.VersionResult],"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"version","pt":$n[0].String,"ps":0}],"sn":"$ctor4"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32],"pi":[{"n":"major","pt":$n[0].Int32,"ps":0},{"n":"minor","pt":$n[0].Int32,"ps":1}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32],"pi":[{"n":"major","pt":$n[0].Int32,"ps":0},{"n":"minor","pt":$n[0].Int32,"ps":1},{"n":"build","pt":$n[0].Int32,"ps":2}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"pi":[{"n":"major","pt":$n[0].Int32,"ps":0},{"n":"minor","pt":$n[0].Int32,"ps":1},{"n":"build","pt":$n[0].Int32,"ps":2},{"n":"revision","pt":$n[0].Int32,"ps":3}],"sn":"$ctor3"},{"a":1,"n":"AppendPositiveNumber","is":true,"t":8,"pi":[{"n":"num","pt":$n[0].Int32,"ps":0},{"n":"sb","pt":$n[8].StringBuilder,"ps":1}],"sn":"appendPositiveNumber","rt":$n[0].Void,"p":[$n[0].Int32,$n[8].StringBuilder]},{"a":2,"n":"Clone","t":8,"sn":"clone","rt":$n[0].Object},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"version","pt":$n[0].Object,"ps":0}],"sn":"compareTo$1","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CompareTo","t":8,"pi":[{"n":"value","pt":$n[0].Version,"ps":0}],"sn":"compareTo","rt":$n[0].Int32,"p":[$n[0].Version],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Version,"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[0].Version],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Parse","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0}],"sn":"parse","rt":$n[0].Version,"p":[$n[0].String]},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":2,"n":"ToString","t":8,"pi":[{"n":"fieldCount","pt":$n[0].Int32,"ps":0}],"sn":"toString$1","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"TryParse","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"result","out":true,"pt":$n[0].Version,"ps":1}],"sn":"tryParse","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Version],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"TryParseComponent","is":true,"t":8,"pi":[{"n":"component","pt":$n[0].String,"ps":0},{"n":"componentName","pt":$n[0].String,"ps":1},{"n":"result","ref":true,"pt":$n[0].Version.VersionResult,"ps":2},{"n":"parsedComponent","out":true,"pt":$n[0].Int32,"ps":3}],"sn":"tryParseComponent","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String,$n[0].Version.VersionResult,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"TryParseVersion","is":true,"t":8,"pi":[{"n":"version","pt":$n[0].String,"ps":0},{"n":"result","ref":true,"pt":$n[0].Version.VersionResult,"ps":1}],"sn":"tryParseVersion","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Version.VersionResult],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Equality","is":true,"t":8,"pi":[{"n":"v1","pt":$n[0].Version,"ps":0},{"n":"v2","pt":$n[0].Version,"ps":1}],"sn":"op_Equality","rt":$n[0].Boolean,"p":[$n[0].Version,$n[0].Version],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_GreaterThan","is":true,"t":8,"pi":[{"n":"v1","pt":$n[0].Version,"ps":0},{"n":"v2","pt":$n[0].Version,"ps":1}],"sn":"op_GreaterThan","rt":$n[0].Boolean,"p":[$n[0].Version,$n[0].Version],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_GreaterThanOrEqual","is":true,"t":8,"pi":[{"n":"v1","pt":$n[0].Version,"ps":0},{"n":"v2","pt":$n[0].Version,"ps":1}],"sn":"op_GreaterThanOrEqual","rt":$n[0].Boolean,"p":[$n[0].Version,$n[0].Version],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Inequality","is":true,"t":8,"pi":[{"n":"v1","pt":$n[0].Version,"ps":0},{"n":"v2","pt":$n[0].Version,"ps":1}],"sn":"op_Inequality","rt":$n[0].Boolean,"p":[$n[0].Version,$n[0].Version],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_LessThan","is":true,"t":8,"pi":[{"n":"v1","pt":$n[0].Version,"ps":0},{"n":"v2","pt":$n[0].Version,"ps":1}],"sn":"op_LessThan","rt":$n[0].Boolean,"p":[$n[0].Version,$n[0].Version],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_LessThanOrEqual","is":true,"t":8,"pi":[{"n":"v1","pt":$n[0].Version,"ps":0},{"n":"v2","pt":$n[0].Version,"ps":1}],"sn":"op_LessThanOrEqual","rt":$n[0].Boolean,"p":[$n[0].Version,$n[0].Version],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Build","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Build","t":8,"rt":$n[0].Int32,"fg":"Build","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Build"},{"a":2,"n":"Major","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Major","t":8,"rt":$n[0].Int32,"fg":"Major","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Major"},{"a":2,"n":"MajorRevision","t":16,"rt":$n[0].Int16,"g":{"a":2,"n":"get_MajorRevision","t":8,"rt":$n[0].Int16,"fg":"MajorRevision","box":function ($v) { return H5.box($v, System.Int16);}},"fn":"MajorRevision"},{"a":2,"n":"Minor","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Minor","t":8,"rt":$n[0].Int32,"fg":"Minor","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Minor"},{"a":2,"n":"MinorRevision","t":16,"rt":$n[0].Int16,"g":{"a":2,"n":"get_MinorRevision","t":8,"rt":$n[0].Int16,"fg":"MinorRevision","box":function ($v) { return H5.box($v, System.Int16);}},"fn":"MinorRevision"},{"a":2,"n":"Revision","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Revision","t":8,"rt":$n[0].Int32,"fg":"Revision","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Revision"},{"a":1,"n":"SeparatorsArray","is":true,"t":4,"rt":$n[0].Char,"sn":"separatorsArray","ro":true,"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":1,"n":"ZERO_CHAR_VALUE","is":true,"t":4,"rt":$n[0].Int32,"sn":"ZERO_CHAR_VALUE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_Build","t":4,"rt":$n[0].Int32,"sn":"_Build","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_Major","t":4,"rt":$n[0].Int32,"sn":"_Major","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_Minor","t":4,"rt":$n[0].Int32,"sn":"_Minor","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_Revision","t":4,"rt":$n[0].Int32,"sn":"_Revision","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Version.ParseFailureKind", function () { return {"td":$n[0].Version,"att":261,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"ArgumentException","is":true,"t":4,"rt":$n[0].Version.ParseFailureKind,"sn":"ArgumentException","box":function ($v) { return H5.box($v, System.Version.ParseFailureKind, System.Enum.toStringFn(System.Version.ParseFailureKind));}},{"a":2,"n":"ArgumentNullException","is":true,"t":4,"rt":$n[0].Version.ParseFailureKind,"sn":"ArgumentNullException","box":function ($v) { return H5.box($v, System.Version.ParseFailureKind, System.Enum.toStringFn(System.Version.ParseFailureKind));}},{"a":2,"n":"ArgumentOutOfRangeException","is":true,"t":4,"rt":$n[0].Version.ParseFailureKind,"sn":"ArgumentOutOfRangeException","box":function ($v) { return H5.box($v, System.Version.ParseFailureKind, System.Enum.toStringFn(System.Version.ParseFailureKind));}},{"a":2,"n":"FormatException","is":true,"t":4,"rt":$n[0].Version.ParseFailureKind,"sn":"FormatException","box":function ($v) { return H5.box($v, System.Version.ParseFailureKind, System.Enum.toStringFn(System.Version.ParseFailureKind));}}]}; }, $n); - $m("System.Version.VersionResult", function () { return {"td":$n[0].Version,"att":1048845,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":"GetVersionParseException","t":8,"sn":"getVersionParseException","rt":$n[0].Exception},{"a":4,"n":"Init","t":8,"pi":[{"n":"argumentName","pt":$n[0].String,"ps":0},{"n":"canThrow","pt":$n[0].Boolean,"ps":1}],"sn":"init","rt":$n[0].Void,"p":[$n[0].String,$n[0].Boolean]},{"a":4,"n":"SetFailure","t":8,"pi":[{"n":"failure","pt":$n[0].Version.ParseFailureKind,"ps":0}],"sn":"setFailure","rt":$n[0].Void,"p":[$n[0].Version.ParseFailureKind]},{"a":4,"n":"SetFailure","t":8,"pi":[{"n":"failure","pt":$n[0].Version.ParseFailureKind,"ps":0},{"n":"argument","pt":$n[0].String,"ps":1}],"sn":"setFailure$1","rt":$n[0].Void,"p":[$n[0].Version.ParseFailureKind,$n[0].String]},{"a":4,"n":"m_argumentName","t":4,"rt":$n[0].String,"sn":"m_argumentName"},{"a":4,"n":"m_canThrow","t":4,"rt":$n[0].Boolean,"sn":"m_canThrow","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":4,"n":"m_exceptionArgument","t":4,"rt":$n[0].String,"sn":"m_exceptionArgument"},{"a":4,"n":"m_failure","t":4,"rt":$n[0].Version.ParseFailureKind,"sn":"m_failure","box":function ($v) { return H5.box($v, System.Version.ParseFailureKind, System.Enum.toStringFn(System.Version.ParseFailureKind));}},{"a":4,"n":"m_parsedVersion","t":4,"rt":$n[0].Version,"sn":"m_parsedVersion"}]}; }, $n); - $m("System.Net.WebSockets.ClientWebSocket", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Abort","t":8,"sn":"abort","rt":$n[0].Void},{"a":2,"n":"CloseAsync","t":8,"pi":[{"n":"closeStatus","pt":$n[9].WebSocketCloseStatus,"ps":0},{"n":"statusDescription","pt":$n[0].String,"ps":1},{"n":"cancellationToken","pt":$n[2].CancellationToken,"ps":2}],"sn":"closeAsync","rt":$n[10].Task,"p":[$n[9].WebSocketCloseStatus,$n[0].String,$n[2].CancellationToken]},{"a":2,"n":"CloseOutputAsync","t":8,"pi":[{"n":"closeStatus","pt":$n[9].WebSocketCloseStatus,"ps":0},{"n":"statusDescription","pt":$n[0].String,"ps":1},{"n":"cancellationToken","pt":$n[2].CancellationToken,"ps":2}],"sn":"closeOutputAsync","rt":$n[10].Task,"p":[$n[9].WebSocketCloseStatus,$n[0].String,$n[2].CancellationToken]},{"a":2,"n":"ConnectAsync","t":8,"pi":[{"n":"uri","pt":$n[0].Uri,"ps":0},{"n":"cancellationToken","pt":$n[2].CancellationToken,"ps":1}],"sn":"connectAsync","rt":$n[10].Task,"p":[$n[0].Uri,$n[2].CancellationToken]},{"a":2,"n":"Dispose","t":8,"sn":"dispose","rt":$n[0].Void},{"a":2,"n":"ReceiveAsync","t":8,"pi":[{"n":"buffer","pt":$n[0].ArraySegment,"ps":0},{"n":"cancellationToken","pt":$n[2].CancellationToken,"ps":1}],"sn":"receiveAsync","rt":$n[10].Task$1(System.Net.WebSockets.WebSocketReceiveResult),"p":[$n[0].ArraySegment,$n[2].CancellationToken]},{"a":2,"n":"SendAsync","t":8,"pi":[{"n":"buffer","pt":$n[0].ArraySegment,"ps":0},{"n":"messageType","pt":$n[9].WebSocketMessageType,"ps":1},{"n":"endOfMessage","dv":true,"o":true,"pt":$n[0].Boolean,"ps":2},{"n":"cancellationToken","dv":null,"o":true,"pt":$n[2].CancellationToken,"ps":3}],"sn":"sendAsync","rt":$n[10].Task,"p":[$n[0].ArraySegment,$n[9].WebSocketMessageType,$n[0].Boolean,$n[2].CancellationToken]},{"a":2,"n":"CloseStatus","t":16,"rt":$n[0].Nullable$1(System.Net.WebSockets.WebSocketCloseStatus),"g":{"a":2,"n":"get_CloseStatus","t":8,"tpc":0,"def":function () { return this.getCloseStatus(); },"rt":$n[0].Nullable$1(System.Net.WebSockets.WebSocketCloseStatus)}},{"a":2,"n":"CloseStatusDescription","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_CloseStatusDescription","t":8,"tpc":0,"def":function () { return this.getCloseStatusDescription(); },"rt":$n[0].String}},{"a":2,"n":"Options","t":16,"rt":$n[9].ClientWebSocketOptions,"g":{"a":2,"n":"get_Options","t":8,"tpc":0,"def":function () { return this.getOptions(); },"rt":$n[9].ClientWebSocketOptions}},{"a":2,"n":"State","t":16,"rt":$n[9].WebSocketState,"g":{"a":2,"n":"get_State","t":8,"tpc":0,"def":function () { return this.getState(); },"rt":$n[9].WebSocketState}},{"a":2,"n":"SubProtocol","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_SubProtocol","t":8,"tpc":0,"def":function () { return this.getSubProtocol(); },"rt":$n[0].String}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Nullable$1(System.Net.WebSockets.WebSocketCloseStatus),"sn":"CloseStatus"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"CloseStatusDescription"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[9].ClientWebSocketOptions,"sn":"Options"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[9].WebSocketState,"sn":"State"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"SubProtocol"}]}; }, $n); - $m("System.Net.WebSockets.ClientWebSocketOptions", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"AddSubProtocol","t":8,"pi":[{"n":"subProtocol","pt":$n[0].String,"ps":0}],"sn":"AddSubProtocol","rt":$n[0].Void,"p":[$n[0].String]}]}; }, $n); - $m("System.Net.WebSockets.WebSocketReceiveResult", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[9].WebSocketMessageType,$n[0].Boolean],"pi":[{"n":"count","pt":$n[0].Int32,"ps":0},{"n":"messageType","pt":$n[9].WebSocketMessageType,"ps":1},{"n":"endOfMessage","pt":$n[0].Boolean,"ps":2}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[9].WebSocketMessageType,$n[0].Boolean,$n[0].Nullable$1(System.Net.WebSockets.WebSocketCloseStatus),$n[0].String],"pi":[{"n":"count","pt":$n[0].Int32,"ps":0},{"n":"messageType","pt":$n[9].WebSocketMessageType,"ps":1},{"n":"endOfMessage","pt":$n[0].Boolean,"ps":2},{"n":"closeStatus","pt":$n[0].Nullable$1(System.Net.WebSockets.WebSocketCloseStatus),"ps":3},{"n":"closeStatusDescription","pt":$n[0].String,"ps":4}],"sn":"ctor"},{"a":2,"n":"CloseStatus","t":16,"rt":$n[0].Nullable$1(System.Net.WebSockets.WebSocketCloseStatus),"g":{"a":2,"n":"get_CloseStatus","t":8,"tpc":0,"def":function () { return this.getCloseStatus(); },"rt":$n[0].Nullable$1(System.Net.WebSockets.WebSocketCloseStatus)}},{"a":2,"n":"CloseStatusDescription","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_CloseStatusDescription","t":8,"tpc":0,"def":function () { return this.getCloseStatusDescription(); },"rt":$n[0].String}},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"tpc":0,"def":function () { return this.getCount(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"EndOfMessage","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_EndOfMessage","t":8,"tpc":0,"def":function () { return this.getEndOfMessage(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"MessageType","t":16,"rt":$n[9].WebSocketMessageType,"g":{"a":2,"n":"get_MessageType","t":8,"tpc":0,"def":function () { return this.getMessageType(); },"rt":$n[9].WebSocketMessageType}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Nullable$1(System.Net.WebSockets.WebSocketCloseStatus),"sn":"CloseStatus"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"CloseStatusDescription"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Count","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"EndOfMessage","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[9].WebSocketMessageType,"sn":"MessageType"}]}; }, $n); - $m("System.Threading.CancellationToken", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Boolean],"pi":[{"n":"canceled","pt":$n[0].Boolean,"ps":0}],"sn":"ctor"},{"a":2,"n":"Register","t":8,"pi":[{"n":"callback","pt":Function,"ps":0}],"sn":"register","rt":$n[2].CancellationTokenRegistration,"p":[Function]},{"a":2,"n":"Register","t":8,"pi":[{"n":"callback","pt":Function,"ps":0},{"n":"useSynchronizationContext","pt":$n[0].Boolean,"ps":1}],"tpc":0,"def":function (callback, useSynchronizationContext) { return this.register(callback); },"rt":$n[2].CancellationTokenRegistration,"p":[Function,$n[0].Boolean]},{"a":2,"n":"Register","t":8,"pi":[{"n":"callback","pt":Function,"ps":0},{"n":"state","pt":$n[0].Object,"ps":1}],"sn":"register","rt":$n[2].CancellationTokenRegistration,"p":[Function,$n[0].Object]},{"a":2,"n":"Register","t":8,"pi":[{"n":"callback","pt":Function,"ps":0},{"n":"state","pt":$n[0].Object,"ps":1},{"n":"useSynchronizationContext","pt":$n[0].Boolean,"ps":2}],"tpc":0,"def":function (callback, state, useSynchronizationContext) { return this.register(callback, state); },"rt":$n[2].CancellationTokenRegistration,"p":[Function,$n[0].Object,$n[0].Boolean]},{"a":2,"n":"ThrowIfCancellationRequested","t":8,"sn":"throwIfCancellationRequested","rt":$n[0].Void},{"a":2,"n":"CanBeCanceled","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_CanBeCanceled","t":8,"tpc":0,"def":function () { return this.getCanBeCanceled(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"IsCancellationRequested","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsCancellationRequested","t":8,"tpc":0,"def":function () { return this.getIsCancellationRequested(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"None","is":true,"t":16,"rt":$n[2].CancellationToken,"g":{"a":2,"n":"get_None","t":8,"rt":$n[2].CancellationToken,"fg":"none","is":true},"fn":"none"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"CanBeCanceled","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IsCancellationRequested","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[2].CancellationToken,"sn":"none"}]}; }, $n); - $m("System.Threading.CancellationTokenRegistration", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Dispose","t":8,"sn":"dispose","rt":$n[0].Void},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[2].CancellationTokenRegistration,"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[2].CancellationTokenRegistration],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Equality","is":true,"t":8,"pi":[{"n":"left","pt":$n[2].CancellationTokenRegistration,"ps":0},{"n":"right","pt":$n[2].CancellationTokenRegistration,"ps":1}],"tpc":0,"def":function (left, right) { return H5.equals(left, right); },"rt":$n[0].Boolean,"p":[$n[2].CancellationTokenRegistration,$n[2].CancellationTokenRegistration],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Inequality","is":true,"t":8,"pi":[{"n":"left","pt":$n[2].CancellationTokenRegistration,"ps":0},{"n":"right","pt":$n[2].CancellationTokenRegistration,"ps":1}],"tpc":0,"def":function (left, right) { return !H5.equals(left, right); },"rt":$n[0].Boolean,"p":[$n[2].CancellationTokenRegistration,$n[2].CancellationTokenRegistration],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.Threading.CancellationTokenSource", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"millisecondsDelay","pt":$n[0].Int32,"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].TimeSpan],"pi":[{"n":"delay","pt":$n[0].TimeSpan,"ps":0}],"def":function (delay) { return new System.Threading.CancellationTokenSource(delay.ticks / 10000); }},{"a":2,"n":"Cancel","t":8,"sn":"cancel","rt":$n[0].Void},{"a":2,"n":"Cancel","t":8,"pi":[{"n":"throwOnFirstException","pt":$n[0].Boolean,"ps":0}],"sn":"cancel","rt":$n[0].Void,"p":[$n[0].Boolean]},{"a":2,"n":"CancelAfter","t":8,"pi":[{"n":"millisecondsDelay","pt":$n[0].Int32,"ps":0}],"sn":"cancelAfter","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":2,"n":"CancelAfter","t":8,"pi":[{"n":"delay","pt":$n[0].TimeSpan,"ps":0}],"tpc":0,"def":function (delay) { return this.cancelAfter(delay.ticks / 10000); },"rt":$n[0].Void,"p":[$n[0].TimeSpan]},{"a":2,"n":"CreateLinkedTokenSource","is":true,"t":8,"pi":[{"n":"tokens","ip":true,"pt":System.Array.type(System.Threading.CancellationToken),"ps":0}],"tpc":0,"def":function (tokens) { return System.Threading.CancellationTokenSource.createLinked(tokens); },"rt":$n[2].CancellationTokenSource,"p":[System.Array.type(System.Threading.CancellationToken)]},{"a":2,"n":"CreateLinkedTokenSource","is":true,"t":8,"pi":[{"n":"token1","pt":$n[2].CancellationToken,"ps":0},{"n":"token2","pt":$n[2].CancellationToken,"ps":1}],"sn":"createLinked","rt":$n[2].CancellationTokenSource,"p":[$n[2].CancellationToken,$n[2].CancellationToken]},{"a":2,"n":"Dispose","t":8,"sn":"dispose","rt":$n[0].Void},{"a":2,"n":"IsCancellationRequested","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsCancellationRequested","t":8,"rt":$n[0].Boolean,"fg":"isCancellationRequested","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":1,"n":"set_IsCancellationRequested","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"isCancellationRequested"},"fn":"isCancellationRequested"},{"a":2,"n":"Token","t":16,"rt":$n[2].CancellationToken,"g":{"a":2,"n":"get_Token","t":8,"rt":$n[2].CancellationToken,"fg":"token"},"s":{"a":1,"n":"set_Token","t":8,"p":[$n[2].CancellationToken],"rt":$n[0].Void,"fs":"token"},"fn":"token"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"isCancellationRequested","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[2].CancellationToken,"sn":"token"}]}; }, $n); - $m("System.Threading.Lock", function () { return {"nested":[$n[2].Lock.Scope],"att":1048833,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Enter","t":8,"sn":"Enter","rt":$n[0].Void},{"a":2,"n":"EnterScope","t":8,"sn":"EnterScope","rt":$n[2].Lock.Scope},{"a":2,"n":"Exit","t":8,"sn":"Exit","rt":$n[0].Void}]}; }, $n); - $m("System.Threading.Lock.Scope", function () { return {"td":$n[2].Lock,"att":1048842,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Dispose","t":8,"sn":"System$IDisposable$Dispose","rt":$n[0].Void}]}; }, $n); - $m("System.Threading.Timer", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[Function],"pi":[{"n":"callback","pt":Function,"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[Function,$n[0].Object,$n[0].Int32,$n[0].Int32],"pi":[{"n":"callback","pt":Function,"ps":0},{"n":"state","pt":$n[0].Object,"ps":1},{"n":"dueTime","pt":$n[0].Int32,"ps":2},{"n":"period","pt":$n[0].Int32,"ps":3}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[Function,$n[0].Object,$n[0].Int64,$n[0].Int64],"pi":[{"n":"callback","pt":Function,"ps":0},{"n":"state","pt":$n[0].Object,"ps":1},{"n":"dueTime","pt":$n[0].Int64,"ps":2},{"n":"period","pt":$n[0].Int64,"ps":3}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[Function,$n[0].Object,$n[0].TimeSpan,$n[0].TimeSpan],"pi":[{"n":"callback","pt":Function,"ps":0},{"n":"state","pt":$n[0].Object,"ps":1},{"n":"dueTime","pt":$n[0].TimeSpan,"ps":2},{"n":"period","pt":$n[0].TimeSpan,"ps":3}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[Function,$n[0].Object,$n[0].UInt32,$n[0].UInt32],"pi":[{"n":"callback","pt":Function,"ps":0},{"n":"state","pt":$n[0].Object,"ps":1},{"n":"dueTime","pt":$n[0].UInt32,"ps":2},{"n":"period","pt":$n[0].UInt32,"ps":3}],"sn":"$ctor4"},{"a":2,"n":"Change","t":8,"pi":[{"n":"dueTime","pt":$n[0].Int32,"ps":0},{"n":"period","pt":$n[0].Int32,"ps":1}],"sn":"Change","rt":$n[0].Boolean,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Change","t":8,"pi":[{"n":"dueTime","pt":$n[0].Int64,"ps":0},{"n":"period","pt":$n[0].Int64,"ps":1}],"sn":"Change$1","rt":$n[0].Boolean,"p":[$n[0].Int64,$n[0].Int64],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Change","t":8,"pi":[{"n":"dueTime","pt":$n[0].TimeSpan,"ps":0},{"n":"period","pt":$n[0].TimeSpan,"ps":1}],"sn":"Change$2","rt":$n[0].Boolean,"p":[$n[0].TimeSpan,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Change","t":8,"pi":[{"n":"dueTime","pt":$n[0].UInt32,"ps":0},{"n":"period","pt":$n[0].UInt32,"ps":1}],"sn":"Change$3","rt":$n[0].Boolean,"p":[$n[0].UInt32,$n[0].UInt32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"ChangeTimer","t":8,"pi":[{"n":"dueTime","pt":$n[0].Int64,"ps":0},{"n":"period","pt":$n[0].Int64,"ps":1}],"sn":"ChangeTimer","rt":$n[0].Boolean,"p":[$n[0].Int64,$n[0].Int64],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"ClearTimeout","t":8,"sn":"ClearTimeout","rt":$n[0].Void},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":1,"n":"HandleCallback","t":8,"sn":"HandleCallback","rt":$n[0].Void},{"a":1,"n":"RunTimer","t":8,"pi":[{"n":"period","pt":$n[0].Int64,"ps":0},{"n":"checkDispose","dv":true,"o":true,"pt":$n[0].Boolean,"ps":1}],"sn":"RunTimer","rt":$n[0].Boolean,"p":[$n[0].Int64,$n[0].Boolean],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"TimerSetup","t":8,"pi":[{"n":"callback","pt":Function,"ps":0},{"n":"state","pt":$n[0].Object,"ps":1},{"n":"dueTime","pt":$n[0].Int64,"ps":2},{"n":"period","pt":$n[0].Int64,"ps":3}],"sn":"TimerSetup","rt":$n[0].Boolean,"p":[Function,$n[0].Object,$n[0].Int64,$n[0].Int64],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"EXC_DISPOSED","is":true,"t":4,"rt":$n[0].String,"sn":"EXC_DISPOSED"},{"a":1,"n":"EXC_LESS","is":true,"t":4,"rt":$n[0].String,"sn":"EXC_LESS"},{"a":1,"n":"EXC_MORE","is":true,"t":4,"rt":$n[0].String,"sn":"EXC_MORE"},{"a":1,"n":"MAX_SUPPORTED_TIMEOUT","is":true,"t":4,"rt":$n[0].UInt32,"sn":"MAX_SUPPORTED_TIMEOUT","box":function ($v) { return H5.box($v, System.UInt32);}},{"a":1,"n":"disposed","t":4,"rt":$n[0].Boolean,"sn":"disposed","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":4,"n":"dueTime","t":4,"rt":$n[0].Int64,"sn":"dueTime"},{"a":1,"n":"id","t":4,"rt":$n[0].Nullable$1(System.Int32),"sn":"id","box":function ($v) { return H5.box($v, System.Int32, System.Nullable.toString, System.Nullable.getHashCode);}},{"a":4,"n":"period","t":4,"rt":$n[0].Int64,"sn":"period"},{"a":1,"n":"state","t":4,"rt":$n[0].Object,"sn":"state"},{"a":1,"n":"timerCallback","t":4,"rt":Function,"sn":"timerCallback"}]}; }, $n); - $m("System.Threading.Tasks.TaskCanceledException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[10].Task],"pi":[{"n":"task","pt":$n[10].Task,"ps":0}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"},{"a":2,"n":"Task","t":16,"rt":$n[10].Task,"g":{"a":2,"n":"get_Task","t":8,"rt":$n[10].Task,"fg":"Task"},"fn":"Task"},{"a":1,"n":"_canceledTask","t":4,"rt":$n[10].Task,"sn":"_canceledTask","ro":true}]}; }, $n); - $m("System.Threading.Tasks.TaskSchedulerException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Exception],"pi":[{"n":"innerException","pt":$n[0].Exception,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor3"}]}; }, $n); - $m("System.Threading.Tasks.Task", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[Function],"pi":[{"n":"action","pt":Function,"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[Function,$n[0].Object],"pi":[{"n":"action","pt":Function,"ps":0},{"n":"state","pt":$n[0].Object,"ps":1}],"sn":"ctor"},{"a":2,"n":"Complete","t":8,"pi":[{"n":"result","dv":null,"o":true,"pt":$n[0].Object,"ps":0}],"sn":"complete","rt":$n[0].Void,"p":[$n[0].Object]},{"a":2,"n":"ContinueWith","t":8,"pi":[{"n":"continuationAction","pt":Function,"ps":0}],"sn":"continueWith","rt":$n[10].Task,"p":[Function]},{"a":2,"n":"ContinueWith","t":8,"pi":[{"n":"continuationFunction","pt":Function,"ps":0}],"tpc":1,"tprm":["TResult"],"sn":"continueWith","rt":$n[10].Task$1(System.Object),"p":[Function]},{"a":2,"n":"Delay","is":true,"t":8,"pi":[{"n":"millisecondDelay","pt":$n[0].Int32,"ps":0}],"sn":"delay","rt":$n[10].Task,"p":[$n[0].Int32]},{"a":2,"n":"Delay","is":true,"t":8,"pi":[{"n":"delay","pt":$n[0].TimeSpan,"ps":0}],"sn":"delay","rt":$n[10].Task,"p":[$n[0].TimeSpan]},{"a":2,"n":"Delay","is":true,"t":8,"pi":[{"n":"millisecondsDelay","pt":$n[0].Int32,"ps":0},{"n":"cancellationToken","pt":$n[2].CancellationToken,"ps":1}],"sn":"delay","rt":$n[10].Task,"p":[$n[0].Int32,$n[2].CancellationToken]},{"a":2,"n":"Delay","is":true,"t":8,"pi":[{"n":"delay","pt":$n[0].TimeSpan,"ps":0},{"n":"cancellationToken","pt":$n[2].CancellationToken,"ps":1}],"sn":"delay","rt":$n[10].Task,"p":[$n[0].TimeSpan,$n[2].CancellationToken]},{"a":2,"n":"Dispose","t":8,"sn":"dispose","rt":$n[0].Void},{"a":2,"n":"FromCallback","is":true,"t":8,"pi":[{"n":"target","pt":$n[0].Object,"ps":0},{"n":"method","pt":$n[0].String,"ps":1},{"n":"otherArguments","ip":true,"pt":$n[0].Array.type(System.Object),"ps":2}],"sn":"fromCallback","rt":$n[10].Task,"p":[$n[0].Object,$n[0].String,$n[0].Array.type(System.Object)]},{"a":2,"n":"FromCallback","is":true,"t":8,"pi":[{"n":"target","pt":$n[0].Object,"ps":0},{"n":"method","pt":$n[0].String,"ps":1},{"n":"otherArguments","ip":true,"pt":$n[0].Array.type(System.Object),"ps":2}],"tpc":1,"tprm":["TResult"],"sn":"fromCallback","rt":$n[10].Task$1(System.Object),"p":[$n[0].Object,$n[0].String,$n[0].Array.type(System.Object)]},{"a":2,"n":"FromCallbackResult","is":true,"t":8,"pi":[{"n":"target","pt":$n[0].Object,"ps":0},{"n":"method","pt":$n[0].String,"ps":1},{"n":"resultHandler","pt":Function,"ps":2},{"n":"otherArguments","ip":true,"pt":$n[0].Array.type(System.Object),"ps":3}],"sn":"fromCallbackResult","rt":$n[10].Task,"p":[$n[0].Object,$n[0].String,Function,$n[0].Array.type(System.Object)]},{"a":2,"n":"FromCallbackResult","is":true,"t":8,"pi":[{"n":"target","pt":$n[0].Object,"ps":0},{"n":"method","pt":$n[0].String,"ps":1},{"n":"resultHandler","pt":Function,"ps":2},{"n":"otherArguments","ip":true,"pt":$n[0].Array.type(System.Object),"ps":3}],"tpc":1,"tprm":["TResult"],"sn":"fromCallbackResult","rt":$n[10].Task$1(System.Object),"p":[$n[0].Object,$n[0].String,Function,$n[0].Array.type(System.Object)]},{"a":2,"n":"FromException","is":true,"t":8,"pi":[{"n":"exception","pt":$n[0].Exception,"ps":0}],"tpc":0,"def":function (exception) { return System.Threading.Tasks.Task.fromException(exception, null); },"rt":$n[10].Task,"p":[$n[0].Exception]},{"a":2,"n":"FromException","is":true,"t":8,"pi":[{"n":"exception","pt":$n[0].Exception,"ps":0}],"tpc":1,"def":function (TResult, exception) { return System.Threading.Tasks.Task.fromException(exception, TResult); },"rt":$n[10].Task$1(System.Object),"p":[$n[0].Exception]},{"a":2,"n":"FromPromise","is":true,"t":8,"pi":[{"n":"promise","pt":H5.IPromise,"ps":0}],"sn":"fromPromise","rt":$n[10].Task$1(System.Array.type(System.Object)),"p":[H5.IPromise]},{"a":2,"n":"FromPromise","is":true,"t":8,"pi":[{"n":"promise","pt":H5.IPromise,"ps":0},{"n":"resultHandler","pt":Function,"ps":1}],"tpc":1,"tprm":["TResult"],"sn":"fromPromise","rt":$n[10].Task$1(System.Object),"p":[H5.IPromise,Function]},{"a":2,"n":"FromPromise","is":true,"t":8,"pi":[{"n":"promise","pt":H5.IPromise,"ps":0},{"n":"resultHandler","pt":Function,"ps":1},{"n":"errorHandler","pt":Function,"ps":2}],"tpc":1,"tprm":["TResult"],"sn":"fromPromise","rt":$n[10].Task$1(System.Object),"p":[H5.IPromise,Function,Function]},{"a":2,"n":"FromPromise","is":true,"t":8,"pi":[{"n":"promise","pt":H5.IPromise,"ps":0},{"n":"resultHandler","pt":Function,"ps":1},{"n":"errorHandler","pt":Function,"ps":2},{"n":"progressHandler","pt":Function,"ps":3}],"tpc":1,"tprm":["TResult"],"sn":"fromPromise","rt":$n[10].Task$1(System.Object),"p":[H5.IPromise,Function,Function,Function]},{"a":2,"n":"FromResult","is":true,"t":8,"pi":[{"n":"result","pt":System.Object,"ps":0}],"tpc":1,"def":function (TResult, result) { return System.Threading.Tasks.Task.fromResult(result, TResult); },"rt":$n[10].Task$1(System.Object),"p":[System.Object]},{"a":2,"n":"GetAwaiter","t":8,"sn":"getAwaiter","rt":$n[10].TaskAwaiter},{"a":2,"n":"Run","is":true,"t":8,"pi":[{"n":"action","pt":Function,"ps":0}],"sn":"run","rt":$n[10].Task,"p":[Function]},{"a":2,"n":"Run","is":true,"t":8,"pi":[{"n":"function","pt":Function,"ps":0}],"tpc":1,"tprm":["TResult"],"sn":"run","rt":$n[10].Task$1(System.Object),"p":[Function]},{"a":2,"n":"Start","t":8,"sn":"start","rt":$n[0].Void},{"a":2,"n":"Wait","t":8,"sn":"wait","rt":$n[0].Void},{"a":2,"n":"Wait","t":8,"pi":[{"n":"millisecondsTimeout","pt":$n[0].Int32,"ps":0}],"sn":"wait","rt":$n[0].Boolean,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Wait","t":8,"pi":[{"n":"cancellationToken","pt":$n[2].CancellationToken,"ps":0}],"sn":"wait","rt":$n[0].Void,"p":[$n[2].CancellationToken]},{"a":2,"n":"Wait","t":8,"pi":[{"n":"timeout","pt":$n[0].TimeSpan,"ps":0}],"sn":"wait","rt":$n[0].Boolean,"p":[$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Wait","t":8,"pi":[{"n":"millisecondsTimeout","pt":$n[0].Int32,"ps":0},{"n":"cancellationToken","pt":$n[2].CancellationToken,"ps":1}],"sn":"wait","rt":$n[0].Boolean,"p":[$n[0].Int32,$n[2].CancellationToken],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"WaitTask","t":8,"sn":"wait","rt":$n[10].Task},{"a":2,"n":"WaitTask","t":8,"pi":[{"n":"millisecondsTimeout","pt":$n[0].Int32,"ps":0}],"sn":"waitt","rt":$n[10].Task$1(System.Boolean),"p":[$n[0].Int32]},{"a":2,"n":"WaitTask","t":8,"pi":[{"n":"cancellationToken","pt":$n[2].CancellationToken,"ps":0}],"sn":"wait","rt":$n[10].Task,"p":[$n[2].CancellationToken]},{"a":2,"n":"WaitTask","t":8,"pi":[{"n":"timeout","pt":$n[0].TimeSpan,"ps":0}],"sn":"waitt","rt":$n[10].Task$1(System.Boolean),"p":[$n[0].TimeSpan]},{"a":2,"n":"WaitTask","t":8,"pi":[{"n":"millisecondsTimeout","pt":$n[0].Int32,"ps":0},{"n":"cancellationToken","pt":$n[2].CancellationToken,"ps":1}],"sn":"waitt","rt":$n[10].Task$1(System.Boolean),"p":[$n[0].Int32,$n[2].CancellationToken]},{"a":2,"n":"WhenAll","is":true,"t":8,"pi":[{"n":"tasks","pt":$n[3].IEnumerable$1(System.Threading.Tasks.Task),"ps":0}],"sn":"whenAll","rt":$n[10].Task,"p":[$n[3].IEnumerable$1(System.Threading.Tasks.Task)]},{"a":2,"n":"WhenAll","is":true,"t":8,"pi":[{"n":"tasks","pt":$n[3].IEnumerable$1(System.Threading.Tasks.Task$1(System.Object)),"ps":0}],"tpc":1,"tprm":["TResult"],"sn":"whenAll","rt":$n[10].Task$1(System.Array.type(System.Object)),"p":[$n[3].IEnumerable$1(System.Threading.Tasks.Task$1(System.Object))]},{"a":2,"n":"WhenAll","is":true,"t":8,"pi":[{"n":"tasks","ip":true,"pt":System.Array.type(System.Threading.Tasks.Task),"ps":0}],"sn":"whenAll","rt":$n[10].Task,"p":[System.Array.type(System.Threading.Tasks.Task)]},{"a":2,"n":"WhenAll","is":true,"t":8,"pi":[{"n":"tasks","ip":true,"pt":System.Array.type(System.Threading.Tasks.Task$1(System.Object)),"ps":0}],"tpc":1,"tprm":["TResult"],"sn":"whenAll","rt":$n[10].Task$1(System.Array.type(System.Object)),"p":[System.Array.type(System.Threading.Tasks.Task$1(System.Object))]},{"a":2,"n":"WhenAny","is":true,"t":8,"pi":[{"n":"tasks","pt":$n[3].IEnumerable$1(System.Threading.Tasks.Task),"ps":0}],"sn":"whenAny","rt":$n[10].Task$1(System.Threading.Tasks.Task),"p":[$n[3].IEnumerable$1(System.Threading.Tasks.Task)]},{"a":2,"n":"WhenAny","is":true,"t":8,"pi":[{"n":"tasks","pt":$n[3].IEnumerable$1(System.Threading.Tasks.Task$1(System.Object)),"ps":0}],"tpc":1,"tprm":["TResult"],"sn":"whenAny","rt":$n[10].Task$1(System.Threading.Tasks.Task$1(System.Object)),"p":[$n[3].IEnumerable$1(System.Threading.Tasks.Task$1(System.Object))]},{"a":2,"n":"WhenAny","is":true,"t":8,"pi":[{"n":"tasks","ip":true,"pt":System.Array.type(System.Threading.Tasks.Task),"ps":0}],"sn":"whenAny","rt":$n[10].Task$1(System.Threading.Tasks.Task),"p":[System.Array.type(System.Threading.Tasks.Task)]},{"a":2,"n":"WhenAny","is":true,"t":8,"pi":[{"n":"tasks","ip":true,"pt":System.Array.type(System.Threading.Tasks.Task$1(System.Object)),"ps":0}],"tpc":1,"tprm":["TResult"],"sn":"whenAny","rt":$n[10].Task$1(System.Threading.Tasks.Task$1(System.Object)),"p":[System.Array.type(System.Threading.Tasks.Task$1(System.Object))]},{"a":2,"n":"AsyncState","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_AsyncState","t":8,"rt":$n[0].Object,"fg":"AsyncState"},"fn":"AsyncState"},{"a":2,"n":"CompletedTask","is":true,"t":16,"rt":$n[10].Task,"g":{"a":2,"n":"get_CompletedTask","is":true,"t":8,"tpc":0,"def":function () { return System.Threading.Tasks.Task.fromResult({}, null); },"rt":$n[10].Task}},{"a":2,"n":"Exception","t":16,"rt":$n[0].AggregateException,"g":{"a":2,"n":"get_Exception","t":8,"tpc":0,"def":function () { return this.getException(); },"rt":$n[0].AggregateException}},{"a":2,"n":"IsCanceled","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsCanceled","t":8,"tpc":0,"def":function () { return this.isCanceled(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"IsCompleted","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsCompleted","t":8,"tpc":0,"def":function () { return this.isCompleted(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"IsFaulted","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsFaulted","t":8,"tpc":0,"def":function () { return this.isFaulted(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"Status","t":16,"rt":$n[10].TaskStatus,"g":{"a":2,"n":"get_Status","t":8,"rt":$n[10].TaskStatus,"fg":"status","box":function ($v) { return H5.box($v, System.Threading.Tasks.TaskStatus, System.Enum.toStringFn(System.Threading.Tasks.TaskStatus));}},"fn":"status"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"AsyncState"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[10].Task,"sn":"CompletedTask"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].AggregateException,"sn":"Exception"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IsCanceled","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IsCompleted","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IsFaulted","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[10].TaskStatus,"sn":"status","box":function ($v) { return H5.box($v, System.Threading.Tasks.TaskStatus, System.Enum.toStringFn(System.Threading.Tasks.TaskStatus));}}]}; }, $n); - $m("System.Threading.Tasks.Task$1", function (TResult) { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[Function],"pi":[{"n":"function","pt":Function,"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[Function,$n[0].Object],"pi":[{"n":"function","pt":Function,"ps":0},{"n":"state","pt":$n[0].Object,"ps":1}],"sn":"ctor"},{"a":2,"n":"ContinueWith","t":8,"pi":[{"n":"continuationAction","pt":Function,"ps":0}],"sn":"continueWith","rt":$n[10].Task,"p":[Function]},{"a":2,"n":"ContinueWith","t":8,"pi":[{"n":"continuationFunction","pt":Function,"ps":0}],"sn":"continueWith","rt":$n[10].Task$1(System.Object),"p":[Function]},{"a":2,"n":"GetAwaiter","t":8,"sn":"getAwaiter","rt":$n[10].Task(TResult)},{"a":2,"n":"SetResult","t":8,"pi":[{"n":"result","pt":TResult,"ps":0}],"sn":"setResult","rt":$n[0].Void,"p":[TResult]},{"a":2,"n":"Result","t":16,"rt":TResult,"g":{"a":2,"n":"get_Result","t":8,"tpc":0,"def":function () { return this.getResult(); },"rt":TResult}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":TResult,"sn":"Result"}]}; }, $n); - $m("System.Threading.Tasks.TaskCompletionSource", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Object],"pi":[{"n":"state","pt":$n[0].Object,"ps":0}],"sn":"ctor"},{"a":2,"n":"SetCanceled","t":8,"sn":"setCanceled","rt":$n[0].Void},{"a":2,"n":"SetException","t":8,"pi":[{"n":"exceptions","pt":$n[3].IEnumerable$1(System.Exception),"ps":0}],"sn":"setException","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(System.Exception)]},{"a":2,"n":"SetException","t":8,"pi":[{"n":"exception","pt":$n[0].Exception,"ps":0}],"sn":"setException","rt":$n[0].Void,"p":[$n[0].Exception]},{"a":2,"n":"SetResult","t":8,"pi":[{"n":"result","pt":System.Object,"ps":0}],"sn":"setResult","rt":$n[0].Void,"p":[System.Object]},{"a":2,"n":"TrySetCanceled","t":8,"sn":"trySetCanceled","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TrySetException","t":8,"pi":[{"n":"exceptions","pt":$n[3].IEnumerable$1(System.Exception),"ps":0}],"sn":"trySetException","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(System.Exception)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TrySetException","t":8,"pi":[{"n":"exception","pt":$n[0].Exception,"ps":0}],"sn":"trySetException","rt":$n[0].Boolean,"p":[$n[0].Exception],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TrySetResult","t":8,"pi":[{"n":"result","pt":System.Object,"ps":0}],"sn":"trySetResult","rt":$n[0].Boolean,"p":[System.Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Task","t":16,"rt":$n[10].Task$1(System.Object),"g":{"a":2,"n":"get_Task","t":8,"rt":$n[10].Task$1(System.Object),"fg":"task"},"fn":"task"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[10].Task$1(System.Object),"sn":"task"}]}; }, $n); - $m("System.Threading.Tasks.ValueTask", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Boolean],"pi":[{"n":"completedSynchronously","pt":$n[0].Boolean,"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[10].Task],"pi":[{"n":"task","pt":$n[10].Task,"ps":0}],"sn":"ctor"},{"a":2,"n":"Completed","is":true,"t":8,"sn":"completed","rt":$n[10].Task},{"a":2,"n":"GetAwaiter","t":8,"sn":"getAwaiter","rt":$n[10].TaskAwaiter}]}; }, $n); - $m("System.Threading.Tasks.ValueTask$1", function (TResult) { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[10].Task$1(TResult)],"pi":[{"n":"task","pt":$n[10].Task$1(TResult),"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[TResult],"pi":[{"n":"result","pt":TResult,"ps":0}],"sn":"ctor"},{"a":2,"n":"GetAwaiter","t":8,"sn":"getAwaiter","rt":$n[10].Task(TResult)}]}; }, $n); - $m("System.Text.StringBuilderCache", function () { return {"att":1048960,"a":4,"s":true,"m":[{"a":2,"n":"Acquire","is":true,"t":8,"pi":[{"n":"capacity","dv":16,"o":true,"pt":$n[0].Int32,"ps":0}],"sn":"Acquire","rt":$n[8].StringBuilder,"p":[$n[0].Int32]},{"a":2,"n":"GetStringAndRelease","is":true,"t":8,"pi":[{"n":"sb","pt":$n[8].StringBuilder,"ps":0}],"sn":"GetStringAndRelease","rt":$n[0].String,"p":[$n[8].StringBuilder]},{"a":2,"n":"Release","is":true,"t":8,"pi":[{"n":"sb","pt":$n[8].StringBuilder,"ps":0}],"sn":"Release","rt":$n[0].Void,"p":[$n[8].StringBuilder]},{"a":1,"n":"DEFAULT_CAPACITY","is":true,"t":4,"rt":$n[0].Int32,"sn":"DEFAULT_CAPACITY","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"MAX_BUILDER_SIZE","is":true,"t":4,"rt":$n[0].Int32,"sn":"MAX_BUILDER_SIZE","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"t_cachedInstance","is":true,"t":4,"rt":$n[8].StringBuilder,"sn":"t_cachedInstance"}]}; }, $n); - $m("System.Text.ASCIIEncoding", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"ov":true,"a":3,"n":"Decode","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":3},{"n":"charIndex","pt":$n[0].Int32,"ps":4}],"sn":"Decode$2","rt":$n[0].String,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,$n[0].Array.type(System.Char),$n[0].Int32]},{"ov":true,"a":3,"n":"Encode","t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"outputBytes","pt":$n[0].Array.type(System.Byte),"ps":1},{"n":"outputIndex","pt":$n[0].Int32,"ps":2},{"n":"writtenBytes","out":true,"pt":$n[0].Int32,"ps":3}],"sn":"Encode$3","rt":$n[0].Array.type(System.Byte),"p":[$n[0].String,$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"ov":true,"a":2,"n":"GetMaxByteCount","t":8,"pi":[{"n":"charCount","pt":$n[0].Int32,"ps":0}],"sn":"GetMaxByteCount","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"GetMaxCharCount","t":8,"pi":[{"n":"byteCount","pt":$n[0].Int32,"ps":0}],"sn":"GetMaxCharCount","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"CodePage","t":16,"rt":$n[0].Int32,"g":{"ov":true,"a":2,"n":"get_CodePage","t":8,"rt":$n[0].Int32,"fg":"CodePage","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"CodePage"},{"ov":true,"a":2,"n":"EncodingName","t":16,"rt":$n[0].String,"g":{"ov":true,"a":2,"n":"get_EncodingName","t":8,"rt":$n[0].String,"fg":"EncodingName"},"fn":"EncodingName"}]}; }, $n); - $m("System.Text.Encoding", function () { return {"att":1048705,"a":2,"m":[{"a":3,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Convert","is":true,"t":8,"pi":[{"n":"srcEncoding","pt":$n[8].Encoding,"ps":0},{"n":"dstEncoding","pt":$n[8].Encoding,"ps":1},{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":2}],"sn":"Convert","rt":$n[0].Array.type(System.Byte),"p":[$n[8].Encoding,$n[8].Encoding,$n[0].Array.type(System.Byte)]},{"a":2,"n":"Convert","is":true,"t":8,"pi":[{"n":"srcEncoding","pt":$n[8].Encoding,"ps":0},{"n":"dstEncoding","pt":$n[8].Encoding,"ps":1},{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":2},{"n":"index","pt":$n[0].Int32,"ps":3},{"n":"count","pt":$n[0].Int32,"ps":4}],"sn":"Convert$1","rt":$n[0].Array.type(System.Byte),"p":[$n[8].Encoding,$n[8].Encoding,$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"a":3,"n":"Decode","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0}],"sn":"Decode","rt":$n[0].String,"p":[$n[0].Array.type(System.Byte)]},{"a":3,"n":"Decode","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Decode$1","rt":$n[0].String,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"ab":true,"a":3,"n":"Decode","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":3},{"n":"charIndex","pt":$n[0].Int32,"ps":4}],"sn":"Decode$2","rt":$n[0].String,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,$n[0].Array.type(System.Char),$n[0].Int32]},{"a":3,"n":"Encode","t":8,"pi":[{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":0}],"sn":"Encode","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Array.type(System.Char)]},{"a":3,"n":"Encode","t":8,"pi":[{"n":"str","pt":$n[0].String,"ps":0}],"sn":"Encode$2","rt":$n[0].Array.type(System.Byte),"p":[$n[0].String]},{"a":3,"n":"Encode","t":8,"pi":[{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Encode$1","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32]},{"ab":true,"a":3,"n":"Encode","t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"outputBytes","pt":$n[0].Array.type(System.Byte),"ps":1},{"n":"outputIndex","pt":$n[0].Int32,"ps":2},{"n":"writtenBytes","out":true,"pt":$n[0].Int32,"ps":3}],"sn":"Encode$3","rt":$n[0].Array.type(System.Byte),"p":[$n[0].String,$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"a":3,"n":"Encode","t":8,"pi":[{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"outputBytes","pt":$n[0].Array.type(System.Byte),"ps":3},{"n":"outputIndex","pt":$n[0].Int32,"ps":4}],"sn":"Encode$4","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32,$n[0].Array.type(System.Byte),$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":3,"n":"Encode","t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"outputBytes","pt":$n[0].Array.type(System.Byte),"ps":3},{"n":"outputIndex","pt":$n[0].Int32,"ps":4}],"sn":"Encode$5","rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32,$n[0].Int32,$n[0].Array.type(System.Byte),$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"FromCharCode","is":true,"t":8,"pi":[{"n":"code","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (code) { return System.String.fromCharCode(code); },"rt":$n[0].String,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"GetByteCount","t":8,"pi":[{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":0}],"sn":"GetByteCount","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char)],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetByteCount","t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"sn":"GetByteCount$2","rt":$n[0].Int32,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetByteCount","t":8,"pi":[{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"GetByteCount$1","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetBytes","t":8,"pi":[{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":0}],"sn":"GetBytes","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Array.type(System.Char)]},{"v":true,"a":2,"n":"GetBytes","t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"sn":"GetBytes$2","rt":$n[0].Array.type(System.Byte),"p":[$n[0].String]},{"v":true,"a":2,"n":"GetBytes","t":8,"pi":[{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"GetBytes$1","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32]},{"v":true,"a":2,"n":"GetBytes","t":8,"pi":[{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"charIndex","pt":$n[0].Int32,"ps":1},{"n":"charCount","pt":$n[0].Int32,"ps":2},{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":3},{"n":"byteIndex","pt":$n[0].Int32,"ps":4}],"sn":"GetBytes$3","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32,$n[0].Array.type(System.Byte),$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetBytes","t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"charIndex","pt":$n[0].Int32,"ps":1},{"n":"charCount","pt":$n[0].Int32,"ps":2},{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":3},{"n":"byteIndex","pt":$n[0].Int32,"ps":4}],"sn":"GetBytes$4","rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32,$n[0].Int32,$n[0].Array.type(System.Byte),$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetCharCount","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0}],"sn":"GetCharCount","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Byte)],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"GetCharCount","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"GetCharCount$1","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetChars","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0}],"sn":"GetChars","rt":$n[0].Array.type(System.Char),"p":[$n[0].Array.type(System.Byte)]},{"v":true,"a":2,"n":"GetChars","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"GetChars$1","rt":$n[0].Array.type(System.Char),"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"a":2,"n":"GetChars","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"byteIndex","pt":$n[0].Int32,"ps":1},{"n":"byteCount","pt":$n[0].Int32,"ps":2},{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":3},{"n":"charIndex","pt":$n[0].Int32,"ps":4}],"sn":"GetChars$2","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,$n[0].Array.type(System.Char),$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"GetEncoding","is":true,"t":8,"pi":[{"n":"codepage","pt":$n[0].Int32,"ps":0}],"sn":"GetEncoding","rt":$n[8].Encoding,"p":[$n[0].Int32]},{"a":2,"n":"GetEncoding","is":true,"t":8,"pi":[{"n":"codepage","pt":$n[0].String,"ps":0}],"sn":"GetEncoding$1","rt":$n[8].Encoding,"p":[$n[0].String]},{"a":2,"n":"GetEncodings","is":true,"t":8,"sn":"GetEncodings","rt":System.Array.type(System.Text.EncodingInfo)},{"ab":true,"a":2,"n":"GetMaxByteCount","t":8,"pi":[{"n":"charCount","pt":$n[0].Int32,"ps":0}],"sn":"GetMaxByteCount","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"GetMaxCharCount","t":8,"pi":[{"n":"byteCount","pt":$n[0].Int32,"ps":0}],"sn":"GetMaxCharCount","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetString","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0}],"sn":"GetString","rt":$n[0].String,"p":[$n[0].Array.type(System.Byte)]},{"v":true,"a":2,"n":"GetString","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"GetString$1","rt":$n[0].String,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"a":2,"n":"ASCII","is":true,"t":16,"rt":$n[8].Encoding,"g":{"a":2,"n":"get_ASCII","t":8,"rt":$n[8].Encoding,"fg":"ASCII","is":true},"fn":"ASCII"},{"a":2,"n":"BigEndianUnicode","is":true,"t":16,"rt":$n[8].Encoding,"g":{"a":2,"n":"get_BigEndianUnicode","t":8,"rt":$n[8].Encoding,"fg":"BigEndianUnicode","is":true},"fn":"BigEndianUnicode"},{"v":true,"a":2,"n":"CodePage","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_CodePage","t":8,"rt":$n[0].Int32,"fg":"CodePage","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"CodePage"},{"a":2,"n":"Default","is":true,"t":16,"rt":$n[8].Encoding,"g":{"a":2,"n":"get_Default","t":8,"rt":$n[8].Encoding,"fg":"Default","is":true},"fn":"Default"},{"v":true,"a":2,"n":"EncodingName","t":16,"rt":$n[0].String,"g":{"v":true,"a":2,"n":"get_EncodingName","t":8,"rt":$n[0].String,"fg":"EncodingName"},"fn":"EncodingName"},{"a":2,"n":"UTF32","is":true,"t":16,"rt":$n[8].Encoding,"g":{"a":2,"n":"get_UTF32","t":8,"rt":$n[8].Encoding,"fg":"UTF32","is":true},"fn":"UTF32"},{"a":2,"n":"UTF7","is":true,"t":16,"rt":$n[8].Encoding,"g":{"a":2,"n":"get_UTF7","t":8,"rt":$n[8].Encoding,"fg":"UTF7","is":true},"fn":"UTF7"},{"a":2,"n":"UTF8","is":true,"t":16,"rt":$n[8].Encoding,"g":{"a":2,"n":"get_UTF8","t":8,"rt":$n[8].Encoding,"fg":"UTF8","is":true},"fn":"UTF8"},{"a":2,"n":"Unicode","is":true,"t":16,"rt":$n[8].Encoding,"g":{"a":2,"n":"get_Unicode","t":8,"rt":$n[8].Encoding,"fg":"Unicode","is":true},"fn":"Unicode"},{"a":1,"n":"__Property__Initializer__ASCII","is":true,"t":4,"rt":$n[8].Encoding,"sn":"__Property__Initializer__ASCII"},{"a":1,"n":"__Property__Initializer__BigEndianUnicode","is":true,"t":4,"rt":$n[8].Encoding,"sn":"__Property__Initializer__BigEndianUnicode"},{"a":1,"n":"__Property__Initializer__Default","is":true,"t":4,"rt":$n[8].Encoding,"sn":"__Property__Initializer__Default"},{"a":1,"n":"__Property__Initializer__UTF32","is":true,"t":4,"rt":$n[8].Encoding,"sn":"__Property__Initializer__UTF32"},{"a":1,"n":"__Property__Initializer__UTF7","is":true,"t":4,"rt":$n[8].Encoding,"sn":"__Property__Initializer__UTF7"},{"a":1,"n":"__Property__Initializer__UTF8","is":true,"t":4,"rt":$n[8].Encoding,"sn":"__Property__Initializer__UTF8"},{"a":1,"n":"__Property__Initializer__Unicode","is":true,"t":4,"rt":$n[8].Encoding,"sn":"__Property__Initializer__Unicode"},{"a":1,"n":"_encodings","is":true,"t":4,"rt":System.Array.type(System.Text.EncodingInfo),"sn":"_encodings"},{"a":4,"n":"_hasError","t":4,"rt":$n[0].Boolean,"sn":"_hasError","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":3,"n":"fallbackCharacter","t":4,"rt":$n[0].Char,"sn":"fallbackCharacter","box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[8].Encoding,"sn":"ASCII"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[8].Encoding,"sn":"BigEndianUnicode"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[8].Encoding,"sn":"Default"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[8].Encoding,"sn":"UTF32"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[8].Encoding,"sn":"UTF7"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[8].Encoding,"sn":"UTF8"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[8].Encoding,"sn":"Unicode"}]}; }, $n); - $m("System.Text.EncodingInfo", function () { return {"att":1048833,"a":2,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].String,$n[0].String],"pi":[{"n":"codePage","pt":$n[0].Int32,"ps":0},{"n":"name","pt":$n[0].String,"ps":1},{"n":"displayName","pt":$n[0].String,"ps":2}],"sn":"ctor"},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"o","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"GetEncoding","t":8,"sn":"GetEncoding","rt":$n[8].Encoding},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"CodePage","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_CodePage","t":8,"rt":$n[0].Int32,"fg":"CodePage","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"CodePage"},{"a":2,"n":"DisplayName","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_DisplayName","t":8,"rt":$n[0].String,"fg":"DisplayName"},"fn":"DisplayName"},{"a":2,"n":"Name","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Name","t":8,"rt":$n[0].String,"fg":"Name"},"fn":"Name"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"CodePage","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"DisplayName"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Name"}]}; }, $n); - $m("System.Text.StringBuilder", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"capacity","pt":$n[0].Int32,"ps":0}],"def":function (capacity) { return new System.Text.StringBuilder("", capacity); }},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Int32],"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"capacity","pt":$n[0].Int32,"ps":1}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Int32,$n[0].Int32],"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"length","pt":$n[0].Int32,"ps":2}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Int32,$n[0].Int32,$n[0].Int32],"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"length","pt":$n[0].Int32,"ps":2},{"n":"capacity","pt":$n[0].Int32,"ps":3}],"sn":"ctor"},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].Boolean,"ps":0}],"sn":"append","rt":$n[8].StringBuilder,"p":[$n[0].Boolean]},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].Byte,"ps":0}],"sn":"append","rt":$n[8].StringBuilder,"p":[$n[0].Byte]},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"tpc":0,"def":function (value) { return this.append(String.fromCharCode(value)); },"rt":$n[8].StringBuilder,"p":[$n[0].Char]},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"append","rt":$n[8].StringBuilder,"p":[$n[0].Decimal]},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"append","rt":$n[8].StringBuilder,"p":[$n[0].Double]},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"append","rt":$n[8].StringBuilder,"p":[$n[0].Int32]},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"tpc":0,"def":function (value) { return this.append(value.toString()); },"rt":$n[8].StringBuilder,"p":[$n[0].Int64]},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"append","rt":$n[8].StringBuilder,"p":[$n[0].Object]},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"sn":"append","rt":$n[8].StringBuilder,"p":[$n[0].Single]},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"append","rt":$n[8].StringBuilder,"p":[$n[0].String]},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].UInt32,"ps":0}],"sn":"append","rt":$n[8].StringBuilder,"p":[$n[0].UInt32]},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"tpc":0,"def":function (value) { return this.append(value.toString()); },"rt":$n[8].StringBuilder,"p":[$n[0].UInt64]},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0},{"n":"repeatCount","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (value, repeatCount) { return this.append(String.fromCharCode(value), repeatCount); },"rt":$n[8].StringBuilder,"p":[$n[0].Char,$n[0].Int32]},{"a":2,"n":"Append","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"append","rt":$n[8].StringBuilder,"p":[$n[0].String,$n[0].Int32,$n[0].Int32]},{"a":2,"n":"AppendFormat","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"args","ip":true,"pt":$n[0].Array.type(System.Object),"ps":1}],"sn":"appendFormat","rt":$n[8].StringBuilder,"p":[$n[0].String,$n[0].Array.type(System.Object)]},{"a":2,"n":"AppendLine","t":8,"sn":"appendLine","rt":$n[8].StringBuilder},{"a":2,"n":"AppendLine","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"appendLine","rt":$n[8].StringBuilder,"p":[$n[0].String]},{"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[8].StringBuilder},{"a":2,"n":"Equals","t":8,"pi":[{"n":"sb","pt":$n[8].StringBuilder,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[8].StringBuilder],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Boolean,"ps":1}],"sn":"insert","rt":$n[8].StringBuilder,"p":[$n[0].Int32,$n[0].Boolean]},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Char,"ps":1}],"tpc":0,"def":function (index, value) { return this.insert(index, String.fromCharCode(value)); },"rt":$n[8].StringBuilder,"p":[$n[0].Int32,$n[0].Char]},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Decimal,"ps":1}],"sn":"insert","rt":$n[8].StringBuilder,"p":[$n[0].Int32,$n[0].Decimal]},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Double,"ps":1}],"sn":"insert","rt":$n[8].StringBuilder,"p":[$n[0].Int32,$n[0].Double]},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Int32,"ps":1}],"sn":"insert","rt":$n[8].StringBuilder,"p":[$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Int64,"ps":1}],"tpc":0,"def":function (index, value) { return this.insert(index, value.toString()); },"rt":$n[8].StringBuilder,"p":[$n[0].Int32,$n[0].Int64]},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"insert","rt":$n[8].StringBuilder,"p":[$n[0].Int32,$n[0].Object]},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Single,"ps":1}],"sn":"insert","rt":$n[8].StringBuilder,"p":[$n[0].Int32,$n[0].Single]},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].String,"ps":1}],"sn":"insert","rt":$n[8].StringBuilder,"p":[$n[0].Int32,$n[0].String]},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].UInt32,"ps":1}],"sn":"insert","rt":$n[8].StringBuilder,"p":[$n[0].Int32,$n[0].UInt32]},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].UInt64,"ps":1}],"tpc":0,"def":function (index, value) { return this.insert(index, value.toString()); },"rt":$n[8].StringBuilder,"p":[$n[0].Int32,$n[0].UInt64]},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].String,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"insert","rt":$n[8].StringBuilder,"p":[$n[0].Int32,$n[0].String,$n[0].Int32]},{"a":2,"n":"Remove","t":8,"pi":[{"n":"startIndex","pt":$n[0].Int32,"ps":0},{"n":"length","pt":$n[0].Int32,"ps":1}],"sn":"remove","rt":$n[8].StringBuilder,"p":[$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Replace","t":8,"pi":[{"n":"oldChar","pt":$n[0].Char,"ps":0},{"n":"newChar","pt":$n[0].Char,"ps":1}],"tpc":0,"def":function (oldChar, newChar) { return this.replace(String.fromCharCode(oldChar), String.fromCharCode(newChar)); },"rt":$n[8].StringBuilder,"p":[$n[0].Char,$n[0].Char]},{"a":2,"n":"Replace","t":8,"pi":[{"n":"oldValue","pt":$n[0].String,"ps":0},{"n":"newValue","pt":$n[0].String,"ps":1}],"sn":"replace","rt":$n[8].StringBuilder,"p":[$n[0].String,$n[0].String]},{"a":2,"n":"Replace","t":8,"pi":[{"n":"oldChar","pt":$n[0].Char,"ps":0},{"n":"newChar","pt":$n[0].Char,"ps":1},{"n":"startIndex","pt":$n[0].Int32,"ps":2},{"n":"count","pt":$n[0].Int32,"ps":3}],"tpc":0,"def":function (oldChar, newChar, startIndex, count) { return this.replace(String.fromCharCode(oldChar), String.fromCharCode(newChar), startIndex, count); },"rt":$n[8].StringBuilder,"p":[$n[0].Char,$n[0].Char,$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Replace","t":8,"pi":[{"n":"oldValue","pt":$n[0].String,"ps":0},{"n":"newValue","pt":$n[0].String,"ps":1},{"n":"startIndex","pt":$n[0].Int32,"ps":2},{"n":"count","pt":$n[0].Int32,"ps":3}],"sn":"replace","rt":$n[8].StringBuilder,"p":[$n[0].String,$n[0].String,$n[0].Int32,$n[0].Int32]},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":2,"n":"ToString","t":8,"pi":[{"n":"startIndex","pt":$n[0].Int32,"ps":0},{"n":"length","pt":$n[0].Int32,"ps":1}],"sn":"toString","rt":$n[0].String,"p":[$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Capacity","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Capacity","t":8,"tpc":0,"def":function () { return this.getCapacity(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_Capacity","t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (value) { return this.setCapacity(value); },"rt":$n[0].Void,"p":[$n[0].Int32]}},{"a":2,"n":"Item","t":16,"rt":$n[0].Char,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"getChar","rt":$n[0].Char,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},"s":{"a":2,"n":"set_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Char,"ps":1}],"sn":"setChar","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Char]}},{"a":2,"n":"Length","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Length","t":8,"tpc":0,"def":function () { return this.getLength(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_Length","t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (value) { return this.setLength(value); },"rt":$n[0].Void,"p":[$n[0].Int32]}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Capacity","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Char,"sn":"Char","box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Length","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Text.UnicodeEncoding", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Boolean,$n[0].Boolean],"pi":[{"n":"bigEndian","pt":$n[0].Boolean,"ps":0},{"n":"byteOrderMark","pt":$n[0].Boolean,"ps":1}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Boolean,$n[0].Boolean,$n[0].Boolean],"pi":[{"n":"bigEndian","pt":$n[0].Boolean,"ps":0},{"n":"byteOrderMark","pt":$n[0].Boolean,"ps":1},{"n":"throwOnInvalidBytes","pt":$n[0].Boolean,"ps":2}],"sn":"$ctor2"},{"ov":true,"a":3,"n":"Decode","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":3},{"n":"charIndex","pt":$n[0].Int32,"ps":4}],"sn":"Decode$2","rt":$n[0].String,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,$n[0].Array.type(System.Char),$n[0].Int32]},{"ov":true,"a":3,"n":"Encode","t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"outputBytes","pt":$n[0].Array.type(System.Byte),"ps":1},{"n":"outputIndex","pt":$n[0].Int32,"ps":2},{"n":"writtenBytes","out":true,"pt":$n[0].Int32,"ps":3}],"sn":"Encode$3","rt":$n[0].Array.type(System.Byte),"p":[$n[0].String,$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"ov":true,"a":2,"n":"GetMaxByteCount","t":8,"pi":[{"n":"charCount","pt":$n[0].Int32,"ps":0}],"sn":"GetMaxByteCount","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"GetMaxCharCount","t":8,"pi":[{"n":"byteCount","pt":$n[0].Int32,"ps":0}],"sn":"GetMaxCharCount","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"CodePage","t":16,"rt":$n[0].Int32,"g":{"ov":true,"a":2,"n":"get_CodePage","t":8,"rt":$n[0].Int32,"fg":"CodePage","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"CodePage"},{"ov":true,"a":2,"n":"EncodingName","t":16,"rt":$n[0].String,"g":{"ov":true,"a":2,"n":"get_EncodingName","t":8,"rt":$n[0].String,"fg":"EncodingName"},"fn":"EncodingName"},{"a":1,"n":"bigEndian","t":4,"rt":$n[0].Boolean,"sn":"bigEndian","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"byteOrderMark","t":4,"rt":$n[0].Boolean,"sn":"byteOrderMark","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"throwOnInvalid","t":4,"rt":$n[0].Boolean,"sn":"throwOnInvalid","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.Text.UTF32Encoding", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Boolean,$n[0].Boolean],"pi":[{"n":"bigEndian","pt":$n[0].Boolean,"ps":0},{"n":"byteOrderMark","pt":$n[0].Boolean,"ps":1}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Boolean,$n[0].Boolean,$n[0].Boolean],"pi":[{"n":"bigEndian","pt":$n[0].Boolean,"ps":0},{"n":"byteOrderMark","pt":$n[0].Boolean,"ps":1},{"n":"throwOnInvalidBytes","pt":$n[0].Boolean,"ps":2}],"sn":"$ctor2"},{"ov":true,"a":3,"n":"Decode","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":3},{"n":"charIndex","pt":$n[0].Int32,"ps":4}],"sn":"Decode$2","rt":$n[0].String,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,$n[0].Array.type(System.Char),$n[0].Int32]},{"ov":true,"a":3,"n":"Encode","t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"outputBytes","pt":$n[0].Array.type(System.Byte),"ps":1},{"n":"outputIndex","pt":$n[0].Int32,"ps":2},{"n":"writtenBytes","out":true,"pt":$n[0].Int32,"ps":3}],"sn":"Encode$3","rt":$n[0].Array.type(System.Byte),"p":[$n[0].String,$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"ov":true,"a":2,"n":"GetMaxByteCount","t":8,"pi":[{"n":"charCount","pt":$n[0].Int32,"ps":0}],"sn":"GetMaxByteCount","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"GetMaxCharCount","t":8,"pi":[{"n":"byteCount","pt":$n[0].Int32,"ps":0}],"sn":"GetMaxCharCount","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"ToCodePoints","t":8,"pi":[{"n":"str","pt":$n[0].String,"ps":0}],"sn":"ToCodePoints","rt":$n[0].Array.type(System.Char),"p":[$n[0].String]},{"ov":true,"a":2,"n":"CodePage","t":16,"rt":$n[0].Int32,"g":{"ov":true,"a":2,"n":"get_CodePage","t":8,"rt":$n[0].Int32,"fg":"CodePage","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"CodePage"},{"ov":true,"a":2,"n":"EncodingName","t":16,"rt":$n[0].String,"g":{"ov":true,"a":2,"n":"get_EncodingName","t":8,"rt":$n[0].String,"fg":"EncodingName"},"fn":"EncodingName"},{"a":1,"n":"bigEndian","t":4,"rt":$n[0].Boolean,"sn":"bigEndian","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"byteOrderMark","t":4,"rt":$n[0].Boolean,"sn":"byteOrderMark","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"throwOnInvalid","t":4,"rt":$n[0].Boolean,"sn":"throwOnInvalid","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.Text.UTF7Encoding", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Boolean],"pi":[{"n":"allowOptionals","pt":$n[0].Boolean,"ps":0}],"sn":"$ctor1"},{"ov":true,"a":3,"n":"Decode","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":3},{"n":"charIndex","pt":$n[0].Int32,"ps":4}],"sn":"Decode$2","rt":$n[0].String,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,$n[0].Array.type(System.Char),$n[0].Int32]},{"ov":true,"a":3,"n":"Encode","t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"outputBytes","pt":$n[0].Array.type(System.Byte),"ps":1},{"n":"outputIndex","pt":$n[0].Int32,"ps":2},{"n":"writtenBytes","out":true,"pt":$n[0].Int32,"ps":3}],"sn":"Encode$3","rt":$n[0].Array.type(System.Byte),"p":[$n[0].String,$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"a":1,"n":"Escape","is":true,"t":8,"pi":[{"n":"chars","pt":$n[0].String,"ps":0}],"sn":"Escape","rt":$n[0].String,"p":[$n[0].String]},{"ov":true,"a":2,"n":"GetMaxByteCount","t":8,"pi":[{"n":"charCount","pt":$n[0].Int32,"ps":0}],"sn":"GetMaxByteCount","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"GetMaxCharCount","t":8,"pi":[{"n":"byteCount","pt":$n[0].Int32,"ps":0}],"sn":"GetMaxCharCount","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"CodePage","t":16,"rt":$n[0].Int32,"g":{"ov":true,"a":2,"n":"get_CodePage","t":8,"rt":$n[0].Int32,"fg":"CodePage","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"CodePage"},{"ov":true,"a":2,"n":"EncodingName","t":16,"rt":$n[0].String,"g":{"ov":true,"a":2,"n":"get_EncodingName","t":8,"rt":$n[0].String,"fg":"EncodingName"},"fn":"EncodingName"},{"a":1,"n":"allowOptionals","t":4,"rt":$n[0].Boolean,"sn":"allowOptionals","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.Text.UTF8Encoding", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Boolean],"pi":[{"n":"encoderShouldEmitUTF8Identifier","pt":$n[0].Boolean,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Boolean,$n[0].Boolean],"pi":[{"n":"encoderShouldEmitUTF8Identifier","pt":$n[0].Boolean,"ps":0},{"n":"throwOnInvalidBytes","pt":$n[0].Boolean,"ps":1}],"sn":"$ctor2"},{"ov":true,"a":3,"n":"Decode","t":8,"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":3},{"n":"charIndex","pt":$n[0].Int32,"ps":4}],"sn":"Decode$2","rt":$n[0].String,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,$n[0].Array.type(System.Char),$n[0].Int32]},{"ov":true,"a":3,"n":"Encode","t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0},{"n":"outputBytes","pt":$n[0].Array.type(System.Byte),"ps":1},{"n":"outputIndex","pt":$n[0].Int32,"ps":2},{"n":"writtenBytes","out":true,"pt":$n[0].Int32,"ps":3}],"sn":"Encode$3","rt":$n[0].Array.type(System.Byte),"p":[$n[0].String,$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"ov":true,"a":2,"n":"GetMaxByteCount","t":8,"pi":[{"n":"charCount","pt":$n[0].Int32,"ps":0}],"sn":"GetMaxByteCount","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"GetMaxCharCount","t":8,"pi":[{"n":"byteCount","pt":$n[0].Int32,"ps":0}],"sn":"GetMaxCharCount","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"CodePage","t":16,"rt":$n[0].Int32,"g":{"ov":true,"a":2,"n":"get_CodePage","t":8,"rt":$n[0].Int32,"fg":"CodePage","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"CodePage"},{"ov":true,"a":2,"n":"EncodingName","t":16,"rt":$n[0].String,"g":{"ov":true,"a":2,"n":"get_EncodingName","t":8,"rt":$n[0].String,"fg":"EncodingName"},"fn":"EncodingName"},{"a":1,"n":"encoderShouldEmitUTF8Identifier","t":4,"rt":$n[0].Boolean,"sn":"encoderShouldEmitUTF8Identifier","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"throwOnInvalid","t":4,"rt":$n[0].Boolean,"sn":"throwOnInvalid","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.Text.RegularExpressions.Capture", function () { return {"att":1048577,"a":2,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Int32,$n[0].Int32],"pi":[{"n":"text","pt":$n[0].String,"ps":0},{"n":"i","pt":$n[0].Int32,"ps":1},{"n":"l","pt":$n[0].Int32,"ps":2}],"sn":"ctor"},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":2,"n":"Index","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Index","t":8,"tpc":0,"def":function () { return this.getIndex(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Length","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Length","t":8,"tpc":0,"def":function () { return this.getLength(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"Value","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Value","t":8,"tpc":0,"def":function () { return this.getValue(); },"rt":$n[0].String}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Length","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Value"}]}; }, $n); - $m("System.Text.RegularExpressions.CaptureCollection", function () { return {"att":1048577,"a":2,"m":[{"a":4,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[Array,$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[6].IEnumerator},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"tpc":0,"def":function () { return this.getCount(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReadOnly","t":8,"tpc":0,"def":function () { return this.getIsReadOnly(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"IsSynchronized","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsSynchronized","t":8,"tpc":0,"def":function () { return this.getIsSynchronized(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"Item","t":16,"rt":$n[11].Capture,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (i) { return this.get(i); },"rt":$n[11].Capture,"p":[$n[0].Int32]}},{"a":2,"n":"SyncRoot","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_SyncRoot","t":8,"tpc":0,"def":function () { return this.getSyncRoot(); },"rt":$n[0].Object}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Count","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IsSynchronized","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[11].Capture,"sn":"Item"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"SyncRoot"}]}; }, $n); - $m("System.Text.RegularExpressions.Group", function () { return {"att":1048577,"a":2,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Array.type(System.Int32),$n[0].Int32],"pi":[{"n":"text","pt":$n[0].String,"ps":0},{"n":"caps","pt":$n[0].Array.type(System.Int32),"ps":1},{"n":"capcount","pt":$n[0].Int32,"ps":2}],"sn":"ctor"},{"a":2,"n":"Synchronized","is":true,"t":8,"pi":[{"n":"inner","pt":$n[11].Group,"ps":0}],"sn":"synchronized","rt":$n[11].Group,"p":[$n[11].Group]},{"a":2,"n":"Captures","t":16,"rt":$n[11].CaptureCollection,"g":{"a":2,"n":"get_Captures","t":8,"tpc":0,"def":function () { return this.getCaptures(); },"rt":$n[11].CaptureCollection}},{"a":2,"n":"Success","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Success","t":8,"tpc":0,"def":function () { return this.getSuccess(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[11].CaptureCollection,"sn":"Captures"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"Success","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.Text.RegularExpressions.GroupCollection", function () { return {"att":1048577,"a":2,"m":[{"a":4,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[Array,$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[6].IEnumerator},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"tpc":0,"def":function () { return this.getCount(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReadOnly","t":8,"tpc":0,"def":function () { return this.getIsReadOnly(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"IsSynchronized","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsSynchronized","t":8,"tpc":0,"def":function () { return this.getIsSynchronized(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"Item","t":16,"rt":$n[11].Group,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"groupnum","pt":$n[0].Int32,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"groupnum","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (groupnum) { return this.get(groupnum); },"rt":$n[11].Group,"p":[$n[0].Int32]}},{"a":2,"n":"Item","t":16,"rt":$n[11].Group,"p":[$n[0].String],"i":true,"ipi":[{"n":"groupname","pt":$n[0].String,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"groupname","pt":$n[0].String,"ps":0}],"tpc":0,"def":function (groupname) { return this.getByName(groupname); },"rt":$n[11].Group,"p":[$n[0].String]}},{"a":2,"n":"SyncRoot","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_SyncRoot","t":8,"tpc":0,"def":function () { return this.getSyncRoot(); },"rt":$n[0].Object}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Count","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IsSynchronized","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[11].Group,"sn":"Item"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[11].Group,"sn":"Item"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"SyncRoot"}]}; }, $n); - $m("System.Text.RegularExpressions.Match", function () { return {"att":1048577,"a":2,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[11].Regex,$n[0].Int32,$n[0].String,$n[0].Int32,$n[0].Int32,$n[0].Int32],"pi":[{"n":"regex","pt":$n[11].Regex,"ps":0},{"n":"capcount","pt":$n[0].Int32,"ps":1},{"n":"text","pt":$n[0].String,"ps":2},{"n":"begpos","pt":$n[0].Int32,"ps":3},{"n":"len","pt":$n[0].Int32,"ps":4},{"n":"startpos","pt":$n[0].Int32,"ps":5}],"sn":"ctor"},{"a":2,"n":"NextMatch","t":8,"sn":"nextMatch","rt":$n[11].Match},{"v":true,"a":2,"n":"Result","t":8,"pi":[{"n":"replacement","pt":$n[0].String,"ps":0}],"sn":"result","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Synchronized","is":true,"t":8,"pi":[{"n":"inner","pt":$n[11].Match,"ps":0}],"sn":"synchronized","rt":$n[11].Match,"p":[$n[11].Match]},{"a":2,"n":"Empty","is":true,"t":16,"rt":$n[11].Match,"g":{"a":2,"n":"get_Empty","is":true,"t":8,"tpc":0,"def":function () { return this.getEmpty(); },"rt":$n[11].Match}},{"v":true,"a":2,"n":"Groups","t":16,"rt":$n[11].GroupCollection,"g":{"v":true,"a":2,"n":"get_Groups","t":8,"tpc":0,"def":function () { return this.getGroups(); },"rt":$n[11].GroupCollection}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[11].Match,"sn":"Empty"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[11].GroupCollection,"sn":"Groups"}]}; }, $n); - $m("System.Text.RegularExpressions.MatchCollection", function () { return {"att":1048577,"a":2,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[11].Regex,$n[0].String,$n[0].Int32,$n[0].Int32,$n[0].Int32],"pi":[{"n":"regex","pt":$n[11].Regex,"ps":0},{"n":"input","pt":$n[0].String,"ps":1},{"n":"beginning","pt":$n[0].Int32,"ps":2},{"n":"length","pt":$n[0].Int32,"ps":3},{"n":"startat","pt":$n[0].Int32,"ps":4}],"sn":"ctor"},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[Array,$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[6].IEnumerator},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"tpc":0,"def":function () { return this.getCount(); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReadOnly","t":8,"tpc":0,"def":function () { return this.getIsReadOnly(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":2,"n":"IsSynchronized","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsSynchronized","t":8,"tpc":0,"def":function () { return this.getIsSynchronized(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"v":true,"a":2,"n":"Item","t":16,"rt":$n[11].Match,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"g":{"v":true,"a":2,"n":"get_Item","t":8,"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (i) { return this.get(i); },"rt":$n[11].Match,"p":[$n[0].Int32]}},{"a":2,"n":"SyncRoot","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_SyncRoot","t":8,"tpc":0,"def":function () { return this.getSyncRoot(); },"rt":$n[0].Object}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Count","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IsSynchronized","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[11].Match,"sn":"Item"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"SyncRoot"}]}; }, $n); - $m("System.Text.RegularExpressions.Regex", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"pattern","pt":$n[0].String,"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[11].RegexOptions],"pi":[{"n":"pattern","pt":$n[0].String,"ps":0},{"n":"options","pt":$n[11].RegexOptions,"ps":1}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[11].RegexOptions,$n[0].TimeSpan],"pi":[{"n":"pattern","pt":$n[0].String,"ps":0},{"n":"options","pt":$n[11].RegexOptions,"ps":1},{"n":"matchTimeout","pt":$n[0].TimeSpan,"ps":2}],"sn":"ctor"},{"a":2,"n":"Escape","is":true,"t":8,"pi":[{"n":"str","pt":$n[0].String,"ps":0}],"sn":"escape","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"GetGroupNames","t":8,"sn":"getGroupNames","rt":$n[0].Array.type(System.String)},{"a":2,"n":"GetGroupNumbers","t":8,"sn":"getGroupNumbers","rt":$n[0].Array.type(System.Int32)},{"a":2,"n":"GroupNameFromNumber","t":8,"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"sn":"groupNameFromNumber","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"GroupNumberFromName","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0}],"sn":"groupNumberFromName","rt":$n[0].Int32,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IsMatch","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0}],"sn":"isMatch","rt":$n[0].Boolean,"p":[$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsMatch","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"startat","pt":$n[0].Int32,"ps":1}],"sn":"isMatch","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsMatch","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1}],"sn":"isMatch","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsMatch","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"options","pt":$n[11].RegexOptions,"ps":2}],"sn":"isMatch","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String,$n[11].RegexOptions],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsMatch","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"options","pt":$n[11].RegexOptions,"ps":2},{"n":"matchTimeout","pt":$n[0].TimeSpan,"ps":3}],"sn":"isMatch","rt":$n[0].Boolean,"p":[$n[0].String,$n[0].String,$n[11].RegexOptions,$n[0].TimeSpan],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Match","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0}],"sn":"match","rt":$n[11].Match,"p":[$n[0].String]},{"a":2,"n":"Match","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"startat","pt":$n[0].Int32,"ps":1}],"sn":"match","rt":$n[11].Match,"p":[$n[0].String,$n[0].Int32]},{"a":2,"n":"Match","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1}],"sn":"match","rt":$n[11].Match,"p":[$n[0].String,$n[0].String]},{"a":2,"n":"Match","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"beginning","pt":$n[0].Int32,"ps":1},{"n":"length","pt":$n[0].Int32,"ps":2}],"sn":"match","rt":$n[11].Match,"p":[$n[0].String,$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Match","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"options","pt":$n[11].RegexOptions,"ps":2}],"sn":"match","rt":$n[11].Match,"p":[$n[0].String,$n[0].String,$n[11].RegexOptions]},{"a":2,"n":"Match","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"options","pt":$n[11].RegexOptions,"ps":2},{"n":"matchTimeout","pt":$n[0].TimeSpan,"ps":3}],"sn":"match","rt":$n[11].Match,"p":[$n[0].String,$n[0].String,$n[11].RegexOptions,$n[0].TimeSpan]},{"a":2,"n":"Matches","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0}],"sn":"matches","rt":$n[11].MatchCollection,"p":[$n[0].String]},{"a":2,"n":"Matches","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"startat","pt":$n[0].Int32,"ps":1}],"sn":"matches","rt":$n[11].MatchCollection,"p":[$n[0].String,$n[0].Int32]},{"a":2,"n":"Matches","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1}],"sn":"matches","rt":$n[11].MatchCollection,"p":[$n[0].String,$n[0].String]},{"a":2,"n":"Matches","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"options","pt":$n[11].RegexOptions,"ps":2}],"sn":"matches","rt":$n[11].MatchCollection,"p":[$n[0].String,$n[0].String,$n[11].RegexOptions]},{"a":2,"n":"Matches","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"options","pt":$n[11].RegexOptions,"ps":2},{"n":"matchTimeout","pt":$n[0].TimeSpan,"ps":3}],"sn":"matches","rt":$n[11].MatchCollection,"p":[$n[0].String,$n[0].String,$n[11].RegexOptions,$n[0].TimeSpan]},{"a":2,"n":"Replace","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"replacement","pt":$n[0].String,"ps":1}],"sn":"replace","rt":$n[0].String,"p":[$n[0].String,$n[0].String]},{"a":2,"n":"Replace","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"evaluator","pt":Function,"ps":1}],"sn":"replace","rt":$n[0].String,"p":[$n[0].String,Function]},{"a":2,"n":"Replace","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"replacement","pt":$n[0].String,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"replace","rt":$n[0].String,"p":[$n[0].String,$n[0].String,$n[0].Int32]},{"a":2,"n":"Replace","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"replacement","pt":$n[0].String,"ps":2}],"sn":"replace","rt":$n[0].String,"p":[$n[0].String,$n[0].String,$n[0].String]},{"a":2,"n":"Replace","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"evaluator","pt":Function,"ps":2}],"sn":"replace","rt":$n[0].String,"p":[$n[0].String,$n[0].String,Function]},{"a":2,"n":"Replace","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"evaluator","pt":Function,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"replace","rt":$n[0].String,"p":[$n[0].String,Function,$n[0].Int32]},{"a":2,"n":"Replace","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"replacement","pt":$n[0].String,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"startat","pt":$n[0].Int32,"ps":3}],"sn":"replace","rt":$n[0].String,"p":[$n[0].String,$n[0].String,$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Replace","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"replacement","pt":$n[0].String,"ps":2},{"n":"options","pt":$n[11].RegexOptions,"ps":3}],"sn":"replace","rt":$n[0].String,"p":[$n[0].String,$n[0].String,$n[0].String,$n[11].RegexOptions]},{"a":2,"n":"Replace","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"evaluator","pt":Function,"ps":2},{"n":"options","pt":$n[11].RegexOptions,"ps":3}],"sn":"replace","rt":$n[0].String,"p":[$n[0].String,$n[0].String,Function,$n[11].RegexOptions]},{"a":2,"n":"Replace","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"evaluator","pt":Function,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"startat","pt":$n[0].Int32,"ps":3}],"sn":"replace","rt":$n[0].String,"p":[$n[0].String,Function,$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Replace","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"replacement","pt":$n[0].String,"ps":2},{"n":"options","pt":$n[11].RegexOptions,"ps":3},{"n":"matchTimeout","pt":$n[0].TimeSpan,"ps":4}],"sn":"replace","rt":$n[0].String,"p":[$n[0].String,$n[0].String,$n[0].String,$n[11].RegexOptions,$n[0].TimeSpan]},{"a":2,"n":"Replace","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"evaluator","pt":Function,"ps":2},{"n":"options","pt":$n[11].RegexOptions,"ps":3},{"n":"matchTimeout","pt":$n[0].TimeSpan,"ps":4}],"sn":"replace","rt":$n[0].String,"p":[$n[0].String,$n[0].String,Function,$n[11].RegexOptions,$n[0].TimeSpan]},{"a":2,"n":"Split","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0}],"sn":"split","rt":$n[0].Array.type(System.String),"p":[$n[0].String]},{"a":2,"n":"Split","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1}],"sn":"split","rt":$n[0].Array.type(System.String),"p":[$n[0].String,$n[0].Int32]},{"a":2,"n":"Split","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1}],"sn":"split","rt":$n[0].Array.type(System.String),"p":[$n[0].String,$n[0].String]},{"a":2,"n":"Split","t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1},{"n":"startat","pt":$n[0].Int32,"ps":2}],"sn":"split","rt":$n[0].Array.type(System.String),"p":[$n[0].String,$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Split","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"options","pt":$n[11].RegexOptions,"ps":2}],"sn":"split","rt":$n[0].Array.type(System.String),"p":[$n[0].String,$n[0].String,$n[11].RegexOptions]},{"a":2,"n":"Split","is":true,"t":8,"pi":[{"n":"input","pt":$n[0].String,"ps":0},{"n":"pattern","pt":$n[0].String,"ps":1},{"n":"options","pt":$n[11].RegexOptions,"ps":2},{"n":"matchTimeout","pt":$n[0].TimeSpan,"ps":3}],"sn":"split","rt":$n[0].Array.type(System.String),"p":[$n[0].String,$n[0].String,$n[11].RegexOptions,$n[0].TimeSpan]},{"a":2,"n":"Unescape","is":true,"t":8,"pi":[{"n":"str","pt":$n[0].String,"ps":0}],"sn":"unescape","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"MatchTimeout","t":16,"rt":$n[0].TimeSpan,"g":{"a":2,"n":"get_MatchTimeout","t":8,"tpc":0,"def":function () { return this.getMatchTimeout(); },"rt":$n[0].TimeSpan}},{"a":2,"n":"Options","t":16,"rt":$n[11].RegexOptions,"g":{"a":2,"n":"get_Options","t":8,"tpc":0,"def":function () { return this.getOptions(); },"rt":$n[11].RegexOptions}},{"a":2,"n":"RightToLeft","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_RightToLeft","t":8,"tpc":0,"def":function () { return this.getRightToLeft(); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].TimeSpan,"sn":"MatchTimeout"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[11].RegexOptions,"sn":"Options"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"RightToLeft","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.Security.SecurityException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"inner","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Type],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"type","pt":$n[0].Type,"ps":1}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Type,$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"type","pt":$n[0].Type,"ps":1},{"n":"state","pt":$n[0].String,"ps":2}],"sn":"$ctor4"},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":2,"n":"Demanded","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_Demanded","t":8,"rt":$n[0].Object,"fg":"Demanded"},"s":{"a":2,"n":"set_Demanded","t":8,"p":[$n[0].Object],"rt":$n[0].Void,"fs":"Demanded"},"fn":"Demanded"},{"a":2,"n":"DenySetInstance","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_DenySetInstance","t":8,"rt":$n[0].Object,"fg":"DenySetInstance"},"s":{"a":2,"n":"set_DenySetInstance","t":8,"p":[$n[0].Object],"rt":$n[0].Void,"fs":"DenySetInstance"},"fn":"DenySetInstance"},{"a":2,"n":"GrantedSet","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_GrantedSet","t":8,"rt":$n[0].String,"fg":"GrantedSet"},"s":{"a":2,"n":"set_GrantedSet","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"GrantedSet"},"fn":"GrantedSet"},{"a":2,"n":"Method","t":16,"rt":$n[12].MethodInfo,"g":{"a":2,"n":"get_Method","t":8,"rt":$n[12].MethodInfo,"fg":"Method"},"s":{"a":2,"n":"set_Method","t":8,"p":[$n[12].MethodInfo],"rt":$n[0].Void,"fs":"Method"},"fn":"Method"},{"a":2,"n":"PermissionState","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_PermissionState","t":8,"rt":$n[0].String,"fg":"PermissionState"},"s":{"a":2,"n":"set_PermissionState","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"PermissionState"},"fn":"PermissionState"},{"a":2,"n":"PermissionType","t":16,"rt":$n[0].Type,"g":{"a":2,"n":"get_PermissionType","t":8,"rt":$n[0].Type,"fg":"PermissionType"},"s":{"a":2,"n":"set_PermissionType","t":8,"p":[$n[0].Type],"rt":$n[0].Void,"fs":"PermissionType"},"fn":"PermissionType"},{"a":2,"n":"PermitOnlySetInstance","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_PermitOnlySetInstance","t":8,"rt":$n[0].Object,"fg":"PermitOnlySetInstance"},"s":{"a":2,"n":"set_PermitOnlySetInstance","t":8,"p":[$n[0].Object],"rt":$n[0].Void,"fs":"PermitOnlySetInstance"},"fn":"PermitOnlySetInstance"},{"a":2,"n":"RefusedSet","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_RefusedSet","t":8,"rt":$n[0].String,"fg":"RefusedSet"},"s":{"a":2,"n":"set_RefusedSet","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"RefusedSet"},"fn":"RefusedSet"},{"a":2,"n":"Url","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Url","t":8,"rt":$n[0].String,"fg":"Url"},"s":{"a":2,"n":"set_Url","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Url"},"fn":"Url"},{"a":1,"n":"DemandedName","is":true,"t":4,"rt":$n[0].String,"sn":"DemandedName"},{"a":1,"n":"DeniedName","is":true,"t":4,"rt":$n[0].String,"sn":"DeniedName"},{"a":1,"n":"GrantedSetName","is":true,"t":4,"rt":$n[0].String,"sn":"GrantedSetName"},{"a":1,"n":"PermitOnlyName","is":true,"t":4,"rt":$n[0].String,"sn":"PermitOnlyName"},{"a":1,"n":"RefusedSetName","is":true,"t":4,"rt":$n[0].String,"sn":"RefusedSetName"},{"a":1,"n":"UrlName","is":true,"t":4,"rt":$n[0].String,"sn":"UrlName"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"Demanded"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"DenySetInstance"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"GrantedSet"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[12].MethodInfo,"sn":"Method"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"PermissionState"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Type,"sn":"PermissionType"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"PermitOnlySetInstance"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"RefusedSet"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Url"}]}; }, $n); - $m("System.Runtime.Serialization.CollectionDataContractAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"IsItemNameSetExplicitly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsItemNameSetExplicitly","t":8,"rt":$n[0].Boolean,"fg":"IsItemNameSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsItemNameSetExplicitly"},{"a":2,"n":"IsKeyNameSetExplicitly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsKeyNameSetExplicitly","t":8,"rt":$n[0].Boolean,"fg":"IsKeyNameSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsKeyNameSetExplicitly"},{"a":2,"n":"IsNameSetExplicitly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsNameSetExplicitly","t":8,"rt":$n[0].Boolean,"fg":"IsNameSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsNameSetExplicitly"},{"a":2,"n":"IsNamespaceSetExplicitly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsNamespaceSetExplicitly","t":8,"rt":$n[0].Boolean,"fg":"IsNamespaceSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsNamespaceSetExplicitly"},{"a":2,"n":"IsReference","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReference","t":8,"rt":$n[0].Boolean,"fg":"IsReference","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_IsReference","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"IsReference"},"fn":"IsReference"},{"a":2,"n":"IsReferenceSetExplicitly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReferenceSetExplicitly","t":8,"rt":$n[0].Boolean,"fg":"IsReferenceSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReferenceSetExplicitly"},{"a":2,"n":"IsValueNameSetExplicitly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsValueNameSetExplicitly","t":8,"rt":$n[0].Boolean,"fg":"IsValueNameSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsValueNameSetExplicitly"},{"a":2,"n":"ItemName","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_ItemName","t":8,"rt":$n[0].String,"fg":"ItemName"},"s":{"a":2,"n":"set_ItemName","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"ItemName"},"fn":"ItemName"},{"a":2,"n":"KeyName","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_KeyName","t":8,"rt":$n[0].String,"fg":"KeyName"},"s":{"a":2,"n":"set_KeyName","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"KeyName"},"fn":"KeyName"},{"a":2,"n":"Name","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Name","t":8,"rt":$n[0].String,"fg":"Name"},"s":{"a":2,"n":"set_Name","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Name"},"fn":"Name"},{"a":2,"n":"Namespace","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Namespace","t":8,"rt":$n[0].String,"fg":"Namespace"},"s":{"a":2,"n":"set_Namespace","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Namespace"},"fn":"Namespace"},{"a":2,"n":"ValueName","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_ValueName","t":8,"rt":$n[0].String,"fg":"ValueName"},"s":{"a":2,"n":"set_ValueName","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"ValueName"},"fn":"ValueName"},{"a":1,"n":"_isItemNameSetExplicitly","t":4,"rt":$n[0].Boolean,"sn":"_isItemNameSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_isKeyNameSetExplicitly","t":4,"rt":$n[0].Boolean,"sn":"_isKeyNameSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_isNameSetExplicitly","t":4,"rt":$n[0].Boolean,"sn":"_isNameSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_isNamespaceSetExplicitly","t":4,"rt":$n[0].Boolean,"sn":"_isNamespaceSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_isReference","t":4,"rt":$n[0].Boolean,"sn":"_isReference","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_isReferenceSetExplicitly","t":4,"rt":$n[0].Boolean,"sn":"_isReferenceSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_isValueNameSetExplicitly","t":4,"rt":$n[0].Boolean,"sn":"_isValueNameSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_itemName","t":4,"rt":$n[0].String,"sn":"_itemName"},{"a":1,"n":"_keyName","t":4,"rt":$n[0].String,"sn":"_keyName"},{"a":1,"n":"_name","t":4,"rt":$n[0].String,"sn":"_name"},{"a":1,"n":"_ns","t":4,"rt":$n[0].String,"sn":"_ns"},{"a":1,"n":"_valueName","t":4,"rt":$n[0].String,"sn":"_valueName"}],"ni":true}; }, $n); - $m("System.Runtime.Serialization.ContractNamespaceAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"contractNamespace","pt":$n[0].String,"ps":0}],"sn":"ctor"},{"a":2,"n":"ClrNamespace","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_ClrNamespace","t":8,"rt":$n[0].String,"fg":"ClrNamespace"},"s":{"a":2,"n":"set_ClrNamespace","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"ClrNamespace"},"fn":"ClrNamespace"},{"a":2,"n":"ContractNamespace","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_ContractNamespace","t":8,"rt":$n[0].String,"fg":"ContractNamespace"},"fn":"ContractNamespace"},{"a":1,"n":"_clrNamespace","t":4,"rt":$n[0].String,"sn":"_clrNamespace"},{"a":1,"n":"_contractNamespace","t":4,"rt":$n[0].String,"sn":"_contractNamespace"}],"ni":true,"am":true}; }, $n); - $m("System.Runtime.Serialization.DataContractAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"IsNameSetExplicitly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsNameSetExplicitly","t":8,"rt":$n[0].Boolean,"fg":"IsNameSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsNameSetExplicitly"},{"a":2,"n":"IsNamespaceSetExplicitly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsNamespaceSetExplicitly","t":8,"rt":$n[0].Boolean,"fg":"IsNamespaceSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsNamespaceSetExplicitly"},{"a":2,"n":"IsReference","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReference","t":8,"rt":$n[0].Boolean,"fg":"IsReference","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_IsReference","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"IsReference"},"fn":"IsReference"},{"a":2,"n":"IsReferenceSetExplicitly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReferenceSetExplicitly","t":8,"rt":$n[0].Boolean,"fg":"IsReferenceSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReferenceSetExplicitly"},{"a":2,"n":"Name","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Name","t":8,"rt":$n[0].String,"fg":"Name"},"s":{"a":2,"n":"set_Name","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Name"},"fn":"Name"},{"a":2,"n":"Namespace","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Namespace","t":8,"rt":$n[0].String,"fg":"Namespace"},"s":{"a":2,"n":"set_Namespace","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Namespace"},"fn":"Namespace"},{"a":1,"n":"_isNameSetExplicitly","t":4,"rt":$n[0].Boolean,"sn":"_isNameSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_isNamespaceSetExplicitly","t":4,"rt":$n[0].Boolean,"sn":"_isNamespaceSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_isReference","t":4,"rt":$n[0].Boolean,"sn":"_isReference","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_isReferenceSetExplicitly","t":4,"rt":$n[0].Boolean,"sn":"_isReferenceSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_name","t":4,"rt":$n[0].String,"sn":"_name"},{"a":1,"n":"_ns","t":4,"rt":$n[0].String,"sn":"_ns"}],"ni":true}; }, $n); - $m("System.Runtime.Serialization.DataMemberAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"EmitDefaultValue","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_EmitDefaultValue","t":8,"rt":$n[0].Boolean,"fg":"EmitDefaultValue","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_EmitDefaultValue","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"EmitDefaultValue"},"fn":"EmitDefaultValue"},{"a":2,"n":"IsNameSetExplicitly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsNameSetExplicitly","t":8,"rt":$n[0].Boolean,"fg":"IsNameSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsNameSetExplicitly"},{"a":2,"n":"IsRequired","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsRequired","t":8,"rt":$n[0].Boolean,"fg":"IsRequired","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_IsRequired","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"IsRequired"},"fn":"IsRequired"},{"a":2,"n":"Name","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Name","t":8,"rt":$n[0].String,"fg":"Name"},"s":{"a":2,"n":"set_Name","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Name"},"fn":"Name"},{"a":2,"n":"Order","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Order","t":8,"rt":$n[0].Int32,"fg":"Order","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_Order","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"Order"},"fn":"Order"},{"a":1,"n":"_emitDefaultValue","t":4,"rt":$n[0].Boolean,"sn":"_emitDefaultValue","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_isNameSetExplicitly","t":4,"rt":$n[0].Boolean,"sn":"_isNameSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_isRequired","t":4,"rt":$n[0].Boolean,"sn":"_isRequired","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_name","t":4,"rt":$n[0].String,"sn":"_name"},{"a":1,"n":"_order","t":4,"rt":$n[0].Int32,"sn":"_order","box":function ($v) { return H5.box($v, System.Int32);}}],"ni":true}; }, $n); - $m("System.Runtime.Serialization.EnumMemberAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"IsValueSetExplicitly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsValueSetExplicitly","t":8,"rt":$n[0].Boolean,"fg":"IsValueSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsValueSetExplicitly"},{"a":2,"n":"Value","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Value","t":8,"rt":$n[0].String,"fg":"Value"},"s":{"a":2,"n":"set_Value","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Value"},"fn":"Value"},{"a":1,"n":"_isValueSetExplicitly","t":4,"rt":$n[0].Boolean,"sn":"_isValueSetExplicitly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_value","t":4,"rt":$n[0].String,"sn":"_value"}],"ni":true}; }, $n); - $m("System.Runtime.Serialization.IDeserializationCallback", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"OnDeserialization","t":8,"pi":[{"n":"sender","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IDeserializationCallback$OnDeserialization","rt":$n[0].Void,"p":[$n[0].Object]}]}; }, $n); - $m("System.Runtime.Serialization.IFormatterConverter", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Convert","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0},{"n":"type","pt":$n[0].Type,"ps":1}],"sn":"System$Runtime$Serialization$IFormatterConverter$Convert","rt":$n[0].Object,"p":[$n[0].Object,$n[0].Type]},{"ab":true,"a":2,"n":"Convert","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0},{"n":"typeCode","pt":$n[0].TypeCode,"ps":1}],"sn":"System$Runtime$Serialization$IFormatterConverter$Convert$1","rt":$n[0].Object,"p":[$n[0].Object,$n[0].TypeCode]},{"ab":true,"a":2,"n":"ToBoolean","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToBoolean","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"ToByte","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToByte","rt":$n[0].Byte,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Byte);}},{"ab":true,"a":2,"n":"ToChar","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToChar","rt":$n[0].Char,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"ab":true,"a":2,"n":"ToDateTime","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToDateTime","rt":$n[0].DateTime,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"ab":true,"a":2,"n":"ToDecimal","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToDecimal","rt":$n[0].Decimal,"p":[$n[0].Object]},{"ab":true,"a":2,"n":"ToDouble","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToDouble","rt":$n[0].Double,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"ab":true,"a":2,"n":"ToInt16","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToInt16","rt":$n[0].Int16,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int16);}},{"ab":true,"a":2,"n":"ToInt32","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToInt32","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"ToInt64","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToInt64","rt":$n[0].Int64,"p":[$n[0].Object]},{"ab":true,"a":2,"n":"ToSByte","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToSByte","rt":$n[0].SByte,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.SByte);}},{"ab":true,"a":2,"n":"ToSingle","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToSingle","rt":$n[0].Single,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"ab":true,"a":2,"n":"ToString","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToString","rt":$n[0].String,"p":[$n[0].Object]},{"ab":true,"a":2,"n":"ToUInt16","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToUInt16","rt":$n[0].UInt16,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.UInt16);}},{"ab":true,"a":2,"n":"ToUInt32","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToUInt32","rt":$n[0].UInt32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.UInt32);}},{"ab":true,"a":2,"n":"ToUInt64","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$IFormatterConverter$ToUInt64","rt":$n[0].UInt64,"p":[$n[0].Object]}]}; }, $n); - $m("System.Runtime.Serialization.IgnoreDataMemberAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"}],"ni":true}; }, $n); - $m("System.Runtime.Serialization.InvalidDataContractException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.Runtime.Serialization.IObjectReference", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"GetRealObject","t":8,"pi":[{"n":"context","pt":$n[4].StreamingContext,"ps":0}],"sn":"System$Runtime$Serialization$IObjectReference$GetRealObject","rt":$n[0].Object,"p":[$n[4].StreamingContext]}]}; }, $n); - $m("System.Runtime.Serialization.ISafeSerializationData", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"CompleteDeserialization","t":8,"pi":[{"n":"deserialized","pt":$n[0].Object,"ps":0}],"sn":"System$Runtime$Serialization$ISafeSerializationData$CompleteDeserialization","rt":$n[0].Void,"p":[$n[0].Object]}]}; }, $n); - $m("System.Runtime.Serialization.ISerializable", function () { return {"att":1048737,"a":2}; }, $n); - $m("System.Runtime.Serialization.ISerializationSurrogateProvider", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"GetDeserializedObject","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0},{"n":"targetType","pt":$n[0].Type,"ps":1}],"sn":"System$Runtime$Serialization$ISerializationSurrogateProvider$GetDeserializedObject","rt":$n[0].Object,"p":[$n[0].Object,$n[0].Type]},{"ab":true,"a":2,"n":"GetObjectToSerialize","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0},{"n":"targetType","pt":$n[0].Type,"ps":1}],"sn":"System$Runtime$Serialization$ISerializationSurrogateProvider$GetObjectToSerialize","rt":$n[0].Object,"p":[$n[0].Object,$n[0].Type]},{"ab":true,"a":2,"n":"GetSurrogateType","t":8,"pi":[{"n":"type","pt":$n[0].Type,"ps":0}],"sn":"System$Runtime$Serialization$ISerializationSurrogateProvider$GetSurrogateType","rt":$n[0].Type,"p":[$n[0].Type]}]}; }, $n); - $m("System.Runtime.Serialization.KnownTypeAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":1,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"methodName","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Type],"pi":[{"n":"type","pt":$n[0].Type,"ps":0}],"sn":"$ctor2"},{"a":2,"n":"MethodName","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_MethodName","t":8,"rt":$n[0].String,"fg":"MethodName"},"fn":"MethodName"},{"a":2,"n":"Type","t":16,"rt":$n[0].Type,"g":{"a":2,"n":"get_Type","t":8,"rt":$n[0].Type,"fg":"Type"},"fn":"Type"},{"a":1,"n":"_methodName","t":4,"rt":$n[0].String,"sn":"_methodName"},{"a":1,"n":"_type","t":4,"rt":$n[0].Type,"sn":"_type"}],"am":true}; }, $n); - $m("System.Runtime.Serialization.SerializationException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"},{"a":1,"n":"s_nullMessage","is":true,"t":4,"rt":$n[0].String,"sn":"s_nullMessage"}]}; }, $n); - $m("System.Runtime.Serialization.SerializationEntry", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Object,$n[0].Type],"pi":[{"n":"entryName","pt":$n[0].String,"ps":0},{"n":"entryValue","pt":$n[0].Object,"ps":1},{"n":"entryType","pt":$n[0].Type,"ps":2}],"sn":"$ctor1"},{"a":2,"n":"Name","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Name","t":8,"rt":$n[0].String,"fg":"Name"},"fn":"Name"},{"a":2,"n":"ObjectType","t":16,"rt":$n[0].Type,"g":{"a":2,"n":"get_ObjectType","t":8,"rt":$n[0].Type,"fg":"ObjectType"},"fn":"ObjectType"},{"a":2,"n":"Value","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_Value","t":8,"rt":$n[0].Object,"fg":"Value"},"fn":"Value"},{"a":1,"n":"_name","t":4,"rt":$n[0].String,"sn":"_name"},{"a":1,"n":"_type","t":4,"rt":$n[0].Type,"sn":"_type"},{"a":1,"n":"_value","t":4,"rt":$n[0].Object,"sn":"_value"}]}; }, $n); - $m("System.Runtime.Serialization.SerializationInfoEnumerator", function () { return {"att":1048833,"a":2,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[0].Array.type(System.String),$n[0].Array.type(System.Object),$n[0].Array.type(System.Type),$n[0].Int32],"pi":[{"n":"members","pt":$n[0].Array.type(System.String),"ps":0},{"n":"info","pt":$n[0].Array.type(System.Object),"ps":1},{"n":"types","pt":$n[0].Array.type(System.Type),"ps":2},{"n":"numItems","pt":$n[0].Int32,"ps":3}],"sn":"ctor"},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Reset","t":8,"sn":"reset","rt":$n[0].Void},{"a":2,"n":"Current","t":16,"rt":$n[4].SerializationEntry,"g":{"a":2,"n":"get_Current","t":8,"rt":$n[4].SerializationEntry,"fg":"Current"},"fn":"Current"},{"a":2,"n":"Name","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Name","t":8,"rt":$n[0].String,"fg":"Name"},"fn":"Name"},{"a":2,"n":"ObjectType","t":16,"rt":$n[0].Type,"g":{"a":2,"n":"get_ObjectType","t":8,"rt":$n[0].Type,"fg":"ObjectType"},"fn":"ObjectType"},{"a":2,"n":"Value","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_Value","t":8,"rt":$n[0].Object,"fg":"Value"},"fn":"Value"},{"a":1,"n":"_currItem","t":4,"rt":$n[0].Int32,"sn":"_currItem","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_current","t":4,"rt":$n[0].Boolean,"sn":"_current","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_data","t":4,"rt":$n[0].Array.type(System.Object),"sn":"_data","ro":true},{"a":1,"n":"_members","t":4,"rt":$n[0].Array.type(System.String),"sn":"_members","ro":true},{"a":1,"n":"_numItems","t":4,"rt":$n[0].Int32,"sn":"_numItems","ro":true,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_types","t":4,"rt":$n[0].Array.type(System.Type),"sn":"_types","ro":true}]}; }, $n); - $m("System.Runtime.Serialization.StreamingContext", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[4].StreamingContextStates],"pi":[{"n":"state","pt":$n[4].StreamingContextStates,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[4].StreamingContextStates,$n[0].Object],"pi":[{"n":"state","pt":$n[4].StreamingContextStates,"ps":0},{"n":"additional","pt":$n[0].Object,"ps":1}],"sn":"$ctor2"},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Context","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_Context","t":8,"rt":$n[0].Object,"fg":"Context"},"fn":"Context"},{"a":2,"n":"State","t":16,"rt":$n[4].StreamingContextStates,"g":{"a":2,"n":"get_State","t":8,"rt":$n[4].StreamingContextStates,"fg":"State","box":function ($v) { return H5.box($v, System.Runtime.Serialization.StreamingContextStates, System.Enum.toStringFn(System.Runtime.Serialization.StreamingContextStates));}},"fn":"State"},{"a":1,"n":"_additionalContext","t":4,"rt":$n[0].Object,"sn":"_additionalContext","ro":true},{"a":1,"n":"_state","t":4,"rt":$n[4].StreamingContextStates,"sn":"_state","ro":true,"box":function ($v) { return H5.box($v, System.Runtime.Serialization.StreamingContextStates, System.Enum.toStringFn(System.Runtime.Serialization.StreamingContextStates));}}]}; }, $n); - $m("System.Runtime.Serialization.StreamingContextStates", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"All","is":true,"t":4,"rt":$n[4].StreamingContextStates,"sn":"All","box":function ($v) { return H5.box($v, System.Runtime.Serialization.StreamingContextStates, System.Enum.toStringFn(System.Runtime.Serialization.StreamingContextStates));}},{"a":2,"n":"Clone","is":true,"t":4,"rt":$n[4].StreamingContextStates,"sn":"Clone","box":function ($v) { return H5.box($v, System.Runtime.Serialization.StreamingContextStates, System.Enum.toStringFn(System.Runtime.Serialization.StreamingContextStates));}},{"a":2,"n":"CrossAppDomain","is":true,"t":4,"rt":$n[4].StreamingContextStates,"sn":"CrossAppDomain","box":function ($v) { return H5.box($v, System.Runtime.Serialization.StreamingContextStates, System.Enum.toStringFn(System.Runtime.Serialization.StreamingContextStates));}},{"a":2,"n":"CrossMachine","is":true,"t":4,"rt":$n[4].StreamingContextStates,"sn":"CrossMachine","box":function ($v) { return H5.box($v, System.Runtime.Serialization.StreamingContextStates, System.Enum.toStringFn(System.Runtime.Serialization.StreamingContextStates));}},{"a":2,"n":"CrossProcess","is":true,"t":4,"rt":$n[4].StreamingContextStates,"sn":"CrossProcess","box":function ($v) { return H5.box($v, System.Runtime.Serialization.StreamingContextStates, System.Enum.toStringFn(System.Runtime.Serialization.StreamingContextStates));}},{"a":2,"n":"File","is":true,"t":4,"rt":$n[4].StreamingContextStates,"sn":"File","box":function ($v) { return H5.box($v, System.Runtime.Serialization.StreamingContextStates, System.Enum.toStringFn(System.Runtime.Serialization.StreamingContextStates));}},{"a":2,"n":"Other","is":true,"t":4,"rt":$n[4].StreamingContextStates,"sn":"Other","box":function ($v) { return H5.box($v, System.Runtime.Serialization.StreamingContextStates, System.Enum.toStringFn(System.Runtime.Serialization.StreamingContextStates));}},{"a":2,"n":"Persistence","is":true,"t":4,"rt":$n[4].StreamingContextStates,"sn":"Persistence","box":function ($v) { return H5.box($v, System.Runtime.Serialization.StreamingContextStates, System.Enum.toStringFn(System.Runtime.Serialization.StreamingContextStates));}},{"a":2,"n":"Remoting","is":true,"t":4,"rt":$n[4].StreamingContextStates,"sn":"Remoting","box":function ($v) { return H5.box($v, System.Runtime.Serialization.StreamingContextStates, System.Enum.toStringFn(System.Runtime.Serialization.StreamingContextStates));}}]}; }, $n); - $m("System.Runtime.Serialization.OnDeserializedAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"}],"ni":true}; }, $n); - $m("System.Runtime.Serialization.OnDeserializingAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"}],"ni":true}; }, $n); - $m("System.Runtime.Serialization.OnSerializedAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"}],"ni":true}; }, $n); - $m("System.Runtime.Serialization.OnSerializingAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"}],"ni":true}; }, $n); - $m("System.Runtime.CompilerServices.FormattableStringFactory", function () { return {"nested":[$n[13].FormattableStringFactory.ConcreteFormattableString],"att":1048961,"a":2,"s":true,"m":[{"a":2,"n":"Create","is":true,"t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arguments","ip":true,"pt":$n[0].Array.type(System.Object),"ps":1}],"sn":"Create","rt":$n[0].FormattableString,"p":[$n[0].String,$n[0].Array.type(System.Object)]}]}; }, $n); - $m("System.Runtime.CompilerServices.FormattableStringFactory.ConcreteFormattableString", function () { return {"td":$n[13].FormattableStringFactory,"att":1048835,"a":1,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Array.type(System.Object)],"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arguments","pt":$n[0].Array.type(System.Object),"ps":1}],"sn":"ctor"},{"ov":true,"a":2,"n":"GetArgument","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"GetArgument","rt":$n[0].Object,"p":[$n[0].Int32]},{"ov":true,"a":2,"n":"GetArguments","t":8,"sn":"GetArguments","rt":$n[0].Array.type(System.Object)},{"ov":true,"a":2,"n":"ToString","t":8,"pi":[{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"ToString","rt":$n[0].String,"p":[$n[0].IFormatProvider]},{"ov":true,"a":2,"n":"ArgumentCount","t":16,"rt":$n[0].Int32,"g":{"ov":true,"a":2,"n":"get_ArgumentCount","t":8,"rt":$n[0].Int32,"fg":"ArgumentCount","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"ArgumentCount"},{"ov":true,"a":2,"n":"Format","t":16,"rt":$n[0].String,"g":{"ov":true,"a":2,"n":"get_Format","t":8,"rt":$n[0].String,"fg":"Format"},"fn":"Format"},{"a":1,"n":"_arguments","t":4,"rt":$n[0].Array.type(System.Object),"sn":"_arguments","ro":true},{"a":1,"n":"_format","t":4,"rt":$n[0].String,"sn":"_format","ro":true}]}; }, $n); - $m("System.Runtime.CompilerServices.InlineArrayAttribute", function () { return {"att":1048832,"a":4,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"length","pt":$n[0].Int32,"ps":0}],"sn":"ctor"},{"a":2,"n":"Length","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Length","t":8,"rt":$n[0].Int32,"fg":"Length","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Length"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Length","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Runtime.CompilerServices.CallerArgumentExpressionAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"parameterName","pt":$n[0].String,"ps":0}],"sn":"ctor"},{"a":2,"n":"ParameterName","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_ParameterName","t":8,"rt":$n[0].String,"fg":"ParameterName"},"fn":"ParameterName"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"ParameterName"}],"ni":true}; }, $n); - $m("System.Runtime.CompilerServices.ModuleInitializerAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"}],"ni":true}; }, $n); - $m("System.Resources.MissingManifestResourceException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"inner","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.Reflection.AmbiguousMatchException", function () { return {"att":1057025,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"inner","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.Reflection.Binder", function () { return {"att":1048705,"a":2,"m":[{"a":3,"n":".ctor","t":1,"sn":"ctor"},{"ab":true,"a":2,"n":"BindToField","t":8,"pi":[{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":0},{"n":"match","pt":System.Array.type(System.Reflection.FieldInfo),"ps":1},{"n":"value","pt":$n[0].Object,"ps":2},{"n":"culture","pt":$n[1].CultureInfo,"ps":3}],"sn":"BindToField","rt":$n[12].FieldInfo,"p":[$n[12].BindingFlags,System.Array.type(System.Reflection.FieldInfo),$n[0].Object,$n[1].CultureInfo]},{"ab":true,"a":2,"n":"BindToMethod","t":8,"pi":[{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":0},{"n":"match","pt":System.Array.type(System.Object),"ps":1},{"n":"args","ref":true,"pt":$n[0].Array.type(System.Object),"ps":2},{"n":"modifiers","pt":System.Array.type(System.Reflection.ParameterModifier),"ps":3},{"n":"culture","pt":$n[1].CultureInfo,"ps":4},{"n":"names","pt":$n[0].Array.type(System.String),"ps":5},{"n":"state","out":true,"pt":$n[0].Object,"ps":6}],"sn":"BindToMethod","rt":System.Object,"p":[$n[12].BindingFlags,System.Array.type(System.Object),$n[0].Array.type(System.Object),System.Array.type(System.Reflection.ParameterModifier),$n[1].CultureInfo,$n[0].Array.type(System.String),$n[0].Object]},{"ab":true,"a":2,"n":"ChangeType","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0},{"n":"type","pt":$n[0].Type,"ps":1},{"n":"culture","pt":$n[1].CultureInfo,"ps":2}],"sn":"ChangeType","rt":$n[0].Object,"p":[$n[0].Object,$n[0].Type,$n[1].CultureInfo]},{"ab":true,"a":2,"n":"ReorderArgumentArray","t":8,"pi":[{"n":"args","ref":true,"pt":$n[0].Array.type(System.Object),"ps":0},{"n":"state","pt":$n[0].Object,"ps":1}],"sn":"ReorderArgumentArray","rt":$n[0].Void,"p":[$n[0].Array.type(System.Object),$n[0].Object]},{"ab":true,"a":2,"n":"SelectMethod","t":8,"pi":[{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":0},{"n":"match","pt":System.Array.type(System.Object),"ps":1},{"n":"types","pt":$n[0].Array.type(System.Type),"ps":2},{"n":"modifiers","pt":System.Array.type(System.Reflection.ParameterModifier),"ps":3}],"sn":"SelectMethod","rt":System.Object,"p":[$n[12].BindingFlags,System.Array.type(System.Object),$n[0].Array.type(System.Type),System.Array.type(System.Reflection.ParameterModifier)]},{"ab":true,"a":2,"n":"SelectProperty","t":8,"pi":[{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":0},{"n":"match","pt":System.Array.type(System.Reflection.PropertyInfo),"ps":1},{"n":"returnType","pt":$n[0].Type,"ps":2},{"n":"indexes","pt":$n[0].Array.type(System.Type),"ps":3},{"n":"modifiers","pt":System.Array.type(System.Reflection.ParameterModifier),"ps":4}],"sn":"SelectProperty","rt":$n[12].PropertyInfo,"p":[$n[12].BindingFlags,System.Array.type(System.Reflection.PropertyInfo),$n[0].Type,$n[0].Array.type(System.Type),System.Array.type(System.Reflection.ParameterModifier)]}]}; }, $n); - $m("System.Reflection.BindingFlags", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"CreateInstance","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"CreateInstance","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"DeclaredOnly","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"DeclaredOnly","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"Default","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"Default","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"DoNotWrapExceptions","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"DoNotWrapExceptions","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"ExactBinding","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"ExactBinding","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"FlattenHierarchy","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"FlattenHierarchy","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"GetField","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"GetField","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"GetProperty","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"GetProperty","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"IgnoreCase","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"IgnoreCase","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"IgnoreReturn","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"IgnoreReturn","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"Instance","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"Instance","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"InvokeMethod","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"InvokeMethod","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"NonPublic","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"NonPublic","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"OptionalParamBinding","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"OptionalParamBinding","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"Public","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"Public","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"PutDispProperty","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"PutDispProperty","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"PutRefDispProperty","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"PutRefDispProperty","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"SetField","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"SetField","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"SetProperty","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"SetProperty","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"Static","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"Static","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"SuppressChangeType","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"SuppressChangeType","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}}]}; }, $n); - $m("System.Reflection.CallingConventions", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Any","is":true,"t":4,"rt":$n[12].CallingConventions,"sn":"Any","box":function ($v) { return H5.box($v, System.Reflection.CallingConventions, System.Enum.toStringFn(System.Reflection.CallingConventions));}},{"a":2,"n":"ExplicitThis","is":true,"t":4,"rt":$n[12].CallingConventions,"sn":"ExplicitThis","box":function ($v) { return H5.box($v, System.Reflection.CallingConventions, System.Enum.toStringFn(System.Reflection.CallingConventions));}},{"a":2,"n":"HasThis","is":true,"t":4,"rt":$n[12].CallingConventions,"sn":"HasThis","box":function ($v) { return H5.box($v, System.Reflection.CallingConventions, System.Enum.toStringFn(System.Reflection.CallingConventions));}},{"a":2,"n":"Standard","is":true,"t":4,"rt":$n[12].CallingConventions,"sn":"Standard","box":function ($v) { return H5.box($v, System.Reflection.CallingConventions, System.Enum.toStringFn(System.Reflection.CallingConventions));}},{"a":2,"n":"VarArgs","is":true,"t":4,"rt":$n[12].CallingConventions,"sn":"VarArgs","box":function ($v) { return H5.box($v, System.Reflection.CallingConventions, System.Enum.toStringFn(System.Reflection.CallingConventions));}}]}; }, $n); - $m("System.Reflection.ICustomAttributeProvider", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"GetCustomAttributes","t":8,"pi":[{"n":"inherit","pt":$n[0].Boolean,"ps":0}],"sn":"System$Reflection$ICustomAttributeProvider$GetCustomAttributes","rt":$n[0].Array.type(System.Object),"p":[$n[0].Boolean]},{"ab":true,"a":2,"n":"GetCustomAttributes","t":8,"pi":[{"n":"attributeType","pt":$n[0].Type,"ps":0},{"n":"inherit","pt":$n[0].Boolean,"ps":1}],"sn":"System$Reflection$ICustomAttributeProvider$GetCustomAttributes$1","rt":$n[0].Array.type(System.Object),"p":[$n[0].Type,$n[0].Boolean]},{"ab":true,"a":2,"n":"IsDefined","t":8,"pi":[{"n":"attributeType","pt":$n[0].Type,"ps":0},{"n":"inherit","pt":$n[0].Boolean,"ps":1}],"sn":"System$Reflection$ICustomAttributeProvider$IsDefined","rt":$n[0].Boolean,"p":[$n[0].Type,$n[0].Boolean],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.Reflection.InvalidFilterCriteriaException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"inner","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.Reflection.IReflect", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"GetField","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0},{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":1}],"sn":"System$Reflection$IReflect$GetField","rt":$n[12].FieldInfo,"p":[$n[0].String,$n[12].BindingFlags]},{"ab":true,"a":2,"n":"GetFields","t":8,"pi":[{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":0}],"sn":"System$Reflection$IReflect$GetFields","rt":System.Array.type(System.Reflection.FieldInfo),"p":[$n[12].BindingFlags]},{"ab":true,"a":2,"n":"GetMember","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0},{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":1}],"sn":"System$Reflection$IReflect$GetMember","rt":System.Array.type(System.Object),"p":[$n[0].String,$n[12].BindingFlags]},{"ab":true,"a":2,"n":"GetMembers","t":8,"pi":[{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":0}],"sn":"System$Reflection$IReflect$GetMembers","rt":System.Array.type(System.Object),"p":[$n[12].BindingFlags]},{"ab":true,"a":2,"n":"GetMethod","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0},{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":1}],"sn":"System$Reflection$IReflect$GetMethod","rt":$n[12].MethodInfo,"p":[$n[0].String,$n[12].BindingFlags]},{"ab":true,"a":2,"n":"GetMethod","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0},{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":1},{"n":"binder","pt":$n[12].Binder,"ps":2},{"n":"types","pt":$n[0].Array.type(System.Type),"ps":3},{"n":"modifiers","pt":System.Array.type(System.Reflection.ParameterModifier),"ps":4}],"sn":"System$Reflection$IReflect$GetMethod$1","rt":$n[12].MethodInfo,"p":[$n[0].String,$n[12].BindingFlags,$n[12].Binder,$n[0].Array.type(System.Type),System.Array.type(System.Reflection.ParameterModifier)]},{"ab":true,"a":2,"n":"GetMethods","t":8,"pi":[{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":0}],"sn":"System$Reflection$IReflect$GetMethods","rt":System.Array.type(System.Reflection.MethodInfo),"p":[$n[12].BindingFlags]},{"ab":true,"a":2,"n":"GetProperties","t":8,"pi":[{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":0}],"sn":"System$Reflection$IReflect$GetProperties","rt":System.Array.type(System.Reflection.PropertyInfo),"p":[$n[12].BindingFlags]},{"ab":true,"a":2,"n":"GetProperty","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0},{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":1}],"sn":"System$Reflection$IReflect$GetProperty","rt":$n[12].PropertyInfo,"p":[$n[0].String,$n[12].BindingFlags]},{"ab":true,"a":2,"n":"GetProperty","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0},{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":1},{"n":"binder","pt":$n[12].Binder,"ps":2},{"n":"returnType","pt":$n[0].Type,"ps":3},{"n":"types","pt":$n[0].Array.type(System.Type),"ps":4},{"n":"modifiers","pt":System.Array.type(System.Reflection.ParameterModifier),"ps":5}],"sn":"System$Reflection$IReflect$GetProperty$1","rt":$n[12].PropertyInfo,"p":[$n[0].String,$n[12].BindingFlags,$n[12].Binder,$n[0].Type,$n[0].Array.type(System.Type),System.Array.type(System.Reflection.ParameterModifier)]},{"ab":true,"a":2,"n":"InvokeMember","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0},{"n":"invokeAttr","pt":$n[12].BindingFlags,"ps":1},{"n":"binder","pt":$n[12].Binder,"ps":2},{"n":"target","pt":$n[0].Object,"ps":3},{"n":"args","pt":$n[0].Array.type(System.Object),"ps":4},{"n":"modifiers","pt":System.Array.type(System.Reflection.ParameterModifier),"ps":5},{"n":"culture","pt":$n[1].CultureInfo,"ps":6},{"n":"namedParameters","pt":$n[0].Array.type(System.String),"ps":7}],"sn":"System$Reflection$IReflect$InvokeMember","rt":$n[0].Object,"p":[$n[0].String,$n[12].BindingFlags,$n[12].Binder,$n[0].Object,$n[0].Array.type(System.Object),System.Array.type(System.Reflection.ParameterModifier),$n[1].CultureInfo,$n[0].Array.type(System.String)]},{"ab":true,"a":2,"n":"UnderlyingSystemType","t":16,"rt":$n[0].Type,"g":{"ab":true,"a":2,"n":"get_UnderlyingSystemType","t":8,"rt":$n[0].Type,"fg":"System$Reflection$IReflect$UnderlyingSystemType"},"fn":"System$Reflection$IReflect$UnderlyingSystemType"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Type,"sn":"System$Reflection$IReflect$UnderlyingSystemType"}]}; }, $n); - $m("System.Reflection.MemberTypes", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"All","is":true,"t":4,"rt":$n[12].MemberTypes,"sn":"All","box":function ($v) { return H5.box($v, System.Reflection.MemberTypes, System.Enum.toStringFn(System.Reflection.MemberTypes));}},{"a":2,"n":"Constructor","is":true,"t":4,"rt":$n[12].MemberTypes,"sn":"Constructor","box":function ($v) { return H5.box($v, System.Reflection.MemberTypes, System.Enum.toStringFn(System.Reflection.MemberTypes));}},{"a":2,"n":"Custom","is":true,"t":4,"rt":$n[12].MemberTypes,"sn":"Custom","box":function ($v) { return H5.box($v, System.Reflection.MemberTypes, System.Enum.toStringFn(System.Reflection.MemberTypes));}},{"a":2,"n":"Event","is":true,"t":4,"rt":$n[12].MemberTypes,"sn":"Event","box":function ($v) { return H5.box($v, System.Reflection.MemberTypes, System.Enum.toStringFn(System.Reflection.MemberTypes));}},{"a":2,"n":"Field","is":true,"t":4,"rt":$n[12].MemberTypes,"sn":"Field","box":function ($v) { return H5.box($v, System.Reflection.MemberTypes, System.Enum.toStringFn(System.Reflection.MemberTypes));}},{"a":2,"n":"Method","is":true,"t":4,"rt":$n[12].MemberTypes,"sn":"Method","box":function ($v) { return H5.box($v, System.Reflection.MemberTypes, System.Enum.toStringFn(System.Reflection.MemberTypes));}},{"a":2,"n":"NestedType","is":true,"t":4,"rt":$n[12].MemberTypes,"sn":"NestedType","box":function ($v) { return H5.box($v, System.Reflection.MemberTypes, System.Enum.toStringFn(System.Reflection.MemberTypes));}},{"a":2,"n":"Property","is":true,"t":4,"rt":$n[12].MemberTypes,"sn":"Property","box":function ($v) { return H5.box($v, System.Reflection.MemberTypes, System.Enum.toStringFn(System.Reflection.MemberTypes));}},{"a":2,"n":"TypeInfo","is":true,"t":4,"rt":$n[12].MemberTypes,"sn":"TypeInfo","box":function ($v) { return H5.box($v, System.Reflection.MemberTypes, System.Enum.toStringFn(System.Reflection.MemberTypes));}}]}; }, $n); - $m("System.Reflection.Module", function () { return {"att":1048705,"a":2,"m":[{"a":3,"n":".ctor","t":1,"sn":"ctor"},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"o","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"FilterTypeNameIgnoreCaseImpl","is":true,"t":8,"pi":[{"n":"cls","pt":$n[0].Type,"ps":0},{"n":"filterCriteria","pt":$n[0].Object,"ps":1}],"sn":"FilterTypeNameIgnoreCaseImpl","rt":$n[0].Boolean,"p":[$n[0].Type,$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"FilterTypeNameImpl","is":true,"t":8,"pi":[{"n":"cls","pt":$n[0].Type,"ps":0},{"n":"filterCriteria","pt":$n[0].Object,"ps":1}],"sn":"FilterTypeNameImpl","rt":$n[0].Boolean,"p":[$n[0].Type,$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"FindTypes","t":8,"pi":[{"n":"filter","pt":Function,"ps":0},{"n":"filterCriteria","pt":$n[0].Object,"ps":1}],"sn":"FindTypes","rt":$n[0].Array.type(System.Type),"p":[Function,$n[0].Object]},{"v":true,"a":2,"n":"GetCustomAttributes","t":8,"pi":[{"n":"inherit","pt":$n[0].Boolean,"ps":0}],"sn":"GetCustomAttributes","rt":$n[0].Array.type(System.Object),"p":[$n[0].Boolean]},{"v":true,"a":2,"n":"GetCustomAttributes","t":8,"pi":[{"n":"attributeType","pt":$n[0].Type,"ps":0},{"n":"inherit","pt":$n[0].Boolean,"ps":1}],"sn":"GetCustomAttributes$1","rt":$n[0].Array.type(System.Object),"p":[$n[0].Type,$n[0].Boolean]},{"a":2,"n":"GetField","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0}],"sn":"GetField","rt":$n[12].FieldInfo,"p":[$n[0].String]},{"v":true,"a":2,"n":"GetField","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0},{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":1}],"sn":"GetField$1","rt":$n[12].FieldInfo,"p":[$n[0].String,$n[12].BindingFlags]},{"a":2,"n":"GetFields","t":8,"sn":"GetFields","rt":System.Array.type(System.Reflection.FieldInfo)},{"v":true,"a":2,"n":"GetFields","t":8,"pi":[{"n":"bindingFlags","pt":$n[12].BindingFlags,"ps":0}],"sn":"GetFields$1","rt":System.Array.type(System.Reflection.FieldInfo),"p":[$n[12].BindingFlags]},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"GetMethod","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0}],"sn":"GetMethod","rt":$n[12].MethodInfo,"p":[$n[0].String]},{"a":2,"n":"GetMethod","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0},{"n":"types","pt":$n[0].Array.type(System.Type),"ps":1}],"sn":"GetMethod$2","rt":$n[12].MethodInfo,"p":[$n[0].String,$n[0].Array.type(System.Type)]},{"a":2,"n":"GetMethod","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0},{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":1},{"n":"binder","pt":$n[12].Binder,"ps":2},{"n":"callConvention","pt":$n[12].CallingConventions,"ps":3},{"n":"types","pt":$n[0].Array.type(System.Type),"ps":4},{"n":"modifiers","pt":System.Array.type(System.Reflection.ParameterModifier),"ps":5}],"sn":"GetMethod$1","rt":$n[12].MethodInfo,"p":[$n[0].String,$n[12].BindingFlags,$n[12].Binder,$n[12].CallingConventions,$n[0].Array.type(System.Type),System.Array.type(System.Reflection.ParameterModifier)]},{"v":true,"a":3,"n":"GetMethodImpl","t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0},{"n":"bindingAttr","pt":$n[12].BindingFlags,"ps":1},{"n":"binder","pt":$n[12].Binder,"ps":2},{"n":"callConvention","pt":$n[12].CallingConventions,"ps":3},{"n":"types","pt":$n[0].Array.type(System.Type),"ps":4},{"n":"modifiers","pt":System.Array.type(System.Reflection.ParameterModifier),"ps":5}],"sn":"GetMethodImpl","rt":$n[12].MethodInfo,"p":[$n[0].String,$n[12].BindingFlags,$n[12].Binder,$n[12].CallingConventions,$n[0].Array.type(System.Type),System.Array.type(System.Reflection.ParameterModifier)]},{"a":2,"n":"GetMethods","t":8,"sn":"GetMethods","rt":System.Array.type(System.Reflection.MethodInfo)},{"v":true,"a":2,"n":"GetMethods","t":8,"pi":[{"n":"bindingFlags","pt":$n[12].BindingFlags,"ps":0}],"sn":"GetMethods$1","rt":System.Array.type(System.Reflection.MethodInfo),"p":[$n[12].BindingFlags]},{"v":true,"a":2,"n":"GetType","t":8,"pi":[{"n":"className","pt":$n[0].String,"ps":0}],"sn":"GetType","rt":$n[0].Type,"p":[$n[0].String]},{"v":true,"a":2,"n":"GetType","t":8,"pi":[{"n":"className","pt":$n[0].String,"ps":0},{"n":"ignoreCase","pt":$n[0].Boolean,"ps":1}],"sn":"GetType$1","rt":$n[0].Type,"p":[$n[0].String,$n[0].Boolean]},{"v":true,"a":2,"n":"GetType","t":8,"pi":[{"n":"className","pt":$n[0].String,"ps":0},{"n":"throwOnError","pt":$n[0].Boolean,"ps":1},{"n":"ignoreCase","pt":$n[0].Boolean,"ps":2}],"sn":"GetType$2","rt":$n[0].Type,"p":[$n[0].String,$n[0].Boolean,$n[0].Boolean]},{"v":true,"a":2,"n":"GetTypes","t":8,"sn":"GetTypes","rt":$n[0].Array.type(System.Type)},{"v":true,"a":2,"n":"IsDefined","t":8,"pi":[{"n":"attributeType","pt":$n[0].Type,"ps":0},{"n":"inherit","pt":$n[0].Boolean,"ps":1}],"sn":"IsDefined","rt":$n[0].Boolean,"p":[$n[0].Type,$n[0].Boolean],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"IsResource","t":8,"sn":"IsResource","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"ResolveField","t":8,"pi":[{"n":"metadataToken","pt":$n[0].Int32,"ps":0}],"sn":"ResolveField","rt":$n[12].FieldInfo,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"ResolveField","t":8,"pi":[{"n":"metadataToken","pt":$n[0].Int32,"ps":0},{"n":"genericTypeArguments","pt":$n[0].Array.type(System.Type),"ps":1},{"n":"genericMethodArguments","pt":$n[0].Array.type(System.Type),"ps":2}],"sn":"ResolveField$1","rt":$n[12].FieldInfo,"p":[$n[0].Int32,$n[0].Array.type(System.Type),$n[0].Array.type(System.Type)]},{"a":2,"n":"ResolveMember","t":8,"pi":[{"n":"metadataToken","pt":$n[0].Int32,"ps":0}],"sn":"ResolveMember","rt":System.Object,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"ResolveMember","t":8,"pi":[{"n":"metadataToken","pt":$n[0].Int32,"ps":0},{"n":"genericTypeArguments","pt":$n[0].Array.type(System.Type),"ps":1},{"n":"genericMethodArguments","pt":$n[0].Array.type(System.Type),"ps":2}],"sn":"ResolveMember$1","rt":System.Object,"p":[$n[0].Int32,$n[0].Array.type(System.Type),$n[0].Array.type(System.Type)]},{"a":2,"n":"ResolveMethod","t":8,"pi":[{"n":"metadataToken","pt":$n[0].Int32,"ps":0}],"sn":"ResolveMethod","rt":System.Object,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"ResolveMethod","t":8,"pi":[{"n":"metadataToken","pt":$n[0].Int32,"ps":0},{"n":"genericTypeArguments","pt":$n[0].Array.type(System.Type),"ps":1},{"n":"genericMethodArguments","pt":$n[0].Array.type(System.Type),"ps":2}],"sn":"ResolveMethod$1","rt":System.Object,"p":[$n[0].Int32,$n[0].Array.type(System.Type),$n[0].Array.type(System.Type)]},{"v":true,"a":2,"n":"ResolveSignature","t":8,"pi":[{"n":"metadataToken","pt":$n[0].Int32,"ps":0}],"sn":"ResolveSignature","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Int32]},{"v":true,"a":2,"n":"ResolveString","t":8,"pi":[{"n":"metadataToken","pt":$n[0].Int32,"ps":0}],"sn":"ResolveString","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"ResolveType","t":8,"pi":[{"n":"metadataToken","pt":$n[0].Int32,"ps":0}],"sn":"ResolveType","rt":$n[0].Type,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"ResolveType","t":8,"pi":[{"n":"metadataToken","pt":$n[0].Int32,"ps":0},{"n":"genericTypeArguments","pt":$n[0].Array.type(System.Type),"ps":1},{"n":"genericMethodArguments","pt":$n[0].Array.type(System.Type),"ps":2}],"sn":"ResolveType$1","rt":$n[0].Type,"p":[$n[0].Int32,$n[0].Array.type(System.Type),$n[0].Array.type(System.Type)]},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":2,"n":"op_Equality","is":true,"t":8,"pi":[{"n":"left","pt":$n[12].Module,"ps":0},{"n":"right","pt":$n[12].Module,"ps":1}],"sn":"op_Equality","rt":$n[0].Boolean,"p":[$n[12].Module,$n[12].Module],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Inequality","is":true,"t":8,"pi":[{"n":"left","pt":$n[12].Module,"ps":0},{"n":"right","pt":$n[12].Module,"ps":1}],"sn":"op_Inequality","rt":$n[0].Boolean,"p":[$n[12].Module,$n[12].Module],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"Assembly","t":16,"rt":$n[12].Assembly,"g":{"v":true,"a":2,"n":"get_Assembly","t":8,"rt":$n[12].Assembly,"fg":"Assembly"},"fn":"Assembly"},{"v":true,"a":2,"n":"FullyQualifiedName","t":16,"rt":$n[0].String,"g":{"v":true,"a":2,"n":"get_FullyQualifiedName","t":8,"rt":$n[0].String,"fg":"FullyQualifiedName"},"fn":"FullyQualifiedName"},{"v":true,"a":2,"n":"MDStreamVersion","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_MDStreamVersion","t":8,"rt":$n[0].Int32,"fg":"MDStreamVersion","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"MDStreamVersion"},{"v":true,"a":2,"n":"MetadataToken","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_MetadataToken","t":8,"rt":$n[0].Int32,"fg":"MetadataToken","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"MetadataToken"},{"v":true,"a":2,"n":"ModuleVersionId","t":16,"rt":$n[0].Guid,"g":{"v":true,"a":2,"n":"get_ModuleVersionId","t":8,"rt":$n[0].Guid,"fg":"ModuleVersionId"},"fn":"ModuleVersionId"},{"v":true,"a":2,"n":"Name","t":16,"rt":$n[0].String,"g":{"v":true,"a":2,"n":"get_Name","t":8,"rt":$n[0].String,"fg":"Name"},"fn":"Name"},{"v":true,"a":2,"n":"ScopeName","t":16,"rt":$n[0].String,"g":{"v":true,"a":2,"n":"get_ScopeName","t":8,"rt":$n[0].String,"fg":"ScopeName"},"fn":"ScopeName"},{"a":1,"n":"DefaultLookup","is":true,"t":4,"rt":$n[12].BindingFlags,"sn":"DefaultLookup","box":function ($v) { return H5.box($v, System.Reflection.BindingFlags, System.Enum.toStringFn(System.Reflection.BindingFlags));}},{"a":2,"n":"FilterTypeName","is":true,"t":4,"rt":Function,"sn":"FilterTypeName","ro":true},{"a":2,"n":"FilterTypeNameIgnoreCase","is":true,"t":4,"rt":Function,"sn":"FilterTypeNameIgnoreCase","ro":true}]}; }, $n); - $m("System.Reflection.ParameterModifier", function () { return {"att":1048841,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"parameterCount","pt":$n[0].Int32,"ps":0}],"sn":"$ctor1"},{"a":2,"n":"Item","t":16,"rt":$n[0].Boolean,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"getItem","rt":$n[0].Boolean,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Boolean,"ps":1}],"sn":"setItem","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Boolean]}},{"a":1,"n":"_byRef","t":4,"rt":$n[0].Array.type(System.Boolean),"sn":"_byRef","ro":true}]}; }, $n); - $m("System.Reflection.TypeAttributes", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Abstract","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"Abstract","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"AnsiClass","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"AnsiClass","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"AutoClass","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"AutoClass","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"AutoLayout","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"AutoLayout","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"BeforeFieldInit","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"BeforeFieldInit","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"Class","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"Class","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"ClassSemanticsMask","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"ClassSemanticsMask","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"CustomFormatClass","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"CustomFormatClass","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"CustomFormatMask","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"CustomFormatMask","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"ExplicitLayout","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"ExplicitLayout","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"HasSecurity","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"HasSecurity","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"Import","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"Import","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"Interface","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"Interface","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"LayoutMask","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"LayoutMask","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"NestedAssembly","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"NestedAssembly","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"NestedFamANDAssem","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"NestedFamANDAssem","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"NestedFamORAssem","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"NestedFamORAssem","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"NestedFamily","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"NestedFamily","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"NestedPrivate","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"NestedPrivate","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"NestedPublic","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"NestedPublic","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"NotPublic","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"NotPublic","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"Public","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"Public","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"RTSpecialName","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"RTSpecialName","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"ReservedMask","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"ReservedMask","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"Sealed","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"Sealed","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"SequentialLayout","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"SequentialLayout","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"Serializable","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"Serializable","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"SpecialName","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"SpecialName","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"StringFormatMask","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"StringFormatMask","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"UnicodeClass","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"UnicodeClass","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"VisibilityMask","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"VisibilityMask","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}},{"a":2,"n":"WindowsRuntime","is":true,"t":4,"rt":$n[12].TypeAttributes,"sn":"WindowsRuntime","box":function ($v) { return H5.box($v, System.Reflection.TypeAttributes, System.Enum.toStringFn(System.Reflection.TypeAttributes));}}]}; }, $n); - $m("System.IO.BinaryReader", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream],"pi":[{"n":"input","pt":$n[14].Stream,"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream,$n[8].Encoding],"pi":[{"n":"input","pt":$n[14].Stream,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream,$n[8].Encoding,$n[0].Boolean],"pi":[{"n":"input","pt":$n[14].Stream,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"leaveOpen","pt":$n[0].Boolean,"ps":2}],"sn":"$ctor2"},{"v":true,"a":2,"n":"Close","t":8,"sn":"Close","rt":$n[0].Void},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"v":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"v":true,"a":3,"n":"FillBuffer","t":8,"pi":[{"n":"numBytes","pt":$n[0].Int32,"ps":0}],"sn":"FillBuffer","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":1,"n":"InternalReadChars","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"InternalReadChars","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"InternalReadOneChar","t":8,"pi":[{"n":"allowSurrogate","dv":false,"o":true,"pt":$n[0].Boolean,"ps":0}],"sn":"InternalReadOneChar","rt":$n[0].Int32,"p":[$n[0].Boolean],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"PeekChar","t":8,"sn":"PeekChar","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"Read","t":8,"sn":"Read","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"Read","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Read$1","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"Read","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Read$2","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":5,"n":"Read7BitEncodedInt","t":8,"sn":"Read7BitEncodedInt","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"ReadBoolean","t":8,"sn":"ReadBoolean","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"ReadByte","t":8,"sn":"ReadByte","rt":$n[0].Byte,"box":function ($v) { return H5.box($v, System.Byte);}},{"v":true,"a":2,"n":"ReadBytes","t":8,"pi":[{"n":"count","pt":$n[0].Int32,"ps":0}],"sn":"ReadBytes","rt":$n[0].Array.type(System.Byte),"p":[$n[0].Int32]},{"v":true,"a":2,"n":"ReadChar","t":8,"sn":"ReadChar","rt":$n[0].Char,"box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"v":true,"a":2,"n":"ReadChars","t":8,"pi":[{"n":"count","pt":$n[0].Int32,"ps":0}],"sn":"ReadChars","rt":$n[0].Array.type(System.Char),"p":[$n[0].Int32]},{"v":true,"a":2,"n":"ReadDecimal","t":8,"sn":"ReadDecimal","rt":$n[0].Decimal},{"v":true,"a":2,"n":"ReadDouble","t":8,"sn":"ReadDouble","rt":$n[0].Double,"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"v":true,"a":2,"n":"ReadInt16","t":8,"sn":"ReadInt16","rt":$n[0].Int16,"box":function ($v) { return H5.box($v, System.Int16);}},{"v":true,"a":2,"n":"ReadInt32","t":8,"sn":"ReadInt32","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"ReadInt64","t":8,"sn":"ReadInt64","rt":$n[0].Int64},{"v":true,"a":2,"n":"ReadSByte","t":8,"sn":"ReadSByte","rt":$n[0].SByte,"box":function ($v) { return H5.box($v, System.SByte);}},{"v":true,"a":2,"n":"ReadSingle","t":8,"sn":"ReadSingle","rt":$n[0].Single,"box":function ($v) { return H5.box($v, System.Single, System.Single.format, System.Single.getHashCode);}},{"v":true,"a":2,"n":"ReadString","t":8,"sn":"ReadString","rt":$n[0].String},{"v":true,"a":2,"n":"ReadUInt16","t":8,"sn":"ReadUInt16","rt":$n[0].UInt16,"box":function ($v) { return H5.box($v, System.UInt16);}},{"v":true,"a":2,"n":"ReadUInt32","t":8,"sn":"ReadUInt32","rt":$n[0].UInt32,"box":function ($v) { return H5.box($v, System.UInt32);}},{"v":true,"a":2,"n":"ReadUInt64","t":8,"sn":"ReadUInt64","rt":$n[0].UInt64},{"v":true,"a":2,"n":"BaseStream","t":16,"rt":$n[14].Stream,"g":{"v":true,"a":2,"n":"get_BaseStream","t":8,"rt":$n[14].Stream,"fg":"BaseStream"},"fn":"BaseStream"},{"a":1,"n":"MaxCharBytesSize","is":true,"t":4,"rt":$n[0].Int32,"sn":"MaxCharBytesSize","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"lastCharsRead","t":4,"rt":$n[0].Int32,"sn":"lastCharsRead","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"m_2BytesPerChar","t":4,"rt":$n[0].Boolean,"sn":"m_2BytesPerChar","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"m_buffer","t":4,"rt":$n[0].Array.type(System.Byte),"sn":"m_buffer"},{"a":1,"n":"m_charBuffer","t":4,"rt":$n[0].Array.type(System.Char),"sn":"m_charBuffer"},{"a":1,"n":"m_charBytes","t":4,"rt":$n[0].Array.type(System.Byte),"sn":"m_charBytes"},{"a":1,"n":"m_encoding","t":4,"rt":$n[8].Encoding,"sn":"m_encoding"},{"a":1,"n":"m_isMemoryStream","t":4,"rt":$n[0].Boolean,"sn":"m_isMemoryStream","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"m_leaveOpen","t":4,"rt":$n[0].Boolean,"sn":"m_leaveOpen","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"m_maxCharsSize","t":4,"rt":$n[0].Int32,"sn":"m_maxCharsSize","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"m_singleChar","t":4,"rt":$n[0].Array.type(System.Char),"sn":"m_singleChar"},{"a":1,"n":"m_stream","t":4,"rt":$n[14].Stream,"sn":"m_stream"}]}; }, $n); - $m("System.IO.BinaryWriter", function () { return {"att":1048577,"a":2,"m":[{"a":3,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream],"pi":[{"n":"output","pt":$n[14].Stream,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream,$n[8].Encoding],"pi":[{"n":"output","pt":$n[14].Stream,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream,$n[8].Encoding,$n[0].Boolean],"pi":[{"n":"output","pt":$n[14].Stream,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"leaveOpen","pt":$n[0].Boolean,"ps":2}],"sn":"$ctor3"},{"v":true,"a":2,"n":"Close","t":8,"sn":"Close","rt":$n[0].Void},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"v":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"v":true,"a":2,"n":"Flush","t":8,"sn":"Flush","rt":$n[0].Void},{"v":true,"a":2,"n":"Seek","t":8,"pi":[{"n":"offset","pt":$n[0].Int32,"ps":0},{"n":"origin","pt":$n[14].SeekOrigin,"ps":1}],"sn":"Seek","rt":$n[0].Int64,"p":[$n[0].Int32,$n[14].SeekOrigin]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Boolean,"ps":0}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].Boolean]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Byte,"ps":0}],"sn":"Write$1","rt":$n[0].Void,"p":[$n[0].Byte]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0}],"sn":"Write$2","rt":$n[0].Void,"p":[$n[0].Array.type(System.Byte)]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"ch","pt":$n[0].Char,"ps":0}],"sn":"Write$4","rt":$n[0].Void,"p":[$n[0].Char]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":0}],"sn":"Write$5","rt":$n[0].Void,"p":[$n[0].Array.type(System.Char)]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"Write$7","rt":$n[0].Void,"p":[$n[0].Decimal]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"Write$8","rt":$n[0].Void,"p":[$n[0].Double]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Int16,"ps":0}],"sn":"Write$9","rt":$n[0].Void,"p":[$n[0].Int16]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"Write$10","rt":$n[0].Void,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"Write$11","rt":$n[0].Void,"p":[$n[0].Int64]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].SByte,"ps":0}],"sn":"Write$12","rt":$n[0].Void,"p":[$n[0].SByte]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"sn":"Write$13","rt":$n[0].Void,"p":[$n[0].Single]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"Write$14","rt":$n[0].Void,"p":[$n[0].String]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].UInt16,"ps":0}],"sn":"Write$15","rt":$n[0].Void,"p":[$n[0].UInt16]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].UInt32,"ps":0}],"sn":"Write$16","rt":$n[0].Void,"p":[$n[0].UInt32]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"Write$17","rt":$n[0].Void,"p":[$n[0].UInt64]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Write$3","rt":$n[0].Void,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"chars","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Write$6","rt":$n[0].Void,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32]},{"a":3,"n":"Write7BitEncodedInt","t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"Write7BitEncodedInt","rt":$n[0].Void,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"BaseStream","t":16,"rt":$n[14].Stream,"g":{"v":true,"a":2,"n":"get_BaseStream","t":8,"rt":$n[14].Stream,"fg":"BaseStream"},"fn":"BaseStream"},{"a":1,"n":"LargeByteBufferSize","is":true,"t":4,"rt":$n[0].Int32,"sn":"LargeByteBufferSize","box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Null","is":true,"t":4,"rt":$n[14].BinaryWriter,"sn":"Null","ro":true},{"a":3,"n":"OutStream","t":4,"rt":$n[14].Stream,"sn":"OutStream"},{"a":1,"n":"_buffer","t":4,"rt":$n[0].Array.type(System.Byte),"sn":"_buffer"},{"a":1,"n":"_encoding","t":4,"rt":$n[8].Encoding,"sn":"_encoding"},{"a":1,"n":"_leaveOpen","t":4,"rt":$n[0].Boolean,"sn":"_leaveOpen","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_tmpOneCharBuffer","t":4,"rt":$n[0].Array.type(System.Char),"sn":"_tmpOneCharBuffer"}]}; }, $n); - $m("System.IO.BufferedStream", function () { return {"att":1048833,"a":2,"m":[{"a":1,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream],"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream,$n[0].Int32],"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0},{"n":"bufferSize","pt":$n[0].Int32,"ps":1}],"sn":"$ctor2"},{"a":1,"n":"ClearReadBufferBeforeWrite","t":8,"sn":"ClearReadBufferBeforeWrite","rt":$n[0].Void},{"ov":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"a":1,"n":"EnsureBufferAllocated","t":8,"sn":"EnsureBufferAllocated","rt":$n[0].Void},{"a":1,"n":"EnsureCanRead","t":8,"sn":"EnsureCanRead","rt":$n[0].Void},{"a":1,"n":"EnsureCanSeek","t":8,"sn":"EnsureCanSeek","rt":$n[0].Void},{"a":1,"n":"EnsureCanWrite","t":8,"sn":"EnsureCanWrite","rt":$n[0].Void},{"a":1,"n":"EnsureNotClosed","t":8,"sn":"EnsureNotClosed","rt":$n[0].Void},{"a":1,"n":"EnsureShadowBufferAllocated","t":8,"sn":"EnsureShadowBufferAllocated","rt":$n[0].Void},{"ov":true,"a":2,"n":"Flush","t":8,"sn":"Flush","rt":$n[0].Void},{"a":1,"n":"FlushRead","t":8,"sn":"FlushRead","rt":$n[0].Void},{"a":1,"n":"FlushWrite","t":8,"sn":"FlushWrite","rt":$n[0].Void},{"ov":true,"a":2,"n":"Read","t":8,"pi":[{"n":"array","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Read","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ReadByte","t":8,"sn":"ReadByte","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"ReadFromBuffer","t":8,"pi":[{"n":"array","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"ReadFromBuffer","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"ReadFromBuffer","t":8,"pi":[{"n":"array","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"error","out":true,"pt":$n[0].Exception,"ps":3}],"sn":"ReadFromBuffer$1","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,$n[0].Exception],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Seek","t":8,"pi":[{"n":"offset","pt":$n[0].Int64,"ps":0},{"n":"origin","pt":$n[14].SeekOrigin,"ps":1}],"sn":"Seek","rt":$n[0].Int64,"p":[$n[0].Int64,$n[14].SeekOrigin]},{"ov":true,"a":2,"n":"SetLength","t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"SetLength","rt":$n[0].Void,"p":[$n[0].Int64]},{"ov":true,"a":2,"n":"Write","t":8,"pi":[{"n":"array","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"ov":true,"a":2,"n":"WriteByte","t":8,"pi":[{"n":"value","pt":$n[0].Byte,"ps":0}],"sn":"WriteByte","rt":$n[0].Void,"p":[$n[0].Byte]},{"a":1,"n":"WriteToBuffer","t":8,"pi":[{"n":"array","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","ref":true,"pt":$n[0].Int32,"ps":1},{"n":"count","ref":true,"pt":$n[0].Int32,"ps":2}],"sn":"WriteToBuffer","rt":$n[0].Void,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"a":1,"n":"WriteToBuffer","t":8,"pi":[{"n":"array","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","ref":true,"pt":$n[0].Int32,"ps":1},{"n":"count","ref":true,"pt":$n[0].Int32,"ps":2},{"n":"error","out":true,"pt":$n[0].Exception,"ps":3}],"sn":"WriteToBuffer$1","rt":$n[0].Void,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,$n[0].Exception]},{"a":4,"n":"BufferSize","t":16,"rt":$n[0].Int32,"g":{"a":4,"n":"get_BufferSize","t":8,"rt":$n[0].Int32,"fg":"BufferSize","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"BufferSize"},{"ov":true,"a":2,"n":"CanRead","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_CanRead","t":8,"rt":$n[0].Boolean,"fg":"CanRead","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanRead"},{"ov":true,"a":2,"n":"CanSeek","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_CanSeek","t":8,"rt":$n[0].Boolean,"fg":"CanSeek","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanSeek"},{"ov":true,"a":2,"n":"CanWrite","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_CanWrite","t":8,"rt":$n[0].Boolean,"fg":"CanWrite","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanWrite"},{"ov":true,"a":2,"n":"Length","t":16,"rt":$n[0].Int64,"g":{"ov":true,"a":2,"n":"get_Length","t":8,"rt":$n[0].Int64,"fg":"Length"},"fn":"Length"},{"ov":true,"a":2,"n":"Position","t":16,"rt":$n[0].Int64,"g":{"ov":true,"a":2,"n":"get_Position","t":8,"rt":$n[0].Int64,"fg":"Position"},"s":{"ov":true,"a":2,"n":"set_Position","t":8,"p":[$n[0].Int64],"rt":$n[0].Void,"fs":"Position"},"fn":"Position"},{"a":4,"n":"UnderlyingStream","t":16,"rt":$n[14].Stream,"g":{"a":4,"n":"get_UnderlyingStream","t":8,"rt":$n[14].Stream,"fg":"UnderlyingStream"},"fn":"UnderlyingStream"},{"a":1,"n":"MaxShadowBufferSize","is":true,"t":4,"rt":$n[0].Int32,"sn":"MaxShadowBufferSize","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_DefaultBufferSize","is":true,"t":4,"rt":$n[0].Int32,"sn":"_DefaultBufferSize","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_buffer","t":4,"rt":$n[0].Array.type(System.Byte),"sn":"_buffer"},{"a":1,"n":"_bufferSize","t":4,"rt":$n[0].Int32,"sn":"_bufferSize","ro":true,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_readLen","t":4,"rt":$n[0].Int32,"sn":"_readLen","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_readPos","t":4,"rt":$n[0].Int32,"sn":"_readPos","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_stream","t":4,"rt":$n[14].Stream,"sn":"_stream"},{"a":1,"n":"_writePos","t":4,"rt":$n[0].Int32,"sn":"_writePos","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.IO.EndOfStreamException", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.IO.File", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":1,"n":"InternalReadAllBytes","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"checkHost","pt":$n[0].Boolean,"ps":1}],"sn":"InternalReadAllBytes","rt":$n[0].Array.type(System.Byte),"p":[$n[0].String,$n[0].Boolean]},{"a":1,"n":"InternalReadAllLines","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1}],"sn":"InternalReadAllLines","rt":$n[0].Array.type(System.String),"p":[$n[0].String,$n[8].Encoding]},{"a":1,"n":"InternalReadAllText","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"checkHost","pt":$n[0].Boolean,"ps":2}],"sn":"InternalReadAllText","rt":$n[0].String,"p":[$n[0].String,$n[8].Encoding,$n[0].Boolean]},{"a":2,"n":"OpenRead","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0}],"sn":"OpenRead","rt":$n[14].FileStream,"p":[$n[0].String]},{"a":2,"n":"OpenText","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0}],"sn":"OpenText","rt":$n[14].StreamReader,"p":[$n[0].String]},{"a":2,"n":"ReadAllBytes","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0}],"sn":"ReadAllBytes","rt":$n[0].Array.type(System.Byte),"p":[$n[0].String]},{"a":2,"n":"ReadAllLines","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0}],"sn":"ReadAllLines","rt":$n[0].Array.type(System.String),"p":[$n[0].String]},{"a":2,"n":"ReadAllLines","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1}],"sn":"ReadAllLines$1","rt":$n[0].Array.type(System.String),"p":[$n[0].String,$n[8].Encoding]},{"a":2,"n":"ReadAllText","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0}],"sn":"ReadAllText","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"ReadAllText","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1}],"sn":"ReadAllText$1","rt":$n[0].String,"p":[$n[0].String,$n[8].Encoding]},{"a":2,"n":"ReadLines","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0}],"sn":"ReadLines","rt":$n[3].IEnumerable$1(System.String),"p":[$n[0].String]},{"a":2,"n":"ReadLines","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1}],"sn":"ReadLines$1","rt":$n[3].IEnumerable$1(System.String),"p":[$n[0].String,$n[8].Encoding]}]}; }, $n); - $m("System.IO.FileMode", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Append","is":true,"t":4,"rt":$n[14].FileMode,"sn":"Append","box":function ($v) { return H5.box($v, System.IO.FileMode, System.Enum.toStringFn(System.IO.FileMode));}},{"a":2,"n":"Create","is":true,"t":4,"rt":$n[14].FileMode,"sn":"Create","box":function ($v) { return H5.box($v, System.IO.FileMode, System.Enum.toStringFn(System.IO.FileMode));}},{"a":2,"n":"CreateNew","is":true,"t":4,"rt":$n[14].FileMode,"sn":"CreateNew","box":function ($v) { return H5.box($v, System.IO.FileMode, System.Enum.toStringFn(System.IO.FileMode));}},{"a":2,"n":"Open","is":true,"t":4,"rt":$n[14].FileMode,"sn":"Open","box":function ($v) { return H5.box($v, System.IO.FileMode, System.Enum.toStringFn(System.IO.FileMode));}},{"a":2,"n":"OpenOrCreate","is":true,"t":4,"rt":$n[14].FileMode,"sn":"OpenOrCreate","box":function ($v) { return H5.box($v, System.IO.FileMode, System.Enum.toStringFn(System.IO.FileMode));}},{"a":2,"n":"Truncate","is":true,"t":4,"rt":$n[14].FileMode,"sn":"Truncate","box":function ($v) { return H5.box($v, System.IO.FileMode, System.Enum.toStringFn(System.IO.FileMode));}}]}; }, $n); - $m("System.IO.FileOptions", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Asynchronous","is":true,"t":4,"rt":$n[14].FileOptions,"sn":"Asynchronous","box":function ($v) { return H5.box($v, System.IO.FileOptions, System.Enum.toStringFn(System.IO.FileOptions));}},{"a":2,"n":"DeleteOnClose","is":true,"t":4,"rt":$n[14].FileOptions,"sn":"DeleteOnClose","box":function ($v) { return H5.box($v, System.IO.FileOptions, System.Enum.toStringFn(System.IO.FileOptions));}},{"a":2,"n":"Encrypted","is":true,"t":4,"rt":$n[14].FileOptions,"sn":"Encrypted","box":function ($v) { return H5.box($v, System.IO.FileOptions, System.Enum.toStringFn(System.IO.FileOptions));}},{"a":2,"n":"None","is":true,"t":4,"rt":$n[14].FileOptions,"sn":"None","box":function ($v) { return H5.box($v, System.IO.FileOptions, System.Enum.toStringFn(System.IO.FileOptions));}},{"a":2,"n":"RandomAccess","is":true,"t":4,"rt":$n[14].FileOptions,"sn":"RandomAccess","box":function ($v) { return H5.box($v, System.IO.FileOptions, System.Enum.toStringFn(System.IO.FileOptions));}},{"a":2,"n":"SequentialScan","is":true,"t":4,"rt":$n[14].FileOptions,"sn":"SequentialScan","box":function ($v) { return H5.box($v, System.IO.FileOptions, System.Enum.toStringFn(System.IO.FileOptions));}},{"a":2,"n":"WriteThrough","is":true,"t":4,"rt":$n[14].FileOptions,"sn":"WriteThrough","box":function ($v) { return H5.box($v, System.IO.FileOptions, System.Enum.toStringFn(System.IO.FileOptions));}}]}; }, $n); - $m("System.IO.FileShare", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Delete","is":true,"t":4,"rt":$n[14].FileShare,"sn":"Delete","box":function ($v) { return H5.box($v, System.IO.FileShare, System.Enum.toStringFn(System.IO.FileShare));}},{"a":2,"n":"Inheritable","is":true,"t":4,"rt":$n[14].FileShare,"sn":"Inheritable","box":function ($v) { return H5.box($v, System.IO.FileShare, System.Enum.toStringFn(System.IO.FileShare));}},{"a":2,"n":"None","is":true,"t":4,"rt":$n[14].FileShare,"sn":"None","box":function ($v) { return H5.box($v, System.IO.FileShare, System.Enum.toStringFn(System.IO.FileShare));}},{"a":2,"n":"Read","is":true,"t":4,"rt":$n[14].FileShare,"sn":"Read","box":function ($v) { return H5.box($v, System.IO.FileShare, System.Enum.toStringFn(System.IO.FileShare));}},{"a":2,"n":"ReadWrite","is":true,"t":4,"rt":$n[14].FileShare,"sn":"ReadWrite","box":function ($v) { return H5.box($v, System.IO.FileShare, System.Enum.toStringFn(System.IO.FileShare));}},{"a":2,"n":"Write","is":true,"t":4,"rt":$n[14].FileShare,"sn":"Write","box":function ($v) { return H5.box($v, System.IO.FileShare, System.Enum.toStringFn(System.IO.FileShare));}}]}; }, $n); - $m("System.IO.IOException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Int32],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"hresult","pt":$n[0].Int32,"ps":1}],"sn":"$ctor3"}]}; }, $n); - $m("System.IO.MemoryStream", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Byte)],"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"capacity","pt":$n[0].Int32,"ps":0}],"sn":"$ctor6"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Byte),$n[0].Boolean],"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"writable","pt":$n[0].Boolean,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32],"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,$n[0].Boolean],"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"writable","pt":$n[0].Boolean,"ps":3}],"sn":"$ctor4"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,$n[0].Boolean,$n[0].Boolean],"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"writable","pt":$n[0].Boolean,"ps":3},{"n":"publiclyVisible","pt":$n[0].Boolean,"ps":4}],"sn":"$ctor5"},{"ov":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"a":1,"n":"EnsureCapacity","t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"EnsureCapacity","rt":$n[0].Boolean,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"EnsureWriteable","t":8,"sn":"EnsureWriteable","rt":$n[0].Void},{"ov":true,"a":2,"n":"Flush","t":8,"sn":"Flush","rt":$n[0].Void},{"v":true,"a":2,"n":"GetBuffer","t":8,"sn":"GetBuffer","rt":$n[0].Array.type(System.Byte)},{"a":4,"n":"InternalEmulateRead","t":8,"pi":[{"n":"count","pt":$n[0].Int32,"ps":0}],"sn":"InternalEmulateRead","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"InternalGetBuffer","t":8,"sn":"InternalGetBuffer","rt":$n[0].Array.type(System.Byte)},{"a":4,"n":"InternalGetPosition","t":8,"sn":"InternalGetPosition","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"InternalReadInt32","t":8,"sn":"InternalReadInt32","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Read","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Read","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ReadByte","t":8,"sn":"ReadByte","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Seek","t":8,"pi":[{"n":"offset","pt":$n[0].Int64,"ps":0},{"n":"loc","pt":$n[14].SeekOrigin,"ps":1}],"sn":"Seek","rt":$n[0].Int64,"p":[$n[0].Int64,$n[14].SeekOrigin]},{"ov":true,"a":2,"n":"SetLength","t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"SetLength","rt":$n[0].Void,"p":[$n[0].Int64]},{"v":true,"a":2,"n":"ToArray","t":8,"sn":"ToArray","rt":$n[0].Array.type(System.Byte)},{"v":true,"a":2,"n":"TryGetBuffer","t":8,"pi":[{"n":"buffer","out":true,"pt":$n[0].ArraySegment,"ps":0}],"sn":"TryGetBuffer","rt":$n[0].Boolean,"p":[$n[0].ArraySegment],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Write","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"ov":true,"a":2,"n":"WriteByte","t":8,"pi":[{"n":"value","pt":$n[0].Byte,"ps":0}],"sn":"WriteByte","rt":$n[0].Void,"p":[$n[0].Byte]},{"v":true,"a":2,"n":"WriteTo","t":8,"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0}],"sn":"WriteTo","rt":$n[0].Void,"p":[$n[14].Stream]},{"ov":true,"a":2,"n":"CanRead","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_CanRead","t":8,"rt":$n[0].Boolean,"fg":"CanRead","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanRead"},{"ov":true,"a":2,"n":"CanSeek","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_CanSeek","t":8,"rt":$n[0].Boolean,"fg":"CanSeek","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanSeek"},{"ov":true,"a":2,"n":"CanWrite","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_CanWrite","t":8,"rt":$n[0].Boolean,"fg":"CanWrite","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanWrite"},{"v":true,"a":2,"n":"Capacity","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_Capacity","t":8,"rt":$n[0].Int32,"fg":"Capacity","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"v":true,"a":2,"n":"set_Capacity","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"Capacity"},"fn":"Capacity"},{"ov":true,"a":2,"n":"Length","t":16,"rt":$n[0].Int64,"g":{"ov":true,"a":2,"n":"get_Length","t":8,"rt":$n[0].Int64,"fg":"Length"},"fn":"Length"},{"ov":true,"a":2,"n":"Position","t":16,"rt":$n[0].Int64,"g":{"ov":true,"a":2,"n":"get_Position","t":8,"rt":$n[0].Int64,"fg":"Position"},"s":{"ov":true,"a":2,"n":"set_Position","t":8,"p":[$n[0].Int64],"rt":$n[0].Void,"fs":"Position"},"fn":"Position"},{"a":1,"n":"MemStreamMaxLength","is":true,"t":4,"rt":$n[0].Int32,"sn":"MemStreamMaxLength","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_buffer","t":4,"rt":$n[0].Array.type(System.Byte),"sn":"_buffer"},{"a":1,"n":"_capacity","t":4,"rt":$n[0].Int32,"sn":"_capacity","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_expandable","t":4,"rt":$n[0].Boolean,"sn":"_expandable","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_exposable","t":4,"rt":$n[0].Boolean,"sn":"_exposable","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_isOpen","t":4,"rt":$n[0].Boolean,"sn":"_isOpen","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_length","t":4,"rt":$n[0].Int32,"sn":"_length","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_origin","t":4,"rt":$n[0].Int32,"sn":"_origin","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_position","t":4,"rt":$n[0].Int32,"sn":"_position","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_writable","t":4,"rt":$n[0].Boolean,"sn":"_writable","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.IO.Iterator$1", function (TSource) { return {"att":1048704,"a":4,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"ab":true,"a":3,"n":"Clone","t":8,"sn":"Clone","rt":$n[14].Iterator$1(TSource)},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"v":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].IEnumerator$1(TSource)},{"ab":true,"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Current","t":16,"rt":TSource,"g":{"a":2,"n":"get_Current","t":8,"rt":TSource,"fg":"Current"},"fn":"Current"},{"a":4,"n":"current","t":4,"rt":TSource,"sn":"current"},{"a":4,"n":"state","t":4,"rt":$n[0].Int32,"sn":"state","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.IO.ReadLinesIterator", function () { return {"att":1048576,"a":4,"m":[{"a":1,"n":".ctor","t":1,"p":[$n[0].String,$n[8].Encoding,$n[14].StreamReader],"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"reader","pt":$n[14].StreamReader,"ps":2}],"sn":"ctor"},{"ov":true,"a":3,"n":"Clone","t":8,"sn":"Clone","rt":$n[14].Iterator$1(System.String)},{"a":4,"n":"CreateIterator","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1}],"sn":"CreateIterator","rt":$n[14].ReadLinesIterator,"p":[$n[0].String,$n[8].Encoding]},{"a":1,"n":"CreateIterator","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"reader","pt":$n[14].StreamReader,"ps":2}],"sn":"CreateIterator$1","rt":$n[14].ReadLinesIterator,"p":[$n[0].String,$n[8].Encoding,$n[14].StreamReader]},{"ov":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"ov":true,"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_encoding","t":4,"rt":$n[8].Encoding,"sn":"_encoding","ro":true},{"a":1,"n":"_path","t":4,"rt":$n[0].String,"sn":"_path","ro":true},{"a":1,"n":"_reader","t":4,"rt":$n[14].StreamReader,"sn":"_reader"}]}; }, $n); - $m("System.IO.SeekOrigin", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Begin","is":true,"t":4,"rt":$n[14].SeekOrigin,"sn":"Begin","box":function ($v) { return H5.box($v, System.IO.SeekOrigin, System.Enum.toStringFn(System.IO.SeekOrigin));}},{"a":2,"n":"Current","is":true,"t":4,"rt":$n[14].SeekOrigin,"sn":"Current","box":function ($v) { return H5.box($v, System.IO.SeekOrigin, System.Enum.toStringFn(System.IO.SeekOrigin));}},{"a":2,"n":"End","is":true,"t":4,"rt":$n[14].SeekOrigin,"sn":"End","box":function ($v) { return H5.box($v, System.IO.SeekOrigin, System.Enum.toStringFn(System.IO.SeekOrigin));}}]}; }, $n); - $m("System.IO.Stream", function () { return {"nested":[$n[14].Stream.NullStream,$n[14].Stream.SynchronousAsyncResult],"att":1048705,"a":2,"m":[{"a":3,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"v":true,"a":2,"n":"BeginRead","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"callback","pt":Function,"ps":3},{"n":"state","pt":$n[0].Object,"ps":4}],"sn":"BeginRead","rt":$n[0].IAsyncResult,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,Function,$n[0].Object]},{"a":4,"n":"BeginReadInternal","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"callback","pt":Function,"ps":3},{"n":"state","pt":$n[0].Object,"ps":4},{"n":"serializeAsynchronously","pt":$n[0].Boolean,"ps":5}],"sn":"BeginReadInternal","rt":$n[0].IAsyncResult,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,Function,$n[0].Object,$n[0].Boolean]},{"v":true,"a":2,"n":"BeginWrite","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"callback","pt":Function,"ps":3},{"n":"state","pt":$n[0].Object,"ps":4}],"sn":"BeginWrite","rt":$n[0].IAsyncResult,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,Function,$n[0].Object]},{"a":4,"n":"BeginWriteInternal","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"callback","pt":Function,"ps":3},{"n":"state","pt":$n[0].Object,"ps":4},{"n":"serializeAsynchronously","pt":$n[0].Boolean,"ps":5}],"sn":"BeginWriteInternal","rt":$n[0].IAsyncResult,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,Function,$n[0].Object,$n[0].Boolean]},{"a":4,"n":"BlockingBeginRead","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"callback","pt":Function,"ps":3},{"n":"state","pt":$n[0].Object,"ps":4}],"sn":"BlockingBeginRead","rt":$n[0].IAsyncResult,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,Function,$n[0].Object]},{"a":4,"n":"BlockingBeginWrite","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"callback","pt":Function,"ps":3},{"n":"state","pt":$n[0].Object,"ps":4}],"sn":"BlockingBeginWrite","rt":$n[0].IAsyncResult,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,Function,$n[0].Object]},{"a":4,"n":"BlockingEndRead","is":true,"t":8,"pi":[{"n":"asyncResult","pt":$n[0].IAsyncResult,"ps":0}],"sn":"BlockingEndRead","rt":$n[0].Int32,"p":[$n[0].IAsyncResult],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"BlockingEndWrite","is":true,"t":8,"pi":[{"n":"asyncResult","pt":$n[0].IAsyncResult,"ps":0}],"sn":"BlockingEndWrite","rt":$n[0].Void,"p":[$n[0].IAsyncResult]},{"v":true,"a":2,"n":"Close","t":8,"sn":"Close","rt":$n[0].Void},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"destination","pt":$n[14].Stream,"ps":0}],"sn":"CopyTo","rt":$n[0].Void,"p":[$n[14].Stream]},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"destination","pt":$n[14].Stream,"ps":0},{"n":"bufferSize","pt":$n[0].Int32,"ps":1}],"sn":"CopyTo$1","rt":$n[0].Void,"p":[$n[14].Stream,$n[0].Int32]},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"v":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"v":true,"a":2,"n":"EndRead","t":8,"pi":[{"n":"asyncResult","pt":$n[0].IAsyncResult,"ps":0}],"sn":"EndRead","rt":$n[0].Int32,"p":[$n[0].IAsyncResult],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"EndWrite","t":8,"pi":[{"n":"asyncResult","pt":$n[0].IAsyncResult,"ps":0}],"sn":"EndWrite","rt":$n[0].Void,"p":[$n[0].IAsyncResult]},{"ab":true,"a":2,"n":"Flush","t":8,"sn":"Flush","rt":$n[0].Void},{"a":1,"n":"InternalCopyTo","t":8,"pi":[{"n":"destination","pt":$n[14].Stream,"ps":0},{"n":"bufferSize","pt":$n[0].Int32,"ps":1}],"sn":"InternalCopyTo","rt":$n[0].Void,"p":[$n[14].Stream,$n[0].Int32]},{"ab":true,"a":2,"n":"Read","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Read","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"ReadByte","t":8,"sn":"ReadByte","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"Seek","t":8,"pi":[{"n":"offset","pt":$n[0].Int64,"ps":0},{"n":"origin","pt":$n[14].SeekOrigin,"ps":1}],"sn":"Seek","rt":$n[0].Int64,"p":[$n[0].Int64,$n[14].SeekOrigin]},{"ab":true,"a":2,"n":"SetLength","t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"SetLength","rt":$n[0].Void,"p":[$n[0].Int64]},{"a":2,"n":"Synchronized","is":true,"t":8,"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0}],"sn":"Synchronized","rt":$n[14].Stream,"p":[$n[14].Stream]},{"ab":true,"a":2,"n":"Write","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"v":true,"a":2,"n":"WriteByte","t":8,"pi":[{"n":"value","pt":$n[0].Byte,"ps":0}],"sn":"WriteByte","rt":$n[0].Void,"p":[$n[0].Byte]},{"ab":true,"a":2,"n":"CanRead","t":16,"rt":$n[0].Boolean,"g":{"ab":true,"a":2,"n":"get_CanRead","t":8,"rt":$n[0].Boolean,"fg":"CanRead","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanRead"},{"ab":true,"a":2,"n":"CanSeek","t":16,"rt":$n[0].Boolean,"g":{"ab":true,"a":2,"n":"get_CanSeek","t":8,"rt":$n[0].Boolean,"fg":"CanSeek","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanSeek"},{"v":true,"a":2,"n":"CanTimeout","t":16,"rt":$n[0].Boolean,"g":{"v":true,"a":2,"n":"get_CanTimeout","t":8,"rt":$n[0].Boolean,"fg":"CanTimeout","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanTimeout"},{"ab":true,"a":2,"n":"CanWrite","t":16,"rt":$n[0].Boolean,"g":{"ab":true,"a":2,"n":"get_CanWrite","t":8,"rt":$n[0].Boolean,"fg":"CanWrite","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanWrite"},{"ab":true,"a":2,"n":"Length","t":16,"rt":$n[0].Int64,"g":{"ab":true,"a":2,"n":"get_Length","t":8,"rt":$n[0].Int64,"fg":"Length"},"fn":"Length"},{"ab":true,"a":2,"n":"Position","t":16,"rt":$n[0].Int64,"g":{"ab":true,"a":2,"n":"get_Position","t":8,"rt":$n[0].Int64,"fg":"Position"},"s":{"ab":true,"a":2,"n":"set_Position","t":8,"p":[$n[0].Int64],"rt":$n[0].Void,"fs":"Position"},"fn":"Position"},{"v":true,"a":2,"n":"ReadTimeout","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_ReadTimeout","t":8,"rt":$n[0].Int32,"fg":"ReadTimeout","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"v":true,"a":2,"n":"set_ReadTimeout","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"ReadTimeout"},"fn":"ReadTimeout"},{"v":true,"a":2,"n":"WriteTimeout","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_WriteTimeout","t":8,"rt":$n[0].Int32,"fg":"WriteTimeout","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"v":true,"a":2,"n":"set_WriteTimeout","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"WriteTimeout"},"fn":"WriteTimeout"},{"a":2,"n":"Null","is":true,"t":4,"rt":$n[14].Stream,"sn":"Null","ro":true},{"a":1,"n":"_DefaultCopyBufferSize","is":true,"t":4,"rt":$n[0].Int32,"sn":"_DefaultCopyBufferSize","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"CanRead","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"CanSeek","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"CanWrite","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int64,"sn":"Length"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int64,"sn":"Position"}]}; }, $n); - $m("System.IO.Stream.NullStream", function () { return {"td":$n[14].Stream,"att":1057027,"a":1,"at":[new System.SerializableAttribute()],"m":[{"a":4,"n":".ctor","t":1,"sn":"ctor"},{"ov":true,"a":2,"n":"BeginRead","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"callback","pt":Function,"ps":3},{"n":"state","pt":$n[0].Object,"ps":4}],"sn":"BeginRead","rt":$n[0].IAsyncResult,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,Function,$n[0].Object]},{"ov":true,"a":2,"n":"BeginWrite","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"callback","pt":Function,"ps":3},{"n":"state","pt":$n[0].Object,"ps":4}],"sn":"BeginWrite","rt":$n[0].IAsyncResult,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32,Function,$n[0].Object]},{"ov":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"ov":true,"a":2,"n":"EndRead","t":8,"pi":[{"n":"asyncResult","pt":$n[0].IAsyncResult,"ps":0}],"sn":"EndRead","rt":$n[0].Int32,"p":[$n[0].IAsyncResult],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"EndWrite","t":8,"pi":[{"n":"asyncResult","pt":$n[0].IAsyncResult,"ps":0}],"sn":"EndWrite","rt":$n[0].Void,"p":[$n[0].IAsyncResult]},{"ov":true,"a":2,"n":"Flush","t":8,"sn":"Flush","rt":$n[0].Void},{"ov":true,"a":2,"n":"Read","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Read","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ReadByte","t":8,"sn":"ReadByte","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Seek","t":8,"pi":[{"n":"offset","pt":$n[0].Int64,"ps":0},{"n":"origin","pt":$n[14].SeekOrigin,"ps":1}],"sn":"Seek","rt":$n[0].Int64,"p":[$n[0].Int64,$n[14].SeekOrigin]},{"ov":true,"a":2,"n":"SetLength","t":8,"pi":[{"n":"length","pt":$n[0].Int64,"ps":0}],"sn":"SetLength","rt":$n[0].Void,"p":[$n[0].Int64]},{"ov":true,"a":2,"n":"Write","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"ov":true,"a":2,"n":"WriteByte","t":8,"pi":[{"n":"value","pt":$n[0].Byte,"ps":0}],"sn":"WriteByte","rt":$n[0].Void,"p":[$n[0].Byte]},{"ov":true,"a":2,"n":"CanRead","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_CanRead","t":8,"rt":$n[0].Boolean,"fg":"CanRead","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanRead"},{"ov":true,"a":2,"n":"CanSeek","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_CanSeek","t":8,"rt":$n[0].Boolean,"fg":"CanSeek","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanSeek"},{"ov":true,"a":2,"n":"CanWrite","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_CanWrite","t":8,"rt":$n[0].Boolean,"fg":"CanWrite","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanWrite"},{"ov":true,"a":2,"n":"Length","t":16,"rt":$n[0].Int64,"g":{"ov":true,"a":2,"n":"get_Length","t":8,"rt":$n[0].Int64,"fg":"Length"},"fn":"Length"},{"ov":true,"a":2,"n":"Position","t":16,"rt":$n[0].Int64,"g":{"ov":true,"a":2,"n":"get_Position","t":8,"rt":$n[0].Int64,"fg":"Position"},"s":{"ov":true,"a":2,"n":"set_Position","t":8,"p":[$n[0].Int64],"rt":$n[0].Void,"fs":"Position"},"fn":"Position"}]}; }, $n); - $m("System.IO.Stream.SynchronousAsyncResult", function () { return {"td":$n[14].Stream,"att":1048837,"a":4,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[0].Object],"pi":[{"n":"asyncStateObject","pt":$n[0].Object,"ps":0}],"sn":"$ctor2"},{"a":4,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Object],"pi":[{"n":"bytesRead","pt":$n[0].Int32,"ps":0},{"n":"asyncStateObject","pt":$n[0].Object,"ps":1}],"sn":"$ctor1"},{"a":4,"n":".ctor","t":1,"p":[$n[0].Exception,$n[0].Object,$n[0].Boolean],"pi":[{"n":"ex","pt":$n[0].Exception,"ps":0},{"n":"asyncStateObject","pt":$n[0].Object,"ps":1},{"n":"isWrite","pt":$n[0].Boolean,"ps":2}],"sn":"ctor"},{"a":4,"n":"EndRead","is":true,"t":8,"pi":[{"n":"asyncResult","pt":$n[0].IAsyncResult,"ps":0}],"sn":"EndRead","rt":$n[0].Int32,"p":[$n[0].IAsyncResult],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"EndWrite","is":true,"t":8,"pi":[{"n":"asyncResult","pt":$n[0].IAsyncResult,"ps":0}],"sn":"EndWrite","rt":$n[0].Void,"p":[$n[0].IAsyncResult]},{"a":4,"n":"ThrowIfError","t":8,"sn":"ThrowIfError","rt":$n[0].Void},{"a":2,"n":"AsyncState","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_AsyncState","t":8,"rt":$n[0].Object,"fg":"AsyncState"},"fn":"AsyncState"},{"a":2,"n":"CompletedSynchronously","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_CompletedSynchronously","t":8,"rt":$n[0].Boolean,"fg":"CompletedSynchronously","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CompletedSynchronously"},{"a":2,"n":"IsCompleted","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsCompleted","t":8,"rt":$n[0].Boolean,"fg":"IsCompleted","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsCompleted"},{"a":1,"n":"_bytesRead","t":4,"rt":$n[0].Int32,"sn":"_bytesRead","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_endXxxCalled","t":4,"rt":$n[0].Boolean,"sn":"_endXxxCalled","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_exceptionInfo","t":4,"rt":$n[0].Exception,"sn":"_exceptionInfo"},{"a":1,"n":"_isWrite","t":4,"rt":$n[0].Boolean,"sn":"_isWrite","ro":true,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_stateObject","t":4,"rt":$n[0].Object,"sn":"_stateObject","ro":true}]}; }, $n); - $m("System.IO.StreamReader", function () { return {"nested":[$n[14].StreamReader.NullStreamReader],"att":1048577,"a":2,"m":[{"a":4,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream],"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"path","pt":$n[0].String,"ps":0}],"sn":"$ctor7"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream,$n[0].Boolean],"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0},{"n":"detectEncodingFromByteOrderMarks","pt":$n[0].Boolean,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream,$n[8].Encoding],"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Boolean],"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"detectEncodingFromByteOrderMarks","pt":$n[0].Boolean,"ps":1}],"sn":"$ctor8"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[8].Encoding],"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1}],"sn":"$ctor9"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream,$n[8].Encoding,$n[0].Boolean],"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"detectEncodingFromByteOrderMarks","pt":$n[0].Boolean,"ps":2}],"sn":"$ctor4"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[8].Encoding,$n[0].Boolean],"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"detectEncodingFromByteOrderMarks","pt":$n[0].Boolean,"ps":2}],"sn":"$ctor10"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream,$n[8].Encoding,$n[0].Boolean,$n[0].Int32],"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"detectEncodingFromByteOrderMarks","pt":$n[0].Boolean,"ps":2},{"n":"bufferSize","pt":$n[0].Int32,"ps":3}],"sn":"$ctor5"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[8].Encoding,$n[0].Boolean,$n[0].Int32],"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"detectEncodingFromByteOrderMarks","pt":$n[0].Boolean,"ps":2},{"n":"bufferSize","pt":$n[0].Int32,"ps":3}],"sn":"$ctor11"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream,$n[8].Encoding,$n[0].Boolean,$n[0].Int32,$n[0].Boolean],"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"detectEncodingFromByteOrderMarks","pt":$n[0].Boolean,"ps":2},{"n":"bufferSize","pt":$n[0].Int32,"ps":3},{"n":"leaveOpen","pt":$n[0].Boolean,"ps":4}],"sn":"$ctor6"},{"a":4,"n":".ctor","t":1,"p":[$n[0].String,$n[8].Encoding,$n[0].Boolean,$n[0].Int32,$n[0].Boolean],"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"detectEncodingFromByteOrderMarks","pt":$n[0].Boolean,"ps":2},{"n":"bufferSize","pt":$n[0].Int32,"ps":3},{"n":"checkHost","pt":$n[0].Boolean,"ps":4}],"sn":"$ctor12"},{"ov":true,"a":2,"n":"Close","t":8,"sn":"Close","rt":$n[0].Void},{"a":1,"n":"CompressBuffer","t":8,"pi":[{"n":"n","pt":$n[0].Int32,"ps":0}],"sn":"CompressBuffer","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":1,"n":"DetectEncoding","t":8,"sn":"DetectEncoding","rt":$n[0].Void},{"a":2,"n":"DiscardBufferedData","t":8,"sn":"DiscardBufferedData","rt":$n[0].Void},{"ov":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"a":4,"n":"Init","t":8,"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0}],"sn":"Init","rt":$n[0].Void,"p":[$n[14].Stream]},{"a":1,"n":"Init","t":8,"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"detectEncodingFromByteOrderMarks","pt":$n[0].Boolean,"ps":2},{"n":"bufferSize","pt":$n[0].Int32,"ps":3},{"n":"leaveOpen","pt":$n[0].Boolean,"ps":4}],"sn":"Init$1","rt":$n[0].Void,"p":[$n[14].Stream,$n[8].Encoding,$n[0].Boolean,$n[0].Int32,$n[0].Boolean]},{"a":1,"n":"IsPreamble","t":8,"sn":"IsPreamble","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Peek","t":8,"sn":"Peek","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Read","t":8,"sn":"Read","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Read","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Read$1","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ReadBlock","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"ReadBlock","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":4,"n":"ReadBuffer","t":8,"sn":"ReadBuffer","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"ReadBuffer","t":8,"pi":[{"n":"userBuffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"userOffset","pt":$n[0].Int32,"ps":1},{"n":"desiredChars","pt":$n[0].Int32,"ps":2},{"n":"readToUserBuffer","out":true,"pt":$n[0].Boolean,"ps":3}],"sn":"ReadBuffer$1","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32,$n[0].Boolean],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ReadLine","t":8,"sn":"ReadLine","rt":$n[0].String},{"ov":true,"a":2,"n":"ReadToEnd","t":8,"sn":"ReadToEnd","rt":$n[0].String},{"ov":true,"a":2,"n":"ReadToEndAsync","t":8,"sn":"ReadToEndAsync","rt":$n[10].Task$1(System.String)},{"v":true,"a":2,"n":"BaseStream","t":16,"rt":$n[14].Stream,"g":{"v":true,"a":2,"n":"get_BaseStream","t":8,"rt":$n[14].Stream,"fg":"BaseStream"},"fn":"BaseStream"},{"v":true,"a":2,"n":"CurrentEncoding","t":16,"rt":$n[8].Encoding,"g":{"v":true,"a":2,"n":"get_CurrentEncoding","t":8,"rt":$n[8].Encoding,"fg":"CurrentEncoding"},"fn":"CurrentEncoding"},{"a":4,"n":"DefaultBufferSize","is":true,"t":16,"rt":$n[0].Int32,"g":{"a":4,"n":"get_DefaultBufferSize","t":8,"rt":$n[0].Int32,"fg":"DefaultBufferSize","is":true,"box":function ($v) { return H5.box($v, System.Int32);}},"fn":"DefaultBufferSize"},{"a":2,"n":"EndOfStream","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_EndOfStream","t":8,"rt":$n[0].Boolean,"fg":"EndOfStream","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"EndOfStream"},{"a":4,"n":"LeaveOpen","t":16,"rt":$n[0].Boolean,"g":{"a":4,"n":"get_LeaveOpen","t":8,"rt":$n[0].Boolean,"fg":"LeaveOpen","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"LeaveOpen"},{"a":1,"n":"DefaultFileStreamBufferSize","is":true,"t":4,"rt":$n[0].Int32,"sn":"DefaultFileStreamBufferSize","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"MinBufferSize","is":true,"t":4,"rt":$n[0].Int32,"sn":"MinBufferSize","box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Null","is":true,"t":4,"rt":$n[14].StreamReader,"sn":"Null","ro":true},{"a":1,"n":"_closable","t":4,"rt":$n[0].Boolean,"sn":"_closable","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_detectEncoding","t":4,"rt":$n[0].Boolean,"sn":"_detectEncoding","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_isBlocked","t":4,"rt":$n[0].Boolean,"sn":"_isBlocked","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_maxCharsPerBuffer","t":4,"rt":$n[0].Int32,"sn":"_maxCharsPerBuffer","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"byteBuffer","t":4,"rt":$n[0].Array.type(System.Byte),"sn":"byteBuffer"},{"a":1,"n":"byteLen","t":4,"rt":$n[0].Int32,"sn":"byteLen","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"bytePos","t":4,"rt":$n[0].Int32,"sn":"bytePos","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"charBuffer","t":4,"rt":$n[0].Array.type(System.Char),"sn":"charBuffer"},{"a":1,"n":"charLen","t":4,"rt":$n[0].Int32,"sn":"charLen","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"charPos","t":4,"rt":$n[0].Int32,"sn":"charPos","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"encoding","t":4,"rt":$n[8].Encoding,"sn":"encoding"},{"a":1,"n":"stream","t":4,"rt":$n[14].Stream,"sn":"stream"}]}; }, $n); - $m("System.IO.StreamReader.NullStreamReader", function () { return {"td":$n[14].StreamReader,"att":1048579,"a":1,"m":[{"a":4,"n":".ctor","t":1,"sn":"ctor"},{"ov":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"ov":true,"a":2,"n":"Peek","t":8,"sn":"Peek","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Read","t":8,"sn":"Read","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Read","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Read$1","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":4,"n":"ReadBuffer","t":8,"sn":"ReadBuffer","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ReadLine","t":8,"sn":"ReadLine","rt":$n[0].String},{"ov":true,"a":2,"n":"ReadToEnd","t":8,"sn":"ReadToEnd","rt":$n[0].String},{"ov":true,"a":2,"n":"BaseStream","t":16,"rt":$n[14].Stream,"g":{"ov":true,"a":2,"n":"get_BaseStream","t":8,"rt":$n[14].Stream,"fg":"BaseStream"},"fn":"BaseStream"},{"ov":true,"a":2,"n":"CurrentEncoding","t":16,"rt":$n[8].Encoding,"g":{"ov":true,"a":2,"n":"get_CurrentEncoding","t":8,"rt":$n[8].Encoding,"fg":"CurrentEncoding"},"fn":"CurrentEncoding"}]}; }, $n); - $m("System.IO.StreamWriter", function () { return {"att":1048577,"a":2,"m":[{"a":4,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream],"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"path","pt":$n[0].String,"ps":0}],"sn":"$ctor5"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream,$n[8].Encoding],"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Boolean],"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"append","pt":$n[0].Boolean,"ps":1}],"sn":"$ctor6"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream,$n[8].Encoding,$n[0].Int32],"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"bufferSize","pt":$n[0].Int32,"ps":2}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Boolean,$n[8].Encoding],"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"append","pt":$n[0].Boolean,"ps":1},{"n":"encoding","pt":$n[8].Encoding,"ps":2}],"sn":"$ctor7"},{"a":2,"n":".ctor","t":1,"p":[$n[14].Stream,$n[8].Encoding,$n[0].Int32,$n[0].Boolean],"pi":[{"n":"stream","pt":$n[14].Stream,"ps":0},{"n":"encoding","pt":$n[8].Encoding,"ps":1},{"n":"bufferSize","pt":$n[0].Int32,"ps":2},{"n":"leaveOpen","pt":$n[0].Boolean,"ps":3}],"sn":"$ctor4"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Boolean,$n[8].Encoding,$n[0].Int32],"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"append","pt":$n[0].Boolean,"ps":1},{"n":"encoding","pt":$n[8].Encoding,"ps":2},{"n":"bufferSize","pt":$n[0].Int32,"ps":3}],"sn":"$ctor8"},{"a":4,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Boolean,$n[8].Encoding,$n[0].Int32,$n[0].Boolean],"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"append","pt":$n[0].Boolean,"ps":1},{"n":"encoding","pt":$n[8].Encoding,"ps":2},{"n":"bufferSize","pt":$n[0].Int32,"ps":3},{"n":"checkHost","pt":$n[0].Boolean,"ps":4}],"sn":"$ctor9"},{"ov":true,"a":2,"n":"Close","t":8,"sn":"Close","rt":$n[0].Void},{"ov":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"ov":true,"a":2,"n":"Flush","t":8,"sn":"Flush","rt":$n[0].Void},{"a":1,"n":"Flush","t":8,"pi":[{"n":"flushStream","pt":$n[0].Boolean,"ps":0},{"n":"flushEncoder","pt":$n[0].Boolean,"ps":1}],"sn":"Flush$1","rt":$n[0].Void,"p":[$n[0].Boolean,$n[0].Boolean]},{"a":1,"n":"Init","t":8,"pi":[{"n":"streamArg","pt":$n[14].Stream,"ps":0},{"n":"encodingArg","pt":$n[8].Encoding,"ps":1},{"n":"bufferSize","pt":$n[0].Int32,"ps":2},{"n":"shouldLeaveOpen","pt":$n[0].Boolean,"ps":3}],"sn":"Init","rt":$n[0].Void,"p":[$n[14].Stream,$n[8].Encoding,$n[0].Int32,$n[0].Boolean]},{"ov":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"sn":"Write$1","rt":$n[0].Void,"p":[$n[0].Char]},{"ov":true,"a":2,"n":"Write","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0}],"sn":"Write$2","rt":$n[0].Void,"p":[$n[0].Array.type(System.Char)]},{"ov":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"Write$10","rt":$n[0].Void,"p":[$n[0].String]},{"ov":true,"a":2,"n":"Write","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Write$3","rt":$n[0].Void,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32]},{"v":true,"a":2,"n":"AutoFlush","t":16,"rt":$n[0].Boolean,"g":{"v":true,"a":2,"n":"get_AutoFlush","t":8,"rt":$n[0].Boolean,"fg":"AutoFlush","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"v":true,"a":2,"n":"set_AutoFlush","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"AutoFlush"},"fn":"AutoFlush"},{"v":true,"a":2,"n":"BaseStream","t":16,"rt":$n[14].Stream,"g":{"v":true,"a":2,"n":"get_BaseStream","t":8,"rt":$n[14].Stream,"fg":"BaseStream"},"fn":"BaseStream"},{"ov":true,"a":2,"n":"Encoding","t":16,"rt":$n[8].Encoding,"g":{"ov":true,"a":2,"n":"get_Encoding","t":8,"rt":$n[8].Encoding,"fg":"Encoding"},"fn":"Encoding"},{"a":4,"n":"HaveWrittenPreamble","t":16,"rt":$n[0].Boolean,"s":{"a":4,"n":"set_HaveWrittenPreamble","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"HaveWrittenPreamble"},"fn":"HaveWrittenPreamble"},{"a":4,"n":"LeaveOpen","t":16,"rt":$n[0].Boolean,"g":{"a":4,"n":"get_LeaveOpen","t":8,"rt":$n[0].Boolean,"fg":"LeaveOpen","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"LeaveOpen"},{"a":4,"n":"UTF8NoBOM","is":true,"t":16,"rt":$n[8].Encoding,"g":{"a":4,"n":"get_UTF8NoBOM","t":8,"rt":$n[8].Encoding,"fg":"UTF8NoBOM","is":true},"fn":"UTF8NoBOM"},{"a":4,"n":"DefaultBufferSize","is":true,"t":4,"rt":$n[0].Int32,"sn":"DefaultBufferSize","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"DefaultFileStreamBufferSize","is":true,"t":4,"rt":$n[0].Int32,"sn":"DefaultFileStreamBufferSize","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"MinBufferSize","is":true,"t":4,"rt":$n[0].Int32,"sn":"MinBufferSize","box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Null","is":true,"t":4,"rt":$n[14].StreamWriter,"sn":"Null","ro":true},{"a":1,"n":"_UTF8NoBOM","is":true,"t":4,"rt":$n[8].Encoding,"sn":"_UTF8NoBOM"},{"a":1,"n":"autoFlush","t":4,"rt":$n[0].Boolean,"sn":"autoFlush","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"byteBuffer","t":4,"rt":$n[0].Array.type(System.Byte),"sn":"byteBuffer"},{"a":1,"n":"charBuffer","t":4,"rt":$n[0].Array.type(System.Char),"sn":"charBuffer"},{"a":1,"n":"charLen","t":4,"rt":$n[0].Int32,"sn":"charLen","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"charPos","t":4,"rt":$n[0].Int32,"sn":"charPos","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"closable","t":4,"rt":$n[0].Boolean,"sn":"closable","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"encoding","t":4,"rt":$n[8].Encoding,"sn":"encoding"},{"a":1,"n":"haveWrittenPreamble","t":4,"rt":$n[0].Boolean,"sn":"haveWrittenPreamble","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"stream","t":4,"rt":$n[14].Stream,"sn":"stream"}]}; }, $n); - $m("System.IO.StringReader", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"sn":"ctor"},{"ov":true,"a":2,"n":"Close","t":8,"sn":"Close","rt":$n[0].Void},{"ov":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"ov":true,"a":2,"n":"Peek","t":8,"sn":"Peek","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Read","t":8,"sn":"Read","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Read","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Read$1","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ReadLine","t":8,"sn":"ReadLine","rt":$n[0].String},{"ov":true,"a":2,"n":"ReadToEnd","t":8,"sn":"ReadToEnd","rt":$n[0].String},{"a":1,"n":"_length","t":4,"rt":$n[0].Int32,"sn":"_length","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_pos","t":4,"rt":$n[0].Int32,"sn":"_pos","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_s","t":4,"rt":$n[0].String,"sn":"_s"}]}; }, $n); - $m("System.IO.StringWriter", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].IFormatProvider],"pi":[{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[8].StringBuilder],"pi":[{"n":"sb","pt":$n[8].StringBuilder,"ps":0}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[8].StringBuilder,$n[0].IFormatProvider],"pi":[{"n":"sb","pt":$n[8].StringBuilder,"ps":0},{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":1}],"sn":"$ctor3"},{"ov":true,"a":2,"n":"Close","t":8,"sn":"Close","rt":$n[0].Void},{"ov":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"v":true,"a":2,"n":"GetStringBuilder","t":8,"sn":"GetStringBuilder","rt":$n[8].StringBuilder},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"ov":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"sn":"Write$1","rt":$n[0].Void,"p":[$n[0].Char]},{"ov":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"Write$10","rt":$n[0].Void,"p":[$n[0].String]},{"ov":true,"a":2,"n":"Write","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Write$3","rt":$n[0].Void,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32]},{"ov":true,"a":2,"n":"Encoding","t":16,"rt":$n[8].Encoding,"g":{"ov":true,"a":2,"n":"get_Encoding","t":8,"rt":$n[8].Encoding,"fg":"Encoding"},"fn":"Encoding"},{"a":1,"n":"_isOpen","t":4,"rt":$n[0].Boolean,"sn":"_isOpen","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"_sb","t":4,"rt":$n[8].StringBuilder,"sn":"_sb"},{"a":1,"n":"m_encoding","is":true,"t":4,"rt":$n[8].UnicodeEncoding,"sn":"m_encoding"}]}; }, $n); - $m("System.IO.TextReader", function () { return {"nested":[$n[14].TextReader.NullTextReader],"att":1048705,"a":2,"m":[{"a":3,"n":".ctor","t":1,"sn":"ctor"},{"v":true,"a":2,"n":"Close","t":8,"sn":"Close","rt":$n[0].Void},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"v":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"v":true,"a":2,"n":"Peek","t":8,"sn":"Peek","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"Read","t":8,"sn":"Read","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"Read","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Read$1","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"ReadBlock","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"ReadBlock","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"ReadLine","t":8,"sn":"ReadLine","rt":$n[0].String},{"v":true,"a":2,"n":"ReadToEnd","t":8,"sn":"ReadToEnd","rt":$n[0].String},{"v":true,"a":2,"n":"ReadToEndAsync","t":8,"sn":"ReadToEndAsync","rt":$n[10].Task$1(System.String)},{"a":2,"n":"Synchronized","is":true,"t":8,"pi":[{"n":"reader","pt":$n[14].TextReader,"ps":0}],"sn":"Synchronized","rt":$n[14].TextReader,"p":[$n[14].TextReader]},{"a":2,"n":"Null","is":true,"t":4,"rt":$n[14].TextReader,"sn":"Null","ro":true}]}; }, $n); - $m("System.IO.TextReader.NullTextReader", function () { return {"td":$n[14].TextReader,"att":1057027,"a":1,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"ov":true,"a":2,"n":"Read","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Read$1","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"ReadLine","t":8,"sn":"ReadLine","rt":$n[0].String}]}; }, $n); - $m("System.IO.TextWriter", function () { return {"nested":[$n[14].TextWriter.NullTextWriter],"att":1048705,"a":2,"m":[{"a":3,"n":".ctor","t":1,"sn":"ctor"},{"a":3,"n":".ctor","t":1,"p":[$n[0].IFormatProvider],"pi":[{"n":"formatProvider","pt":$n[0].IFormatProvider,"ps":0}],"sn":"$ctor1"},{"v":true,"a":2,"n":"Close","t":8,"sn":"Close","rt":$n[0].Void},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"v":true,"a":3,"n":"Dispose","t":8,"pi":[{"n":"disposing","pt":$n[0].Boolean,"ps":0}],"sn":"Dispose$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"v":true,"a":2,"n":"Flush","t":8,"sn":"Flush","rt":$n[0].Void},{"a":2,"n":"Synchronized","is":true,"t":8,"pi":[{"n":"writer","pt":$n[14].TextWriter,"ps":0}],"sn":"Synchronized","rt":$n[14].TextWriter,"p":[$n[14].TextWriter]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Boolean,"ps":0}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].Boolean]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"sn":"Write$1","rt":$n[0].Void,"p":[$n[0].Char]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0}],"sn":"Write$2","rt":$n[0].Void,"p":[$n[0].Array.type(System.Char)]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"Write$4","rt":$n[0].Void,"p":[$n[0].Decimal]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"Write$5","rt":$n[0].Void,"p":[$n[0].Double]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"Write$6","rt":$n[0].Void,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"Write$7","rt":$n[0].Void,"p":[$n[0].Int64]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"Write$8","rt":$n[0].Void,"p":[$n[0].Object]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"sn":"Write$9","rt":$n[0].Void,"p":[$n[0].Single]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"Write$10","rt":$n[0].Void,"p":[$n[0].String]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].UInt32,"ps":0}],"sn":"Write$15","rt":$n[0].Void,"p":[$n[0].UInt32]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"Write$16","rt":$n[0].Void,"p":[$n[0].UInt64]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1}],"sn":"Write$11","rt":$n[0].Void,"p":[$n[0].String,$n[0].Object]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg","ip":true,"pt":$n[0].Array.type(System.Object),"ps":1}],"sn":"Write$14","rt":$n[0].Void,"p":[$n[0].String,$n[0].Array.type(System.Object)]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Write$3","rt":$n[0].Void,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1},{"n":"arg1","pt":$n[0].Object,"ps":2}],"sn":"Write$12","rt":$n[0].Void,"p":[$n[0].String,$n[0].Object,$n[0].Object]},{"v":true,"a":2,"n":"Write","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1},{"n":"arg1","pt":$n[0].Object,"ps":2},{"n":"arg2","pt":$n[0].Object,"ps":3}],"sn":"Write$13","rt":$n[0].Void,"p":[$n[0].String,$n[0].Object,$n[0].Object,$n[0].Object]},{"v":true,"a":2,"n":"WriteLine","t":8,"sn":"WriteLine","rt":$n[0].Void},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"value","pt":$n[0].Boolean,"ps":0}],"sn":"WriteLine$1","rt":$n[0].Void,"p":[$n[0].Boolean]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"sn":"WriteLine$2","rt":$n[0].Void,"p":[$n[0].Char]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0}],"sn":"WriteLine$3","rt":$n[0].Void,"p":[$n[0].Array.type(System.Char)]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"value","pt":$n[0].Decimal,"ps":0}],"sn":"WriteLine$5","rt":$n[0].Void,"p":[$n[0].Decimal]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"WriteLine$6","rt":$n[0].Void,"p":[$n[0].Double]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"WriteLine$7","rt":$n[0].Void,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"WriteLine$8","rt":$n[0].Void,"p":[$n[0].Int64]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"WriteLine$9","rt":$n[0].Void,"p":[$n[0].Object]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"sn":"WriteLine$10","rt":$n[0].Void,"p":[$n[0].Single]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"WriteLine$11","rt":$n[0].Void,"p":[$n[0].String]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"value","pt":$n[0].UInt32,"ps":0}],"sn":"WriteLine$16","rt":$n[0].Void,"p":[$n[0].UInt32]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"WriteLine$17","rt":$n[0].Void,"p":[$n[0].UInt64]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1}],"sn":"WriteLine$12","rt":$n[0].Void,"p":[$n[0].String,$n[0].Object]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg","ip":true,"pt":$n[0].Array.type(System.Object),"ps":1}],"sn":"WriteLine$15","rt":$n[0].Void,"p":[$n[0].String,$n[0].Array.type(System.Object)]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"WriteLine$4","rt":$n[0].Void,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1},{"n":"arg1","pt":$n[0].Object,"ps":2}],"sn":"WriteLine$13","rt":$n[0].Void,"p":[$n[0].String,$n[0].Object,$n[0].Object]},{"v":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"format","pt":$n[0].String,"ps":0},{"n":"arg0","pt":$n[0].Object,"ps":1},{"n":"arg1","pt":$n[0].Object,"ps":2},{"n":"arg2","pt":$n[0].Object,"ps":3}],"sn":"WriteLine$14","rt":$n[0].Void,"p":[$n[0].String,$n[0].Object,$n[0].Object,$n[0].Object]},{"ab":true,"a":2,"n":"Encoding","t":16,"rt":$n[8].Encoding,"g":{"ab":true,"a":2,"n":"get_Encoding","t":8,"rt":$n[8].Encoding,"fg":"Encoding"},"fn":"Encoding"},{"v":true,"a":2,"n":"FormatProvider","t":16,"rt":$n[0].IFormatProvider,"g":{"v":true,"a":2,"n":"get_FormatProvider","t":8,"rt":$n[0].IFormatProvider,"fg":"FormatProvider"},"fn":"FormatProvider"},{"v":true,"a":2,"n":"NewLine","t":16,"rt":$n[0].String,"g":{"v":true,"a":2,"n":"get_NewLine","t":8,"rt":$n[0].String,"fg":"NewLine"},"s":{"v":true,"a":2,"n":"set_NewLine","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"NewLine"},"fn":"NewLine"},{"a":3,"n":"CoreNewLine","t":4,"rt":$n[0].Array.type(System.Char),"sn":"CoreNewLine"},{"a":1,"n":"InitialNewLine","is":true,"t":4,"rt":$n[0].String,"sn":"InitialNewLine"},{"a":1,"n":"InternalFormatProvider","t":4,"rt":$n[0].IFormatProvider,"sn":"InternalFormatProvider"},{"a":2,"n":"Null","is":true,"t":4,"rt":$n[14].TextWriter,"sn":"Null","ro":true},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[8].Encoding,"sn":"Encoding"}]}; }, $n); - $m("System.IO.TextWriter.NullTextWriter", function () { return {"td":$n[14].TextWriter,"att":1057027,"a":1,"at":[new System.SerializableAttribute()],"m":[{"a":4,"n":".ctor","t":1,"sn":"ctor"},{"ov":true,"a":2,"n":"Write","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"Write$10","rt":$n[0].Void,"p":[$n[0].String]},{"ov":true,"a":2,"n":"Write","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Char),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Write$3","rt":$n[0].Void,"p":[$n[0].Array.type(System.Char),$n[0].Int32,$n[0].Int32]},{"ov":true,"a":2,"n":"WriteLine","t":8,"sn":"WriteLine","rt":$n[0].Void},{"ov":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"WriteLine$9","rt":$n[0].Void,"p":[$n[0].Object]},{"ov":true,"a":2,"n":"WriteLine","t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"WriteLine$11","rt":$n[0].Void,"p":[$n[0].String]},{"ov":true,"a":2,"n":"Encoding","t":16,"rt":$n[8].Encoding,"g":{"ov":true,"a":2,"n":"get_Encoding","t":8,"rt":$n[8].Encoding,"fg":"Encoding"},"fn":"Encoding"}]}; }, $n); - $m("System.IO.__Error", function () { return {"att":1048960,"a":4,"s":true,"m":[{"a":4,"n":"EndOfFile","is":true,"t":8,"sn":"EndOfFile","rt":$n[0].Void},{"a":4,"n":"EndReadCalledTwice","is":true,"t":8,"sn":"EndReadCalledTwice","rt":$n[0].Void},{"a":4,"n":"EndWriteCalledTwice","is":true,"t":8,"sn":"EndWriteCalledTwice","rt":$n[0].Void},{"a":4,"n":"FileNotOpen","is":true,"t":8,"sn":"FileNotOpen","rt":$n[0].Void},{"a":4,"n":"MemoryStreamNotExpandable","is":true,"t":8,"sn":"MemoryStreamNotExpandable","rt":$n[0].Void},{"a":4,"n":"ReadNotSupported","is":true,"t":8,"sn":"ReadNotSupported","rt":$n[0].Void},{"a":4,"n":"ReaderClosed","is":true,"t":8,"sn":"ReaderClosed","rt":$n[0].Void},{"a":4,"n":"SeekNotSupported","is":true,"t":8,"sn":"SeekNotSupported","rt":$n[0].Void},{"a":4,"n":"StreamIsClosed","is":true,"t":8,"sn":"StreamIsClosed","rt":$n[0].Void},{"a":4,"n":"WriteNotSupported","is":true,"t":8,"sn":"WriteNotSupported","rt":$n[0].Void},{"a":4,"n":"WriterClosed","is":true,"t":8,"sn":"WriterClosed","rt":$n[0].Void},{"a":4,"n":"WrongAsyncResult","is":true,"t":8,"sn":"WrongAsyncResult","rt":$n[0].Void}]}; }, $n); - $m("System.IO.FileStream", function () { return {"att":1048577,"a":2,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Byte),$n[0].String],"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"name","pt":$n[0].String,"ps":1}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[14].FileMode],"pi":[{"n":"path","pt":$n[0].String,"ps":0},{"n":"mode","pt":$n[14].FileMode,"ps":1}],"sn":"$ctor1"},{"a":4,"n":"EnsureBufferAsync","t":8,"sn":"EnsureBufferAsync","rt":$n[10].Task},{"ov":true,"a":2,"n":"Flush","t":8,"sn":"Flush","rt":$n[0].Void},{"a":4,"n":"FromFile","is":true,"t":8,"pi":[{"n":"file","pt":$n[0].Object,"ps":0}],"sn":"FromFile","rt":$n[10].Task$1(System.IO.FileStream),"p":[$n[0].Object]},{"a":1,"n":"GetInternalBuffer","t":8,"sn":"GetInternalBuffer","rt":$n[0].Array.type(System.Byte)},{"ov":true,"a":2,"n":"Read","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Read","rt":$n[0].Int32,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"ReadBytes","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0}],"sn":"ReadBytes","rt":$n[0].Array.type(System.Byte),"p":[$n[0].String]},{"a":4,"n":"ReadBytesAsync","is":true,"t":8,"pi":[{"n":"path","pt":$n[0].String,"ps":0}],"sn":"ReadBytesAsync","rt":$n[10].Task$1(System.Array.type(System.Byte)),"p":[$n[0].String]},{"ov":true,"a":2,"n":"Seek","t":8,"pi":[{"n":"offset","pt":$n[0].Int64,"ps":0},{"n":"origin","pt":$n[14].SeekOrigin,"ps":1}],"sn":"Seek","rt":$n[0].Int64,"p":[$n[0].Int64,$n[14].SeekOrigin]},{"ov":true,"a":2,"n":"SetLength","t":8,"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"SetLength","rt":$n[0].Void,"p":[$n[0].Int64]},{"ov":true,"a":2,"n":"Write","t":8,"pi":[{"n":"buffer","pt":$n[0].Array.type(System.Byte),"ps":0},{"n":"offset","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"Write","rt":$n[0].Void,"p":[$n[0].Array.type(System.Byte),$n[0].Int32,$n[0].Int32]},{"ov":true,"a":2,"n":"CanRead","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_CanRead","t":8,"rt":$n[0].Boolean,"fg":"CanRead","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanRead"},{"ov":true,"a":2,"n":"CanSeek","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_CanSeek","t":8,"rt":$n[0].Boolean,"fg":"CanSeek","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanSeek"},{"ov":true,"a":2,"n":"CanWrite","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_CanWrite","t":8,"rt":$n[0].Boolean,"fg":"CanWrite","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"CanWrite"},{"v":true,"a":2,"n":"IsAsync","t":16,"rt":$n[0].Boolean,"g":{"v":true,"a":2,"n":"get_IsAsync","t":8,"rt":$n[0].Boolean,"fg":"IsAsync","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsAsync"},{"ov":true,"a":2,"n":"Length","t":16,"rt":$n[0].Int64,"g":{"ov":true,"a":2,"n":"get_Length","t":8,"rt":$n[0].Int64,"fg":"Length"},"fn":"Length"},{"a":2,"n":"Name","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Name","t":8,"rt":$n[0].String,"fg":"Name"},"fn":"Name"},{"ov":true,"a":2,"n":"Position","t":16,"rt":$n[0].Int64,"g":{"ov":true,"a":2,"n":"get_Position","t":8,"rt":$n[0].Int64,"fg":"Position"},"s":{"ov":true,"a":2,"n":"set_Position","t":8,"p":[$n[0].Int64],"rt":$n[0].Void,"fs":"Position"},"fn":"Position"},{"a":1,"n":"_buffer","t":4,"rt":$n[0].Array.type(System.Byte),"sn":"_buffer"},{"a":1,"n":"name","t":4,"rt":$n[0].String,"sn":"name"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int64,"sn":"Position"}]}; }, $n); - $m("System.Globalization.BidiCategory", function () { return {"att":256,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"ArabicNumber","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"ArabicNumber","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"BoundaryNeutral","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"BoundaryNeutral","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"CommonNumberSeparator","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"CommonNumberSeparator","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"EuropeanNumber","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"EuropeanNumber","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"EuropeanNumberSeparator","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"EuropeanNumberSeparator","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"EuropeanNumberTerminator","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"EuropeanNumberTerminator","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"FirstStrongIsolate","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"FirstStrongIsolate","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"LeftToRight","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"LeftToRight","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"LeftToRightEmbedding","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"LeftToRightEmbedding","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"LeftToRightIsolate","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"LeftToRightIsolate","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"LeftToRightOverride","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"LeftToRightOverride","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"NonSpacingMark","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"NonSpacingMark","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"OtherNeutrals","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"OtherNeutrals","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"ParagraphSeparator","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"ParagraphSeparator","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"PopDirectionIsolate","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"PopDirectionIsolate","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"PopDirectionalFormat","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"PopDirectionalFormat","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"RightToLeft","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"RightToLeft","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"RightToLeftArabic","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"RightToLeftArabic","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"RightToLeftEmbedding","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"RightToLeftEmbedding","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"RightToLeftIsolate","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"RightToLeftIsolate","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"RightToLeftOverride","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"RightToLeftOverride","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"SegmentSeparator","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"SegmentSeparator","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}},{"a":2,"n":"Whitespace","is":true,"t":4,"rt":$n[1].BidiCategory,"sn":"Whitespace","box":function ($v) { return H5.box($v, System.Globalization.BidiCategory, System.Enum.toStringFn(System.Globalization.BidiCategory));}}]}; }, $n); - $m("System.Globalization.Calendar", function () { return {"att":1048705,"a":2,"m":[{"a":3,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":"Add","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0},{"n":"value","pt":$n[0].Double,"ps":1},{"n":"scale","pt":$n[0].Int32,"ps":2}],"sn":"Add","rt":$n[0].DateTime,"p":[$n[0].DateTime,$n[0].Double,$n[0].Int32],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"v":true,"a":2,"n":"AddDays","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0},{"n":"days","pt":$n[0].Int32,"ps":1}],"sn":"AddDays","rt":$n[0].DateTime,"p":[$n[0].DateTime,$n[0].Int32],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"v":true,"a":2,"n":"AddHours","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0},{"n":"hours","pt":$n[0].Int32,"ps":1}],"sn":"AddHours","rt":$n[0].DateTime,"p":[$n[0].DateTime,$n[0].Int32],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"v":true,"a":2,"n":"AddMilliseconds","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0},{"n":"milliseconds","pt":$n[0].Double,"ps":1}],"sn":"AddMilliseconds","rt":$n[0].DateTime,"p":[$n[0].DateTime,$n[0].Double],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"v":true,"a":2,"n":"AddMinutes","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0},{"n":"minutes","pt":$n[0].Int32,"ps":1}],"sn":"AddMinutes","rt":$n[0].DateTime,"p":[$n[0].DateTime,$n[0].Int32],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"ab":true,"a":2,"n":"AddMonths","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0},{"n":"months","pt":$n[0].Int32,"ps":1}],"sn":"AddMonths","rt":$n[0].DateTime,"p":[$n[0].DateTime,$n[0].Int32],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"v":true,"a":2,"n":"AddSeconds","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0},{"n":"seconds","pt":$n[0].Int32,"ps":1}],"sn":"AddSeconds","rt":$n[0].DateTime,"p":[$n[0].DateTime,$n[0].Int32],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"v":true,"a":2,"n":"AddWeeks","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0},{"n":"weeks","pt":$n[0].Int32,"ps":1}],"sn":"AddWeeks","rt":$n[0].DateTime,"p":[$n[0].DateTime,$n[0].Int32],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"ab":true,"a":2,"n":"AddYears","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0},{"n":"years","pt":$n[0].Int32,"ps":1}],"sn":"AddYears","rt":$n[0].DateTime,"p":[$n[0].DateTime,$n[0].Int32],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":4,"n":"CheckAddResult","is":true,"t":8,"pi":[{"n":"ticks","pt":$n[0].Int64,"ps":0},{"n":"minValue","pt":$n[0].DateTime,"ps":1},{"n":"maxValue","pt":$n[0].DateTime,"ps":2}],"sn":"CheckAddResult","rt":$n[0].Void,"p":[$n[0].Int64,$n[0].DateTime,$n[0].DateTime]},{"v":true,"a":2,"n":"Clone","t":8,"sn":"clone","rt":$n[0].Object},{"ab":true,"a":2,"n":"GetDayOfMonth","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0}],"sn":"GetDayOfMonth","rt":$n[0].Int32,"p":[$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"GetDayOfWeek","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0}],"sn":"GetDayOfWeek","rt":$n[0].DayOfWeek,"p":[$n[0].DateTime],"box":function ($v) { return H5.box($v, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek));}},{"ab":true,"a":2,"n":"GetDayOfYear","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0}],"sn":"GetDayOfYear","rt":$n[0].Int32,"p":[$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetDaysInMonth","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1}],"sn":"GetDaysInMonth","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"GetDaysInMonth","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"era","pt":$n[0].Int32,"ps":2}],"sn":"GetDaysInMonth$1","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetDaysInYear","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0}],"sn":"GetDaysInYear","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"GetDaysInYear","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"era","pt":$n[0].Int32,"ps":1}],"sn":"GetDaysInYear$1","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"GetEra","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0}],"sn":"GetEra","rt":$n[0].Int32,"p":[$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"GetFirstDayWeekOfYear","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0},{"n":"firstDayOfWeek","pt":$n[0].Int32,"ps":1}],"sn":"GetFirstDayWeekOfYear","rt":$n[0].Int32,"p":[$n[0].DateTime,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetHour","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0}],"sn":"GetHour","rt":$n[0].Int32,"p":[$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetLeapMonth","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0}],"sn":"GetLeapMonth","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetLeapMonth","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"era","pt":$n[0].Int32,"ps":1}],"sn":"GetLeapMonth$1","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetMilliseconds","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0}],"sn":"GetMilliseconds","rt":$n[0].Double,"p":[$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Double, System.Double.format, System.Double.getHashCode);}},{"v":true,"a":2,"n":"GetMinute","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0}],"sn":"GetMinute","rt":$n[0].Int32,"p":[$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"GetMonth","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0}],"sn":"GetMonth","rt":$n[0].Int32,"p":[$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetMonthsInYear","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0}],"sn":"GetMonthsInYear","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"GetMonthsInYear","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"era","pt":$n[0].Int32,"ps":1}],"sn":"GetMonthsInYear$1","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetSecond","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0}],"sn":"GetSecond","rt":$n[0].Int32,"p":[$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"GetSystemTwoDigitYearSetting","is":true,"t":8,"pi":[{"n":"CalID","pt":$n[1].CalendarId,"ps":0},{"n":"defaultYearValue","pt":$n[0].Int32,"ps":1}],"sn":"GetSystemTwoDigitYearSetting","rt":$n[0].Int32,"p":[$n[1].CalendarId,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"GetWeekOfYear","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0},{"n":"rule","pt":$n[1].CalendarWeekRule,"ps":1},{"n":"firstDayOfWeek","pt":$n[0].DayOfWeek,"ps":2}],"sn":"GetWeekOfYear","rt":$n[0].Int32,"p":[$n[0].DateTime,$n[1].CalendarWeekRule,$n[0].DayOfWeek],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"GetWeekOfYearFullDays","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0},{"n":"firstDayOfWeek","pt":$n[0].Int32,"ps":1},{"n":"fullDays","pt":$n[0].Int32,"ps":2}],"sn":"GetWeekOfYearFullDays","rt":$n[0].Int32,"p":[$n[0].DateTime,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"GetWeekOfYearOfMinSupportedDateTime","t":8,"pi":[{"n":"firstDayOfWeek","pt":$n[0].Int32,"ps":0},{"n":"minimumDaysInFirstWeek","pt":$n[0].Int32,"ps":1}],"sn":"GetWeekOfYearOfMinSupportedDateTime","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"GetYear","t":8,"pi":[{"n":"time","pt":$n[0].DateTime,"ps":0}],"sn":"GetYear","rt":$n[0].Int32,"p":[$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"IsLeapDay","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2}],"sn":"IsLeapDay","rt":$n[0].Boolean,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"IsLeapDay","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2},{"n":"era","pt":$n[0].Int32,"ps":3}],"sn":"IsLeapDay$1","rt":$n[0].Boolean,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"IsLeapMonth","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1}],"sn":"IsLeapMonth","rt":$n[0].Boolean,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"IsLeapMonth","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"era","pt":$n[0].Int32,"ps":2}],"sn":"IsLeapMonth$1","rt":$n[0].Boolean,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"IsLeapYear","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0}],"sn":"IsLeapYear","rt":$n[0].Boolean,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"IsLeapYear","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"era","pt":$n[0].Int32,"ps":1}],"sn":"IsLeapYear$1","rt":$n[0].Boolean,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":4,"n":"IsValidDay","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2},{"n":"era","pt":$n[0].Int32,"ps":3}],"sn":"IsValidDay","rt":$n[0].Boolean,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":4,"n":"IsValidMonth","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"era","pt":$n[0].Int32,"ps":2}],"sn":"IsValidMonth","rt":$n[0].Boolean,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":4,"n":"IsValidYear","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"era","pt":$n[0].Int32,"ps":1}],"sn":"IsValidYear","rt":$n[0].Boolean,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"ReadOnly","is":true,"t":8,"pi":[{"n":"calendar","pt":$n[1].Calendar,"ps":0}],"sn":"ReadOnly","rt":$n[1].Calendar,"p":[$n[1].Calendar]},{"a":4,"n":"SetReadOnlyState","t":8,"pi":[{"n":"readOnly","pt":$n[0].Boolean,"ps":0}],"sn":"SetReadOnlyState","rt":$n[0].Void,"p":[$n[0].Boolean]},{"v":true,"a":2,"n":"ToDateTime","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2},{"n":"hour","pt":$n[0].Int32,"ps":3},{"n":"minute","pt":$n[0].Int32,"ps":4},{"n":"second","pt":$n[0].Int32,"ps":5},{"n":"millisecond","pt":$n[0].Int32,"ps":6}],"sn":"ToDateTime","rt":$n[0].DateTime,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"ab":true,"a":2,"n":"ToDateTime","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2},{"n":"hour","pt":$n[0].Int32,"ps":3},{"n":"minute","pt":$n[0].Int32,"ps":4},{"n":"second","pt":$n[0].Int32,"ps":5},{"n":"millisecond","pt":$n[0].Int32,"ps":6},{"n":"era","pt":$n[0].Int32,"ps":7}],"sn":"ToDateTime$1","rt":$n[0].DateTime,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"v":true,"a":2,"n":"ToFourDigitYear","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0}],"sn":"ToFourDigitYear","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":4,"n":"TryToDateTime","t":8,"pi":[{"n":"year","pt":$n[0].Int32,"ps":0},{"n":"month","pt":$n[0].Int32,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2},{"n":"hour","pt":$n[0].Int32,"ps":3},{"n":"minute","pt":$n[0].Int32,"ps":4},{"n":"second","pt":$n[0].Int32,"ps":5},{"n":"millisecond","pt":$n[0].Int32,"ps":6},{"n":"era","pt":$n[0].Int32,"ps":7},{"n":"result","out":true,"pt":$n[0].DateTime,"ps":8}],"sn":"TryToDateTime","rt":$n[0].Boolean,"p":[$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].Int32,$n[0].DateTime],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":4,"n":"VerifyWritable","t":8,"sn":"VerifyWritable","rt":$n[0].Void},{"v":true,"a":2,"n":"AlgorithmType","t":16,"rt":$n[1].CalendarAlgorithmType,"g":{"v":true,"a":2,"n":"get_AlgorithmType","t":8,"rt":$n[1].CalendarAlgorithmType,"fg":"AlgorithmType","box":function ($v) { return H5.box($v, System.Globalization.CalendarAlgorithmType, System.Enum.toStringFn(System.Globalization.CalendarAlgorithmType));}},"fn":"AlgorithmType"},{"v":true,"a":4,"n":"BaseCalendarID","t":16,"rt":$n[1].CalendarId,"g":{"v":true,"a":4,"n":"get_BaseCalendarID","t":8,"rt":$n[1].CalendarId,"fg":"BaseCalendarID","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},"fn":"BaseCalendarID"},{"v":true,"a":4,"n":"CurrentEraValue","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":4,"n":"get_CurrentEraValue","t":8,"rt":$n[0].Int32,"fg":"CurrentEraValue","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"CurrentEraValue"},{"v":true,"a":3,"n":"DaysInYearBeforeMinSupportedYear","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":3,"n":"get_DaysInYearBeforeMinSupportedYear","t":8,"rt":$n[0].Int32,"fg":"DaysInYearBeforeMinSupportedYear","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"DaysInYearBeforeMinSupportedYear"},{"ab":true,"a":2,"n":"Eras","t":16,"rt":$n[0].Array.type(System.Int32),"g":{"ab":true,"a":2,"n":"get_Eras","t":8,"rt":$n[0].Array.type(System.Int32),"fg":"Eras"},"fn":"Eras"},{"v":true,"a":4,"n":"ID","t":16,"rt":$n[1].CalendarId,"g":{"v":true,"a":4,"n":"get_ID","t":8,"rt":$n[1].CalendarId,"fg":"ID","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},"fn":"ID"},{"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReadOnly","t":8,"rt":$n[0].Boolean,"fg":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReadOnly"},{"v":true,"a":2,"n":"MaxSupportedDateTime","t":16,"rt":$n[0].DateTime,"g":{"v":true,"a":2,"n":"get_MaxSupportedDateTime","t":8,"rt":$n[0].DateTime,"fg":"MaxSupportedDateTime","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},"fn":"MaxSupportedDateTime"},{"v":true,"a":2,"n":"MinSupportedDateTime","t":16,"rt":$n[0].DateTime,"g":{"v":true,"a":2,"n":"get_MinSupportedDateTime","t":8,"rt":$n[0].DateTime,"fg":"MinSupportedDateTime","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},"fn":"MinSupportedDateTime"},{"v":true,"a":2,"n":"TwoDigitYearMax","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_TwoDigitYearMax","t":8,"rt":$n[0].Int32,"fg":"TwoDigitYearMax","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"v":true,"a":2,"n":"set_TwoDigitYearMax","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"TwoDigitYearMax"},"fn":"TwoDigitYearMax"},{"a":2,"n":"CurrentEra","is":true,"t":4,"rt":$n[0].Int32,"sn":"CurrentEra","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"DaysPer100Years","is":true,"t":4,"rt":$n[0].Int32,"sn":"DaysPer100Years","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"DaysPer400Years","is":true,"t":4,"rt":$n[0].Int32,"sn":"DaysPer400Years","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"DaysPer4Years","is":true,"t":4,"rt":$n[0].Int32,"sn":"DaysPer4Years","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"DaysPerYear","is":true,"t":4,"rt":$n[0].Int32,"sn":"DaysPerYear","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"DaysTo10000","is":true,"t":4,"rt":$n[0].Int32,"sn":"DaysTo10000","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"MaxMillis","is":true,"t":4,"rt":$n[0].Int64,"sn":"MaxMillis"},{"a":4,"n":"MillisPerDay","is":true,"t":4,"rt":$n[0].Int32,"sn":"MillisPerDay","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"MillisPerHour","is":true,"t":4,"rt":$n[0].Int32,"sn":"MillisPerHour","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"MillisPerMinute","is":true,"t":4,"rt":$n[0].Int32,"sn":"MillisPerMinute","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"MillisPerSecond","is":true,"t":4,"rt":$n[0].Int32,"sn":"MillisPerSecond","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"TicksPerDay","is":true,"t":4,"rt":$n[0].Int64,"sn":"TicksPerDay"},{"a":4,"n":"TicksPerHour","is":true,"t":4,"rt":$n[0].Int64,"sn":"TicksPerHour"},{"a":4,"n":"TicksPerMillisecond","is":true,"t":4,"rt":$n[0].Int64,"sn":"TicksPerMillisecond"},{"a":4,"n":"TicksPerMinute","is":true,"t":4,"rt":$n[0].Int64,"sn":"TicksPerMinute"},{"a":4,"n":"TicksPerSecond","is":true,"t":4,"rt":$n[0].Int64,"sn":"TicksPerSecond"},{"a":1,"n":"_isReadOnly","t":4,"rt":$n[0].Boolean,"sn":"_isReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":4,"n":"twoDigitYearMax","t":4,"rt":$n[0].Int32,"sn":"twoDigitYearMax","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Array.type(System.Int32),"sn":"Eras"}]}; }, $n); - $m("System.Globalization.CalendarAlgorithmType", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"LunarCalendar","is":true,"t":4,"rt":$n[1].CalendarAlgorithmType,"sn":"LunarCalendar","box":function ($v) { return H5.box($v, System.Globalization.CalendarAlgorithmType, System.Enum.toStringFn(System.Globalization.CalendarAlgorithmType));}},{"a":2,"n":"LunisolarCalendar","is":true,"t":4,"rt":$n[1].CalendarAlgorithmType,"sn":"LunisolarCalendar","box":function ($v) { return H5.box($v, System.Globalization.CalendarAlgorithmType, System.Enum.toStringFn(System.Globalization.CalendarAlgorithmType));}},{"a":2,"n":"SolarCalendar","is":true,"t":4,"rt":$n[1].CalendarAlgorithmType,"sn":"SolarCalendar","box":function ($v) { return H5.box($v, System.Globalization.CalendarAlgorithmType, System.Enum.toStringFn(System.Globalization.CalendarAlgorithmType));}},{"a":2,"n":"Unknown","is":true,"t":4,"rt":$n[1].CalendarAlgorithmType,"sn":"Unknown","box":function ($v) { return H5.box($v, System.Globalization.CalendarAlgorithmType, System.Enum.toStringFn(System.Globalization.CalendarAlgorithmType));}}]}; }, $n); - $m("System.Globalization.CalendarWeekRule", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"FirstDay","is":true,"t":4,"rt":$n[1].CalendarWeekRule,"sn":"FirstDay","box":function ($v) { return H5.box($v, System.Globalization.CalendarWeekRule, System.Enum.toStringFn(System.Globalization.CalendarWeekRule));}},{"a":2,"n":"FirstFourDayWeek","is":true,"t":4,"rt":$n[1].CalendarWeekRule,"sn":"FirstFourDayWeek","box":function ($v) { return H5.box($v, System.Globalization.CalendarWeekRule, System.Enum.toStringFn(System.Globalization.CalendarWeekRule));}},{"a":2,"n":"FirstFullWeek","is":true,"t":4,"rt":$n[1].CalendarWeekRule,"sn":"FirstFullWeek","box":function ($v) { return H5.box($v, System.Globalization.CalendarWeekRule, System.Enum.toStringFn(System.Globalization.CalendarWeekRule));}}]}; }, $n); - $m("System.Globalization.CultureNotFoundException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].String],"pi":[{"n":"paramName","pt":$n[0].String,"ps":0},{"n":"message","pt":$n[0].String,"ps":1}],"sn":"$ctor5"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Int32,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"invalidCultureId","pt":$n[0].Int32,"ps":1},{"n":"innerException","pt":$n[0].Exception,"ps":2}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Int32,$n[0].String],"pi":[{"n":"paramName","pt":$n[0].String,"ps":0},{"n":"invalidCultureId","pt":$n[0].Int32,"ps":1},{"n":"message","pt":$n[0].String,"ps":2}],"sn":"$ctor4"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"invalidCultureName","pt":$n[0].String,"ps":1},{"n":"innerException","pt":$n[0].Exception,"ps":2}],"sn":"$ctor6"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].String,$n[0].String],"pi":[{"n":"paramName","pt":$n[0].String,"ps":0},{"n":"invalidCultureName","pt":$n[0].String,"ps":1},{"n":"message","pt":$n[0].String,"ps":2}],"sn":"$ctor7"},{"a":1,"n":"DefaultMessage","is":true,"t":16,"rt":$n[0].String,"g":{"a":1,"n":"get_DefaultMessage","t":8,"rt":$n[0].String,"fg":"DefaultMessage","is":true},"fn":"DefaultMessage"},{"a":1,"n":"FormatedInvalidCultureId","t":16,"rt":$n[0].String,"g":{"a":1,"n":"get_FormatedInvalidCultureId","t":8,"rt":$n[0].String,"fg":"FormatedInvalidCultureId"},"fn":"FormatedInvalidCultureId"},{"v":true,"a":2,"n":"InvalidCultureId","t":16,"rt":$n[0].Nullable$1(System.Int32),"g":{"v":true,"a":2,"n":"get_InvalidCultureId","t":8,"rt":$n[0].Nullable$1(System.Int32),"fg":"InvalidCultureId","box":function ($v) { return H5.box($v, System.Int32, System.Nullable.toString, System.Nullable.getHashCode);}},"fn":"InvalidCultureId"},{"v":true,"a":2,"n":"InvalidCultureName","t":16,"rt":$n[0].String,"g":{"v":true,"a":2,"n":"get_InvalidCultureName","t":8,"rt":$n[0].String,"fg":"InvalidCultureName"},"fn":"InvalidCultureName"},{"ov":true,"a":2,"n":"Message","t":16,"rt":$n[0].String,"g":{"ov":true,"a":2,"n":"get_Message","t":8,"rt":$n[0].String,"fg":"Message"},"fn":"Message"},{"a":1,"n":"_invalidCultureId","t":4,"rt":$n[0].Nullable$1(System.Int32),"sn":"_invalidCultureId","box":function ($v) { return H5.box($v, System.Int32, System.Nullable.toString, System.Nullable.getHashCode);}},{"a":1,"n":"_invalidCultureName","t":4,"rt":$n[0].String,"sn":"_invalidCultureName"}]}; }, $n); - $m("System.Globalization.FORMATFLAGS", function () { return {"att":256,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"None","is":true,"t":4,"rt":$n[1].FORMATFLAGS,"sn":"None","box":function ($v) { return H5.box($v, System.Globalization.FORMATFLAGS, System.Enum.toStringFn(System.Globalization.FORMATFLAGS));}},{"a":2,"n":"UseDigitPrefixInTokens","is":true,"t":4,"rt":$n[1].FORMATFLAGS,"sn":"UseDigitPrefixInTokens","box":function ($v) { return H5.box($v, System.Globalization.FORMATFLAGS, System.Enum.toStringFn(System.Globalization.FORMATFLAGS));}},{"a":2,"n":"UseGenitiveMonth","is":true,"t":4,"rt":$n[1].FORMATFLAGS,"sn":"UseGenitiveMonth","box":function ($v) { return H5.box($v, System.Globalization.FORMATFLAGS, System.Enum.toStringFn(System.Globalization.FORMATFLAGS));}},{"a":2,"n":"UseHebrewParsing","is":true,"t":4,"rt":$n[1].FORMATFLAGS,"sn":"UseHebrewParsing","box":function ($v) { return H5.box($v, System.Globalization.FORMATFLAGS, System.Enum.toStringFn(System.Globalization.FORMATFLAGS));}},{"a":2,"n":"UseLeapYearMonth","is":true,"t":4,"rt":$n[1].FORMATFLAGS,"sn":"UseLeapYearMonth","box":function ($v) { return H5.box($v, System.Globalization.FORMATFLAGS, System.Enum.toStringFn(System.Globalization.FORMATFLAGS));}},{"a":2,"n":"UseSpacesInDayNames","is":true,"t":4,"rt":$n[1].FORMATFLAGS,"sn":"UseSpacesInDayNames","box":function ($v) { return H5.box($v, System.Globalization.FORMATFLAGS, System.Enum.toStringFn(System.Globalization.FORMATFLAGS));}},{"a":2,"n":"UseSpacesInMonthNames","is":true,"t":4,"rt":$n[1].FORMATFLAGS,"sn":"UseSpacesInMonthNames","box":function ($v) { return H5.box($v, System.Globalization.FORMATFLAGS, System.Enum.toStringFn(System.Globalization.FORMATFLAGS));}}]}; }, $n); - $m("System.Globalization.CalendarId", function () { return {"att":256,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"CHINESELUNISOLAR","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"CHINESELUNISOLAR","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"GREGORIAN","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"GREGORIAN","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"GREGORIAN_ARABIC","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"GREGORIAN_ARABIC","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"GREGORIAN_ME_FRENCH","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"GREGORIAN_ME_FRENCH","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"GREGORIAN_US","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"GREGORIAN_US","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"GREGORIAN_XLIT_ENGLISH","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"GREGORIAN_XLIT_ENGLISH","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"GREGORIAN_XLIT_FRENCH","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"GREGORIAN_XLIT_FRENCH","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"HEBREW","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"HEBREW","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"HIJRI","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"HIJRI","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"JAPAN","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"JAPAN","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"JAPANESELUNISOLAR","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"JAPANESELUNISOLAR","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"JULIAN","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"JULIAN","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"KOREA","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"KOREA","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"KOREANLUNISOLAR","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"KOREANLUNISOLAR","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"LAST_CALENDAR","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"LAST_CALENDAR","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"LUNAR_ETO_CHN","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"LUNAR_ETO_CHN","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"LUNAR_ETO_KOR","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"LUNAR_ETO_KOR","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"LUNAR_ETO_ROKUYOU","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"LUNAR_ETO_ROKUYOU","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"PERSIAN","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"PERSIAN","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"SAKA","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"SAKA","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"TAIWAN","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"TAIWAN","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"TAIWANLUNISOLAR","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"TAIWANLUNISOLAR","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"THAI","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"THAI","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"UMALQURA","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"UMALQURA","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}},{"a":2,"n":"UNINITIALIZED_VALUE","is":true,"t":4,"rt":$n[1].CalendarId,"sn":"UNINITIALIZED_VALUE","box":function ($v) { return H5.box($v, System.Globalization.CalendarId, System.Enum.toStringFn(System.Globalization.CalendarId));}}]}; }, $n); - $m("System.Globalization.DateTimeFormatInfoScanner", function () { return {"nested":[$n[1].DateTimeFormatInfoScanner.FoundDatePattern],"att":1048576,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":"AddDateWordOrPostfix","t":8,"pi":[{"n":"formatPostfix","pt":$n[0].String,"ps":0},{"n":"str","pt":$n[0].String,"ps":1}],"sn":"AddDateWordOrPostfix","rt":$n[0].Void,"p":[$n[0].String,$n[0].String]},{"a":4,"n":"AddDateWords","t":8,"pi":[{"n":"pattern","pt":$n[0].String,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"formatPostfix","pt":$n[0].String,"ps":2}],"sn":"AddDateWords","rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32,$n[0].String],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"AddIgnorableSymbols","t":8,"pi":[{"n":"text","pt":$n[0].String,"ps":0}],"sn":"AddIgnorableSymbols","rt":$n[0].Void,"p":[$n[0].String]},{"a":1,"n":"ArrayElementsBeginWithDigit","is":true,"t":8,"pi":[{"n":"array","pt":$n[0].Array.type(System.String),"ps":0}],"sn":"ArrayElementsBeginWithDigit","rt":$n[0].Boolean,"p":[$n[0].Array.type(System.String)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"ArrayElementsHaveSpace","is":true,"t":8,"pi":[{"n":"array","pt":$n[0].Array.type(System.String),"ps":0}],"sn":"ArrayElementsHaveSpace","rt":$n[0].Boolean,"p":[$n[0].Array.type(System.String)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"EqualStringArrays","is":true,"t":8,"pi":[{"n":"array1","pt":$n[0].Array.type(System.String),"ps":0},{"n":"array2","pt":$n[0].Array.type(System.String),"ps":1}],"sn":"EqualStringArrays","rt":$n[0].Boolean,"p":[$n[0].Array.type(System.String),$n[0].Array.type(System.String)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":4,"n":"GetDateWordsOfDTFI","t":8,"pi":[{"n":"dtfi","pt":$n[1].DateTimeFormatInfo,"ps":0}],"sn":"GetDateWordsOfDTFI","rt":$n[0].Array.type(System.String),"p":[$n[1].DateTimeFormatInfo]},{"a":4,"n":"GetFormatFlagGenitiveMonth","is":true,"t":8,"pi":[{"n":"monthNames","pt":$n[0].Array.type(System.String),"ps":0},{"n":"genitveMonthNames","pt":$n[0].Array.type(System.String),"ps":1},{"n":"abbrevMonthNames","pt":$n[0].Array.type(System.String),"ps":2},{"n":"genetiveAbbrevMonthNames","pt":$n[0].Array.type(System.String),"ps":3}],"sn":"GetFormatFlagGenitiveMonth","rt":$n[1].FORMATFLAGS,"p":[$n[0].Array.type(System.String),$n[0].Array.type(System.String),$n[0].Array.type(System.String),$n[0].Array.type(System.String)],"box":function ($v) { return H5.box($v, System.Globalization.FORMATFLAGS, System.Enum.toStringFn(System.Globalization.FORMATFLAGS));}},{"a":4,"n":"GetFormatFlagUseHebrewCalendar","is":true,"t":8,"pi":[{"n":"calID","pt":$n[0].Int32,"ps":0}],"sn":"GetFormatFlagUseHebrewCalendar","rt":$n[1].FORMATFLAGS,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Globalization.FORMATFLAGS, System.Enum.toStringFn(System.Globalization.FORMATFLAGS));}},{"a":4,"n":"GetFormatFlagUseSpaceInDayNames","is":true,"t":8,"pi":[{"n":"dayNames","pt":$n[0].Array.type(System.String),"ps":0},{"n":"abbrevDayNames","pt":$n[0].Array.type(System.String),"ps":1}],"sn":"GetFormatFlagUseSpaceInDayNames","rt":$n[1].FORMATFLAGS,"p":[$n[0].Array.type(System.String),$n[0].Array.type(System.String)],"box":function ($v) { return H5.box($v, System.Globalization.FORMATFLAGS, System.Enum.toStringFn(System.Globalization.FORMATFLAGS));}},{"a":4,"n":"GetFormatFlagUseSpaceInMonthNames","is":true,"t":8,"pi":[{"n":"monthNames","pt":$n[0].Array.type(System.String),"ps":0},{"n":"genitveMonthNames","pt":$n[0].Array.type(System.String),"ps":1},{"n":"abbrevMonthNames","pt":$n[0].Array.type(System.String),"ps":2},{"n":"genetiveAbbrevMonthNames","pt":$n[0].Array.type(System.String),"ps":3}],"sn":"GetFormatFlagUseSpaceInMonthNames","rt":$n[1].FORMATFLAGS,"p":[$n[0].Array.type(System.String),$n[0].Array.type(System.String),$n[0].Array.type(System.String),$n[0].Array.type(System.String)],"box":function ($v) { return H5.box($v, System.Globalization.FORMATFLAGS, System.Enum.toStringFn(System.Globalization.FORMATFLAGS));}},{"a":4,"n":"ScanDateWord","t":8,"pi":[{"n":"pattern","pt":$n[0].String,"ps":0}],"sn":"ScanDateWord","rt":$n[0].Void,"p":[$n[0].String]},{"a":4,"n":"ScanRepeatChar","is":true,"t":8,"pi":[{"n":"pattern","pt":$n[0].String,"ps":0},{"n":"ch","pt":$n[0].Char,"ps":1},{"n":"index","pt":$n[0].Int32,"ps":2},{"n":"count","out":true,"pt":$n[0].Int32,"ps":3}],"sn":"ScanRepeatChar","rt":$n[0].Int32,"p":[$n[0].String,$n[0].Char,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"SkipWhiteSpacesAndNonLetter","is":true,"t":8,"pi":[{"n":"pattern","pt":$n[0].String,"ps":0},{"n":"currentIndex","pt":$n[0].Int32,"ps":1}],"sn":"SkipWhiteSpacesAndNonLetter","rt":$n[0].Int32,"p":[$n[0].String,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"KnownWords","is":true,"t":16,"rt":$n[3].Dictionary$2(System.String,System.String),"g":{"a":1,"n":"get_KnownWords","t":8,"rt":$n[3].Dictionary$2(System.String,System.String),"fg":"KnownWords","is":true},"fn":"KnownWords"},{"a":4,"n":"CJKDaySuff","is":true,"t":4,"rt":$n[0].String,"sn":"CJKDaySuff"},{"a":4,"n":"CJKHourSuff","is":true,"t":4,"rt":$n[0].String,"sn":"CJKHourSuff"},{"a":4,"n":"CJKMinuteSuff","is":true,"t":4,"rt":$n[0].String,"sn":"CJKMinuteSuff"},{"a":4,"n":"CJKMonthSuff","is":true,"t":4,"rt":$n[0].String,"sn":"CJKMonthSuff"},{"a":4,"n":"CJKSecondSuff","is":true,"t":4,"rt":$n[0].String,"sn":"CJKSecondSuff"},{"a":4,"n":"CJKYearSuff","is":true,"t":4,"rt":$n[0].String,"sn":"CJKYearSuff"},{"a":4,"n":"ChineseHourSuff","is":true,"t":4,"rt":$n[0].String,"sn":"ChineseHourSuff"},{"a":4,"n":"IgnorableSymbolChar","is":true,"t":4,"rt":$n[0].Char,"sn":"IgnorableSymbolChar","box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":4,"n":"KoreanDaySuff","is":true,"t":4,"rt":$n[0].String,"sn":"KoreanDaySuff"},{"a":4,"n":"KoreanHourSuff","is":true,"t":4,"rt":$n[0].String,"sn":"KoreanHourSuff"},{"a":4,"n":"KoreanMinuteSuff","is":true,"t":4,"rt":$n[0].String,"sn":"KoreanMinuteSuff"},{"a":4,"n":"KoreanMonthSuff","is":true,"t":4,"rt":$n[0].String,"sn":"KoreanMonthSuff"},{"a":4,"n":"KoreanSecondSuff","is":true,"t":4,"rt":$n[0].String,"sn":"KoreanSecondSuff"},{"a":4,"n":"KoreanYearSuff","is":true,"t":4,"rt":$n[0].String,"sn":"KoreanYearSuff"},{"a":4,"n":"MonthPostfixChar","is":true,"t":4,"rt":$n[0].Char,"sn":"MonthPostfixChar","box":function ($v) { return H5.box($v, System.Char, String.fromCharCode, System.Char.getHashCode);}},{"a":1,"n":"_ymdFlags","t":4,"rt":$n[1].DateTimeFormatInfoScanner.FoundDatePattern,"sn":"_ymdFlags","box":function ($v) { return H5.box($v, System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern, System.Enum.toStringFn(System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern));}},{"a":4,"n":"m_dateWords","t":4,"rt":$n[3].List$1(System.String),"sn":"m_dateWords"},{"a":1,"n":"s_knownWords","is":true,"t":4,"rt":$n[3].Dictionary$2(System.String,System.String),"sn":"s_knownWords"}]}; }, $n); - $m("System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern", function () { return {"td":$n[1].DateTimeFormatInfoScanner,"att":259,"a":1,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"FoundDayPatternFlag","is":true,"t":4,"rt":$n[1].DateTimeFormatInfoScanner.FoundDatePattern,"sn":"FoundDayPatternFlag","box":function ($v) { return H5.box($v, System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern, System.Enum.toStringFn(System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern));}},{"a":2,"n":"FoundMonthPatternFlag","is":true,"t":4,"rt":$n[1].DateTimeFormatInfoScanner.FoundDatePattern,"sn":"FoundMonthPatternFlag","box":function ($v) { return H5.box($v, System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern, System.Enum.toStringFn(System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern));}},{"a":2,"n":"FoundYMDPatternFlag","is":true,"t":4,"rt":$n[1].DateTimeFormatInfoScanner.FoundDatePattern,"sn":"FoundYMDPatternFlag","box":function ($v) { return H5.box($v, System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern, System.Enum.toStringFn(System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern));}},{"a":2,"n":"FoundYearPatternFlag","is":true,"t":4,"rt":$n[1].DateTimeFormatInfoScanner.FoundDatePattern,"sn":"FoundYearPatternFlag","box":function ($v) { return H5.box($v, System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern, System.Enum.toStringFn(System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern));}},{"a":2,"n":"None","is":true,"t":4,"rt":$n[1].DateTimeFormatInfoScanner.FoundDatePattern,"sn":"None","box":function ($v) { return H5.box($v, System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern, System.Enum.toStringFn(System.Globalization.DateTimeFormatInfoScanner.FoundDatePattern));}}]}; }, $n); - $m("System.Globalization.DateTimeStyles", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"AdjustToUniversal","is":true,"t":4,"rt":$n[1].DateTimeStyles,"sn":"AdjustToUniversal","box":function ($v) { return H5.box($v, System.Globalization.DateTimeStyles, System.Enum.toStringFn(System.Globalization.DateTimeStyles));}},{"a":2,"n":"AllowInnerWhite","is":true,"t":4,"rt":$n[1].DateTimeStyles,"sn":"AllowInnerWhite","box":function ($v) { return H5.box($v, System.Globalization.DateTimeStyles, System.Enum.toStringFn(System.Globalization.DateTimeStyles));}},{"a":2,"n":"AllowLeadingWhite","is":true,"t":4,"rt":$n[1].DateTimeStyles,"sn":"AllowLeadingWhite","box":function ($v) { return H5.box($v, System.Globalization.DateTimeStyles, System.Enum.toStringFn(System.Globalization.DateTimeStyles));}},{"a":2,"n":"AllowTrailingWhite","is":true,"t":4,"rt":$n[1].DateTimeStyles,"sn":"AllowTrailingWhite","box":function ($v) { return H5.box($v, System.Globalization.DateTimeStyles, System.Enum.toStringFn(System.Globalization.DateTimeStyles));}},{"a":2,"n":"AllowWhiteSpaces","is":true,"t":4,"rt":$n[1].DateTimeStyles,"sn":"AllowWhiteSpaces","box":function ($v) { return H5.box($v, System.Globalization.DateTimeStyles, System.Enum.toStringFn(System.Globalization.DateTimeStyles));}},{"a":2,"n":"AssumeLocal","is":true,"t":4,"rt":$n[1].DateTimeStyles,"sn":"AssumeLocal","box":function ($v) { return H5.box($v, System.Globalization.DateTimeStyles, System.Enum.toStringFn(System.Globalization.DateTimeStyles));}},{"a":2,"n":"AssumeUniversal","is":true,"t":4,"rt":$n[1].DateTimeStyles,"sn":"AssumeUniversal","box":function ($v) { return H5.box($v, System.Globalization.DateTimeStyles, System.Enum.toStringFn(System.Globalization.DateTimeStyles));}},{"a":2,"n":"NoCurrentDateDefault","is":true,"t":4,"rt":$n[1].DateTimeStyles,"sn":"NoCurrentDateDefault","box":function ($v) { return H5.box($v, System.Globalization.DateTimeStyles, System.Enum.toStringFn(System.Globalization.DateTimeStyles));}},{"a":2,"n":"None","is":true,"t":4,"rt":$n[1].DateTimeStyles,"sn":"None","box":function ($v) { return H5.box($v, System.Globalization.DateTimeStyles, System.Enum.toStringFn(System.Globalization.DateTimeStyles));}},{"a":2,"n":"RoundtripKind","is":true,"t":4,"rt":$n[1].DateTimeStyles,"sn":"RoundtripKind","box":function ($v) { return H5.box($v, System.Globalization.DateTimeStyles, System.Enum.toStringFn(System.Globalization.DateTimeStyles));}}]}; }, $n); - $m("System.Globalization.DaylightTime", function () { return {"att":1048577,"a":2,"m":[{"a":1,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].DateTime,$n[0].DateTime,$n[0].TimeSpan],"pi":[{"n":"start","pt":$n[0].DateTime,"ps":0},{"n":"end","pt":$n[0].DateTime,"ps":1},{"n":"delta","pt":$n[0].TimeSpan,"ps":2}],"sn":"$ctor1"},{"a":2,"n":"Delta","t":16,"rt":$n[0].TimeSpan,"g":{"a":2,"n":"get_Delta","t":8,"rt":$n[0].TimeSpan,"fg":"Delta"},"fn":"Delta"},{"a":2,"n":"End","t":16,"rt":$n[0].DateTime,"g":{"a":2,"n":"get_End","t":8,"rt":$n[0].DateTime,"fg":"End","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},"fn":"End"},{"a":2,"n":"Start","t":16,"rt":$n[0].DateTime,"g":{"a":2,"n":"get_Start","t":8,"rt":$n[0].DateTime,"fg":"Start","box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},"fn":"Start"},{"a":1,"n":"_delta","t":4,"rt":$n[0].TimeSpan,"sn":"_delta","ro":true},{"a":1,"n":"_end","t":4,"rt":$n[0].DateTime,"sn":"_end","ro":true,"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":1,"n":"_start","t":4,"rt":$n[0].DateTime,"sn":"_start","ro":true,"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}}]}; }, $n); - $m("System.Globalization.DaylightTimeStruct", function () { return {"att":1048840,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].DateTime,$n[0].DateTime,$n[0].TimeSpan],"pi":[{"n":"start","pt":$n[0].DateTime,"ps":0},{"n":"end","pt":$n[0].DateTime,"ps":1},{"n":"delta","pt":$n[0].TimeSpan,"ps":2}],"sn":"$ctor1"},{"a":2,"n":"Delta","t":4,"rt":$n[0].TimeSpan,"sn":"Delta","ro":true},{"a":2,"n":"End","t":4,"rt":$n[0].DateTime,"sn":"End","ro":true,"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}},{"a":2,"n":"Start","t":4,"rt":$n[0].DateTime,"sn":"Start","ro":true,"box":function ($v) { return H5.box($v, System.DateTime, System.DateTime.format);}}]}; }, $n); - $m("System.Globalization.GlobalizationMode", function () { return {"att":1048832,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":1,"n":"GetGlobalizationInvariantMode","is":true,"t":8,"sn":"GetGlobalizationInvariantMode","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":4,"n":"GetInvariantSwitchValue","is":true,"t":8,"sn":"GetInvariantSwitchValue","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":4,"n":"Invariant","is":true,"t":16,"rt":$n[0].Boolean,"g":{"a":4,"n":"get_Invariant","t":8,"rt":$n[0].Boolean,"fg":"Invariant","is":true,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"Invariant"},{"a":1,"n":"__Property__Initializer__Invariant","is":true,"t":4,"rt":$n[0].Boolean,"sn":"__Property__Initializer__Invariant","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[0].Boolean,"sn":"Invariant","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.Globalization.SortVersion", function () { return {"att":1057025,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Guid],"pi":[{"n":"fullVersion","pt":$n[0].Int32,"ps":0},{"n":"sortId","pt":$n[0].Guid,"ps":1}],"sn":"ctor"},{"a":4,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Int32,$n[0].Guid],"pi":[{"n":"nlsVersion","pt":$n[0].Int32,"ps":0},{"n":"effectiveId","pt":$n[0].Int32,"ps":1},{"n":"customVersion","pt":$n[0].Guid,"ps":2}],"sn":"$ctor1"},{"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[1].SortVersion,"ps":0}],"sn":"equalsT","rt":$n[0].Boolean,"p":[$n[1].SortVersion],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"op_Equality","is":true,"t":8,"pi":[{"n":"left","pt":$n[1].SortVersion,"ps":0},{"n":"right","pt":$n[1].SortVersion,"ps":1}],"sn":"op_Equality","rt":$n[0].Boolean,"p":[$n[1].SortVersion,$n[1].SortVersion],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"op_Inequality","is":true,"t":8,"pi":[{"n":"left","pt":$n[1].SortVersion,"ps":0},{"n":"right","pt":$n[1].SortVersion,"ps":1}],"sn":"op_Inequality","rt":$n[0].Boolean,"p":[$n[1].SortVersion,$n[1].SortVersion],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"FullVersion","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_FullVersion","t":8,"rt":$n[0].Int32,"fg":"FullVersion","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"FullVersion"},{"a":2,"n":"SortId","t":16,"rt":$n[0].Guid,"g":{"a":2,"n":"get_SortId","t":8,"rt":$n[0].Guid,"fg":"SortId"},"fn":"SortId"},{"a":1,"n":"m_NlsVersion","t":4,"rt":$n[0].Int32,"sn":"m_NlsVersion","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"m_SortId","t":4,"rt":$n[0].Guid,"sn":"m_SortId"}]}; }, $n); - $m("System.Globalization.UnicodeCategory", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"ClosePunctuation","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"ClosePunctuation","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"ConnectorPunctuation","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"ConnectorPunctuation","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"Control","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"Control","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"CurrencySymbol","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"CurrencySymbol","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"DashPunctuation","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"DashPunctuation","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"DecimalDigitNumber","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"DecimalDigitNumber","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"EnclosingMark","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"EnclosingMark","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"FinalQuotePunctuation","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"FinalQuotePunctuation","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"Format","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"Format","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"InitialQuotePunctuation","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"InitialQuotePunctuation","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"LetterNumber","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"LetterNumber","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"LineSeparator","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"LineSeparator","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"LowercaseLetter","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"LowercaseLetter","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"MathSymbol","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"MathSymbol","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"ModifierLetter","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"ModifierLetter","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"ModifierSymbol","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"ModifierSymbol","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"NonSpacingMark","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"NonSpacingMark","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"OpenPunctuation","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"OpenPunctuation","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"OtherLetter","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"OtherLetter","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"OtherNotAssigned","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"OtherNotAssigned","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"OtherNumber","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"OtherNumber","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"OtherPunctuation","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"OtherPunctuation","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"OtherSymbol","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"OtherSymbol","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"ParagraphSeparator","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"ParagraphSeparator","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"PrivateUse","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"PrivateUse","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"SpaceSeparator","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"SpaceSeparator","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"SpacingCombiningMark","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"SpacingCombiningMark","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"Surrogate","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"Surrogate","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"TitlecaseLetter","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"TitlecaseLetter","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}},{"a":2,"n":"UppercaseLetter","is":true,"t":4,"rt":$n[1].UnicodeCategory,"sn":"UppercaseLetter","box":function ($v) { return H5.box($v, System.Globalization.UnicodeCategory, System.Enum.toStringFn(System.Globalization.UnicodeCategory));}}]}; }, $n); - $m("System.Globalization.CultureInfo", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"name","pt":$n[0].String,"ps":0}],"sn":"ctor"},{"a":2,"n":"Clone","t":8,"sn":"clone","rt":$n[0].Object},{"a":2,"n":"CreateSpecificCulture","is":true,"t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0}],"sn":"getCultureInfo","rt":$n[1].CultureInfo,"p":[$n[0].String]},{"a":2,"n":"GetCultureInfo","is":true,"t":8,"pi":[{"n":"name","pt":$n[0].String,"ps":0}],"sn":"getCultureInfo","rt":$n[1].CultureInfo,"p":[$n[0].String]},{"a":2,"n":"GetCultures","is":true,"t":8,"sn":"getCultures","rt":System.Array.type(System.Globalization.CultureInfo)},{"v":true,"a":2,"n":"GetFormat","t":8,"pi":[{"n":"formatType","pt":$n[0].Type,"ps":0}],"sn":"getFormat","rt":$n[0].Object,"p":[$n[0].Type]},{"a":2,"n":"CurrentCulture","is":true,"t":16,"rt":$n[1].CultureInfo,"g":{"a":2,"n":"get_CurrentCulture","is":true,"t":8,"tpc":0,"def":function () { return this.getCurrentCulture(); },"rt":$n[1].CultureInfo},"s":{"a":2,"n":"set_CurrentCulture","is":true,"t":8,"pi":[{"n":"value","pt":$n[1].CultureInfo,"ps":0}],"tpc":0,"def":function (value) { return this.setCurrentCulture(value); },"rt":$n[0].Void,"p":[$n[1].CultureInfo]}},{"a":2,"n":"DateTimeFormat","t":16,"rt":$n[1].DateTimeFormatInfo,"g":{"a":2,"n":"get_DateTimeFormat","t":8,"rt":$n[1].DateTimeFormatInfo,"fg":"dateTimeFormat"},"s":{"a":2,"n":"set_DateTimeFormat","t":8,"p":[$n[1].DateTimeFormatInfo],"rt":$n[0].Void,"fs":"dateTimeFormat"},"fn":"dateTimeFormat"},{"a":2,"n":"EnglishName","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_EnglishName","t":8,"rt":$n[0].String,"fg":"englishName"},"s":{"a":2,"n":"set_EnglishName","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"englishName"},"fn":"englishName"},{"a":2,"n":"InvariantCulture","is":true,"t":16,"rt":$n[1].CultureInfo,"g":{"a":2,"n":"get_InvariantCulture","t":8,"rt":$n[1].CultureInfo,"fg":"invariantCulture","is":true},"fn":"invariantCulture"},{"a":2,"n":"Name","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Name","t":8,"rt":$n[0].String,"fg":"name"},"fn":"name"},{"a":2,"n":"NativeName","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_NativeName","t":8,"rt":$n[0].String,"fg":"nativeName"},"s":{"a":2,"n":"set_NativeName","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"nativeName"},"fn":"nativeName"},{"a":2,"n":"NumberFormat","t":16,"rt":$n[1].NumberFormatInfo,"g":{"a":2,"n":"get_NumberFormat","t":8,"rt":$n[1].NumberFormatInfo,"fg":"numberFormat"},"s":{"a":2,"n":"set_NumberFormat","t":8,"p":[$n[1].NumberFormatInfo],"rt":$n[0].Void,"fs":"numberFormat"},"fn":"numberFormat"},{"v":true,"a":2,"n":"TextInfo","t":16,"rt":$n[1].TextInfo,"g":{"v":true,"a":2,"n":"get_TextInfo","t":8,"rt":$n[1].TextInfo,"fg":"TextInfo"},"fn":"TextInfo"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[1].CultureInfo,"sn":"CurrentCulture"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[1].DateTimeFormatInfo,"sn":"dateTimeFormat"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"englishName"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[1].CultureInfo,"sn":"invariantCulture"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"name"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"nativeName"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[1].NumberFormatInfo,"sn":"numberFormat"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[1].TextInfo,"sn":"TextInfo"}]}; }, $n); - $m("System.Globalization.DateTimeFormatInfo", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Clone","t":8,"sn":"clone","rt":$n[0].Object},{"a":2,"n":"GetAbbreviatedDayName","t":8,"pi":[{"n":"dayofweek","pt":$n[0].DayOfWeek,"ps":0}],"sn":"getAbbreviatedDayName","rt":$n[0].String,"p":[$n[0].DayOfWeek]},{"a":2,"n":"GetAbbreviatedMonthName","t":8,"pi":[{"n":"month","pt":$n[0].Int32,"ps":0}],"sn":"getAbbreviatedMonthName","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"GetAllDateTimePatterns","t":8,"sn":"getAllDateTimePatterns","rt":$n[0].Array.type(System.String)},{"a":2,"n":"GetAllDateTimePatterns","t":8,"pi":[{"n":"format","pt":$n[0].Char,"ps":0}],"sn":"getAllDateTimePatterns","rt":$n[0].Array.type(System.String),"p":[$n[0].Char]},{"a":2,"n":"GetDayName","t":8,"pi":[{"n":"dayofweek","pt":$n[0].DayOfWeek,"ps":0}],"sn":"getDayName","rt":$n[0].String,"p":[$n[0].DayOfWeek]},{"a":2,"n":"GetFormat","t":8,"pi":[{"n":"formatType","pt":$n[0].Type,"ps":0}],"sn":"getFormat","rt":$n[0].Object,"p":[$n[0].Type]},{"a":2,"n":"GetMonthName","t":8,"pi":[{"n":"month","pt":$n[0].Int32,"ps":0}],"sn":"getMonthName","rt":$n[0].String,"p":[$n[0].Int32]},{"a":2,"n":"GetShortestDayName","t":8,"pi":[{"n":"dayOfWeek","pt":$n[0].DayOfWeek,"ps":0}],"sn":"getShortestDayName","rt":$n[0].String,"p":[$n[0].DayOfWeek]},{"a":2,"n":"AMDesignator","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_AMDesignator","t":8,"rt":$n[0].String,"fg":"amDesignator"},"s":{"a":2,"n":"set_AMDesignator","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"amDesignator"},"fn":"amDesignator"},{"a":2,"n":"AbbreviatedDayNames","t":16,"rt":$n[0].Array.type(System.String),"g":{"a":2,"n":"get_AbbreviatedDayNames","t":8,"rt":$n[0].Array.type(System.String),"fg":"abbreviatedDayNames"},"s":{"a":2,"n":"set_AbbreviatedDayNames","t":8,"p":[$n[0].Array.type(System.String)],"rt":$n[0].Void,"fs":"abbreviatedDayNames"},"fn":"abbreviatedDayNames"},{"a":2,"n":"AbbreviatedMonthGenitiveNames","t":16,"rt":$n[0].Array.type(System.String),"g":{"a":2,"n":"get_AbbreviatedMonthGenitiveNames","t":8,"rt":$n[0].Array.type(System.String),"fg":"abbreviatedMonthGenitiveNames"},"s":{"a":2,"n":"set_AbbreviatedMonthGenitiveNames","t":8,"p":[$n[0].Array.type(System.String)],"rt":$n[0].Void,"fs":"abbreviatedMonthGenitiveNames"},"fn":"abbreviatedMonthGenitiveNames"},{"a":2,"n":"AbbreviatedMonthNames","t":16,"rt":$n[0].Array.type(System.String),"g":{"a":2,"n":"get_AbbreviatedMonthNames","t":8,"rt":$n[0].Array.type(System.String),"fg":"abbreviatedMonthNames"},"s":{"a":2,"n":"set_AbbreviatedMonthNames","t":8,"p":[$n[0].Array.type(System.String)],"rt":$n[0].Void,"fs":"abbreviatedMonthNames"},"fn":"abbreviatedMonthNames"},{"a":2,"n":"CurrentInfo","is":true,"t":16,"rt":$n[1].DateTimeFormatInfo,"g":{"a":2,"n":"get_CurrentInfo","t":8,"rt":$n[1].DateTimeFormatInfo,"fg":"currentInfo","is":true},"fn":"currentInfo"},{"a":2,"n":"DateSeparator","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_DateSeparator","t":8,"rt":$n[0].String,"fg":"dateSeparator"},"s":{"a":2,"n":"set_DateSeparator","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"dateSeparator"},"fn":"dateSeparator"},{"a":2,"n":"DayNames","t":16,"rt":$n[0].Array.type(System.String),"g":{"a":2,"n":"get_DayNames","t":8,"rt":$n[0].Array.type(System.String),"fg":"dayNames"},"s":{"a":2,"n":"set_DayNames","t":8,"p":[$n[0].Array.type(System.String)],"rt":$n[0].Void,"fs":"dayNames"},"fn":"dayNames"},{"a":2,"n":"FirstDayOfWeek","t":16,"rt":$n[0].DayOfWeek,"g":{"a":2,"n":"get_FirstDayOfWeek","t":8,"rt":$n[0].DayOfWeek,"fg":"firstDayOfWeek","box":function ($v) { return H5.box($v, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek));}},"s":{"a":2,"n":"set_FirstDayOfWeek","t":8,"p":[$n[0].DayOfWeek],"rt":$n[0].Void,"fs":"firstDayOfWeek"},"fn":"firstDayOfWeek"},{"a":2,"n":"FullDateTimePattern","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_FullDateTimePattern","t":8,"rt":$n[0].String,"fg":"fullDateTimePattern"},"s":{"a":2,"n":"set_FullDateTimePattern","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"fullDateTimePattern"},"fn":"fullDateTimePattern"},{"a":2,"n":"InvariantInfo","is":true,"t":16,"rt":$n[1].DateTimeFormatInfo,"g":{"a":2,"n":"get_InvariantInfo","t":8,"rt":$n[1].DateTimeFormatInfo,"fg":"invariantInfo","is":true},"fn":"invariantInfo"},{"a":2,"n":"LongDatePattern","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_LongDatePattern","t":8,"rt":$n[0].String,"fg":"longDatePattern"},"s":{"a":2,"n":"set_LongDatePattern","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"longDatePattern"},"fn":"longDatePattern"},{"a":2,"n":"LongTimePattern","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_LongTimePattern","t":8,"rt":$n[0].String,"fg":"longTimePattern"},"s":{"a":2,"n":"set_LongTimePattern","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"longTimePattern"},"fn":"longTimePattern"},{"a":2,"n":"MonthDayPattern","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_MonthDayPattern","t":8,"rt":$n[0].String,"fg":"monthDayPattern"},"s":{"a":2,"n":"set_MonthDayPattern","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"monthDayPattern"},"fn":"monthDayPattern"},{"a":2,"n":"MonthGenitiveNames","t":16,"rt":$n[0].Array.type(System.String),"g":{"a":2,"n":"get_MonthGenitiveNames","t":8,"rt":$n[0].Array.type(System.String),"fg":"monthGenitiveNames"},"s":{"a":2,"n":"set_MonthGenitiveNames","t":8,"p":[$n[0].Array.type(System.String)],"rt":$n[0].Void,"fs":"monthGenitiveNames"},"fn":"monthGenitiveNames"},{"a":2,"n":"MonthNames","t":16,"rt":$n[0].Array.type(System.String),"g":{"a":2,"n":"get_MonthNames","t":8,"rt":$n[0].Array.type(System.String),"fg":"monthNames"},"s":{"a":2,"n":"set_MonthNames","t":8,"p":[$n[0].Array.type(System.String)],"rt":$n[0].Void,"fs":"monthNames"},"fn":"monthNames"},{"a":2,"n":"PMDesignator","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_PMDesignator","t":8,"rt":$n[0].String,"fg":"pmDesignator"},"s":{"a":2,"n":"set_PMDesignator","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"pmDesignator"},"fn":"pmDesignator"},{"a":2,"n":"RFC1123Pattern","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_RFC1123Pattern","t":8,"rt":$n[0].String,"fg":"rfc1123Pattern"},"s":{"a":2,"n":"set_RFC1123Pattern","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"rfc1123Pattern"},"fn":"rfc1123Pattern"},{"a":2,"n":"RoundtripFormat","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_RoundtripFormat","t":8,"rt":$n[0].String,"fg":"roundtripFormat"},"s":{"a":2,"n":"set_RoundtripFormat","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"roundtripFormat"},"fn":"roundtripFormat"},{"a":2,"n":"ShortDatePattern","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_ShortDatePattern","t":8,"rt":$n[0].String,"fg":"shortDatePattern"},"s":{"a":2,"n":"set_ShortDatePattern","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"shortDatePattern"},"fn":"shortDatePattern"},{"a":2,"n":"ShortTimePattern","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_ShortTimePattern","t":8,"rt":$n[0].String,"fg":"shortTimePattern"},"s":{"a":2,"n":"set_ShortTimePattern","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"shortTimePattern"},"fn":"shortTimePattern"},{"a":2,"n":"ShortestDayNames","t":16,"rt":$n[0].Array.type(System.String),"g":{"a":2,"n":"get_ShortestDayNames","t":8,"rt":$n[0].Array.type(System.String),"fg":"shortestDayNames"},"s":{"a":2,"n":"set_ShortestDayNames","t":8,"p":[$n[0].Array.type(System.String)],"rt":$n[0].Void,"fs":"shortestDayNames"},"fn":"shortestDayNames"},{"a":2,"n":"SortableDateTimePattern","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_SortableDateTimePattern","t":8,"rt":$n[0].String,"fg":"sortableDateTimePattern"},"s":{"a":2,"n":"set_SortableDateTimePattern","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"sortableDateTimePattern"},"fn":"sortableDateTimePattern"},{"a":2,"n":"TimeSeparator","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_TimeSeparator","t":8,"rt":$n[0].String,"fg":"timeSeparator"},"s":{"a":2,"n":"set_TimeSeparator","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"timeSeparator"},"fn":"timeSeparator"},{"a":2,"n":"UniversalSortableDateTimePattern","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_UniversalSortableDateTimePattern","t":8,"rt":$n[0].String,"fg":"universalSortableDateTimePattern"},"s":{"a":2,"n":"set_UniversalSortableDateTimePattern","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"universalSortableDateTimePattern"},"fn":"universalSortableDateTimePattern"},{"a":2,"n":"YearMonthPattern","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_YearMonthPattern","t":8,"rt":$n[0].String,"fg":"yearMonthPattern"},"s":{"a":2,"n":"set_YearMonthPattern","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"yearMonthPattern"},"fn":"yearMonthPattern"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"amDesignator"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Array.type(System.String),"sn":"abbreviatedDayNames"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Array.type(System.String),"sn":"abbreviatedMonthGenitiveNames"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Array.type(System.String),"sn":"abbreviatedMonthNames"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[1].DateTimeFormatInfo,"sn":"currentInfo"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"dateSeparator"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Array.type(System.String),"sn":"dayNames"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].DayOfWeek,"sn":"firstDayOfWeek","box":function ($v) { return H5.box($v, System.DayOfWeek, System.Enum.toStringFn(System.DayOfWeek));}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"fullDateTimePattern"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[1].DateTimeFormatInfo,"sn":"invariantInfo"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"longDatePattern"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"longTimePattern"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"monthDayPattern"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Array.type(System.String),"sn":"monthGenitiveNames"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Array.type(System.String),"sn":"monthNames"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"pmDesignator"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"rfc1123Pattern"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"roundtripFormat"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"shortDatePattern"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"shortTimePattern"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Array.type(System.String),"sn":"shortestDayNames"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"sortableDateTimePattern"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"timeSeparator"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"universalSortableDateTimePattern"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"yearMonthPattern"}]}; }, $n); - $m("System.Globalization.NumberFormatInfo", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Clone","t":8,"sn":"clone","rt":$n[0].Object},{"a":2,"n":"GetFormat","t":8,"pi":[{"n":"formatType","pt":$n[0].Type,"ps":0}],"sn":"getFormat","rt":$n[0].Object,"p":[$n[0].Type]},{"a":2,"n":"CurrencyDecimalDigits","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_CurrencyDecimalDigits","t":8,"rt":$n[0].Int32,"fg":"currencyDecimalDigits","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_CurrencyDecimalDigits","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"currencyDecimalDigits"},"fn":"currencyDecimalDigits"},{"a":2,"n":"CurrencyDecimalSeparator","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_CurrencyDecimalSeparator","t":8,"rt":$n[0].String,"fg":"currencyDecimalSeparator"},"s":{"a":2,"n":"set_CurrencyDecimalSeparator","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"currencyDecimalSeparator"},"fn":"currencyDecimalSeparator"},{"a":2,"n":"CurrencyGroupSeparator","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_CurrencyGroupSeparator","t":8,"rt":$n[0].String,"fg":"currencyGroupSeparator"},"s":{"a":2,"n":"set_CurrencyGroupSeparator","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"currencyGroupSeparator"},"fn":"currencyGroupSeparator"},{"a":2,"n":"CurrencyGroupSizes","t":16,"rt":$n[0].Array.type(System.Int32),"g":{"a":2,"n":"get_CurrencyGroupSizes","t":8,"rt":$n[0].Array.type(System.Int32),"fg":"currencyGroupSizes"},"s":{"a":2,"n":"set_CurrencyGroupSizes","t":8,"p":[$n[0].Array.type(System.Int32)],"rt":$n[0].Void,"fs":"currencyGroupSizes"},"fn":"currencyGroupSizes"},{"a":2,"n":"CurrencyNegativePattern","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_CurrencyNegativePattern","t":8,"rt":$n[0].Int32,"fg":"currencyNegativePattern","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_CurrencyNegativePattern","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"currencyNegativePattern"},"fn":"currencyNegativePattern"},{"a":2,"n":"CurrencyPositivePattern","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_CurrencyPositivePattern","t":8,"rt":$n[0].Int32,"fg":"currencyPositivePattern","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_CurrencyPositivePattern","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"currencyPositivePattern"},"fn":"currencyPositivePattern"},{"a":2,"n":"CurrencySymbol","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_CurrencySymbol","t":8,"rt":$n[0].String,"fg":"currencySymbol"},"s":{"a":2,"n":"set_CurrencySymbol","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"currencySymbol"},"fn":"currencySymbol"},{"a":2,"n":"CurrentInfo","is":true,"t":16,"rt":$n[1].NumberFormatInfo,"g":{"a":2,"n":"get_CurrentInfo","t":8,"rt":$n[1].NumberFormatInfo,"fg":"currentInfo","is":true},"fn":"currentInfo"},{"a":2,"n":"InvariantInfo","is":true,"t":16,"rt":$n[1].NumberFormatInfo,"g":{"a":2,"n":"get_InvariantInfo","t":8,"rt":$n[1].NumberFormatInfo,"fg":"invariantInfo","is":true},"fn":"invariantInfo"},{"a":2,"n":"NaNSymbol","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_NaNSymbol","t":8,"rt":$n[0].String,"fg":"nanSymbol"},"s":{"a":2,"n":"set_NaNSymbol","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"nanSymbol"},"fn":"nanSymbol"},{"a":2,"n":"NegativeInfinitySymbol","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_NegativeInfinitySymbol","t":8,"rt":$n[0].String,"fg":"negativeInfinitySymbol"},"s":{"a":2,"n":"set_NegativeInfinitySymbol","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"negativeInfinitySymbol"},"fn":"negativeInfinitySymbol"},{"a":2,"n":"NegativeSign","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_NegativeSign","t":8,"rt":$n[0].String,"fg":"negativeSign"},"s":{"a":2,"n":"set_NegativeSign","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"negativeSign"},"fn":"negativeSign"},{"a":2,"n":"NumberDecimalDigits","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_NumberDecimalDigits","t":8,"rt":$n[0].Int32,"fg":"numberDecimalDigits","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_NumberDecimalDigits","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"numberDecimalDigits"},"fn":"numberDecimalDigits"},{"a":2,"n":"NumberDecimalSeparator","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_NumberDecimalSeparator","t":8,"rt":$n[0].String,"fg":"numberDecimalSeparator"},"s":{"a":2,"n":"set_NumberDecimalSeparator","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"numberDecimalSeparator"},"fn":"numberDecimalSeparator"},{"a":2,"n":"NumberGroupSeparator","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_NumberGroupSeparator","t":8,"rt":$n[0].String,"fg":"numberGroupSeparator"},"s":{"a":2,"n":"set_NumberGroupSeparator","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"numberGroupSeparator"},"fn":"numberGroupSeparator"},{"a":2,"n":"NumberGroupSizes","t":16,"rt":$n[0].Array.type(System.Int32),"g":{"a":2,"n":"get_NumberGroupSizes","t":8,"rt":$n[0].Array.type(System.Int32),"fg":"numberGroupSizes"},"s":{"a":2,"n":"set_NumberGroupSizes","t":8,"p":[$n[0].Array.type(System.Int32)],"rt":$n[0].Void,"fs":"numberGroupSizes"},"fn":"numberGroupSizes"},{"a":2,"n":"PercentDecimalDigits","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_PercentDecimalDigits","t":8,"rt":$n[0].Int32,"fg":"percentDecimalDigits","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_PercentDecimalDigits","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"percentDecimalDigits"},"fn":"percentDecimalDigits"},{"a":2,"n":"PercentDecimalSeparator","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_PercentDecimalSeparator","t":8,"rt":$n[0].String,"fg":"percentDecimalSeparator"},"s":{"a":2,"n":"set_PercentDecimalSeparator","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"percentDecimalSeparator"},"fn":"percentDecimalSeparator"},{"a":2,"n":"PercentGroupSeparator","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_PercentGroupSeparator","t":8,"rt":$n[0].String,"fg":"percentGroupSeparator"},"s":{"a":2,"n":"set_PercentGroupSeparator","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"percentGroupSeparator"},"fn":"percentGroupSeparator"},{"a":2,"n":"PercentGroupSizes","t":16,"rt":$n[0].Array.type(System.Int32),"g":{"a":2,"n":"get_PercentGroupSizes","t":8,"rt":$n[0].Array.type(System.Int32),"fg":"percentGroupSizes"},"s":{"a":2,"n":"set_PercentGroupSizes","t":8,"p":[$n[0].Array.type(System.Int32)],"rt":$n[0].Void,"fs":"percentGroupSizes"},"fn":"percentGroupSizes"},{"a":2,"n":"PercentNegativePattern","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_PercentNegativePattern","t":8,"rt":$n[0].Int32,"fg":"percentNegativePattern","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_PercentNegativePattern","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"percentNegativePattern"},"fn":"percentNegativePattern"},{"a":2,"n":"PercentPositivePattern","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_PercentPositivePattern","t":8,"rt":$n[0].Int32,"fg":"percentPositivePattern","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_PercentPositivePattern","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"percentPositivePattern"},"fn":"percentPositivePattern"},{"a":2,"n":"PercentSymbol","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_PercentSymbol","t":8,"rt":$n[0].String,"fg":"percentSymbol"},"s":{"a":2,"n":"set_PercentSymbol","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"percentSymbol"},"fn":"percentSymbol"},{"a":2,"n":"PositiveInfinitySymbol","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_PositiveInfinitySymbol","t":8,"rt":$n[0].String,"fg":"positiveInfinitySymbol"},"s":{"a":2,"n":"set_PositiveInfinitySymbol","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"positiveInfinitySymbol"},"fn":"positiveInfinitySymbol"},{"a":2,"n":"PositiveSign","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_PositiveSign","t":8,"rt":$n[0].String,"fg":"positiveSign"},"s":{"a":2,"n":"set_PositiveSign","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"positiveSign"},"fn":"positiveSign"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"currencyDecimalDigits","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"currencyDecimalSeparator"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"currencyGroupSeparator"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Array.type(System.Int32),"sn":"currencyGroupSizes"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"currencyNegativePattern","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"currencyPositivePattern","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"currencySymbol"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[1].NumberFormatInfo,"sn":"currentInfo"},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[1].NumberFormatInfo,"sn":"invariantInfo"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"nanSymbol"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"negativeInfinitySymbol"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"negativeSign"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"numberDecimalDigits","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"numberDecimalSeparator"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"numberGroupSeparator"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Array.type(System.Int32),"sn":"numberGroupSizes"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"percentDecimalDigits","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"percentDecimalSeparator"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"percentGroupSeparator"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Array.type(System.Int32),"sn":"percentGroupSizes"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"percentNegativePattern","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"percentPositivePattern","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"percentSymbol"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"positiveInfinitySymbol"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"positiveSign"}]}; }, $n); - $m("System.Globalization.TextInfo", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"v":true,"a":2,"n":"Clone","t":8,"sn":"clone","rt":$n[0].Object},{"a":1,"n":"VerifyWritable","t":8,"sn":"VerifyWritable","rt":$n[0].Void},{"v":true,"a":2,"n":"ANSICodePage","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_ANSICodePage","t":8,"rt":$n[0].Int32,"fg":"ANSICodePage","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"ANSICodePage"},{"a":2,"n":"CultureName","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_CultureName","t":8,"rt":$n[0].String,"fg":"CultureName"},"fn":"CultureName"},{"v":true,"a":2,"n":"EBCDICCodePage","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_EBCDICCodePage","t":8,"rt":$n[0].Int32,"fg":"EBCDICCodePage","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"EBCDICCodePage"},{"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReadOnly","t":8,"rt":$n[0].Boolean,"fg":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReadOnly"},{"a":2,"n":"IsRightToLeft","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsRightToLeft","t":8,"rt":$n[0].Boolean,"fg":"IsRightToLeft","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsRightToLeft"},{"a":2,"n":"LCID","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_LCID","t":8,"rt":$n[0].Int32,"fg":"LCID","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"LCID"},{"v":true,"a":2,"n":"ListSeparator","t":16,"rt":$n[0].String,"g":{"v":true,"a":2,"n":"get_ListSeparator","t":8,"rt":$n[0].String,"fg":"ListSeparator"},"s":{"v":true,"a":2,"n":"set_ListSeparator","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"ListSeparator"},"fn":"ListSeparator"},{"v":true,"a":2,"n":"MacCodePage","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_MacCodePage","t":8,"rt":$n[0].Int32,"fg":"MacCodePage","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"MacCodePage"},{"v":true,"a":2,"n":"OEMCodePage","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_OEMCodePage","t":8,"rt":$n[0].Int32,"fg":"OEMCodePage","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"OEMCodePage"},{"a":1,"n":"listSeparator","t":4,"rt":$n[0].String,"sn":"listSeparator"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"ANSICodePage","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"CultureName"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"EBCDICCodePage","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IsRightToLeft","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"LCID","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"MacCodePage","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"OEMCodePage","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.ComponentModel.DefaultValueAttribute", function () { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].Boolean],"pi":[{"n":"value","pt":$n[0].Boolean,"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Byte],"pi":[{"n":"value","pt":$n[0].Byte,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Char],"pi":[{"n":"value","pt":$n[0].Char,"ps":0}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Double],"pi":[{"n":"value","pt":$n[0].Double,"ps":0}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int16],"pi":[{"n":"value","pt":$n[0].Int16,"ps":0}],"sn":"$ctor4"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"$ctor5"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int64],"pi":[{"n":"value","pt":$n[0].Int64,"ps":0}],"sn":"$ctor6"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Object],"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"$ctor7"},{"a":2,"n":".ctor","t":1,"p":[$n[0].SByte],"pi":[{"n":"value","pt":$n[0].SByte,"ps":0}],"sn":"$ctor8"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Single],"pi":[{"n":"value","pt":$n[0].Single,"ps":0}],"sn":"$ctor9"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"value","pt":$n[0].String,"ps":0}],"sn":"$ctor10"},{"a":2,"n":".ctor","t":1,"p":[$n[0].UInt16],"pi":[{"n":"value","pt":$n[0].UInt16,"ps":0}],"sn":"$ctor12"},{"a":2,"n":".ctor","t":1,"p":[$n[0].UInt32],"pi":[{"n":"value","pt":$n[0].UInt32,"ps":0}],"sn":"$ctor13"},{"a":2,"n":".ctor","t":1,"p":[$n[0].UInt64],"pi":[{"n":"value","pt":$n[0].UInt64,"ps":0}],"sn":"$ctor14"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Type,$n[0].String],"pi":[{"n":"type","pt":$n[0].Type,"ps":0},{"n":"value","pt":$n[0].String,"ps":1}],"sn":"$ctor11"},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":3,"n":"SetValue","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"setValue","rt":$n[0].Void,"p":[$n[0].Object]},{"v":true,"a":2,"n":"Value","t":16,"rt":$n[0].Object,"g":{"v":true,"a":2,"n":"get_Value","t":8,"rt":$n[0].Object,"fg":"Value"},"fn":"Value"},{"a":1,"n":"_value","t":4,"rt":$n[0].Object,"sn":"_value"}]}; }, $n); - $m("System.ComponentModel.BrowsableAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].Boolean],"pi":[{"n":"browsable","pt":$n[0].Boolean,"ps":0}],"sn":"ctor"},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Browsable","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Browsable","t":8,"rt":$n[0].Boolean,"fg":"Browsable","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"Browsable"},{"a":2,"n":"Default","is":true,"t":4,"rt":$n[15].BrowsableAttribute,"sn":"default","ro":true},{"a":2,"n":"No","is":true,"t":4,"rt":$n[15].BrowsableAttribute,"sn":"no","ro":true},{"a":2,"n":"Yes","is":true,"t":4,"rt":$n[15].BrowsableAttribute,"sn":"yes","ro":true},{"a":1,"n":"browsable","t":4,"rt":$n[0].Boolean,"sn":"browsable","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.Collections.BitArray", function () { return {"nested":[$n[6].BitArray.BitArrayEnumeratorSimple],"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Boolean)],"pi":[{"n":"values","pt":$n[0].Array.type(System.Boolean),"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Byte)],"pi":[{"n":"bytes","pt":$n[0].Array.type(System.Byte),"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[6].BitArray],"pi":[{"n":"bits","pt":$n[6].BitArray,"ps":0}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"length","pt":$n[0].Int32,"ps":0}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Int32)],"pi":[{"n":"values","pt":$n[0].Array.type(System.Int32),"ps":0}],"sn":"$ctor5"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[0].Boolean],"pi":[{"n":"length","pt":$n[0].Int32,"ps":0},{"n":"defaultValue","pt":$n[0].Boolean,"ps":1}],"sn":"$ctor4"},{"a":2,"n":"And","t":8,"pi":[{"n":"value","pt":$n[6].BitArray,"ps":0}],"sn":"And","rt":$n[6].BitArray,"p":[$n[6].BitArray]},{"a":2,"n":"Clone","t":8,"sn":"clone","rt":$n[0].Object},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[Array,$n[0].Int32]},{"a":2,"n":"Get","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"Get","rt":$n[0].Boolean,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"GetArrayLength","is":true,"t":8,"pi":[{"n":"n","pt":$n[0].Int32,"ps":0},{"n":"div","pt":$n[0].Int32,"ps":1}],"sn":"GetArrayLength","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[6].IEnumerator},{"a":2,"n":"Not","t":8,"sn":"Not","rt":$n[6].BitArray},{"a":2,"n":"Or","t":8,"pi":[{"n":"value","pt":$n[6].BitArray,"ps":0}],"sn":"Or","rt":$n[6].BitArray,"p":[$n[6].BitArray]},{"a":2,"n":"Set","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Boolean,"ps":1}],"sn":"Set","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Boolean]},{"a":2,"n":"SetAll","t":8,"pi":[{"n":"value","pt":$n[0].Boolean,"ps":0}],"sn":"SetAll","rt":$n[0].Void,"p":[$n[0].Boolean]},{"a":2,"n":"Xor","t":8,"pi":[{"n":"value","pt":$n[6].BitArray,"ps":0}],"sn":"Xor","rt":$n[6].BitArray,"p":[$n[6].BitArray]},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReadOnly","t":8,"rt":$n[0].Boolean,"fg":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReadOnly"},{"a":2,"n":"Item","t":16,"rt":$n[0].Boolean,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"getItem","rt":$n[0].Boolean,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Boolean,"ps":1}],"sn":"setItem","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Boolean]}},{"a":2,"n":"Length","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Length","t":8,"rt":$n[0].Int32,"fg":"Length","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_Length","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"Length"},"fn":"Length"},{"a":1,"n":"BitsPerByte","is":true,"t":4,"rt":$n[0].Int32,"sn":"BitsPerByte","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"BitsPerInt32","is":true,"t":4,"rt":$n[0].Int32,"sn":"BitsPerInt32","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"BytesPerInt32","is":true,"t":4,"rt":$n[0].Int32,"sn":"BytesPerInt32","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_ShrinkThreshold","is":true,"t":4,"rt":$n[0].Int32,"sn":"_ShrinkThreshold","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_version","t":4,"rt":$n[0].Int32,"sn":"_version","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"m_array","t":4,"rt":$n[0].Array.type(System.Int32),"sn":"m_array"},{"a":1,"n":"m_length","t":4,"rt":$n[0].Int32,"sn":"m_length","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.BitArray.BitArrayEnumeratorSimple", function () { return {"td":$n[6].BitArray,"att":1048579,"a":1,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[6].BitArray],"pi":[{"n":"bitarray","pt":$n[6].BitArray,"ps":0}],"sn":"ctor"},{"v":true,"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Reset","t":8,"sn":"reset","rt":$n[0].Void},{"v":true,"a":2,"n":"Current","t":16,"rt":$n[0].Object,"g":{"v":true,"a":2,"n":"get_Current","t":8,"rt":$n[0].Object,"fg":"Current"},"fn":"Current"},{"a":1,"n":"bitarray","t":4,"rt":$n[6].BitArray,"sn":"bitarray"},{"a":1,"n":"currentElement","t":4,"rt":$n[0].Boolean,"sn":"currentElement","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"index","t":4,"rt":$n[0].Int32,"sn":"index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.DictionaryEntry", function () { return {"att":1057033,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Object,$n[0].Object],"pi":[{"n":"key","pt":$n[0].Object,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"$ctor1"},{"a":2,"n":"Key","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_Key","t":8,"rt":$n[0].Object,"fg":"Key"},"s":{"a":2,"n":"set_Key","t":8,"p":[$n[0].Object],"rt":$n[0].Void,"fs":"Key"},"fn":"Key"},{"a":2,"n":"Value","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_Value","t":8,"rt":$n[0].Object,"fg":"Value"},"s":{"a":2,"n":"set_Value","t":8,"p":[$n[0].Object],"rt":$n[0].Void,"fs":"Value"},"fn":"Value"},{"a":1,"n":"_key","t":4,"rt":$n[0].Object,"sn":"_key"},{"a":1,"n":"_value","t":4,"rt":$n[0].Object,"sn":"_value"}]}; }, $n); - $m("System.Collections.IDictionaryEnumerator", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Entry","t":16,"rt":$n[6].DictionaryEntry,"g":{"ab":true,"a":2,"n":"get_Entry","t":8,"rt":$n[6].DictionaryEntry,"fg":"System$Collections$IDictionaryEnumerator$Entry"},"fn":"System$Collections$IDictionaryEnumerator$Entry"},{"ab":true,"a":2,"n":"Key","t":16,"rt":$n[0].Object,"g":{"ab":true,"a":2,"n":"get_Key","t":8,"rt":$n[0].Object,"fg":"System$Collections$IDictionaryEnumerator$Key"},"fn":"System$Collections$IDictionaryEnumerator$Key"},{"ab":true,"a":2,"n":"Value","t":16,"rt":$n[0].Object,"g":{"ab":true,"a":2,"n":"get_Value","t":8,"rt":$n[0].Object,"fg":"System$Collections$IDictionaryEnumerator$Value"},"fn":"System$Collections$IDictionaryEnumerator$Value"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[6].DictionaryEntry,"sn":"System$Collections$IDictionaryEnumerator$Entry"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"System$Collections$IDictionaryEnumerator$Key"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"System$Collections$IDictionaryEnumerator$Value"}]}; }, $n); - $m("System.Collections.IComparer", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Compare","t":8,"pi":[{"n":"x","pt":$n[0].Object,"ps":0},{"n":"y","pt":$n[0].Object,"ps":1}],"sn":"System$Collections$IComparer$compare","rt":$n[0].Int32,"p":[$n[0].Object,$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.IEnumerator", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"MoveNext","t":8,"sn":"System$Collections$IEnumerator$moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"Reset","t":8,"sn":"System$Collections$IEnumerator$reset","rt":$n[0].Void},{"ab":true,"a":2,"n":"Current","t":16,"rt":$n[0].Object,"g":{"ab":true,"a":2,"n":"get_Current","t":8,"rt":$n[0].Object,"fg":"System$Collections$IEnumerator$Current"},"fn":"System$Collections$IEnumerator$Current"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"System$Collections$IEnumerator$Current"}]}; }, $n); - $m("System.Collections.IEqualityComparer", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"x","pt":$n[0].Object,"ps":0},{"n":"y","pt":$n[0].Object,"ps":1}],"sn":"System$Collections$IEqualityComparer$equals","rt":$n[0].Boolean,"p":[$n[0].Object,$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"GetHashCode","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"System$Collections$IEqualityComparer$getHashCode","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.IStructuralComparable", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"CompareTo","t":8,"pi":[{"n":"other","pt":$n[0].Object,"ps":0},{"n":"comparer","pt":$n[6].IComparer,"ps":1}],"sn":"System$Collections$IStructuralComparable$CompareTo","rt":$n[0].Int32,"p":[$n[0].Object,$n[6].IComparer],"box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.IStructuralEquatable", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"other","pt":$n[0].Object,"ps":0},{"n":"comparer","pt":$n[6].IEqualityComparer,"ps":1}],"sn":"System$Collections$IStructuralEquatable$Equals","rt":$n[0].Boolean,"p":[$n[0].Object,$n[6].IEqualityComparer],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"GetHashCode","t":8,"pi":[{"n":"comparer","pt":$n[6].IEqualityComparer,"ps":0}],"sn":"System$Collections$IStructuralEquatable$GetHashCode","rt":$n[0].Int32,"p":[$n[6].IEqualityComparer],"box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.HashHelpers", function () { return {"att":1048960,"a":4,"s":true,"m":[{"a":2,"n":"Combine","is":true,"t":8,"pi":[{"n":"h1","pt":$n[0].Int32,"ps":0},{"n":"h2","pt":$n[0].Int32,"ps":1}],"sn":"Combine","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"ExpandPrime","is":true,"t":8,"pi":[{"n":"oldSize","pt":$n[0].Int32,"ps":0}],"sn":"ExpandPrime","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"GetMinPrime","is":true,"t":8,"sn":"GetMinPrime","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"GetPrime","is":true,"t":8,"pi":[{"n":"min","pt":$n[0].Int32,"ps":0}],"sn":"GetPrime","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IsPrime","is":true,"t":8,"pi":[{"n":"candidate","pt":$n[0].Int32,"ps":0}],"sn":"IsPrime","rt":$n[0].Boolean,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"HashPrime","is":true,"t":4,"rt":$n[0].Int32,"sn":"HashPrime","box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"MaxPrimeArrayLength","is":true,"t":4,"rt":$n[0].Int32,"sn":"MaxPrimeArrayLength","box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"RandomSeed","is":true,"t":4,"rt":$n[0].Int32,"sn":"RandomSeed","ro":true,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"primes","is":true,"t":4,"rt":$n[0].Array.type(System.Int32),"sn":"primes","ro":true}]}; }, $n); - $m("System.Collections.ICollection", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (array, arrayIndex) { return System.Array.copyTo(this, array, arrayIndex); },"rt":$n[0].Void,"p":[Array,$n[0].Int32]},{"ab":true,"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"ab":true,"a":2,"n":"get_Count","t":8,"tpc":0,"def":function () { return System.Array.getCount(this); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"ab":true,"a":2,"n":"IsSynchronized","t":16,"rt":$n[0].Boolean,"g":{"ab":true,"a":2,"n":"get_IsSynchronized","t":8,"rt":$n[0].Boolean,"fg":"System$Collections$ICollection$IsSynchronized","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"System$Collections$ICollection$IsSynchronized"},{"ab":true,"a":2,"n":"SyncRoot","t":16,"rt":$n[0].Object,"g":{"ab":true,"a":2,"n":"get_SyncRoot","t":8,"rt":$n[0].Object,"fg":"System$Collections$ICollection$SyncRoot"},"fn":"System$Collections$ICollection$SyncRoot"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"System$Collections$ICollection$Count","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"System$Collections$ICollection$IsSynchronized","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"System$Collections$ICollection$SyncRoot"}]}; }, $n); - $m("System.Collections.IDictionary", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Add","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"System$Collections$IDictionary$add","rt":$n[0].Void,"p":[$n[0].Object,$n[0].Object]},{"ab":true,"a":2,"n":"Clear","t":8,"sn":"System$Collections$IDictionary$clear","rt":$n[0].Void},{"ab":true,"a":2,"n":"Contains","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"System$Collections$IDictionary$contains","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"GetEnumerator","t":8,"sn":"System$Collections$IDictionary$GetEnumerator","rt":$n[6].IDictionaryEnumerator},{"ab":true,"a":2,"n":"Remove","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"System$Collections$IDictionary$remove","rt":$n[0].Void,"p":[$n[0].Object]},{"ab":true,"a":2,"n":"IsFixedSize","t":16,"rt":$n[0].Boolean,"g":{"ab":true,"a":2,"n":"get_IsFixedSize","t":8,"rt":$n[0].Boolean,"fg":"System$Collections$IDictionary$IsFixedSize","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"System$Collections$IDictionary$IsFixedSize"},{"ab":true,"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"ab":true,"a":2,"n":"get_IsReadOnly","t":8,"rt":$n[0].Boolean,"fg":"System$Collections$IDictionary$IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"System$Collections$IDictionary$IsReadOnly"},{"ab":true,"a":2,"n":"Item","t":16,"rt":$n[0].Object,"p":[$n[0].Object],"i":true,"ipi":[{"n":"key","pt":$n[0].Object,"ps":0}],"g":{"ab":true,"a":2,"n":"get_Item","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"System$Collections$IDictionary$getItem","rt":$n[0].Object,"p":[$n[0].Object]},"s":{"ab":true,"a":2,"n":"set_Item","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"System$Collections$IDictionary$setItem","rt":$n[0].Void,"p":[$n[0].Object,$n[0].Object]}},{"ab":true,"a":2,"n":"Keys","t":16,"rt":$n[6].ICollection,"g":{"ab":true,"a":2,"n":"get_Keys","t":8,"rt":$n[6].ICollection,"fg":"System$Collections$IDictionary$Keys"},"fn":"System$Collections$IDictionary$Keys"},{"ab":true,"a":2,"n":"Values","t":16,"rt":$n[6].ICollection,"g":{"ab":true,"a":2,"n":"get_Values","t":8,"rt":$n[6].ICollection,"fg":"System$Collections$IDictionary$Values"},"fn":"System$Collections$IDictionary$Values"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"System$Collections$IDictionary$IsFixedSize","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"System$Collections$IDictionary$IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"System$Collections$IDictionary$Item"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[6].ICollection,"sn":"System$Collections$IDictionary$Keys"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[6].ICollection,"sn":"System$Collections$IDictionary$Values"}]}; }, $n); - $m("System.Collections.IEnumerable", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"GetEnumerator","t":8,"tpc":0,"def":function () { return H5.getEnumerator(this); },"rt":$n[6].IEnumerator}]}; }, $n); - $m("System.Collections.IList", function () { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Add","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (value) { return System.Array.add(this, value, Object); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"Clear","t":8,"tpc":0,"def":function () { return System.Array.clear(this, Object); },"rt":$n[0].Void},{"ab":true,"a":2,"n":"Contains","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (value) { return System.Array.contains(this, value); },"rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"IndexOf","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (value) { return System.Array.indexOf(this, value, 0, null); },"rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"tpc":0,"def":function (index, value) { return System.Array.insert(this, index, value, Object); },"rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Object]},{"ab":true,"a":2,"n":"Remove","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"tpc":0,"def":function (value) { return System.Array.remove(this, value, Object); },"rt":$n[0].Void,"p":[$n[0].Object]},{"ab":true,"a":2,"n":"RemoveAt","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (index) { return System.Array.removeAt(this, index, Object); },"rt":$n[0].Void,"p":[$n[0].Int32]},{"ab":true,"a":2,"n":"IsFixedSize","t":16,"rt":$n[0].Boolean,"g":{"ab":true,"a":2,"n":"get_IsFixedSize","t":8,"tpc":0,"def":function () { return System.Array.isFixedSize(this); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"ab":true,"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"ab":true,"a":2,"n":"get_IsReadOnly","t":8,"tpc":0,"def":function () { return System.Array.getIsReadOnly(this, Object); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"ab":true,"a":2,"n":"Item","t":16,"rt":$n[0].Object,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"ab":true,"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (index) { return System.Array.getItem(this, index); },"rt":$n[0].Object,"p":[$n[0].Int32]},"s":{"ab":true,"a":2,"n":"set_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"tpc":0,"def":function (index, value) { return System.Array.setItem(this, index, value); },"rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Object]}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"System$Collections$IList$IsFixedSize","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"System$Collections$IList$IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Object,"sn":"System$Collections$IList$Item"}]}; }, $n); - $m("System.Collections.KeyValuePairs", function () { return {"att":1048576,"a":4,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].Object,$n[0].Object],"pi":[{"n":"key","pt":$n[0].Object,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"ctor"},{"a":2,"n":"Key","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_Key","t":8,"rt":$n[0].Object,"fg":"Key"},"fn":"Key"},{"a":2,"n":"Value","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_Value","t":8,"rt":$n[0].Object,"fg":"Value"},"fn":"Value"},{"a":1,"n":"key","t":4,"rt":$n[0].Object,"sn":"key"},{"a":1,"n":"value","t":4,"rt":$n[0].Object,"sn":"value"}]}; }, $n); - $m("System.Collections.SortedList", function () { return {"nested":[$n[6].SortedList.SyncSortedList,$n[6].SortedList.SortedListEnumerator,$n[6].SortedList.KeyList,$n[6].SortedList.ValueList,$n[6].SortedList.SortedListDebugView],"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[6].IComparer],"pi":[{"n":"comparer","pt":$n[6].IComparer,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[6].IDictionary],"pi":[{"n":"d","pt":$n[6].IDictionary,"ps":0}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"initialCapacity","pt":$n[0].Int32,"ps":0}],"sn":"$ctor5"},{"a":2,"n":".ctor","t":1,"p":[$n[6].IComparer,$n[0].Int32],"pi":[{"n":"comparer","pt":$n[6].IComparer,"ps":0},{"n":"capacity","pt":$n[0].Int32,"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[6].IDictionary,$n[6].IComparer],"pi":[{"n":"d","pt":$n[6].IDictionary,"ps":0},{"n":"comparer","pt":$n[6].IComparer,"ps":1}],"sn":"$ctor4"},{"v":true,"a":2,"n":"Add","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"add","rt":$n[0].Void,"p":[$n[0].Object,$n[0].Object]},{"v":true,"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"v":true,"a":2,"n":"Clone","t":8,"sn":"clone","rt":$n[0].Object},{"v":true,"a":2,"n":"Contains","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"contains","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"ContainsKey","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"ContainsKey","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"ContainsValue","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"ContainsValue","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[Array,$n[0].Int32]},{"a":1,"n":"EnsureCapacity","t":8,"pi":[{"n":"min","pt":$n[0].Int32,"ps":0}],"sn":"EnsureCapacity","rt":$n[0].Void,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"GetByIndex","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"GetByIndex","rt":$n[0].Object,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[6].IDictionaryEnumerator},{"v":true,"a":2,"n":"GetKey","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"GetKey","rt":$n[0].Object,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"GetKeyList","t":8,"sn":"GetKeyList","rt":$n[6].IList},{"v":true,"a":2,"n":"GetValueList","t":8,"sn":"GetValueList","rt":$n[6].IList},{"v":true,"a":2,"n":"IndexOfKey","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"IndexOfKey","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"IndexOfValue","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"IndexOfValue","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"Init","t":8,"sn":"Init","rt":$n[0].Void},{"a":1,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"key","pt":$n[0].Object,"ps":1},{"n":"value","pt":$n[0].Object,"ps":2}],"sn":"Insert","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Object,$n[0].Object]},{"v":true,"a":2,"n":"Remove","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"remove","rt":$n[0].Void,"p":[$n[0].Object]},{"v":true,"a":2,"n":"RemoveAt","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"RemoveAt","rt":$n[0].Void,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"SetByIndex","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"SetByIndex","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Object]},{"a":2,"n":"Synchronized","is":true,"t":8,"pi":[{"n":"list","pt":$n[6].SortedList,"ps":0}],"sn":"Synchronized","rt":$n[6].SortedList,"p":[$n[6].SortedList]},{"v":true,"a":4,"n":"ToKeyValuePairsArray","t":8,"sn":"ToKeyValuePairsArray","rt":System.Array.type(System.Collections.KeyValuePairs)},{"v":true,"a":2,"n":"TrimToSize","t":8,"sn":"TrimToSize","rt":$n[0].Void},{"v":true,"a":2,"n":"Capacity","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_Capacity","t":8,"rt":$n[0].Int32,"fg":"Capacity","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"v":true,"a":2,"n":"set_Capacity","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"Capacity"},"fn":"Capacity"},{"v":true,"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"v":true,"a":2,"n":"IsFixedSize","t":16,"rt":$n[0].Boolean,"g":{"v":true,"a":2,"n":"get_IsFixedSize","t":8,"rt":$n[0].Boolean,"fg":"IsFixedSize","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsFixedSize"},{"v":true,"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"v":true,"a":2,"n":"get_IsReadOnly","t":8,"rt":$n[0].Boolean,"fg":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReadOnly"},{"v":true,"a":2,"n":"IsSynchronized","t":16,"rt":$n[0].Boolean,"g":{"v":true,"a":2,"n":"get_IsSynchronized","t":8,"rt":$n[0].Boolean,"fg":"IsSynchronized","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsSynchronized"},{"v":true,"a":2,"n":"Item","t":16,"rt":$n[0].Object,"p":[$n[0].Object],"i":true,"ipi":[{"n":"key","pt":$n[0].Object,"ps":0}],"g":{"v":true,"a":2,"n":"get_Item","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"getItem","rt":$n[0].Object,"p":[$n[0].Object]},"s":{"v":true,"a":2,"n":"set_Item","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"setItem","rt":$n[0].Void,"p":[$n[0].Object,$n[0].Object]}},{"v":true,"a":2,"n":"Keys","t":16,"rt":$n[6].ICollection,"g":{"v":true,"a":2,"n":"get_Keys","t":8,"rt":$n[6].ICollection,"fg":"Keys"},"fn":"Keys"},{"v":true,"a":2,"n":"SyncRoot","t":16,"rt":$n[0].Object,"g":{"v":true,"a":2,"n":"get_SyncRoot","t":8,"rt":$n[0].Object,"fg":"SyncRoot"},"fn":"SyncRoot"},{"v":true,"a":2,"n":"Values","t":16,"rt":$n[6].ICollection,"g":{"v":true,"a":2,"n":"get_Values","t":8,"rt":$n[6].ICollection,"fg":"Values"},"fn":"Values"},{"a":1,"n":"_size","t":4,"rt":$n[0].Int32,"sn":"_size","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"comparer","t":4,"rt":$n[6].IComparer,"sn":"comparer"},{"a":1,"n":"emptyArray","is":true,"t":4,"rt":$n[0].Array.type(System.Object),"sn":"emptyArray"},{"a":1,"n":"keyList","t":4,"rt":$n[6].SortedList.KeyList,"sn":"keyList"},{"a":1,"n":"keys","t":4,"rt":$n[0].Array.type(System.Object),"sn":"keys"},{"a":1,"n":"valueList","t":4,"rt":$n[6].SortedList.ValueList,"sn":"valueList"},{"a":1,"n":"values","t":4,"rt":$n[0].Array.type(System.Object),"sn":"values"},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.SortedList.SyncSortedList", function () { return {"td":$n[6].SortedList,"att":1056771,"a":1,"at":[new System.SerializableAttribute()],"m":[{"a":4,"n":".ctor","t":1,"p":[$n[6].SortedList],"pi":[{"n":"list","pt":$n[6].SortedList,"ps":0}],"sn":"ctor"},{"ov":true,"a":2,"n":"Add","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"add","rt":$n[0].Void,"p":[$n[0].Object,$n[0].Object]},{"ov":true,"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"ov":true,"a":2,"n":"Clone","t":8,"sn":"clone","rt":$n[0].Object},{"ov":true,"a":2,"n":"Contains","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"contains","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"ContainsKey","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"ContainsKey","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"ContainsValue","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"ContainsValue","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[Array,$n[0].Int32]},{"ov":true,"a":2,"n":"GetByIndex","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"GetByIndex","rt":$n[0].Object,"p":[$n[0].Int32]},{"ov":true,"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[6].IDictionaryEnumerator},{"ov":true,"a":2,"n":"GetKey","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"GetKey","rt":$n[0].Object,"p":[$n[0].Int32]},{"ov":true,"a":2,"n":"GetKeyList","t":8,"sn":"GetKeyList","rt":$n[6].IList},{"ov":true,"a":2,"n":"GetValueList","t":8,"sn":"GetValueList","rt":$n[6].IList},{"ov":true,"a":2,"n":"IndexOfKey","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"IndexOfKey","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"IndexOfValue","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"IndexOfValue","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":2,"n":"Remove","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"remove","rt":$n[0].Void,"p":[$n[0].Object]},{"ov":true,"a":2,"n":"RemoveAt","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"RemoveAt","rt":$n[0].Void,"p":[$n[0].Int32]},{"ov":true,"a":2,"n":"SetByIndex","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"SetByIndex","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Object]},{"ov":true,"a":4,"n":"ToKeyValuePairsArray","t":8,"sn":"ToKeyValuePairsArray","rt":System.Array.type(System.Collections.KeyValuePairs)},{"ov":true,"a":2,"n":"TrimToSize","t":8,"sn":"TrimToSize","rt":$n[0].Void},{"ov":true,"a":2,"n":"Capacity","t":16,"rt":$n[0].Int32,"g":{"ov":true,"a":2,"n":"get_Capacity","t":8,"rt":$n[0].Int32,"fg":"Capacity","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Capacity"},{"ov":true,"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"ov":true,"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"ov":true,"a":2,"n":"IsFixedSize","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_IsFixedSize","t":8,"rt":$n[0].Boolean,"fg":"IsFixedSize","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsFixedSize"},{"ov":true,"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_IsReadOnly","t":8,"rt":$n[0].Boolean,"fg":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReadOnly"},{"ov":true,"a":2,"n":"IsSynchronized","t":16,"rt":$n[0].Boolean,"g":{"ov":true,"a":2,"n":"get_IsSynchronized","t":8,"rt":$n[0].Boolean,"fg":"IsSynchronized","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsSynchronized"},{"ov":true,"a":2,"n":"Item","t":16,"rt":$n[0].Object,"p":[$n[0].Object],"i":true,"ipi":[{"n":"key","pt":$n[0].Object,"ps":0}],"g":{"ov":true,"a":2,"n":"get_Item","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"getItem","rt":$n[0].Object,"p":[$n[0].Object]},"s":{"ov":true,"a":2,"n":"set_Item","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"setItem","rt":$n[0].Void,"p":[$n[0].Object,$n[0].Object]}},{"ov":true,"a":2,"n":"SyncRoot","t":16,"rt":$n[0].Object,"g":{"ov":true,"a":2,"n":"get_SyncRoot","t":8,"rt":$n[0].Object,"fg":"SyncRoot"},"fn":"SyncRoot"},{"a":1,"n":"_list","t":4,"rt":$n[6].SortedList,"sn":"_list"},{"a":1,"n":"_root","t":4,"rt":$n[0].Object,"sn":"_root"}]}; }, $n); - $m("System.Collections.SortedList.SortedListEnumerator", function () { return {"td":$n[6].SortedList,"att":1056771,"a":1,"at":[new System.SerializableAttribute()],"m":[{"a":4,"n":".ctor","t":1,"p":[$n[6].SortedList,$n[0].Int32,$n[0].Int32,$n[0].Int32],"pi":[{"n":"sortedList","pt":$n[6].SortedList,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2},{"n":"getObjRetType","pt":$n[0].Int32,"ps":3}],"sn":"ctor"},{"a":2,"n":"Clone","t":8,"sn":"clone","rt":$n[0].Object},{"v":true,"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"Reset","t":8,"sn":"reset","rt":$n[0].Void},{"v":true,"a":2,"n":"Current","t":16,"rt":$n[0].Object,"g":{"v":true,"a":2,"n":"get_Current","t":8,"rt":$n[0].Object,"fg":"Current"},"fn":"Current"},{"v":true,"a":2,"n":"Entry","t":16,"rt":$n[6].DictionaryEntry,"g":{"v":true,"a":2,"n":"get_Entry","t":8,"rt":$n[6].DictionaryEntry,"fg":"Entry"},"fn":"Entry"},{"v":true,"a":2,"n":"Key","t":16,"rt":$n[0].Object,"g":{"v":true,"a":2,"n":"get_Key","t":8,"rt":$n[0].Object,"fg":"Key"},"fn":"Key"},{"v":true,"a":2,"n":"Value","t":16,"rt":$n[0].Object,"g":{"v":true,"a":2,"n":"get_Value","t":8,"rt":$n[0].Object,"fg":"Value"},"fn":"Value"},{"a":4,"n":"DictEntry","is":true,"t":4,"rt":$n[0].Int32,"sn":"DictEntry","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"Keys","is":true,"t":4,"rt":$n[0].Int32,"sn":"Keys","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"Values","is":true,"t":4,"rt":$n[0].Int32,"sn":"Values","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"current","t":4,"rt":$n[0].Boolean,"sn":"current","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"endIndex","t":4,"rt":$n[0].Int32,"sn":"endIndex","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"getObjectRetType","t":4,"rt":$n[0].Int32,"sn":"getObjectRetType","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"index","t":4,"rt":$n[0].Int32,"sn":"index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"key","t":4,"rt":$n[0].Object,"sn":"key"},{"a":1,"n":"sortedList","t":4,"rt":$n[6].SortedList,"sn":"sortedList"},{"a":1,"n":"startIndex","t":4,"rt":$n[0].Int32,"sn":"startIndex","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"value","t":4,"rt":$n[0].Object,"sn":"value"},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.SortedList.KeyList", function () { return {"td":$n[6].SortedList,"att":1056771,"a":1,"at":[new System.SerializableAttribute()],"m":[{"a":4,"n":".ctor","t":1,"p":[$n[6].SortedList],"pi":[{"n":"sortedList","pt":$n[6].SortedList,"ps":0}],"sn":"ctor"},{"v":true,"a":2,"n":"Add","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"add","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"v":true,"a":2,"n":"Contains","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"contains","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[Array,$n[0].Int32]},{"v":true,"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[6].IEnumerator},{"v":true,"a":2,"n":"IndexOf","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"indexOf","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"insert","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Object]},{"v":true,"a":2,"n":"Remove","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"remove","rt":$n[0].Void,"p":[$n[0].Object]},{"v":true,"a":2,"n":"RemoveAt","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"removeAt","rt":$n[0].Void,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"v":true,"a":2,"n":"IsFixedSize","t":16,"rt":$n[0].Boolean,"g":{"v":true,"a":2,"n":"get_IsFixedSize","t":8,"rt":$n[0].Boolean,"fg":"IsFixedSize","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsFixedSize"},{"v":true,"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"v":true,"a":2,"n":"get_IsReadOnly","t":8,"rt":$n[0].Boolean,"fg":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReadOnly"},{"v":true,"a":2,"n":"IsSynchronized","t":16,"rt":$n[0].Boolean,"g":{"v":true,"a":2,"n":"get_IsSynchronized","t":8,"rt":$n[0].Boolean,"fg":"IsSynchronized","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsSynchronized"},{"v":true,"a":2,"n":"Item","t":16,"rt":$n[0].Object,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"v":true,"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"getItem","rt":$n[0].Object,"p":[$n[0].Int32]},"s":{"v":true,"a":2,"n":"set_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"setItem","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Object]}},{"v":true,"a":2,"n":"SyncRoot","t":16,"rt":$n[0].Object,"g":{"v":true,"a":2,"n":"get_SyncRoot","t":8,"rt":$n[0].Object,"fg":"SyncRoot"},"fn":"SyncRoot"},{"a":1,"n":"sortedList","t":4,"rt":$n[6].SortedList,"sn":"sortedList"}]}; }, $n); - $m("System.Collections.SortedList.ValueList", function () { return {"td":$n[6].SortedList,"att":1048579,"a":1,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[6].SortedList],"pi":[{"n":"sortedList","pt":$n[6].SortedList,"ps":0}],"sn":"ctor"},{"v":true,"a":2,"n":"Add","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"add","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"v":true,"a":2,"n":"Contains","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"contains","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[Array,$n[0].Int32]},{"v":true,"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[6].IEnumerator},{"v":true,"a":2,"n":"IndexOf","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"indexOf","rt":$n[0].Int32,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"insert","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Object]},{"v":true,"a":2,"n":"Remove","t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"remove","rt":$n[0].Void,"p":[$n[0].Object]},{"v":true,"a":2,"n":"RemoveAt","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"removeAt","rt":$n[0].Void,"p":[$n[0].Int32]},{"v":true,"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"v":true,"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"v":true,"a":2,"n":"IsFixedSize","t":16,"rt":$n[0].Boolean,"g":{"v":true,"a":2,"n":"get_IsFixedSize","t":8,"rt":$n[0].Boolean,"fg":"IsFixedSize","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsFixedSize"},{"v":true,"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"v":true,"a":2,"n":"get_IsReadOnly","t":8,"rt":$n[0].Boolean,"fg":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReadOnly"},{"v":true,"a":2,"n":"IsSynchronized","t":16,"rt":$n[0].Boolean,"g":{"v":true,"a":2,"n":"get_IsSynchronized","t":8,"rt":$n[0].Boolean,"fg":"IsSynchronized","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsSynchronized"},{"v":true,"a":2,"n":"Item","t":16,"rt":$n[0].Object,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"v":true,"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"getItem","rt":$n[0].Object,"p":[$n[0].Int32]},"s":{"v":true,"a":2,"n":"set_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"setItem","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Object]}},{"v":true,"a":2,"n":"SyncRoot","t":16,"rt":$n[0].Object,"g":{"v":true,"a":2,"n":"get_SyncRoot","t":8,"rt":$n[0].Object,"fg":"SyncRoot"},"fn":"SyncRoot"},{"a":1,"n":"sortedList","t":4,"rt":$n[6].SortedList,"sn":"sortedList"}]}; }, $n); - $m("System.Collections.SortedList.SortedListDebugView", function () { return {"td":$n[6].SortedList,"att":1048581,"a":4,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[6].SortedList],"pi":[{"n":"sortedList","pt":$n[6].SortedList,"ps":0}],"sn":"ctor"},{"a":2,"n":"Items","t":16,"rt":System.Array.type(System.Collections.KeyValuePairs),"g":{"a":2,"n":"get_Items","t":8,"rt":System.Array.type(System.Collections.KeyValuePairs),"fg":"Items"},"fn":"Items"},{"a":1,"n":"sortedList","t":4,"rt":$n[6].SortedList,"sn":"sortedList"}]}; }, $n); - $m("System.Collections.ObjectModel.Collection$1", function (T) { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IList$1(T)],"pi":[{"n":"list","pt":$n[3].IList$1(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":"Add","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"add","rt":$n[0].Void,"p":[T]},{"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"v":true,"a":3,"n":"ClearItems","t":8,"sn":"ClearItems","rt":$n[0].Void},{"a":2,"n":"Contains","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"contains","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[System.Array.type(T),$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].IEnumerator$1(T)},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"indexOf","rt":$n[0].Int32,"p":[T],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"item","pt":T,"ps":1}],"sn":"insert","rt":$n[0].Void,"p":[$n[0].Int32,T]},{"v":true,"a":3,"n":"InsertItem","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"item","pt":T,"ps":1}],"sn":"InsertItem","rt":$n[0].Void,"p":[$n[0].Int32,T]},{"a":1,"n":"IsCompatibleObject","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"IsCompatibleObject","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Remove","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"remove","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"RemoveAt","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"removeAt","rt":$n[0].Void,"p":[$n[0].Int32]},{"v":true,"a":3,"n":"RemoveItem","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"RemoveItem","rt":$n[0].Void,"p":[$n[0].Int32]},{"v":true,"a":3,"n":"SetItem","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"item","pt":T,"ps":1}],"sn":"SetItem","rt":$n[0].Void,"p":[$n[0].Int32,T]},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":2,"n":"Item","t":16,"rt":T,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"getItem","rt":T,"p":[$n[0].Int32]},"s":{"a":2,"n":"set_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":T,"ps":1}],"sn":"setItem","rt":$n[0].Void,"p":[$n[0].Int32,T]}},{"a":3,"n":"Items","t":16,"rt":$n[3].IList$1(T),"g":{"a":3,"n":"get_Items","t":8,"rt":$n[3].IList$1(T),"fg":"Items"},"fn":"Items"},{"a":1,"n":"_syncRoot","t":4,"rt":$n[0].Object,"sn":"_syncRoot"},{"a":1,"n":"items","t":4,"rt":$n[3].IList$1(T),"sn":"items"}]}; }, $n); - $m("System.Collections.ObjectModel.ReadOnlyCollection$1", function (T) { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[3].IList$1(T)],"pi":[{"n":"list","pt":$n[3].IList$1(T),"ps":0}],"sn":"ctor"},{"a":2,"n":"Contains","t":8,"pi":[{"n":"value","pt":T,"ps":0}],"sn":"contains","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[System.Array.type(T),$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].IEnumerator$1(T)},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"value","pt":T,"ps":0}],"sn":"indexOf","rt":$n[0].Int32,"p":[T],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"IsCompatibleObject","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"IsCompatibleObject","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":2,"n":"Item","t":16,"rt":T,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"getItem","rt":T,"p":[$n[0].Int32]}},{"a":3,"n":"Items","t":16,"rt":$n[3].IList$1(T),"g":{"a":3,"n":"get_Items","t":8,"rt":$n[3].IList$1(T),"fg":"Items"},"fn":"Items"},{"a":1,"n":"list","t":4,"rt":$n[3].IList$1(T),"sn":"list"}]}; }, $n); - $m("System.Collections.ObjectModel.ReadOnlyDictionary$2", function (TKey, TValue) { return {"nested":[$n[5].ReadOnlyDictionary$2.DictionaryEnumerator,$n[5].ReadOnlyDictionary$2.KeyCollection,$n[5].ReadOnlyDictionary$2.ValueCollection],"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[3].IDictionary$2(TKey,TValue)],"pi":[{"n":"dictionary","pt":$n[3].IDictionary$2(TKey,TValue),"ps":0}],"sn":"ctor"},{"a":2,"n":"ContainsKey","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"containsKey","rt":$n[0].Boolean,"p":[TKey],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].IEnumerator$1(System.Collections.Generic.KeyValuePair$2(TKey,TValue))},{"a":1,"n":"IsCompatibleKey","is":true,"t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"IsCompatibleKey","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryGetValue","t":8,"pi":[{"n":"key","pt":TKey,"ps":0},{"n":"value","out":true,"pt":TValue,"ps":1}],"sn":"tryGetValue","rt":$n[0].Boolean,"p":[TKey,TValue],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":3,"n":"Dictionary","t":16,"rt":$n[3].IDictionary$2(TKey,TValue),"g":{"a":3,"n":"get_Dictionary","t":8,"rt":$n[3].IDictionary$2(TKey,TValue),"fg":"Dictionary"},"fn":"Dictionary"},{"a":2,"n":"Item","t":16,"rt":TValue,"p":[TKey],"i":true,"ipi":[{"n":"key","pt":TKey,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"getItem","rt":TValue,"p":[TKey]}},{"a":2,"n":"Keys","t":16,"rt":$n[5].ReadOnlyDictionary$2.KeyCollection(TKey,TValue),"g":{"a":2,"n":"get_Keys","t":8,"rt":$n[5].ReadOnlyDictionary$2.KeyCollection(TKey,TValue),"fg":"Keys"},"fn":"Keys"},{"a":2,"n":"Values","t":16,"rt":$n[5].ReadOnlyDictionary$2.ValueCollection(TKey,TValue),"g":{"a":2,"n":"get_Values","t":8,"rt":$n[5].ReadOnlyDictionary$2.ValueCollection(TKey,TValue),"fg":"Values"},"fn":"Values"},{"a":1,"n":"NotSupported_ReadOnlyCollection","is":true,"t":4,"rt":$n[0].String,"sn":"NotSupported_ReadOnlyCollection"},{"a":1,"n":"_keys","t":4,"rt":$n[5].ReadOnlyDictionary$2.KeyCollection(TKey,TValue),"sn":"_keys"},{"a":1,"n":"_values","t":4,"rt":$n[5].ReadOnlyDictionary$2.ValueCollection(TKey,TValue),"sn":"_values"},{"a":1,"n":"m_dictionary","t":4,"rt":$n[3].IDictionary$2(TKey,TValue),"sn":"m_dictionary","ro":true}]}; }, $n); - $m("System.Collections.ObjectModel.ReadOnlyDictionary$2.DictionaryEnumerator", function (TKey, TValue) { return {"td":$n[5].ReadOnlyDictionary$2(TKey,TValue),"att":1048843,"a":1,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IDictionary$2(TKey,TValue)],"pi":[{"n":"dictionary","pt":$n[3].IDictionary$2(TKey,TValue),"ps":0}],"sn":"$ctor1"},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Reset","t":8,"sn":"reset","rt":$n[0].Void},{"a":2,"n":"Current","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_Current","t":8,"rt":$n[0].Object,"fg":"Current"},"fn":"Current"},{"a":2,"n":"Entry","t":16,"rt":$n[6].DictionaryEntry,"g":{"a":2,"n":"get_Entry","t":8,"rt":$n[6].DictionaryEntry,"fg":"Entry"},"fn":"Entry"},{"a":2,"n":"Key","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_Key","t":8,"rt":$n[0].Object,"fg":"Key"},"fn":"Key"},{"a":2,"n":"Value","t":16,"rt":$n[0].Object,"g":{"a":2,"n":"get_Value","t":8,"rt":$n[0].Object,"fg":"Value"},"fn":"Value"},{"a":1,"n":"_dictionary","t":4,"rt":$n[3].IDictionary$2(TKey,TValue),"sn":"_dictionary","ro":true},{"a":1,"n":"_enumerator","t":4,"rt":$n[3].IEnumerator$1(System.Collections.Generic.KeyValuePair$2(TKey,TValue)),"sn":"_enumerator"}]}; }, $n); - $m("System.Collections.ObjectModel.ReadOnlyDictionary$2.KeyCollection", function (TKey, TValue) { return {"td":$n[5].ReadOnlyDictionary$2(TKey,TValue),"att":1048834,"a":2,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[3].ICollection$1(TKey)],"pi":[{"n":"collection","pt":$n[3].ICollection$1(TKey),"ps":0}],"sn":"ctor"},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(TKey),"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[System.Array.type(TKey),$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].IEnumerator$1(TKey)},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":1,"n":"_collection","t":4,"rt":$n[3].ICollection$1(TKey),"sn":"_collection","ro":true}]}; }, $n); - $m("System.Collections.ObjectModel.ReadOnlyDictionary$2.ValueCollection", function (TKey, TValue) { return {"td":$n[5].ReadOnlyDictionary$2(TKey,TValue),"att":1048834,"a":2,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[3].ICollection$1(TValue)],"pi":[{"n":"collection","pt":$n[3].ICollection$1(TValue),"ps":0}],"sn":"ctor"},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(TValue),"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[System.Array.type(TValue),$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].IEnumerator$1(TValue)},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":1,"n":"_collection","t":4,"rt":$n[3].ICollection$1(TValue),"sn":"_collection","ro":true}]}; }, $n); - $m("System.Collections.ObjectModel.ReadOnlyDictionaryHelpers", function () { return {"att":1048960,"a":4,"s":true,"m":[{"a":4,"n":"CopyToNonGenericICollectionHelper","is":true,"t":8,"pi":[{"n":"collection","pt":$n[3].ICollection$1(System.Object),"ps":0},{"n":"array","pt":Array,"ps":1},{"n":"index","pt":$n[0].Int32,"ps":2}],"tpc":1,"tprm":["T"],"sn":"CopyToNonGenericICollectionHelper","rt":$n[0].Void,"p":[$n[3].ICollection$1(System.Object),Array,$n[0].Int32]}]}; }, $n); - $m("System.Collections.Generic.BitHelper", function () { return {"att":1048832,"a":4,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[0].Array.type(System.Int32),$n[0].Int32],"pi":[{"n":"bitArray","pt":$n[0].Array.type(System.Int32),"ps":0},{"n":"length","pt":$n[0].Int32,"ps":1}],"sn":"ctor"},{"a":4,"n":"IsMarked","t":8,"pi":[{"n":"bitPosition","pt":$n[0].Int32,"ps":0}],"sn":"IsMarked","rt":$n[0].Boolean,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":4,"n":"MarkBit","t":8,"pi":[{"n":"bitPosition","pt":$n[0].Int32,"ps":0}],"sn":"MarkBit","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":4,"n":"ToIntArrayLength","is":true,"t":8,"pi":[{"n":"n","pt":$n[0].Int32,"ps":0}],"sn":"ToIntArrayLength","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"IntSize","is":true,"t":4,"rt":$n[0].Byte,"sn":"IntSize","box":function ($v) { return H5.box($v, System.Byte);}},{"a":1,"n":"MarkedBitFlag","is":true,"t":4,"rt":$n[0].Byte,"sn":"MarkedBitFlag","box":function ($v) { return H5.box($v, System.Byte);}},{"a":1,"n":"_array","t":4,"rt":$n[0].Array.type(System.Int32),"sn":"_array","ro":true},{"a":1,"n":"_length","t":4,"rt":$n[0].Int32,"sn":"_length","ro":true,"box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.HashSet$1", function (T) { return {"nested":[$n[3].HashSet$1.ElementCount,$n[3].HashSet$1.Slot,$n[3].HashSet$1.Enumerator],"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IEnumerable$1(T)],"pi":[{"n":"collection","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IEqualityComparer$1(T)],"pi":[{"n":"comparer","pt":$n[3].IEqualityComparer$1(T),"ps":0}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IEnumerable$1(T),$n[3].IEqualityComparer$1(T)],"pi":[{"n":"collection","pt":$n[3].IEnumerable$1(T),"ps":0},{"n":"comparer","pt":$n[3].IEqualityComparer$1(T),"ps":1}],"sn":"$ctor2"},{"a":2,"n":"Add","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"add","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"AddIfNotPresent","t":8,"pi":[{"n":"value","pt":T,"ps":0}],"sn":"AddIfNotPresent","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"AddOrGetLocation","t":8,"pi":[{"n":"value","pt":T,"ps":0},{"n":"location","out":true,"pt":$n[0].Int32,"ps":1}],"sn":"AddOrGetLocation","rt":$n[0].Boolean,"p":[T,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"AreEqualityComparersEqual","is":true,"t":8,"pi":[{"n":"set1","pt":$n[3].HashSet$1(T),"ps":0},{"n":"set2","pt":$n[3].HashSet$1(T),"ps":1}],"sn":"AreEqualityComparersEqual","rt":$n[0].Boolean,"p":[$n[3].HashSet$1(T),$n[3].HashSet$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"ArrayClear","t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"length","pt":$n[0].Int32,"ps":2}],"sn":"ArrayClear","rt":$n[0].Void,"p":[Array,$n[0].Int32,$n[0].Int32]},{"a":1,"n":"CheckUniqueAndUnfoundElements","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0},{"n":"returnIfUnfound","pt":$n[0].Boolean,"ps":1}],"sn":"CheckUniqueAndUnfoundElements","rt":$n[3].HashSet$1.ElementCount(T),"p":[$n[3].IEnumerable$1(T),$n[0].Boolean]},{"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"a":2,"n":"Contains","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"contains","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"ContainsAllElements","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"ContainsAllElements","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0}],"sn":"CopyTo","rt":$n[0].Void,"p":[System.Array.type(T)]},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[System.Array.type(T),$n[0].Int32]},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"CopyTo$1","rt":$n[0].Void,"p":[System.Array.type(T),$n[0].Int32,$n[0].Int32]},{"a":2,"n":"ExceptWith","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"exceptWith","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].HashSet$1.Enumerator(T)},{"a":4,"n":"HashSetEquals","is":true,"t":8,"pi":[{"n":"set1","pt":$n[3].HashSet$1(T),"ps":0},{"n":"set2","pt":$n[3].HashSet$1(T),"ps":1},{"n":"comparer","pt":$n[3].IEqualityComparer$1(T),"ps":2}],"sn":"HashSetEquals","rt":$n[0].Boolean,"p":[$n[3].HashSet$1(T),$n[3].HashSet$1(T),$n[3].IEqualityComparer$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"IncreaseCapacity","t":8,"sn":"IncreaseCapacity","rt":$n[0].Void},{"a":1,"n":"Initialize","t":8,"pi":[{"n":"capacity","pt":$n[0].Int32,"ps":0}],"sn":"Initialize","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":1,"n":"InternalGetHashCode","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"InternalGetHashCode","rt":$n[0].Int32,"p":[T],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"InternalIndexOf","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"InternalIndexOf","rt":$n[0].Int32,"p":[T],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IntersectWith","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"intersectWith","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"a":1,"n":"IntersectWithEnumerable","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"IntersectWithEnumerable","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"a":1,"n":"IntersectWithHashSetWithSameEC","t":8,"pi":[{"n":"other","pt":$n[3].HashSet$1(T),"ps":0}],"sn":"IntersectWithHashSetWithSameEC","rt":$n[0].Void,"p":[$n[3].HashSet$1(T)]},{"a":2,"n":"IsProperSubsetOf","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"isProperSubsetOf","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsProperSupersetOf","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"isProperSupersetOf","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsSubsetOf","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"isSubsetOf","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"IsSubsetOfHashSetWithSameEC","t":8,"pi":[{"n":"other","pt":$n[3].HashSet$1(T),"ps":0}],"sn":"IsSubsetOfHashSetWithSameEC","rt":$n[0].Boolean,"p":[$n[3].HashSet$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsSupersetOf","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"isSupersetOf","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Overlaps","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"overlaps","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Remove","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"remove","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"RemoveWhere","t":8,"pi":[{"n":"match","pt":Function,"ps":0}],"sn":"RemoveWhere","rt":$n[0].Int32,"p":[Function],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"SetCapacity","t":8,"pi":[{"n":"newSize","pt":$n[0].Int32,"ps":0},{"n":"forceNewHashCodes","pt":$n[0].Boolean,"ps":1}],"sn":"SetCapacity","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Boolean]},{"a":2,"n":"SetEquals","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"setEquals","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"SymmetricExceptWith","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"symmetricExceptWith","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"a":1,"n":"SymmetricExceptWithEnumerable","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"SymmetricExceptWithEnumerable","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"a":1,"n":"SymmetricExceptWithUniqueHashSet","t":8,"pi":[{"n":"other","pt":$n[3].HashSet$1(T),"ps":0}],"sn":"SymmetricExceptWithUniqueHashSet","rt":$n[0].Void,"p":[$n[3].HashSet$1(T)]},{"a":4,"n":"ToArray","t":8,"sn":"ToArray","rt":System.Array.type(T)},{"a":2,"n":"TrimExcess","t":8,"sn":"TrimExcess","rt":$n[0].Void},{"a":2,"n":"UnionWith","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"unionWith","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"a":2,"n":"Comparer","t":16,"rt":$n[3].IEqualityComparer$1(T),"g":{"a":2,"n":"get_Comparer","t":8,"rt":$n[3].IEqualityComparer$1(T),"fg":"Comparer"},"fn":"Comparer"},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReadOnly","t":8,"rt":$n[0].Boolean,"fg":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReadOnly"},{"a":1,"n":"Lower31BitMask","is":true,"t":4,"rt":$n[0].Int32,"sn":"Lower31BitMask","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"ShrinkThreshold","is":true,"t":4,"rt":$n[0].Int32,"sn":"ShrinkThreshold","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_buckets","t":4,"rt":$n[0].Array.type(System.Int32),"sn":"_buckets"},{"a":1,"n":"_comparer","t":4,"rt":$n[3].IEqualityComparer$1(T),"sn":"_comparer"},{"a":1,"n":"_count","t":4,"rt":$n[0].Int32,"sn":"_count","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_freeList","t":4,"rt":$n[0].Int32,"sn":"_freeList","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_lastIndex","t":4,"rt":$n[0].Int32,"sn":"_lastIndex","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_slots","t":4,"rt":System.Array.type(System.Collections.Generic.HashSet$1.Slot(T)),"sn":"_slots"},{"a":1,"n":"_version","t":4,"rt":$n[0].Int32,"sn":"_version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.HashSet$1.ElementCount", function (T) { return {"td":$n[3].HashSet$1(T),"att":1048845,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":"unfoundCount","t":4,"rt":$n[0].Int32,"sn":"unfoundCount","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"uniqueCount","t":4,"rt":$n[0].Int32,"sn":"uniqueCount","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.HashSet$1.Slot", function (T) { return {"td":$n[3].HashSet$1(T),"att":1048845,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":"hashCode","t":4,"rt":$n[0].Int32,"sn":"hashCode","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"next","t":4,"rt":$n[0].Int32,"sn":"next","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"value","t":4,"rt":T,"sn":"value"}]}; }, $n); - $m("System.Collections.Generic.HashSet$1.Enumerator", function (T) { return {"td":$n[3].HashSet$1(T),"att":1048842,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":".ctor","t":1,"p":[$n[3].HashSet$1(T)],"pi":[{"n":"set","pt":$n[3].HashSet$1(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Current","t":16,"rt":T,"g":{"a":2,"n":"get_Current","t":8,"rt":T,"fg":"Current"},"fn":"Current"},{"a":1,"n":"_current","t":4,"rt":T,"sn":"_current"},{"a":1,"n":"_index","t":4,"rt":$n[0].Int32,"sn":"_index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_set","t":4,"rt":$n[3].HashSet$1(T),"sn":"_set"},{"a":1,"n":"_version","t":4,"rt":$n[0].Int32,"sn":"_version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.ICollectionDebugView$1", function (T) { return {"att":1048832,"a":4,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[3].ICollection$1(T)],"pi":[{"n":"collection","pt":$n[3].ICollection$1(T),"ps":0}],"sn":"ctor"},{"a":2,"n":"Items","t":16,"rt":System.Array.type(T),"g":{"a":2,"n":"get_Items","t":8,"rt":System.Array.type(T),"fg":"Items"},"fn":"Items"},{"a":1,"n":"_collection","t":4,"rt":$n[3].ICollection$1(T),"sn":"_collection","ro":true}]}; }, $n); - $m("System.Collections.Generic.IComparer$1", function (T) { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Compare","t":8,"pi":[{"n":"x","pt":T,"ps":0},{"n":"y","pt":T,"ps":1}],"sn":"System$Collections$Generic$IComparer$1$" + H5.getTypeAlias(T) + "$compare","rt":$n[0].Int32,"p":[T,T],"box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.IDictionaryDebugView$2", function (K, V) { return {"att":1048832,"a":4,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[3].IDictionary$2(K,V)],"pi":[{"n":"dictionary","pt":$n[3].IDictionary$2(K,V),"ps":0}],"sn":"ctor"},{"a":2,"n":"Items","t":16,"rt":System.Array.type(System.Collections.Generic.KeyValuePair$2(K,V)),"g":{"a":2,"n":"get_Items","t":8,"rt":System.Array.type(System.Collections.Generic.KeyValuePair$2(K,V)),"fg":"Items"},"fn":"Items"},{"a":1,"n":"_dict","t":4,"rt":$n[3].IDictionary$2(K,V),"sn":"_dict","ro":true}]}; }, $n); - $m("System.Collections.Generic.DictionaryKeyCollectionDebugView$2", function (TKey, TValue) { return {"att":1048832,"a":4,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[3].ICollection$1(TKey)],"pi":[{"n":"collection","pt":$n[3].ICollection$1(TKey),"ps":0}],"sn":"ctor"},{"a":2,"n":"Items","t":16,"rt":System.Array.type(TKey),"g":{"a":2,"n":"get_Items","t":8,"rt":System.Array.type(TKey),"fg":"Items"},"fn":"Items"},{"a":1,"n":"_collection","t":4,"rt":$n[3].ICollection$1(TKey),"sn":"_collection","ro":true}]}; }, $n); - $m("System.Collections.Generic.DictionaryValueCollectionDebugView$2", function (TKey, TValue) { return {"att":1048832,"a":4,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[3].ICollection$1(TValue)],"pi":[{"n":"collection","pt":$n[3].ICollection$1(TValue),"ps":0}],"sn":"ctor"},{"a":2,"n":"Items","t":16,"rt":System.Array.type(TValue),"g":{"a":2,"n":"get_Items","t":8,"rt":System.Array.type(TValue),"fg":"Items"},"fn":"Items"},{"a":1,"n":"_collection","t":4,"rt":$n[3].ICollection$1(TValue),"sn":"_collection","ro":true}]}; }, $n); - $m("System.Collections.Generic.IEnumerator$1", function (T) { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Current","t":16,"rt":T,"g":{"ab":true,"a":2,"n":"get_Current","t":8,"rt":T,"fg":"\"System$Collections$Generic$IEnumerator$1$\" + H5.getTypeAlias(T) + \"$Current$1\""},"fn":"\"System$Collections$Generic$IEnumerator$1$\" + H5.getTypeAlias(T) + \"$Current$1\""},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T,"sn":"\"System$Collections$Generic$IEnumerator$1$\" + H5.getTypeAlias(T) + \"$Current$1\""}]}; }, $n); - $m("System.Collections.Generic.KeyNotFoundException", function () { return {"att":1056769,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].String,$n[0].Exception],"pi":[{"n":"message","pt":$n[0].String,"ps":0},{"n":"innerException","pt":$n[0].Exception,"ps":1}],"sn":"$ctor2"}]}; }, $n); - $m("System.Collections.Generic.KeyValuePair$2", function (TKey, TValue) { return {"att":1057033,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[TKey,TValue],"pi":[{"n":"key","pt":TKey,"ps":0},{"n":"value","pt":TValue,"ps":1}],"sn":"$ctor1"},{"a":2,"n":"Deconstruct","t":8,"pi":[{"n":"key","out":true,"pt":TKey,"ps":0},{"n":"value","out":true,"pt":TValue,"ps":1}],"sn":"Deconstruct","rt":$n[0].Void,"p":[TKey,TValue]},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"a":2,"n":"Key","t":16,"rt":TKey,"g":{"a":2,"n":"get_Key","t":8,"rt":TKey,"fg":"key"},"fn":"key"},{"a":2,"n":"Value","t":16,"rt":TValue,"g":{"a":2,"n":"get_Value","t":8,"rt":TValue,"fg":"value"},"fn":"value"},{"a":1,"n":"key","t":4,"rt":TKey,"sn":"key$1"},{"a":1,"n":"value","t":4,"rt":TValue,"sn":"value$1"}]}; }, $n); - $m("System.Collections.Generic.List$1", function (T) { return {"nested":[$n[3].List$1.Enumerator],"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IEnumerable$1(T)],"pi":[{"n":"collection","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"capacity","pt":$n[0].Int32,"ps":0}],"sn":"$ctor2"},{"a":2,"n":"Add","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"add","rt":$n[0].Void,"p":[T]},{"a":2,"n":"AddRange","t":8,"pi":[{"n":"collection","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"AddRange","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"a":2,"n":"AsReadOnly","t":8,"sn":"AsReadOnly","rt":$n[5].ReadOnlyCollection$1(T)},{"a":2,"n":"BinarySearch","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"BinarySearch","rt":$n[0].Int32,"p":[T],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"BinarySearch","t":8,"pi":[{"n":"item","pt":T,"ps":0},{"n":"comparer","pt":$n[3].IComparer$1(T),"ps":1}],"sn":"BinarySearch$1","rt":$n[0].Int32,"p":[T,$n[3].IComparer$1(T)],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"BinarySearch","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1},{"n":"item","pt":T,"ps":2},{"n":"comparer","pt":$n[3].IComparer$1(T),"ps":3}],"sn":"BinarySearch$2","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32,T,$n[3].IComparer$1(T)],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"a":2,"n":"Contains","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"contains","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"ConvertAll","t":8,"pi":[{"n":"converter","pt":Function,"ps":0}],"tpc":1,"tprm":["TOutput"],"sn":"ConvertAll","rt":$n[3].List$1(System.Object),"p":[Function]},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0}],"sn":"CopyTo","rt":$n[0].Void,"p":[System.Array.type(T)]},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[System.Array.type(T),$n[0].Int32]},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"array","pt":System.Array.type(T),"ps":1},{"n":"arrayIndex","pt":$n[0].Int32,"ps":2},{"n":"count","pt":$n[0].Int32,"ps":3}],"sn":"CopyTo$1","rt":$n[0].Void,"p":[$n[0].Int32,System.Array.type(T),$n[0].Int32,$n[0].Int32]},{"a":1,"n":"EnsureCapacity","t":8,"pi":[{"n":"min","pt":$n[0].Int32,"ps":0}],"sn":"EnsureCapacity","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":2,"n":"Exists","t":8,"pi":[{"n":"match","pt":Function,"ps":0}],"sn":"Exists","rt":$n[0].Boolean,"p":[Function],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Find","t":8,"pi":[{"n":"match","pt":Function,"ps":0}],"sn":"Find","rt":T,"p":[Function]},{"a":2,"n":"FindAll","t":8,"pi":[{"n":"match","pt":Function,"ps":0}],"sn":"FindAll","rt":$n[3].List$1(T),"p":[Function]},{"a":2,"n":"FindIndex","t":8,"pi":[{"n":"match","pt":Function,"ps":0}],"sn":"FindIndex$2","rt":$n[0].Int32,"p":[Function],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"FindIndex","t":8,"pi":[{"n":"startIndex","pt":$n[0].Int32,"ps":0},{"n":"match","pt":Function,"ps":1}],"sn":"FindIndex$1","rt":$n[0].Int32,"p":[$n[0].Int32,Function],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"FindIndex","t":8,"pi":[{"n":"startIndex","pt":$n[0].Int32,"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1},{"n":"match","pt":Function,"ps":2}],"sn":"FindIndex","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32,Function],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"FindLast","t":8,"pi":[{"n":"match","pt":Function,"ps":0}],"sn":"FindLast","rt":T,"p":[Function]},{"a":2,"n":"FindLastIndex","t":8,"pi":[{"n":"match","pt":Function,"ps":0}],"sn":"FindLastIndex$2","rt":$n[0].Int32,"p":[Function],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"FindLastIndex","t":8,"pi":[{"n":"startIndex","pt":$n[0].Int32,"ps":0},{"n":"match","pt":Function,"ps":1}],"sn":"FindLastIndex$1","rt":$n[0].Int32,"p":[$n[0].Int32,Function],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"FindLastIndex","t":8,"pi":[{"n":"startIndex","pt":$n[0].Int32,"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1},{"n":"match","pt":Function,"ps":2}],"sn":"FindLastIndex","rt":$n[0].Int32,"p":[$n[0].Int32,$n[0].Int32,Function],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"ForEach","t":8,"pi":[{"n":"action","pt":Function,"ps":0}],"sn":"ForEach","rt":$n[0].Void,"p":[Function]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].List$1.Enumerator(T)},{"a":2,"n":"GetRange","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1}],"sn":"GetRange","rt":$n[3].List$1(T),"p":[$n[0].Int32,$n[0].Int32]},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"indexOf","rt":$n[0].Int32,"p":[T],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"item","pt":T,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"sn":"IndexOf","rt":$n[0].Int32,"p":[T,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"item","pt":T,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"IndexOf$1","rt":$n[0].Int32,"p":[T,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"item","pt":T,"ps":1}],"sn":"insert","rt":$n[0].Void,"p":[$n[0].Int32,T]},{"a":2,"n":"InsertRange","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"collection","pt":$n[3].IEnumerable$1(T),"ps":1}],"sn":"InsertRange","rt":$n[0].Void,"p":[$n[0].Int32,$n[3].IEnumerable$1(T)]},{"a":1,"n":"IsCompatibleObject","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Object,"ps":0}],"sn":"IsCompatibleObject","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"LastIndexOf","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"LastIndexOf","rt":$n[0].Int32,"p":[T],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"LastIndexOf","t":8,"pi":[{"n":"item","pt":T,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"sn":"LastIndexOf$1","rt":$n[0].Int32,"p":[T,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"LastIndexOf","t":8,"pi":[{"n":"item","pt":T,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"LastIndexOf$2","rt":$n[0].Int32,"p":[T,$n[0].Int32,$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Remove","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"remove","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"RemoveAll","t":8,"pi":[{"n":"match","pt":Function,"ps":0}],"sn":"RemoveAll","rt":$n[0].Int32,"p":[Function],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"RemoveAt","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"removeAt","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":2,"n":"RemoveRange","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1}],"sn":"RemoveRange","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Reverse","t":8,"sn":"Reverse","rt":$n[0].Void},{"a":2,"n":"Reverse","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1}],"sn":"Reverse$1","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Int32]},{"a":2,"n":"Sort","t":8,"sn":"Sort","rt":$n[0].Void},{"a":2,"n":"Sort","t":8,"pi":[{"n":"comparer","pt":$n[3].IComparer$1(T),"ps":0}],"sn":"Sort$1","rt":$n[0].Void,"p":[$n[3].IComparer$1(T)]},{"a":2,"n":"Sort","t":8,"pi":[{"n":"comparison","pt":Function,"ps":0}],"sn":"Sort$2","rt":$n[0].Void,"p":[Function]},{"a":2,"n":"Sort","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"count","pt":$n[0].Int32,"ps":1},{"n":"comparer","pt":$n[3].IComparer$1(T),"ps":2}],"sn":"Sort$3","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Int32,$n[3].IComparer$1(T)]},{"a":2,"n":"ToArray","t":8,"sn":"ToArray","rt":System.Array.type(T)},{"a":2,"n":"TrimExcess","t":8,"sn":"TrimExcess","rt":$n[0].Void},{"a":2,"n":"TrueForAll","t":8,"pi":[{"n":"match","pt":Function,"ps":0}],"sn":"TrueForAll","rt":$n[0].Boolean,"p":[Function],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"toJSON","t":8,"sn":"toJSON","rt":$n[0].Object},{"a":2,"n":"Capacity","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Capacity","t":8,"rt":$n[0].Int32,"fg":"Capacity","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_Capacity","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"Capacity"},"fn":"Capacity"},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":2,"n":"Item","t":16,"rt":T,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"getItem","rt":T,"p":[$n[0].Int32]},"s":{"a":2,"n":"set_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":T,"ps":1}],"sn":"setItem","rt":$n[0].Void,"p":[$n[0].Int32,T]}},{"a":1,"n":"_defaultCapacity","is":true,"t":4,"rt":$n[0].Int32,"sn":"_defaultCapacity","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_emptyArray","is":true,"t":4,"rt":System.Array.type(T),"sn":"_emptyArray","ro":true},{"a":1,"n":"_items","t":4,"rt":System.Array.type(T),"sn":"_items"},{"a":1,"n":"_size","t":4,"rt":$n[0].Int32,"sn":"_size","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_version","t":4,"rt":$n[0].Int32,"sn":"_version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.List$1.Enumerator", function (T) { return {"td":$n[3].List$1(T),"att":1057034,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":".ctor","t":1,"p":[$n[3].List$1(T)],"pi":[{"n":"list","pt":$n[3].List$1(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"MoveNextRare","t":8,"sn":"MoveNextRare","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Current","t":16,"rt":T,"g":{"a":2,"n":"get_Current","t":8,"rt":T,"fg":"Current"},"fn":"Current"},{"a":1,"n":"current","t":4,"rt":T,"sn":"current"},{"a":1,"n":"index","t":4,"rt":$n[0].Int32,"sn":"index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"list","t":4,"rt":$n[3].List$1(T),"sn":"list"},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.Queue$1", function (T) { return {"nested":[$n[3].Queue$1.Enumerator],"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IEnumerable$1(T)],"pi":[{"n":"collection","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"capacity","pt":$n[0].Int32,"ps":0}],"sn":"$ctor2"},{"a":2,"n":"Clear","t":8,"sn":"Clear","rt":$n[0].Void},{"a":2,"n":"Contains","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"Contains","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[Array,$n[0].Int32]},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"CopyTo","rt":$n[0].Void,"p":[System.Array.type(T),$n[0].Int32]},{"a":2,"n":"Dequeue","t":8,"sn":"Dequeue","rt":T},{"a":2,"n":"Enqueue","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"Enqueue","rt":$n[0].Void,"p":[T]},{"a":1,"n":"GetElement","t":8,"pi":[{"n":"i","pt":$n[0].Int32,"ps":0}],"sn":"GetElement","rt":T,"p":[$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].Queue$1.Enumerator(T)},{"a":1,"n":"MoveNext","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"MoveNext","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Peek","t":8,"sn":"Peek","rt":T},{"a":1,"n":"SetCapacity","t":8,"pi":[{"n":"capacity","pt":$n[0].Int32,"ps":0}],"sn":"SetCapacity","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":2,"n":"ToArray","t":8,"sn":"ToArray","rt":System.Array.type(T)},{"a":2,"n":"TrimExcess","t":8,"sn":"TrimExcess","rt":$n[0].Void},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReadOnly","t":8,"rt":$n[0].Boolean,"fg":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReadOnly"},{"a":1,"n":"DefaultCapacity","is":true,"t":4,"rt":$n[0].Int32,"sn":"DefaultCapacity","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"GrowFactor","is":true,"t":4,"rt":$n[0].Int32,"sn":"GrowFactor","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"MinimumGrow","is":true,"t":4,"rt":$n[0].Int32,"sn":"MinimumGrow","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_array","t":4,"rt":System.Array.type(T),"sn":"_array"},{"a":1,"n":"_head","t":4,"rt":$n[0].Int32,"sn":"_head","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_size","t":4,"rt":$n[0].Int32,"sn":"_size","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_tail","t":4,"rt":$n[0].Int32,"sn":"_tail","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_version","t":4,"rt":$n[0].Int32,"sn":"_version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.Queue$1.Enumerator", function (T) { return {"td":$n[3].Queue$1(T),"att":1048842,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":".ctor","t":1,"p":[$n[3].Queue$1(T)],"pi":[{"n":"q","pt":$n[3].Queue$1(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Current","t":16,"rt":T,"g":{"a":2,"n":"get_Current","t":8,"rt":T,"fg":"Current"},"fn":"Current"},{"a":1,"n":"_currentElement","t":4,"rt":T,"sn":"_currentElement"},{"a":1,"n":"_index","t":4,"rt":$n[0].Int32,"sn":"_index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_q","t":4,"rt":$n[3].Queue$1(T),"sn":"_q"},{"a":1,"n":"_version","t":4,"rt":$n[0].Int32,"sn":"_version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.Stack$1", function (T) { return {"nested":[$n[3].Stack$1.Enumerator],"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IEnumerable$1(T)],"pi":[{"n":"collection","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"capacity","pt":$n[0].Int32,"ps":0}],"sn":"$ctor2"},{"a":2,"n":"Clear","t":8,"sn":"Clear","rt":$n[0].Void},{"a":2,"n":"Contains","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"Contains","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":Array,"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[Array,$n[0].Int32]},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"CopyTo","rt":$n[0].Void,"p":[System.Array.type(T),$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].Stack$1.Enumerator(T)},{"a":2,"n":"Peek","t":8,"sn":"Peek","rt":T},{"a":2,"n":"Pop","t":8,"sn":"Pop","rt":T},{"a":2,"n":"Push","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"Push","rt":$n[0].Void,"p":[T]},{"a":2,"n":"ToArray","t":8,"sn":"ToArray","rt":System.Array.type(T)},{"a":2,"n":"TrimExcess","t":8,"sn":"TrimExcess","rt":$n[0].Void},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReadOnly","t":8,"rt":$n[0].Boolean,"fg":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReadOnly"},{"a":1,"n":"DefaultCapacity","is":true,"t":4,"rt":$n[0].Int32,"sn":"DefaultCapacity","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_array","t":4,"rt":System.Array.type(T),"sn":"_array"},{"a":1,"n":"_size","t":4,"rt":$n[0].Int32,"sn":"_size","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_version","t":4,"rt":$n[0].Int32,"sn":"_version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.Stack$1.Enumerator", function (T) { return {"td":$n[3].Stack$1(T),"att":1048842,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":".ctor","t":1,"p":[$n[3].Stack$1(T)],"pi":[{"n":"stack","pt":$n[3].Stack$1(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Current","t":16,"rt":T,"g":{"a":2,"n":"get_Current","t":8,"rt":T,"fg":"Current"},"fn":"Current"},{"a":1,"n":"_currentElement","t":4,"rt":T,"sn":"_currentElement"},{"a":1,"n":"_index","t":4,"rt":$n[0].Int32,"sn":"_index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_stack","t":4,"rt":$n[3].Stack$1(T),"sn":"_stack"},{"a":1,"n":"_version","t":4,"rt":$n[0].Int32,"sn":"_version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.Dictionary$2", function (TKey, TValue) { return {"nested":[$n[3].Dictionary$2.Entry,$n[3].Dictionary$2.Enumerator,$n[3].Dictionary$2.KeyCollection,$n[3].Dictionary$2.ValueCollection],"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IDictionary$2(TKey,TValue)],"pi":[{"n":"dictionary","pt":$n[3].IDictionary$2(TKey,TValue),"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IEqualityComparer$1(TKey)],"pi":[{"n":"comparer","pt":$n[3].IEqualityComparer$1(TKey),"ps":0}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"capacity","pt":$n[0].Int32,"ps":0}],"sn":"$ctor4"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IDictionary$2(TKey,TValue),$n[3].IEqualityComparer$1(TKey)],"pi":[{"n":"dictionary","pt":$n[3].IDictionary$2(TKey,TValue),"ps":0},{"n":"comparer","pt":$n[3].IEqualityComparer$1(TKey),"ps":1}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[3].IEqualityComparer$1(TKey)],"pi":[{"n":"capacity","pt":$n[0].Int32,"ps":0},{"n":"comparer","pt":$n[3].IEqualityComparer$1(TKey),"ps":1}],"sn":"$ctor5"},{"a":2,"n":"Add","t":8,"pi":[{"n":"key","pt":TKey,"ps":0},{"n":"value","pt":TValue,"ps":1}],"sn":"add","rt":$n[0].Void,"p":[TKey,TValue]},{"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"a":2,"n":"ContainsKey","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"containsKey","rt":$n[0].Boolean,"p":[TKey],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"ContainsValue","t":8,"pi":[{"n":"value","pt":TValue,"ps":0}],"sn":"ContainsValue","rt":$n[0].Boolean,"p":[TValue],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(System.Collections.Generic.KeyValuePair$2(TKey,TValue)),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"sn":"CopyTo","rt":$n[0].Void,"p":[System.Array.type(System.Collections.Generic.KeyValuePair$2(TKey,TValue)),$n[0].Int32]},{"a":1,"n":"FindEntry","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"FindEntry","rt":$n[0].Int32,"p":[TKey],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"GetBucket","is":true,"t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0},{"n":"key","pt":TKey,"ps":1}],"tpc":0,"def":function (obj, key) { return obj[key]; },"rt":$n[0].Int32,"p":[$n[0].Object,TKey],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].Dictionary$2.Enumerator(TKey,TValue)},{"a":4,"n":"GetValueOrDefault","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"GetValueOrDefault","rt":TValue,"p":[TKey]},{"a":1,"n":"Initialize","t":8,"pi":[{"n":"capacity","pt":$n[0].Int32,"ps":0}],"sn":"Initialize","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":1,"n":"Insert","t":8,"pi":[{"n":"key","pt":TKey,"ps":0},{"n":"value","pt":TValue,"ps":1},{"n":"add","pt":$n[0].Boolean,"ps":2}],"sn":"Insert","rt":$n[0].Void,"p":[TKey,TValue,$n[0].Boolean]},{"a":1,"n":"IsCompatibleKey","is":true,"t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"IsCompatibleKey","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Remove","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"remove","rt":$n[0].Boolean,"p":[TKey],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"Resize","t":8,"sn":"Resize","rt":$n[0].Void},{"a":1,"n":"Resize","t":8,"pi":[{"n":"newSize","pt":$n[0].Int32,"ps":0},{"n":"forceNewHashCodes","pt":$n[0].Boolean,"ps":1}],"sn":"Resize$1","rt":$n[0].Void,"p":[$n[0].Int32,$n[0].Boolean]},{"a":2,"n":"SetBucket","is":true,"t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0},{"n":"key","pt":TKey,"ps":1},{"n":"value","pt":$n[0].Int32,"ps":2}],"tpc":0,"def":function (obj, key, value) { return obj[key] = value; },"rt":$n[0].Void,"p":[$n[0].Object,TKey,$n[0].Int32]},{"a":2,"n":"TryGetValue","t":8,"pi":[{"n":"key","pt":TKey,"ps":0},{"n":"value","out":true,"pt":TValue,"ps":1}],"sn":"tryGetValue","rt":$n[0].Boolean,"p":[TKey,TValue],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Comparer","t":16,"rt":$n[3].IEqualityComparer$1(TKey),"g":{"a":2,"n":"get_Comparer","t":8,"rt":$n[3].IEqualityComparer$1(TKey),"fg":"Comparer"},"fn":"Comparer"},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":2,"n":"Item","t":16,"rt":TValue,"p":[TKey],"i":true,"ipi":[{"n":"key","pt":TKey,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"getItem","rt":TValue,"p":[TKey]},"s":{"a":2,"n":"set_Item","t":8,"pi":[{"n":"key","pt":TKey,"ps":0},{"n":"value","pt":TValue,"ps":1}],"sn":"setItem","rt":$n[0].Void,"p":[TKey,TValue]}},{"a":2,"n":"Keys","t":16,"rt":$n[3].Dictionary$2.KeyCollection(TKey,TValue),"g":{"a":2,"n":"get_Keys","t":8,"rt":$n[3].Dictionary$2.KeyCollection(TKey,TValue),"fg":"Keys"},"fn":"Keys"},{"a":2,"n":"Values","t":16,"rt":$n[3].Dictionary$2.ValueCollection(TKey,TValue),"g":{"a":2,"n":"get_Values","t":8,"rt":$n[3].Dictionary$2.ValueCollection(TKey,TValue),"fg":"Values"},"fn":"Values"},{"a":1,"n":"ComparerName","is":true,"t":4,"rt":$n[0].String,"sn":"ComparerName"},{"a":1,"n":"HashSizeName","is":true,"t":4,"rt":$n[0].String,"sn":"HashSizeName"},{"a":1,"n":"KeyValuePairsName","is":true,"t":4,"rt":$n[0].String,"sn":"KeyValuePairsName"},{"a":1,"n":"VersionName","is":true,"t":4,"rt":$n[0].String,"sn":"VersionName"},{"a":1,"n":"buckets","t":4,"rt":$n[0].Array.type(System.Int32),"sn":"buckets"},{"a":1,"n":"comparer","t":4,"rt":$n[3].IEqualityComparer$1(TKey),"sn":"comparer"},{"a":1,"n":"count","t":4,"rt":$n[0].Int32,"sn":"count","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"entries","t":4,"rt":System.Array.type(System.Collections.Generic.Dictionary$2.Entry(TKey,TValue)),"sn":"entries"},{"a":1,"n":"freeCount","t":4,"rt":$n[0].Int32,"sn":"freeCount","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"freeList","t":4,"rt":$n[0].Int32,"sn":"freeList","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"isSimpleKey","t":4,"rt":$n[0].Boolean,"sn":"isSimpleKey","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"keys","t":4,"rt":$n[3].Dictionary$2.KeyCollection(TKey,TValue),"sn":"keys"},{"a":1,"n":"simpleBuckets","t":4,"rt":$n[0].Object,"sn":"simpleBuckets"},{"a":1,"n":"values","t":4,"rt":$n[3].Dictionary$2.ValueCollection(TKey,TValue),"sn":"values"},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.Dictionary$2.Entry", function (TKey, TValue) { return {"td":$n[3].Dictionary$2(TKey,TValue),"att":1048843,"a":1,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"hashCode","t":4,"rt":$n[0].Int32,"sn":"hashCode","box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"key","t":4,"rt":TKey,"sn":"key"},{"a":2,"n":"next","t":4,"rt":$n[0].Int32,"sn":"next","box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"value","t":4,"rt":TValue,"sn":"value"}]}; }, $n); - $m("System.Collections.Generic.Dictionary$2.Enumerator", function (TKey, TValue) { return {"td":$n[3].Dictionary$2(TKey,TValue),"att":1057034,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":".ctor","t":1,"p":[$n[3].Dictionary$2(TKey,TValue),$n[0].Int32],"pi":[{"n":"dictionary","pt":$n[3].Dictionary$2(TKey,TValue),"ps":0},{"n":"getEnumeratorRetType","pt":$n[0].Int32,"ps":1}],"sn":"$ctor1"},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Current","t":16,"rt":$n[3].KeyValuePair$2(TKey,TValue),"g":{"a":2,"n":"get_Current","t":8,"rt":$n[3].KeyValuePair$2(TKey,TValue),"fg":"Current"},"fn":"Current"},{"a":4,"n":"DictEntry","is":true,"t":4,"rt":$n[0].Int32,"sn":"DictEntry","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"KeyValuePair","is":true,"t":4,"rt":$n[0].Int32,"sn":"KeyValuePair","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"current","t":4,"rt":$n[3].KeyValuePair$2(TKey,TValue),"sn":"current"},{"a":1,"n":"dictionary","t":4,"rt":$n[3].Dictionary$2(TKey,TValue),"sn":"dictionary"},{"a":1,"n":"getEnumeratorRetType","t":4,"rt":$n[0].Int32,"sn":"getEnumeratorRetType","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"index","t":4,"rt":$n[0].Int32,"sn":"index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.Dictionary$2.KeyCollection", function (TKey, TValue) { return {"td":$n[3].Dictionary$2(TKey,TValue),"nested":[$n[3].Dictionary$2.KeyCollection.Enumerator],"att":1057026,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"p":[$n[3].Dictionary$2(TKey,TValue)],"pi":[{"n":"dictionary","pt":$n[3].Dictionary$2(TKey,TValue),"ps":0}],"sn":"ctor"},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(TKey),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[System.Array.type(TKey),$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].Dictionary$2.KeyCollection.Enumerator(TKey,TValue)},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":1,"n":"dictionary","t":4,"rt":$n[3].Dictionary$2(TKey,TValue),"sn":"dictionary"}]}; }, $n); - $m("System.Collections.Generic.Dictionary$2.KeyCollection.Enumerator", function (TKey, TValue) { return {"td":$n[3].Dictionary$2.KeyCollection(TKey,TValue),"att":1057034,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":".ctor","t":1,"p":[$n[3].Dictionary$2(TKey,TValue)],"pi":[{"n":"dictionary","pt":$n[3].Dictionary$2(TKey,TValue),"ps":0}],"sn":"$ctor1"},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Current","t":16,"rt":TKey,"g":{"a":2,"n":"get_Current","t":8,"rt":TKey,"fg":"Current"},"fn":"Current"},{"a":1,"n":"currentKey","t":4,"rt":TKey,"sn":"currentKey"},{"a":1,"n":"dictionary","t":4,"rt":$n[3].Dictionary$2(TKey,TValue),"sn":"dictionary"},{"a":1,"n":"index","t":4,"rt":$n[0].Int32,"sn":"index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.Dictionary$2.ValueCollection", function (TKey, TValue) { return {"td":$n[3].Dictionary$2(TKey,TValue),"nested":[$n[3].Dictionary$2.ValueCollection.Enumerator],"att":1057026,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"n":".ctor","t":1,"p":[$n[3].Dictionary$2(TKey,TValue)],"pi":[{"n":"dictionary","pt":$n[3].Dictionary$2(TKey,TValue),"ps":0}],"sn":"ctor"},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(TValue),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[System.Array.type(TValue),$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].Dictionary$2.ValueCollection.Enumerator(TKey,TValue)},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":1,"n":"dictionary","t":4,"rt":$n[3].Dictionary$2(TKey,TValue),"sn":"dictionary"}]}; }, $n); - $m("System.Collections.Generic.Dictionary$2.ValueCollection.Enumerator", function (TKey, TValue) { return {"td":$n[3].Dictionary$2.ValueCollection(TKey,TValue),"att":1057034,"a":2,"at":[new System.SerializableAttribute()],"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":".ctor","t":1,"p":[$n[3].Dictionary$2(TKey,TValue)],"pi":[{"n":"dictionary","pt":$n[3].Dictionary$2(TKey,TValue),"ps":0}],"sn":"$ctor1"},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Current","t":16,"rt":TValue,"g":{"a":2,"n":"get_Current","t":8,"rt":TValue,"fg":"Current"},"fn":"Current"},{"a":1,"n":"currentValue","t":4,"rt":TValue,"sn":"currentValue"},{"a":1,"n":"dictionary","t":4,"rt":$n[3].Dictionary$2(TKey,TValue),"sn":"dictionary"},{"a":1,"n":"index","t":4,"rt":$n[0].Int32,"sn":"index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.CollectionExtensions", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":2,"n":"GetValueOrDefault","is":true,"t":8,"pi":[{"n":"dictionary","pt":$n[3].IReadOnlyDictionary$2(System.Object,System.Object),"ps":0},{"n":"key","pt":System.Object,"ps":1}],"tpc":2,"tprm":["TKey","TValue"],"sn":"GetValueOrDefault$1","rt":System.Object,"p":[$n[3].IReadOnlyDictionary$2(System.Object,System.Object),System.Object]},{"a":2,"n":"GetValueOrDefault","is":true,"t":8,"pi":[{"n":"dictionary","pt":$n[3].IReadOnlyDictionary$2(System.Object,System.Object),"ps":0},{"n":"key","pt":System.Object,"ps":1},{"n":"defaultValue","pt":System.Object,"ps":2}],"tpc":2,"tprm":["TKey","TValue"],"sn":"GetValueOrDefault","rt":System.Object,"p":[$n[3].IReadOnlyDictionary$2(System.Object,System.Object),System.Object,System.Object]},{"a":2,"n":"Remove","is":true,"t":8,"pi":[{"n":"dictionary","pt":$n[3].IDictionary$2(System.Object,System.Object),"ps":0},{"n":"key","pt":System.Object,"ps":1},{"n":"value","out":true,"pt":System.Object,"ps":2}],"tpc":2,"tprm":["TKey","TValue"],"sn":"Remove","rt":$n[0].Boolean,"p":[$n[3].IDictionary$2(System.Object,System.Object),System.Object,System.Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"TryAdd","is":true,"t":8,"pi":[{"n":"dictionary","pt":$n[3].IDictionary$2(System.Object,System.Object),"ps":0},{"n":"key","pt":System.Object,"ps":1},{"n":"value","pt":System.Object,"ps":2}],"tpc":2,"tprm":["TKey","TValue"],"sn":"TryAdd","rt":$n[0].Boolean,"p":[$n[3].IDictionary$2(System.Object,System.Object),System.Object,System.Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("H5.Collections.EnumerableHelpers", function () { return {"att":1048960,"a":4,"s":true,"m":[{"a":4,"n":"ToArray","is":true,"t":8,"pi":[{"n":"source","pt":$n[3].IEnumerable$1(System.Object),"ps":0}],"tpc":1,"tprm":["T"],"sn":"ToArray","rt":System.Array.type(System.Object),"p":[$n[3].IEnumerable$1(System.Object)]},{"a":4,"n":"ToArray","is":true,"t":8,"pi":[{"n":"source","pt":$n[3].IEnumerable$1(System.Object),"ps":0},{"n":"length","out":true,"pt":$n[0].Int32,"ps":1}],"tpc":1,"tprm":["T"],"sn":"ToArray$1","rt":System.Array.type(System.Object),"p":[$n[3].IEnumerable$1(System.Object),$n[0].Int32]}]}; }, $n); - $m("System.Collections.Generic.ICollection$1", function (T) { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Add","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"tpc":0,"def":function (item) { return System.Array.add(this, item, T); },"rt":$n[0].Void,"p":[T]},{"ab":true,"a":2,"n":"Clear","t":8,"tpc":0,"def":function () { return System.Array.clear(this, T); },"rt":$n[0].Void},{"ab":true,"a":2,"n":"Contains","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"tpc":0,"def":function (item) { return System.Array.contains(this, item, T); },"rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"tpc":0,"def":function (array, arrayIndex) { return System.Array.copyTo(this, array, arrayIndex, T); },"rt":$n[0].Void,"p":[System.Array.type(T),$n[0].Int32]},{"ab":true,"a":2,"n":"Remove","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"tpc":0,"def":function (item) { return System.Array.remove(this, item, T); },"rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"ab":true,"a":2,"n":"get_Count","t":8,"tpc":0,"def":function () { return System.Array.getCount(this, T); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"ab":true,"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"ab":true,"a":2,"n":"get_IsReadOnly","t":8,"tpc":0,"def":function () { return System.Array.getIsReadOnly(this, T); },"rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"\"System$Collections$Generic$ICollection$1$\" + H5.getTypeAlias(T) + \"$Count\"","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"\"System$Collections$Generic$ICollection$1$\" + H5.getTypeAlias(T) + \"$IsReadOnly\"","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("System.Collections.Generic.IDictionary$2", function (TKey, TValue) { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Add","t":8,"pi":[{"n":"key","pt":TKey,"ps":0},{"n":"value","pt":TValue,"ps":1}],"sn":"System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$add","rt":$n[0].Void,"p":[TKey,TValue]},{"ab":true,"a":2,"n":"ContainsKey","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$containsKey","rt":$n[0].Boolean,"p":[TKey],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"Remove","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$remove","rt":$n[0].Boolean,"p":[TKey],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"TryGetValue","t":8,"pi":[{"n":"key","pt":TKey,"ps":0},{"n":"value","out":true,"pt":TValue,"ps":1}],"sn":"System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$tryGetValue","rt":$n[0].Boolean,"p":[TKey,TValue],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"Item","t":16,"rt":TValue,"p":[TKey],"i":true,"ipi":[{"n":"key","pt":TKey,"ps":0}],"g":{"ab":true,"a":2,"n":"get_Item","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$getItem","rt":TValue,"p":[TKey]},"s":{"ab":true,"a":2,"n":"set_Item","t":8,"pi":[{"n":"key","pt":TKey,"ps":0},{"n":"value","pt":TValue,"ps":1}],"sn":"System$Collections$Generic$IDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$setItem","rt":$n[0].Void,"p":[TKey,TValue]}},{"ab":true,"a":2,"n":"Keys","t":16,"rt":$n[3].ICollection$1(TKey),"g":{"ab":true,"a":2,"n":"get_Keys","t":8,"rt":$n[3].ICollection$1(TKey),"fg":"\"System$Collections$Generic$IDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$Keys\""},"fn":"\"System$Collections$Generic$IDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$Keys\""},{"ab":true,"a":2,"n":"Values","t":16,"rt":$n[3].ICollection$1(TValue),"g":{"ab":true,"a":2,"n":"get_Values","t":8,"rt":$n[3].ICollection$1(TValue),"fg":"\"System$Collections$Generic$IDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$Values\""},"fn":"\"System$Collections$Generic$IDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$Values\""},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":TValue,"sn":"\"System$Collections$Generic$IDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$Item\""},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[3].ICollection$1(TKey),"sn":"\"System$Collections$Generic$IDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$Keys\""},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[3].ICollection$1(TValue),"sn":"\"System$Collections$Generic$IDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$Values\""}]}; }, $n); - $m("System.Collections.Generic.IEnumerable$1", function (T) { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"GetEnumerator","t":8,"tpc":0,"def":function () { return H5.getEnumerator(this, T); },"rt":$n[3].IEnumerator$1(T)}]}; }, $n); - $m("System.Collections.Generic.IEqualityComparer$1", function (T) { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"x","pt":T,"ps":0},{"n":"y","pt":T,"ps":1}],"sn":"System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(T) + "$equals2","rt":$n[0].Boolean,"p":[T,T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"GetHashCode","t":8,"pi":[{"n":"obj","pt":T,"ps":0}],"sn":"System$Collections$Generic$IEqualityComparer$1$" + H5.getTypeAlias(T) + "$getHashCode2","rt":$n[0].Int32,"p":[T],"box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.EqualityComparer$1", function (T) { return {"att":1048705,"a":2,"m":[{"a":3,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"v":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"x","pt":T,"ps":0},{"n":"y","pt":T,"ps":1}],"sn":"equals2","rt":$n[0].Boolean,"p":[T,T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":2,"n":"GetHashCode","t":8,"pi":[{"n":"obj","pt":T,"ps":0}],"sn":"getHashCode2","rt":$n[0].Int32,"p":[T],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Default","is":true,"t":16,"rt":$n[3].EqualityComparer$1(T),"g":{"a":2,"n":"get_Default","is":true,"t":8,"tpc":0,"def":function () { return System.Collections.Generic.EqualityComparer$1(T).def; },"rt":$n[3].EqualityComparer$1(T)}},{"a":1,"backing":true,"n":"k__BackingField","is":true,"t":4,"rt":$n[3].EqualityComparer$1(T),"sn":"Default"}]}; }, $n); - $m("System.Collections.Generic.IList$1", function (T) { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"IndexOf","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"tpc":0,"def":function (item) { return System.Array.indexOf(this, item, 0, null, T); },"rt":$n[0].Int32,"p":[T],"box":function ($v) { return H5.box($v, System.Int32);}},{"ab":true,"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"item","pt":T,"ps":1}],"tpc":0,"def":function (index, item) { return System.Array.insert(this, index, item, T); },"rt":$n[0].Void,"p":[$n[0].Int32,T]},{"ab":true,"a":2,"n":"RemoveAt","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (index) { return System.Array.removeAt(this, index, T); },"rt":$n[0].Void,"p":[$n[0].Int32]},{"ab":true,"a":2,"n":"Item","t":16,"rt":T,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"ab":true,"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (index) { return System.Array.getItem(this, index, T); },"rt":T,"p":[$n[0].Int32]},"s":{"ab":true,"a":2,"n":"set_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":T,"ps":1}],"tpc":0,"def":function (index, value) { return System.Array.setItem(this, index, value, T); },"rt":$n[0].Void,"p":[$n[0].Int32,T]}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T,"sn":"\"System$Collections$Generic$IList$1$\" + H5.getTypeAlias(T) + \"$Item\""}]}; }, $n); - $m("System.Collections.Generic.IReadOnlyCollection$1", function (T) { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"ab":true,"a":2,"n":"get_Count","t":8,"tpc":0,"def":function () { return System.Array.getCount(this, T); },"rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"\"System$Collections$Generic$IReadOnlyCollection$1$\" + H5.getTypeAlias(T) + \"$Count\"","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.IReadOnlyDictionary$2", function (TKey, TValue) { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"ContainsKey","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$containsKey","rt":$n[0].Boolean,"p":[TKey],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"TryGetValue","t":8,"pi":[{"n":"key","pt":TKey,"ps":0},{"n":"value","out":true,"pt":TValue,"ps":1}],"sn":"System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$tryGetValue","rt":$n[0].Boolean,"p":[TKey,TValue],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"Item","t":16,"rt":TValue,"p":[TKey],"i":true,"ipi":[{"n":"key","pt":TKey,"ps":0}],"g":{"ab":true,"a":2,"n":"get_Item","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"System$Collections$Generic$IReadOnlyDictionary$2$" + H5.getTypeAlias(TKey) + "$" + H5.getTypeAlias(TValue) + "$getItem","rt":TValue,"p":[TKey]}},{"ab":true,"a":2,"n":"Keys","t":16,"rt":$n[3].IEnumerable$1(TKey),"g":{"ab":true,"a":2,"n":"get_Keys","t":8,"rt":$n[3].IEnumerable$1(TKey),"fg":"\"System$Collections$Generic$IReadOnlyDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$Keys\""},"fn":"\"System$Collections$Generic$IReadOnlyDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$Keys\""},{"ab":true,"a":2,"n":"Values","t":16,"rt":$n[3].IEnumerable$1(TValue),"g":{"ab":true,"a":2,"n":"get_Values","t":8,"rt":$n[3].IEnumerable$1(TValue),"fg":"\"System$Collections$Generic$IReadOnlyDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$Values\""},"fn":"\"System$Collections$Generic$IReadOnlyDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$Values\""},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":TValue,"sn":"\"System$Collections$Generic$IReadOnlyDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$getItem\""},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[3].IEnumerable$1(TKey),"sn":"\"System$Collections$Generic$IReadOnlyDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$Keys\""},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[3].IEnumerable$1(TValue),"sn":"\"System$Collections$Generic$IReadOnlyDictionary$2$\" + H5.getTypeAlias(TKey) + \"$\" + H5.getTypeAlias(TValue) + \"$Values\""}]}; }, $n); - $m("System.Collections.Generic.IReadOnlyList$1", function (T) { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Item","t":16,"rt":T,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"ab":true,"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"tpc":0,"def":function (index) { return System.Array.getItem(this, index, T); },"rt":T,"p":[$n[0].Int32]}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T,"sn":"\"System$Collections$Generic$IReadOnlyList$1$\" + H5.getTypeAlias(T) + \"$Item\""}]}; }, $n); - $m("System.Collections.Generic.ISet$1", function (T) { return {"att":1048737,"a":2,"m":[{"ab":true,"a":2,"n":"Add","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$add","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"ExceptWith","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$exceptWith","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"ab":true,"a":2,"n":"IntersectWith","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$intersectWith","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"ab":true,"a":2,"n":"IsProperSubsetOf","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$isProperSubsetOf","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"IsProperSupersetOf","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$isProperSupersetOf","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"IsSubsetOf","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$isSubsetOf","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"IsSupersetOf","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$isSupersetOf","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"Overlaps","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$overlaps","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"SetEquals","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$setEquals","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ab":true,"a":2,"n":"SymmetricExceptWith","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$symmetricExceptWith","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"ab":true,"a":2,"n":"UnionWith","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"System$Collections$Generic$ISet$1$" + H5.getTypeAlias(T) + "$unionWith","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]}]}; }, $n); - $m("System.Collections.Generic.LinkedList$1", function (T) { return {"nested":[$n[3].LinkedList$1.Enumerator],"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IEnumerable$1(T)],"pi":[{"n":"collection","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":"AddAfter","t":8,"pi":[{"n":"node","pt":$n[3].LinkedListNode$1(T),"ps":0},{"n":"newNode","pt":$n[3].LinkedListNode$1(T),"ps":1}],"sn":"AddAfter$1","rt":$n[0].Void,"p":[$n[3].LinkedListNode$1(T),$n[3].LinkedListNode$1(T)]},{"a":2,"n":"AddAfter","t":8,"pi":[{"n":"node","pt":$n[3].LinkedListNode$1(T),"ps":0},{"n":"value","pt":T,"ps":1}],"sn":"AddAfter","rt":$n[3].LinkedListNode$1(T),"p":[$n[3].LinkedListNode$1(T),T]},{"a":2,"n":"AddBefore","t":8,"pi":[{"n":"node","pt":$n[3].LinkedListNode$1(T),"ps":0},{"n":"newNode","pt":$n[3].LinkedListNode$1(T),"ps":1}],"sn":"AddBefore$1","rt":$n[0].Void,"p":[$n[3].LinkedListNode$1(T),$n[3].LinkedListNode$1(T)]},{"a":2,"n":"AddBefore","t":8,"pi":[{"n":"node","pt":$n[3].LinkedListNode$1(T),"ps":0},{"n":"value","pt":T,"ps":1}],"sn":"AddBefore","rt":$n[3].LinkedListNode$1(T),"p":[$n[3].LinkedListNode$1(T),T]},{"a":2,"n":"AddFirst","t":8,"pi":[{"n":"node","pt":$n[3].LinkedListNode$1(T),"ps":0}],"sn":"AddFirst$1","rt":$n[0].Void,"p":[$n[3].LinkedListNode$1(T)]},{"a":2,"n":"AddFirst","t":8,"pi":[{"n":"value","pt":T,"ps":0}],"sn":"AddFirst","rt":$n[3].LinkedListNode$1(T),"p":[T]},{"a":2,"n":"AddLast","t":8,"pi":[{"n":"node","pt":$n[3].LinkedListNode$1(T),"ps":0}],"sn":"AddLast$1","rt":$n[0].Void,"p":[$n[3].LinkedListNode$1(T)]},{"a":2,"n":"AddLast","t":8,"pi":[{"n":"value","pt":T,"ps":0}],"sn":"AddLast","rt":$n[3].LinkedListNode$1(T),"p":[T]},{"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"a":2,"n":"Contains","t":8,"pi":[{"n":"value","pt":T,"ps":0}],"sn":"contains","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[System.Array.type(T),$n[0].Int32]},{"a":2,"n":"Find","t":8,"pi":[{"n":"value","pt":T,"ps":0}],"sn":"Find","rt":$n[3].LinkedListNode$1(T),"p":[T]},{"a":2,"n":"FindLast","t":8,"pi":[{"n":"value","pt":T,"ps":0}],"sn":"FindLast","rt":$n[3].LinkedListNode$1(T),"p":[T]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].LinkedList$1.Enumerator(T)},{"a":1,"n":"InternalInsertNodeBefore","t":8,"pi":[{"n":"node","pt":$n[3].LinkedListNode$1(T),"ps":0},{"n":"newNode","pt":$n[3].LinkedListNode$1(T),"ps":1}],"sn":"InternalInsertNodeBefore","rt":$n[0].Void,"p":[$n[3].LinkedListNode$1(T),$n[3].LinkedListNode$1(T)]},{"a":1,"n":"InternalInsertNodeToEmptyList","t":8,"pi":[{"n":"newNode","pt":$n[3].LinkedListNode$1(T),"ps":0}],"sn":"InternalInsertNodeToEmptyList","rt":$n[0].Void,"p":[$n[3].LinkedListNode$1(T)]},{"a":4,"n":"InternalRemoveNode","t":8,"pi":[{"n":"node","pt":$n[3].LinkedListNode$1(T),"ps":0}],"sn":"InternalRemoveNode","rt":$n[0].Void,"p":[$n[3].LinkedListNode$1(T)]},{"a":2,"n":"Remove","t":8,"pi":[{"n":"node","pt":$n[3].LinkedListNode$1(T),"ps":0}],"sn":"Remove","rt":$n[0].Void,"p":[$n[3].LinkedListNode$1(T)]},{"a":2,"n":"Remove","t":8,"pi":[{"n":"value","pt":T,"ps":0}],"sn":"remove","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"RemoveFirst","t":8,"sn":"RemoveFirst","rt":$n[0].Void},{"a":2,"n":"RemoveLast","t":8,"sn":"RemoveLast","rt":$n[0].Void},{"a":4,"n":"ValidateNewNode","t":8,"pi":[{"n":"node","pt":$n[3].LinkedListNode$1(T),"ps":0}],"sn":"ValidateNewNode","rt":$n[0].Void,"p":[$n[3].LinkedListNode$1(T)]},{"a":4,"n":"ValidateNode","t":8,"pi":[{"n":"node","pt":$n[3].LinkedListNode$1(T),"ps":0}],"sn":"ValidateNode","rt":$n[0].Void,"p":[$n[3].LinkedListNode$1(T)]},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":2,"n":"First","t":16,"rt":$n[3].LinkedListNode$1(T),"g":{"a":2,"n":"get_First","t":8,"rt":$n[3].LinkedListNode$1(T),"fg":"First"},"fn":"First"},{"a":2,"n":"Last","t":16,"rt":$n[3].LinkedListNode$1(T),"g":{"a":2,"n":"get_Last","t":8,"rt":$n[3].LinkedListNode$1(T),"fg":"Last"},"fn":"Last"},{"a":1,"n":"CountName","is":true,"t":4,"rt":$n[0].String,"sn":"CountName"},{"a":1,"n":"ValuesName","is":true,"t":4,"rt":$n[0].String,"sn":"ValuesName"},{"a":1,"n":"VersionName","is":true,"t":4,"rt":$n[0].String,"sn":"VersionName"},{"a":4,"n":"count","t":4,"rt":$n[0].Int32,"sn":"count","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"head","t":4,"rt":$n[3].LinkedListNode$1(T),"sn":"head"},{"a":4,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.LinkedList$1.Enumerator", function (T) { return {"td":$n[3].LinkedList$1(T),"att":1048842,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":".ctor","t":1,"p":[$n[3].LinkedList$1(T)],"pi":[{"n":"list","pt":$n[3].LinkedList$1(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Current","t":16,"rt":T,"g":{"a":2,"n":"get_Current","t":8,"rt":T,"fg":"Current"},"fn":"Current"},{"a":1,"n":"CurrentValueName","is":true,"t":4,"rt":$n[0].String,"sn":"CurrentValueName"},{"a":1,"n":"IndexName","is":true,"t":4,"rt":$n[0].String,"sn":"IndexName"},{"a":1,"n":"LinkedListName","is":true,"t":4,"rt":$n[0].String,"sn":"LinkedListName"},{"a":1,"n":"VersionName","is":true,"t":4,"rt":$n[0].String,"sn":"VersionName"},{"a":1,"n":"current","t":4,"rt":T,"sn":"current"},{"a":1,"n":"index","t":4,"rt":$n[0].Int32,"sn":"index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"list","t":4,"rt":$n[3].LinkedList$1(T),"sn":"list"},{"a":1,"n":"node","t":4,"rt":$n[3].LinkedListNode$1(T),"sn":"node"},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.LinkedListNode$1", function (T) { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[T],"pi":[{"n":"value","pt":T,"ps":0}],"sn":"ctor"},{"a":4,"n":".ctor","t":1,"p":[$n[3].LinkedList$1(T),T],"pi":[{"n":"list","pt":$n[3].LinkedList$1(T),"ps":0},{"n":"value","pt":T,"ps":1}],"sn":"$ctor1"},{"a":4,"n":"Invalidate","t":8,"sn":"Invalidate","rt":$n[0].Void},{"a":2,"n":"List","t":16,"rt":$n[3].LinkedList$1(T),"g":{"a":2,"n":"get_List","t":8,"rt":$n[3].LinkedList$1(T),"fg":"List"},"fn":"List"},{"a":2,"n":"Next","t":16,"rt":$n[3].LinkedListNode$1(T),"g":{"a":2,"n":"get_Next","t":8,"rt":$n[3].LinkedListNode$1(T),"fg":"Next"},"fn":"Next"},{"a":2,"n":"Previous","t":16,"rt":$n[3].LinkedListNode$1(T),"g":{"a":2,"n":"get_Previous","t":8,"rt":$n[3].LinkedListNode$1(T),"fg":"Previous"},"fn":"Previous"},{"a":2,"n":"Value","t":16,"rt":T,"g":{"a":2,"n":"get_Value","t":8,"rt":T,"fg":"Value"},"s":{"a":2,"n":"set_Value","t":8,"p":[T],"rt":$n[0].Void,"fs":"Value"},"fn":"Value"},{"a":4,"n":"item","t":4,"rt":T,"sn":"item"},{"a":4,"n":"list","t":4,"rt":$n[3].LinkedList$1(T),"sn":"list"},{"a":4,"n":"next","t":4,"rt":$n[3].LinkedListNode$1(T),"sn":"next"},{"a":4,"n":"prev","t":4,"rt":$n[3].LinkedListNode$1(T),"sn":"prev"}]}; }, $n); - $m("System.Collections.Generic.SortedList$2", function (TKey, TValue) { return {"nested":[$n[3].SortedList$2.Enumerator,$n[3].SortedList$2.SortedListKeyEnumerator,$n[3].SortedList$2.SortedListValueEnumerator,$n[3].SortedList$2.KeyList,$n[3].SortedList$2.ValueList],"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IComparer$1(TKey)],"pi":[{"n":"comparer","pt":$n[3].IComparer$1(TKey),"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IDictionary$2(TKey,TValue)],"pi":[{"n":"dictionary","pt":$n[3].IDictionary$2(TKey,TValue),"ps":0}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32],"pi":[{"n":"capacity","pt":$n[0].Int32,"ps":0}],"sn":"$ctor4"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IDictionary$2(TKey,TValue),$n[3].IComparer$1(TKey)],"pi":[{"n":"dictionary","pt":$n[3].IDictionary$2(TKey,TValue),"ps":0},{"n":"comparer","pt":$n[3].IComparer$1(TKey),"ps":1}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[0].Int32,$n[3].IComparer$1(TKey)],"pi":[{"n":"capacity","pt":$n[0].Int32,"ps":0},{"n":"comparer","pt":$n[3].IComparer$1(TKey),"ps":1}],"sn":"$ctor5"},{"a":2,"n":"Add","t":8,"pi":[{"n":"key","pt":TKey,"ps":0},{"n":"value","pt":TValue,"ps":1}],"sn":"add","rt":$n[0].Void,"p":[TKey,TValue]},{"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"a":2,"n":"ContainsKey","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"containsKey","rt":$n[0].Boolean,"p":[TKey],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"ContainsValue","t":8,"pi":[{"n":"value","pt":TValue,"ps":0}],"sn":"ContainsValue","rt":$n[0].Boolean,"p":[TValue],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"EnsureCapacity","t":8,"pi":[{"n":"min","pt":$n[0].Int32,"ps":0}],"sn":"EnsureCapacity","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":1,"n":"GetByIndex","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"GetByIndex","rt":TValue,"p":[$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].IEnumerator$1(System.Collections.Generic.KeyValuePair$2(TKey,TValue))},{"a":1,"n":"GetKey","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"GetKey","rt":TKey,"p":[$n[0].Int32]},{"a":1,"n":"GetKeyListHelper","t":8,"sn":"GetKeyListHelper","rt":$n[3].SortedList$2.KeyList(TKey,TValue)},{"a":1,"n":"GetValueListHelper","t":8,"sn":"GetValueListHelper","rt":$n[3].SortedList$2.ValueList(TKey,TValue)},{"a":2,"n":"IndexOfKey","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"IndexOfKey","rt":$n[0].Int32,"p":[TKey],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"IndexOfValue","t":8,"pi":[{"n":"value","pt":TValue,"ps":0}],"sn":"IndexOfValue","rt":$n[0].Int32,"p":[TValue],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"key","pt":TKey,"ps":1},{"n":"value","pt":TValue,"ps":2}],"sn":"Insert","rt":$n[0].Void,"p":[$n[0].Int32,TKey,TValue]},{"a":1,"n":"IsCompatibleKey","is":true,"t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"IsCompatibleKey","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Remove","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"remove","rt":$n[0].Boolean,"p":[TKey],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"RemoveAt","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"RemoveAt","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":2,"n":"TrimExcess","t":8,"sn":"TrimExcess","rt":$n[0].Void},{"a":2,"n":"TryGetValue","t":8,"pi":[{"n":"key","pt":TKey,"ps":0},{"n":"value","out":true,"pt":TValue,"ps":1}],"sn":"tryGetValue","rt":$n[0].Boolean,"p":[TKey,TValue],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Capacity","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Capacity","t":8,"rt":$n[0].Int32,"fg":"Capacity","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_Capacity","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"Capacity"},"fn":"Capacity"},{"a":2,"n":"Comparer","t":16,"rt":$n[3].IComparer$1(TKey),"g":{"a":2,"n":"get_Comparer","t":8,"rt":$n[3].IComparer$1(TKey),"fg":"Comparer"},"fn":"Comparer"},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":2,"n":"Item","t":16,"rt":TValue,"p":[TKey],"i":true,"ipi":[{"n":"key","pt":TKey,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"getItem","rt":TValue,"p":[TKey]},"s":{"a":2,"n":"set_Item","t":8,"pi":[{"n":"key","pt":TKey,"ps":0},{"n":"value","pt":TValue,"ps":1}],"sn":"setItem","rt":$n[0].Void,"p":[TKey,TValue]}},{"v":true,"a":2,"n":"Item","t":16,"rt":$n[0].Object,"p":[$n[0].Object],"i":true,"ipi":[{"n":"key","pt":$n[0].Object,"ps":0}],"g":{"v":true,"a":2,"n":"get_Item","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0}],"sn":"getItem$1","rt":$n[0].Object,"p":[$n[0].Object]},"s":{"v":true,"a":2,"n":"set_Item","t":8,"pi":[{"n":"key","pt":$n[0].Object,"ps":0},{"n":"value","pt":$n[0].Object,"ps":1}],"sn":"setItem$1","rt":$n[0].Void,"p":[$n[0].Object,$n[0].Object]}},{"a":2,"n":"Keys","t":16,"rt":$n[3].IList$1(TKey),"g":{"a":2,"n":"get_Keys","t":8,"rt":$n[3].IList$1(TKey),"fg":"Keys"},"fn":"Keys"},{"a":2,"n":"Values","t":16,"rt":$n[3].IList$1(TValue),"g":{"a":2,"n":"get_Values","t":8,"rt":$n[3].IList$1(TValue),"fg":"Values"},"fn":"Values"},{"a":1,"n":"MaxArrayLength","is":true,"t":4,"rt":$n[0].Int32,"sn":"MaxArrayLength","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_defaultCapacity","is":true,"t":4,"rt":$n[0].Int32,"sn":"_defaultCapacity","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_size","t":4,"rt":$n[0].Int32,"sn":"_size","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"comparer","t":4,"rt":$n[3].IComparer$1(TKey),"sn":"comparer"},{"a":1,"n":"emptyKeys","is":true,"t":4,"rt":System.Array.type(TKey),"sn":"emptyKeys"},{"a":1,"n":"emptyValues","is":true,"t":4,"rt":System.Array.type(TValue),"sn":"emptyValues"},{"a":1,"n":"keyList","t":4,"rt":$n[3].SortedList$2.KeyList(TKey,TValue),"sn":"keyList"},{"a":1,"n":"keys","t":4,"rt":System.Array.type(TKey),"sn":"keys"},{"a":1,"n":"valueList","t":4,"rt":$n[3].SortedList$2.ValueList(TKey,TValue),"sn":"valueList"},{"a":1,"n":"values","t":4,"rt":System.Array.type(TValue),"sn":"values"},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.SortedList$2.Enumerator", function (TKey, TValue) { return {"td":$n[3].SortedList$2(TKey,TValue),"att":1048843,"a":1,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":".ctor","t":1,"p":[$n[3].SortedList$2(TKey,TValue),$n[0].Int32],"pi":[{"n":"sortedList","pt":$n[3].SortedList$2(TKey,TValue),"ps":0},{"n":"getEnumeratorRetType","pt":$n[0].Int32,"ps":1}],"sn":"$ctor1"},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Current","t":16,"rt":$n[3].KeyValuePair$2(TKey,TValue),"g":{"a":2,"n":"get_Current","t":8,"rt":$n[3].KeyValuePair$2(TKey,TValue),"fg":"Current"},"fn":"Current"},{"a":4,"n":"DictEntry","is":true,"t":4,"rt":$n[0].Int32,"sn":"DictEntry","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"KeyValuePair","is":true,"t":4,"rt":$n[0].Int32,"sn":"KeyValuePair","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"_sortedList","t":4,"rt":$n[3].SortedList$2(TKey,TValue),"sn":"_sortedList"},{"a":1,"n":"getEnumeratorRetType","t":4,"rt":$n[0].Int32,"sn":"getEnumeratorRetType","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"index","t":4,"rt":$n[0].Int32,"sn":"index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"key","t":4,"rt":TKey,"sn":"key"},{"a":1,"n":"value","t":4,"rt":TValue,"sn":"value"},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.SortedList$2.SortedListKeyEnumerator", function (TKey, TValue) { return {"td":$n[3].SortedList$2(TKey,TValue),"att":1048835,"a":1,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[3].SortedList$2(TKey,TValue)],"pi":[{"n":"sortedList","pt":$n[3].SortedList$2(TKey,TValue),"ps":0}],"sn":"ctor"},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Current","t":16,"rt":TKey,"g":{"a":2,"n":"get_Current","t":8,"rt":TKey,"fg":"Current"},"fn":"Current"},{"a":1,"n":"_sortedList","t":4,"rt":$n[3].SortedList$2(TKey,TValue),"sn":"_sortedList"},{"a":1,"n":"currentKey","t":4,"rt":TKey,"sn":"currentKey"},{"a":1,"n":"index","t":4,"rt":$n[0].Int32,"sn":"index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.SortedList$2.SortedListValueEnumerator", function (TKey, TValue) { return {"td":$n[3].SortedList$2(TKey,TValue),"att":1048835,"a":1,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[3].SortedList$2(TKey,TValue)],"pi":[{"n":"sortedList","pt":$n[3].SortedList$2(TKey,TValue),"ps":0}],"sn":"ctor"},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Current","t":16,"rt":TValue,"g":{"a":2,"n":"get_Current","t":8,"rt":TValue,"fg":"Current"},"fn":"Current"},{"a":1,"n":"_sortedList","t":4,"rt":$n[3].SortedList$2(TKey,TValue),"sn":"_sortedList"},{"a":1,"n":"currentValue","t":4,"rt":TValue,"sn":"currentValue"},{"a":1,"n":"index","t":4,"rt":$n[0].Int32,"sn":"index","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.SortedList$2.KeyList", function (TKey, TValue) { return {"td":$n[3].SortedList$2(TKey,TValue),"att":1048835,"a":1,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[3].SortedList$2(TKey,TValue)],"pi":[{"n":"dictionary","pt":$n[3].SortedList$2(TKey,TValue),"ps":0}],"sn":"ctor"},{"a":2,"n":"Add","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"add","rt":$n[0].Void,"p":[TKey]},{"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"a":2,"n":"Contains","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"contains","rt":$n[0].Boolean,"p":[TKey],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(TKey),"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[System.Array.type(TKey),$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].IEnumerator$1(TKey)},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"indexOf","rt":$n[0].Int32,"p":[TKey],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":TKey,"ps":1}],"sn":"insert","rt":$n[0].Void,"p":[$n[0].Int32,TKey]},{"a":2,"n":"Remove","t":8,"pi":[{"n":"key","pt":TKey,"ps":0}],"sn":"remove","rt":$n[0].Boolean,"p":[TKey],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"RemoveAt","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"removeAt","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReadOnly","t":8,"rt":$n[0].Boolean,"fg":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReadOnly"},{"a":2,"n":"Item","t":16,"rt":TKey,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"getItem","rt":TKey,"p":[$n[0].Int32]},"s":{"a":2,"n":"set_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":TKey,"ps":1}],"sn":"setItem","rt":$n[0].Void,"p":[$n[0].Int32,TKey]}},{"a":1,"n":"_dict","t":4,"rt":$n[3].SortedList$2(TKey,TValue),"sn":"_dict"}]}; }, $n); - $m("System.Collections.Generic.SortedList$2.ValueList", function (TKey, TValue) { return {"td":$n[3].SortedList$2(TKey,TValue),"att":1048835,"a":1,"m":[{"a":4,"n":".ctor","t":1,"p":[$n[3].SortedList$2(TKey,TValue)],"pi":[{"n":"dictionary","pt":$n[3].SortedList$2(TKey,TValue),"ps":0}],"sn":"ctor"},{"a":2,"n":"Add","t":8,"pi":[{"n":"key","pt":TValue,"ps":0}],"sn":"add","rt":$n[0].Void,"p":[TValue]},{"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"a":2,"n":"Contains","t":8,"pi":[{"n":"value","pt":TValue,"ps":0}],"sn":"contains","rt":$n[0].Boolean,"p":[TValue],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(TValue),"ps":0},{"n":"arrayIndex","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[System.Array.type(TValue),$n[0].Int32]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].IEnumerator$1(TValue)},{"a":2,"n":"IndexOf","t":8,"pi":[{"n":"value","pt":TValue,"ps":0}],"sn":"indexOf","rt":$n[0].Int32,"p":[TValue],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Insert","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":TValue,"ps":1}],"sn":"insert","rt":$n[0].Void,"p":[$n[0].Int32,TValue]},{"a":2,"n":"Remove","t":8,"pi":[{"n":"value","pt":TValue,"ps":0}],"sn":"remove","rt":$n[0].Boolean,"p":[TValue],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"RemoveAt","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"removeAt","rt":$n[0].Void,"p":[$n[0].Int32]},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":2,"n":"IsReadOnly","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IsReadOnly","t":8,"rt":$n[0].Boolean,"fg":"IsReadOnly","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"IsReadOnly"},{"a":2,"n":"Item","t":16,"rt":TValue,"p":[$n[0].Int32],"i":true,"ipi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"g":{"a":2,"n":"get_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0}],"sn":"getItem","rt":TValue,"p":[$n[0].Int32]},"s":{"a":2,"n":"set_Item","t":8,"pi":[{"n":"index","pt":$n[0].Int32,"ps":0},{"n":"value","pt":TValue,"ps":1}],"sn":"setItem","rt":$n[0].Void,"p":[$n[0].Int32,TValue]}},{"a":1,"n":"_dict","t":4,"rt":$n[3].SortedList$2(TKey,TValue),"sn":"_dict"}]}; }, $n); - $m("System.Collections.Generic.TreeRotation", function () { return {"att":256,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"LeftRightRotation","is":true,"t":4,"rt":$n[3].TreeRotation,"sn":"LeftRightRotation","box":function ($v) { return H5.box($v, System.Collections.Generic.TreeRotation, System.Enum.toStringFn(System.Collections.Generic.TreeRotation));}},{"a":2,"n":"LeftRotation","is":true,"t":4,"rt":$n[3].TreeRotation,"sn":"LeftRotation","box":function ($v) { return H5.box($v, System.Collections.Generic.TreeRotation, System.Enum.toStringFn(System.Collections.Generic.TreeRotation));}},{"a":2,"n":"RightLeftRotation","is":true,"t":4,"rt":$n[3].TreeRotation,"sn":"RightLeftRotation","box":function ($v) { return H5.box($v, System.Collections.Generic.TreeRotation, System.Enum.toStringFn(System.Collections.Generic.TreeRotation));}},{"a":2,"n":"RightRotation","is":true,"t":4,"rt":$n[3].TreeRotation,"sn":"RightRotation","box":function ($v) { return H5.box($v, System.Collections.Generic.TreeRotation, System.Enum.toStringFn(System.Collections.Generic.TreeRotation));}}]}; }, $n); - $m("System.Collections.Generic.SortedSet$1", function (T) { return {"nested":[$n[3].SortedSet$1.TreeSubSet,$n[3].SortedSet$1.Node,$n[3].SortedSet$1.Enumerator,$n[3].SortedSet$1.ElementCount],"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IComparer$1(T)],"pi":[{"n":"comparer","pt":$n[3].IComparer$1(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IEnumerable$1(T)],"pi":[{"n":"collection","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"$ctor2"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IEnumerable$1(T),$n[3].IComparer$1(T)],"pi":[{"n":"collection","pt":$n[3].IEnumerable$1(T),"ps":0},{"n":"comparer","pt":$n[3].IComparer$1(T),"ps":1}],"sn":"$ctor3"},{"a":2,"n":"Add","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"add","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"AddAllElements","t":8,"pi":[{"n":"collection","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"AddAllElements","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"v":true,"a":4,"n":"AddIfNotPresent","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"AddIfNotPresent","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"AreComparersEqual","is":true,"t":8,"pi":[{"n":"set1","pt":$n[3].SortedSet$1(T),"ps":0},{"n":"set2","pt":$n[3].SortedSet$1(T),"ps":1}],"sn":"AreComparersEqual","rt":$n[0].Boolean,"p":[$n[3].SortedSet$1(T),$n[3].SortedSet$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":4,"n":"BreadthFirstTreeWalk","t":8,"pi":[{"n":"action","pt":Function,"ps":0}],"sn":"BreadthFirstTreeWalk","rt":$n[0].Boolean,"p":[Function],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"CheckUniqueAndUnfoundElements","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0},{"n":"returnIfUnfound","pt":$n[0].Boolean,"ps":1}],"sn":"CheckUniqueAndUnfoundElements","rt":$n[3].SortedSet$1.ElementCount(T),"p":[$n[3].IEnumerable$1(T),$n[0].Boolean]},{"v":true,"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"a":1,"n":"ConstructRootFromSortedArray","is":true,"t":8,"pi":[{"n":"arr","pt":System.Array.type(T),"ps":0},{"n":"startIndex","pt":$n[0].Int32,"ps":1},{"n":"endIndex","pt":$n[0].Int32,"ps":2},{"n":"redNode","pt":$n[3].SortedSet$1.Node(T),"ps":3}],"sn":"ConstructRootFromSortedArray","rt":$n[3].SortedSet$1.Node(T),"p":[System.Array.type(T),$n[0].Int32,$n[0].Int32,$n[3].SortedSet$1.Node(T)]},{"v":true,"a":2,"n":"Contains","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"contains","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"ContainsAllElements","t":8,"pi":[{"n":"collection","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"ContainsAllElements","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0}],"sn":"CopyTo","rt":$n[0].Void,"p":[System.Array.type(T)]},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1}],"sn":"copyTo","rt":$n[0].Void,"p":[System.Array.type(T),$n[0].Int32]},{"a":2,"n":"CopyTo","t":8,"pi":[{"n":"array","pt":System.Array.type(T),"ps":0},{"n":"index","pt":$n[0].Int32,"ps":1},{"n":"count","pt":$n[0].Int32,"ps":2}],"sn":"CopyTo$1","rt":$n[0].Void,"p":[System.Array.type(T),$n[0].Int32,$n[0].Int32]},{"a":2,"n":"CreateSetComparer","is":true,"t":8,"sn":"CreateSetComparer","rt":$n[3].IEqualityComparer$1(System.Collections.Generic.SortedSet$1(T))},{"a":2,"n":"CreateSetComparer","is":true,"t":8,"pi":[{"n":"memberEqualityComparer","pt":$n[3].IEqualityComparer$1(T),"ps":0}],"sn":"CreateSetComparer$1","rt":$n[3].IEqualityComparer$1(System.Collections.Generic.SortedSet$1(T)),"p":[$n[3].IEqualityComparer$1(T)]},{"v":true,"a":4,"n":"DoRemove","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"DoRemove","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"ExceptWith","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"exceptWith","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"v":true,"a":4,"n":"FindNode","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"FindNode","rt":$n[3].SortedSet$1.Node(T),"p":[T]},{"a":4,"n":"FindRange","t":8,"pi":[{"n":"from","pt":T,"ps":0},{"n":"to","pt":T,"ps":1}],"sn":"FindRange","rt":$n[3].SortedSet$1.Node(T),"p":[T,T]},{"a":4,"n":"FindRange","t":8,"pi":[{"n":"from","pt":T,"ps":0},{"n":"to","pt":T,"ps":1},{"n":"lowerBoundActive","pt":$n[0].Boolean,"ps":2},{"n":"upperBoundActive","pt":$n[0].Boolean,"ps":3}],"sn":"FindRange$1","rt":$n[3].SortedSet$1.Node(T),"p":[T,T,$n[0].Boolean,$n[0].Boolean]},{"a":2,"n":"GetEnumerator","t":8,"sn":"GetEnumerator","rt":$n[3].SortedSet$1.Enumerator(T)},{"a":1,"n":"GetSibling","is":true,"t":8,"pi":[{"n":"node","pt":$n[3].SortedSet$1.Node(T),"ps":0},{"n":"parent","pt":$n[3].SortedSet$1.Node(T),"ps":1}],"sn":"GetSibling","rt":$n[3].SortedSet$1.Node(T),"p":[$n[3].SortedSet$1.Node(T),$n[3].SortedSet$1.Node(T)]},{"v":true,"a":2,"n":"GetViewBetween","t":8,"pi":[{"n":"lowerValue","pt":T,"ps":0},{"n":"upperValue","pt":T,"ps":1}],"sn":"GetViewBetween","rt":$n[3].SortedSet$1(T),"p":[T,T]},{"a":4,"n":"InOrderTreeWalk","t":8,"pi":[{"n":"action","pt":Function,"ps":0}],"sn":"InOrderTreeWalk","rt":$n[0].Boolean,"p":[Function],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":4,"n":"InOrderTreeWalk","t":8,"pi":[{"n":"action","pt":Function,"ps":0},{"n":"reverse","pt":$n[0].Boolean,"ps":1}],"sn":"InOrderTreeWalk$1","rt":$n[0].Boolean,"p":[Function,$n[0].Boolean],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"InsertionBalance","t":8,"pi":[{"n":"current","pt":$n[3].SortedSet$1.Node(T),"ps":0},{"n":"parent","ref":true,"pt":$n[3].SortedSet$1.Node(T),"ps":1},{"n":"grandParent","pt":$n[3].SortedSet$1.Node(T),"ps":2},{"n":"greatGrandParent","pt":$n[3].SortedSet$1.Node(T),"ps":3}],"sn":"InsertionBalance","rt":$n[0].Void,"p":[$n[3].SortedSet$1.Node(T),$n[3].SortedSet$1.Node(T),$n[3].SortedSet$1.Node(T),$n[3].SortedSet$1.Node(T)]},{"v":true,"a":4,"n":"InternalIndexOf","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"InternalIndexOf","rt":$n[0].Int32,"p":[T],"box":function ($v) { return H5.box($v, System.Int32);}},{"v":true,"a":2,"n":"IntersectWith","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"intersectWith","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"v":true,"a":4,"n":"IntersectWithEnumerable","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"IntersectWithEnumerable","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"a":1,"n":"Is2Node","is":true,"t":8,"pi":[{"n":"node","pt":$n[3].SortedSet$1.Node(T),"ps":0}],"sn":"Is2Node","rt":$n[0].Boolean,"p":[$n[3].SortedSet$1.Node(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"Is4Node","is":true,"t":8,"pi":[{"n":"node","pt":$n[3].SortedSet$1.Node(T),"ps":0}],"sn":"Is4Node","rt":$n[0].Boolean,"p":[$n[3].SortedSet$1.Node(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"IsBlack","is":true,"t":8,"pi":[{"n":"node","pt":$n[3].SortedSet$1.Node(T),"ps":0}],"sn":"IsBlack","rt":$n[0].Boolean,"p":[$n[3].SortedSet$1.Node(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"IsNullOrBlack","is":true,"t":8,"pi":[{"n":"node","pt":$n[3].SortedSet$1.Node(T),"ps":0}],"sn":"IsNullOrBlack","rt":$n[0].Boolean,"p":[$n[3].SortedSet$1.Node(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsProperSubsetOf","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"isProperSubsetOf","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsProperSupersetOf","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"isProperSupersetOf","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"IsRed","is":true,"t":8,"pi":[{"n":"node","pt":$n[3].SortedSet$1.Node(T),"ps":0}],"sn":"IsRed","rt":$n[0].Boolean,"p":[$n[3].SortedSet$1.Node(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsSubsetOf","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"isSubsetOf","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"IsSubsetOfSortedSetWithSameEC","t":8,"pi":[{"n":"asSorted","pt":$n[3].SortedSet$1(T),"ps":0}],"sn":"IsSubsetOfSortedSetWithSameEC","rt":$n[0].Boolean,"p":[$n[3].SortedSet$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"IsSupersetOf","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"isSupersetOf","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"v":true,"a":4,"n":"IsWithinRange","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"IsWithinRange","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"Merge2Nodes","is":true,"t":8,"pi":[{"n":"parent","pt":$n[3].SortedSet$1.Node(T),"ps":0},{"n":"child1","pt":$n[3].SortedSet$1.Node(T),"ps":1},{"n":"child2","pt":$n[3].SortedSet$1.Node(T),"ps":2}],"sn":"Merge2Nodes","rt":$n[0].Void,"p":[$n[3].SortedSet$1.Node(T),$n[3].SortedSet$1.Node(T),$n[3].SortedSet$1.Node(T)]},{"a":2,"n":"Overlaps","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"overlaps","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Remove","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"remove","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"RemoveAllElements","t":8,"pi":[{"n":"collection","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"RemoveAllElements","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"a":2,"n":"RemoveWhere","t":8,"pi":[{"n":"match","pt":Function,"ps":0}],"sn":"RemoveWhere","rt":$n[0].Int32,"p":[Function],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"ReplaceChildOfNodeOrRoot","t":8,"pi":[{"n":"parent","pt":$n[3].SortedSet$1.Node(T),"ps":0},{"n":"child","pt":$n[3].SortedSet$1.Node(T),"ps":1},{"n":"newChild","pt":$n[3].SortedSet$1.Node(T),"ps":2}],"sn":"ReplaceChildOfNodeOrRoot","rt":$n[0].Void,"p":[$n[3].SortedSet$1.Node(T),$n[3].SortedSet$1.Node(T),$n[3].SortedSet$1.Node(T)]},{"a":1,"n":"ReplaceNode","t":8,"pi":[{"n":"match","pt":$n[3].SortedSet$1.Node(T),"ps":0},{"n":"parentOfMatch","pt":$n[3].SortedSet$1.Node(T),"ps":1},{"n":"succesor","pt":$n[3].SortedSet$1.Node(T),"ps":2},{"n":"parentOfSuccesor","pt":$n[3].SortedSet$1.Node(T),"ps":3}],"sn":"ReplaceNode","rt":$n[0].Void,"p":[$n[3].SortedSet$1.Node(T),$n[3].SortedSet$1.Node(T),$n[3].SortedSet$1.Node(T),$n[3].SortedSet$1.Node(T)]},{"a":2,"n":"Reverse","t":8,"sn":"Reverse","rt":$n[3].IEnumerable$1(T)},{"a":1,"n":"RotateLeft","is":true,"t":8,"pi":[{"n":"node","pt":$n[3].SortedSet$1.Node(T),"ps":0}],"sn":"RotateLeft","rt":$n[3].SortedSet$1.Node(T),"p":[$n[3].SortedSet$1.Node(T)]},{"a":1,"n":"RotateLeftRight","is":true,"t":8,"pi":[{"n":"node","pt":$n[3].SortedSet$1.Node(T),"ps":0}],"sn":"RotateLeftRight","rt":$n[3].SortedSet$1.Node(T),"p":[$n[3].SortedSet$1.Node(T)]},{"a":1,"n":"RotateRight","is":true,"t":8,"pi":[{"n":"node","pt":$n[3].SortedSet$1.Node(T),"ps":0}],"sn":"RotateRight","rt":$n[3].SortedSet$1.Node(T),"p":[$n[3].SortedSet$1.Node(T)]},{"a":1,"n":"RotateRightLeft","is":true,"t":8,"pi":[{"n":"node","pt":$n[3].SortedSet$1.Node(T),"ps":0}],"sn":"RotateRightLeft","rt":$n[3].SortedSet$1.Node(T),"p":[$n[3].SortedSet$1.Node(T)]},{"a":1,"n":"RotationNeeded","is":true,"t":8,"pi":[{"n":"parent","pt":$n[3].SortedSet$1.Node(T),"ps":0},{"n":"current","pt":$n[3].SortedSet$1.Node(T),"ps":1},{"n":"sibling","pt":$n[3].SortedSet$1.Node(T),"ps":2}],"sn":"RotationNeeded","rt":$n[3].TreeRotation,"p":[$n[3].SortedSet$1.Node(T),$n[3].SortedSet$1.Node(T),$n[3].SortedSet$1.Node(T)],"box":function ($v) { return H5.box($v, System.Collections.Generic.TreeRotation, System.Enum.toStringFn(System.Collections.Generic.TreeRotation));}},{"a":2,"n":"SetEquals","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"setEquals","rt":$n[0].Boolean,"p":[$n[3].IEnumerable$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":4,"n":"SortedSetEquals","is":true,"t":8,"pi":[{"n":"set1","pt":$n[3].SortedSet$1(T),"ps":0},{"n":"set2","pt":$n[3].SortedSet$1(T),"ps":1},{"n":"comparer","pt":$n[3].IComparer$1(T),"ps":2}],"sn":"SortedSetEquals","rt":$n[0].Boolean,"p":[$n[3].SortedSet$1(T),$n[3].SortedSet$1(T),$n[3].IComparer$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"Split4Node","is":true,"t":8,"pi":[{"n":"node","pt":$n[3].SortedSet$1.Node(T),"ps":0}],"sn":"Split4Node","rt":$n[0].Void,"p":[$n[3].SortedSet$1.Node(T)]},{"a":2,"n":"SymmetricExceptWith","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"symmetricExceptWith","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"a":4,"n":"SymmetricExceptWithSameEC","t":8,"pi":[{"n":"other","pt":$n[3].ISet$1(T),"ps":0}],"sn":"SymmetricExceptWithSameEC$1","rt":$n[0].Void,"p":[$n[3].ISet$1(T)]},{"a":4,"n":"SymmetricExceptWithSameEC","t":8,"pi":[{"n":"other","pt":System.Array.type(T),"ps":0}],"sn":"SymmetricExceptWithSameEC","rt":$n[0].Void,"p":[System.Array.type(T)]},{"a":4,"n":"ToArray","t":8,"sn":"ToArray","rt":System.Array.type(T)},{"a":2,"n":"TryGetValue","t":8,"pi":[{"n":"equalValue","pt":T,"ps":0},{"n":"actualValue","out":true,"pt":T,"ps":1}],"sn":"TryGetValue","rt":$n[0].Boolean,"p":[T,T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"UnionWith","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"unionWith","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"a":4,"n":"UpdateVersion","t":8,"sn":"UpdateVersion","rt":$n[0].Void},{"v":true,"a":4,"n":"VersionCheck","t":8,"sn":"VersionCheck","rt":$n[0].Void},{"a":1,"n":"log2","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].Int32,"ps":0}],"sn":"log2","rt":$n[0].Int32,"p":[$n[0].Int32],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"Comparer","t":16,"rt":$n[3].IComparer$1(T),"g":{"a":2,"n":"get_Comparer","t":8,"rt":$n[3].IComparer$1(T),"fg":"Comparer"},"fn":"Comparer"},{"a":2,"n":"Count","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Count","t":8,"rt":$n[0].Int32,"fg":"Count","box":function ($v) { return H5.box($v, System.Int32);}},"fn":"Count"},{"a":2,"n":"Max","t":16,"rt":T,"g":{"a":2,"n":"get_Max","t":8,"rt":T,"fg":"Max"},"fn":"Max"},{"a":2,"n":"Min","t":16,"rt":T,"g":{"a":2,"n":"get_Min","t":8,"rt":T,"fg":"Min"},"fn":"Min"},{"a":1,"n":"ComparerName","is":true,"t":4,"rt":$n[0].String,"sn":"ComparerName"},{"a":1,"n":"CountName","is":true,"t":4,"rt":$n[0].String,"sn":"CountName"},{"a":1,"n":"EnumStartName","is":true,"t":4,"rt":$n[0].String,"sn":"EnumStartName"},{"a":1,"n":"EnumVersionName","is":true,"t":4,"rt":$n[0].String,"sn":"EnumVersionName"},{"a":1,"n":"ItemsName","is":true,"t":4,"rt":$n[0].String,"sn":"ItemsName"},{"a":1,"n":"NodeValueName","is":true,"t":4,"rt":$n[0].String,"sn":"NodeValueName"},{"a":1,"n":"ReverseName","is":true,"t":4,"rt":$n[0].String,"sn":"ReverseName"},{"a":4,"n":"StackAllocThreshold","is":true,"t":4,"rt":$n[0].Int32,"sn":"StackAllocThreshold","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"TreeName","is":true,"t":4,"rt":$n[0].String,"sn":"TreeName"},{"a":1,"n":"VersionName","is":true,"t":4,"rt":$n[0].String,"sn":"VersionName"},{"a":1,"n":"comparer","t":4,"rt":$n[3].IComparer$1(T),"sn":"comparer"},{"a":1,"n":"count","t":4,"rt":$n[0].Int32,"sn":"count","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"lBoundActiveName","is":true,"t":4,"rt":$n[0].String,"sn":"lBoundActiveName"},{"a":1,"n":"maxName","is":true,"t":4,"rt":$n[0].String,"sn":"maxName"},{"a":1,"n":"minName","is":true,"t":4,"rt":$n[0].String,"sn":"minName"},{"a":1,"n":"root","t":4,"rt":$n[3].SortedSet$1.Node(T),"sn":"root"},{"a":1,"n":"uBoundActiveName","is":true,"t":4,"rt":$n[0].String,"sn":"uBoundActiveName"},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.SortedSet$1.TreeSubSet", function (T) { return {"td":$n[3].SortedSet$1(T),"att":1048837,"a":4,"m":[{"a":1,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[3].SortedSet$1(T),T,T,$n[0].Boolean,$n[0].Boolean],"pi":[{"n":"Underlying","pt":$n[3].SortedSet$1(T),"ps":0},{"n":"Min","pt":T,"ps":1},{"n":"Max","pt":T,"ps":2},{"n":"lowerBoundActive","pt":$n[0].Boolean,"ps":3},{"n":"upperBoundActive","pt":$n[0].Boolean,"ps":4}],"sn":"$ctor1"},{"ov":true,"a":4,"n":"AddIfNotPresent","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"AddIfNotPresent","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":4,"n":"BreadthFirstTreeWalk","t":8,"pi":[{"n":"action","pt":Function,"ps":0}],"sn":"BreadthFirstTreeWalk","rt":$n[0].Boolean,"p":[Function],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"Clear","t":8,"sn":"clear","rt":$n[0].Void},{"ov":true,"a":2,"n":"Contains","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"contains","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":4,"n":"DoRemove","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"DoRemove","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":4,"n":"FindNode","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"FindNode","rt":$n[3].SortedSet$1.Node(T),"p":[T]},{"ov":true,"a":2,"n":"GetViewBetween","t":8,"pi":[{"n":"lowerValue","pt":T,"ps":0},{"n":"upperValue","pt":T,"ps":1}],"sn":"GetViewBetween","rt":$n[3].SortedSet$1(T),"p":[T,T]},{"ov":true,"a":4,"n":"InOrderTreeWalk","t":8,"pi":[{"n":"action","pt":Function,"ps":0},{"n":"reverse","pt":$n[0].Boolean,"ps":1}],"sn":"InOrderTreeWalk$1","rt":$n[0].Boolean,"p":[Function,$n[0].Boolean],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":4,"n":"InternalIndexOf","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"InternalIndexOf","rt":$n[0].Int32,"p":[T],"box":function ($v) { return H5.box($v, System.Int32);}},{"ov":true,"a":4,"n":"IntersectWithEnumerable","t":8,"pi":[{"n":"other","pt":$n[3].IEnumerable$1(T),"ps":0}],"sn":"IntersectWithEnumerable","rt":$n[0].Void,"p":[$n[3].IEnumerable$1(T)]},{"ov":true,"a":4,"n":"IsWithinRange","t":8,"pi":[{"n":"item","pt":T,"ps":0}],"sn":"IsWithinRange","rt":$n[0].Boolean,"p":[T],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":4,"n":"VersionCheck","t":8,"sn":"VersionCheck","rt":$n[0].Void},{"a":1,"n":"VersionCheckImpl","t":8,"sn":"VersionCheckImpl","rt":$n[0].Void},{"a":1,"n":"lBoundActive","t":4,"rt":$n[0].Boolean,"sn":"lBoundActive","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"max","t":4,"rt":T,"sn":"max"},{"a":1,"n":"min","t":4,"rt":T,"sn":"min"},{"a":1,"n":"uBoundActive","t":4,"rt":$n[0].Boolean,"sn":"uBoundActive","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"underlying","t":4,"rt":$n[3].SortedSet$1(T),"sn":"underlying"}]}; }, $n); - $m("System.Collections.Generic.SortedSet$1.Node", function (T) { return {"td":$n[3].SortedSet$1(T),"att":1048581,"a":4,"m":[{"a":2,"n":".ctor","t":1,"p":[T],"pi":[{"n":"item","pt":T,"ps":0}],"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[T,$n[0].Boolean],"pi":[{"n":"item","pt":T,"ps":0},{"n":"isRed","pt":$n[0].Boolean,"ps":1}],"sn":"$ctor1"},{"a":2,"n":"IsRed","t":4,"rt":$n[0].Boolean,"sn":"IsRed","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Item","t":4,"rt":T,"sn":"Item"},{"a":2,"n":"Left","t":4,"rt":$n[3].SortedSet$1.Node(T),"sn":"Left"},{"a":2,"n":"Right","t":4,"rt":$n[3].SortedSet$1.Node(T),"sn":"Right"}]}; }, $n); - $m("System.Collections.Generic.SortedSet$1.Enumerator", function (T) { return {"td":$n[3].SortedSet$1(T),"att":1048842,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":".ctor","t":1,"p":[$n[3].SortedSet$1(T)],"pi":[{"n":"set","pt":$n[3].SortedSet$1(T),"ps":0}],"sn":"$ctor1"},{"a":4,"n":".ctor","t":1,"p":[$n[3].SortedSet$1(T),$n[0].Boolean],"pi":[{"n":"set","pt":$n[3].SortedSet$1(T),"ps":0},{"n":"reverse","pt":$n[0].Boolean,"ps":1}],"sn":"$ctor2"},{"a":2,"n":"Dispose","t":8,"sn":"Dispose","rt":$n[0].Void},{"a":1,"n":"Intialize","t":8,"sn":"Intialize","rt":$n[0].Void},{"a":2,"n":"MoveNext","t":8,"sn":"moveNext","rt":$n[0].Boolean,"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":4,"n":"Reset","t":8,"sn":"Reset","rt":$n[0].Void},{"a":2,"n":"Current","t":16,"rt":T,"g":{"a":2,"n":"get_Current","t":8,"rt":T,"fg":"Current"},"fn":"Current"},{"a":4,"n":"NotStartedOrEnded","t":16,"rt":$n[0].Boolean,"g":{"a":4,"n":"get_NotStartedOrEnded","t":8,"rt":$n[0].Boolean,"fg":"NotStartedOrEnded","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"fn":"NotStartedOrEnded"},{"a":1,"n":"current","t":4,"rt":$n[3].SortedSet$1.Node(T),"sn":"current"},{"a":1,"n":"dummyNode","is":true,"t":4,"rt":$n[3].SortedSet$1.Node(T),"sn":"dummyNode"},{"a":1,"n":"reverse","t":4,"rt":$n[0].Boolean,"sn":"reverse","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"n":"stack","t":4,"rt":$n[3].Stack$1(System.Collections.Generic.SortedSet$1.Node(T)),"sn":"stack"},{"a":1,"n":"tree","t":4,"rt":$n[3].SortedSet$1(T),"sn":"tree"},{"a":1,"n":"version","t":4,"rt":$n[0].Int32,"sn":"version","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.SortedSet$1.ElementCount", function (T) { return {"td":$n[3].SortedSet$1(T),"att":1048845,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":4,"n":"unfoundCount","t":4,"rt":$n[0].Int32,"sn":"unfoundCount","box":function ($v) { return H5.box($v, System.Int32);}},{"a":4,"n":"uniqueCount","t":4,"rt":$n[0].Int32,"sn":"uniqueCount","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("System.Collections.Generic.SortedSetEqualityComparer$1", function (T) { return {"att":1048576,"a":4,"m":[{"a":2,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IComparer$1(T)],"pi":[{"n":"comparer","pt":$n[3].IComparer$1(T),"ps":0}],"sn":"$ctor1"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IEqualityComparer$1(T)],"pi":[{"n":"memberEqualityComparer","pt":$n[3].IEqualityComparer$1(T),"ps":0}],"sn":"$ctor3"},{"a":2,"n":".ctor","t":1,"p":[$n[3].IComparer$1(T),$n[3].IEqualityComparer$1(T)],"pi":[{"n":"comparer","pt":$n[3].IComparer$1(T),"ps":0},{"n":"memberEqualityComparer","pt":$n[3].IEqualityComparer$1(T),"ps":1}],"sn":"$ctor2"},{"ov":true,"a":2,"n":"Equals","t":8,"pi":[{"n":"obj","pt":$n[0].Object,"ps":0}],"sn":"equals","rt":$n[0].Boolean,"p":[$n[0].Object],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":2,"n":"Equals","t":8,"pi":[{"n":"x","pt":$n[3].SortedSet$1(T),"ps":0},{"n":"y","pt":$n[3].SortedSet$1(T),"ps":1}],"sn":"equals2","rt":$n[0].Boolean,"p":[$n[3].SortedSet$1(T),$n[3].SortedSet$1(T)],"box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"ov":true,"a":2,"n":"GetHashCode","t":8,"sn":"getHashCode","rt":$n[0].Int32,"box":function ($v) { return H5.box($v, System.Int32);}},{"a":2,"n":"GetHashCode","t":8,"pi":[{"n":"obj","pt":$n[3].SortedSet$1(T),"ps":0}],"sn":"getHashCode2","rt":$n[0].Int32,"p":[$n[3].SortedSet$1(T)],"box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"n":"comparer","t":4,"rt":$n[3].IComparer$1(T),"sn":"comparer"},{"a":1,"n":"e_comparer","t":4,"rt":$n[3].IEqualityComparer$1(T),"sn":"e_comparer"}]}; }, $n); - $m("System.Diagnostics.CodeAnalysis.ExperimentalAttribute", function () { return {"att":1048833,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[$n[0].String],"pi":[{"n":"diagnosticId","pt":$n[0].String,"ps":0}],"sn":"ctor"},{"a":2,"n":"DiagnosticId","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_DiagnosticId","t":8,"rt":$n[0].String,"fg":"DiagnosticId"},"fn":"DiagnosticId"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"DiagnosticId"}],"ni":true}; }, $n); - $m("H5.Ref$1", function (T) { return {"att":1048577,"a":2,"m":[{"a":2,"n":".ctor","t":1,"p":[Function,Function],"pi":[{"n":"getter","pt":Function,"ps":0},{"n":"setter","pt":Function,"ps":1}],"sn":"ctor"},{"a":2,"n":"CreateIn","is":true,"t":8,"pi":[{"n":"value","pt":T,"ps":0}],"sn":"CreateIn","rt":$n[7].Ref$1(T),"p":[T]},{"ov":true,"a":2,"n":"ToString","t":8,"sn":"toString","rt":$n[0].String},{"ov":true,"a":2,"n":"ValueOf","t":8,"sn":"valueOf","rt":$n[0].Object},{"a":2,"n":"op_Implicit","is":true,"t":8,"pi":[{"n":"reference","pt":$n[7].Ref$1(T),"ps":0}],"sn":"op_Implicit","rt":T,"p":[$n[7].Ref$1(T)]},{"a":2,"n":"Value","t":16,"rt":T,"g":{"a":2,"n":"get_Value","t":8,"rt":T,"fg":"Value"},"s":{"a":2,"n":"set_Value","t":8,"p":[T],"rt":$n[0].Void,"fs":"Value"},"fn":"Value"},{"a":1,"n":"v","t":16,"rt":T,"g":{"a":1,"n":"get_v","t":8,"rt":T,"fg":"v"},"s":{"a":1,"n":"set_v","t":8,"p":[T],"rt":$n[0].Void,"fs":"v"},"fn":"v"},{"a":1,"n":"getter","t":4,"rt":Function,"sn":"getter"},{"a":1,"n":"setter","t":4,"rt":Function,"sn":"setter"}]}; }, $n); - $m("H5.Utils.SystemAssemblyVersion", function () { return {"att":1048576,"a":4,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Version","is":true,"t":8,"sn":"Version","rt":$n[0].Void}]}; }, $n); - -/** - * @compiler H5 26.3.64893+945123d2bd7640b7bd10ff332868c3e7b2f4ec79 - */ -H5.assemblyVersion("Dashboard.Web","1.0.0.0"); -H5.assembly("Dashboard.Web", function ($asm, globals) { - "use strict"; - - /** @namespace Dashboard.Api */ - - /** - * HTTP API client for Clinical and Scheduling microservices. - * - * @static - * @abstract - * @public - * @class Dashboard.Api.ApiClient - */ - H5.define("Dashboard.Api.ApiClient", { - statics: { - fields: { - _clinicalBaseUrl: null, - _schedulingBaseUrl: null, - _icd10BaseUrl: null, - _clinicalToken: null, - _schedulingToken: null, - _icd10Token: null - }, - ctors: { - init: function () { - this._clinicalBaseUrl = "http://localhost:5080"; - this._schedulingBaseUrl = "http://localhost:5001"; - this._icd10BaseUrl = "http://localhost:5090"; - this._clinicalToken = ""; - this._schedulingToken = ""; - this._icd10Token = ""; - } - }, - methods: { - /** - * Sets the base URLs for the microservices. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} clinicalUrl - * @param {string} schedulingUrl - * @return {void} - */ - Configure: function (clinicalUrl, schedulingUrl) { - Dashboard.Api.ApiClient._clinicalBaseUrl = clinicalUrl; - Dashboard.Api.ApiClient._schedulingBaseUrl = schedulingUrl; - }, - /** - * Sets the ICD-10 API base URL. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} icd10Url - * @return {void} - */ - ConfigureIcd10: function (icd10Url) { - Dashboard.Api.ApiClient._icd10BaseUrl = icd10Url; - }, - /** - * Sets the authentication tokens for the microservices. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} clinicalToken - * @param {string} schedulingToken - * @return {void} - */ - SetTokens: function (clinicalToken, schedulingToken) { - Dashboard.Api.ApiClient._clinicalToken = clinicalToken; - Dashboard.Api.ApiClient._schedulingToken = schedulingToken; - }, - /** - * Sets the ICD-10 API authentication token. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} icd10Token - * @return {void} - */ - SetIcd10Token: function (icd10Token) { - Dashboard.Api.ApiClient._icd10Token = icd10Token; - }, - /** - * Fetches all patients from the Clinical API. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @return {System.Threading.Tasks.Task$1} - */ - GetPatientsAsync: function () { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchClinicalAsync((Dashboard.Api.ApiClient._clinicalBaseUrl || "") + "/fhir/Patient"))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches a patient by ID from the Clinical API. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} id - * @return {System.Threading.Tasks.Task$1} - */ - GetPatientAsync: function (id) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchClinicalAsync((Dashboard.Api.ApiClient._clinicalBaseUrl || "") + "/fhir/Patient/" + (id || "")))); - return Dashboard.Api.ApiClient.ParseJson(Object, response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Searches patients by query string. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} query - * @return {System.Threading.Tasks.Task$1} - */ - SearchPatientsAsync: function (query) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchClinicalAsync((Dashboard.Api.ApiClient._clinicalBaseUrl || "") + "/fhir/Patient/_search?q=" + (Dashboard.Api.ApiClient.EncodeUri(query) || "")))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches encounters for a patient. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} patientId - * @return {System.Threading.Tasks.Task$1} - */ - GetEncountersAsync: function (patientId) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchClinicalAsync((Dashboard.Api.ApiClient._clinicalBaseUrl || "") + "/fhir/Patient/" + (patientId || "") + "/Encounter"))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches conditions for a patient. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} patientId - * @return {System.Threading.Tasks.Task$1} - */ - GetConditionsAsync: function (patientId) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchClinicalAsync((Dashboard.Api.ApiClient._clinicalBaseUrl || "") + "/fhir/Patient/" + (patientId || "") + "/Condition"))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches medications for a patient. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} patientId - * @return {System.Threading.Tasks.Task$1} - */ - GetMedicationsAsync: function (patientId) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchClinicalAsync((Dashboard.Api.ApiClient._clinicalBaseUrl || "") + "/fhir/Patient/" + (patientId || "") + "/MedicationRequest"))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Creates a new patient. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {Object} patient - * @return {System.Threading.Tasks.Task$1} - */ - CreatePatientAsync: function (patient) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.PostClinicalAsync((Dashboard.Api.ApiClient._clinicalBaseUrl || "") + "/fhir/Patient/", patient))); - return Dashboard.Api.ApiClient.ParseJson(Object, response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Updates an existing patient. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} id - * @param {Object} patient - * @return {System.Threading.Tasks.Task$1} - */ - UpdatePatientAsync: function (id, patient) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.PutClinicalAsync((Dashboard.Api.ApiClient._clinicalBaseUrl || "") + "/fhir/Patient/" + (id || ""), patient))); - return Dashboard.Api.ApiClient.ParseJson(Object, response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches all practitioners from the Scheduling API. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @return {System.Threading.Tasks.Task$1} - */ - GetPractitionersAsync: function () { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchSchedulingAsync((Dashboard.Api.ApiClient._schedulingBaseUrl || "") + "/Practitioner"))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches a practitioner by ID from the Scheduling API. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} id - * @return {System.Threading.Tasks.Task$1} - */ - GetPractitionerAsync: function (id) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchSchedulingAsync((Dashboard.Api.ApiClient._schedulingBaseUrl || "") + "/Practitioner/" + (id || "")))); - return Dashboard.Api.ApiClient.ParseJson(Object, response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Searches practitioners by specialty. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} specialty - * @return {System.Threading.Tasks.Task$1} - */ - SearchPractitionersAsync: function (specialty) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchSchedulingAsync((Dashboard.Api.ApiClient._schedulingBaseUrl || "") + "/Practitioner/_search?specialty=" + (Dashboard.Api.ApiClient.EncodeUri(specialty) || "")))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches all appointments from the Scheduling API. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @return {System.Threading.Tasks.Task$1} - */ - GetAppointmentsAsync: function () { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchSchedulingAsync((Dashboard.Api.ApiClient._schedulingBaseUrl || "") + "/Appointment"))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches an appointment by ID from the Scheduling API. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} id - * @return {System.Threading.Tasks.Task$1} - */ - GetAppointmentAsync: function (id) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchSchedulingAsync((Dashboard.Api.ApiClient._schedulingBaseUrl || "") + "/Appointment/" + (id || "")))); - return Dashboard.Api.ApiClient.ParseJson(Object, response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Updates an existing appointment. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} id - * @param {System.Object} appointment - * @return {System.Threading.Tasks.Task$1} - */ - UpdateAppointmentAsync: function (id, appointment) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.PutSchedulingAsync((Dashboard.Api.ApiClient._schedulingBaseUrl || "") + "/Appointment/" + (id || ""), appointment))); - return Dashboard.Api.ApiClient.ParseJson(Object, response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches appointments for a patient. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} patientId - * @return {System.Threading.Tasks.Task$1} - */ - GetPatientAppointmentsAsync: function (patientId) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchSchedulingAsync((Dashboard.Api.ApiClient._schedulingBaseUrl || "") + "/Patient/" + (patientId || "") + "/Appointment"))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches appointments for a practitioner. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} practitionerId - * @return {System.Threading.Tasks.Task$1} - */ - GetPractitionerAppointmentsAsync: function (practitionerId) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchSchedulingAsync((Dashboard.Api.ApiClient._schedulingBaseUrl || "") + "/Practitioner/" + (practitionerId || "") + "/Appointment"))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches all ICD-10 chapters. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @return {System.Threading.Tasks.Task$1} - */ - GetIcd10ChaptersAsync: function () { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchIcd10Async((Dashboard.Api.ApiClient._icd10BaseUrl || "") + "/api/icd10/chapters"))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches blocks for a chapter. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} chapterId - * @return {System.Threading.Tasks.Task$1} - */ - GetIcd10BlocksAsync: function (chapterId) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchIcd10Async((Dashboard.Api.ApiClient._icd10BaseUrl || "") + "/api/icd10/chapters/" + (chapterId || "") + "/blocks"))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches categories for a block. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} blockId - * @return {System.Threading.Tasks.Task$1} - */ - GetIcd10CategoriesAsync: function (blockId) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchIcd10Async((Dashboard.Api.ApiClient._icd10BaseUrl || "") + "/api/icd10/blocks/" + (blockId || "") + "/categories"))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Fetches codes for a category. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} categoryId - * @return {System.Threading.Tasks.Task$1} - */ - GetIcd10CodesAsync: function (categoryId) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchIcd10Async((Dashboard.Api.ApiClient._icd10BaseUrl || "") + "/api/icd10/categories/" + (categoryId || "") + "/codes"))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Looks up a specific ICD-10 code. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} code - * @return {System.Threading.Tasks.Task$1} - */ - GetIcd10CodeAsync: function (code) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchIcd10Async((Dashboard.Api.ApiClient._icd10BaseUrl || "") + "/api/icd10/codes/" + (Dashboard.Api.ApiClient.EncodeUri(code) || "")))); - return Dashboard.Api.ApiClient.ParseJson(Object, response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Searches ICD-10 codes by keyword. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} query - * @param {number} limit - * @return {System.Threading.Tasks.Task$1} - */ - SearchIcd10CodesAsync: function (query, limit) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - if (limit === void 0) { limit = 20; } - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchIcd10Async((Dashboard.Api.ApiClient._icd10BaseUrl || "") + "/api/icd10/codes?q=" + (Dashboard.Api.ApiClient.EncodeUri(query) || "") + "&limit=" + limit))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Searches ACHI procedure codes by keyword. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} query - * @param {number} limit - * @return {System.Threading.Tasks.Task$1} - */ - SearchAchiCodesAsync: function (query, limit) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - if (limit === void 0) { limit = 20; } - var response = (await H5.toPromise(Dashboard.Api.ApiClient.FetchIcd10Async((Dashboard.Api.ApiClient._icd10BaseUrl || "") + "/api/achi/codes?q=" + (Dashboard.Api.ApiClient.EncodeUri(query) || "") + "&limit=" + limit))); - return Dashboard.Api.ApiClient.ParseJson(System.Array.type(Object), response); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - /** - * Performs semantic search using AI embeddings. - * - * @static - * @public - * @this Dashboard.Api.ApiClient - * @memberof Dashboard.Api.ApiClient - * @param {string} query - * @param {number} limit - * @param {boolean} includeAchi - * @return {System.Threading.Tasks.Task$1} - */ - SemanticSearchAsync: function (query, limit, includeAchi) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var $t; - if (limit === void 0) { limit = 10; } - if (includeAchi === void 0) { includeAchi = false; } - var request = ($t = new Dashboard.Models.SemanticSearchRequest(), $t.Query = query, $t.Limit = limit, $t.IncludeAchi = includeAchi, $t); - var response = (await H5.toPromise(Dashboard.Api.ApiClient.PostIcd10Async((Dashboard.Api.ApiClient._icd10BaseUrl || "") + "/api/search", request))); - var parsed = Dashboard.Api.ApiClient.ParseJson(Object, response); - return parsed.Results || System.Array.init(0, null, Object); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - FetchIcd10Async: function (url) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(fetch(url, { method: "GET", headers: { Accept: "application/json", Authorization: "Bearer " + (Dashboard.Api.ApiClient._icd10Token || "") } }))); - - if (!response.Ok) { - throw new System.Exception("HTTP " + response.Status); - } - - return (await H5.toPromise(response.Text())); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - PostIcd10Async: function (url, data) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(fetch(url, { method: "POST", headers: { Accept: "application/json", ContentType: "application/json", Authorization: "Bearer " + (Dashboard.Api.ApiClient._icd10Token || "") }, body: JSON.stringify(H5.unbox(data)) }))); - - if (!response.Ok) { - throw new System.Exception("HTTP " + response.Status); - } - - return (await H5.toPromise(response.Text())); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - FetchClinicalAsync: function (url) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(fetch(url, { method: "GET", headers: { Accept: "application/json", Authorization: "Bearer " + (Dashboard.Api.ApiClient._clinicalToken || "") } }))); - - if (!response.Ok) { - throw new System.Exception("HTTP " + response.Status); - } - - return (await H5.toPromise(response.Text())); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - FetchSchedulingAsync: function (url) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(fetch(url, { method: "GET", headers: { Accept: "application/json", Authorization: "Bearer " + (Dashboard.Api.ApiClient._schedulingToken || "") } }))); - - if (!response.Ok) { - throw new System.Exception("HTTP " + response.Status); - } - - return (await H5.toPromise(response.Text())); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - PostClinicalAsync: function (url, data) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(fetch(url, { method: "POST", headers: { Accept: "application/json", ContentType: "application/json", Authorization: "Bearer " + (Dashboard.Api.ApiClient._clinicalToken || "") }, body: JSON.stringify(H5.unbox(data)) }))); - - if (!response.Ok) { - throw new System.Exception("HTTP " + response.Status); - } - - return (await H5.toPromise(response.Text())); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - PutClinicalAsync: function (url, data) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(fetch(url, { method: "PUT", headers: { Accept: "application/json", ContentType: "application/json", Authorization: "Bearer " + (Dashboard.Api.ApiClient._clinicalToken || "") }, body: JSON.stringify(H5.unbox(data)) }))); - - if (!response.Ok) { - throw new System.Exception("HTTP " + response.Status); - } - - return (await H5.toPromise(response.Text())); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - PutSchedulingAsync: function (url, data) { - var $tcs = new System.Threading.Tasks.TaskCompletionSource(); - (async () => { - { - var response = (await H5.toPromise(fetch(url, { method: "PUT", headers: { Accept: "application/json", ContentType: "application/json", Authorization: "Bearer " + (Dashboard.Api.ApiClient._schedulingToken || "") }, body: JSON.stringify(H5.unbox(data)) }))); - - if (!response.Ok) { - throw new System.Exception("HTTP " + response.Status); - } - - return (await H5.toPromise(response.Text())); - }})().then(function ($r) { $tcs.setResult($r); }, function ($e) { $tcs.setException(System.Exception.create($e)); }); - return $tcs.task; - }, - ParseJson: function (T, json) { - return JSON.parse(json); - }, - EncodeUri: function (value) { - return encodeURIComponent(value); - } - } - } - }); - - /** @namespace Dashboard */ - - /** - * Main application component. - * - * @static - * @abstract - * @public - * @class Dashboard.App - */ - H5.define("Dashboard.App", { - statics: { - methods: { - /** - * Renders the main application. - * - * @static - * @public - * @this Dashboard.App - * @memberof Dashboard.App - * @return {Object} - */ - Render: function () { - var $t; - var stateResult = Dashboard.React.Hooks.UseState(Dashboard.AppState, ($t = new Dashboard.AppState(), $t.ActiveView = "dashboard", $t.SidebarCollapsed = false, $t.SearchQuery = "", $t.NotificationCount = 3, $t.EditingPatientId = null, $t.EditingAppointmentId = null, $t)); - - var state = stateResult.State; - var setState = stateResult.SetState; - - return Dashboard.React.Elements.Div("app", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Sidebar.Render(state.ActiveView, function (view) { - var $t1; - var newState = ($t1 = new Dashboard.AppState(), $t1.ActiveView = view, $t1.SidebarCollapsed = state.SidebarCollapsed, $t1.SearchQuery = state.SearchQuery, $t1.NotificationCount = state.NotificationCount, $t1.EditingPatientId = null, $t1.EditingAppointmentId = null, $t1); - setState(newState); - }, state.SidebarCollapsed, function () { - var $t1; - var newState = ($t1 = new Dashboard.AppState(), $t1.ActiveView = state.ActiveView, $t1.SidebarCollapsed = !state.SidebarCollapsed, $t1.SearchQuery = state.SearchQuery, $t1.NotificationCount = state.NotificationCount, $t1.EditingPatientId = state.EditingPatientId, $t1.EditingAppointmentId = state.EditingAppointmentId, $t1); - setState(newState); - }), Dashboard.React.Elements.Div("main-wrapper", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Header.Render(Dashboard.App.GetPageTitle(state.ActiveView), state.SearchQuery, function (query) { - var $t1; - var newState = ($t1 = new Dashboard.AppState(), $t1.ActiveView = state.ActiveView, $t1.SidebarCollapsed = state.SidebarCollapsed, $t1.SearchQuery = query, $t1.NotificationCount = state.NotificationCount, $t1.EditingPatientId = state.EditingPatientId, $t1.EditingAppointmentId = state.EditingAppointmentId, $t1); - setState(newState); - }, state.NotificationCount), Dashboard.React.Elements.Main("main-content", System.Array.init([Dashboard.App.RenderPage(state, setState)], Object))], Object))], Object)); - }, - GetPageTitle: function (view) { - if (H5.referenceEquals(view, "dashboard")) { - return "Dashboard"; - } - if (H5.referenceEquals(view, "patients")) { - return "Patients"; - } - if (H5.referenceEquals(view, "clinical-coding")) { - return "Clinical Coding"; - } - if (H5.referenceEquals(view, "encounters")) { - return "Encounters"; - } - if (H5.referenceEquals(view, "conditions")) { - return "Conditions"; - } - if (H5.referenceEquals(view, "medications")) { - return "Medications"; - } - if (H5.referenceEquals(view, "practitioners")) { - return "Practitioners"; - } - if (H5.referenceEquals(view, "appointments")) { - return "Appointments"; - } - if (H5.referenceEquals(view, "calendar")) { - return "Schedule"; - } - if (H5.referenceEquals(view, "settings")) { - return "Settings"; - } - return "Healthcare"; - }, - RenderPage: function (state, setState) { - var view = state.ActiveView; - - if (H5.referenceEquals(view, "patients") && state.EditingPatientId != null) { - return Dashboard.Pages.EditPatientPage.Render(state.EditingPatientId, function () { - var $t; - var newState = ($t = new Dashboard.AppState(), $t.ActiveView = "patients", $t.SidebarCollapsed = state.SidebarCollapsed, $t.SearchQuery = state.SearchQuery, $t.NotificationCount = state.NotificationCount, $t.EditingPatientId = null, $t.EditingAppointmentId = null, $t); - setState(newState); - }); - } - - if ((H5.referenceEquals(view, "appointments") || H5.referenceEquals(view, "calendar")) && state.EditingAppointmentId != null) { - return Dashboard.Pages.EditAppointmentPage.Render(state.EditingAppointmentId, function () { - var $t; - var newState = ($t = new Dashboard.AppState(), $t.ActiveView = view, $t.SidebarCollapsed = state.SidebarCollapsed, $t.SearchQuery = state.SearchQuery, $t.NotificationCount = state.NotificationCount, $t.EditingPatientId = null, $t.EditingAppointmentId = null, $t); - setState(newState); - }); - } - - if (H5.referenceEquals(view, "dashboard")) { - return Dashboard.Pages.DashboardPage.Render(); - } - if (H5.referenceEquals(view, "clinical-coding")) { - return Dashboard.Pages.ClinicalCodingPage.Render(); - } - if (H5.referenceEquals(view, "patients")) { - return Dashboard.Pages.PatientsPage.Render(function (patientId) { - var $t; - var newState = ($t = new Dashboard.AppState(), $t.ActiveView = "patients", $t.SidebarCollapsed = state.SidebarCollapsed, $t.SearchQuery = state.SearchQuery, $t.NotificationCount = state.NotificationCount, $t.EditingPatientId = patientId, $t.EditingAppointmentId = null, $t); - setState(newState); - }); - } - if (H5.referenceEquals(view, "practitioners")) { - return Dashboard.Pages.PractitionersPage.Render(); - } - if (H5.referenceEquals(view, "appointments")) { - return Dashboard.Pages.AppointmentsPage.Render(function (appointmentId) { - var $t; - var newState = ($t = new Dashboard.AppState(), $t.ActiveView = "appointments", $t.SidebarCollapsed = state.SidebarCollapsed, $t.SearchQuery = state.SearchQuery, $t.NotificationCount = state.NotificationCount, $t.EditingPatientId = null, $t.EditingAppointmentId = appointmentId, $t); - setState(newState); - }); - } - if (H5.referenceEquals(view, "calendar")) { - return Dashboard.Pages.CalendarPage.Render(function (appointmentId) { - var $t; - var newState = ($t = new Dashboard.AppState(), $t.ActiveView = "calendar", $t.SidebarCollapsed = state.SidebarCollapsed, $t.SearchQuery = state.SearchQuery, $t.NotificationCount = state.NotificationCount, $t.EditingPatientId = null, $t.EditingAppointmentId = appointmentId, $t); - setState(newState); - }); - } - if (H5.referenceEquals(view, "encounters")) { - return Dashboard.App.RenderPlaceholderPage("Encounters", "Manage patient encounters and visits"); - } - if (H5.referenceEquals(view, "conditions")) { - return Dashboard.App.RenderPlaceholderPage("Conditions", "View and manage patient conditions"); - } - if (H5.referenceEquals(view, "medications")) { - return Dashboard.App.RenderPlaceholderPage("Medications", "Manage medication requests"); - } - if (H5.referenceEquals(view, "settings")) { - return Dashboard.App.RenderPlaceholderPage("Settings", "Configure application settings"); - } - return Dashboard.App.RenderPlaceholderPage("Page Not Found", "The requested page does not exist"); - }, - RenderPlaceholderPage: function (title, description) { - return Dashboard.React.Elements.Div("page", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("page-header", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(2, "page-title", System.Array.init([Dashboard.React.Elements.Text(title)], Object)), Dashboard.React.Elements.P("page-description", void 0, System.Array.init([Dashboard.React.Elements.Text(description)], Object))], Object)), Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("empty-state", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.Clipboard(), Dashboard.React.Elements.H(4, "empty-state-title", System.Array.init([Dashboard.React.Elements.Text("Coming Soon")], Object)), Dashboard.React.Elements.P("empty-state-description", void 0, System.Array.init([Dashboard.React.Elements.Text("This page is under development.")], Object))], Object))], Object))], Object)); - } - } - } - }); - - /** - * Application state class. - * - * @public - * @class Dashboard.AppState - */ - H5.define("Dashboard.AppState", { - fields: { - /** - * Active view identifier. - * - * @instance - * @public - * @memberof Dashboard.AppState - * @function ActiveView - * @type string - */ - ActiveView: null, - /** - * Whether sidebar is collapsed. - * - * @instance - * @public - * @memberof Dashboard.AppState - * @function SidebarCollapsed - * @type boolean - */ - SidebarCollapsed: false, - /** - * Search query string. - * - * @instance - * @public - * @memberof Dashboard.AppState - * @function SearchQuery - * @type string - */ - SearchQuery: null, - /** - * Notification count. - * - * @instance - * @public - * @memberof Dashboard.AppState - * @function NotificationCount - * @type number - */ - NotificationCount: 0, - /** - * Patient ID being edited (null if not editing). - * - * @instance - * @public - * @memberof Dashboard.AppState - * @function EditingPatientId - * @type string - */ - EditingPatientId: null, - /** - * Appointment ID being edited (null if not editing). - * - * @instance - * @public - * @memberof Dashboard.AppState - * @function EditingAppointmentId - * @type string - */ - EditingAppointmentId: null - } - }); - - /** @namespace Dashboard.Components */ - - /** - * Column definition class. - * - * @public - * @class Dashboard.Components.Column - */ - H5.define("Dashboard.Components.Column", { - fields: { - /** - * Column key. - * - * @instance - * @public - * @memberof Dashboard.Components.Column - * @function Key - * @type string - */ - Key: null, - /** - * Column header text. - * - * @instance - * @public - * @memberof Dashboard.Components.Column - * @function Header - * @type string - */ - Header: null, - /** - * Optional CSS class name. - * - * @instance - * @public - * @memberof Dashboard.Components.Column - * @function ClassName - * @type string - */ - ClassName: null - } - }); - - /** - * @memberof System - * @callback System.Action - * @param {T} arg - * @return {void} - */ - - /** @namespace System */ - - /** - * @memberof System - * @callback System.Func - * @param {T} arg - * @return {string} - */ - - /** - * Data table component. - * - * @static - * @abstract - * @public - * @class Dashboard.Components.DataTable - */ - H5.define("Dashboard.Components.DataTable", { - statics: { - methods: { - /** - * Renders a data table. - * - * @static - * @public - * @this Dashboard.Components.DataTable - * @memberof Dashboard.Components.DataTable - * @param {Function} T - * @param {Array.} columns - * @param {Array.} data - * @param {System.Func} getKey - * @param {System.Func} renderCell - * @param {System.Action} onRowClick - * @return {Object} - */ - Render: function (T, columns, data, getKey, renderCell, onRowClick) { - if (onRowClick === void 0) { onRowClick = null; } - return Dashboard.React.Elements.Div("table-container", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Table("table", System.Array.init([Dashboard.React.Elements.THead(System.Array.init([Dashboard.React.Elements.Tr(void 0, void 0, System.Linq.Enumerable.from(columns, Dashboard.Components.Column).select(function (col) { - return Dashboard.React.Elements.Th(col.ClassName, System.Array.init([Dashboard.React.Elements.Text(col.Header)], Object)); - }).ToArray(Object))], Object)), Dashboard.React.Elements.TBody(System.Linq.Enumerable.from(data, T).select(function (row) { - return Dashboard.React.Elements.Tr(!H5.staticEquals(onRowClick, null) ? "cursor-pointer" : null, !H5.staticEquals(onRowClick, null) ? function () { - onRowClick(row); - } : null, System.Linq.Enumerable.from(columns, Dashboard.Components.Column).select(function (col) { - return Dashboard.React.Elements.Td(col.ClassName, System.Array.init([renderCell(row, col.Key)], Object)); - }).ToArray(Object)); - }).ToArray(Object))], Object))], Object)); - }, - /** - * Renders an empty state for the table. - * - * @static - * @public - * @this Dashboard.Components.DataTable - * @memberof Dashboard.Components.DataTable - * @param {string} message - * @return {Object} - */ - RenderEmpty: function (message) { - if (message === void 0) { message = "No data available"; } - return Dashboard.React.Elements.Div("empty-state", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("empty-state-icon", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.Clipboard()], Object)), Dashboard.React.Elements.H(4, "empty-state-title", System.Array.init([Dashboard.React.Elements.Text("No Results")], Object)), Dashboard.React.Elements.P("empty-state-description", void 0, System.Array.init([Dashboard.React.Elements.Text(message)], Object))], Object)); - }, - /** - * Renders a loading skeleton. - * - * @static - * @public - * @this Dashboard.Components.DataTable - * @memberof Dashboard.Components.DataTable - * @param {number} rows - * @param {number} columns - * @return {Object} - */ - RenderLoading: function (rows, columns) { - if (rows === void 0) { rows = 5; } - if (columns === void 0) { columns = 4; } - return Dashboard.React.Elements.Div("table-container", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Table("table", System.Array.init([Dashboard.React.Elements.THead(System.Array.init([Dashboard.React.Elements.Tr(void 0, void 0, System.Linq.Enumerable.range(0, columns).select(function (i) { - return Dashboard.React.Elements.Th(void 0, System.Array.init([Dashboard.React.Elements.Div("skeleton", void 0, { width: "80px", height: "16px" }, void 0)], Object)); - }).ToArray(Object))], Object)), Dashboard.React.Elements.TBody(System.Linq.Enumerable.range(0, rows).select(function (i) { - return Dashboard.React.Elements.Tr(void 0, void 0, System.Linq.Enumerable.range(0, columns).select(function (j) { - return Dashboard.React.Elements.Td(void 0, System.Array.init([Dashboard.React.Elements.Div("skeleton", void 0, { width: "100%", height: "16px" }, void 0)], Object)); - }).ToArray(Object)); - }).ToArray(Object))], Object))], Object)); - } - } - } - }); - - /** - * Header component with search and actions. - * - * @static - * @abstract - * @public - * @class Dashboard.Components.Header - */ - H5.define("Dashboard.Components.Header", { - statics: { - methods: { - /** - * Renders the header component. - * - * @static - * @public - * @this Dashboard.Components.Header - * @memberof Dashboard.Components.Header - * @param {string} title - * @param {string} searchQuery - * @param {System.Action} onSearchChange - * @param {number} notificationCount - * @return {Object} - */ - Render: function (title, searchQuery, onSearchChange, notificationCount) { - if (searchQuery === void 0) { searchQuery = null; } - if (onSearchChange === void 0) { onSearchChange = null; } - if (notificationCount === void 0) { notificationCount = 0; } - return Dashboard.React.Elements.Header("header", System.Array.init([Dashboard.React.Elements.Div("header-left", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(1, "header-title", System.Array.init([Dashboard.React.Elements.Text(title)], Object))], Object)), Dashboard.React.Elements.Div("header-right", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("header-search", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("header-search-icon", void 0, void 0, System.Array.init([Dashboard.Components.Icons.Search()], Object)), Dashboard.React.Elements.Input("input", "text", searchQuery, "Search patients, appointments...", onSearchChange, void 0, false)], Object)), Dashboard.React.Elements.Div("header-actions", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Header.RenderNotificationButton(notificationCount), Dashboard.Components.Header.RenderUserAvatar()], Object))], Object))], Object)); - }, - RenderNotificationButton: function (count) { - var children; - if (count > 0) { - children = System.Array.init([Dashboard.Components.Icons.Bell(), Dashboard.React.Elements.Span("header-action-badge", void 0, void 0)], Object); - } else { - children = System.Array.init([Dashboard.Components.Icons.Bell()], Object); - } - return Dashboard.React.Elements.Button("header-action-btn", function () { /* TODO: Open notifications */ - }, false, "button", children); - }, - RenderUserAvatar: function () { - return Dashboard.React.Elements.Div("avatar avatar-md", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("JD")], Object)); - } - } - } - }); - - /** - * SVG icon components. - * - * @static - * @abstract - * @public - * @class Dashboard.Components.Icons - */ - H5.define("Dashboard.Components.Icons", { - statics: { - methods: { - /** - * Home icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Home: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z M9 22V12h6v10", void 0, "currentColor", 2)]); - }, - /** - * Users icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Users: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2 M9 7a4 4 0 1 0 0-8 4 4 0 0 0 0 8z M23 21v-2a4 4 0 0 0-3-3.87 M16 3.13a4 4 0 0 1 0 7.75", void 0, "currentColor", 2)]); - }, - /** - * User/Doctor icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - UserDoctor: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2 M12 7a4 4 0 1 0 0-8 4 4 0 0 0 0 8z M12 14v7 M9 18h6", void 0, "currentColor", 2)]); - }, - /** - * Calendar icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Calendar: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M19 4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z M16 2v4 M8 2v4 M3 10h18", void 0, "currentColor", 2)]); - }, - /** - * Clipboard/Encounter icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Clipboard: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2 M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z", void 0, "currentColor", 2)]); - }, - /** - * Heart/Condition icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Heart: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z", void 0, "currentColor", 2)]); - }, - /** - * Pill/Medication icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Pill: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M10.5 20.5L3.5 13.5a4.95 4.95 0 1 1 7-7l7 7a4.95 4.95 0 1 1-7 7z M8.5 8.5l7 7", void 0, "currentColor", 2)]); - }, - /** - * Activity/Heartbeat icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Activity: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M22 12h-4l-3 9L9 3l-3 9H2", void 0, "currentColor", 2)]); - }, - /** - * Search icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Search: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16z M21 21l-4.35-4.35", void 0, "currentColor", 2)]); - }, - /** - * Bell/Notification icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Bell: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9 M13.73 21a2 2 0 0 1-3.46 0", void 0, "currentColor", 2)]); - }, - /** - * Settings icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Settings: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z", void 0, "currentColor", 2)]); - }, - /** - * ChevronLeft icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - ChevronLeft: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M15 18l-6-6 6-6", void 0, "currentColor", 2)]); - }, - /** - * ChevronRight icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - ChevronRight: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M9 18l6-6-6-6", void 0, "currentColor", 2)]); - }, - /** - * Plus icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Plus: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M12 5v14 M5 12h14", void 0, "currentColor", 2)]); - }, - /** - * Edit/Pencil icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Edit: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7 M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z", void 0, "currentColor", 2)]); - }, - /** - * Trash icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Trash: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M3 6h18 M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", void 0, "currentColor", 2)]); - }, - /** - * Eye icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Eye: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z", void 0, "currentColor", 2)]); - }, - /** - * Refresh icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Refresh: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M23 4v6h-6 M1 20v-6h6 M3.51 9a9 9 0 0 1 14.85-3.36L23 10 M1 14l4.64 4.36A9 9 0 0 0 20.49 15", void 0, "currentColor", 2)]); - }, - /** - * TrendUp icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - TrendUp: function () { - return Dashboard.React.Elements.Svg("icon", 16, 16, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M23 6l-9.5 9.5-5-5L1 18", void 0, "currentColor", 2)]); - }, - /** - * TrendDown icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - TrendDown: function () { - return Dashboard.React.Elements.Svg("icon", 16, 16, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M23 18l-9.5-9.5-5 5L1 6", void 0, "currentColor", 2)]); - }, - /** - * Menu icon (hamburger). - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Menu: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M3 12h18M3 6h18M3 18h18", void 0, "currentColor", 2)]); - }, - /** - * X/Close icon. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - X: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M18 6L6 18M6 6l12 12", void 0, "currentColor", 2)]); - }, - /** - * Code/Book icon for clinical coding. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Code: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M4 19.5A2.5 2.5 0 0 1 6.5 17H20 M4 4.5A2.5 2.5 0 0 1 6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15z M8 7h8 M8 11h8 M8 15h5", void 0, "currentColor", 2)]); - }, - /** - * FileText icon for documents. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - FileText: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6 M16 13H8 M16 17H8 M10 9H8", void 0, "currentColor", 2)]); - }, - /** - * Sparkles icon for AI/semantic search. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Sparkles: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M12 3l1.5 4.5L18 9l-4.5 1.5L12 15l-1.5-4.5L6 9l4.5-1.5L12 3z M19 13l1 3 3 1-3 1-1 3-1-3-3-1 3-1 1-3z M5 17l.5 1.5L7 19l-1.5.5L5 21l-.5-1.5L3 19l1.5-.5L5 17z", void 0, "currentColor", 2)]); - }, - /** - * Check icon for confirmation. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Check: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M20 6L9 17l-5-5", void 0, "currentColor", 2)]); - }, - /** - * Copy icon for clipboard copy. - * - * @static - * @public - * @this Dashboard.Components.Icons - * @memberof Dashboard.Components.Icons - * @return {Object} - */ - Copy: function () { - return Dashboard.React.Elements.Svg("icon", 20, 20, "0 0 24 24", "none", [Dashboard.React.Elements.Path("M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2 M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z", void 0, "currentColor", 2)]); - } - } - } - }); - - /** - * Metric card component for displaying KPIs. - * - * @static - * @abstract - * @public - * @class Dashboard.Components.MetricCard - */ - H5.define("Dashboard.Components.MetricCard", { - statics: { - methods: { - /** - * Renders a metric card. - * - * @static - * @public - * @this Dashboard.Components.MetricCard - * @memberof Dashboard.Components.MetricCard - * @param {Dashboard.Components.MetricCardProps} props - * @return {Object} - */ - Render: function (props) { - var $t; - var trendElement; - if (props.TrendValue != null) { - trendElement = Dashboard.React.Elements.Div("metric-trend " + (Dashboard.Components.MetricCard.TrendClass(props.Trend) || ""), void 0, void 0, void 0, System.Array.init([Dashboard.Components.MetricCard.TrendIcon(props.Trend), Dashboard.React.Elements.Text(props.TrendValue)], Object)); - } else { - trendElement = Dashboard.React.Elements.Text(""); - } - - return Dashboard.React.Elements.Div("metric-card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("metric-icon " + ((($t = props.IconColor, $t != null ? $t : "blue")) || ""), void 0, void 0, void 0, System.Array.init([props.Icon()], Object)), Dashboard.React.Elements.Div("metric-value", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(props.Value)], Object)), Dashboard.React.Elements.Div("metric-label", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(props.Label)], Object)), trendElement], Object)); - }, - TrendClass: function (trend) { - if (trend === Dashboard.Components.TrendDirection.Up) { - return "up"; - } else if (trend === Dashboard.Components.TrendDirection.Down) { - return "down"; - } else { - return "neutral"; - } - }, - TrendIcon: function (trend) { - if (trend === Dashboard.Components.TrendDirection.Up) { - return Dashboard.Components.Icons.TrendUp(); - } else if (trend === Dashboard.Components.TrendDirection.Down) { - return Dashboard.Components.Icons.TrendDown(); - } else { - return Dashboard.React.Elements.Text(""); - } - } - } - } - }); - - /** - * Metric card props class. - * - * @public - * @class Dashboard.Components.MetricCardProps - */ - H5.define("Dashboard.Components.MetricCardProps", { - fields: { - /** - * Label text. - * - * @instance - * @public - * @memberof Dashboard.Components.MetricCardProps - * @function Label - * @type string - */ - Label: null, - /** - * Value text. - * - * @instance - * @public - * @memberof Dashboard.Components.MetricCardProps - * @function Value - * @type string - */ - Value: null, - /** - * Icon factory. - * - * @instance - * @public - * @memberof Dashboard.Components.MetricCardProps - * @function Icon - * @type System.Func - */ - Icon: null, - /** - * Icon color class. - * - * @instance - * @public - * @memberof Dashboard.Components.MetricCardProps - * @function IconColor - * @type string - */ - IconColor: null, - /** - * Trend value text. - * - * @instance - * @public - * @memberof Dashboard.Components.MetricCardProps - * @function TrendValue - * @type string - */ - TrendValue: null, - /** - * Trend direction. - * - * @instance - * @public - * @memberof Dashboard.Components.MetricCardProps - * @function Trend - * @type Dashboard.Components.TrendDirection - */ - Trend: 0 - } - }); - - /** - * Navigation item class. - * - * @public - * @class Dashboard.Components.NavItem - */ - H5.define("Dashboard.Components.NavItem", { - fields: { - /** - * Item identifier. - * - * @instance - * @public - * @memberof Dashboard.Components.NavItem - * @function Id - * @type string - */ - Id: null, - /** - * Display label. - * - * @instance - * @public - * @memberof Dashboard.Components.NavItem - * @function Label - * @type string - */ - Label: null, - /** - * Icon factory. - * - * @instance - * @public - * @memberof Dashboard.Components.NavItem - * @function Icon - * @type System.Func - */ - Icon: null, - /** - * Optional badge count. - * - * @instance - * @public - * @memberof Dashboard.Components.NavItem - * @function Badge - * @type ?number - */ - Badge: null - } - }); - - /** - * Navigation section class. - * - * @public - * @class Dashboard.Components.NavSection - */ - H5.define("Dashboard.Components.NavSection", { - fields: { - /** - * Section title. - * - * @instance - * @public - * @memberof Dashboard.Components.NavSection - * @function Title - * @type string - */ - Title: null, - /** - * Navigation items. - * - * @instance - * @public - * @memberof Dashboard.Components.NavSection - * @function Items - * @type Array. - */ - Items: null - } - }); - - /** - * Sidebar navigation component. - * - * @static - * @abstract - * @public - * @class Dashboard.Components.Sidebar - */ - H5.define("Dashboard.Components.Sidebar", { - statics: { - methods: { - /** - * Renders the sidebar component. - * - * @static - * @public - * @this Dashboard.Components.Sidebar - * @memberof Dashboard.Components.Sidebar - * @param {string} activeView - * @param {System.Action} onNavigate - * @param {boolean} collapsed - * @param {System.Action} onToggle - * @return {Object} - */ - Render: function (activeView, onNavigate, collapsed, onToggle) { - var sections = Dashboard.Components.Sidebar.GetNavSections(); - - return Dashboard.React.Elements.Aside("sidebar " + ((collapsed ? "collapsed" : "") || ""), System.Array.init([Dashboard.Components.Sidebar.RenderHeader(collapsed), Dashboard.React.Elements.Nav("sidebar-nav", System.Linq.Enumerable.from(sections, Dashboard.Components.NavSection).select(function (section) { - return Dashboard.Components.Sidebar.RenderSection(section, activeView, onNavigate); - }).ToArray(Object)), Dashboard.React.Elements.Button("sidebar-toggle", onToggle, false, "button", System.Array.init([collapsed ? Dashboard.Components.Icons.ChevronRight() : Dashboard.Components.Icons.ChevronLeft()], Object)), Dashboard.Components.Sidebar.RenderFooter(collapsed)], Object)); - }, - GetNavSections: function () { - var $t, $t1; - return System.Array.init([($t = new Dashboard.Components.NavSection(), $t.Title = "Overview", $t.Items = System.Array.init([($t1 = new Dashboard.Components.NavItem(), $t1.Id = "dashboard", $t1.Label = "Dashboard", $t1.Icon = Dashboard.Components.Icons.Home, $t1)], Dashboard.Components.NavItem), $t), ($t = new Dashboard.Components.NavSection(), $t.Title = "Clinical", $t.Items = System.Array.init([($t1 = new Dashboard.Components.NavItem(), $t1.Id = "patients", $t1.Label = "Patients", $t1.Icon = Dashboard.Components.Icons.Users, $t1), ($t1 = new Dashboard.Components.NavItem(), $t1.Id = "clinical-coding", $t1.Label = "Clinical Coding", $t1.Icon = Dashboard.Components.Icons.Code, $t1), ($t1 = new Dashboard.Components.NavItem(), $t1.Id = "encounters", $t1.Label = "Encounters", $t1.Icon = Dashboard.Components.Icons.Clipboard, $t1), ($t1 = new Dashboard.Components.NavItem(), $t1.Id = "conditions", $t1.Label = "Conditions", $t1.Icon = Dashboard.Components.Icons.Heart, $t1), ($t1 = new Dashboard.Components.NavItem(), $t1.Id = "medications", $t1.Label = "Medications", $t1.Icon = Dashboard.Components.Icons.Pill, $t1)], Dashboard.Components.NavItem), $t), ($t = new Dashboard.Components.NavSection(), $t.Title = "Scheduling", $t.Items = System.Array.init([($t1 = new Dashboard.Components.NavItem(), $t1.Id = "practitioners", $t1.Label = "Practitioners", $t1.Icon = Dashboard.Components.Icons.UserDoctor, $t1), ($t1 = new Dashboard.Components.NavItem(), $t1.Id = "appointments", $t1.Label = "Appointments", $t1.Icon = Dashboard.Components.Icons.Clipboard, $t1.Badge = 3, $t1), ($t1 = new Dashboard.Components.NavItem(), $t1.Id = "calendar", $t1.Label = "Schedule", $t1.Icon = Dashboard.Components.Icons.Calendar, $t1)], Dashboard.Components.NavItem), $t), ($t = new Dashboard.Components.NavSection(), $t.Title = "System", $t.Items = System.Array.init([($t1 = new Dashboard.Components.NavItem(), $t1.Id = "settings", $t1.Label = "Settings", $t1.Icon = Dashboard.Components.Icons.Settings, $t1)], Dashboard.Components.NavItem), $t)], Dashboard.Components.NavSection); - }, - RenderHeader: function (collapsed) { - return Dashboard.React.Elements.Div("sidebar-header", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.A("#", "sidebar-logo", void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("sidebar-logo-icon", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.Activity()], Object)), Dashboard.React.Elements.Span("sidebar-logo-text", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("HealthCare")], Object))], Object))], Object)); - }, - RenderSection: function (section, activeView, onNavigate) { - var items = System.Linq.Enumerable.from(section.Items, Dashboard.Components.NavItem).select(function (item) { - return Dashboard.Components.Sidebar.RenderNavItem(item, activeView, onNavigate); - }).ToArray(Object); - var allChildren = System.Array.init(((items.length + 1) | 0), null, Object); - allChildren[System.Array.index(0, allChildren)] = Dashboard.React.Elements.Div("nav-section-title", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(section.Title)], Object)); - for (var i = 0; i < items.length; i = (i + 1) | 0) { - allChildren[System.Array.index(((i + 1) | 0), allChildren)] = items[System.Array.index(i, items)]; - } - return Dashboard.React.Elements.Div("nav-section", void 0, void 0, void 0, allChildren); - }, - RenderNavItem: function (item, activeView, onNavigate) { - var isActive = H5.referenceEquals(activeView, item.Id); - var children; - - if (System.Nullable.hasValue(item.Badge)) { - children = System.Array.init([Dashboard.React.Elements.Span("nav-item-icon", void 0, void 0, System.Array.init([item.Icon()], Object)), Dashboard.React.Elements.Span("nav-item-text", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(item.Label)], Object)), Dashboard.React.Elements.Span("nav-item-badge", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(H5.toString(System.Nullable.getValue(item.Badge)))], Object))], Object); - } else { - children = System.Array.init([Dashboard.React.Elements.Span("nav-item-icon", void 0, void 0, System.Array.init([item.Icon()], Object)), Dashboard.React.Elements.Span("nav-item-text", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(item.Label)], Object))], Object); - } - - return Dashboard.React.Elements.A("#", "nav-item " + ((isActive ? "active" : "") || ""), void 0, function () { - onNavigate(item.Id); - }, children); - }, - RenderFooter: function (collapsed) { - return Dashboard.React.Elements.Div("sidebar-footer", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("sidebar-user", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("avatar avatar-md", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("JD")], Object)), Dashboard.React.Elements.Div("sidebar-user-info", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("sidebar-user-name", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("John Doe")], Object)), Dashboard.React.Elements.Div("sidebar-user-role", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Administrator")], Object))], Object))], Object))], Object)); - } - } - } - }); - - /** - * Trend direction enum. - * - * @public - * @class Dashboard.Components.TrendDirection - */ - H5.define("Dashboard.Components.TrendDirection", { - $kind: "enum", - statics: { - fields: { - /** - * Upward trend. - * - * @static - * @public - * @memberof Dashboard.Components.TrendDirection - * @constant - * @default 0 - * @type Dashboard.Components.TrendDirection - */ - Up: 0, - /** - * Downward trend. - * - * @static - * @public - * @memberof Dashboard.Components.TrendDirection - * @constant - * @default 1 - * @type Dashboard.Components.TrendDirection - */ - Down: 1, - /** - * No change. - * - * @static - * @public - * @memberof Dashboard.Components.TrendDirection - * @constant - * @default 2 - * @type Dashboard.Components.TrendDirection - */ - Neutral: 2 - } - } - }); - - /** @namespace Dashboard.Models */ - - /** - * Search request model. - * - * @public - * @class Dashboard.Models.SemanticSearchRequest - */ - H5.define("Dashboard.Models.SemanticSearchRequest", { - fields: { - /** - * Search query text. - * - * @instance - * @public - * @memberof Dashboard.Models.SemanticSearchRequest - * @function Query - * @type string - */ - Query: null, - /** - * Maximum results to return. - * - * @instance - * @public - * @memberof Dashboard.Models.SemanticSearchRequest - * @function Limit - * @type number - */ - Limit: 0, - /** - * Whether to include ACHI codes. - * - * @instance - * @public - * @memberof Dashboard.Models.SemanticSearchRequest - * @function IncludeAchi - * @type boolean - */ - IncludeAchi: false - } - }); - - /** @namespace Dashboard.Pages */ - - /** - * Appointments management page. - * - * @static - * @abstract - * @public - * @class Dashboard.Pages.AppointmentsPage - */ - H5.define("Dashboard.Pages.AppointmentsPage", { - statics: { - methods: { - /** - * Renders the appointments page. - * - * @static - * @public - * @this Dashboard.Pages.AppointmentsPage - * @memberof Dashboard.Pages.AppointmentsPage - * @param {System.Action} onEditAppointment - * @return {Object} - */ - Render: function (onEditAppointment) { - return Dashboard.Pages.AppointmentsPage.RenderInternal(onEditAppointment); - }, - RenderInternal: function (onEditAppointment) { - var $t; - var stateResult = Dashboard.React.Hooks.UseState(Dashboard.Pages.AppointmentsState, ($t = new Dashboard.Pages.AppointmentsState(), $t.Appointments = System.Array.init(0, null, Object), $t.Loading = true, $t.Error = null, $t.StatusFilter = null, $t)); - - var state = stateResult.State; - var setState = stateResult.SetState; - - Dashboard.React.Hooks.UseEffect$1(function () { - Dashboard.Pages.AppointmentsPage.LoadAppointments(setState); - }, System.Array.init(0, null, System.Object)); - - var content; - if (state.Loading) { - content = Dashboard.Pages.AppointmentsPage.RenderLoadingList(); - } else if (state.Error != null) { - content = Dashboard.Pages.AppointmentsPage.RenderError(state.Error); - } else if (state.Appointments.length === 0) { - content = Dashboard.Pages.AppointmentsPage.RenderEmpty(); - } else { - content = Dashboard.Pages.AppointmentsPage.RenderAppointmentList(state.Appointments, state.StatusFilter, onEditAppointment); - } - - return Dashboard.React.Elements.Div("page", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("page-header flex justify-between items-center", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(2, "page-title", System.Array.init([Dashboard.React.Elements.Text("Appointments")], Object)), Dashboard.React.Elements.P("page-description", void 0, System.Array.init([Dashboard.React.Elements.Text("Manage scheduled appointments from the Scheduling domain")], Object))], Object)), Dashboard.React.Elements.Button("btn btn-primary", void 0, false, "button", System.Array.init([Dashboard.Components.Icons.Plus(), Dashboard.React.Elements.Text("New Appointment")], Object))], Object)), Dashboard.React.Elements.Div("card mb-6", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("tabs", void 0, void 0, void 0, System.Array.init([Dashboard.Pages.AppointmentsPage.RenderTab("All", null, state.StatusFilter, function (s) { - Dashboard.Pages.AppointmentsPage.FilterByStatus(s, state, setState); - }), Dashboard.Pages.AppointmentsPage.RenderTab("Booked", "booked", state.StatusFilter, function (s) { - Dashboard.Pages.AppointmentsPage.FilterByStatus(s, state, setState); - }), Dashboard.Pages.AppointmentsPage.RenderTab("Arrived", "arrived", state.StatusFilter, function (s) { - Dashboard.Pages.AppointmentsPage.FilterByStatus(s, state, setState); - }), Dashboard.Pages.AppointmentsPage.RenderTab("Fulfilled", "fulfilled", state.StatusFilter, function (s) { - Dashboard.Pages.AppointmentsPage.FilterByStatus(s, state, setState); - }), Dashboard.Pages.AppointmentsPage.RenderTab("Cancelled", "cancelled", state.StatusFilter, function (s) { - Dashboard.Pages.AppointmentsPage.FilterByStatus(s, state, setState); - })], Object))], Object)), content], Object)); - }, - LoadAppointments: function (setState) { - (async () => { - { - var $t; - try { - var appointments = (await H5.toPromise(Dashboard.Api.ApiClient.GetAppointmentsAsync())); - setState(($t = new Dashboard.Pages.AppointmentsState(), $t.Appointments = appointments, $t.Loading = false, $t.Error = null, $t.StatusFilter = null, $t)); - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t = new Dashboard.Pages.AppointmentsState(), $t.Appointments = System.Array.init(0, null, Object), $t.Loading = false, $t.Error = ex.Message, $t.StatusFilter = null, $t)); - } - }})() - }, - FilterByStatus: function (status, currentState, setState) { - var $t; - setState(($t = new Dashboard.Pages.AppointmentsState(), $t.Appointments = currentState.Appointments, $t.Loading = currentState.Loading, $t.Error = currentState.Error, $t.StatusFilter = status, $t)); - }, - RenderTab: function (label, status, currentFilter, onSelect) { - var isActive = H5.referenceEquals(status, currentFilter); - return Dashboard.React.Elements.Button("tab " + ((isActive ? "active" : "") || ""), function () { - onSelect(status); - }, false, "button", System.Array.init([Dashboard.React.Elements.Text(label)], Object)); - }, - RenderError: function (message) { - return Dashboard.React.Elements.Div("card", void 0, { borderLeft: "4px solid var(--error)" }, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-3 p-4", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.X(), Dashboard.React.Elements.Text("Error loading appointments: " + (message || ""))], Object))], Object)); - }, - RenderEmpty: function () { - return Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("empty-state", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.Calendar(), Dashboard.React.Elements.H(4, "empty-state-title", System.Array.init([Dashboard.React.Elements.Text("No Appointments")], Object)), Dashboard.React.Elements.P("empty-state-description", void 0, System.Array.init([Dashboard.React.Elements.Text("No appointments scheduled. Create a new appointment to get started.")], Object)), Dashboard.React.Elements.Button("btn btn-primary mt-4", void 0, false, "button", System.Array.init([Dashboard.Components.Icons.Plus(), Dashboard.React.Elements.Text("New Appointment")], Object))], Object))], Object)); - }, - RenderLoadingList: function () { - return Dashboard.React.Elements.Div("data-list", void 0, void 0, void 0, System.Linq.Enumerable.range(0, 5).select(function (i) { - return Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("skeleton", void 0, { width: "60px", height: "60px", borderRadius: "var(--radius-lg)" }, void 0), Dashboard.React.Elements.Div("flex-1", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("skeleton", void 0, { width: "200px", height: "20px" }, void 0), Dashboard.React.Elements.Div("skeleton mt-2", void 0, { width: "150px", height: "16px" }, void 0)], Object)), Dashboard.React.Elements.Div("skeleton", void 0, { width: "100px", height: "32px" }, void 0)], Object))], Object)); - }).ToArray(Object)); - }, - RenderAppointmentList: function (appointments, statusFilter, onEditAppointment) { - var filtered = statusFilter == null ? appointments : System.Linq.Enumerable.from(appointments, Object).where(function (a) { - return H5.referenceEquals(a.Status, statusFilter); - }).ToArray(Object); - - return Dashboard.React.Elements.Div("data-list", void 0, void 0, void 0, System.Linq.Enumerable.from(filtered, Object).select(function (a) { - return Dashboard.Pages.AppointmentsPage.RenderAppointmentCard(a, onEditAppointment); - }).ToArray(Object)); - }, - RenderAppointmentCard: function (appointment, onEditAppointment) { - var $t; - var descElement; - if (appointment.Description != null) { - descElement = Dashboard.React.Elements.P("text-sm mt-2", void 0, System.Array.init([Dashboard.React.Elements.Text(appointment.Description)], Object)); - } else { - descElement = Dashboard.React.Elements.Text(""); - } - - return Dashboard.React.Elements.Div("card-glass mb-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-start gap-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("metric-icon blue", void 0, { width: "60px", height: "60px" }, void 0, System.Array.init([Dashboard.React.Elements.Div("text-center", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("text-lg font-bold", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(Dashboard.Pages.AppointmentsPage.FormatTime(appointment.StartTime))], Object)), Dashboard.React.Elements.Div("text-xs", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(appointment.MinutesDuration + "min")], Object))], Object))], Object)), Dashboard.React.Elements.Div("flex-1", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(4, "font-semibold", System.Array.init([Dashboard.React.Elements.Text(($t = appointment.ServiceType, $t != null ? $t : "Appointment"))], Object)), Dashboard.Pages.AppointmentsPage.RenderStatusBadge(appointment.Status), Dashboard.Pages.AppointmentsPage.RenderPriorityBadge(appointment.Priority)], Object)), Dashboard.React.Elements.Div("text-sm text-gray-600 mt-1", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.Users(), Dashboard.React.Elements.Text(" Patient: " + (Dashboard.Pages.AppointmentsPage.FormatReference(appointment.PatientReference) || ""))], Object)), Dashboard.React.Elements.Div("text-sm text-gray-600", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.UserDoctor(), Dashboard.React.Elements.Text(" Provider: " + (Dashboard.Pages.AppointmentsPage.FormatReference(appointment.PractitionerReference) || ""))], Object)), descElement], Object)), Dashboard.React.Elements.Div("flex flex-col gap-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Button("btn btn-primary btn-sm", void 0, false, "button", System.Array.init([Dashboard.React.Elements.Text("Check In")], Object)), Dashboard.React.Elements.Button("btn btn-secondary btn-sm", function () { - onEditAppointment(appointment.Id); - }, false, "button", System.Array.init([Dashboard.Components.Icons.Edit()], Object))], Object))], Object))], Object)); - }, - RenderStatusBadge: function (status) { - var badgeClass; - if (H5.referenceEquals(status, "booked")) { - badgeClass = "badge-primary"; - } else { - if (H5.referenceEquals(status, "arrived")) { - badgeClass = "badge-teal"; - } else { - if (H5.referenceEquals(status, "fulfilled")) { - badgeClass = "badge-success"; - } else { - if (H5.referenceEquals(status, "cancelled")) { - badgeClass = "badge-error"; - } else { - if (H5.referenceEquals(status, "noshow")) { - badgeClass = "badge-warning"; - } else { - badgeClass = "badge-gray"; - } - } - } - } - } - - return Dashboard.React.Elements.Span("badge " + (badgeClass || ""), void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(status)], Object)); - }, - RenderPriorityBadge: function (priority) { - if (H5.referenceEquals(priority, "routine")) { - return Dashboard.React.Elements.Text(""); - } - - var badgeClass; - if (H5.referenceEquals(priority, "urgent")) { - badgeClass = "badge-warning"; - } else { - if (H5.referenceEquals(priority, "asap")) { - badgeClass = "badge-error"; - } else { - if (H5.referenceEquals(priority, "stat")) { - badgeClass = "badge-error"; - } else { - badgeClass = "badge-gray"; - } - } - } - - return Dashboard.React.Elements.Span("badge " + (badgeClass || ""), void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(priority.toUpperCase())], Object)); - }, - FormatTime: function (dateTime) { - if (System.String.isNullOrEmpty(dateTime)) { - return "N/A"; - } - if (dateTime.length > 16) { - return dateTime.substr(11, 5); - } - return dateTime; - }, - FormatReference: function (reference) { - var parts = System.String.split(reference, [47].map(function (i) {{ return String.fromCharCode(i); }})); - if (parts.length > 1) { - var id = parts[System.Array.index(1, parts)]; - var length = Math.min(8, id.length); - return (id.substr(0, length) || "") + "..."; - } - return reference; - } - } - } - }); - - /** - * Appointments page state class. - * - * @public - * @class Dashboard.Pages.AppointmentsState - */ - H5.define("Dashboard.Pages.AppointmentsState", { - fields: { - /** - * List of appointments. - * - * @instance - * @public - * @memberof Dashboard.Pages.AppointmentsState - * @function Appointments - * @type Array. - */ - Appointments: null, - /** - * Whether loading. - * - * @instance - * @public - * @memberof Dashboard.Pages.AppointmentsState - * @function Loading - * @type boolean - */ - Loading: false, - /** - * Error message if any. - * - * @instance - * @public - * @memberof Dashboard.Pages.AppointmentsState - * @function Error - * @type string - */ - Error: null, - /** - * Current status filter. - * - * @instance - * @public - * @memberof Dashboard.Pages.AppointmentsState - * @function StatusFilter - * @type string - */ - StatusFilter: null - } - }); - - /** - * Calendar-based schedule view page. - * - * @static - * @abstract - * @public - * @class Dashboard.Pages.CalendarPage - */ - H5.define("Dashboard.Pages.CalendarPage", { - statics: { - fields: { - MonthNames: null, - DayNames: null - }, - ctors: { - init: function () { - this.MonthNames = System.Array.init(["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], System.String); - this.DayNames = System.Array.init(["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], System.String); - } - }, - methods: { - /** - * Renders the calendar page. - * - * @static - * @public - * @this Dashboard.Pages.CalendarPage - * @memberof Dashboard.Pages.CalendarPage - * @param {System.Action} onEditAppointment - * @return {Object} - */ - Render: function (onEditAppointment) { - var $t; - var now = System.DateTime.getNow(); - var stateResult = Dashboard.React.Hooks.UseState(Dashboard.Pages.CalendarState, ($t = new Dashboard.Pages.CalendarState(), $t.Appointments = System.Array.init(0, null, Object), $t.Loading = true, $t.Error = null, $t.Year = System.DateTime.getYear(now), $t.Month = System.DateTime.getMonth(now), $t.SelectedDay = 0, $t)); - - var state = stateResult.State; - var setState = stateResult.SetState; - - Dashboard.React.Hooks.UseEffect$1(function () { - Dashboard.Pages.CalendarPage.LoadAppointments(setState, state); - }, System.Array.init(0, null, System.Object)); - - return Dashboard.React.Elements.Div("page", void 0, void 0, void 0, System.Array.init([Dashboard.Pages.CalendarPage.RenderHeader(state, setState), state.Loading ? Dashboard.Pages.CalendarPage.RenderLoadingState() : state.Error != null ? Dashboard.Pages.CalendarPage.RenderError(state.Error) : Dashboard.Pages.CalendarPage.RenderCalendarContent(state, setState, onEditAppointment)], Object)); - }, - LoadAppointments: function (setState, currentState) { - (async () => { - { - var $t; - try { - var appointments = (await H5.toPromise(Dashboard.Api.ApiClient.GetAppointmentsAsync())); - setState(($t = new Dashboard.Pages.CalendarState(), $t.Appointments = appointments, $t.Loading = false, $t.Error = null, $t.Year = currentState.Year, $t.Month = currentState.Month, $t.SelectedDay = currentState.SelectedDay, $t)); - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t = new Dashboard.Pages.CalendarState(), $t.Appointments = System.Array.init(0, null, Object), $t.Loading = false, $t.Error = ex.Message, $t.Year = currentState.Year, $t.Month = currentState.Month, $t.SelectedDay = currentState.SelectedDay, $t)); - } - }})() - }, - RenderHeader: function (state, setState) { - var monthName = Dashboard.Pages.CalendarPage.MonthNames[System.Array.index(((state.Month - 1) | 0), Dashboard.Pages.CalendarPage.MonthNames)]; - return Dashboard.React.Elements.Div("page-header flex justify-between items-center mb-6", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(2, "page-title", System.Array.init([Dashboard.React.Elements.Text("Schedule")], Object)), Dashboard.React.Elements.P("page-description", void 0, System.Array.init([Dashboard.React.Elements.Text("View and manage appointments on the calendar")], Object))], Object)), Dashboard.React.Elements.Div("flex items-center gap-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Button("btn btn-secondary btn-sm", function () { - Dashboard.Pages.CalendarPage.NavigateMonth(state, setState, -1); - }, false, "button", System.Array.init([Dashboard.Components.Icons.ChevronLeft()], Object)), Dashboard.React.Elements.Span("text-lg font-semibold", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text((monthName || "") + " " + state.Year)], Object)), Dashboard.React.Elements.Button("btn btn-secondary btn-sm", function () { - Dashboard.Pages.CalendarPage.NavigateMonth(state, setState, 1); - }, false, "button", System.Array.init([Dashboard.Components.Icons.ChevronRight()], Object)), Dashboard.React.Elements.Button("btn btn-primary btn-sm ml-4", function () { - Dashboard.Pages.CalendarPage.GoToToday(state, setState); - }, false, "button", System.Array.init([Dashboard.React.Elements.Text("Today")], Object))], Object))], Object)); - }, - NavigateMonth: function (state, setState, delta) { - var $t; - var newMonth = (state.Month + delta) | 0; - var newYear = state.Year; - - if (newMonth < 1) { - newMonth = 12; - newYear = (newYear - 1) | 0; - } else if (newMonth > 12) { - newMonth = 1; - newYear = (newYear + 1) | 0; - } - - setState(($t = new Dashboard.Pages.CalendarState(), $t.Appointments = state.Appointments, $t.Loading = state.Loading, $t.Error = state.Error, $t.Year = newYear, $t.Month = newMonth, $t.SelectedDay = 0, $t)); - }, - GoToToday: function (state, setState) { - var $t; - var now = System.DateTime.getNow(); - setState(($t = new Dashboard.Pages.CalendarState(), $t.Appointments = state.Appointments, $t.Loading = state.Loading, $t.Error = state.Error, $t.Year = System.DateTime.getYear(now), $t.Month = System.DateTime.getMonth(now), $t.SelectedDay = System.DateTime.getDay(now), $t)); - }, - RenderLoadingState: function () { - return Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center justify-center p-8", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Loading calendar...")], Object))], Object)); - }, - RenderError: function (message) { - return Dashboard.React.Elements.Div("card", void 0, { borderLeft: "4px solid var(--error)" }, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-3 p-4", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.X(), Dashboard.React.Elements.Text("Error loading appointments: " + (message || ""))], Object))], Object)); - }, - RenderCalendarContent: function (state, setState, onEditAppointment) { - return Dashboard.React.Elements.Div("flex gap-6", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex-1", void 0, void 0, void 0, System.Array.init([Dashboard.Pages.CalendarPage.RenderCalendarGrid(state, setState)], Object)), state.SelectedDay > 0 ? Dashboard.Pages.CalendarPage.RenderDayDetails(state, setState, onEditAppointment) : Dashboard.Pages.CalendarPage.RenderNoSelection()], Object)); - }, - RenderCalendarGrid: function (state, setState) { - var daysInMonth = System.DateTime.getDaysInMonth(state.Year, state.Month); - var firstDay = System.DateTime.create(state.Year, state.Month, 1); - var startDayOfWeek = System.DateTime.getDayOfWeek(firstDay); - - var headerCells = System.Linq.Enumerable.from(Dashboard.Pages.CalendarPage.DayNames, System.String).select(function (day) { - return Dashboard.React.Elements.Div("calendar-header-cell text-center font-semibold p-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(day)], Object)); - }).ToArray(Object); - - var dayCells = System.Array.init(42, null, Object); - var today = System.DateTime.getNow(); - - for (var i = 0; i < 42; i = (i + 1) | 0) { - var dayNum = (((i - startDayOfWeek) | 0) + 1) | 0; - if (dayNum < 1 || dayNum > daysInMonth) { - dayCells[System.Array.index(i, dayCells)] = Dashboard.React.Elements.Div("calendar-cell empty", void 0, void 0, void 0, System.Array.init(0, null, Object)); - } else { - var appointments = Dashboard.Pages.CalendarPage.GetAppointmentsForDay(state.Appointments, state.Year, state.Month, dayNum); - var isToday = state.Year === System.DateTime.getYear(today) && state.Month === System.DateTime.getMonth(today) && dayNum === System.DateTime.getDay(today); - var isSelected = dayNum === state.SelectedDay; - var dayNumCaptured = { v : dayNum }; - - var cellClasses = "calendar-cell"; - if (isToday) { - cellClasses = (cellClasses || "") + " today"; - } - if (isSelected) { - cellClasses = (cellClasses || "") + " selected"; - } - if (appointments.length > 0) { - cellClasses = (cellClasses || "") + " has-appointments"; - } - - dayCells[System.Array.index(i, dayCells)] = Dashboard.React.Elements.Div(cellClasses, void 0, void 0, (function ($me, dayNumCaptured) { - return function () { - Dashboard.Pages.CalendarPage.SelectDay(state, setState, dayNumCaptured.v); - }; - })(this, dayNumCaptured), System.Array.init([Dashboard.React.Elements.Div("calendar-day-number", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(H5.toString(dayNum))], Object)), appointments.length > 0 ? Dashboard.React.Elements.Div("calendar-appointments-preview", void 0, void 0, void 0, System.Linq.Enumerable.from(appointments, Object).take(3).select(function (a) { - return Dashboard.Pages.CalendarPage.RenderAppointmentDot(a); - }).ToArray(Object)) : null, appointments.length > 3 ? Dashboard.React.Elements.Span("calendar-more-indicator", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("+" + (((appointments.length - 3) | 0)))], Object)) : null], Object)); - } - } - - return Dashboard.React.Elements.Div("card calendar-grid-container", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("calendar-grid-header grid grid-cols-7", void 0, void 0, void 0, headerCells), Dashboard.React.Elements.Div("calendar-grid grid grid-cols-7", void 0, void 0, void 0, dayCells)], Object)); - }, - RenderAppointmentDot: function (appointment) { - var dotClass = "calendar-dot"; - if (H5.referenceEquals(appointment.Status, "booked")) { - dotClass = (dotClass || "") + " blue"; - } else { - if (H5.referenceEquals(appointment.Status, "arrived")) { - dotClass = (dotClass || "") + " teal"; - } else { - if (H5.referenceEquals(appointment.Status, "fulfilled")) { - dotClass = (dotClass || "") + " green"; - } else { - if (H5.referenceEquals(appointment.Status, "cancelled")) { - dotClass = (dotClass || "") + " red"; - } else { - dotClass = (dotClass || "") + " gray"; - } - } - } - } - - return Dashboard.React.Elements.Span(dotClass, void 0, void 0); - }, - SelectDay: function (state, setState, day) { - var $t; - setState(($t = new Dashboard.Pages.CalendarState(), $t.Appointments = state.Appointments, $t.Loading = state.Loading, $t.Error = state.Error, $t.Year = state.Year, $t.Month = state.Month, $t.SelectedDay = day, $t)); - }, - GetAppointmentsForDay: function (appointments, year, month, day) { - var targetDate = System.DateTime.format(System.DateTime.create(year, month, day), "yyyy-MM-dd"); - return System.Linq.Enumerable.from(appointments, Object).where(function (a) { - return a.StartTime != null && System.String.startsWith(a.StartTime, targetDate); - }).orderBy(function (a) { - return a.StartTime; - }).ToArray(Object); - }, - RenderNoSelection: function () { - return Dashboard.React.Elements.Div("card calendar-details-panel", void 0, { width: "320px", minHeight: "400px" }, void 0, System.Array.init([Dashboard.React.Elements.Div("empty-state p-6", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.Calendar(), Dashboard.React.Elements.H(4, "empty-state-title mt-4", System.Array.init([Dashboard.React.Elements.Text("Select a Day")], Object)), Dashboard.React.Elements.P("empty-state-description", void 0, System.Array.init([Dashboard.React.Elements.Text("Click on a day to view appointments")], Object))], Object))], Object)); - }, - RenderDayDetails: function (state, setState, onEditAppointment) { - var appointments = Dashboard.Pages.CalendarPage.GetAppointmentsForDay(state.Appointments, state.Year, state.Month, state.SelectedDay); - - var monthName = Dashboard.Pages.CalendarPage.MonthNames[System.Array.index(((state.Month - 1) | 0), Dashboard.Pages.CalendarPage.MonthNames)]; - var dateStr = (monthName || "") + " " + state.SelectedDay + ", " + state.Year; - - return Dashboard.React.Elements.Div("card calendar-details-panel", void 0, { width: "320px", minHeight: "400px" }, void 0, System.Array.init([Dashboard.React.Elements.Div("flex justify-between items-center mb-4 p-4 border-b", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(4, "font-semibold", System.Array.init([Dashboard.React.Elements.Text(dateStr)], Object)), Dashboard.React.Elements.Button("btn btn-secondary btn-sm", function () { - Dashboard.Pages.CalendarPage.SelectDay(state, setState, 0); - }, false, "button", System.Array.init([Dashboard.Components.Icons.X()], Object))], Object)), appointments.length === 0 ? Dashboard.React.Elements.Div("empty-state p-6", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.Calendar(), Dashboard.React.Elements.P("empty-state-description mt-4", void 0, System.Array.init([Dashboard.React.Elements.Text("No appointments scheduled")], Object))], Object)) : Dashboard.React.Elements.Div("p-4 space-y-3", void 0, void 0, void 0, System.Linq.Enumerable.from(appointments, Object).select(function (a) { - return Dashboard.Pages.CalendarPage.RenderDayAppointment(a, onEditAppointment); - }).ToArray(Object))], Object)); - }, - RenderDayAppointment: function (appointment, onEditAppointment) { - var $t, $t1; - var time = Dashboard.Pages.CalendarPage.FormatTime(appointment.StartTime); - var endTime = Dashboard.Pages.CalendarPage.FormatTime(appointment.EndTime); - var statusClass = Dashboard.Pages.CalendarPage.GetStatusClass(appointment.Status); - - return Dashboard.React.Elements.Div("calendar-appointment-item p-3 rounded-lg border", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex justify-between items-start mb-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("font-semibold", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(($t = appointment.ServiceType, $t != null ? $t : "Appointment"))], Object)), Dashboard.React.Elements.Div("text-sm text-gray-500", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text((time || "") + " - " + (endTime || ""))], Object))], Object)), Dashboard.React.Elements.Span("badge " + (statusClass || ""), void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(($t1 = appointment.Status, $t1 != null ? $t1 : "unknown"))], Object))], Object)), Dashboard.React.Elements.Div("text-sm text-gray-600 mb-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Patient: " + (Dashboard.Pages.CalendarPage.FormatReference(appointment.PatientReference) || ""))], Object)), Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Provider: " + (Dashboard.Pages.CalendarPage.FormatReference(appointment.PractitionerReference) || ""))], Object))], Object)), Dashboard.React.Elements.Div("flex gap-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Button("btn btn-primary btn-sm flex-1", function () { - onEditAppointment(appointment.Id); - }, false, "button", System.Array.init([Dashboard.Components.Icons.Edit(), Dashboard.React.Elements.Text("Edit")], Object))], Object))], Object)); - }, - FormatTime: function (dateTime) { - if (System.String.isNullOrEmpty(dateTime)) { - return "N/A"; - } - if (dateTime.length > 16) { - return dateTime.substr(11, 5); - } - return dateTime; - }, - FormatReference: function (reference) { - if (System.String.isNullOrEmpty(reference)) { - return "N/A"; - } - var parts = System.String.split(reference, [47].map(function (i) {{ return String.fromCharCode(i); }})); - if (parts.length > 1) { - var id = parts[System.Array.index(1, parts)]; - var length = Math.min(8, id.length); - return (id.substr(0, length) || "") + "..."; - } - return reference; - }, - GetStatusClass: function (status) { - if (H5.referenceEquals(status, "booked")) { - return "badge-primary"; - } - if (H5.referenceEquals(status, "arrived")) { - return "badge-teal"; - } - if (H5.referenceEquals(status, "fulfilled")) { - return "badge-success"; - } - if (H5.referenceEquals(status, "cancelled")) { - return "badge-error"; - } - if (H5.referenceEquals(status, "noshow")) { - return "badge-warning"; - } - return "badge-gray"; - } - } - } - }); - - /** - * Calendar page state class. - * - * @public - * @class Dashboard.Pages.CalendarState - */ - H5.define("Dashboard.Pages.CalendarState", { - fields: { - /** - * List of appointments. - * - * @instance - * @public - * @memberof Dashboard.Pages.CalendarState - * @function Appointments - * @type Array. - */ - Appointments: null, - /** - * Whether loading. - * - * @instance - * @public - * @memberof Dashboard.Pages.CalendarState - * @function Loading - * @type boolean - */ - Loading: false, - /** - * Error message if any. - * - * @instance - * @public - * @memberof Dashboard.Pages.CalendarState - * @function Error - * @type string - */ - Error: null, - /** - * Current view year. - * - * @instance - * @public - * @memberof Dashboard.Pages.CalendarState - * @function Year - * @type number - */ - Year: 0, - /** - * Current view month (1-12). - * - * @instance - * @public - * @memberof Dashboard.Pages.CalendarState - * @function Month - * @type number - */ - Month: 0, - /** - * Selected day for details view. - * - * @instance - * @public - * @memberof Dashboard.Pages.CalendarState - * @function SelectedDay - * @type number - */ - SelectedDay: 0 - } - }); - - /** - * Clinical coding page for ICD-10 code lookup and search. - * - * @static - * @abstract - * @public - * @class Dashboard.Pages.ClinicalCodingPage - */ - H5.define("Dashboard.Pages.ClinicalCodingPage", { - statics: { - methods: { - /** - * Renders the clinical coding page. - * - * @static - * @public - * @this Dashboard.Pages.ClinicalCodingPage - * @memberof Dashboard.Pages.ClinicalCodingPage - * @return {Object} - */ - Render: function () { - var $t; - var stateResult = Dashboard.React.Hooks.UseState(Dashboard.Pages.ClinicalCodingState, ($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = "", $t.SearchMode = "keyword", $t.Icd10Results = System.Array.init(0, null, Object), $t.AchiResults = System.Array.init(0, null, Object), $t.SemanticResults = System.Array.init(0, null, Object), $t.SelectedCode = null, $t.Loading = false, $t.Error = null, $t.IncludeAchi = false, $t.CopiedCode = null, $t)); - - var state = stateResult.State; - var setState = stateResult.SetState; - - return Dashboard.React.Elements.Div("page clinical-coding-page", void 0, void 0, void 0, System.Array.init([Dashboard.Pages.ClinicalCodingPage.RenderHeader(), Dashboard.Pages.ClinicalCodingPage.RenderSearchSection(state, setState), Dashboard.Pages.ClinicalCodingPage.RenderContent(state, setState)], Object)); - }, - RenderHeader: function () { - return Dashboard.React.Elements.Div("page-header", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-3", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("page-header-icon", void 0, { background: "linear-gradient(135deg, #3b82f6, #8b5cf6)", borderRadius: "12px", padding: "12px", display: "flex", alignItems: "center", justifyContent: "center" }, void 0, System.Array.init([Dashboard.Components.Icons.Code()], Object)), Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(2, "page-title", System.Array.init([Dashboard.React.Elements.Text("Clinical Coding")], Object)), Dashboard.React.Elements.P("page-description", void 0, System.Array.init([Dashboard.React.Elements.Text("Search ICD-10-AM diagnosis codes and ACHI procedure codes")], Object))], Object))], Object))], Object)); - }, - RenderSearchSection: function (state, setState) { - return Dashboard.React.Elements.Div("card mb-6", void 0, { padding: "24px" }, void 0, System.Array.init([Dashboard.Pages.ClinicalCodingPage.RenderSearchTabs(state, setState), Dashboard.Pages.ClinicalCodingPage.RenderSearchInput(state, setState), Dashboard.Pages.ClinicalCodingPage.RenderSearchOptions(state, setState)], Object)); - }, - RenderSearchTabs: function (state, setState) { - return Dashboard.React.Elements.Div("flex gap-2 mb-4", void 0, void 0, void 0, System.Array.init([Dashboard.Pages.ClinicalCodingPage.RenderTab("Keyword Search", Dashboard.Components.Icons.Search, H5.referenceEquals(state.SearchMode, "keyword"), function () { - Dashboard.Pages.ClinicalCodingPage.SetSearchMode(state, setState, "keyword"); - }), Dashboard.Pages.ClinicalCodingPage.RenderTab("AI Search", Dashboard.Components.Icons.Sparkles, H5.referenceEquals(state.SearchMode, "semantic"), function () { - Dashboard.Pages.ClinicalCodingPage.SetSearchMode(state, setState, "semantic"); - }), Dashboard.Pages.ClinicalCodingPage.RenderTab("Code Lookup", Dashboard.Components.Icons.FileText, H5.referenceEquals(state.SearchMode, "lookup"), function () { - Dashboard.Pages.ClinicalCodingPage.SetSearchMode(state, setState, "lookup"); - })], Object)); - }, - RenderTab: function (label, icon, isActive, onClick) { - return Dashboard.React.Elements.Button("btn " + ((isActive ? "btn-primary" : "btn-secondary") || ""), onClick, false, "button", System.Array.init([icon(), Dashboard.React.Elements.Text(label)], Object)); - }, - SetSearchMode: function (state, setState, mode) { - var $t; - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = state.SearchQuery, $t.SearchMode = mode, $t.Icd10Results = System.Array.init(0, null, Object), $t.AchiResults = System.Array.init(0, null, Object), $t.SemanticResults = System.Array.init(0, null, Object), $t.SelectedCode = null, $t.Loading = false, $t.Error = null, $t.IncludeAchi = state.IncludeAchi, $t.CopiedCode = null, $t)); - }, - RenderSearchInput: function (state, setState) { - var placeholder = Dashboard.Pages.ClinicalCodingPage.GetPlaceholder(state.SearchMode); - - return Dashboard.React.Elements.Div("flex gap-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex-1 search-input search-input-lg", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("search-icon", void 0, void 0, System.Array.init([Dashboard.Components.Icons.Search()], Object)), Dashboard.React.Elements.Input("input input-lg", "text", state.SearchQuery, placeholder, function (query) { - Dashboard.Pages.ClinicalCodingPage.UpdateQuery(state, setState, query); - }, function (key) { - if (H5.referenceEquals(key, "Enter")) { - Dashboard.Pages.ClinicalCodingPage.ExecuteSearch(state, setState); - } - }, false)], Object)), Dashboard.React.Elements.Button("btn btn-primary btn-lg", function () { - Dashboard.Pages.ClinicalCodingPage.ExecuteSearch(state, setState); - }, false, "button", System.Array.init([state.Loading ? Dashboard.Components.Icons.Refresh() : Dashboard.Components.Icons.Search(), Dashboard.React.Elements.Text(state.Loading ? "Searching..." : "Search")], Object))], Object)); - }, - GetPlaceholder: function (mode) { - if (H5.referenceEquals(mode, "keyword")) { - return "Search by code, description, or keywords (e.g., 'diabetes', 'fracture')"; - } - if (H5.referenceEquals(mode, "semantic")) { - return "Describe symptoms or conditions in natural language..."; - } - return "Enter ICD-10 code or prefix (e.g., 'O9A.', 'E11', 'J18.9')"; - }, - UpdateQuery: function (state, setState, query) { - var $t; - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = query, $t.SearchMode = state.SearchMode, $t.Icd10Results = state.Icd10Results, $t.AchiResults = state.AchiResults, $t.SemanticResults = state.SemanticResults, $t.SelectedCode = state.SelectedCode, $t.Loading = state.Loading, $t.Error = state.Error, $t.IncludeAchi = state.IncludeAchi, $t.CopiedCode = state.CopiedCode, $t)); - }, - RenderSearchOptions: function (state, setState) { - if (!H5.referenceEquals(state.SearchMode, "semantic")) { - return Dashboard.React.Elements.Text(""); - } - - return Dashboard.React.Elements.Div("flex items-center gap-4 mt-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Label(void 0, "flex items-center gap-2 cursor-pointer", System.Array.init([Dashboard.React.Elements.Input("checkbox", "checkbox", state.IncludeAchi ? "true" : "", void 0, function (_) { - Dashboard.Pages.ClinicalCodingPage.ToggleAchi(state, setState); - }, void 0, false), Dashboard.React.Elements.Span(void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Include ACHI procedure codes")], Object))], Object)), Dashboard.React.Elements.Span("text-sm text-gray-500", void 0, void 0, System.Array.init([Dashboard.Components.Icons.Sparkles(), Dashboard.React.Elements.Text(" Powered by medical AI embeddings")], Object))], Object)); - }, - ToggleAchi: function (state, setState) { - var $t; - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = state.SearchQuery, $t.SearchMode = state.SearchMode, $t.Icd10Results = state.Icd10Results, $t.AchiResults = state.AchiResults, $t.SemanticResults = state.SemanticResults, $t.SelectedCode = state.SelectedCode, $t.Loading = state.Loading, $t.Error = state.Error, $t.IncludeAchi = !state.IncludeAchi, $t.CopiedCode = state.CopiedCode, $t)); - }, - ExecuteSearch: function (state, setState) { - (async () => { - { - var $t, $t1; - if (System.String.isNullOrWhiteSpace(state.SearchQuery)) { - return; - } - - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = state.SearchQuery, $t.SearchMode = state.SearchMode, $t.Icd10Results = System.Array.init(0, null, Object), $t.AchiResults = System.Array.init(0, null, Object), $t.SemanticResults = System.Array.init(0, null, Object), $t.SelectedCode = null, $t.Loading = true, $t.Error = null, $t.IncludeAchi = state.IncludeAchi, $t.CopiedCode = null, $t)); - - try { - if (H5.referenceEquals(state.SearchMode, "keyword")) { - var results = (await H5.toPromise(Dashboard.Api.ApiClient.SearchIcd10CodesAsync(state.SearchQuery, 50))); - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = state.SearchQuery, $t.SearchMode = state.SearchMode, $t.Icd10Results = results, $t.AchiResults = System.Array.init(0, null, Object), $t.SemanticResults = System.Array.init(0, null, Object), $t.SelectedCode = null, $t.Loading = false, $t.Error = null, $t.IncludeAchi = state.IncludeAchi, $t.CopiedCode = null, $t)); - } else if (H5.referenceEquals(state.SearchMode, "semantic")) { - var results1 = (await H5.toPromise(Dashboard.Api.ApiClient.SemanticSearchAsync(state.SearchQuery, 20, state.IncludeAchi))); - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = state.SearchQuery, $t.SearchMode = state.SearchMode, $t.Icd10Results = System.Array.init(0, null, Object), $t.AchiResults = System.Array.init(0, null, Object), $t.SemanticResults = results1, $t.SelectedCode = null, $t.Loading = false, $t.Error = null, $t.IncludeAchi = state.IncludeAchi, $t.CopiedCode = null, $t)); - } else { - var allResults = (await H5.toPromise(Dashboard.Api.ApiClient.SearchIcd10CodesAsync(state.SearchQuery, 100))); - - var query = state.SearchQuery.toUpperCase(); - var matchingCodes = new (System.Collections.Generic.List$1(Object)).ctor(); - $t = H5.getEnumerator(allResults); - try { - while ($t.moveNext()) { - var c = $t.Current; - if (c.Code != null && System.String.startsWith(c.Code.toUpperCase(), query)) { - matchingCodes.add(c); - } - } - } finally { - if (H5.is($t, System.IDisposable)) { - $t.System$IDisposable$Dispose(); - } - } - - if (matchingCodes.Count === 1) { - var fullCode = (await H5.toPromise(Dashboard.Api.ApiClient.GetIcd10CodeAsync(matchingCodes.getItem(0).Code))); - setState(($t1 = new Dashboard.Pages.ClinicalCodingState(), $t1.SearchQuery = state.SearchQuery, $t1.SearchMode = state.SearchMode, $t1.Icd10Results = System.Array.init(0, null, Object), $t1.AchiResults = System.Array.init(0, null, Object), $t1.SemanticResults = System.Array.init(0, null, Object), $t1.SelectedCode = fullCode, $t1.Loading = false, $t1.Error = null, $t1.IncludeAchi = state.IncludeAchi, $t1.CopiedCode = null, $t1)); - } else { - setState(($t1 = new Dashboard.Pages.ClinicalCodingState(), $t1.SearchQuery = state.SearchQuery, $t1.SearchMode = state.SearchMode, $t1.Icd10Results = matchingCodes.ToArray(), $t1.AchiResults = System.Array.init(0, null, Object), $t1.SemanticResults = System.Array.init(0, null, Object), $t1.SelectedCode = null, $t1.Loading = false, $t1.Error = null, $t1.IncludeAchi = state.IncludeAchi, $t1.CopiedCode = null, $t1)); - } - } - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t1 = new Dashboard.Pages.ClinicalCodingState(), $t1.SearchQuery = state.SearchQuery, $t1.SearchMode = state.SearchMode, $t1.Icd10Results = System.Array.init(0, null, Object), $t1.AchiResults = System.Array.init(0, null, Object), $t1.SemanticResults = System.Array.init(0, null, Object), $t1.SelectedCode = null, $t1.Loading = false, $t1.Error = ex.Message, $t1.IncludeAchi = state.IncludeAchi, $t1.CopiedCode = null, $t1)); - } - }})() - }, - RenderContent: function (state, setState) { - if (state.Loading) { - return Dashboard.Pages.ClinicalCodingPage.RenderLoading(); - } - - if (state.Error != null) { - return Dashboard.Pages.ClinicalCodingPage.RenderError(state.Error); - } - - if (state.SelectedCode != null) { - return Dashboard.Pages.ClinicalCodingPage.RenderCodeDetail(state, setState); - } - - if (state.SemanticResults.length > 0) { - return Dashboard.Pages.ClinicalCodingPage.RenderSemanticResults(state, setState); - } - - if (state.Icd10Results.length > 0) { - return Dashboard.Pages.ClinicalCodingPage.RenderKeywordResults(state, setState); - } - - if (H5.referenceEquals(state.SearchMode, "lookup") && !System.String.isNullOrWhiteSpace(state.SearchQuery) && !state.Loading) { - return Dashboard.Pages.ClinicalCodingPage.RenderNoResults(state.SearchQuery); - } - - return Dashboard.Pages.ClinicalCodingPage.RenderEmptyState(state); - }, - RenderNoResults: function (query) { - return Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("empty-state", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, { background: "linear-gradient(135deg, #6b7280, #9ca3af)", borderRadius: "16px", padding: "20px", marginBottom: "16px" }, void 0, System.Array.init([Dashboard.Components.Icons.Search()], Object)), Dashboard.React.Elements.H(4, "empty-state-title", System.Array.init([Dashboard.React.Elements.Text("No codes found")], Object)), Dashboard.React.Elements.P("empty-state-description", void 0, System.Array.init([Dashboard.React.Elements.Text("No ICD-10 codes match '" + (query || "") + "'. Try a different code or use keyword search.")], Object))], Object))], Object)); - }, - RenderLoading: function () { - return Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center justify-center p-12", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("loading-spinner", void 0, { width: "48px", height: "48px", border: "4px solid #e5e7eb", borderTop: "4px solid #3b82f6", borderRadius: "50%", animation: "spin 1s linear infinite" }, void 0)], Object))], Object)); - }, - RenderError: function (error) { - return Dashboard.React.Elements.Div("card", void 0, { borderLeft: "4px solid var(--error)" }, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-3 p-4", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.X(), Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(4, "font-semibold", System.Array.init([Dashboard.React.Elements.Text("Search Error")], Object)), Dashboard.React.Elements.P("text-sm text-gray-600", void 0, System.Array.init([Dashboard.React.Elements.Text(error)], Object)), Dashboard.React.Elements.P("text-sm text-gray-500 mt-2", void 0, System.Array.init([Dashboard.React.Elements.Text("Make sure the ICD-10 API (port 5090) is running.")], Object))], Object))], Object))], Object)); - }, - RenderEmptyState: function (state) { - var title = Dashboard.Pages.ClinicalCodingPage.GetEmptyTitle(state.SearchMode); - var description = Dashboard.Pages.ClinicalCodingPage.GetEmptyDescription(state.SearchMode); - - return Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("empty-state", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, { background: "linear-gradient(135deg, #3b82f6, #8b5cf6)", borderRadius: "16px", padding: "20px", marginBottom: "16px" }, void 0, System.Array.init([Dashboard.Components.Icons.Code()], Object)), Dashboard.React.Elements.H(4, "empty-state-title", System.Array.init([Dashboard.React.Elements.Text(title)], Object)), Dashboard.React.Elements.P("empty-state-description", void 0, System.Array.init([Dashboard.React.Elements.Text(description)], Object)), Dashboard.Pages.ClinicalCodingPage.RenderQuickSearches(state)], Object))], Object)); - }, - GetEmptyTitle: function (mode) { - if (H5.referenceEquals(mode, "semantic")) { - return "AI-Powered Code Search"; - } - if (H5.referenceEquals(mode, "lookup")) { - return "Direct Code Lookup"; - } - return "ICD-10-AM Code Search"; - }, - GetEmptyDescription: function (mode) { - if (H5.referenceEquals(mode, "semantic")) { - return "Describe symptoms in natural language and let AI find the right codes."; - } - if (H5.referenceEquals(mode, "lookup")) { - return "Enter an ICD-10 code or prefix to find matching codes (e.g., 'O9A.' lists all O9A codes)."; - } - return "Search diagnosis codes by keyword, description, or code fragment."; - }, - RenderQuickSearches: function (state) { - if (H5.referenceEquals(state.SearchMode, "lookup")) { - return Dashboard.React.Elements.Text(""); - } - - var examples; - if (H5.referenceEquals(state.SearchMode, "semantic")) { - examples = System.Array.init(["Patient with chest pain and shortness of breath", "Type 2 diabetes with kidney complications", "Broken arm from fall", "Chronic lower back pain"], System.String); - } else { - examples = System.Array.init(["diabetes", "pneumonia", "fracture", "hypertension"], System.String); - } - - var buttons = System.Array.init(examples.length, null, Object); - for (var i = 0; i < examples.length; i = (i + 1) | 0) { - var example = examples[System.Array.index(i, examples)]; - buttons[System.Array.index(i, buttons)] = Dashboard.React.Elements.Button("btn btn-ghost btn-sm", function () { }, false, "button", System.Array.init([Dashboard.React.Elements.Text(example)], Object)); - } - - return Dashboard.React.Elements.Div("flex flex-wrap gap-2 mt-4", void 0, void 0, void 0, Dashboard.Pages.ClinicalCodingPage.Concat(System.Array.init([Dashboard.React.Elements.Span("text-sm text-gray-500", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Try: ")], Object))], Object), buttons)); - }, - Concat: function (arr1, arr2) { - var result = System.Array.init(((arr1.length + arr2.length) | 0), null, Object); - for (var i = 0; i < arr1.length; i = (i + 1) | 0) { - result[System.Array.index(i, result)] = arr1[System.Array.index(i, arr1)]; - } - for (var i1 = 0; i1 < arr2.length; i1 = (i1 + 1) | 0) { - result[System.Array.index(((arr1.length + i1) | 0), result)] = arr2[System.Array.index(i1, arr2)]; - } - return result; - }, - RenderKeywordResults: function (state, setState) { - var $t; - var resultRows = System.Array.init(state.Icd10Results.length, null, Object); - for (var i = 0; i < state.Icd10Results.length; i = (i + 1) | 0) { - var code = ($t = state.Icd10Results)[System.Array.index(i, $t)]; - resultRows[System.Array.index(i, resultRows)] = Dashboard.Pages.ClinicalCodingPage.RenderCodeRow(code, state, setState); - } - - return Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center justify-between mb-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("text-sm text-gray-600", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(state.Icd10Results.length + " results found")], Object))], Object)), Dashboard.React.Elements.Div("table-container", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Table("table", System.Array.init([Dashboard.React.Elements.THead([Dashboard.React.Elements.Tr(void 0, void 0, System.Array.init([Dashboard.React.Elements.Th(void 0, System.Array.init([Dashboard.React.Elements.Text("Code")], Object)), Dashboard.React.Elements.Th(void 0, System.Array.init([Dashboard.React.Elements.Text("Description")], Object)), Dashboard.React.Elements.Th(void 0, System.Array.init([Dashboard.React.Elements.Text("Chapter")], Object)), Dashboard.React.Elements.Th(void 0, System.Array.init([Dashboard.React.Elements.Text("Category")], Object)), Dashboard.React.Elements.Th(void 0, System.Array.init([Dashboard.React.Elements.Text("Status")], Object)), Dashboard.React.Elements.Th(void 0, System.Array.init([Dashboard.React.Elements.Text("")], Object))], Object))]), Dashboard.React.Elements.TBody(resultRows)], Object))], Object))], Object)); - }, - RenderCodeRow: function (code, state, setState) { - var $t, $t1, $t2, $t3, $t4; - return Dashboard.React.Elements.Tr("search-result-row", function () { - Dashboard.Pages.ClinicalCodingPage.SelectCode(code, state, setState); - }, System.Array.init([Dashboard.React.Elements.Td(void 0, System.Array.init([Dashboard.React.Elements.Span("badge badge-primary", void 0, { background: "linear-gradient(135deg, #3b82f6, #8b5cf6)", color: "white", fontWeight: "600" }, System.Array.init([Dashboard.React.Elements.Text(code.Code)], Object))], Object)), Dashboard.React.Elements.Td("result-description-cell", System.Array.init([Dashboard.React.Elements.Span(void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(($t = code.ShortDescription, $t != null ? $t : ""))], Object)), Dashboard.React.Elements.Div("result-tooltip", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(4, "font-semibold mb-2", System.Array.init([Dashboard.React.Elements.Text(($t1 = code.ShortDescription, $t1 != null ? $t1 : ""))], Object)), Dashboard.React.Elements.P("text-sm text-gray-600 mb-3", void 0, System.Array.init([Dashboard.React.Elements.Text(($t2 = code.LongDescription, $t2 != null ? $t2 : ($t3 = code.ShortDescription, $t3 != null ? $t3 : "")))], Object)), !System.String.isNullOrEmpty(code.InclusionTerms) ? Dashboard.React.Elements.Div("text-xs text-gray-500 mb-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("font-semibold", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Includes: ")], Object)), Dashboard.React.Elements.Text(code.InclusionTerms)], Object)) : Dashboard.React.Elements.Text(""), !System.String.isNullOrEmpty(code.ExclusionTerms) ? Dashboard.React.Elements.Div("text-xs text-gray-500", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("font-semibold", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Excludes: ")], Object)), Dashboard.React.Elements.Text(code.ExclusionTerms)], Object)) : Dashboard.React.Elements.Text("")], Object))], Object)), Dashboard.React.Elements.Td("text-sm text-gray-600", System.Array.init([Dashboard.React.Elements.Text("Ch. " + (code.ChapterNumber || ""))], Object)), Dashboard.React.Elements.Td("text-sm text-gray-600", System.Array.init([Dashboard.React.Elements.Text(($t4 = code.CategoryCode, $t4 != null ? $t4 : ""))], Object)), Dashboard.React.Elements.Td(void 0, System.Array.init([code.Billable ? Dashboard.React.Elements.Span("badge badge-success", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Billable")], Object)) : Dashboard.React.Elements.Span("badge badge-gray", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Non-billable")], Object))], Object)), Dashboard.React.Elements.Td(void 0, System.Array.init([Dashboard.React.Elements.Button("btn btn-ghost btn-sm", function () { - Dashboard.Pages.ClinicalCodingPage.CopyCode(code.Code, state, setState); - }, false, "button", System.Array.init([H5.referenceEquals(state.CopiedCode, code.Code) ? Dashboard.Components.Icons.Check() : Dashboard.Components.Icons.Copy()], Object))], Object))], Object)); - }, - SelectCode: function (code, state, setState) { - (async () => { - { - var $t; - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = state.SearchQuery, $t.SearchMode = state.SearchMode, $t.Icd10Results = state.Icd10Results, $t.AchiResults = state.AchiResults, $t.SemanticResults = state.SemanticResults, $t.SelectedCode = null, $t.Loading = true, $t.Error = null, $t.IncludeAchi = state.IncludeAchi, $t.CopiedCode = state.CopiedCode, $t)); - - try { - var fullCode = (await H5.toPromise(Dashboard.Api.ApiClient.GetIcd10CodeAsync(code.Code))); - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = state.SearchQuery, $t.SearchMode = state.SearchMode, $t.Icd10Results = state.Icd10Results, $t.AchiResults = state.AchiResults, $t.SemanticResults = state.SemanticResults, $t.SelectedCode = fullCode, $t.Loading = false, $t.Error = null, $t.IncludeAchi = state.IncludeAchi, $t.CopiedCode = state.CopiedCode, $t)); - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = state.SearchQuery, $t.SearchMode = state.SearchMode, $t.Icd10Results = state.Icd10Results, $t.AchiResults = state.AchiResults, $t.SemanticResults = state.SemanticResults, $t.SelectedCode = null, $t.Loading = false, $t.Error = "Failed to load code details: " + (ex.Message || ""), $t.IncludeAchi = state.IncludeAchi, $t.CopiedCode = state.CopiedCode, $t)); - } - }})() - }, - CopyCode: function (code, state, setState) { - var $t; - navigator.clipboard.writeText(code); - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = state.SearchQuery, $t.SearchMode = state.SearchMode, $t.Icd10Results = state.Icd10Results, $t.AchiResults = state.AchiResults, $t.SemanticResults = state.SemanticResults, $t.SelectedCode = state.SelectedCode, $t.Loading = state.Loading, $t.Error = state.Error, $t.IncludeAchi = state.IncludeAchi, $t.CopiedCode = code, $t)); - }, - RenderSemanticResults: function (state, setState) { - var $t; - var resultRows = System.Array.init(state.SemanticResults.length, null, Object); - for (var i = 0; i < state.SemanticResults.length; i = (i + 1) | 0) { - var result = ($t = state.SemanticResults)[System.Array.index(i, $t)]; - resultRows[System.Array.index(i, resultRows)] = Dashboard.Pages.ClinicalCodingPage.RenderSemanticRow(result, state, setState); - } - - return Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center justify-between mb-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-2", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.Sparkles(), Dashboard.React.Elements.Span("text-sm text-gray-600", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(state.SemanticResults.length + " AI-matched results")], Object))], Object))], Object)), Dashboard.React.Elements.Div("table-container", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Table("table", System.Array.init([Dashboard.React.Elements.THead([Dashboard.React.Elements.Tr(void 0, void 0, System.Array.init([Dashboard.React.Elements.Th(void 0, System.Array.init([Dashboard.React.Elements.Text("Code")], Object)), Dashboard.React.Elements.Th(void 0, System.Array.init([Dashboard.React.Elements.Text("Type")], Object)), Dashboard.React.Elements.Th(void 0, System.Array.init([Dashboard.React.Elements.Text("Chapter")], Object)), Dashboard.React.Elements.Th(void 0, System.Array.init([Dashboard.React.Elements.Text("Category")], Object)), Dashboard.React.Elements.Th(void 0, System.Array.init([Dashboard.React.Elements.Text("Description")], Object)), Dashboard.React.Elements.Th(void 0, System.Array.init([Dashboard.React.Elements.Text("Confidence")], Object))], Object))]), Dashboard.React.Elements.TBody(resultRows)], Object))], Object))], Object)); - }, - RenderSemanticRow: function (result, state, setState) { - var $t, $t1, $t2; - var confidencePercent = H5.Int.clip32(result.Confidence * 100); - var confidenceColor = confidencePercent >= 80 ? "#22c55e" : confidencePercent >= 60 ? "#f59e0b" : "#ef4444"; - var badgeClass = confidencePercent >= 80 ? "badge-success" : confidencePercent >= 60 ? "badge-warning" : "badge-error"; - - return Dashboard.React.Elements.Tr("search-result-row", function () { - Dashboard.Pages.ClinicalCodingPage.LookupSemanticCode(result.Code, state, setState); - }, System.Array.init([Dashboard.React.Elements.Td(void 0, System.Array.init([Dashboard.React.Elements.Span("badge badge-primary", void 0, { background: H5.referenceEquals(result.CodeType, "ACHI") ? "linear-gradient(135deg, #14b8a6, #0d9488)" : "linear-gradient(135deg, #3b82f6, #8b5cf6)", color: "white", fontWeight: "600" }, System.Array.init([Dashboard.React.Elements.Text(result.Code)], Object))], Object)), Dashboard.React.Elements.Td(void 0, System.Array.init([Dashboard.React.Elements.Span(H5.referenceEquals(result.CodeType, "ACHI") ? "badge badge-teal" : "badge badge-violet", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(($t = result.CodeType, $t != null ? $t : "ICD10CM"))], Object))], Object)), Dashboard.React.Elements.Td("text-sm text-gray-600", System.Array.init([Dashboard.React.Elements.Text(!System.String.isNullOrEmpty(result.Chapter) ? "Ch. " + (result.Chapter || "") : "-")], Object)), Dashboard.React.Elements.Td("text-sm text-gray-600", System.Array.init([Dashboard.React.Elements.Text(($t1 = result.Category, $t1 != null ? $t1 : "-"))], Object)), Dashboard.React.Elements.Td("result-description-cell", System.Array.init([Dashboard.React.Elements.Span(void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(($t2 = result.Description, $t2 != null ? $t2 : ""))], Object)), Dashboard.React.Elements.Div("result-tooltip", void 0, void 0, void 0, Dashboard.Pages.ClinicalCodingPage.RenderSemanticTooltipContent(result, confidenceColor, confidencePercent))], Object)), Dashboard.React.Elements.Td(void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, { width: "60px", height: "8px", background: "#e5e7eb", borderRadius: "4px", overflow: "hidden" }, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, { width: confidencePercent + "%", height: "100%", background: confidenceColor }, void 0)], Object)), Dashboard.React.Elements.Span("badge " + (badgeClass || ""), void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(confidencePercent + "%")], Object))], Object))], Object))], Object)); - }, - RenderSemanticTooltipContent: function (result, confidenceColor, confidencePercent) { - var $t; - var elements = function (_o1) { - var $t, $t1, $t2; - _o1.add(Dashboard.React.Elements.H(4, "font-semibold mb-2", System.Array.init([Dashboard.React.Elements.Text((result.Code || "") + " - " + ((($t = result.Description, $t != null ? $t : "")) || ""))], Object))); - _o1.add(Dashboard.React.Elements.P("text-sm text-gray-600 mb-3", void 0, System.Array.init([Dashboard.React.Elements.Text(($t1 = result.LongDescription, $t1 != null ? $t1 : ($t2 = result.Description, $t2 != null ? $t2 : "")))], Object))); - return _o1; - }(new (System.Collections.Generic.List$1(Object)).ctor()); - - if (!System.String.isNullOrEmpty(result.InclusionTerms)) { - elements.add(Dashboard.React.Elements.Div("text-xs text-green-700 mb-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("font-semibold", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Includes: ")], Object)), Dashboard.React.Elements.Text(result.InclusionTerms)], Object))); - } - - if (!System.String.isNullOrEmpty(result.ExclusionTerms)) { - elements.add(Dashboard.React.Elements.Div("text-xs text-red-700 mb-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("font-semibold", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Excludes: ")], Object)), Dashboard.React.Elements.Text(result.ExclusionTerms)], Object))); - } - - if (!System.String.isNullOrEmpty(result.CodeAlso)) { - elements.add(Dashboard.React.Elements.Div("text-xs text-blue-700 mb-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("font-semibold", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Code also: ")], Object)), Dashboard.React.Elements.Text(result.CodeAlso)], Object))); - } - - if (!System.String.isNullOrEmpty(result.CodeFirst)) { - elements.add(Dashboard.React.Elements.Div("text-xs text-purple-700 mb-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("font-semibold", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Code first: ")], Object)), Dashboard.React.Elements.Text(result.CodeFirst)], Object))); - } - - var footerChildren = function (_o2) { - var $t; - _o2.add(Dashboard.React.Elements.Span("font-semibold", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Type: ")], Object))); - _o2.add(Dashboard.React.Elements.Text(($t = result.CodeType, $t != null ? $t : "ICD10CM"))); - return _o2; - }(new (System.Collections.Generic.List$1(Object)).ctor()); - - if (!System.String.isNullOrEmpty(result.Chapter)) { - footerChildren.add(Dashboard.React.Elements.Text(" | ")); - footerChildren.add(Dashboard.React.Elements.Span("font-semibold", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Chapter: ")], Object))); - footerChildren.add(Dashboard.React.Elements.Text((result.Chapter || "") + " - " + ((($t = result.ChapterTitle, $t != null ? $t : "")) || ""))); - } - - if (!System.String.isNullOrEmpty(result.Category)) { - footerChildren.add(Dashboard.React.Elements.Text(" | ")); - footerChildren.add(Dashboard.React.Elements.Span("font-semibold", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Category: ")], Object))); - footerChildren.add(Dashboard.React.Elements.Text(result.Category)); - } - - footerChildren.add(Dashboard.React.Elements.Text(" | ")); - footerChildren.add(Dashboard.React.Elements.Span("font-semibold", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Confidence: ")], Object))); - footerChildren.add(Dashboard.React.Elements.Span(void 0, void 0, { color: confidenceColor }, System.Array.init([Dashboard.React.Elements.Text(confidencePercent + "%")], Object))); - - elements.add(Dashboard.React.Elements.Div("text-xs text-gray-500 mt-2 pt-2 border-t border-gray-200", void 0, void 0, void 0, footerChildren.ToArray())); - - return elements.ToArray(); - }, - LookupSemanticCode: function (code, state, setState) { - (async () => { - { - var $t; - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = code, $t.SearchMode = "lookup", $t.Icd10Results = System.Array.init(0, null, Object), $t.AchiResults = System.Array.init(0, null, Object), $t.SemanticResults = System.Array.init(0, null, Object), $t.SelectedCode = null, $t.Loading = true, $t.Error = null, $t.IncludeAchi = state.IncludeAchi, $t.CopiedCode = null, $t)); - - try { - var result = (await H5.toPromise(Dashboard.Api.ApiClient.GetIcd10CodeAsync(code))); - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = code, $t.SearchMode = "lookup", $t.Icd10Results = System.Array.init(0, null, Object), $t.AchiResults = System.Array.init(0, null, Object), $t.SemanticResults = System.Array.init(0, null, Object), $t.SelectedCode = result, $t.Loading = false, $t.Error = null, $t.IncludeAchi = state.IncludeAchi, $t.CopiedCode = null, $t)); - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = code, $t.SearchMode = "lookup", $t.Icd10Results = System.Array.init(0, null, Object), $t.AchiResults = System.Array.init(0, null, Object), $t.SemanticResults = System.Array.init(0, null, Object), $t.SelectedCode = null, $t.Loading = false, $t.Error = ex.Message, $t.IncludeAchi = state.IncludeAchi, $t.CopiedCode = null, $t)); - } - }})() - }, - RenderCodeDetail: function (state, setState) { - var $t, $t1, $t2, $t3; - var code = state.SelectedCode; - - return Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Button("btn btn-ghost mb-4", function () { - Dashboard.Pages.ClinicalCodingPage.ClearSelection(state, setState); - }, false, "button", System.Array.init([Dashboard.Components.Icons.ChevronLeft(), Dashboard.React.Elements.Text("Back to results")], Object)), Dashboard.React.Elements.Div("card", void 0, { padding: "32px" }, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-start justify-between mb-6", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-3 mb-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span(void 0, void 0, { background: "linear-gradient(135deg, #3b82f6, #8b5cf6)", color: "white", padding: "8px 20px", borderRadius: "8px", fontWeight: "700", fontSize: "20px" }, System.Array.init([Dashboard.React.Elements.Text(code.Code)], Object)), code.Billable ? Dashboard.React.Elements.Span("badge badge-success", void 0, void 0, System.Array.init([Dashboard.Components.Icons.Check(), Dashboard.React.Elements.Text("Billable")], Object)) : Dashboard.React.Elements.Span("badge badge-gray", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Non-billable")], Object))], Object)), Dashboard.React.Elements.H(2, "text-xl font-semibold mt-4", System.Array.init([Dashboard.React.Elements.Text(($t = code.ShortDescription, $t != null ? $t : ""))], Object))], Object)), Dashboard.React.Elements.Button("btn btn-primary", function () { - Dashboard.Pages.ClinicalCodingPage.CopyCode(code.Code, state, setState); - }, false, "button", System.Array.init([H5.referenceEquals(state.CopiedCode, code.Code) ? Dashboard.Components.Icons.Check() : Dashboard.Components.Icons.Copy(), Dashboard.React.Elements.Text(H5.referenceEquals(state.CopiedCode, code.Code) ? "Copied!" : "Copy Code")], Object))], Object)), Dashboard.React.Elements.Div("grid grid-cols-3 gap-4 mb-6 p-4", void 0, { background: "#f9fafb", borderRadius: "8px" }, void 0, System.Array.init([Dashboard.Pages.ClinicalCodingPage.RenderDetailItem("Chapter", (code.ChapterNumber || "") + " - " + ((($t1 = code.ChapterTitle, $t1 != null ? $t1 : "")) || "")), Dashboard.Pages.ClinicalCodingPage.RenderDetailItem("Block", ($t2 = code.BlockCode, $t2 != null ? $t2 : "")), Dashboard.Pages.ClinicalCodingPage.RenderDetailItem("Category", ($t3 = code.CategoryCode, $t3 != null ? $t3 : ""))], Object)), Dashboard.Pages.ClinicalCodingPage.RenderDetailSection("Full Description", code.LongDescription), Dashboard.Pages.ClinicalCodingPage.RenderDetailSection("Inclusion Terms", code.InclusionTerms), Dashboard.Pages.ClinicalCodingPage.RenderDetailSection("Exclusion Terms", code.ExclusionTerms), Dashboard.Pages.ClinicalCodingPage.RenderDetailSection("Code Also", code.CodeAlso), Dashboard.Pages.ClinicalCodingPage.RenderDetailSection("Code First", code.CodeFirst)], Object))], Object)); - }, - RenderDetailItem: function (label, value) { - return Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("text-xs text-gray-500 uppercase tracking-wide", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(label)], Object)), Dashboard.React.Elements.P("font-medium", void 0, System.Array.init([Dashboard.React.Elements.Text(value)], Object))], Object)); - }, - RenderDetailSection: function (title, content) { - if (System.String.isNullOrWhiteSpace(content)) { - return Dashboard.React.Elements.Text(""); - } - - return Dashboard.React.Elements.Div("mb-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(4, "font-semibold text-gray-700 mb-2", System.Array.init([Dashboard.React.Elements.Text(title)], Object)), Dashboard.React.Elements.Div("p-4", void 0, { background: "#f9fafb", borderRadius: "8px", borderLeft: "4px solid #3b82f6" }, void 0, System.Array.init([Dashboard.React.Elements.P("text-gray-700 whitespace-pre-wrap", void 0, System.Array.init([Dashboard.React.Elements.Text(content)], Object))], Object))], Object)); - }, - ClearSelection: function (state, setState) { - var $t; - setState(($t = new Dashboard.Pages.ClinicalCodingState(), $t.SearchQuery = state.SearchQuery, $t.SearchMode = state.SearchMode, $t.Icd10Results = state.Icd10Results, $t.AchiResults = state.AchiResults, $t.SemanticResults = state.SemanticResults, $t.SelectedCode = null, $t.Loading = false, $t.Error = null, $t.IncludeAchi = state.IncludeAchi, $t.CopiedCode = null, $t)); - } - } - } - }); - - /** - * Clinical coding page state. - * - * @public - * @class Dashboard.Pages.ClinicalCodingState - */ - H5.define("Dashboard.Pages.ClinicalCodingState", { - fields: { - /** - * Current search query. - * - * @instance - * @public - * @memberof Dashboard.Pages.ClinicalCodingState - * @function SearchQuery - * @type string - */ - SearchQuery: null, - /** - * Active search mode (keyword, semantic, lookup). - * - * @instance - * @public - * @memberof Dashboard.Pages.ClinicalCodingState - * @function SearchMode - * @type string - */ - SearchMode: null, - /** - * ICD-10 search results. - * - * @instance - * @public - * @memberof Dashboard.Pages.ClinicalCodingState - * @function Icd10Results - * @type Array. - */ - Icd10Results: null, - /** - * ACHI search results. - * - * @instance - * @public - * @memberof Dashboard.Pages.ClinicalCodingState - * @function AchiResults - * @type Array. - */ - AchiResults: null, - /** - * Semantic search results. - * - * @instance - * @public - * @memberof Dashboard.Pages.ClinicalCodingState - * @function SemanticResults - * @type Array. - */ - SemanticResults: null, - /** - * Selected code for detail view. - * - * @instance - * @public - * @memberof Dashboard.Pages.ClinicalCodingState - * @function SelectedCode - * @type Object - */ - SelectedCode: null, - /** - * Whether loading. - * - * @instance - * @public - * @memberof Dashboard.Pages.ClinicalCodingState - * @function Loading - * @type boolean - */ - Loading: false, - /** - * Error message if any. - * - * @instance - * @public - * @memberof Dashboard.Pages.ClinicalCodingState - * @function Error - * @type string - */ - Error: null, - /** - * Whether to include ACHI in semantic search. - * - * @instance - * @public - * @memberof Dashboard.Pages.ClinicalCodingState - * @function IncludeAchi - * @type boolean - */ - IncludeAchi: false, - /** - * Copied code for feedback. - * - * @instance - * @public - * @memberof Dashboard.Pages.ClinicalCodingState - * @function CopiedCode - * @type string - */ - CopiedCode: null - } - }); - - /** - * Main dashboard overview page. - * - * @static - * @abstract - * @public - * @class Dashboard.Pages.DashboardPage - */ - H5.define("Dashboard.Pages.DashboardPage", { - statics: { - methods: { - /** - * Renders the dashboard page. - * - * @static - * @public - * @this Dashboard.Pages.DashboardPage - * @memberof Dashboard.Pages.DashboardPage - * @return {Object} - */ - Render: function () { - var $t; - var stateResult = Dashboard.React.Hooks.UseState(Dashboard.Pages.DashboardState, ($t = new Dashboard.Pages.DashboardState(), $t.PatientCount = 0, $t.PractitionerCount = 0, $t.AppointmentCount = 0, $t.EncounterCount = 0, $t.Loading = true, $t.Error = null, $t)); - - var state = stateResult.State; - var setState = stateResult.SetState; - - Dashboard.React.Hooks.UseEffect$1(function () { - Dashboard.Pages.DashboardPage.LoadData(setState); - }, System.Array.init(0, null, System.Object)); - - var errorElement; - if (state.Error != null) { - errorElement = Dashboard.Pages.DashboardPage.RenderError(state.Error); - } else { - errorElement = Dashboard.React.Elements.Text(""); - } - - return Dashboard.React.Elements.Div("page", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("page-header", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(2, "page-title", System.Array.init([Dashboard.React.Elements.Text("Dashboard")], Object)), Dashboard.React.Elements.P("page-description", void 0, System.Array.init([Dashboard.React.Elements.Text("Overview of your healthcare system")], Object))], Object)), errorElement, Dashboard.React.Elements.Div("dashboard-grid metrics mb-6", void 0, void 0, void 0, System.Array.init([Dashboard.Components.MetricCard.Render(($t = new Dashboard.Components.MetricCardProps(), $t.Label = "Total Patients", $t.Value = state.Loading ? "-" : H5.toString(state.PatientCount), $t.Icon = Dashboard.Components.Icons.Users, $t.IconColor = "blue", $t.TrendValue = "+12%", $t.Trend = Dashboard.Components.TrendDirection.Up, $t)), Dashboard.Components.MetricCard.Render(($t = new Dashboard.Components.MetricCardProps(), $t.Label = "Practitioners", $t.Value = state.Loading ? "-" : H5.toString(state.PractitionerCount), $t.Icon = Dashboard.Components.Icons.UserDoctor, $t.IconColor = "teal", $t)), Dashboard.Components.MetricCard.Render(($t = new Dashboard.Components.MetricCardProps(), $t.Label = "Appointments", $t.Value = state.Loading ? "-" : H5.toString(state.AppointmentCount), $t.Icon = Dashboard.Components.Icons.Calendar, $t.IconColor = "success", $t.TrendValue = "+8%", $t.Trend = Dashboard.Components.TrendDirection.Up, $t)), Dashboard.Components.MetricCard.Render(($t = new Dashboard.Components.MetricCardProps(), $t.Label = "Encounters", $t.Value = state.Loading ? "-" : H5.toString(state.EncounterCount), $t.Icon = Dashboard.Components.Icons.Clipboard, $t.IconColor = "warning", $t.TrendValue = "-3%", $t.Trend = Dashboard.Components.TrendDirection.Down, $t))], Object)), Dashboard.React.Elements.Div("dashboard-grid mixed", void 0, void 0, void 0, System.Array.init([Dashboard.Pages.DashboardPage.RenderQuickActions(), Dashboard.Pages.DashboardPage.RenderRecentActivity()], Object))], Object)); - }, - LoadData: function (setState) { - (async () => { - { - var $t; - try { - var patients = (await H5.toPromise(Dashboard.Api.ApiClient.GetPatientsAsync())); - var practitioners = (await H5.toPromise(Dashboard.Api.ApiClient.GetPractitionersAsync())); - var appointments = (await H5.toPromise(Dashboard.Api.ApiClient.GetAppointmentsAsync())); - - setState(($t = new Dashboard.Pages.DashboardState(), $t.PatientCount = patients.length, $t.PractitionerCount = practitioners.length, $t.AppointmentCount = appointments.length, $t.EncounterCount = 0, $t.Loading = false, $t.Error = null, $t)); - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t = new Dashboard.Pages.DashboardState(), $t.PatientCount = 0, $t.PractitionerCount = 0, $t.AppointmentCount = 0, $t.EncounterCount = 0, $t.Loading = false, $t.Error = ex.Message, $t)); - } - }})() - }, - RenderError: function (message) { - return Dashboard.React.Elements.Div("card mb-6", void 0, { borderLeft: "4px solid var(--warning)" }, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-3", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.Bell(), Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(4, "font-semibold", System.Array.init([Dashboard.React.Elements.Text("Connection Warning")], Object)), Dashboard.React.Elements.P("text-sm text-gray-600", void 0, System.Array.init([Dashboard.React.Elements.Text("Could not connect to API: " + (message || ""))], Object)), Dashboard.React.Elements.P("text-sm text-gray-500", void 0, System.Array.init([Dashboard.React.Elements.Text("Make sure Clinical API (port 5000) and Scheduling API (port 5001) are running.")], Object))], Object))], Object))], Object)); - }, - RenderQuickActions: function () { - return Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("card-header", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(3, "card-title", System.Array.init([Dashboard.React.Elements.Text("Quick Actions")], Object))], Object)), Dashboard.React.Elements.Div("card-body", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("grid grid-cols-2 gap-4", void 0, void 0, void 0, System.Array.init([Dashboard.Pages.DashboardPage.RenderActionButton("New Patient", Dashboard.Components.Icons.Plus, "primary"), Dashboard.Pages.DashboardPage.RenderActionButton("New Appointment", Dashboard.Components.Icons.Calendar, "secondary"), Dashboard.Pages.DashboardPage.RenderActionButton("View Schedule", Dashboard.Components.Icons.Calendar, "secondary"), Dashboard.Pages.DashboardPage.RenderActionButton("Patient Search", Dashboard.Components.Icons.Search, "secondary")], Object))], Object))], Object)); - }, - RenderActionButton: function (label, icon, variant) { - return Dashboard.React.Elements.Button("btn btn-" + (variant || "") + " w-full", void 0, false, "button", System.Array.init([icon(), Dashboard.React.Elements.Text(label)], Object)); - }, - RenderRecentActivity: function () { - return Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("card-header", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(3, "card-title", System.Array.init([Dashboard.React.Elements.Text("Recent Activity")], Object)), Dashboard.React.Elements.Button("btn btn-ghost btn-sm", void 0, false, "button", System.Array.init([Dashboard.React.Elements.Text("View All")], Object))], Object)), Dashboard.React.Elements.Div("card-body", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("data-list", void 0, void 0, void 0, System.Array.init([Dashboard.Pages.DashboardPage.RenderActivityItem("New patient registered", "John Smith added to system", "2 min ago"), Dashboard.Pages.DashboardPage.RenderActivityItem("Appointment completed", "Dr. Wilson with Jane Doe", "15 min ago"), Dashboard.Pages.DashboardPage.RenderActivityItem("Lab results available", "Patient ID: PAT-0042", "1 hour ago")], Object))], Object))], Object)); - }, - RenderActivityItem: function (title, subtitle, time) { - return Dashboard.React.Elements.Div("data-list-item", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("avatar avatar-sm", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.Activity()], Object)), Dashboard.React.Elements.Div("data-list-item-content", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("data-list-item-title", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(title)], Object)), Dashboard.React.Elements.Div("data-list-item-subtitle", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(subtitle)], Object))], Object)), Dashboard.React.Elements.Div("data-list-item-meta", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(time)], Object))], Object)); - } - } - } - }); - - /** - * Dashboard state class. - * - * @public - * @class Dashboard.Pages.DashboardState - */ - H5.define("Dashboard.Pages.DashboardState", { - fields: { - /** - * Patient count. - * - * @instance - * @public - * @memberof Dashboard.Pages.DashboardState - * @function PatientCount - * @type number - */ - PatientCount: 0, - /** - * Practitioner count. - * - * @instance - * @public - * @memberof Dashboard.Pages.DashboardState - * @function PractitionerCount - * @type number - */ - PractitionerCount: 0, - /** - * Appointment count. - * - * @instance - * @public - * @memberof Dashboard.Pages.DashboardState - * @function AppointmentCount - * @type number - */ - AppointmentCount: 0, - /** - * Encounter count. - * - * @instance - * @public - * @memberof Dashboard.Pages.DashboardState - * @function EncounterCount - * @type number - */ - EncounterCount: 0, - /** - * Whether loading. - * - * @instance - * @public - * @memberof Dashboard.Pages.DashboardState - * @function Loading - * @type boolean - */ - Loading: false, - /** - * Error message if any. - * - * @instance - * @public - * @memberof Dashboard.Pages.DashboardState - * @function Error - * @type string - */ - Error: null - } - }); - - /** - * Edit appointment page component. - * - * @static - * @abstract - * @public - * @class Dashboard.Pages.EditAppointmentPage - */ - H5.define("Dashboard.Pages.EditAppointmentPage", { - statics: { - methods: { - /** - * Renders the edit appointment page. - * - * @static - * @public - * @this Dashboard.Pages.EditAppointmentPage - * @memberof Dashboard.Pages.EditAppointmentPage - * @param {string} appointmentId - * @param {System.Action} onBack - * @return {Object} - */ - Render: function (appointmentId, onBack) { - var $t; - var stateResult = Dashboard.React.Hooks.UseState(Dashboard.Pages.EditAppointmentState, ($t = new Dashboard.Pages.EditAppointmentState(), $t.Appointment = null, $t.Loading = true, $t.Saving = false, $t.Error = null, $t.Success = null, $t.ServiceCategory = "", $t.ServiceType = "", $t.ReasonCode = "", $t.Priority = "routine", $t.Description = "", $t.StartDate = "", $t.StartTime = "", $t.EndDate = "", $t.EndTime = "", $t.PatientReference = "", $t.PractitionerReference = "", $t.Comment = "", $t.Status = "booked", $t)); - - var state = stateResult.State; - var setState = stateResult.SetState; - - Dashboard.React.Hooks.UseEffect$1(function () { - Dashboard.Pages.EditAppointmentPage.LoadAppointment(appointmentId, setState); - }, System.Array.init([appointmentId], System.Object)); - - if (state.Loading) { - return Dashboard.Pages.EditAppointmentPage.RenderLoadingState(); - } - - if (state.Error != null && state.Appointment == null) { - return Dashboard.Pages.EditAppointmentPage.RenderErrorState(state.Error, onBack); - } - - return Dashboard.React.Elements.Div("page", void 0, void 0, void 0, System.Array.init([Dashboard.Pages.EditAppointmentPage.RenderHeader(state.Appointment, onBack), Dashboard.Pages.EditAppointmentPage.RenderForm(state, setState, onBack)], Object)); - }, - LoadAppointment: function (appointmentId, setState) { - (async () => { - { - var $t, $t1, $t2, $t3, $t4, $t5, $t6, $t7, $t8, $t9; - try { - var appointment = (await H5.toPromise(Dashboard.Api.ApiClient.GetAppointmentAsync(appointmentId))); - var startParts = Dashboard.Pages.EditAppointmentPage.ParseDateTime(appointment.StartTime); - var endParts = Dashboard.Pages.EditAppointmentPage.ParseDateTime(appointment.EndTime); - - setState(($t = new Dashboard.Pages.EditAppointmentState(), $t.Appointment = appointment, $t.Loading = false, $t.Saving = false, $t.Error = null, $t.Success = null, $t.ServiceCategory = ($t1 = appointment.ServiceCategory, $t1 != null ? $t1 : ""), $t.ServiceType = ($t2 = appointment.ServiceType, $t2 != null ? $t2 : ""), $t.ReasonCode = ($t3 = appointment.ReasonCode, $t3 != null ? $t3 : ""), $t.Priority = ($t4 = appointment.Priority, $t4 != null ? $t4 : "routine"), $t.Description = ($t5 = appointment.Description, $t5 != null ? $t5 : ""), $t.StartDate = startParts.Item1, $t.StartTime = startParts.Item2, $t.EndDate = endParts.Item1, $t.EndTime = endParts.Item2, $t.PatientReference = ($t6 = appointment.PatientReference, $t6 != null ? $t6 : ""), $t.PractitionerReference = ($t7 = appointment.PractitionerReference, $t7 != null ? $t7 : ""), $t.Comment = ($t8 = appointment.Comment, $t8 != null ? $t8 : ""), $t.Status = ($t9 = appointment.Status, $t9 != null ? $t9 : "booked"), $t)); - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t = new Dashboard.Pages.EditAppointmentState(), $t.Appointment = null, $t.Loading = false, $t.Saving = false, $t.Error = ex.Message, $t.Success = null, $t.ServiceCategory = "", $t.ServiceType = "", $t.ReasonCode = "", $t.Priority = "routine", $t.Description = "", $t.StartDate = "", $t.StartTime = "", $t.EndDate = "", $t.EndTime = "", $t.PatientReference = "", $t.PractitionerReference = "", $t.Comment = "", $t.Status = "booked", $t)); - } - }})() - }, - ParseDateTime: function (isoDateTime) { - if (System.String.isNullOrEmpty(isoDateTime)) { - return new (System.ValueTuple$2(System.String,System.String)).$ctor1("", ""); - } - - if (isoDateTime.length >= 16) { - var datePart = isoDateTime.substr(0, 10); - var timePart = isoDateTime.substr(11, 5); - return new (System.ValueTuple$2(System.String,System.String)).$ctor1(datePart, timePart); - } - - return new (System.ValueTuple$2(System.String,System.String)).$ctor1("", ""); - }, - CombineDateTime: function (date, time) { - if (System.String.isNullOrEmpty(date) || System.String.isNullOrEmpty(time)) { - return ""; - } - return (date || "") + "T" + (time || "") + ":00.000Z"; - }, - SaveAppointment: function (state, setState, onBack) { - (async () => { - { - var $t, $t1, $t2, $t3, $t4, $t5, $t6, $t7, $t8, $t9; - setState(($t = new Dashboard.Pages.EditAppointmentState(), $t.Appointment = state.Appointment, $t.Loading = false, $t.Saving = true, $t.Error = null, $t.Success = null, $t.ServiceCategory = state.ServiceCategory, $t.ServiceType = state.ServiceType, $t.ReasonCode = state.ReasonCode, $t.Priority = state.Priority, $t.Description = state.Description, $t.StartDate = state.StartDate, $t.StartTime = state.StartTime, $t.EndDate = state.EndDate, $t.EndTime = state.EndTime, $t.PatientReference = state.PatientReference, $t.PractitionerReference = state.PractitionerReference, $t.Comment = state.Comment, $t.Status = state.Status, $t)); - - try { - var updateData = { ServiceCategory: state.ServiceCategory, ServiceType: state.ServiceType, ReasonCode: System.String.isNullOrWhiteSpace(state.ReasonCode) ? null : state.ReasonCode, Priority: state.Priority, Description: System.String.isNullOrWhiteSpace(state.Description) ? null : state.Description, Start: Dashboard.Pages.EditAppointmentPage.CombineDateTime(state.StartDate, state.StartTime), End: Dashboard.Pages.EditAppointmentPage.CombineDateTime(state.EndDate, state.EndTime), PatientReference: state.PatientReference, PractitionerReference: state.PractitionerReference, Comment: System.String.isNullOrWhiteSpace(state.Comment) ? null : state.Comment, Status: state.Status }; - - var updatedAppointment = (await H5.toPromise(Dashboard.Api.ApiClient.UpdateAppointmentAsync(state.Appointment.Id, updateData))); - - var startParts = Dashboard.Pages.EditAppointmentPage.ParseDateTime(updatedAppointment.StartTime); - var endParts = Dashboard.Pages.EditAppointmentPage.ParseDateTime(updatedAppointment.EndTime); - - setState(($t = new Dashboard.Pages.EditAppointmentState(), $t.Appointment = updatedAppointment, $t.Loading = false, $t.Saving = false, $t.Error = null, $t.Success = "Appointment updated successfully!", $t.ServiceCategory = ($t1 = updatedAppointment.ServiceCategory, $t1 != null ? $t1 : ""), $t.ServiceType = ($t2 = updatedAppointment.ServiceType, $t2 != null ? $t2 : ""), $t.ReasonCode = ($t3 = updatedAppointment.ReasonCode, $t3 != null ? $t3 : ""), $t.Priority = ($t4 = updatedAppointment.Priority, $t4 != null ? $t4 : "routine"), $t.Description = ($t5 = updatedAppointment.Description, $t5 != null ? $t5 : ""), $t.StartDate = startParts.Item1, $t.StartTime = startParts.Item2, $t.EndDate = endParts.Item1, $t.EndTime = endParts.Item2, $t.PatientReference = ($t6 = updatedAppointment.PatientReference, $t6 != null ? $t6 : ""), $t.PractitionerReference = ($t7 = updatedAppointment.PractitionerReference, $t7 != null ? $t7 : ""), $t.Comment = ($t8 = updatedAppointment.Comment, $t8 != null ? $t8 : ""), $t.Status = ($t9 = updatedAppointment.Status, $t9 != null ? $t9 : "booked"), $t)); - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t = new Dashboard.Pages.EditAppointmentState(), $t.Appointment = state.Appointment, $t.Loading = false, $t.Saving = false, $t.Error = ex.Message, $t.Success = null, $t.ServiceCategory = state.ServiceCategory, $t.ServiceType = state.ServiceType, $t.ReasonCode = state.ReasonCode, $t.Priority = state.Priority, $t.Description = state.Description, $t.StartDate = state.StartDate, $t.StartTime = state.StartTime, $t.EndDate = state.EndDate, $t.EndTime = state.EndTime, $t.PatientReference = state.PatientReference, $t.PractitionerReference = state.PractitionerReference, $t.Comment = state.Comment, $t.Status = state.Status, $t)); - } - }})() - }, - RenderLoadingState: function () { - return Dashboard.React.Elements.Div("page", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("page-header", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(2, "page-title", System.Array.init([Dashboard.React.Elements.Text("Edit Appointment")], Object)), Dashboard.React.Elements.P("page-description", void 0, System.Array.init([Dashboard.React.Elements.Text("Loading appointment data...")], Object))], Object)), Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center justify-center p-8", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Loading...")], Object))], Object))], Object)); - }, - RenderErrorState: function (error, onBack) { - return Dashboard.React.Elements.Div("page", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("page-header flex justify-between items-center", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(2, "page-title", System.Array.init([Dashboard.React.Elements.Text("Edit Appointment")], Object)), Dashboard.React.Elements.P("page-description", void 0, System.Array.init([Dashboard.React.Elements.Text("Error loading appointment")], Object))], Object)), Dashboard.React.Elements.Button("btn btn-secondary", onBack, false, "button", System.Array.init([Dashboard.Components.Icons.ChevronLeft(), Dashboard.React.Elements.Text("Back to Appointments")], Object))], Object)), Dashboard.React.Elements.Div("card", void 0, { borderLeft: "4px solid var(--error)" }, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-3 p-4", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.X(), Dashboard.React.Elements.Text("Error loading appointment: " + (error || ""))], Object))], Object))], Object)); - }, - RenderHeader: function (appointment, onBack) { - var $t; - var title = ($t = appointment.ServiceType, $t != null ? $t : "Appointment"); - return Dashboard.React.Elements.Div("page-header flex justify-between items-center", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(2, "page-title", System.Array.init([Dashboard.React.Elements.Text("Edit Appointment")], Object)), Dashboard.React.Elements.P("page-description", void 0, System.Array.init([Dashboard.React.Elements.Text("Update details for " + (title || ""))], Object))], Object)), Dashboard.React.Elements.Button("btn btn-secondary", onBack, false, "button", System.Array.init([Dashboard.Components.Icons.ChevronLeft(), Dashboard.React.Elements.Text("Back to Appointments")], Object))], Object)); - }, - RenderForm: function (state, setState, onBack) { - return Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([state.Error != null ? Dashboard.React.Elements.Div("alert alert-error mb-4", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.X(), Dashboard.React.Elements.Text(state.Error)], Object)) : null, state.Success != null ? Dashboard.React.Elements.Div("alert alert-success mb-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(state.Success)], Object)) : null, Dashboard.React.Elements.Form("form", function () { - Dashboard.Pages.EditAppointmentPage.SaveAppointment(state, setState, onBack); - }, System.Array.init([Dashboard.Pages.EditAppointmentPage.RenderFormSection("Appointment Details", System.Array.init([Dashboard.Pages.EditAppointmentPage.RenderInputField("Service Category", "appointment-service-category", state.ServiceCategory, "e.g., General Practice", function (v) { - Dashboard.Pages.EditAppointmentPage.UpdateField(state, setState, "ServiceCategory", v); - }), Dashboard.Pages.EditAppointmentPage.RenderInputField("Service Type", "appointment-service-type", state.ServiceType, "e.g., Checkup, Follow-up", function (v) { - Dashboard.Pages.EditAppointmentPage.UpdateField(state, setState, "ServiceType", v); - }), Dashboard.Pages.EditAppointmentPage.RenderInputField("Reason", "appointment-reason", state.ReasonCode, "Reason for appointment", function (v) { - Dashboard.Pages.EditAppointmentPage.UpdateField(state, setState, "ReasonCode", v); - }), Dashboard.Pages.EditAppointmentPage.RenderSelectField("Priority", "appointment-priority", state.Priority, System.Array.init([new (System.ValueTuple$2(System.String,System.String)).$ctor1("routine", "Routine"), new (System.ValueTuple$2(System.String,System.String)).$ctor1("urgent", "Urgent"), new (System.ValueTuple$2(System.String,System.String)).$ctor1("asap", "ASAP"), new (System.ValueTuple$2(System.String,System.String)).$ctor1("stat", "STAT")], System.ValueTuple$2(System.String,System.String)), function (v) { - Dashboard.Pages.EditAppointmentPage.UpdateField(state, setState, "Priority", v); - }), Dashboard.Pages.EditAppointmentPage.RenderSelectField("Status", "appointment-status", state.Status, System.Array.init([new (System.ValueTuple$2(System.String,System.String)).$ctor1("booked", "Booked"), new (System.ValueTuple$2(System.String,System.String)).$ctor1("arrived", "Arrived"), new (System.ValueTuple$2(System.String,System.String)).$ctor1("fulfilled", "Fulfilled"), new (System.ValueTuple$2(System.String,System.String)).$ctor1("cancelled", "Cancelled"), new (System.ValueTuple$2(System.String,System.String)).$ctor1("noshow", "No Show")], System.ValueTuple$2(System.String,System.String)), function (v) { - Dashboard.Pages.EditAppointmentPage.UpdateField(state, setState, "Status", v); - }), Dashboard.Pages.EditAppointmentPage.RenderTextareaField("Description", "appointment-description", state.Description, "Additional details", function (v) { - Dashboard.Pages.EditAppointmentPage.UpdateField(state, setState, "Description", v); - })], Object)), Dashboard.Pages.EditAppointmentPage.RenderFormSection("Schedule", System.Array.init([Dashboard.Pages.EditAppointmentPage.RenderInputField("Start Date", "appointment-start-date", state.StartDate, "YYYY-MM-DD", function (v) { - Dashboard.Pages.EditAppointmentPage.UpdateField(state, setState, "StartDate", v); - }, "date"), Dashboard.Pages.EditAppointmentPage.RenderInputField("Start Time", "appointment-start-time", state.StartTime, "HH:MM", function (v) { - Dashboard.Pages.EditAppointmentPage.UpdateField(state, setState, "StartTime", v); - }, "time"), Dashboard.Pages.EditAppointmentPage.RenderInputField("End Date", "appointment-end-date", state.EndDate, "YYYY-MM-DD", function (v) { - Dashboard.Pages.EditAppointmentPage.UpdateField(state, setState, "EndDate", v); - }, "date"), Dashboard.Pages.EditAppointmentPage.RenderInputField("End Time", "appointment-end-time", state.EndTime, "HH:MM", function (v) { - Dashboard.Pages.EditAppointmentPage.UpdateField(state, setState, "EndTime", v); - }, "time")], Object)), Dashboard.Pages.EditAppointmentPage.RenderFormSection("Participants", System.Array.init([Dashboard.Pages.EditAppointmentPage.RenderInputField("Patient Reference", "appointment-patient", state.PatientReference, "Patient/[id]", function (v) { - Dashboard.Pages.EditAppointmentPage.UpdateField(state, setState, "PatientReference", v); - }), Dashboard.Pages.EditAppointmentPage.RenderInputField("Practitioner Reference", "appointment-practitioner", state.PractitionerReference, "Practitioner/[id]", function (v) { - Dashboard.Pages.EditAppointmentPage.UpdateField(state, setState, "PractitionerReference", v); - })], Object)), Dashboard.Pages.EditAppointmentPage.RenderFormSection("Notes", System.Array.init([Dashboard.Pages.EditAppointmentPage.RenderTextareaField("Comment", "appointment-comment", state.Comment, "Any additional comments", function (v) { - Dashboard.Pages.EditAppointmentPage.UpdateField(state, setState, "Comment", v); - })], Object)), Dashboard.Pages.EditAppointmentPage.RenderFormActions(state, onBack)], Object))], Object)); - }, - RenderFormSection: function (title, fields) { - return Dashboard.React.Elements.Div("form-section mb-6", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(4, "form-section-title mb-4", System.Array.init([Dashboard.React.Elements.Text(title)], Object)), Dashboard.React.Elements.Div("grid grid-cols-2 gap-4", void 0, void 0, void 0, fields)], Object)); - }, - RenderInputField: function (label, id, value, placeholder, onChange, type) { - if (type === void 0) { type = "text"; } - return Dashboard.React.Elements.Div("form-group", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Label(id, "form-label", System.Array.init([Dashboard.React.Elements.Text(label)], Object)), Dashboard.React.Elements.Input("input", type, value, placeholder, onChange, void 0, false)], Object)); - }, - RenderTextareaField: function (label, id, value, placeholder, onChange) { - return Dashboard.React.Elements.Div("form-group col-span-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Label(id, "form-label", System.Array.init([Dashboard.React.Elements.Text(label)], Object)), Dashboard.React.Elements.TextArea("input", value, placeholder, 3, onChange)], Object)); - }, - RenderSelectField: function (label, id, value, options, onChange) { - var optionElements = System.Array.init(options.length, null, Object); - for (var i = 0; i < options.length; i = (i + 1) | 0) { - optionElements[System.Array.index(i, optionElements)] = Dashboard.React.Elements.Option(options[System.Array.index(i, options)].Item1, options[System.Array.index(i, options)].Item2); - } - - return Dashboard.React.Elements.Div("form-group", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Label(id, "form-label", System.Array.init([Dashboard.React.Elements.Text(label)], Object)), Dashboard.React.Elements.Select("input", value, onChange, optionElements)], Object)); - }, - RenderFormActions: function (state, onBack) { - return Dashboard.React.Elements.Div("form-actions flex justify-end gap-4 mt-6", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Button("btn btn-secondary", onBack, state.Saving, "button", System.Array.init([Dashboard.React.Elements.Text("Cancel")], Object)), Dashboard.React.Elements.Button("btn btn-primary", void 0, state.Saving, "submit", System.Array.init([Dashboard.React.Elements.Text(state.Saving ? "Saving..." : "Save Changes")], Object))], Object)); - }, - UpdateField: function (state, setState, field, value) { - var $t; - var newState = ($t = new Dashboard.Pages.EditAppointmentState(), $t.Appointment = state.Appointment, $t.Loading = state.Loading, $t.Saving = state.Saving, $t.Error = null, $t.Success = null, $t.ServiceCategory = state.ServiceCategory, $t.ServiceType = state.ServiceType, $t.ReasonCode = state.ReasonCode, $t.Priority = state.Priority, $t.Description = state.Description, $t.StartDate = state.StartDate, $t.StartTime = state.StartTime, $t.EndDate = state.EndDate, $t.EndTime = state.EndTime, $t.PatientReference = state.PatientReference, $t.PractitionerReference = state.PractitionerReference, $t.Comment = state.Comment, $t.Status = state.Status, $t); - - if (H5.referenceEquals(field, "ServiceCategory")) { - newState.ServiceCategory = value; - } else { - if (H5.referenceEquals(field, "ServiceType")) { - newState.ServiceType = value; - } else { - if (H5.referenceEquals(field, "ReasonCode")) { - newState.ReasonCode = value; - } else { - if (H5.referenceEquals(field, "Priority")) { - newState.Priority = value; - } else { - if (H5.referenceEquals(field, "Description")) { - newState.Description = value; - } else { - if (H5.referenceEquals(field, "StartDate")) { - newState.StartDate = value; - } else { - if (H5.referenceEquals(field, "StartTime")) { - newState.StartTime = value; - } else { - if (H5.referenceEquals(field, "EndDate")) { - newState.EndDate = value; - } else { - if (H5.referenceEquals(field, "EndTime")) { - newState.EndTime = value; - } else { - if (H5.referenceEquals(field, "PatientReference")) { - newState.PatientReference = value; - } else { - if (H5.referenceEquals(field, "PractitionerReference")) { - newState.PractitionerReference = value; - } else { - if (H5.referenceEquals(field, "Comment")) { - newState.Comment = value; - } else { - if (H5.referenceEquals(field, "Status")) { - newState.Status = value; - } - } - } - } - } - } - } - } - } - } - } - } - } - - setState(newState); - } - } - } - }); - - /** - * Edit appointment page state class. - * - * @public - * @class Dashboard.Pages.EditAppointmentState - */ - H5.define("Dashboard.Pages.EditAppointmentState", { - fields: { - /** - * Appointment being edited. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function Appointment - * @type Object - */ - Appointment: null, - /** - * Whether loading. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function Loading - * @type boolean - */ - Loading: false, - /** - * Whether saving. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function Saving - * @type boolean - */ - Saving: false, - /** - * Error message if any. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function Error - * @type string - */ - Error: null, - /** - * Success message if any. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function Success - * @type string - */ - Success: null, - /** - * Form field: Service category. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function ServiceCategory - * @type string - */ - ServiceCategory: null, - /** - * Form field: Service type. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function ServiceType - * @type string - */ - ServiceType: null, - /** - * Form field: Reason code. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function ReasonCode - * @type string - */ - ReasonCode: null, - /** - * Form field: Priority. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function Priority - * @type string - */ - Priority: null, - /** - * Form field: Description. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function Description - * @type string - */ - Description: null, - /** - * Form field: Start date. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function StartDate - * @type string - */ - StartDate: null, - /** - * Form field: Start time. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function StartTime - * @type string - */ - StartTime: null, - /** - * Form field: End date. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function EndDate - * @type string - */ - EndDate: null, - /** - * Form field: End time. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function EndTime - * @type string - */ - EndTime: null, - /** - * Form field: Patient reference. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function PatientReference - * @type string - */ - PatientReference: null, - /** - * Form field: Practitioner reference. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function PractitionerReference - * @type string - */ - PractitionerReference: null, - /** - * Form field: Comment. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function Comment - * @type string - */ - Comment: null, - /** - * Form field: Status. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditAppointmentState - * @function Status - * @type string - */ - Status: null - } - }); - - /** - * Edit patient page component. - * - * @static - * @abstract - * @public - * @class Dashboard.Pages.EditPatientPage - */ - H5.define("Dashboard.Pages.EditPatientPage", { - statics: { - methods: { - /** - * Renders the edit patient page. - * - * @static - * @public - * @this Dashboard.Pages.EditPatientPage - * @memberof Dashboard.Pages.EditPatientPage - * @param {string} patientId - * @param {System.Action} onBack - * @return {Object} - */ - Render: function (patientId, onBack) { - var $t; - var stateResult = Dashboard.React.Hooks.UseState(Dashboard.Pages.EditPatientState, ($t = new Dashboard.Pages.EditPatientState(), $t.Patient = null, $t.Loading = true, $t.Saving = false, $t.Error = null, $t.Success = null, $t.Active = true, $t.GivenName = "", $t.FamilyName = "", $t.BirthDate = "", $t.Gender = "", $t.Phone = "", $t.Email = "", $t.AddressLine = "", $t.City = "", $t.State = "", $t.PostalCode = "", $t.Country = "", $t)); - - var state = stateResult.State; - var setState = stateResult.SetState; - - Dashboard.React.Hooks.UseEffect$1(function () { - Dashboard.Pages.EditPatientPage.LoadPatient(patientId, setState); - }, System.Array.init([patientId], System.Object)); - - if (state.Loading) { - return Dashboard.Pages.EditPatientPage.RenderLoadingState(); - } - - if (state.Error != null && state.Patient == null) { - return Dashboard.Pages.EditPatientPage.RenderErrorState(state.Error, onBack); - } - - return Dashboard.React.Elements.Div("page", void 0, void 0, void 0, System.Array.init([Dashboard.Pages.EditPatientPage.RenderHeader(state.Patient, onBack), Dashboard.Pages.EditPatientPage.RenderForm(state, setState, onBack)], Object)); - }, - LoadPatient: function (patientId, setState) { - (async () => { - { - var $t, $t1, $t2, $t3, $t4, $t5, $t6, $t7, $t8, $t9, $t10, $t11; - try { - var patient = (await H5.toPromise(Dashboard.Api.ApiClient.GetPatientAsync(patientId))); - setState(($t = new Dashboard.Pages.EditPatientState(), $t.Patient = patient, $t.Loading = false, $t.Saving = false, $t.Error = null, $t.Success = null, $t.Active = patient.Active, $t.GivenName = ($t1 = patient.GivenName, $t1 != null ? $t1 : ""), $t.FamilyName = ($t2 = patient.FamilyName, $t2 != null ? $t2 : ""), $t.BirthDate = ($t3 = patient.BirthDate, $t3 != null ? $t3 : ""), $t.Gender = ($t4 = patient.Gender, $t4 != null ? $t4 : ""), $t.Phone = ($t5 = patient.Phone, $t5 != null ? $t5 : ""), $t.Email = ($t6 = patient.Email, $t6 != null ? $t6 : ""), $t.AddressLine = ($t7 = patient.AddressLine, $t7 != null ? $t7 : ""), $t.City = ($t8 = patient.City, $t8 != null ? $t8 : ""), $t.State = ($t9 = patient.State, $t9 != null ? $t9 : ""), $t.PostalCode = ($t10 = patient.PostalCode, $t10 != null ? $t10 : ""), $t.Country = ($t11 = patient.Country, $t11 != null ? $t11 : ""), $t)); - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t = new Dashboard.Pages.EditPatientState(), $t.Patient = null, $t.Loading = false, $t.Saving = false, $t.Error = ex.Message, $t.Success = null, $t.Active = true, $t.GivenName = "", $t.FamilyName = "", $t.BirthDate = "", $t.Gender = "", $t.Phone = "", $t.Email = "", $t.AddressLine = "", $t.City = "", $t.State = "", $t.PostalCode = "", $t.Country = "", $t)); - } - }})() - }, - SavePatient: function (state, setState, onBack) { - (async () => { - { - var $t, $t1, $t2, $t3, $t4, $t5, $t6, $t7, $t8, $t9, $t10, $t11; - setState(($t = new Dashboard.Pages.EditPatientState(), $t.Patient = state.Patient, $t.Loading = false, $t.Saving = true, $t.Error = null, $t.Success = null, $t.Active = state.Active, $t.GivenName = state.GivenName, $t.FamilyName = state.FamilyName, $t.BirthDate = state.BirthDate, $t.Gender = state.Gender, $t.Phone = state.Phone, $t.Email = state.Email, $t.AddressLine = state.AddressLine, $t.City = state.City, $t.State = state.State, $t.PostalCode = state.PostalCode, $t.Country = state.Country, $t)); - - try { - var updateData = ($t = new Object(), $t.Id = state.Patient.Id, $t.Active = state.Active, $t.GivenName = state.GivenName, $t.FamilyName = state.FamilyName, $t.BirthDate = System.String.isNullOrWhiteSpace(state.BirthDate) ? null : state.BirthDate, $t.Gender = System.String.isNullOrWhiteSpace(state.Gender) ? null : state.Gender, $t.Phone = System.String.isNullOrWhiteSpace(state.Phone) ? null : state.Phone, $t.Email = System.String.isNullOrWhiteSpace(state.Email) ? null : state.Email, $t.AddressLine = System.String.isNullOrWhiteSpace(state.AddressLine) ? null : state.AddressLine, $t.City = System.String.isNullOrWhiteSpace(state.City) ? null : state.City, $t.State = System.String.isNullOrWhiteSpace(state.State) ? null : state.State, $t.PostalCode = System.String.isNullOrWhiteSpace(state.PostalCode) ? null : state.PostalCode, $t.Country = System.String.isNullOrWhiteSpace(state.Country) ? null : state.Country, $t); - - var updatedPatient = (await H5.toPromise(Dashboard.Api.ApiClient.UpdatePatientAsync(state.Patient.Id, updateData))); - - setState(($t = new Dashboard.Pages.EditPatientState(), $t.Patient = updatedPatient, $t.Loading = false, $t.Saving = false, $t.Error = null, $t.Success = "Patient updated successfully!", $t.Active = updatedPatient.Active, $t.GivenName = ($t1 = updatedPatient.GivenName, $t1 != null ? $t1 : ""), $t.FamilyName = ($t2 = updatedPatient.FamilyName, $t2 != null ? $t2 : ""), $t.BirthDate = ($t3 = updatedPatient.BirthDate, $t3 != null ? $t3 : ""), $t.Gender = ($t4 = updatedPatient.Gender, $t4 != null ? $t4 : ""), $t.Phone = ($t5 = updatedPatient.Phone, $t5 != null ? $t5 : ""), $t.Email = ($t6 = updatedPatient.Email, $t6 != null ? $t6 : ""), $t.AddressLine = ($t7 = updatedPatient.AddressLine, $t7 != null ? $t7 : ""), $t.City = ($t8 = updatedPatient.City, $t8 != null ? $t8 : ""), $t.State = ($t9 = updatedPatient.State, $t9 != null ? $t9 : ""), $t.PostalCode = ($t10 = updatedPatient.PostalCode, $t10 != null ? $t10 : ""), $t.Country = ($t11 = updatedPatient.Country, $t11 != null ? $t11 : ""), $t)); - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t = new Dashboard.Pages.EditPatientState(), $t.Patient = state.Patient, $t.Loading = false, $t.Saving = false, $t.Error = ex.Message, $t.Success = null, $t.Active = state.Active, $t.GivenName = state.GivenName, $t.FamilyName = state.FamilyName, $t.BirthDate = state.BirthDate, $t.Gender = state.Gender, $t.Phone = state.Phone, $t.Email = state.Email, $t.AddressLine = state.AddressLine, $t.City = state.City, $t.State = state.State, $t.PostalCode = state.PostalCode, $t.Country = state.Country, $t)); - } - }})() - }, - RenderLoadingState: function () { - return Dashboard.React.Elements.Div("page", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("page-header", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(2, "page-title", System.Array.init([Dashboard.React.Elements.Text("Edit Patient")], Object)), Dashboard.React.Elements.P("page-description", void 0, System.Array.init([Dashboard.React.Elements.Text("Loading patient data...")], Object))], Object)), Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center justify-center p-8", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("Loading...")], Object))], Object))], Object)); - }, - RenderErrorState: function (error, onBack) { - return Dashboard.React.Elements.Div("page", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("page-header flex justify-between items-center", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(2, "page-title", System.Array.init([Dashboard.React.Elements.Text("Edit Patient")], Object)), Dashboard.React.Elements.P("page-description", void 0, System.Array.init([Dashboard.React.Elements.Text("Error loading patient")], Object))], Object)), Dashboard.React.Elements.Button("btn btn-secondary", onBack, false, "button", System.Array.init([Dashboard.Components.Icons.ChevronLeft(), Dashboard.React.Elements.Text("Back to Patients")], Object))], Object)), Dashboard.React.Elements.Div("card", void 0, { borderLeft: "4px solid var(--error)" }, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-3 p-4", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.X(), Dashboard.React.Elements.Text("Error loading patient: " + (error || ""))], Object))], Object))], Object)); - }, - RenderHeader: function (patient, onBack) { - var fullName = (patient.GivenName || "") + " " + (patient.FamilyName || ""); - return Dashboard.React.Elements.Div("page-header flex justify-between items-center", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(2, "page-title", System.Array.init([Dashboard.React.Elements.Text("Edit Patient")], Object)), Dashboard.React.Elements.P("page-description", void 0, System.Array.init([Dashboard.React.Elements.Text("Update information for " + (fullName || ""))], Object))], Object)), Dashboard.React.Elements.Button("btn btn-secondary", onBack, false, "button", System.Array.init([Dashboard.Components.Icons.ChevronLeft(), Dashboard.React.Elements.Text("Back to Patients")], Object))], Object)); - }, - RenderForm: function (state, setState, onBack) { - return Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([state.Error != null ? Dashboard.React.Elements.Div("alert alert-error mb-4", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.X(), Dashboard.React.Elements.Text(state.Error)], Object)) : null, state.Success != null ? Dashboard.React.Elements.Div("alert alert-success mb-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(state.Success)], Object)) : null, Dashboard.React.Elements.Form("form", function () { - Dashboard.Pages.EditPatientPage.SavePatient(state, setState, onBack); - }, System.Array.init([Dashboard.Pages.EditPatientPage.RenderFormSection("Personal Information", System.Array.init([Dashboard.Pages.EditPatientPage.RenderInputField("Given Name", "patient-edit-given-name", state.GivenName, "Enter first name", function (v) { - Dashboard.Pages.EditPatientPage.UpdateField(state, setState, "GivenName", v); - }), Dashboard.Pages.EditPatientPage.RenderInputField("Family Name", "patient-edit-family-name", state.FamilyName, "Enter last name", function (v) { - Dashboard.Pages.EditPatientPage.UpdateField(state, setState, "FamilyName", v); - }), Dashboard.Pages.EditPatientPage.RenderInputField("Birth Date", "patient-edit-birth-date", state.BirthDate, "YYYY-MM-DD", function (v) { - Dashboard.Pages.EditPatientPage.UpdateField(state, setState, "BirthDate", v); - }, "date"), Dashboard.Pages.EditPatientPage.RenderSelectField("Gender", "patient-edit-gender", state.Gender, System.Array.init([new (System.ValueTuple$2(System.String,System.String)).$ctor1("", "Select gender"), new (System.ValueTuple$2(System.String,System.String)).$ctor1("male", "Male"), new (System.ValueTuple$2(System.String,System.String)).$ctor1("female", "Female"), new (System.ValueTuple$2(System.String,System.String)).$ctor1("other", "Other"), new (System.ValueTuple$2(System.String,System.String)).$ctor1("unknown", "Unknown")], System.ValueTuple$2(System.String,System.String)), function (v) { - Dashboard.Pages.EditPatientPage.UpdateField(state, setState, "Gender", v); - }), Dashboard.Pages.EditPatientPage.RenderCheckboxField("Active", "patient-edit-active", state.Active, function (v) { - Dashboard.Pages.EditPatientPage.UpdateActive(state, setState, v); - })], Object)), Dashboard.Pages.EditPatientPage.RenderFormSection("Contact Information", System.Array.init([Dashboard.Pages.EditPatientPage.RenderInputField("Phone", "patient-edit-phone", state.Phone, "Enter phone number", function (v) { - Dashboard.Pages.EditPatientPage.UpdateField(state, setState, "Phone", v); - }, "tel"), Dashboard.Pages.EditPatientPage.RenderInputField("Email", "patient-edit-email", state.Email, "Enter email address", function (v) { - Dashboard.Pages.EditPatientPage.UpdateField(state, setState, "Email", v); - }, "email")], Object)), Dashboard.Pages.EditPatientPage.RenderFormSection("Address", System.Array.init([Dashboard.Pages.EditPatientPage.RenderInputField("Address Line", "patient-edit-address", state.AddressLine, "Enter street address", function (v) { - Dashboard.Pages.EditPatientPage.UpdateField(state, setState, "AddressLine", v); - }), Dashboard.Pages.EditPatientPage.RenderInputField("City", "patient-edit-city", state.City, "Enter city", function (v) { - Dashboard.Pages.EditPatientPage.UpdateField(state, setState, "City", v); - }), Dashboard.Pages.EditPatientPage.RenderInputField("State", "patient-edit-state", state.State, "Enter state/province", function (v) { - Dashboard.Pages.EditPatientPage.UpdateField(state, setState, "State", v); - }), Dashboard.Pages.EditPatientPage.RenderInputField("Postal Code", "patient-edit-postal-code", state.PostalCode, "Enter postal code", function (v) { - Dashboard.Pages.EditPatientPage.UpdateField(state, setState, "PostalCode", v); - }), Dashboard.Pages.EditPatientPage.RenderInputField("Country", "patient-edit-country", state.Country, "Enter country", function (v) { - Dashboard.Pages.EditPatientPage.UpdateField(state, setState, "Country", v); - })], Object)), Dashboard.Pages.EditPatientPage.RenderFormActions(state, onBack)], Object))], Object)); - }, - RenderFormSection: function (title, fields) { - return Dashboard.React.Elements.Div("form-section mb-6", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(4, "form-section-title mb-4", System.Array.init([Dashboard.React.Elements.Text(title)], Object)), Dashboard.React.Elements.Div("grid grid-cols-2 gap-4", void 0, void 0, void 0, fields)], Object)); - }, - RenderInputField: function (label, id, value, placeholder, onChange, type) { - if (type === void 0) { type = "text"; } - return Dashboard.React.Elements.Div("form-group", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Label(id, "form-label", System.Array.init([Dashboard.React.Elements.Text(label)], Object)), Dashboard.React.Elements.Input("input", type, value, placeholder, onChange, void 0, false)], Object)); - }, - RenderSelectField: function (label, id, value, options, onChange) { - var optionElements = System.Array.init(options.length, null, Object); - for (var i = 0; i < options.length; i = (i + 1) | 0) { - optionElements[System.Array.index(i, optionElements)] = Dashboard.React.Elements.Option(options[System.Array.index(i, options)].Item1, options[System.Array.index(i, options)].Item2); - } - - return Dashboard.React.Elements.Div("form-group", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Label(id, "form-label", System.Array.init([Dashboard.React.Elements.Text(label)], Object)), Dashboard.React.Elements.Select("input", value, onChange, optionElements)], Object)); - }, - RenderCheckboxField: function (label, id, value, onChange) { - return Dashboard.React.Elements.Div("form-group flex items-center gap-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-2", void 0, void 0, function () { - onChange(!value); - }, System.Array.init([Dashboard.React.Elements.Span("status-dot " + ((value ? "active" : "inactive") || ""), void 0, void 0), Dashboard.React.Elements.Text((label || "") + ": " + ((value ? "Active" : "Inactive") || ""))], Object))], Object)); - }, - RenderFormActions: function (state, onBack) { - return Dashboard.React.Elements.Div("form-actions flex justify-end gap-4 mt-6", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Button("btn btn-secondary", onBack, state.Saving, "button", System.Array.init([Dashboard.React.Elements.Text("Cancel")], Object)), Dashboard.React.Elements.Button("btn btn-primary", void 0, state.Saving, "submit", System.Array.init([Dashboard.React.Elements.Text(state.Saving ? "Saving..." : "Save Changes")], Object))], Object)); - }, - UpdateField: function (state, setState, field, value) { - var $t; - var newState = ($t = new Dashboard.Pages.EditPatientState(), $t.Patient = state.Patient, $t.Loading = state.Loading, $t.Saving = state.Saving, $t.Error = null, $t.Success = null, $t.Active = state.Active, $t.GivenName = state.GivenName, $t.FamilyName = state.FamilyName, $t.BirthDate = state.BirthDate, $t.Gender = state.Gender, $t.Phone = state.Phone, $t.Email = state.Email, $t.AddressLine = state.AddressLine, $t.City = state.City, $t.State = state.State, $t.PostalCode = state.PostalCode, $t.Country = state.Country, $t); - - if (H5.referenceEquals(field, "GivenName")) { - newState.GivenName = value; - } else { - if (H5.referenceEquals(field, "FamilyName")) { - newState.FamilyName = value; - } else { - if (H5.referenceEquals(field, "BirthDate")) { - newState.BirthDate = value; - } else { - if (H5.referenceEquals(field, "Gender")) { - newState.Gender = value; - } else { - if (H5.referenceEquals(field, "Phone")) { - newState.Phone = value; - } else { - if (H5.referenceEquals(field, "Email")) { - newState.Email = value; - } else { - if (H5.referenceEquals(field, "AddressLine")) { - newState.AddressLine = value; - } else { - if (H5.referenceEquals(field, "City")) { - newState.City = value; - } else { - if (H5.referenceEquals(field, "State")) { - newState.State = value; - } else { - if (H5.referenceEquals(field, "PostalCode")) { - newState.PostalCode = value; - } else { - if (H5.referenceEquals(field, "Country")) { - newState.Country = value; - } - } - } - } - } - } - } - } - } - } - } - - setState(newState); - }, - UpdateActive: function (state, setState, value) { - var $t; - setState(($t = new Dashboard.Pages.EditPatientState(), $t.Patient = state.Patient, $t.Loading = state.Loading, $t.Saving = state.Saving, $t.Error = null, $t.Success = null, $t.Active = value, $t.GivenName = state.GivenName, $t.FamilyName = state.FamilyName, $t.BirthDate = state.BirthDate, $t.Gender = state.Gender, $t.Phone = state.Phone, $t.Email = state.Email, $t.AddressLine = state.AddressLine, $t.City = state.City, $t.State = state.State, $t.PostalCode = state.PostalCode, $t.Country = state.Country, $t)); - } - } - } - }); - - /** - * Edit patient page state class. - * - * @public - * @class Dashboard.Pages.EditPatientState - */ - H5.define("Dashboard.Pages.EditPatientState", { - fields: { - /** - * Patient being edited. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function Patient - * @type Object - */ - Patient: null, - /** - * Whether loading. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function Loading - * @type boolean - */ - Loading: false, - /** - * Whether saving. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function Saving - * @type boolean - */ - Saving: false, - /** - * Error message if any. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function Error - * @type string - */ - Error: null, - /** - * Success message if any. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function Success - * @type string - */ - Success: null, - /** - * Form field: Active status. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function Active - * @type boolean - */ - Active: false, - /** - * Form field: Given name. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function GivenName - * @type string - */ - GivenName: null, - /** - * Form field: Family name. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function FamilyName - * @type string - */ - FamilyName: null, - /** - * Form field: Birth date. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function BirthDate - * @type string - */ - BirthDate: null, - /** - * Form field: Gender. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function Gender - * @type string - */ - Gender: null, - /** - * Form field: Phone. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function Phone - * @type string - */ - Phone: null, - /** - * Form field: Email. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function Email - * @type string - */ - Email: null, - /** - * Form field: Address line. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function AddressLine - * @type string - */ - AddressLine: null, - /** - * Form field: City. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function City - * @type string - */ - City: null, - /** - * Form field: State. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function State - * @type string - */ - State: null, - /** - * Form field: Postal code. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function PostalCode - * @type string - */ - PostalCode: null, - /** - * Form field: Country. - * - * @instance - * @public - * @memberof Dashboard.Pages.EditPatientState - * @function Country - * @type string - */ - Country: null - } - }); - - /** - * Patients list page. - * - * @static - * @abstract - * @public - * @class Dashboard.Pages.PatientsPage - */ - H5.define("Dashboard.Pages.PatientsPage", { - statics: { - fields: { - _onEditPatient: null - }, - methods: { - /** - * Renders the patients page. - * - * @static - * @public - * @this Dashboard.Pages.PatientsPage - * @memberof Dashboard.Pages.PatientsPage - * @param {System.Action} onEditPatient - * @return {Object} - */ - Render: function (onEditPatient) { - var $t; - if (onEditPatient === void 0) { onEditPatient = null; } - Dashboard.Pages.PatientsPage._onEditPatient = onEditPatient; - var stateResult = Dashboard.React.Hooks.UseState(Dashboard.Pages.PatientsState, ($t = new Dashboard.Pages.PatientsState(), $t.Patients = System.Array.init(0, null, Object), $t.Loading = true, $t.Error = null, $t.SearchQuery = "", $t.SelectedPatient = null, $t)); - - var state = stateResult.State; - var setState = stateResult.SetState; - - Dashboard.React.Hooks.UseEffect$1(function () { - Dashboard.Pages.PatientsPage.LoadPatients(setState); - }, System.Array.init(0, null, System.Object)); - - var content; - if (state.Loading) { - content = Dashboard.Components.DataTable.RenderLoading(5, 5); - } else if (state.Error != null) { - content = Dashboard.Pages.PatientsPage.RenderError(state.Error); - } else if (state.Patients.length === 0) { - content = Dashboard.Components.DataTable.RenderEmpty("No patients found. Start by adding a new patient."); - } else { - content = Dashboard.Pages.PatientsPage.RenderPatientTable(state.Patients, function (p) { - Dashboard.Pages.PatientsPage.SelectPatient(p, setState); - }); - } - - return Dashboard.React.Elements.Div("page", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("page-header flex justify-between items-center", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(2, "page-title", System.Array.init([Dashboard.React.Elements.Text("Patients")], Object)), Dashboard.React.Elements.P("page-description", void 0, System.Array.init([Dashboard.React.Elements.Text("Manage patient records from the Clinical domain")], Object))], Object)), Dashboard.React.Elements.Button("btn btn-primary", void 0, false, "button", System.Array.init([Dashboard.Components.Icons.Plus(), Dashboard.React.Elements.Text("Add Patient")], Object))], Object)), Dashboard.React.Elements.Div("card mb-6", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex gap-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex-1 search-input", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("search-icon", void 0, void 0, System.Array.init([Dashboard.Components.Icons.Search()], Object)), Dashboard.React.Elements.Input("input", "text", state.SearchQuery, "Search patients by name...", function (query) { - Dashboard.Pages.PatientsPage.HandleSearch(query, setState); - }, void 0, false)], Object)), Dashboard.React.Elements.Button("btn btn-secondary", function () { - Dashboard.Pages.PatientsPage.LoadPatients(setState); - }, false, "button", System.Array.init([Dashboard.Components.Icons.Refresh(), Dashboard.React.Elements.Text("Refresh")], Object))], Object))], Object)), content], Object)); - }, - LoadPatients: function (setState) { - (async () => { - { - var $t; - try { - var patients = (await H5.toPromise(Dashboard.Api.ApiClient.GetPatientsAsync())); - setState(($t = new Dashboard.Pages.PatientsState(), $t.Patients = patients, $t.Loading = false, $t.Error = null, $t.SearchQuery = "", $t.SelectedPatient = null, $t)); - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t = new Dashboard.Pages.PatientsState(), $t.Patients = System.Array.init(0, null, Object), $t.Loading = false, $t.Error = ex.Message, $t.SearchQuery = "", $t.SelectedPatient = null, $t)); - } - }})() - }, - HandleSearch: function (query, setState) { - (async () => { - { - var $t; - if (System.String.isNullOrWhiteSpace(query)) { - Dashboard.Pages.PatientsPage.LoadPatients(setState); - return; - } - - try { - var patients = (await H5.toPromise(Dashboard.Api.ApiClient.SearchPatientsAsync(query))); - setState(($t = new Dashboard.Pages.PatientsState(), $t.Patients = patients, $t.Loading = false, $t.Error = null, $t.SearchQuery = query, $t.SelectedPatient = null, $t)); - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t = new Dashboard.Pages.PatientsState(), $t.Patients = System.Array.init(0, null, Object), $t.Loading = false, $t.Error = ex.Message, $t.SearchQuery = query, $t.SelectedPatient = null, $t)); - } - }})() - }, - SelectPatient: function (patient, setState) { }, - RenderError: function (message) { - return Dashboard.React.Elements.Div("card", void 0, { borderLeft: "4px solid var(--error)" }, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-3 p-4", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.X(), Dashboard.React.Elements.Text("Error loading patients: " + (message || ""))], Object))], Object)); - }, - RenderPatientTable: function (patients, onSelect) { - var $t; - var columns = System.Array.init([($t = new Dashboard.Components.Column(), $t.Key = "name", $t.Header = "Name", $t), ($t = new Dashboard.Components.Column(), $t.Key = "gender", $t.Header = "Gender", $t), ($t = new Dashboard.Components.Column(), $t.Key = "birthDate", $t.Header = "Birth Date", $t), ($t = new Dashboard.Components.Column(), $t.Key = "contact", $t.Header = "Contact", $t), ($t = new Dashboard.Components.Column(), $t.Key = "status", $t.Header = "Status", $t), ($t = new Dashboard.Components.Column(), $t.Key = "actions", $t.Header = "Actions", $t.ClassName = "text-right", $t)], Dashboard.Components.Column); - - return Dashboard.Components.DataTable.Render(Object, columns, patients, function (p) { - return p.Id; - }, function (patient, key) { - return Dashboard.Pages.PatientsPage.RenderCell(patient, key, onSelect); - }, onSelect); - }, - RenderCell: function (patient, key, onSelect) { - var $t; - if (H5.referenceEquals(key, "name")) { - return Dashboard.Pages.PatientsPage.RenderPatientName(patient); - } - if (H5.referenceEquals(key, "gender")) { - return Dashboard.Pages.PatientsPage.RenderGender(patient.Gender); - } - if (H5.referenceEquals(key, "birthDate")) { - return Dashboard.React.Elements.Text(($t = patient.BirthDate, $t != null ? $t : "N/A")); - } - if (H5.referenceEquals(key, "contact")) { - return Dashboard.Pages.PatientsPage.RenderContact(patient); - } - if (H5.referenceEquals(key, "status")) { - return Dashboard.Pages.PatientsPage.RenderStatus(patient.Active); - } - if (H5.referenceEquals(key, "actions")) { - return Dashboard.Pages.PatientsPage.RenderActions(patient, onSelect); - } - return Dashboard.React.Elements.Text(""); - }, - RenderPatientName: function (patient) { - var idPrefix = patient.Id.length > 8 ? patient.Id.substr(0, 8) : patient.Id; - return Dashboard.React.Elements.Div("flex items-center gap-3", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("avatar avatar-sm", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(Dashboard.Pages.PatientsPage.GetInitials(patient))], Object)), Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("font-medium", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text((patient.GivenName || "") + " " + (patient.FamilyName || ""))], Object)), Dashboard.React.Elements.Div("text-sm text-gray-500", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text("ID: " + (idPrefix || "") + "...")], Object))], Object))], Object)); - }, - RenderGender: function (gender) { - var $t; - return Dashboard.React.Elements.Span("badge " + (Dashboard.Pages.PatientsPage.GenderBadgeClass(gender) || ""), void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(($t = gender, $t != null ? $t : "Unknown"))], Object)); - }, - GenderBadgeClass: function (gender) { - if (H5.referenceEquals(gender, "male")) { - return "badge-primary"; - } - if (H5.referenceEquals(gender, "female")) { - return "badge-teal"; - } - return "badge-gray"; - }, - RenderContact: function (patient) { - var $t, $t1; - var contact = ($t = patient.Email, $t != null ? $t : ($t1 = patient.Phone, $t1 != null ? $t1 : "No contact")); - return Dashboard.React.Elements.Text(contact); - }, - RenderStatus: function (active) { - return Dashboard.React.Elements.Div("flex items-center gap-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("status-dot " + ((active ? "active" : "inactive") || ""), void 0, void 0), Dashboard.React.Elements.Text(active ? "Active" : "Inactive")], Object)); - }, - RenderActions: function (patient, onSelect) { - return Dashboard.React.Elements.Div("table-action", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Button("btn btn-ghost btn-sm", function () { - onSelect(patient); - }, false, "button", System.Array.init([Dashboard.Components.Icons.Eye()], Object)), Dashboard.React.Elements.Button("btn btn-ghost btn-sm", function () { - !H5.staticEquals(Dashboard.Pages.PatientsPage._onEditPatient, null) ? Dashboard.Pages.PatientsPage._onEditPatient(patient.Id) : null; - }, false, "button", System.Array.init([Dashboard.Components.Icons.Edit()], Object))], Object)); - }, - GetInitials: function (patient) { - return (Dashboard.Pages.PatientsPage.FirstChar(patient.GivenName) || "") + (Dashboard.Pages.PatientsPage.FirstChar(patient.FamilyName) || ""); - }, - FirstChar: function (s) { - if (System.String.isNullOrEmpty(s)) { - return ""; - } - return s.substr(0, 1).toUpperCase(); - } - } - } - }); - - /** - * Patients page state class. - * - * @public - * @class Dashboard.Pages.PatientsState - */ - H5.define("Dashboard.Pages.PatientsState", { - fields: { - /** - * List of patients. - * - * @instance - * @public - * @memberof Dashboard.Pages.PatientsState - * @function Patients - * @type Array. - */ - Patients: null, - /** - * Whether loading. - * - * @instance - * @public - * @memberof Dashboard.Pages.PatientsState - * @function Loading - * @type boolean - */ - Loading: false, - /** - * Error message if any. - * - * @instance - * @public - * @memberof Dashboard.Pages.PatientsState - * @function Error - * @type string - */ - Error: null, - /** - * Current search query. - * - * @instance - * @public - * @memberof Dashboard.Pages.PatientsState - * @function SearchQuery - * @type string - */ - SearchQuery: null, - /** - * Selected patient. - * - * @instance - * @public - * @memberof Dashboard.Pages.PatientsState - * @function SelectedPatient - * @type Object - */ - SelectedPatient: null - } - }); - - /** - * Practitioners list page. - * - * @static - * @abstract - * @public - * @class Dashboard.Pages.PractitionersPage - */ - H5.define("Dashboard.Pages.PractitionersPage", { - statics: { - methods: { - /** - * Renders the practitioners page. - * - * @static - * @public - * @this Dashboard.Pages.PractitionersPage - * @memberof Dashboard.Pages.PractitionersPage - * @return {Object} - */ - Render: function () { - var $t; - var stateResult = Dashboard.React.Hooks.UseState(Dashboard.Pages.PractitionersState, ($t = new Dashboard.Pages.PractitionersState(), $t.Practitioners = System.Array.init(0, null, Object), $t.Loading = true, $t.Error = null, $t.SpecialtyFilter = null, $t)); - - var state = stateResult.State; - var setState = stateResult.SetState; - - Dashboard.React.Hooks.UseEffect$1(function () { - Dashboard.Pages.PractitionersPage.LoadPractitioners(setState); - }, System.Array.init(0, null, System.Object)); - - var content; - if (state.Loading) { - content = Dashboard.Pages.PractitionersPage.RenderLoadingGrid(); - } else if (state.Error != null) { - content = Dashboard.Pages.PractitionersPage.RenderError(state.Error); - } else if (state.Practitioners.length === 0) { - content = Dashboard.Pages.PractitionersPage.RenderEmpty(); - } else { - content = Dashboard.Pages.PractitionersPage.RenderPractitionerGrid(state.Practitioners); - } - - return Dashboard.React.Elements.Div("page", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("page-header flex justify-between items-center", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div(void 0, void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(2, "page-title", System.Array.init([Dashboard.React.Elements.Text("Practitioners")], Object)), Dashboard.React.Elements.P("page-description", void 0, System.Array.init([Dashboard.React.Elements.Text("Manage healthcare providers from the Scheduling domain")], Object))], Object)), Dashboard.React.Elements.Button("btn btn-primary", void 0, false, "button", System.Array.init([Dashboard.Components.Icons.Plus(), Dashboard.React.Elements.Text("Add Practitioner")], Object))], Object)), Dashboard.React.Elements.Div("card mb-6", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex gap-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("input-group", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Label(void 0, "input-label", System.Array.init([Dashboard.React.Elements.Text("Filter by Specialty")], Object)), Dashboard.React.Elements.Select("input", ($t = state.SpecialtyFilter, $t != null ? $t : ""), function (specialty) { - Dashboard.Pages.PractitionersPage.FilterBySpecialty(specialty, setState); - }, System.Array.init([Dashboard.React.Elements.Option("", "All Specialties"), Dashboard.React.Elements.Option("Cardiology", "Cardiology"), Dashboard.React.Elements.Option("Dermatology", "Dermatology"), Dashboard.React.Elements.Option("Family Medicine", "Family Medicine"), Dashboard.React.Elements.Option("Internal Medicine", "Internal Medicine"), Dashboard.React.Elements.Option("Neurology", "Neurology"), Dashboard.React.Elements.Option("Oncology", "Oncology"), Dashboard.React.Elements.Option("Pediatrics", "Pediatrics"), Dashboard.React.Elements.Option("Psychiatry", "Psychiatry"), Dashboard.React.Elements.Option("Surgery", "Surgery")], Object))], Object)), Dashboard.React.Elements.Div("flex-1", void 0, void 0, void 0), Dashboard.React.Elements.Button("btn btn-secondary", function () { - Dashboard.Pages.PractitionersPage.LoadPractitioners(setState); - }, false, "button", System.Array.init([Dashboard.Components.Icons.Refresh(), Dashboard.React.Elements.Text("Refresh")], Object))], Object))], Object)), content], Object)); - }, - LoadPractitioners: function (setState) { - (async () => { - { - var $t; - try { - var practitioners = (await H5.toPromise(Dashboard.Api.ApiClient.GetPractitionersAsync())); - setState(($t = new Dashboard.Pages.PractitionersState(), $t.Practitioners = practitioners, $t.Loading = false, $t.Error = null, $t.SpecialtyFilter = null, $t)); - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t = new Dashboard.Pages.PractitionersState(), $t.Practitioners = System.Array.init(0, null, Object), $t.Loading = false, $t.Error = ex.Message, $t.SpecialtyFilter = null, $t)); - } - }})() - }, - FilterBySpecialty: function (specialty, setState) { - (async () => { - { - var $t; - if (System.String.isNullOrEmpty(specialty)) { - Dashboard.Pages.PractitionersPage.LoadPractitioners(setState); - return; - } - - try { - var practitioners = (await H5.toPromise(Dashboard.Api.ApiClient.SearchPractitionersAsync(specialty))); - setState(($t = new Dashboard.Pages.PractitionersState(), $t.Practitioners = practitioners, $t.Loading = false, $t.Error = null, $t.SpecialtyFilter = specialty, $t)); - } catch (ex) { - ex = System.Exception.create(ex); - setState(($t = new Dashboard.Pages.PractitionersState(), $t.Practitioners = System.Array.init(0, null, Object), $t.Loading = false, $t.Error = ex.Message, $t.SpecialtyFilter = specialty, $t)); - } - }})() - }, - RenderError: function (message) { - return Dashboard.React.Elements.Div("card", void 0, { borderLeft: "4px solid var(--error)" }, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-center gap-3 p-4", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.X(), Dashboard.React.Elements.Text("Error loading practitioners: " + (message || ""))], Object))], Object)); - }, - RenderEmpty: function () { - return Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("empty-state", void 0, void 0, void 0, System.Array.init([Dashboard.Components.Icons.UserDoctor(), Dashboard.React.Elements.H(4, "empty-state-title", System.Array.init([Dashboard.React.Elements.Text("No Practitioners")], Object)), Dashboard.React.Elements.P("empty-state-description", void 0, System.Array.init([Dashboard.React.Elements.Text("No practitioners found. Add a new practitioner to get started.")], Object)), Dashboard.React.Elements.Button("btn btn-primary mt-4", void 0, false, "button", System.Array.init([Dashboard.Components.Icons.Plus(), Dashboard.React.Elements.Text("Add Practitioner")], Object))], Object))], Object)); - }, - RenderLoadingGrid: function () { - return Dashboard.React.Elements.Div("grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", void 0, void 0, void 0, System.Linq.Enumerable.range(0, 6).select(function (i) { - return Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("skeleton", void 0, { width: "80px", height: "80px", borderRadius: "50%" }, void 0), Dashboard.React.Elements.Div("skeleton mt-4", void 0, { width: "60%", height: "20px" }, void 0), Dashboard.React.Elements.Div("skeleton mt-2", void 0, { width: "40%", height: "16px" }, void 0), Dashboard.React.Elements.Div("skeleton mt-4", void 0, { width: "100%", height: "16px" }, void 0)], Object)); - }).ToArray(Object)); - }, - RenderPractitionerGrid: function (practitioners) { - return Dashboard.React.Elements.Div("grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6", void 0, void 0, void 0, System.Linq.Enumerable.from(practitioners, Object).select(Dashboard.Pages.PractitionersPage.RenderPractitionerCard).ToArray(Object)); - }, - RenderPractitionerCard: function (practitioner) { - var $t, $t1, $t2, $t3; - return Dashboard.React.Elements.Div("card", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("flex items-start gap-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Div("avatar avatar-xl", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(Dashboard.Pages.PractitionersPage.GetInitials(practitioner))], Object)), Dashboard.React.Elements.Div("flex-1", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.H(4, "font-semibold", System.Array.init([Dashboard.React.Elements.Text("Dr. " + (practitioner.NameGiven || "") + " " + (practitioner.NameFamily || ""))], Object)), Dashboard.React.Elements.Span("badge badge-teal mt-1", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(($t = practitioner.Specialty, $t != null ? $t : "General"))], Object)), Dashboard.React.Elements.Div("flex items-center gap-2 mt-2", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("status-dot " + ((practitioner.Active ? "active" : "inactive") || ""), void 0, void 0), Dashboard.React.Elements.Text(practitioner.Active ? "Available" : "Unavailable")], Object))], Object))], Object)), Dashboard.React.Elements.Div("mt-4 pt-4 border-t border-gray-200", void 0, void 0, void 0, System.Array.init([Dashboard.Pages.PractitionersPage.RenderDetail("ID", practitioner.Identifier), Dashboard.Pages.PractitionersPage.RenderDetail("Qualification", ($t1 = practitioner.Qualification, $t1 != null ? $t1 : "N/A")), Dashboard.Pages.PractitionersPage.RenderDetail("Email", ($t2 = practitioner.TelecomEmail, $t2 != null ? $t2 : "N/A")), Dashboard.Pages.PractitionersPage.RenderDetail("Phone", ($t3 = practitioner.TelecomPhone, $t3 != null ? $t3 : "N/A"))], Object)), Dashboard.React.Elements.Div("flex gap-2 mt-4", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Button("btn btn-primary btn-sm flex-1", void 0, false, "button", System.Array.init([Dashboard.Components.Icons.Calendar(), Dashboard.React.Elements.Text("View Schedule")], Object)), Dashboard.React.Elements.Button("btn btn-secondary btn-sm", void 0, false, "button", System.Array.init([Dashboard.Components.Icons.Edit()], Object))], Object))], Object)); - }, - RenderDetail: function (label, value) { - return Dashboard.React.Elements.Div("flex justify-between py-1", void 0, void 0, void 0, System.Array.init([Dashboard.React.Elements.Span("text-sm text-gray-500", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(label)], Object)), Dashboard.React.Elements.Span("text-sm font-medium", void 0, void 0, System.Array.init([Dashboard.React.Elements.Text(value)], Object))], Object)); - }, - GetInitials: function (p) { - return (Dashboard.Pages.PractitionersPage.FirstChar(p.NameGiven) || "") + (Dashboard.Pages.PractitionersPage.FirstChar(p.NameFamily) || ""); - }, - FirstChar: function (s) { - if (System.String.isNullOrEmpty(s)) { - return ""; - } - return s.substr(0, 1).toUpperCase(); - } - } - } - }); - - /** - * Practitioners page state class. - * - * @public - * @class Dashboard.Pages.PractitionersState - */ - H5.define("Dashboard.Pages.PractitionersState", { - fields: { - /** - * List of practitioners. - * - * @instance - * @public - * @memberof Dashboard.Pages.PractitionersState - * @function Practitioners - * @type Array. - */ - Practitioners: null, - /** - * Whether loading. - * - * @instance - * @public - * @memberof Dashboard.Pages.PractitionersState - * @function Loading - * @type boolean - */ - Loading: false, - /** - * Error message if any. - * - * @instance - * @public - * @memberof Dashboard.Pages.PractitionersState - * @function Error - * @type string - */ - Error: null, - /** - * Current specialty filter. - * - * @instance - * @public - * @memberof Dashboard.Pages.PractitionersState - * @function SpecialtyFilter - * @type string - */ - SpecialtyFilter: null - } - }); - - /** - * Application entry point. - * - * @static - * @abstract - * @public - * @class Dashboard.Program - */ - H5.define("Dashboard.Program", { - /** - * Main entry point - called when H5 script loads. - * - * @static - * @public - * @this Dashboard.Program - * @memberof Dashboard.Program - * @return {void} - */ - main: function Main () { - var clinicalUrl = Dashboard.Program.GetConfigValue("CLINICAL_API_URL", "http://localhost:5080"); - var schedulingUrl = Dashboard.Program.GetConfigValue("SCHEDULING_API_URL", "http://localhost:5001"); - - Dashboard.Api.ApiClient.Configure(clinicalUrl, schedulingUrl); - - var icd10Url = Dashboard.Program.GetConfigValue("ICD10_API_URL", "http://localhost:5090"); - Dashboard.Api.ApiClient.ConfigureIcd10(icd10Url); - - var authToken = Dashboard.Program.GetConfigValue("AUTH_TOKEN", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkYXNoYm9hcmQtdXNlciIsImp0aSI6IjE1MTMwYTg0LTY4NTktNGNmMy05MjA3LTMyMGJhYWRiNzhjNSIsInJvbGVzIjpbImNsaW5pY2lhbiIsInNjaGVkdWxlciJdLCJleHAiOjIwODE5MjIxMDQsImlhdCI6MTc2NjM4OTMwNH0.mk66XyKaLWukzZOmGNwss74lSlXobt6Em0NoEbXRdKU"); - Dashboard.Api.ApiClient.SetTokens(authToken, authToken); - - Dashboard.Program.Log("Healthcare Dashboard starting..."); - Dashboard.Program.Log("Clinical API: " + (clinicalUrl || "")); - Dashboard.Program.Log("Scheduling API: " + (schedulingUrl || "")); - Dashboard.Program.Log("ICD-10 API: " + (icd10Url || "")); - - Dashboard.Program.HideLoadingScreen(); - - Dashboard.React.ReactInterop.RenderApp(Dashboard.App.Render()); - - Dashboard.Program.Log("Dashboard initialized successfully!"); - }, - statics: { - methods: { - GetConfigValue: function (key, defaultValue) { - var windowConfig = window["dashboardConfig"]; - if (windowConfig != null) { - var value = H5.unbox(windowConfig)[key]; - if (!System.String.isNullOrEmpty(value)) { - return value; - } - } - - return defaultValue; - }, - HideLoadingScreen: function () { - var loadingScreen = document.getElementById("loading-screen"); - if (loadingScreen != null) { - loadingScreen.classList.add('hidden'); - } - }, - Log: function (message) { - console.log("[Dashboard] " + (message || "")); - } - } - } - }); - - /** @namespace Dashboard.React */ - - /** - * HTML element factory methods for React. - * - * @static - * @abstract - * @public - * @class Dashboard.React.Elements - */ - H5.define("Dashboard.React.Elements", { - statics: { - methods: { - /** - * Creates a div element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {string} id - * @param {System.Object} style - * @param {System.Action} onClick - * @param {Array.} children - * @return {Object} - */ - Div: function (className, id, style, onClick, children) { - if (className === void 0) { className = null; } - if (id === void 0) { id = null; } - if (style === void 0) { style = null; } - if (onClick === void 0) { onClick = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("div", className, id, style, onClick, children); - }, - /** - * Creates a span element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {string} id - * @param {System.Object} style - * @param {Array.} children - * @return {Object} - */ - Span: function (className, id, style, children) { - if (className === void 0) { className = null; } - if (id === void 0) { id = null; } - if (style === void 0) { style = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("span", className, id, style, null, children); - }, - /** - * Creates a paragraph element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {System.Object} style - * @param {Array.} children - * @return {Object} - */ - P: function (className, style, children) { - if (className === void 0) { className = null; } - if (style === void 0) { style = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("p", className, null, style, null, children); - }, - /** - * Creates a heading element (h1-h6). - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {number} level - * @param {string} className - * @param {Array.} children - * @return {Object} - */ - H: function (level, className, children) { - if (className === void 0) { className = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("h" + level, className, null, null, null, children); - }, - /** - * Creates a button element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {System.Action} onClick - * @param {boolean} disabled - * @param {string} type - * @param {Array.} children - * @return {Object} - */ - Button: function (className, onClick, disabled, type, children) { - if (className === void 0) { className = null; } - if (onClick === void 0) { onClick = null; } - if (disabled === void 0) { disabled = false; } - if (type === void 0) { type = "button"; } - if (children === void 0) { children = []; } - var clickHandler = null; - if (!H5.staticEquals(onClick, null)) { - clickHandler = function (e) { - e.stopPropagation(); - onClick(); - }; - } - var props = { className: className, onClick: clickHandler, disabled: disabled, type: type }; - return React.createElement("button", props, children); - }, - /** - * Creates an input element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {string} type - * @param {string} value - * @param {string} placeholder - * @param {System.Action} onChange - * @param {System.Action} onKeyDown - * @param {boolean} disabled - * @return {Object} - */ - Input: function (className, type, value, placeholder, onChange, onKeyDown, disabled) { - if (className === void 0) { className = null; } - if (type === void 0) { type = "text"; } - if (value === void 0) { value = null; } - if (placeholder === void 0) { placeholder = null; } - if (onChange === void 0) { onChange = null; } - if (onKeyDown === void 0) { onKeyDown = null; } - if (disabled === void 0) { disabled = false; } - var changeHandler = null; - if (!H5.staticEquals(onChange, null)) { - changeHandler = function (e) { - onChange(H5.unbox(H5.unbox(e)["target"])["value"]); - }; - } - var keyDownHandler = null; - if (!H5.staticEquals(onKeyDown, null)) { - keyDownHandler = function (e) { - onKeyDown(H5.unbox(e)["key"]); - }; - } - var props = { className: className, type: type, value: value, placeholder: placeholder, onChange: changeHandler, onKeyDown: keyDownHandler, disabled: disabled }; - return React.createElement("input", props); - }, - /** - * Creates a text node. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} content - * @return {Object} - */ - Text: function (content) { - return React.createElement("span", null, content); - }, - /** - * Creates an image element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} src - * @param {string} alt - * @param {string} className - * @param {System.Object} style - * @return {Object} - */ - Img: function (src, alt, className, style) { - if (alt === void 0) { alt = null; } - if (className === void 0) { className = null; } - if (style === void 0) { style = null; } - var props = { src: src, alt: alt, className: className, style: style }; - return React.createElement("img", props); - }, - /** - * Creates a link element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} href - * @param {string} className - * @param {string} target - * @param {System.Action} onClick - * @param {Array.} children - * @return {Object} - */ - A: function (href, className, target, onClick, children) { - if (className === void 0) { className = null; } - if (target === void 0) { target = null; } - if (onClick === void 0) { onClick = null; } - if (children === void 0) { children = []; } - var clickHandler = null; - if (!H5.staticEquals(onClick, null)) { - clickHandler = function (e) { - e.preventDefault(); - onClick(); - }; - } - var props = { href: href, className: className, target: target, onClick: clickHandler }; - return React.createElement("a", props, children); - }, - /** - * Creates a nav element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {Array.} children - * @return {Object} - */ - Nav: function (className, children) { - if (className === void 0) { className = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("nav", className, null, null, null, children); - }, - /** - * Creates a header element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {Array.} children - * @return {Object} - */ - Header: function (className, children) { - if (className === void 0) { className = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("header", className, null, null, null, children); - }, - /** - * Creates a main element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {Array.} children - * @return {Object} - */ - Main: function (className, children) { - if (className === void 0) { className = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("main", className, null, null, null, children); - }, - /** - * Creates an aside element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {Array.} children - * @return {Object} - */ - Aside: function (className, children) { - if (className === void 0) { className = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("aside", className, null, null, null, children); - }, - /** - * Creates a section element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {Array.} children - * @return {Object} - */ - Section: function (className, children) { - if (className === void 0) { className = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("section", className, null, null, null, children); - }, - /** - * Creates an article element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {Array.} children - * @return {Object} - */ - Article: function (className, children) { - if (className === void 0) { className = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("article", className, null, null, null, children); - }, - /** - * Creates a footer element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {Array.} children - * @return {Object} - */ - Footer: function (className, children) { - if (className === void 0) { className = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("footer", className, null, null, null, children); - }, - /** - * Creates a table element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {Array.} children - * @return {Object} - */ - Table: function (className, children) { - if (className === void 0) { className = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("table", className, null, null, null, children); - }, - /** - * Creates a thead element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {Array.} children - * @return {Object} - */ - THead: function (children) { - if (children === void 0) { children = []; } - return React.createElement("thead", null, children); - }, - /** - * Creates a tbody element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {Array.} children - * @return {Object} - */ - TBody: function (children) { - if (children === void 0) { children = []; } - return React.createElement("tbody", null, children); - }, - /** - * Creates a tr element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {System.Action} onClick - * @param {Array.} children - * @return {Object} - */ - Tr: function (className, onClick, children) { - if (className === void 0) { className = null; } - if (onClick === void 0) { onClick = null; } - if (children === void 0) { children = []; } - var clickHandler = null; - if (!H5.staticEquals(onClick, null)) { - clickHandler = function (_) { - onClick(); - }; - } - var props = { className: className, onClick: clickHandler }; - return React.createElement("tr", props, children); - }, - /** - * Creates a th element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {Array.} children - * @return {Object} - */ - Th: function (className, children) { - if (className === void 0) { className = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("th", className, null, null, null, children); - }, - /** - * Creates a td element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {Array.} children - * @return {Object} - */ - Td: function (className, children) { - if (className === void 0) { className = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("td", className, null, null, null, children); - }, - /** - * Creates an unordered list element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {Array.} children - * @return {Object} - */ - Ul: function (className, children) { - if (className === void 0) { className = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("ul", className, null, null, null, children); - }, - /** - * Creates a list item element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {System.Action} onClick - * @param {Array.} children - * @return {Object} - */ - Li: function (className, onClick, children) { - if (className === void 0) { className = null; } - if (onClick === void 0) { onClick = null; } - if (children === void 0) { children = []; } - return Dashboard.React.Elements.CreateElement("li", className, null, null, onClick, children); - }, - /** - * Creates a form element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {System.Action} onSubmit - * @param {Array.} children - * @return {Object} - */ - Form: function (className, onSubmit, children) { - if (className === void 0) { className = null; } - if (onSubmit === void 0) { onSubmit = null; } - if (children === void 0) { children = []; } - var submitHandler = null; - if (!H5.staticEquals(onSubmit, null)) { - submitHandler = function (e) { - e.preventDefault(); - onSubmit(); - }; - } - var props = { className: className, onSubmit: submitHandler }; - return React.createElement("form", props, children); - }, - /** - * Creates a label element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} htmlFor - * @param {string} className - * @param {Array.} children - * @return {Object} - */ - Label: function (htmlFor, className, children) { - if (htmlFor === void 0) { htmlFor = null; } - if (className === void 0) { className = null; } - if (children === void 0) { children = []; } - var props = { htmlFor: htmlFor, className: className }; - return React.createElement("label", props, children); - }, - /** - * Creates a select element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {string} value - * @param {System.Action} onChange - * @param {Array.} children - * @return {Object} - */ - Select: function (className, value, onChange, children) { - if (className === void 0) { className = null; } - if (value === void 0) { value = null; } - if (onChange === void 0) { onChange = null; } - if (children === void 0) { children = []; } - var changeHandler = null; - if (!H5.staticEquals(onChange, null)) { - changeHandler = function (e) { - onChange(H5.unbox(H5.unbox(e)["target"])["value"]); - }; - } - var props = { className: className, value: value, onChange: changeHandler }; - return React.createElement("select", props, children); - }, - /** - * Creates an option element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} value - * @param {string} label - * @return {Object} - */ - Option: function (value, label) { - var props = { value: value }; - return React.createElement("option", props, label); - }, - /** - * Creates a textarea element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {string} value - * @param {string} placeholder - * @param {number} rows - * @param {System.Action} onChange - * @return {Object} - */ - TextArea: function (className, value, placeholder, rows, onChange) { - if (className === void 0) { className = null; } - if (value === void 0) { value = null; } - if (placeholder === void 0) { placeholder = null; } - if (rows === void 0) { rows = 0; } - if (onChange === void 0) { onChange = null; } - var changeHandler = null; - if (!H5.staticEquals(onChange, null)) { - changeHandler = function (e) { - onChange(H5.unbox(H5.unbox(e)["target"])["value"]); - }; - } - var props = { className: className, value: value, placeholder: placeholder, rows: rows > 0 ? H5.box(rows, System.Int32) : null, onChange: changeHandler }; - return React.createElement("textarea", props); - }, - /** - * Creates an SVG element. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} className - * @param {number} width - * @param {number} height - * @param {string} viewBox - * @param {string} fill - * @param {Array.} children - * @return {Object} - */ - Svg: function (className, width, height, viewBox, fill, children) { - if (className === void 0) { className = null; } - if (width === void 0) { width = 0; } - if (height === void 0) { height = 0; } - if (viewBox === void 0) { viewBox = null; } - if (fill === void 0) { fill = null; } - if (children === void 0) { children = []; } - var props = { className: className, width: width > 0 ? H5.box(width, System.Int32) : null, height: height > 0 ? H5.box(height, System.Int32) : null, viewBox: viewBox, fill: fill }; - return React.createElement("svg", props, children); - }, - /** - * Creates a path element for SVG. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {string} d - * @param {string} fill - * @param {string} stroke - * @param {number} strokeWidth - * @return {Object} - */ - Path: function (d, fill, stroke, strokeWidth) { - if (fill === void 0) { fill = null; } - if (stroke === void 0) { stroke = null; } - if (strokeWidth === void 0) { strokeWidth = 0; } - var props = { d: d, fill: fill, stroke: stroke, strokeWidth: strokeWidth > 0 ? H5.box(strokeWidth, System.Int32) : null }; - return React.createElement("path", props); - }, - /** - * Creates a React Fragment. - * - * @static - * @public - * @this Dashboard.React.Elements - * @memberof Dashboard.React.Elements - * @param {Array.} children - * @return {Object} - */ - Fragment: function (children) { - if (children === void 0) { children = []; } - return React.createElement(H5.unbox(React["Fragment"]), null, children); - }, - CreateElement: function (tag, className, id, style, onClick, children) { - var clickHandler = null; - if (!H5.staticEquals(onClick, null)) { - clickHandler = function (_) { - onClick(); - }; - } - var props = { className: className, id: id, style: style, onClick: clickHandler }; - return React.createElement(tag, props, children); - } - } - } - }); - - /** - * React hooks wrapper for H5. - * - * @static - * @abstract - * @public - * @class Dashboard.React.Hooks - */ - H5.define("Dashboard.React.Hooks", { - statics: { - methods: { - /** - * React useState hook - manages component state. - * - * @static - * @public - * @this Dashboard.React.Hooks - * @memberof Dashboard.React.Hooks - * @param {Function} T - * @param {T} initialValue - * @return {Dashboard.React.StateResult$1} - */ - UseState: function (T, initialValue) { - var $t; - var result = React.useState(initialValue); - var state = H5.cast(H5.unbox(result[System.Array.index(0, result)], T), T); - var setState = result[System.Array.index(1, result)]; - return ($t = new (Dashboard.React.StateResult$1(T))(), $t.State = state, $t.SetState = setState, $t); - }, - /** - * React useState hook with functional update. - * - * @static - * @public - * @this Dashboard.React.Hooks - * @memberof Dashboard.React.Hooks - * @param {Function} T - * @param {T} initialValue - * @return {Dashboard.React.StateFuncResult$1} - */ - UseStateFunc: function (T, initialValue) { - var $t; - var result = React.useState(initialValue); - var state = H5.cast(H5.unbox(result[System.Array.index(0, result)], T), T); - var setState = result[System.Array.index(1, result)]; - return ($t = new (Dashboard.React.StateFuncResult$1(T))(), $t.State = state, $t.SetState = setState, $t); - }, - /** - * React useEffect hook - manages side effects. - * - * @static - * @public - * @this Dashboard.React.Hooks - * @memberof Dashboard.React.Hooks - * @param {System.Action} effect - * @param {Array.} deps - * @return {void} - */ - UseEffect$1: function (effect, deps) { - if (deps === void 0) { deps = null; } - React.useEffect(function () { - effect(); - return null; - }, H5.unbox(deps)); - }, - /** - * React useEffect hook with cleanup function. - * - * @static - * @public - * @this Dashboard.React.Hooks - * @memberof Dashboard.React.Hooks - * @param {System.Action} effect - * @param {System.Func} cleanup - * @param {Array.} deps - * @return {void} - */ - UseEffect: function (effect, cleanup, deps) { - if (deps === void 0) { deps = null; } - React.useEffect(function () { - effect(); - return cleanup(); - }, H5.unbox(deps)); - }, - /** - * React useRef hook - creates a mutable ref object. - * - * @static - * @public - * @this Dashboard.React.Hooks - * @memberof Dashboard.React.Hooks - * @param {Function} T - * @param {T} initialValue - * @return {Object} - */ - UseRef: function (T, initialValue) { - if (initialValue === void 0) { initialValue = H5.getDefaultValue(T); } - return React.useRef(initialValue); - }, - /** - * React useMemo hook - memoizes expensive computations. - * - * @static - * @public - * @this Dashboard.React.Hooks - * @memberof Dashboard.React.Hooks - * @param {Function} T - * @param {System.Func} factory - * @param {Array.} deps - * @return {T} - */ - UseMemo: function (T, factory, deps) { - return React.useMemo(factory, H5.unbox(deps)); - }, - /** - * React useCallback hook - memoizes callback functions. - Note: In C# 7.2, we cannot use Delegate constraint, so callback must be cast appropriately. - * - * @static - * @public - * @this Dashboard.React.Hooks - * @memberof Dashboard.React.Hooks - * @param {Function} T - * @param {T} callback - * @param {Array.} deps - * @return {T} - */ - UseCallback: function (T, callback, deps) { - return React.useCallback(callback, H5.unbox(deps)); - }, - /** - * React useContext hook - consumes a React context. - * - * @static - * @public - * @this Dashboard.React.Hooks - * @memberof Dashboard.React.Hooks - * @param {Function} T - * @param {System.Object} context - * @return {T} - */ - UseContext: function (T, context) { - return React.useContext(H5.unbox(context)); - } - } - } - }); - - /** - * Core React interop types and functions for H5. - * - * @static - * @abstract - * @public - * @class Dashboard.React.ReactInterop - */ - H5.define("Dashboard.React.ReactInterop", { - statics: { - methods: { - /** - * Creates a React element using React.createElement. - * - * @static - * @public - * @this Dashboard.React.ReactInterop - * @memberof Dashboard.React.ReactInterop - * @param {string} type - * @param {System.Object} props - * @param {Array.} children - * @return {Object} - */ - CreateElement$1: function (type, props, children) { - if (props === void 0) { props = null; } - if (children === void 0) { children = []; } - return React.createElement(type, H5.unbox(props), H5.unbox(children)); - }, - /** - * Creates a React element from a component function. - * - * @static - * @public - * @this Dashboard.React.ReactInterop - * @memberof Dashboard.React.ReactInterop - * @param {System.Func} component - * @param {System.Object} props - * @param {Array.} children - * @return {Object} - */ - CreateElement: function (component, props, children) { - if (props === void 0) { props = null; } - if (children === void 0) { children = []; } - return React.createElement(component, H5.unbox(props), H5.unbox(children)); - }, - /** - * Creates the React root and renders the application. - * - * @static - * @public - * @this Dashboard.React.ReactInterop - * @memberof Dashboard.React.ReactInterop - * @param {Object} element - * @param {string} containerId - * @return {void} - */ - RenderApp: function (element, containerId) { - if (containerId === void 0) { containerId = "root"; } - var container = document.getElementById(containerId); - var root = ReactDOM.createRoot(container); - root.Render(element); - } - } - } - }); - - /** - * State tuple for useState hook with functional update. - * - * @public - * @class Dashboard.React.StateFuncResult$1 - */ - H5.define("Dashboard.React.StateFuncResult$1", function (T) { return { - fields: { - /** - * Current state value. - * - * @instance - * @public - * @memberof Dashboard.React.StateFuncResult$1 - * @function State - * @type T - */ - State: H5.getDefaultValue(T), - /** - * State setter function. - * - * @instance - * @public - * @memberof Dashboard.React.StateFuncResult$1 - * @function SetState - * @type System.Action - */ - SetState: null - } - }; }); - - /** - * State tuple for useState hook. - * - * @public - * @class Dashboard.React.StateResult$1 - */ - H5.define("Dashboard.React.StateResult$1", function (T) { return { - fields: { - /** - * Current state value. - * - * @instance - * @public - * @memberof Dashboard.React.StateResult$1 - * @function State - * @type T - */ - State: H5.getDefaultValue(T), - /** - * State setter function. - * - * @instance - * @public - * @memberof Dashboard.React.StateResult$1 - * @function SetState - * @type System.Action - */ - SetState: null - } - }; }); -}); - -H5.assemblyVersion("Dashboard.Web","1.0.0.0"); -H5.assembly("Dashboard.Web", function ($asm, globals) { - "use strict"; - - - var $m = H5.setMetadata, - $n = ["System","Dashboard","Dashboard.React","Dashboard.Pages","Dashboard.Components","System.Threading.Tasks"]; - $m("Dashboard.AppState", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"ActiveView","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_ActiveView","t":8,"rt":$n[0].String,"fg":"ActiveView"},"s":{"a":2,"n":"set_ActiveView","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"ActiveView"},"fn":"ActiveView"},{"a":2,"n":"EditingAppointmentId","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_EditingAppointmentId","t":8,"rt":$n[0].String,"fg":"EditingAppointmentId"},"s":{"a":2,"n":"set_EditingAppointmentId","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"EditingAppointmentId"},"fn":"EditingAppointmentId"},{"a":2,"n":"EditingPatientId","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_EditingPatientId","t":8,"rt":$n[0].String,"fg":"EditingPatientId"},"s":{"a":2,"n":"set_EditingPatientId","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"EditingPatientId"},"fn":"EditingPatientId"},{"a":2,"n":"NotificationCount","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_NotificationCount","t":8,"rt":$n[0].Int32,"fg":"NotificationCount","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_NotificationCount","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"NotificationCount"},"fn":"NotificationCount"},{"a":2,"n":"SearchQuery","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_SearchQuery","t":8,"rt":$n[0].String,"fg":"SearchQuery"},"s":{"a":2,"n":"set_SearchQuery","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"SearchQuery"},"fn":"SearchQuery"},{"a":2,"n":"SidebarCollapsed","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_SidebarCollapsed","t":8,"rt":$n[0].Boolean,"fg":"SidebarCollapsed","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_SidebarCollapsed","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"SidebarCollapsed"},"fn":"SidebarCollapsed"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"ActiveView"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"EditingAppointmentId"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"EditingPatientId"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"NotificationCount","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"SearchQuery"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"SidebarCollapsed","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}}]}; }, $n); - $m("Dashboard.App", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":1,"n":"GetPageTitle","is":true,"t":8,"pi":[{"n":"view","pt":$n[0].String,"ps":0}],"sn":"GetPageTitle","rt":$n[0].String,"p":[$n[0].String]},{"a":2,"n":"Render","is":true,"t":8,"sn":"Render","rt":Object},{"a":1,"n":"RenderPage","is":true,"t":8,"pi":[{"n":"state","pt":$n[1].AppState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"RenderPage","rt":Object,"p":[$n[1].AppState,Function]},{"a":1,"n":"RenderPlaceholderPage","is":true,"t":8,"pi":[{"n":"title","pt":$n[0].String,"ps":0},{"n":"description","pt":$n[0].String,"ps":1}],"sn":"RenderPlaceholderPage","rt":Object,"p":[$n[0].String,$n[0].String]}]}; }, $n); - $m("Dashboard.Program", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":1,"n":"GetConfigValue","is":true,"t":8,"pi":[{"n":"key","pt":$n[0].String,"ps":0},{"n":"defaultValue","pt":$n[0].String,"ps":1}],"sn":"GetConfigValue","rt":$n[0].String,"p":[$n[0].String,$n[0].String]},{"a":1,"n":"HideLoadingScreen","is":true,"t":8,"sn":"HideLoadingScreen","rt":$n[0].Void},{"a":1,"n":"Log","is":true,"t":8,"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"Log","rt":$n[0].Void,"p":[$n[0].String]},{"a":2,"n":"Main","is":true,"t":8,"sn":"Main","rt":$n[0].Void}]}; }, $n); - $m("Dashboard.React.Elements", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":2,"n":"A","is":true,"t":8,"pi":[{"n":"href","pt":$n[0].String,"ps":0},{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":1},{"n":"target","dv":null,"o":true,"pt":$n[0].String,"ps":2},{"n":"onClick","dv":null,"o":true,"pt":Function,"ps":3},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":4}],"sn":"A","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].String,Function,System.Array.type(Object)]},{"a":2,"n":"Article","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":1}],"sn":"Article","rt":Object,"p":[$n[0].String,System.Array.type(Object)]},{"a":2,"n":"Aside","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":1}],"sn":"Aside","rt":Object,"p":[$n[0].String,System.Array.type(Object)]},{"a":2,"n":"Button","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"onClick","dv":null,"o":true,"pt":Function,"ps":1},{"n":"disabled","dv":false,"o":true,"pt":$n[0].Boolean,"ps":2},{"n":"type","dv":"button","o":true,"pt":$n[0].String,"ps":3},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":4}],"sn":"Button","rt":Object,"p":[$n[0].String,Function,$n[0].Boolean,$n[0].String,System.Array.type(Object)]},{"a":1,"n":"CreateElement","is":true,"t":8,"pi":[{"n":"tag","pt":$n[0].String,"ps":0},{"n":"className","pt":$n[0].String,"ps":1},{"n":"id","pt":$n[0].String,"ps":2},{"n":"style","pt":$n[0].Object,"ps":3},{"n":"onClick","pt":Function,"ps":4},{"n":"children","pt":System.Array.type(Object),"ps":5}],"sn":"CreateElement","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].String,$n[0].Object,Function,System.Array.type(Object)]},{"a":2,"n":"Div","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"id","dv":null,"o":true,"pt":$n[0].String,"ps":1},{"n":"style","dv":null,"o":true,"pt":$n[0].Object,"ps":2},{"n":"onClick","dv":null,"o":true,"pt":Function,"ps":3},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":4}],"sn":"Div","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].Object,Function,System.Array.type(Object)]},{"a":2,"n":"Footer","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":1}],"sn":"Footer","rt":Object,"p":[$n[0].String,System.Array.type(Object)]},{"a":2,"n":"Form","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"onSubmit","dv":null,"o":true,"pt":Function,"ps":1},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":2}],"sn":"Form","rt":Object,"p":[$n[0].String,Function,System.Array.type(Object)]},{"a":2,"n":"Fragment","is":true,"t":8,"pi":[{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":0}],"sn":"Fragment","rt":Object,"p":[System.Array.type(Object)]},{"a":2,"n":"H","is":true,"t":8,"pi":[{"n":"level","pt":$n[0].Int32,"ps":0},{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":1},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":2}],"sn":"H","rt":Object,"p":[$n[0].Int32,$n[0].String,System.Array.type(Object)]},{"a":2,"n":"Header","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":1}],"sn":"Header","rt":Object,"p":[$n[0].String,System.Array.type(Object)]},{"a":2,"n":"Img","is":true,"t":8,"pi":[{"n":"src","pt":$n[0].String,"ps":0},{"n":"alt","dv":null,"o":true,"pt":$n[0].String,"ps":1},{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":2},{"n":"style","dv":null,"o":true,"pt":$n[0].Object,"ps":3}],"sn":"Img","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].String,$n[0].Object]},{"a":2,"n":"Input","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"type","dv":"text","o":true,"pt":$n[0].String,"ps":1},{"n":"value","dv":null,"o":true,"pt":$n[0].String,"ps":2},{"n":"placeholder","dv":null,"o":true,"pt":$n[0].String,"ps":3},{"n":"onChange","dv":null,"o":true,"pt":Function,"ps":4},{"n":"onKeyDown","dv":null,"o":true,"pt":Function,"ps":5},{"n":"disabled","dv":false,"o":true,"pt":$n[0].Boolean,"ps":6}],"sn":"Input","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].String,$n[0].String,Function,Function,$n[0].Boolean]},{"a":2,"n":"Label","is":true,"t":8,"pi":[{"n":"htmlFor","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":1},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":2}],"sn":"Label","rt":Object,"p":[$n[0].String,$n[0].String,System.Array.type(Object)]},{"a":2,"n":"Li","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"onClick","dv":null,"o":true,"pt":Function,"ps":1},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":2}],"sn":"Li","rt":Object,"p":[$n[0].String,Function,System.Array.type(Object)]},{"a":2,"n":"Main","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":1}],"sn":"Main","rt":Object,"p":[$n[0].String,System.Array.type(Object)]},{"a":2,"n":"Nav","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":1}],"sn":"Nav","rt":Object,"p":[$n[0].String,System.Array.type(Object)]},{"a":2,"n":"Option","is":true,"t":8,"pi":[{"n":"value","pt":$n[0].String,"ps":0},{"n":"label","pt":$n[0].String,"ps":1}],"sn":"Option","rt":Object,"p":[$n[0].String,$n[0].String]},{"a":2,"n":"P","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"style","dv":null,"o":true,"pt":$n[0].Object,"ps":1},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":2}],"sn":"P","rt":Object,"p":[$n[0].String,$n[0].Object,System.Array.type(Object)]},{"a":2,"n":"Path","is":true,"t":8,"pi":[{"n":"d","pt":$n[0].String,"ps":0},{"n":"fill","dv":null,"o":true,"pt":$n[0].String,"ps":1},{"n":"stroke","dv":null,"o":true,"pt":$n[0].String,"ps":2},{"n":"strokeWidth","dv":0,"o":true,"pt":$n[0].Int32,"ps":3}],"sn":"Path","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].String,$n[0].Int32]},{"a":2,"n":"Section","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":1}],"sn":"Section","rt":Object,"p":[$n[0].String,System.Array.type(Object)]},{"a":2,"n":"Select","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"value","dv":null,"o":true,"pt":$n[0].String,"ps":1},{"n":"onChange","dv":null,"o":true,"pt":Function,"ps":2},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":3}],"sn":"Select","rt":Object,"p":[$n[0].String,$n[0].String,Function,System.Array.type(Object)]},{"a":2,"n":"Span","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"id","dv":null,"o":true,"pt":$n[0].String,"ps":1},{"n":"style","dv":null,"o":true,"pt":$n[0].Object,"ps":2},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":3}],"sn":"Span","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].Object,System.Array.type(Object)]},{"a":2,"n":"Svg","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"width","dv":0,"o":true,"pt":$n[0].Int32,"ps":1},{"n":"height","dv":0,"o":true,"pt":$n[0].Int32,"ps":2},{"n":"viewBox","dv":null,"o":true,"pt":$n[0].String,"ps":3},{"n":"fill","dv":null,"o":true,"pt":$n[0].String,"ps":4},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":5}],"sn":"Svg","rt":Object,"p":[$n[0].String,$n[0].Int32,$n[0].Int32,$n[0].String,$n[0].String,System.Array.type(Object)]},{"a":2,"n":"TBody","is":true,"t":8,"pi":[{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":0}],"sn":"TBody","rt":Object,"p":[System.Array.type(Object)]},{"a":2,"n":"THead","is":true,"t":8,"pi":[{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":0}],"sn":"THead","rt":Object,"p":[System.Array.type(Object)]},{"a":2,"n":"Table","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":1}],"sn":"Table","rt":Object,"p":[$n[0].String,System.Array.type(Object)]},{"a":2,"n":"Td","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":1}],"sn":"Td","rt":Object,"p":[$n[0].String,System.Array.type(Object)]},{"a":2,"n":"Text","is":true,"t":8,"pi":[{"n":"content","pt":$n[0].String,"ps":0}],"sn":"Text","rt":Object,"p":[$n[0].String]},{"a":2,"n":"TextArea","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"value","dv":null,"o":true,"pt":$n[0].String,"ps":1},{"n":"placeholder","dv":null,"o":true,"pt":$n[0].String,"ps":2},{"n":"rows","dv":0,"o":true,"pt":$n[0].Int32,"ps":3},{"n":"onChange","dv":null,"o":true,"pt":Function,"ps":4}],"sn":"TextArea","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].String,$n[0].Int32,Function]},{"a":2,"n":"Th","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":1}],"sn":"Th","rt":Object,"p":[$n[0].String,System.Array.type(Object)]},{"a":2,"n":"Tr","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"onClick","dv":null,"o":true,"pt":Function,"ps":1},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":2}],"sn":"Tr","rt":Object,"p":[$n[0].String,Function,System.Array.type(Object)]},{"a":2,"n":"Ul","is":true,"t":8,"pi":[{"n":"className","dv":null,"o":true,"pt":$n[0].String,"ps":0},{"n":"children","ip":true,"pt":System.Array.type(Object),"ps":1}],"sn":"Ul","rt":Object,"p":[$n[0].String,System.Array.type(Object)]}]}; }, $n); - $m("Dashboard.React.StateResult$1", function (T) { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"SetState","t":16,"rt":Function,"g":{"a":2,"n":"get_SetState","t":8,"rt":Function,"fg":"SetState"},"s":{"a":2,"n":"set_SetState","t":8,"p":[Function],"rt":$n[0].Void,"fs":"SetState"},"fn":"SetState"},{"a":2,"n":"State","t":16,"rt":T,"g":{"a":2,"n":"get_State","t":8,"rt":T,"fg":"State"},"s":{"a":2,"n":"set_State","t":8,"p":[T],"rt":$n[0].Void,"fs":"State"},"fn":"State"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":Function,"sn":"SetState"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T,"sn":"State"}]}; }, $n); - $m("Dashboard.React.StateFuncResult$1", function (T) { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"SetState","t":16,"rt":Function,"g":{"a":2,"n":"get_SetState","t":8,"rt":Function,"fg":"SetState"},"s":{"a":2,"n":"set_SetState","t":8,"p":[Function],"rt":$n[0].Void,"fs":"SetState"},"fn":"SetState"},{"a":2,"n":"State","t":16,"rt":T,"g":{"a":2,"n":"get_State","t":8,"rt":T,"fg":"State"},"s":{"a":2,"n":"set_State","t":8,"p":[T],"rt":$n[0].Void,"fs":"State"},"fn":"State"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":Function,"sn":"SetState"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":T,"sn":"State"}]}; }, $n); - $m("Dashboard.React.Hooks", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":2,"n":"UseCallback","is":true,"t":8,"pi":[{"n":"callback","pt":System.Object,"ps":0},{"n":"deps","pt":$n[0].Array.type(System.Object),"ps":1}],"tpc":1,"tprm":["T"],"sn":"UseCallback","rt":System.Object,"p":[System.Object,$n[0].Array.type(System.Object)]},{"a":2,"n":"UseContext","is":true,"t":8,"pi":[{"n":"context","pt":$n[0].Object,"ps":0}],"tpc":1,"tprm":["T"],"sn":"UseContext","rt":System.Object,"p":[$n[0].Object]},{"a":2,"n":"UseEffect","is":true,"t":8,"pi":[{"n":"effect","pt":Function,"ps":0},{"n":"deps","dv":null,"o":true,"pt":$n[0].Array.type(System.Object),"ps":1}],"sn":"UseEffect$1","rt":$n[0].Void,"p":[Function,$n[0].Array.type(System.Object)]},{"a":2,"n":"UseEffect","is":true,"t":8,"pi":[{"n":"effect","pt":Function,"ps":0},{"n":"cleanup","pt":Function,"ps":1},{"n":"deps","dv":null,"o":true,"pt":$n[0].Array.type(System.Object),"ps":2}],"sn":"UseEffect","rt":$n[0].Void,"p":[Function,Function,$n[0].Array.type(System.Object)]},{"a":2,"n":"UseMemo","is":true,"t":8,"pi":[{"n":"factory","pt":Function,"ps":0},{"n":"deps","pt":$n[0].Array.type(System.Object),"ps":1}],"tpc":1,"tprm":["T"],"sn":"UseMemo","rt":System.Object,"p":[Function,$n[0].Array.type(System.Object)]},{"a":2,"n":"UseRef","is":true,"t":8,"pi":[{"n":"initialValue","dv":null,"o":true,"pt":System.Object,"ps":0}],"tpc":1,"tprm":["T"],"sn":"UseRef","rt":Object(System.Object),"p":[System.Object]},{"a":2,"n":"UseState","is":true,"t":8,"pi":[{"n":"initialValue","pt":System.Object,"ps":0}],"tpc":1,"tprm":["T"],"sn":"UseState","rt":$n[2].StateResult$1(System.Object),"p":[System.Object]},{"a":2,"n":"UseStateFunc","is":true,"t":8,"pi":[{"n":"initialValue","pt":System.Object,"ps":0}],"tpc":1,"tprm":["T"],"sn":"UseStateFunc","rt":$n[2].StateFuncResult$1(System.Object),"p":[System.Object]}]}; }, $n); - $m("Dashboard.React.ReactInterop", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":2,"n":"CreateElement","is":true,"t":8,"pi":[{"n":"component","pt":Function,"ps":0},{"n":"props","dv":null,"o":true,"pt":$n[0].Object,"ps":1},{"n":"children","ip":true,"pt":$n[0].Array.type(System.Object),"ps":2}],"sn":"CreateElement","rt":Object,"p":[Function,$n[0].Object,$n[0].Array.type(System.Object)]},{"a":2,"n":"CreateElement","is":true,"t":8,"pi":[{"n":"type","pt":$n[0].String,"ps":0},{"n":"props","dv":null,"o":true,"pt":$n[0].Object,"ps":1},{"n":"children","ip":true,"pt":$n[0].Array.type(System.Object),"ps":2}],"sn":"CreateElement$1","rt":Object,"p":[$n[0].String,$n[0].Object,$n[0].Array.type(System.Object)]},{"a":2,"n":"RenderApp","is":true,"t":8,"pi":[{"n":"element","pt":Object,"ps":0},{"n":"containerId","dv":"root","o":true,"pt":$n[0].String,"ps":1}],"sn":"RenderApp","rt":$n[0].Void,"p":[Object,$n[0].String]}]}; }, $n); - $m("Dashboard.Pages.AppointmentsState", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Appointments","t":16,"rt":System.Array.type(Object),"g":{"a":2,"n":"get_Appointments","t":8,"rt":System.Array.type(Object),"fg":"Appointments"},"s":{"a":2,"n":"set_Appointments","t":8,"p":[System.Array.type(Object)],"rt":$n[0].Void,"fs":"Appointments"},"fn":"Appointments"},{"a":2,"n":"Error","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Error","t":8,"rt":$n[0].String,"fg":"Error"},"s":{"a":2,"n":"set_Error","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Error"},"fn":"Error"},{"a":2,"n":"Loading","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Loading","t":8,"rt":$n[0].Boolean,"fg":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_Loading","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"Loading"},"fn":"Loading"},{"a":2,"n":"StatusFilter","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_StatusFilter","t":8,"rt":$n[0].String,"fg":"StatusFilter"},"s":{"a":2,"n":"set_StatusFilter","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"StatusFilter"},"fn":"StatusFilter"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":System.Array.type(Object),"sn":"Appointments"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Error"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"StatusFilter"}]}; }, $n); - $m("Dashboard.Pages.AppointmentsPage", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":1,"n":"FilterByStatus","is":true,"t":8,"pi":[{"n":"status","pt":$n[0].String,"ps":0},{"n":"currentState","pt":$n[3].AppointmentsState,"ps":1},{"n":"setState","pt":Function,"ps":2}],"sn":"FilterByStatus","rt":$n[0].Void,"p":[$n[0].String,$n[3].AppointmentsState,Function]},{"a":1,"n":"FormatReference","is":true,"t":8,"pi":[{"n":"reference","pt":$n[0].String,"ps":0}],"sn":"FormatReference","rt":$n[0].String,"p":[$n[0].String]},{"a":1,"n":"FormatTime","is":true,"t":8,"pi":[{"n":"dateTime","pt":$n[0].String,"ps":0}],"sn":"FormatTime","rt":$n[0].String,"p":[$n[0].String]},{"a":1,"n":"LoadAppointments","is":true,"t":8,"pi":[{"n":"setState","pt":Function,"ps":0}],"sn":"LoadAppointments","rt":$n[0].Void,"p":[Function]},{"a":2,"n":"Render","is":true,"t":8,"pi":[{"n":"onEditAppointment","pt":Function,"ps":0}],"sn":"Render","rt":Object,"p":[Function]},{"a":1,"n":"RenderAppointmentCard","is":true,"t":8,"pi":[{"n":"appointment","pt":Object,"ps":0},{"n":"onEditAppointment","pt":Function,"ps":1}],"sn":"RenderAppointmentCard","rt":Object,"p":[Object,Function]},{"a":1,"n":"RenderAppointmentList","is":true,"t":8,"pi":[{"n":"appointments","pt":System.Array.type(Object),"ps":0},{"n":"statusFilter","pt":$n[0].String,"ps":1},{"n":"onEditAppointment","pt":Function,"ps":2}],"sn":"RenderAppointmentList","rt":Object,"p":[System.Array.type(Object),$n[0].String,Function]},{"a":1,"n":"RenderEmpty","is":true,"t":8,"sn":"RenderEmpty","rt":Object},{"a":1,"n":"RenderError","is":true,"t":8,"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"RenderError","rt":Object,"p":[$n[0].String]},{"a":1,"n":"RenderInternal","is":true,"t":8,"pi":[{"n":"onEditAppointment","pt":Function,"ps":0}],"sn":"RenderInternal","rt":Object,"p":[Function]},{"a":1,"n":"RenderLoadingList","is":true,"t":8,"sn":"RenderLoadingList","rt":Object},{"a":1,"n":"RenderPriorityBadge","is":true,"t":8,"pi":[{"n":"priority","pt":$n[0].String,"ps":0}],"sn":"RenderPriorityBadge","rt":Object,"p":[$n[0].String]},{"a":1,"n":"RenderStatusBadge","is":true,"t":8,"pi":[{"n":"status","pt":$n[0].String,"ps":0}],"sn":"RenderStatusBadge","rt":Object,"p":[$n[0].String]},{"a":1,"n":"RenderTab","is":true,"t":8,"pi":[{"n":"label","pt":$n[0].String,"ps":0},{"n":"status","pt":$n[0].String,"ps":1},{"n":"currentFilter","pt":$n[0].String,"ps":2},{"n":"onSelect","pt":Function,"ps":3}],"sn":"RenderTab","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].String,Function]}]}; }, $n); - $m("Dashboard.Pages.CalendarState", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Appointments","t":16,"rt":System.Array.type(Object),"g":{"a":2,"n":"get_Appointments","t":8,"rt":System.Array.type(Object),"fg":"Appointments"},"s":{"a":2,"n":"set_Appointments","t":8,"p":[System.Array.type(Object)],"rt":$n[0].Void,"fs":"Appointments"},"fn":"Appointments"},{"a":2,"n":"Error","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Error","t":8,"rt":$n[0].String,"fg":"Error"},"s":{"a":2,"n":"set_Error","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Error"},"fn":"Error"},{"a":2,"n":"Loading","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Loading","t":8,"rt":$n[0].Boolean,"fg":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_Loading","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"Loading"},"fn":"Loading"},{"a":2,"n":"Month","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Month","t":8,"rt":$n[0].Int32,"fg":"Month","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_Month","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"Month"},"fn":"Month"},{"a":2,"n":"SelectedDay","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_SelectedDay","t":8,"rt":$n[0].Int32,"fg":"SelectedDay","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_SelectedDay","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"SelectedDay"},"fn":"SelectedDay"},{"a":2,"n":"Year","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Year","t":8,"rt":$n[0].Int32,"fg":"Year","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_Year","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"Year"},"fn":"Year"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":System.Array.type(Object),"sn":"Appointments"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Error"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Month","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"SelectedDay","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Year","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("Dashboard.Pages.CalendarPage", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":1,"n":"FormatReference","is":true,"t":8,"pi":[{"n":"reference","pt":$n[0].String,"ps":0}],"sn":"FormatReference","rt":$n[0].String,"p":[$n[0].String]},{"a":1,"n":"FormatTime","is":true,"t":8,"pi":[{"n":"dateTime","pt":$n[0].String,"ps":0}],"sn":"FormatTime","rt":$n[0].String,"p":[$n[0].String]},{"a":1,"n":"GetAppointmentsForDay","is":true,"t":8,"pi":[{"n":"appointments","pt":System.Array.type(Object),"ps":0},{"n":"year","pt":$n[0].Int32,"ps":1},{"n":"month","pt":$n[0].Int32,"ps":2},{"n":"day","pt":$n[0].Int32,"ps":3}],"sn":"GetAppointmentsForDay","rt":System.Array.type(Object),"p":[System.Array.type(Object),$n[0].Int32,$n[0].Int32,$n[0].Int32]},{"a":1,"n":"GetStatusClass","is":true,"t":8,"pi":[{"n":"status","pt":$n[0].String,"ps":0}],"sn":"GetStatusClass","rt":$n[0].String,"p":[$n[0].String]},{"a":1,"n":"GoToToday","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].CalendarState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"GoToToday","rt":$n[0].Void,"p":[$n[3].CalendarState,Function]},{"a":1,"n":"LoadAppointments","is":true,"t":8,"pi":[{"n":"setState","pt":Function,"ps":0},{"n":"currentState","pt":$n[3].CalendarState,"ps":1}],"sn":"LoadAppointments","rt":$n[0].Void,"p":[Function,$n[3].CalendarState]},{"a":1,"n":"NavigateMonth","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].CalendarState,"ps":0},{"n":"setState","pt":Function,"ps":1},{"n":"delta","pt":$n[0].Int32,"ps":2}],"sn":"NavigateMonth","rt":$n[0].Void,"p":[$n[3].CalendarState,Function,$n[0].Int32]},{"a":2,"n":"Render","is":true,"t":8,"pi":[{"n":"onEditAppointment","pt":Function,"ps":0}],"sn":"Render","rt":Object,"p":[Function]},{"a":1,"n":"RenderAppointmentDot","is":true,"t":8,"pi":[{"n":"appointment","pt":Object,"ps":0}],"sn":"RenderAppointmentDot","rt":Object,"p":[Object]},{"a":1,"n":"RenderCalendarContent","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].CalendarState,"ps":0},{"n":"setState","pt":Function,"ps":1},{"n":"onEditAppointment","pt":Function,"ps":2}],"sn":"RenderCalendarContent","rt":Object,"p":[$n[3].CalendarState,Function,Function]},{"a":1,"n":"RenderCalendarGrid","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].CalendarState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"RenderCalendarGrid","rt":Object,"p":[$n[3].CalendarState,Function]},{"a":1,"n":"RenderDayAppointment","is":true,"t":8,"pi":[{"n":"appointment","pt":Object,"ps":0},{"n":"onEditAppointment","pt":Function,"ps":1}],"sn":"RenderDayAppointment","rt":Object,"p":[Object,Function]},{"a":1,"n":"RenderDayDetails","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].CalendarState,"ps":0},{"n":"setState","pt":Function,"ps":1},{"n":"onEditAppointment","pt":Function,"ps":2}],"sn":"RenderDayDetails","rt":Object,"p":[$n[3].CalendarState,Function,Function]},{"a":1,"n":"RenderError","is":true,"t":8,"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"RenderError","rt":Object,"p":[$n[0].String]},{"a":1,"n":"RenderHeader","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].CalendarState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"RenderHeader","rt":Object,"p":[$n[3].CalendarState,Function]},{"a":1,"n":"RenderLoadingState","is":true,"t":8,"sn":"RenderLoadingState","rt":Object},{"a":1,"n":"RenderNoSelection","is":true,"t":8,"sn":"RenderNoSelection","rt":Object},{"a":1,"n":"SelectDay","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].CalendarState,"ps":0},{"n":"setState","pt":Function,"ps":1},{"n":"day","pt":$n[0].Int32,"ps":2}],"sn":"SelectDay","rt":$n[0].Void,"p":[$n[3].CalendarState,Function,$n[0].Int32]},{"a":1,"n":"DayNames","is":true,"t":4,"rt":$n[0].Array.type(System.String),"sn":"DayNames","ro":true},{"a":1,"n":"MonthNames","is":true,"t":4,"rt":$n[0].Array.type(System.String),"sn":"MonthNames","ro":true}]}; }, $n); - $m("Dashboard.Pages.ClinicalCodingState", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"AchiResults","t":16,"rt":System.Array.type(Object),"g":{"a":2,"n":"get_AchiResults","t":8,"rt":System.Array.type(Object),"fg":"AchiResults"},"s":{"a":2,"n":"set_AchiResults","t":8,"p":[System.Array.type(Object)],"rt":$n[0].Void,"fs":"AchiResults"},"fn":"AchiResults"},{"a":2,"n":"CopiedCode","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_CopiedCode","t":8,"rt":$n[0].String,"fg":"CopiedCode"},"s":{"a":2,"n":"set_CopiedCode","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"CopiedCode"},"fn":"CopiedCode"},{"a":2,"n":"Error","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Error","t":8,"rt":$n[0].String,"fg":"Error"},"s":{"a":2,"n":"set_Error","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Error"},"fn":"Error"},{"a":2,"n":"Icd10Results","t":16,"rt":System.Array.type(Object),"g":{"a":2,"n":"get_Icd10Results","t":8,"rt":System.Array.type(Object),"fg":"Icd10Results"},"s":{"a":2,"n":"set_Icd10Results","t":8,"p":[System.Array.type(Object)],"rt":$n[0].Void,"fs":"Icd10Results"},"fn":"Icd10Results"},{"a":2,"n":"IncludeAchi","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IncludeAchi","t":8,"rt":$n[0].Boolean,"fg":"IncludeAchi","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_IncludeAchi","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"IncludeAchi"},"fn":"IncludeAchi"},{"a":2,"n":"Loading","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Loading","t":8,"rt":$n[0].Boolean,"fg":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_Loading","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"Loading"},"fn":"Loading"},{"a":2,"n":"SearchMode","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_SearchMode","t":8,"rt":$n[0].String,"fg":"SearchMode"},"s":{"a":2,"n":"set_SearchMode","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"SearchMode"},"fn":"SearchMode"},{"a":2,"n":"SearchQuery","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_SearchQuery","t":8,"rt":$n[0].String,"fg":"SearchQuery"},"s":{"a":2,"n":"set_SearchQuery","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"SearchQuery"},"fn":"SearchQuery"},{"a":2,"n":"SelectedCode","t":16,"rt":Object,"g":{"a":2,"n":"get_SelectedCode","t":8,"rt":Object,"fg":"SelectedCode"},"s":{"a":2,"n":"set_SelectedCode","t":8,"p":[Object],"rt":$n[0].Void,"fs":"SelectedCode"},"fn":"SelectedCode"},{"a":2,"n":"SemanticResults","t":16,"rt":System.Array.type(Object),"g":{"a":2,"n":"get_SemanticResults","t":8,"rt":System.Array.type(Object),"fg":"SemanticResults"},"s":{"a":2,"n":"set_SemanticResults","t":8,"p":[System.Array.type(Object)],"rt":$n[0].Void,"fs":"SemanticResults"},"fn":"SemanticResults"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":System.Array.type(Object),"sn":"AchiResults"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"CopiedCode"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Error"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":System.Array.type(Object),"sn":"Icd10Results"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IncludeAchi","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"SearchMode"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"SearchQuery"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":Object,"sn":"SelectedCode"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":System.Array.type(Object),"sn":"SemanticResults"}]}; }, $n); - $m("Dashboard.Pages.ClinicalCodingPage", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":1,"n":"ClearSelection","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"ClearSelection","rt":$n[0].Void,"p":[$n[3].ClinicalCodingState,Function]},{"a":1,"n":"Concat","is":true,"t":8,"pi":[{"n":"arr1","pt":System.Array.type(Object),"ps":0},{"n":"arr2","pt":System.Array.type(Object),"ps":1}],"sn":"Concat","rt":System.Array.type(Object),"p":[System.Array.type(Object),System.Array.type(Object)]},{"a":1,"n":"CopyCode","is":true,"t":8,"pi":[{"n":"code","pt":$n[0].String,"ps":0},{"n":"state","pt":$n[3].ClinicalCodingState,"ps":1},{"n":"setState","pt":Function,"ps":2}],"sn":"CopyCode","rt":$n[0].Void,"p":[$n[0].String,$n[3].ClinicalCodingState,Function]},{"a":1,"n":"ExecuteSearch","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"ExecuteSearch","rt":$n[0].Void,"p":[$n[3].ClinicalCodingState,Function]},{"a":1,"n":"GetEmptyDescription","is":true,"t":8,"pi":[{"n":"mode","pt":$n[0].String,"ps":0}],"sn":"GetEmptyDescription","rt":$n[0].String,"p":[$n[0].String]},{"a":1,"n":"GetEmptyTitle","is":true,"t":8,"pi":[{"n":"mode","pt":$n[0].String,"ps":0}],"sn":"GetEmptyTitle","rt":$n[0].String,"p":[$n[0].String]},{"a":1,"n":"GetPlaceholder","is":true,"t":8,"pi":[{"n":"mode","pt":$n[0].String,"ps":0}],"sn":"GetPlaceholder","rt":$n[0].String,"p":[$n[0].String]},{"a":1,"n":"LookupSemanticCode","is":true,"t":8,"pi":[{"n":"code","pt":$n[0].String,"ps":0},{"n":"state","pt":$n[3].ClinicalCodingState,"ps":1},{"n":"setState","pt":Function,"ps":2}],"sn":"LookupSemanticCode","rt":$n[0].Void,"p":[$n[0].String,$n[3].ClinicalCodingState,Function]},{"a":2,"n":"Render","is":true,"t":8,"sn":"Render","rt":Object},{"a":1,"n":"RenderCodeDetail","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"RenderCodeDetail","rt":Object,"p":[$n[3].ClinicalCodingState,Function]},{"a":1,"n":"RenderCodeRow","is":true,"t":8,"pi":[{"n":"code","pt":Object,"ps":0},{"n":"state","pt":$n[3].ClinicalCodingState,"ps":1},{"n":"setState","pt":Function,"ps":2}],"sn":"RenderCodeRow","rt":Object,"p":[Object,$n[3].ClinicalCodingState,Function]},{"a":1,"n":"RenderContent","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"RenderContent","rt":Object,"p":[$n[3].ClinicalCodingState,Function]},{"a":1,"n":"RenderDetailItem","is":true,"t":8,"pi":[{"n":"label","pt":$n[0].String,"ps":0},{"n":"value","pt":$n[0].String,"ps":1}],"sn":"RenderDetailItem","rt":Object,"p":[$n[0].String,$n[0].String]},{"a":1,"n":"RenderDetailSection","is":true,"t":8,"pi":[{"n":"title","pt":$n[0].String,"ps":0},{"n":"content","pt":$n[0].String,"ps":1}],"sn":"RenderDetailSection","rt":Object,"p":[$n[0].String,$n[0].String]},{"a":1,"n":"RenderEmptyState","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0}],"sn":"RenderEmptyState","rt":Object,"p":[$n[3].ClinicalCodingState]},{"a":1,"n":"RenderError","is":true,"t":8,"pi":[{"n":"error","pt":$n[0].String,"ps":0}],"sn":"RenderError","rt":Object,"p":[$n[0].String]},{"a":1,"n":"RenderHeader","is":true,"t":8,"sn":"RenderHeader","rt":Object},{"a":1,"n":"RenderKeywordResults","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"RenderKeywordResults","rt":Object,"p":[$n[3].ClinicalCodingState,Function]},{"a":1,"n":"RenderLoading","is":true,"t":8,"sn":"RenderLoading","rt":Object},{"a":1,"n":"RenderNoResults","is":true,"t":8,"pi":[{"n":"query","pt":$n[0].String,"ps":0}],"sn":"RenderNoResults","rt":Object,"p":[$n[0].String]},{"a":1,"n":"RenderQuickSearches","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0}],"sn":"RenderQuickSearches","rt":Object,"p":[$n[3].ClinicalCodingState]},{"a":1,"n":"RenderSearchInput","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"RenderSearchInput","rt":Object,"p":[$n[3].ClinicalCodingState,Function]},{"a":1,"n":"RenderSearchOptions","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"RenderSearchOptions","rt":Object,"p":[$n[3].ClinicalCodingState,Function]},{"a":1,"n":"RenderSearchSection","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"RenderSearchSection","rt":Object,"p":[$n[3].ClinicalCodingState,Function]},{"a":1,"n":"RenderSearchTabs","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"RenderSearchTabs","rt":Object,"p":[$n[3].ClinicalCodingState,Function]},{"a":1,"n":"RenderSemanticResults","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"RenderSemanticResults","rt":Object,"p":[$n[3].ClinicalCodingState,Function]},{"a":1,"n":"RenderSemanticRow","is":true,"t":8,"pi":[{"n":"result","pt":Object,"ps":0},{"n":"state","pt":$n[3].ClinicalCodingState,"ps":1},{"n":"setState","pt":Function,"ps":2}],"sn":"RenderSemanticRow","rt":Object,"p":[Object,$n[3].ClinicalCodingState,Function]},{"a":1,"n":"RenderSemanticTooltipContent","is":true,"t":8,"pi":[{"n":"result","pt":Object,"ps":0},{"n":"confidenceColor","pt":$n[0].String,"ps":1},{"n":"confidencePercent","pt":$n[0].Int32,"ps":2}],"sn":"RenderSemanticTooltipContent","rt":System.Array.type(Object),"p":[Object,$n[0].String,$n[0].Int32]},{"a":1,"n":"RenderTab","is":true,"t":8,"pi":[{"n":"label","pt":$n[0].String,"ps":0},{"n":"icon","pt":Function,"ps":1},{"n":"isActive","pt":$n[0].Boolean,"ps":2},{"n":"onClick","pt":Function,"ps":3}],"sn":"RenderTab","rt":Object,"p":[$n[0].String,Function,$n[0].Boolean,Function]},{"a":1,"n":"SelectCode","is":true,"t":8,"pi":[{"n":"code","pt":Object,"ps":0},{"n":"state","pt":$n[3].ClinicalCodingState,"ps":1},{"n":"setState","pt":Function,"ps":2}],"sn":"SelectCode","rt":$n[0].Void,"p":[Object,$n[3].ClinicalCodingState,Function]},{"a":1,"n":"SetSearchMode","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0},{"n":"setState","pt":Function,"ps":1},{"n":"mode","pt":$n[0].String,"ps":2}],"sn":"SetSearchMode","rt":$n[0].Void,"p":[$n[3].ClinicalCodingState,Function,$n[0].String]},{"a":1,"n":"ToggleAchi","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"ToggleAchi","rt":$n[0].Void,"p":[$n[3].ClinicalCodingState,Function]},{"a":1,"n":"UpdateQuery","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].ClinicalCodingState,"ps":0},{"n":"setState","pt":Function,"ps":1},{"n":"query","pt":$n[0].String,"ps":2}],"sn":"UpdateQuery","rt":$n[0].Void,"p":[$n[3].ClinicalCodingState,Function,$n[0].String]}]}; }, $n); - $m("Dashboard.Pages.DashboardState", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"AppointmentCount","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_AppointmentCount","t":8,"rt":$n[0].Int32,"fg":"AppointmentCount","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_AppointmentCount","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"AppointmentCount"},"fn":"AppointmentCount"},{"a":2,"n":"EncounterCount","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_EncounterCount","t":8,"rt":$n[0].Int32,"fg":"EncounterCount","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_EncounterCount","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"EncounterCount"},"fn":"EncounterCount"},{"a":2,"n":"Error","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Error","t":8,"rt":$n[0].String,"fg":"Error"},"s":{"a":2,"n":"set_Error","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Error"},"fn":"Error"},{"a":2,"n":"Loading","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Loading","t":8,"rt":$n[0].Boolean,"fg":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_Loading","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"Loading"},"fn":"Loading"},{"a":2,"n":"PatientCount","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_PatientCount","t":8,"rt":$n[0].Int32,"fg":"PatientCount","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_PatientCount","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"PatientCount"},"fn":"PatientCount"},{"a":2,"n":"PractitionerCount","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_PractitionerCount","t":8,"rt":$n[0].Int32,"fg":"PractitionerCount","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_PractitionerCount","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"PractitionerCount"},"fn":"PractitionerCount"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"AppointmentCount","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"EncounterCount","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Error"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"PatientCount","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"PractitionerCount","box":function ($v) { return H5.box($v, System.Int32);}}]}; }, $n); - $m("Dashboard.Pages.DashboardPage", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":1,"n":"LoadData","is":true,"t":8,"pi":[{"n":"setState","pt":Function,"ps":0}],"sn":"LoadData","rt":$n[0].Void,"p":[Function]},{"a":2,"n":"Render","is":true,"t":8,"sn":"Render","rt":Object},{"a":1,"n":"RenderActionButton","is":true,"t":8,"pi":[{"n":"label","pt":$n[0].String,"ps":0},{"n":"icon","pt":Function,"ps":1},{"n":"variant","pt":$n[0].String,"ps":2}],"sn":"RenderActionButton","rt":Object,"p":[$n[0].String,Function,$n[0].String]},{"a":1,"n":"RenderActivityItem","is":true,"t":8,"pi":[{"n":"title","pt":$n[0].String,"ps":0},{"n":"subtitle","pt":$n[0].String,"ps":1},{"n":"time","pt":$n[0].String,"ps":2}],"sn":"RenderActivityItem","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].String]},{"a":1,"n":"RenderError","is":true,"t":8,"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"RenderError","rt":Object,"p":[$n[0].String]},{"a":1,"n":"RenderQuickActions","is":true,"t":8,"sn":"RenderQuickActions","rt":Object},{"a":1,"n":"RenderRecentActivity","is":true,"t":8,"sn":"RenderRecentActivity","rt":Object}]}; }, $n); - $m("Dashboard.Pages.EditAppointmentState", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Appointment","t":16,"rt":Object,"g":{"a":2,"n":"get_Appointment","t":8,"rt":Object,"fg":"Appointment"},"s":{"a":2,"n":"set_Appointment","t":8,"p":[Object],"rt":$n[0].Void,"fs":"Appointment"},"fn":"Appointment"},{"a":2,"n":"Comment","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Comment","t":8,"rt":$n[0].String,"fg":"Comment"},"s":{"a":2,"n":"set_Comment","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Comment"},"fn":"Comment"},{"a":2,"n":"Description","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Description","t":8,"rt":$n[0].String,"fg":"Description"},"s":{"a":2,"n":"set_Description","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Description"},"fn":"Description"},{"a":2,"n":"EndDate","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_EndDate","t":8,"rt":$n[0].String,"fg":"EndDate"},"s":{"a":2,"n":"set_EndDate","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"EndDate"},"fn":"EndDate"},{"a":2,"n":"EndTime","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_EndTime","t":8,"rt":$n[0].String,"fg":"EndTime"},"s":{"a":2,"n":"set_EndTime","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"EndTime"},"fn":"EndTime"},{"a":2,"n":"Error","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Error","t":8,"rt":$n[0].String,"fg":"Error"},"s":{"a":2,"n":"set_Error","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Error"},"fn":"Error"},{"a":2,"n":"Loading","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Loading","t":8,"rt":$n[0].Boolean,"fg":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_Loading","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"Loading"},"fn":"Loading"},{"a":2,"n":"PatientReference","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_PatientReference","t":8,"rt":$n[0].String,"fg":"PatientReference"},"s":{"a":2,"n":"set_PatientReference","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"PatientReference"},"fn":"PatientReference"},{"a":2,"n":"PractitionerReference","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_PractitionerReference","t":8,"rt":$n[0].String,"fg":"PractitionerReference"},"s":{"a":2,"n":"set_PractitionerReference","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"PractitionerReference"},"fn":"PractitionerReference"},{"a":2,"n":"Priority","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Priority","t":8,"rt":$n[0].String,"fg":"Priority"},"s":{"a":2,"n":"set_Priority","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Priority"},"fn":"Priority"},{"a":2,"n":"ReasonCode","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_ReasonCode","t":8,"rt":$n[0].String,"fg":"ReasonCode"},"s":{"a":2,"n":"set_ReasonCode","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"ReasonCode"},"fn":"ReasonCode"},{"a":2,"n":"Saving","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Saving","t":8,"rt":$n[0].Boolean,"fg":"Saving","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_Saving","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"Saving"},"fn":"Saving"},{"a":2,"n":"ServiceCategory","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_ServiceCategory","t":8,"rt":$n[0].String,"fg":"ServiceCategory"},"s":{"a":2,"n":"set_ServiceCategory","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"ServiceCategory"},"fn":"ServiceCategory"},{"a":2,"n":"ServiceType","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_ServiceType","t":8,"rt":$n[0].String,"fg":"ServiceType"},"s":{"a":2,"n":"set_ServiceType","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"ServiceType"},"fn":"ServiceType"},{"a":2,"n":"StartDate","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_StartDate","t":8,"rt":$n[0].String,"fg":"StartDate"},"s":{"a":2,"n":"set_StartDate","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"StartDate"},"fn":"StartDate"},{"a":2,"n":"StartTime","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_StartTime","t":8,"rt":$n[0].String,"fg":"StartTime"},"s":{"a":2,"n":"set_StartTime","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"StartTime"},"fn":"StartTime"},{"a":2,"n":"Status","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Status","t":8,"rt":$n[0].String,"fg":"Status"},"s":{"a":2,"n":"set_Status","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Status"},"fn":"Status"},{"a":2,"n":"Success","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Success","t":8,"rt":$n[0].String,"fg":"Success"},"s":{"a":2,"n":"set_Success","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Success"},"fn":"Success"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":Object,"sn":"Appointment"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Comment"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Description"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"EndDate"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"EndTime"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Error"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"PatientReference"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"PractitionerReference"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Priority"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"ReasonCode"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"Saving","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"ServiceCategory"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"ServiceType"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"StartDate"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"StartTime"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Status"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Success"}]}; }, $n); - $m("Dashboard.Pages.EditAppointmentPage", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":1,"n":"CombineDateTime","is":true,"t":8,"pi":[{"n":"date","pt":$n[0].String,"ps":0},{"n":"time","pt":$n[0].String,"ps":1}],"sn":"CombineDateTime","rt":$n[0].String,"p":[$n[0].String,$n[0].String]},{"a":1,"n":"LoadAppointment","is":true,"t":8,"pi":[{"n":"appointmentId","pt":$n[0].String,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"LoadAppointment","rt":$n[0].Void,"p":[$n[0].String,Function]},{"a":1,"n":"ParseDateTime","is":true,"t":8,"pi":[{"n":"isoDateTime","pt":$n[0].String,"ps":0}],"sn":"ParseDateTime","rt":$n[0].ValueTuple$2(System.String,System.String),"p":[$n[0].String]},{"a":2,"n":"Render","is":true,"t":8,"pi":[{"n":"appointmentId","pt":$n[0].String,"ps":0},{"n":"onBack","pt":Function,"ps":1}],"sn":"Render","rt":Object,"p":[$n[0].String,Function]},{"a":1,"n":"RenderErrorState","is":true,"t":8,"pi":[{"n":"error","pt":$n[0].String,"ps":0},{"n":"onBack","pt":Function,"ps":1}],"sn":"RenderErrorState","rt":Object,"p":[$n[0].String,Function]},{"a":1,"n":"RenderForm","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].EditAppointmentState,"ps":0},{"n":"setState","pt":Function,"ps":1},{"n":"onBack","pt":Function,"ps":2}],"sn":"RenderForm","rt":Object,"p":[$n[3].EditAppointmentState,Function,Function]},{"a":1,"n":"RenderFormActions","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].EditAppointmentState,"ps":0},{"n":"onBack","pt":Function,"ps":1}],"sn":"RenderFormActions","rt":Object,"p":[$n[3].EditAppointmentState,Function]},{"a":1,"n":"RenderFormSection","is":true,"t":8,"pi":[{"n":"title","pt":$n[0].String,"ps":0},{"n":"fields","pt":System.Array.type(Object),"ps":1}],"sn":"RenderFormSection","rt":Object,"p":[$n[0].String,System.Array.type(Object)]},{"a":1,"n":"RenderHeader","is":true,"t":8,"pi":[{"n":"appointment","pt":Object,"ps":0},{"n":"onBack","pt":Function,"ps":1}],"sn":"RenderHeader","rt":Object,"p":[Object,Function]},{"a":1,"n":"RenderInputField","is":true,"t":8,"pi":[{"n":"label","pt":$n[0].String,"ps":0},{"n":"id","pt":$n[0].String,"ps":1},{"n":"value","pt":$n[0].String,"ps":2},{"n":"placeholder","pt":$n[0].String,"ps":3},{"n":"onChange","pt":Function,"ps":4},{"n":"type","dv":"text","o":true,"pt":$n[0].String,"ps":5}],"sn":"RenderInputField","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].String,$n[0].String,Function,$n[0].String]},{"a":1,"n":"RenderLoadingState","is":true,"t":8,"sn":"RenderLoadingState","rt":Object},{"a":1,"n":"RenderSelectField","is":true,"t":8,"pi":[{"n":"label","pt":$n[0].String,"ps":0},{"n":"id","pt":$n[0].String,"ps":1},{"n":"value","pt":$n[0].String,"ps":2},{"n":"options","pt":$n[0].Array.type(System.ValueTuple$2(System.String,System.String)),"ps":3},{"n":"onChange","pt":Function,"ps":4}],"sn":"RenderSelectField","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].String,$n[0].Array.type(System.ValueTuple$2(System.String,System.String)),Function]},{"a":1,"n":"RenderTextareaField","is":true,"t":8,"pi":[{"n":"label","pt":$n[0].String,"ps":0},{"n":"id","pt":$n[0].String,"ps":1},{"n":"value","pt":$n[0].String,"ps":2},{"n":"placeholder","pt":$n[0].String,"ps":3},{"n":"onChange","pt":Function,"ps":4}],"sn":"RenderTextareaField","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].String,$n[0].String,Function]},{"a":1,"n":"SaveAppointment","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].EditAppointmentState,"ps":0},{"n":"setState","pt":Function,"ps":1},{"n":"onBack","pt":Function,"ps":2}],"sn":"SaveAppointment","rt":$n[0].Void,"p":[$n[3].EditAppointmentState,Function,Function]},{"a":1,"n":"UpdateField","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].EditAppointmentState,"ps":0},{"n":"setState","pt":Function,"ps":1},{"n":"field","pt":$n[0].String,"ps":2},{"n":"value","pt":$n[0].String,"ps":3}],"sn":"UpdateField","rt":$n[0].Void,"p":[$n[3].EditAppointmentState,Function,$n[0].String,$n[0].String]}]}; }, $n); - $m("Dashboard.Pages.EditPatientState", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Active","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Active","t":8,"rt":$n[0].Boolean,"fg":"Active","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_Active","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"Active"},"fn":"Active"},{"a":2,"n":"AddressLine","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_AddressLine","t":8,"rt":$n[0].String,"fg":"AddressLine"},"s":{"a":2,"n":"set_AddressLine","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"AddressLine"},"fn":"AddressLine"},{"a":2,"n":"BirthDate","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_BirthDate","t":8,"rt":$n[0].String,"fg":"BirthDate"},"s":{"a":2,"n":"set_BirthDate","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"BirthDate"},"fn":"BirthDate"},{"a":2,"n":"City","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_City","t":8,"rt":$n[0].String,"fg":"City"},"s":{"a":2,"n":"set_City","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"City"},"fn":"City"},{"a":2,"n":"Country","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Country","t":8,"rt":$n[0].String,"fg":"Country"},"s":{"a":2,"n":"set_Country","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Country"},"fn":"Country"},{"a":2,"n":"Email","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Email","t":8,"rt":$n[0].String,"fg":"Email"},"s":{"a":2,"n":"set_Email","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Email"},"fn":"Email"},{"a":2,"n":"Error","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Error","t":8,"rt":$n[0].String,"fg":"Error"},"s":{"a":2,"n":"set_Error","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Error"},"fn":"Error"},{"a":2,"n":"FamilyName","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_FamilyName","t":8,"rt":$n[0].String,"fg":"FamilyName"},"s":{"a":2,"n":"set_FamilyName","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"FamilyName"},"fn":"FamilyName"},{"a":2,"n":"Gender","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Gender","t":8,"rt":$n[0].String,"fg":"Gender"},"s":{"a":2,"n":"set_Gender","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Gender"},"fn":"Gender"},{"a":2,"n":"GivenName","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_GivenName","t":8,"rt":$n[0].String,"fg":"GivenName"},"s":{"a":2,"n":"set_GivenName","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"GivenName"},"fn":"GivenName"},{"a":2,"n":"Loading","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Loading","t":8,"rt":$n[0].Boolean,"fg":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_Loading","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"Loading"},"fn":"Loading"},{"a":2,"n":"Patient","t":16,"rt":Object,"g":{"a":2,"n":"get_Patient","t":8,"rt":Object,"fg":"Patient"},"s":{"a":2,"n":"set_Patient","t":8,"p":[Object],"rt":$n[0].Void,"fs":"Patient"},"fn":"Patient"},{"a":2,"n":"Phone","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Phone","t":8,"rt":$n[0].String,"fg":"Phone"},"s":{"a":2,"n":"set_Phone","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Phone"},"fn":"Phone"},{"a":2,"n":"PostalCode","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_PostalCode","t":8,"rt":$n[0].String,"fg":"PostalCode"},"s":{"a":2,"n":"set_PostalCode","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"PostalCode"},"fn":"PostalCode"},{"a":2,"n":"Saving","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Saving","t":8,"rt":$n[0].Boolean,"fg":"Saving","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_Saving","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"Saving"},"fn":"Saving"},{"a":2,"n":"State","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_State","t":8,"rt":$n[0].String,"fg":"State"},"s":{"a":2,"n":"set_State","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"State"},"fn":"State"},{"a":2,"n":"Success","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Success","t":8,"rt":$n[0].String,"fg":"Success"},"s":{"a":2,"n":"set_Success","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Success"},"fn":"Success"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"Active","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"AddressLine"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"BirthDate"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"City"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Country"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Email"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Error"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"FamilyName"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Gender"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"GivenName"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":Object,"sn":"Patient"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Phone"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"PostalCode"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"Saving","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"State"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Success"}]}; }, $n); - $m("Dashboard.Pages.EditPatientPage", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":1,"n":"LoadPatient","is":true,"t":8,"pi":[{"n":"patientId","pt":$n[0].String,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"LoadPatient","rt":$n[0].Void,"p":[$n[0].String,Function]},{"a":2,"n":"Render","is":true,"t":8,"pi":[{"n":"patientId","pt":$n[0].String,"ps":0},{"n":"onBack","pt":Function,"ps":1}],"sn":"Render","rt":Object,"p":[$n[0].String,Function]},{"a":1,"n":"RenderCheckboxField","is":true,"t":8,"pi":[{"n":"label","pt":$n[0].String,"ps":0},{"n":"id","pt":$n[0].String,"ps":1},{"n":"value","pt":$n[0].Boolean,"ps":2},{"n":"onChange","pt":Function,"ps":3}],"sn":"RenderCheckboxField","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].Boolean,Function]},{"a":1,"n":"RenderErrorState","is":true,"t":8,"pi":[{"n":"error","pt":$n[0].String,"ps":0},{"n":"onBack","pt":Function,"ps":1}],"sn":"RenderErrorState","rt":Object,"p":[$n[0].String,Function]},{"a":1,"n":"RenderForm","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].EditPatientState,"ps":0},{"n":"setState","pt":Function,"ps":1},{"n":"onBack","pt":Function,"ps":2}],"sn":"RenderForm","rt":Object,"p":[$n[3].EditPatientState,Function,Function]},{"a":1,"n":"RenderFormActions","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].EditPatientState,"ps":0},{"n":"onBack","pt":Function,"ps":1}],"sn":"RenderFormActions","rt":Object,"p":[$n[3].EditPatientState,Function]},{"a":1,"n":"RenderFormSection","is":true,"t":8,"pi":[{"n":"title","pt":$n[0].String,"ps":0},{"n":"fields","pt":System.Array.type(Object),"ps":1}],"sn":"RenderFormSection","rt":Object,"p":[$n[0].String,System.Array.type(Object)]},{"a":1,"n":"RenderHeader","is":true,"t":8,"pi":[{"n":"patient","pt":Object,"ps":0},{"n":"onBack","pt":Function,"ps":1}],"sn":"RenderHeader","rt":Object,"p":[Object,Function]},{"a":1,"n":"RenderInputField","is":true,"t":8,"pi":[{"n":"label","pt":$n[0].String,"ps":0},{"n":"id","pt":$n[0].String,"ps":1},{"n":"value","pt":$n[0].String,"ps":2},{"n":"placeholder","pt":$n[0].String,"ps":3},{"n":"onChange","pt":Function,"ps":4},{"n":"type","dv":"text","o":true,"pt":$n[0].String,"ps":5}],"sn":"RenderInputField","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].String,$n[0].String,Function,$n[0].String]},{"a":1,"n":"RenderLoadingState","is":true,"t":8,"sn":"RenderLoadingState","rt":Object},{"a":1,"n":"RenderSelectField","is":true,"t":8,"pi":[{"n":"label","pt":$n[0].String,"ps":0},{"n":"id","pt":$n[0].String,"ps":1},{"n":"value","pt":$n[0].String,"ps":2},{"n":"options","pt":$n[0].Array.type(System.ValueTuple$2(System.String,System.String)),"ps":3},{"n":"onChange","pt":Function,"ps":4}],"sn":"RenderSelectField","rt":Object,"p":[$n[0].String,$n[0].String,$n[0].String,$n[0].Array.type(System.ValueTuple$2(System.String,System.String)),Function]},{"a":1,"n":"SavePatient","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].EditPatientState,"ps":0},{"n":"setState","pt":Function,"ps":1},{"n":"onBack","pt":Function,"ps":2}],"sn":"SavePatient","rt":$n[0].Void,"p":[$n[3].EditPatientState,Function,Function]},{"a":1,"n":"UpdateActive","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].EditPatientState,"ps":0},{"n":"setState","pt":Function,"ps":1},{"n":"value","pt":$n[0].Boolean,"ps":2}],"sn":"UpdateActive","rt":$n[0].Void,"p":[$n[3].EditPatientState,Function,$n[0].Boolean]},{"a":1,"n":"UpdateField","is":true,"t":8,"pi":[{"n":"state","pt":$n[3].EditPatientState,"ps":0},{"n":"setState","pt":Function,"ps":1},{"n":"field","pt":$n[0].String,"ps":2},{"n":"value","pt":$n[0].String,"ps":3}],"sn":"UpdateField","rt":$n[0].Void,"p":[$n[3].EditPatientState,Function,$n[0].String,$n[0].String]}]}; }, $n); - $m("Dashboard.Pages.PatientsState", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Error","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Error","t":8,"rt":$n[0].String,"fg":"Error"},"s":{"a":2,"n":"set_Error","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Error"},"fn":"Error"},{"a":2,"n":"Loading","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Loading","t":8,"rt":$n[0].Boolean,"fg":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_Loading","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"Loading"},"fn":"Loading"},{"a":2,"n":"Patients","t":16,"rt":System.Array.type(Object),"g":{"a":2,"n":"get_Patients","t":8,"rt":System.Array.type(Object),"fg":"Patients"},"s":{"a":2,"n":"set_Patients","t":8,"p":[System.Array.type(Object)],"rt":$n[0].Void,"fs":"Patients"},"fn":"Patients"},{"a":2,"n":"SearchQuery","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_SearchQuery","t":8,"rt":$n[0].String,"fg":"SearchQuery"},"s":{"a":2,"n":"set_SearchQuery","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"SearchQuery"},"fn":"SearchQuery"},{"a":2,"n":"SelectedPatient","t":16,"rt":Object,"g":{"a":2,"n":"get_SelectedPatient","t":8,"rt":Object,"fg":"SelectedPatient"},"s":{"a":2,"n":"set_SelectedPatient","t":8,"p":[Object],"rt":$n[0].Void,"fs":"SelectedPatient"},"fn":"SelectedPatient"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Error"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":System.Array.type(Object),"sn":"Patients"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"SearchQuery"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":Object,"sn":"SelectedPatient"}]}; }, $n); - $m("Dashboard.Pages.PatientsPage", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":1,"n":"FirstChar","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"sn":"FirstChar","rt":$n[0].String,"p":[$n[0].String]},{"a":1,"n":"GenderBadgeClass","is":true,"t":8,"pi":[{"n":"gender","pt":$n[0].String,"ps":0}],"sn":"GenderBadgeClass","rt":$n[0].String,"p":[$n[0].String]},{"a":1,"n":"GetInitials","is":true,"t":8,"pi":[{"n":"patient","pt":Object,"ps":0}],"sn":"GetInitials","rt":$n[0].String,"p":[Object]},{"a":1,"n":"HandleSearch","is":true,"t":8,"pi":[{"n":"query","pt":$n[0].String,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"HandleSearch","rt":$n[0].Void,"p":[$n[0].String,Function]},{"a":1,"n":"LoadPatients","is":true,"t":8,"pi":[{"n":"setState","pt":Function,"ps":0}],"sn":"LoadPatients","rt":$n[0].Void,"p":[Function]},{"a":2,"n":"Render","is":true,"t":8,"pi":[{"n":"onEditPatient","dv":null,"o":true,"pt":Function,"ps":0}],"sn":"Render","rt":Object,"p":[Function]},{"a":1,"n":"RenderActions","is":true,"t":8,"pi":[{"n":"patient","pt":Object,"ps":0},{"n":"onSelect","pt":Function,"ps":1}],"sn":"RenderActions","rt":Object,"p":[Object,Function]},{"a":1,"n":"RenderCell","is":true,"t":8,"pi":[{"n":"patient","pt":Object,"ps":0},{"n":"key","pt":$n[0].String,"ps":1},{"n":"onSelect","pt":Function,"ps":2}],"sn":"RenderCell","rt":Object,"p":[Object,$n[0].String,Function]},{"a":1,"n":"RenderContact","is":true,"t":8,"pi":[{"n":"patient","pt":Object,"ps":0}],"sn":"RenderContact","rt":Object,"p":[Object]},{"a":1,"n":"RenderError","is":true,"t":8,"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"RenderError","rt":Object,"p":[$n[0].String]},{"a":1,"n":"RenderGender","is":true,"t":8,"pi":[{"n":"gender","pt":$n[0].String,"ps":0}],"sn":"RenderGender","rt":Object,"p":[$n[0].String]},{"a":1,"n":"RenderPatientName","is":true,"t":8,"pi":[{"n":"patient","pt":Object,"ps":0}],"sn":"RenderPatientName","rt":Object,"p":[Object]},{"a":1,"n":"RenderPatientTable","is":true,"t":8,"pi":[{"n":"patients","pt":System.Array.type(Object),"ps":0},{"n":"onSelect","pt":Function,"ps":1}],"sn":"RenderPatientTable","rt":Object,"p":[System.Array.type(Object),Function]},{"a":1,"n":"RenderStatus","is":true,"t":8,"pi":[{"n":"active","pt":$n[0].Boolean,"ps":0}],"sn":"RenderStatus","rt":Object,"p":[$n[0].Boolean]},{"a":1,"n":"SelectPatient","is":true,"t":8,"pi":[{"n":"patient","pt":Object,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"SelectPatient","rt":$n[0].Void,"p":[Object,Function]},{"a":1,"n":"_onEditPatient","is":true,"t":4,"rt":Function,"sn":"_onEditPatient"}]}; }, $n); - $m("Dashboard.Pages.PractitionersState", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Error","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Error","t":8,"rt":$n[0].String,"fg":"Error"},"s":{"a":2,"n":"set_Error","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Error"},"fn":"Error"},{"a":2,"n":"Loading","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_Loading","t":8,"rt":$n[0].Boolean,"fg":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_Loading","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"Loading"},"fn":"Loading"},{"a":2,"n":"Practitioners","t":16,"rt":System.Array.type(Object),"g":{"a":2,"n":"get_Practitioners","t":8,"rt":System.Array.type(Object),"fg":"Practitioners"},"s":{"a":2,"n":"set_Practitioners","t":8,"p":[System.Array.type(Object)],"rt":$n[0].Void,"fs":"Practitioners"},"fn":"Practitioners"},{"a":2,"n":"SpecialtyFilter","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_SpecialtyFilter","t":8,"rt":$n[0].String,"fg":"SpecialtyFilter"},"s":{"a":2,"n":"set_SpecialtyFilter","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"SpecialtyFilter"},"fn":"SpecialtyFilter"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Error"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"Loading","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":System.Array.type(Object),"sn":"Practitioners"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"SpecialtyFilter"}]}; }, $n); - $m("Dashboard.Pages.PractitionersPage", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":1,"n":"FilterBySpecialty","is":true,"t":8,"pi":[{"n":"specialty","pt":$n[0].String,"ps":0},{"n":"setState","pt":Function,"ps":1}],"sn":"FilterBySpecialty","rt":$n[0].Void,"p":[$n[0].String,Function]},{"a":1,"n":"FirstChar","is":true,"t":8,"pi":[{"n":"s","pt":$n[0].String,"ps":0}],"sn":"FirstChar","rt":$n[0].String,"p":[$n[0].String]},{"a":1,"n":"GetInitials","is":true,"t":8,"pi":[{"n":"p","pt":Object,"ps":0}],"sn":"GetInitials","rt":$n[0].String,"p":[Object]},{"a":1,"n":"LoadPractitioners","is":true,"t":8,"pi":[{"n":"setState","pt":Function,"ps":0}],"sn":"LoadPractitioners","rt":$n[0].Void,"p":[Function]},{"a":2,"n":"Render","is":true,"t":8,"sn":"Render","rt":Object},{"a":1,"n":"RenderDetail","is":true,"t":8,"pi":[{"n":"label","pt":$n[0].String,"ps":0},{"n":"value","pt":$n[0].String,"ps":1}],"sn":"RenderDetail","rt":Object,"p":[$n[0].String,$n[0].String]},{"a":1,"n":"RenderEmpty","is":true,"t":8,"sn":"RenderEmpty","rt":Object},{"a":1,"n":"RenderError","is":true,"t":8,"pi":[{"n":"message","pt":$n[0].String,"ps":0}],"sn":"RenderError","rt":Object,"p":[$n[0].String]},{"a":1,"n":"RenderLoadingGrid","is":true,"t":8,"sn":"RenderLoadingGrid","rt":Object},{"a":1,"n":"RenderPractitionerCard","is":true,"t":8,"pi":[{"n":"practitioner","pt":Object,"ps":0}],"sn":"RenderPractitionerCard","rt":Object,"p":[Object]},{"a":1,"n":"RenderPractitionerGrid","is":true,"t":8,"pi":[{"n":"practitioners","pt":System.Array.type(Object),"ps":0}],"sn":"RenderPractitionerGrid","rt":Object,"p":[System.Array.type(Object)]}]}; }, $n); - $m("Dashboard.Models.SemanticSearchRequest", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"IncludeAchi","t":16,"rt":$n[0].Boolean,"g":{"a":2,"n":"get_IncludeAchi","t":8,"rt":$n[0].Boolean,"fg":"IncludeAchi","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},"s":{"a":2,"n":"set_IncludeAchi","t":8,"p":[$n[0].Boolean],"rt":$n[0].Void,"fs":"IncludeAchi"},"fn":"IncludeAchi"},{"a":2,"n":"Limit","t":16,"rt":$n[0].Int32,"g":{"a":2,"n":"get_Limit","t":8,"rt":$n[0].Int32,"fg":"Limit","box":function ($v) { return H5.box($v, System.Int32);}},"s":{"a":2,"n":"set_Limit","t":8,"p":[$n[0].Int32],"rt":$n[0].Void,"fs":"Limit"},"fn":"Limit"},{"a":2,"n":"Query","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Query","t":8,"rt":$n[0].String,"fg":"Query"},"s":{"a":2,"n":"set_Query","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Query"},"fn":"Query"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Boolean,"sn":"IncludeAchi","box":function ($v) { return H5.box($v, System.Boolean, System.Boolean.toString);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].Int32,"sn":"Limit","box":function ($v) { return H5.box($v, System.Int32);}},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Query"}]}; }, $n); - $m("Dashboard.Components.Column", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"ClassName","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_ClassName","t":8,"rt":$n[0].String,"fg":"ClassName"},"s":{"a":2,"n":"set_ClassName","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"ClassName"},"fn":"ClassName"},{"a":2,"n":"Header","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Header","t":8,"rt":$n[0].String,"fg":"Header"},"s":{"a":2,"n":"set_Header","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Header"},"fn":"Header"},{"a":2,"n":"Key","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Key","t":8,"rt":$n[0].String,"fg":"Key"},"s":{"a":2,"n":"set_Key","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Key"},"fn":"Key"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"ClassName"},{"a":1,"backing":true,"n":"
k__BackingField","t":4,"rt":$n[0].String,"sn":"Header"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"Key"}]}; }, $n); - $m("Dashboard.Components.DataTable", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":2,"n":"Render","is":true,"t":8,"pi":[{"n":"columns","pt":System.Array.type(Dashboard.Components.Column),"ps":0},{"n":"data","pt":System.Array.type(System.Object),"ps":1},{"n":"getKey","pt":Function,"ps":2},{"n":"renderCell","pt":Function,"ps":3},{"n":"onRowClick","dv":null,"o":true,"pt":Function,"ps":4}],"tpc":1,"tprm":["T"],"sn":"Render","rt":Object,"p":[System.Array.type(Dashboard.Components.Column),System.Array.type(System.Object),Function,Function,Function]},{"a":2,"n":"RenderEmpty","is":true,"t":8,"pi":[{"n":"message","dv":"No data available","o":true,"pt":$n[0].String,"ps":0}],"sn":"RenderEmpty","rt":Object,"p":[$n[0].String]},{"a":2,"n":"RenderLoading","is":true,"t":8,"pi":[{"n":"rows","dv":5,"o":true,"pt":$n[0].Int32,"ps":0},{"n":"columns","dv":4,"o":true,"pt":$n[0].Int32,"ps":1}],"sn":"RenderLoading","rt":Object,"p":[$n[0].Int32,$n[0].Int32]}]}; }, $n); - $m("Dashboard.Components.Header", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":2,"n":"Render","is":true,"t":8,"pi":[{"n":"title","pt":$n[0].String,"ps":0},{"n":"searchQuery","dv":null,"o":true,"pt":$n[0].String,"ps":1},{"n":"onSearchChange","dv":null,"o":true,"pt":Function,"ps":2},{"n":"notificationCount","dv":0,"o":true,"pt":$n[0].Int32,"ps":3}],"sn":"Render","rt":Object,"p":[$n[0].String,$n[0].String,Function,$n[0].Int32]},{"a":1,"n":"RenderNotificationButton","is":true,"t":8,"pi":[{"n":"count","pt":$n[0].Int32,"ps":0}],"sn":"RenderNotificationButton","rt":Object,"p":[$n[0].Int32]},{"a":1,"n":"RenderUserAvatar","is":true,"t":8,"sn":"RenderUserAvatar","rt":Object}]}; }, $n); - $m("Dashboard.Components.Icons", function () { return {"att":1048961,"a":2,"s":true,"m":[{"a":2,"n":"Activity","is":true,"t":8,"sn":"Activity","rt":Object},{"a":2,"n":"Bell","is":true,"t":8,"sn":"Bell","rt":Object},{"a":2,"n":"Calendar","is":true,"t":8,"sn":"Calendar","rt":Object},{"a":2,"n":"Check","is":true,"t":8,"sn":"Check","rt":Object},{"a":2,"n":"ChevronLeft","is":true,"t":8,"sn":"ChevronLeft","rt":Object},{"a":2,"n":"ChevronRight","is":true,"t":8,"sn":"ChevronRight","rt":Object},{"a":2,"n":"Clipboard","is":true,"t":8,"sn":"Clipboard","rt":Object},{"a":2,"n":"Code","is":true,"t":8,"sn":"Code","rt":Object},{"a":2,"n":"Copy","is":true,"t":8,"sn":"Copy","rt":Object},{"a":2,"n":"Edit","is":true,"t":8,"sn":"Edit","rt":Object},{"a":2,"n":"Eye","is":true,"t":8,"sn":"Eye","rt":Object},{"a":2,"n":"FileText","is":true,"t":8,"sn":"FileText","rt":Object},{"a":2,"n":"Heart","is":true,"t":8,"sn":"Heart","rt":Object},{"a":2,"n":"Home","is":true,"t":8,"sn":"Home","rt":Object},{"a":2,"n":"Menu","is":true,"t":8,"sn":"Menu","rt":Object},{"a":2,"n":"Pill","is":true,"t":8,"sn":"Pill","rt":Object},{"a":2,"n":"Plus","is":true,"t":8,"sn":"Plus","rt":Object},{"a":2,"n":"Refresh","is":true,"t":8,"sn":"Refresh","rt":Object},{"a":2,"n":"Search","is":true,"t":8,"sn":"Search","rt":Object},{"a":2,"n":"Settings","is":true,"t":8,"sn":"Settings","rt":Object},{"a":2,"n":"Sparkles","is":true,"t":8,"sn":"Sparkles","rt":Object},{"a":2,"n":"Trash","is":true,"t":8,"sn":"Trash","rt":Object},{"a":2,"n":"TrendDown","is":true,"t":8,"sn":"TrendDown","rt":Object},{"a":2,"n":"TrendUp","is":true,"t":8,"sn":"TrendUp","rt":Object},{"a":2,"n":"UserDoctor","is":true,"t":8,"sn":"UserDoctor","rt":Object},{"a":2,"n":"Users","is":true,"t":8,"sn":"Users","rt":Object},{"a":2,"n":"X","is":true,"t":8,"sn":"X","rt":Object}]}; }, $n); - $m("Dashboard.Components.TrendDirection", function () { return {"att":257,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Down","is":true,"t":4,"rt":$n[4].TrendDirection,"sn":"Down","box":function ($v) { return H5.box($v, Dashboard.Components.TrendDirection, System.Enum.toStringFn(Dashboard.Components.TrendDirection));}},{"a":2,"n":"Neutral","is":true,"t":4,"rt":$n[4].TrendDirection,"sn":"Neutral","box":function ($v) { return H5.box($v, Dashboard.Components.TrendDirection, System.Enum.toStringFn(Dashboard.Components.TrendDirection));}},{"a":2,"n":"Up","is":true,"t":4,"rt":$n[4].TrendDirection,"sn":"Up","box":function ($v) { return H5.box($v, Dashboard.Components.TrendDirection, System.Enum.toStringFn(Dashboard.Components.TrendDirection));}}]}; }, $n); - $m("Dashboard.Components.MetricCardProps", function () { return {"att":1048577,"a":2,"m":[{"a":2,"isSynthetic":true,"n":".ctor","t":1,"sn":"ctor"},{"a":2,"n":"Icon","t":16,"rt":Function,"g":{"a":2,"n":"get_Icon","t":8,"rt":Function,"fg":"Icon"},"s":{"a":2,"n":"set_Icon","t":8,"p":[Function],"rt":$n[0].Void,"fs":"Icon"},"fn":"Icon"},{"a":2,"n":"IconColor","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_IconColor","t":8,"rt":$n[0].String,"fg":"IconColor"},"s":{"a":2,"n":"set_IconColor","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"IconColor"},"fn":"IconColor"},{"a":2,"n":"Label","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Label","t":8,"rt":$n[0].String,"fg":"Label"},"s":{"a":2,"n":"set_Label","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Label"},"fn":"Label"},{"a":2,"n":"Trend","t":16,"rt":$n[4].TrendDirection,"g":{"a":2,"n":"get_Trend","t":8,"rt":$n[4].TrendDirection,"fg":"Trend","box":function ($v) { return H5.box($v, Dashboard.Components.TrendDirection, System.Enum.toStringFn(Dashboard.Components.TrendDirection));}},"s":{"a":2,"n":"set_Trend","t":8,"p":[$n[4].TrendDirection],"rt":$n[0].Void,"fs":"Trend"},"fn":"Trend"},{"a":2,"n":"TrendValue","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_TrendValue","t":8,"rt":$n[0].String,"fg":"TrendValue"},"s":{"a":2,"n":"set_TrendValue","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"TrendValue"},"fn":"TrendValue"},{"a":2,"n":"Value","t":16,"rt":$n[0].String,"g":{"a":2,"n":"get_Value","t":8,"rt":$n[0].String,"fg":"Value"},"s":{"a":2,"n":"set_Value","t":8,"p":[$n[0].String],"rt":$n[0].Void,"fs":"Value"},"fn":"Value"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":Function,"sn":"Icon"},{"a":1,"backing":true,"n":"k__BackingField","t":4,"rt":$n[0].String,"sn":"IconColor"},{"a":1,"backing":true,"n":"