This is page 26 of 29. Use http://codebase.md/tosin2013/documcp?lines=true&page={x} to view the full context.
# Directory Structure
```
├── .dockerignore
├── .eslintignore
├── .eslintrc.json
├── .github
│ ├── agents
│ │ ├── documcp-ast.md
│ │ ├── documcp-deploy.md
│ │ ├── documcp-memory.md
│ │ ├── documcp-test.md
│ │ └── documcp-tool.md
│ ├── copilot-instructions.md
│ ├── dependabot.yml
│ ├── ISSUE_TEMPLATE
│ │ ├── automated-changelog.md
│ │ ├── bug_report.md
│ │ ├── bug_report.yml
│ │ ├── documentation_issue.md
│ │ ├── feature_request.md
│ │ ├── feature_request.yml
│ │ ├── npm-publishing-fix.md
│ │ └── release_improvements.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── release-drafter.yml
│ └── workflows
│ ├── auto-merge.yml
│ ├── ci.yml
│ ├── codeql.yml
│ ├── dependency-review.yml
│ ├── deploy-docs.yml
│ ├── README.md
│ ├── release-drafter.yml
│ └── release.yml
├── .gitignore
├── .husky
│ ├── commit-msg
│ └── pre-commit
├── .linkcheck.config.json
├── .markdown-link-check.json
├── .nvmrc
├── .pre-commit-config.yaml
├── .versionrc.json
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── commitlint.config.js
├── CONTRIBUTING.md
├── docker-compose.docs.yml
├── Dockerfile.docs
├── docs
│ ├── .docusaurus
│ │ ├── docusaurus-plugin-content-docs
│ │ │ └── default
│ │ │ └── __mdx-loader-dependency.json
│ │ └── docusaurus-plugin-content-pages
│ │ └── default
│ │ └── __plugin.json
│ ├── adrs
│ │ ├── 001-mcp-server-architecture.md
│ │ ├── 002-repository-analysis-engine.md
│ │ ├── 003-static-site-generator-recommendation-engine.md
│ │ ├── 004-diataxis-framework-integration.md
│ │ ├── 005-github-pages-deployment-automation.md
│ │ ├── 006-mcp-tools-api-design.md
│ │ ├── 007-mcp-prompts-and-resources-integration.md
│ │ ├── 008-intelligent-content-population-engine.md
│ │ ├── 009-content-accuracy-validation-framework.md
│ │ ├── 010-mcp-resource-pattern-redesign.md
│ │ └── README.md
│ ├── api
│ │ ├── .nojekyll
│ │ ├── assets
│ │ │ ├── hierarchy.js
│ │ │ ├── highlight.css
│ │ │ ├── icons.js
│ │ │ ├── icons.svg
│ │ │ ├── main.js
│ │ │ ├── navigation.js
│ │ │ ├── search.js
│ │ │ └── style.css
│ │ ├── hierarchy.html
│ │ ├── index.html
│ │ ├── modules.html
│ │ └── variables
│ │ └── TOOLS.html
│ ├── assets
│ │ └── logo.svg
│ ├── development
│ │ └── MCP_INSPECTOR_TESTING.md
│ ├── docusaurus.config.js
│ ├── explanation
│ │ ├── architecture.md
│ │ └── index.md
│ ├── guides
│ │ ├── link-validation.md
│ │ ├── playwright-integration.md
│ │ └── playwright-testing-workflow.md
│ ├── how-to
│ │ ├── analytics-setup.md
│ │ ├── custom-domains.md
│ │ ├── documentation-freshness-tracking.md
│ │ ├── github-pages-deployment.md
│ │ ├── index.md
│ │ ├── local-testing.md
│ │ ├── performance-optimization.md
│ │ ├── prompting-guide.md
│ │ ├── repository-analysis.md
│ │ ├── seo-optimization.md
│ │ ├── site-monitoring.md
│ │ ├── troubleshooting.md
│ │ └── usage-examples.md
│ ├── index.md
│ ├── knowledge-graph.md
│ ├── package-lock.json
│ ├── package.json
│ ├── phase-2-intelligence.md
│ ├── reference
│ │ ├── api-overview.md
│ │ ├── cli.md
│ │ ├── configuration.md
│ │ ├── deploy-pages.md
│ │ ├── index.md
│ │ ├── mcp-tools.md
│ │ └── prompt-templates.md
│ ├── research
│ │ ├── cross-domain-integration
│ │ │ └── README.md
│ │ ├── domain-1-mcp-architecture
│ │ │ ├── index.md
│ │ │ └── mcp-performance-research.md
│ │ ├── domain-2-repository-analysis
│ │ │ └── README.md
│ │ ├── domain-3-ssg-recommendation
│ │ │ ├── index.md
│ │ │ └── ssg-performance-analysis.md
│ │ ├── domain-4-diataxis-integration
│ │ │ └── README.md
│ │ ├── domain-5-github-deployment
│ │ │ ├── github-pages-security-analysis.md
│ │ │ └── index.md
│ │ ├── domain-6-api-design
│ │ │ └── README.md
│ │ ├── README.md
│ │ ├── research-integration-summary-2025-01-14.md
│ │ ├── research-progress-template.md
│ │ └── research-questions-2025-01-14.md
│ ├── robots.txt
│ ├── sidebars.js
│ ├── sitemap.xml
│ ├── src
│ │ └── css
│ │ └── custom.css
│ └── tutorials
│ ├── development-setup.md
│ ├── environment-setup.md
│ ├── first-deployment.md
│ ├── getting-started.md
│ ├── index.md
│ ├── memory-workflows.md
│ └── user-onboarding.md
├── jest.config.js
├── LICENSE
├── Makefile
├── MCP_PHASE2_IMPLEMENTATION.md
├── mcp-config-example.json
├── mcp.json
├── package-lock.json
├── package.json
├── README.md
├── release.sh
├── scripts
│ └── check-package-structure.cjs
├── SECURITY.md
├── setup-precommit.sh
├── src
│ ├── benchmarks
│ │ └── performance.ts
│ ├── index.ts
│ ├── memory
│ │ ├── contextual-retrieval.ts
│ │ ├── deployment-analytics.ts
│ │ ├── enhanced-manager.ts
│ │ ├── export-import.ts
│ │ ├── freshness-kg-integration.ts
│ │ ├── index.ts
│ │ ├── integration.ts
│ │ ├── kg-code-integration.ts
│ │ ├── kg-health.ts
│ │ ├── kg-integration.ts
│ │ ├── kg-link-validator.ts
│ │ ├── kg-storage.ts
│ │ ├── knowledge-graph.ts
│ │ ├── learning.ts
│ │ ├── manager.ts
│ │ ├── multi-agent-sharing.ts
│ │ ├── pruning.ts
│ │ ├── schemas.ts
│ │ ├── storage.ts
│ │ ├── temporal-analysis.ts
│ │ ├── user-preferences.ts
│ │ └── visualization.ts
│ ├── prompts
│ │ └── technical-writer-prompts.ts
│ ├── scripts
│ │ └── benchmark.ts
│ ├── templates
│ │ └── playwright
│ │ ├── accessibility.spec.template.ts
│ │ ├── Dockerfile.template
│ │ ├── docs-e2e.workflow.template.yml
│ │ ├── link-validation.spec.template.ts
│ │ └── playwright.config.template.ts
│ ├── tools
│ │ ├── analyze-deployments.ts
│ │ ├── analyze-readme.ts
│ │ ├── analyze-repository.ts
│ │ ├── check-documentation-links.ts
│ │ ├── deploy-pages.ts
│ │ ├── detect-gaps.ts
│ │ ├── evaluate-readme-health.ts
│ │ ├── generate-config.ts
│ │ ├── generate-contextual-content.ts
│ │ ├── generate-llm-context.ts
│ │ ├── generate-readme-template.ts
│ │ ├── generate-technical-writer-prompts.ts
│ │ ├── kg-health-check.ts
│ │ ├── manage-preferences.ts
│ │ ├── manage-sitemap.ts
│ │ ├── optimize-readme.ts
│ │ ├── populate-content.ts
│ │ ├── readme-best-practices.ts
│ │ ├── recommend-ssg.ts
│ │ ├── setup-playwright-tests.ts
│ │ ├── setup-structure.ts
│ │ ├── sync-code-to-docs.ts
│ │ ├── test-local-deployment.ts
│ │ ├── track-documentation-freshness.ts
│ │ ├── update-existing-documentation.ts
│ │ ├── validate-content.ts
│ │ ├── validate-documentation-freshness.ts
│ │ ├── validate-readme-checklist.ts
│ │ └── verify-deployment.ts
│ ├── types
│ │ └── api.ts
│ ├── utils
│ │ ├── ast-analyzer.ts
│ │ ├── code-scanner.ts
│ │ ├── content-extractor.ts
│ │ ├── drift-detector.ts
│ │ ├── freshness-tracker.ts
│ │ ├── language-parsers-simple.ts
│ │ ├── permission-checker.ts
│ │ └── sitemap-generator.ts
│ └── workflows
│ └── documentation-workflow.ts
├── test-docs-local.sh
├── tests
│ ├── api
│ │ └── mcp-responses.test.ts
│ ├── benchmarks
│ │ └── performance.test.ts
│ ├── edge-cases
│ │ └── error-handling.test.ts
│ ├── functional
│ │ └── tools.test.ts
│ ├── integration
│ │ ├── kg-documentation-workflow.test.ts
│ │ ├── knowledge-graph-workflow.test.ts
│ │ ├── mcp-readme-tools.test.ts
│ │ ├── memory-mcp-tools.test.ts
│ │ ├── readme-technical-writer.test.ts
│ │ └── workflow.test.ts
│ ├── memory
│ │ ├── contextual-retrieval.test.ts
│ │ ├── enhanced-manager.test.ts
│ │ ├── export-import.test.ts
│ │ ├── freshness-kg-integration.test.ts
│ │ ├── kg-code-integration.test.ts
│ │ ├── kg-health.test.ts
│ │ ├── kg-link-validator.test.ts
│ │ ├── kg-storage-validation.test.ts
│ │ ├── kg-storage.test.ts
│ │ ├── knowledge-graph-enhanced.test.ts
│ │ ├── knowledge-graph.test.ts
│ │ ├── learning.test.ts
│ │ ├── manager-advanced.test.ts
│ │ ├── manager.test.ts
│ │ ├── mcp-resource-integration.test.ts
│ │ ├── mcp-tool-persistence.test.ts
│ │ ├── schemas.test.ts
│ │ ├── storage.test.ts
│ │ ├── temporal-analysis.test.ts
│ │ └── user-preferences.test.ts
│ ├── performance
│ │ ├── memory-load-testing.test.ts
│ │ └── memory-stress-testing.test.ts
│ ├── prompts
│ │ ├── guided-workflow-prompts.test.ts
│ │ └── technical-writer-prompts.test.ts
│ ├── server.test.ts
│ ├── setup.ts
│ ├── tools
│ │ ├── all-tools.test.ts
│ │ ├── analyze-coverage.test.ts
│ │ ├── analyze-deployments.test.ts
│ │ ├── analyze-readme.test.ts
│ │ ├── analyze-repository.test.ts
│ │ ├── check-documentation-links.test.ts
│ │ ├── deploy-pages-kg-retrieval.test.ts
│ │ ├── deploy-pages-tracking.test.ts
│ │ ├── deploy-pages.test.ts
│ │ ├── detect-gaps.test.ts
│ │ ├── evaluate-readme-health.test.ts
│ │ ├── generate-contextual-content.test.ts
│ │ ├── generate-llm-context.test.ts
│ │ ├── generate-readme-template.test.ts
│ │ ├── generate-technical-writer-prompts.test.ts
│ │ ├── kg-health-check.test.ts
│ │ ├── manage-sitemap.test.ts
│ │ ├── optimize-readme.test.ts
│ │ ├── readme-best-practices.test.ts
│ │ ├── recommend-ssg-historical.test.ts
│ │ ├── recommend-ssg-preferences.test.ts
│ │ ├── recommend-ssg.test.ts
│ │ ├── simple-coverage.test.ts
│ │ ├── sync-code-to-docs.test.ts
│ │ ├── test-local-deployment.test.ts
│ │ ├── tool-error-handling.test.ts
│ │ ├── track-documentation-freshness.test.ts
│ │ ├── validate-content.test.ts
│ │ ├── validate-documentation-freshness.test.ts
│ │ └── validate-readme-checklist.test.ts
│ ├── types
│ │ └── type-safety.test.ts
│ └── utils
│ ├── ast-analyzer.test.ts
│ ├── content-extractor.test.ts
│ ├── drift-detector.test.ts
│ ├── freshness-tracker.test.ts
│ └── sitemap-generator.test.ts
├── tsconfig.json
└── typedoc.json
```
# Files
--------------------------------------------------------------------------------
/docs/api/assets/main.js:
--------------------------------------------------------------------------------
```javascript
1 | "use strict";
2 | window.translations = {
3 | copy: "Copy",
4 | copied: "Copied!",
5 | normally_hidden:
6 | "This member is normally hidden due to your filter settings.",
7 | hierarchy_expand: "Expand",
8 | hierarchy_collapse: "Collapse",
9 | folder: "Folder",
10 | search_index_not_available: "The search index is not available",
11 | search_no_results_found_for_0: "No results found for {0}",
12 | kind_1: "Project",
13 | kind_2: "Module",
14 | kind_4: "Namespace",
15 | kind_8: "Enumeration",
16 | kind_16: "Enumeration Member",
17 | kind_32: "Variable",
18 | kind_64: "Function",
19 | kind_128: "Class",
20 | kind_256: "Interface",
21 | kind_512: "Constructor",
22 | kind_1024: "Property",
23 | kind_2048: "Method",
24 | kind_4096: "Call Signature",
25 | kind_8192: "Index Signature",
26 | kind_16384: "Constructor Signature",
27 | kind_32768: "Parameter",
28 | kind_65536: "Type Literal",
29 | kind_131072: "Type Parameter",
30 | kind_262144: "Accessor",
31 | kind_524288: "Get Signature",
32 | kind_1048576: "Set Signature",
33 | kind_2097152: "Type Alias",
34 | kind_4194304: "Reference",
35 | kind_8388608: "Document",
36 | };
37 | ("use strict");
38 | (() => {
39 | var Ke = Object.create;
40 | var he = Object.defineProperty;
41 | var Ge = Object.getOwnPropertyDescriptor;
42 | var Ze = Object.getOwnPropertyNames;
43 | var Xe = Object.getPrototypeOf,
44 | Ye = Object.prototype.hasOwnProperty;
45 | var et = (t, e) => () => (
46 | e || t((e = { exports: {} }).exports, e), e.exports
47 | );
48 | var tt = (t, e, n, r) => {
49 | if ((e && typeof e == "object") || typeof e == "function")
50 | for (let i of Ze(e))
51 | !Ye.call(t, i) &&
52 | i !== n &&
53 | he(t, i, {
54 | get: () => e[i],
55 | enumerable: !(r = Ge(e, i)) || r.enumerable,
56 | });
57 | return t;
58 | };
59 | var nt = (t, e, n) => (
60 | (n = t != null ? Ke(Xe(t)) : {}),
61 | tt(
62 | e || !t || !t.__esModule
63 | ? he(n, "default", { value: t, enumerable: !0 })
64 | : n,
65 | t,
66 | )
67 | );
68 | var ye = et((me, ge) => {
69 | (function () {
70 | var t = function (e) {
71 | var n = new t.Builder();
72 | return (
73 | n.pipeline.add(t.trimmer, t.stopWordFilter, t.stemmer),
74 | n.searchPipeline.add(t.stemmer),
75 | e.call(n, n),
76 | n.build()
77 | );
78 | };
79 | t.version = "2.3.9";
80 | (t.utils = {}),
81 | (t.utils.warn = (function (e) {
82 | return function (n) {
83 | e.console && console.warn && console.warn(n);
84 | };
85 | })(this)),
86 | (t.utils.asString = function (e) {
87 | return e == null ? "" : e.toString();
88 | }),
89 | (t.utils.clone = function (e) {
90 | if (e == null) return e;
91 | for (
92 | var n = Object.create(null), r = Object.keys(e), i = 0;
93 | i < r.length;
94 | i++
95 | ) {
96 | var s = r[i],
97 | o = e[s];
98 | if (Array.isArray(o)) {
99 | n[s] = o.slice();
100 | continue;
101 | }
102 | if (
103 | typeof o == "string" ||
104 | typeof o == "number" ||
105 | typeof o == "boolean"
106 | ) {
107 | n[s] = o;
108 | continue;
109 | }
110 | throw new TypeError(
111 | "clone is not deep and does not support nested objects",
112 | );
113 | }
114 | return n;
115 | }),
116 | (t.FieldRef = function (e, n, r) {
117 | (this.docRef = e), (this.fieldName = n), (this._stringValue = r);
118 | }),
119 | (t.FieldRef.joiner = "/"),
120 | (t.FieldRef.fromString = function (e) {
121 | var n = e.indexOf(t.FieldRef.joiner);
122 | if (n === -1) throw "malformed field ref string";
123 | var r = e.slice(0, n),
124 | i = e.slice(n + 1);
125 | return new t.FieldRef(i, r, e);
126 | }),
127 | (t.FieldRef.prototype.toString = function () {
128 | return (
129 | this._stringValue == null &&
130 | (this._stringValue =
131 | this.fieldName + t.FieldRef.joiner + this.docRef),
132 | this._stringValue
133 | );
134 | });
135 | (t.Set = function (e) {
136 | if (((this.elements = Object.create(null)), e)) {
137 | this.length = e.length;
138 | for (var n = 0; n < this.length; n++) this.elements[e[n]] = !0;
139 | } else this.length = 0;
140 | }),
141 | (t.Set.complete = {
142 | intersect: function (e) {
143 | return e;
144 | },
145 | union: function () {
146 | return this;
147 | },
148 | contains: function () {
149 | return !0;
150 | },
151 | }),
152 | (t.Set.empty = {
153 | intersect: function () {
154 | return this;
155 | },
156 | union: function (e) {
157 | return e;
158 | },
159 | contains: function () {
160 | return !1;
161 | },
162 | }),
163 | (t.Set.prototype.contains = function (e) {
164 | return !!this.elements[e];
165 | }),
166 | (t.Set.prototype.intersect = function (e) {
167 | var n,
168 | r,
169 | i,
170 | s = [];
171 | if (e === t.Set.complete) return this;
172 | if (e === t.Set.empty) return e;
173 | this.length < e.length
174 | ? ((n = this), (r = e))
175 | : ((n = e), (r = this)),
176 | (i = Object.keys(n.elements));
177 | for (var o = 0; o < i.length; o++) {
178 | var a = i[o];
179 | a in r.elements && s.push(a);
180 | }
181 | return new t.Set(s);
182 | }),
183 | (t.Set.prototype.union = function (e) {
184 | return e === t.Set.complete
185 | ? t.Set.complete
186 | : e === t.Set.empty
187 | ? this
188 | : new t.Set(
189 | Object.keys(this.elements).concat(Object.keys(e.elements)),
190 | );
191 | }),
192 | (t.idf = function (e, n) {
193 | var r = 0;
194 | for (var i in e) i != "_index" && (r += Object.keys(e[i]).length);
195 | var s = (n - r + 0.5) / (r + 0.5);
196 | return Math.log(1 + Math.abs(s));
197 | }),
198 | (t.Token = function (e, n) {
199 | (this.str = e || ""), (this.metadata = n || {});
200 | }),
201 | (t.Token.prototype.toString = function () {
202 | return this.str;
203 | }),
204 | (t.Token.prototype.update = function (e) {
205 | return (this.str = e(this.str, this.metadata)), this;
206 | }),
207 | (t.Token.prototype.clone = function (e) {
208 | return (
209 | (e =
210 | e ||
211 | function (n) {
212 | return n;
213 | }),
214 | new t.Token(e(this.str, this.metadata), this.metadata)
215 | );
216 | });
217 | (t.tokenizer = function (e, n) {
218 | if (e == null || e == null) return [];
219 | if (Array.isArray(e))
220 | return e.map(function (f) {
221 | return new t.Token(
222 | t.utils.asString(f).toLowerCase(),
223 | t.utils.clone(n),
224 | );
225 | });
226 | for (
227 | var r = e.toString().toLowerCase(),
228 | i = r.length,
229 | s = [],
230 | o = 0,
231 | a = 0;
232 | o <= i;
233 | o++
234 | ) {
235 | var c = r.charAt(o),
236 | l = o - a;
237 | if (c.match(t.tokenizer.separator) || o == i) {
238 | if (l > 0) {
239 | var d = t.utils.clone(n) || {};
240 | (d.position = [a, l]),
241 | (d.index = s.length),
242 | s.push(new t.Token(r.slice(a, o), d));
243 | }
244 | a = o + 1;
245 | }
246 | }
247 | return s;
248 | }),
249 | (t.tokenizer.separator = /[\s\-]+/);
250 | (t.Pipeline = function () {
251 | this._stack = [];
252 | }),
253 | (t.Pipeline.registeredFunctions = Object.create(null)),
254 | (t.Pipeline.registerFunction = function (e, n) {
255 | n in this.registeredFunctions &&
256 | t.utils.warn("Overwriting existing registered function: " + n),
257 | (e.label = n),
258 | (t.Pipeline.registeredFunctions[e.label] = e);
259 | }),
260 | (t.Pipeline.warnIfFunctionNotRegistered = function (e) {
261 | var n = e.label && e.label in this.registeredFunctions;
262 | n ||
263 | t.utils.warn(
264 | `Function is not registered with pipeline. This may cause problems when serialising the index.
265 | `,
266 | e,
267 | );
268 | }),
269 | (t.Pipeline.load = function (e) {
270 | var n = new t.Pipeline();
271 | return (
272 | e.forEach(function (r) {
273 | var i = t.Pipeline.registeredFunctions[r];
274 | if (i) n.add(i);
275 | else throw new Error("Cannot load unregistered function: " + r);
276 | }),
277 | n
278 | );
279 | }),
280 | (t.Pipeline.prototype.add = function () {
281 | var e = Array.prototype.slice.call(arguments);
282 | e.forEach(function (n) {
283 | t.Pipeline.warnIfFunctionNotRegistered(n), this._stack.push(n);
284 | }, this);
285 | }),
286 | (t.Pipeline.prototype.after = function (e, n) {
287 | t.Pipeline.warnIfFunctionNotRegistered(n);
288 | var r = this._stack.indexOf(e);
289 | if (r == -1) throw new Error("Cannot find existingFn");
290 | (r = r + 1), this._stack.splice(r, 0, n);
291 | }),
292 | (t.Pipeline.prototype.before = function (e, n) {
293 | t.Pipeline.warnIfFunctionNotRegistered(n);
294 | var r = this._stack.indexOf(e);
295 | if (r == -1) throw new Error("Cannot find existingFn");
296 | this._stack.splice(r, 0, n);
297 | }),
298 | (t.Pipeline.prototype.remove = function (e) {
299 | var n = this._stack.indexOf(e);
300 | n != -1 && this._stack.splice(n, 1);
301 | }),
302 | (t.Pipeline.prototype.run = function (e) {
303 | for (var n = this._stack.length, r = 0; r < n; r++) {
304 | for (var i = this._stack[r], s = [], o = 0; o < e.length; o++) {
305 | var a = i(e[o], o, e);
306 | if (!(a == null || a === ""))
307 | if (Array.isArray(a))
308 | for (var c = 0; c < a.length; c++) s.push(a[c]);
309 | else s.push(a);
310 | }
311 | e = s;
312 | }
313 | return e;
314 | }),
315 | (t.Pipeline.prototype.runString = function (e, n) {
316 | var r = new t.Token(e, n);
317 | return this.run([r]).map(function (i) {
318 | return i.toString();
319 | });
320 | }),
321 | (t.Pipeline.prototype.reset = function () {
322 | this._stack = [];
323 | }),
324 | (t.Pipeline.prototype.toJSON = function () {
325 | return this._stack.map(function (e) {
326 | return t.Pipeline.warnIfFunctionNotRegistered(e), e.label;
327 | });
328 | });
329 | (t.Vector = function (e) {
330 | (this._magnitude = 0), (this.elements = e || []);
331 | }),
332 | (t.Vector.prototype.positionForIndex = function (e) {
333 | if (this.elements.length == 0) return 0;
334 | for (
335 | var n = 0,
336 | r = this.elements.length / 2,
337 | i = r - n,
338 | s = Math.floor(i / 2),
339 | o = this.elements[s * 2];
340 | i > 1 && (o < e && (n = s), o > e && (r = s), o != e);
341 |
342 | )
343 | (i = r - n),
344 | (s = n + Math.floor(i / 2)),
345 | (o = this.elements[s * 2]);
346 | if (o == e || o > e) return s * 2;
347 | if (o < e) return (s + 1) * 2;
348 | }),
349 | (t.Vector.prototype.insert = function (e, n) {
350 | this.upsert(e, n, function () {
351 | throw "duplicate index";
352 | });
353 | }),
354 | (t.Vector.prototype.upsert = function (e, n, r) {
355 | this._magnitude = 0;
356 | var i = this.positionForIndex(e);
357 | this.elements[i] == e
358 | ? (this.elements[i + 1] = r(this.elements[i + 1], n))
359 | : this.elements.splice(i, 0, e, n);
360 | }),
361 | (t.Vector.prototype.magnitude = function () {
362 | if (this._magnitude) return this._magnitude;
363 | for (var e = 0, n = this.elements.length, r = 1; r < n; r += 2) {
364 | var i = this.elements[r];
365 | e += i * i;
366 | }
367 | return (this._magnitude = Math.sqrt(e));
368 | }),
369 | (t.Vector.prototype.dot = function (e) {
370 | for (
371 | var n = 0,
372 | r = this.elements,
373 | i = e.elements,
374 | s = r.length,
375 | o = i.length,
376 | a = 0,
377 | c = 0,
378 | l = 0,
379 | d = 0;
380 | l < s && d < o;
381 |
382 | )
383 | (a = r[l]),
384 | (c = i[d]),
385 | a < c
386 | ? (l += 2)
387 | : a > c
388 | ? (d += 2)
389 | : a == c && ((n += r[l + 1] * i[d + 1]), (l += 2), (d += 2));
390 | return n;
391 | }),
392 | (t.Vector.prototype.similarity = function (e) {
393 | return this.dot(e) / this.magnitude() || 0;
394 | }),
395 | (t.Vector.prototype.toArray = function () {
396 | for (
397 | var e = new Array(this.elements.length / 2), n = 1, r = 0;
398 | n < this.elements.length;
399 | n += 2, r++
400 | )
401 | e[r] = this.elements[n];
402 | return e;
403 | }),
404 | (t.Vector.prototype.toJSON = function () {
405 | return this.elements;
406 | });
407 | (t.stemmer = (function () {
408 | var e = {
409 | ational: "ate",
410 | tional: "tion",
411 | enci: "ence",
412 | anci: "ance",
413 | izer: "ize",
414 | bli: "ble",
415 | alli: "al",
416 | entli: "ent",
417 | eli: "e",
418 | ousli: "ous",
419 | ization: "ize",
420 | ation: "ate",
421 | ator: "ate",
422 | alism: "al",
423 | iveness: "ive",
424 | fulness: "ful",
425 | ousness: "ous",
426 | aliti: "al",
427 | iviti: "ive",
428 | biliti: "ble",
429 | logi: "log",
430 | },
431 | n = {
432 | icate: "ic",
433 | ative: "",
434 | alize: "al",
435 | iciti: "ic",
436 | ical: "ic",
437 | ful: "",
438 | ness: "",
439 | },
440 | r = "[^aeiou]",
441 | i = "[aeiouy]",
442 | s = r + "[^aeiouy]*",
443 | o = i + "[aeiou]*",
444 | a = "^(" + s + ")?" + o + s,
445 | c = "^(" + s + ")?" + o + s + "(" + o + ")?$",
446 | l = "^(" + s + ")?" + o + s + o + s,
447 | d = "^(" + s + ")?" + i,
448 | f = new RegExp(a),
449 | p = new RegExp(l),
450 | v = new RegExp(c),
451 | x = new RegExp(d),
452 | w = /^(.+?)(ss|i)es$/,
453 | m = /^(.+?)([^s])s$/,
454 | g = /^(.+?)eed$/,
455 | T = /^(.+?)(ed|ing)$/,
456 | L = /.$/,
457 | C = /(at|bl|iz)$/,
458 | O = new RegExp("([^aeiouylsz])\\1$"),
459 | j = new RegExp("^" + s + i + "[^aeiouwxy]$"),
460 | N = /^(.+?[^aeiou])y$/,
461 | q =
462 | /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,
463 | W = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,
464 | B =
465 | /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,
466 | z = /^(.+?)(s|t)(ion)$/,
467 | _ = /^(.+?)e$/,
468 | U = /ll$/,
469 | J = new RegExp("^" + s + i + "[^aeiouwxy]$"),
470 | V = function (u) {
471 | var y, P, k, h, E, Q, H;
472 | if (u.length < 3) return u;
473 | if (
474 | ((k = u.substr(0, 1)),
475 | k == "y" && (u = k.toUpperCase() + u.substr(1)),
476 | (h = w),
477 | (E = m),
478 | h.test(u)
479 | ? (u = u.replace(h, "$1$2"))
480 | : E.test(u) && (u = u.replace(E, "$1$2")),
481 | (h = g),
482 | (E = T),
483 | h.test(u))
484 | ) {
485 | var b = h.exec(u);
486 | (h = f), h.test(b[1]) && ((h = L), (u = u.replace(h, "")));
487 | } else if (E.test(u)) {
488 | var b = E.exec(u);
489 | (y = b[1]),
490 | (E = x),
491 | E.test(y) &&
492 | ((u = y),
493 | (E = C),
494 | (Q = O),
495 | (H = j),
496 | E.test(u)
497 | ? (u = u + "e")
498 | : Q.test(u)
499 | ? ((h = L), (u = u.replace(h, "")))
500 | : H.test(u) && (u = u + "e"));
501 | }
502 | if (((h = N), h.test(u))) {
503 | var b = h.exec(u);
504 | (y = b[1]), (u = y + "i");
505 | }
506 | if (((h = q), h.test(u))) {
507 | var b = h.exec(u);
508 | (y = b[1]), (P = b[2]), (h = f), h.test(y) && (u = y + e[P]);
509 | }
510 | if (((h = W), h.test(u))) {
511 | var b = h.exec(u);
512 | (y = b[1]), (P = b[2]), (h = f), h.test(y) && (u = y + n[P]);
513 | }
514 | if (((h = B), (E = z), h.test(u))) {
515 | var b = h.exec(u);
516 | (y = b[1]), (h = p), h.test(y) && (u = y);
517 | } else if (E.test(u)) {
518 | var b = E.exec(u);
519 | (y = b[1] + b[2]), (E = p), E.test(y) && (u = y);
520 | }
521 | if (((h = _), h.test(u))) {
522 | var b = h.exec(u);
523 | (y = b[1]),
524 | (h = p),
525 | (E = v),
526 | (Q = J),
527 | (h.test(y) || (E.test(y) && !Q.test(y))) && (u = y);
528 | }
529 | return (
530 | (h = U),
531 | (E = p),
532 | h.test(u) && E.test(u) && ((h = L), (u = u.replace(h, ""))),
533 | k == "y" && (u = k.toLowerCase() + u.substr(1)),
534 | u
535 | );
536 | };
537 | return function (A) {
538 | return A.update(V);
539 | };
540 | })()),
541 | t.Pipeline.registerFunction(t.stemmer, "stemmer");
542 | (t.generateStopWordFilter = function (e) {
543 | var n = e.reduce(function (r, i) {
544 | return (r[i] = i), r;
545 | }, {});
546 | return function (r) {
547 | if (r && n[r.toString()] !== r.toString()) return r;
548 | };
549 | }),
550 | (t.stopWordFilter = t.generateStopWordFilter([
551 | "a",
552 | "able",
553 | "about",
554 | "across",
555 | "after",
556 | "all",
557 | "almost",
558 | "also",
559 | "am",
560 | "among",
561 | "an",
562 | "and",
563 | "any",
564 | "are",
565 | "as",
566 | "at",
567 | "be",
568 | "because",
569 | "been",
570 | "but",
571 | "by",
572 | "can",
573 | "cannot",
574 | "could",
575 | "dear",
576 | "did",
577 | "do",
578 | "does",
579 | "either",
580 | "else",
581 | "ever",
582 | "every",
583 | "for",
584 | "from",
585 | "get",
586 | "got",
587 | "had",
588 | "has",
589 | "have",
590 | "he",
591 | "her",
592 | "hers",
593 | "him",
594 | "his",
595 | "how",
596 | "however",
597 | "i",
598 | "if",
599 | "in",
600 | "into",
601 | "is",
602 | "it",
603 | "its",
604 | "just",
605 | "least",
606 | "let",
607 | "like",
608 | "likely",
609 | "may",
610 | "me",
611 | "might",
612 | "most",
613 | "must",
614 | "my",
615 | "neither",
616 | "no",
617 | "nor",
618 | "not",
619 | "of",
620 | "off",
621 | "often",
622 | "on",
623 | "only",
624 | "or",
625 | "other",
626 | "our",
627 | "own",
628 | "rather",
629 | "said",
630 | "say",
631 | "says",
632 | "she",
633 | "should",
634 | "since",
635 | "so",
636 | "some",
637 | "than",
638 | "that",
639 | "the",
640 | "their",
641 | "them",
642 | "then",
643 | "there",
644 | "these",
645 | "they",
646 | "this",
647 | "tis",
648 | "to",
649 | "too",
650 | "twas",
651 | "us",
652 | "wants",
653 | "was",
654 | "we",
655 | "were",
656 | "what",
657 | "when",
658 | "where",
659 | "which",
660 | "while",
661 | "who",
662 | "whom",
663 | "why",
664 | "will",
665 | "with",
666 | "would",
667 | "yet",
668 | "you",
669 | "your",
670 | ])),
671 | t.Pipeline.registerFunction(t.stopWordFilter, "stopWordFilter");
672 | (t.trimmer = function (e) {
673 | return e.update(function (n) {
674 | return n.replace(/^\W+/, "").replace(/\W+$/, "");
675 | });
676 | }),
677 | t.Pipeline.registerFunction(t.trimmer, "trimmer");
678 | (t.TokenSet = function () {
679 | (this.final = !1),
680 | (this.edges = {}),
681 | (this.id = t.TokenSet._nextId),
682 | (t.TokenSet._nextId += 1);
683 | }),
684 | (t.TokenSet._nextId = 1),
685 | (t.TokenSet.fromArray = function (e) {
686 | for (
687 | var n = new t.TokenSet.Builder(), r = 0, i = e.length;
688 | r < i;
689 | r++
690 | )
691 | n.insert(e[r]);
692 | return n.finish(), n.root;
693 | }),
694 | (t.TokenSet.fromClause = function (e) {
695 | return "editDistance" in e
696 | ? t.TokenSet.fromFuzzyString(e.term, e.editDistance)
697 | : t.TokenSet.fromString(e.term);
698 | }),
699 | (t.TokenSet.fromFuzzyString = function (e, n) {
700 | for (
701 | var r = new t.TokenSet(),
702 | i = [{ node: r, editsRemaining: n, str: e }];
703 | i.length;
704 |
705 | ) {
706 | var s = i.pop();
707 | if (s.str.length > 0) {
708 | var o = s.str.charAt(0),
709 | a;
710 | o in s.node.edges
711 | ? (a = s.node.edges[o])
712 | : ((a = new t.TokenSet()), (s.node.edges[o] = a)),
713 | s.str.length == 1 && (a.final = !0),
714 | i.push({
715 | node: a,
716 | editsRemaining: s.editsRemaining,
717 | str: s.str.slice(1),
718 | });
719 | }
720 | if (s.editsRemaining != 0) {
721 | if ("*" in s.node.edges) var c = s.node.edges["*"];
722 | else {
723 | var c = new t.TokenSet();
724 | s.node.edges["*"] = c;
725 | }
726 | if (
727 | (s.str.length == 0 && (c.final = !0),
728 | i.push({
729 | node: c,
730 | editsRemaining: s.editsRemaining - 1,
731 | str: s.str,
732 | }),
733 | s.str.length > 1 &&
734 | i.push({
735 | node: s.node,
736 | editsRemaining: s.editsRemaining - 1,
737 | str: s.str.slice(1),
738 | }),
739 | s.str.length == 1 && (s.node.final = !0),
740 | s.str.length >= 1)
741 | ) {
742 | if ("*" in s.node.edges) var l = s.node.edges["*"];
743 | else {
744 | var l = new t.TokenSet();
745 | s.node.edges["*"] = l;
746 | }
747 | s.str.length == 1 && (l.final = !0),
748 | i.push({
749 | node: l,
750 | editsRemaining: s.editsRemaining - 1,
751 | str: s.str.slice(1),
752 | });
753 | }
754 | if (s.str.length > 1) {
755 | var d = s.str.charAt(0),
756 | f = s.str.charAt(1),
757 | p;
758 | f in s.node.edges
759 | ? (p = s.node.edges[f])
760 | : ((p = new t.TokenSet()), (s.node.edges[f] = p)),
761 | s.str.length == 1 && (p.final = !0),
762 | i.push({
763 | node: p,
764 | editsRemaining: s.editsRemaining - 1,
765 | str: d + s.str.slice(2),
766 | });
767 | }
768 | }
769 | }
770 | return r;
771 | }),
772 | (t.TokenSet.fromString = function (e) {
773 | for (
774 | var n = new t.TokenSet(), r = n, i = 0, s = e.length;
775 | i < s;
776 | i++
777 | ) {
778 | var o = e[i],
779 | a = i == s - 1;
780 | if (o == "*") (n.edges[o] = n), (n.final = a);
781 | else {
782 | var c = new t.TokenSet();
783 | (c.final = a), (n.edges[o] = c), (n = c);
784 | }
785 | }
786 | return r;
787 | }),
788 | (t.TokenSet.prototype.toArray = function () {
789 | for (var e = [], n = [{ prefix: "", node: this }]; n.length; ) {
790 | var r = n.pop(),
791 | i = Object.keys(r.node.edges),
792 | s = i.length;
793 | r.node.final && (r.prefix.charAt(0), e.push(r.prefix));
794 | for (var o = 0; o < s; o++) {
795 | var a = i[o];
796 | n.push({ prefix: r.prefix.concat(a), node: r.node.edges[a] });
797 | }
798 | }
799 | return e;
800 | }),
801 | (t.TokenSet.prototype.toString = function () {
802 | if (this._str) return this._str;
803 | for (
804 | var e = this.final ? "1" : "0",
805 | n = Object.keys(this.edges).sort(),
806 | r = n.length,
807 | i = 0;
808 | i < r;
809 | i++
810 | ) {
811 | var s = n[i],
812 | o = this.edges[s];
813 | e = e + s + o.id;
814 | }
815 | return e;
816 | }),
817 | (t.TokenSet.prototype.intersect = function (e) {
818 | for (
819 | var n = new t.TokenSet(),
820 | r = void 0,
821 | i = [{ qNode: e, output: n, node: this }];
822 | i.length;
823 |
824 | ) {
825 | r = i.pop();
826 | for (
827 | var s = Object.keys(r.qNode.edges),
828 | o = s.length,
829 | a = Object.keys(r.node.edges),
830 | c = a.length,
831 | l = 0;
832 | l < o;
833 | l++
834 | )
835 | for (var d = s[l], f = 0; f < c; f++) {
836 | var p = a[f];
837 | if (p == d || d == "*") {
838 | var v = r.node.edges[p],
839 | x = r.qNode.edges[d],
840 | w = v.final && x.final,
841 | m = void 0;
842 | p in r.output.edges
843 | ? ((m = r.output.edges[p]), (m.final = m.final || w))
844 | : ((m = new t.TokenSet()),
845 | (m.final = w),
846 | (r.output.edges[p] = m)),
847 | i.push({ qNode: x, output: m, node: v });
848 | }
849 | }
850 | }
851 | return n;
852 | }),
853 | (t.TokenSet.Builder = function () {
854 | (this.previousWord = ""),
855 | (this.root = new t.TokenSet()),
856 | (this.uncheckedNodes = []),
857 | (this.minimizedNodes = {});
858 | }),
859 | (t.TokenSet.Builder.prototype.insert = function (e) {
860 | var n,
861 | r = 0;
862 | if (e < this.previousWord)
863 | throw new Error("Out of order word insertion");
864 | for (
865 | var i = 0;
866 | i < e.length &&
867 | i < this.previousWord.length &&
868 | e[i] == this.previousWord[i];
869 | i++
870 | )
871 | r++;
872 | this.minimize(r),
873 | this.uncheckedNodes.length == 0
874 | ? (n = this.root)
875 | : (n = this.uncheckedNodes[this.uncheckedNodes.length - 1].child);
876 | for (var i = r; i < e.length; i++) {
877 | var s = new t.TokenSet(),
878 | o = e[i];
879 | (n.edges[o] = s),
880 | this.uncheckedNodes.push({ parent: n, char: o, child: s }),
881 | (n = s);
882 | }
883 | (n.final = !0), (this.previousWord = e);
884 | }),
885 | (t.TokenSet.Builder.prototype.finish = function () {
886 | this.minimize(0);
887 | }),
888 | (t.TokenSet.Builder.prototype.minimize = function (e) {
889 | for (var n = this.uncheckedNodes.length - 1; n >= e; n--) {
890 | var r = this.uncheckedNodes[n],
891 | i = r.child.toString();
892 | i in this.minimizedNodes
893 | ? (r.parent.edges[r.char] = this.minimizedNodes[i])
894 | : ((r.child._str = i), (this.minimizedNodes[i] = r.child)),
895 | this.uncheckedNodes.pop();
896 | }
897 | });
898 | (t.Index = function (e) {
899 | (this.invertedIndex = e.invertedIndex),
900 | (this.fieldVectors = e.fieldVectors),
901 | (this.tokenSet = e.tokenSet),
902 | (this.fields = e.fields),
903 | (this.pipeline = e.pipeline);
904 | }),
905 | (t.Index.prototype.search = function (e) {
906 | return this.query(function (n) {
907 | var r = new t.QueryParser(e, n);
908 | r.parse();
909 | });
910 | }),
911 | (t.Index.prototype.query = function (e) {
912 | for (
913 | var n = new t.Query(this.fields),
914 | r = Object.create(null),
915 | i = Object.create(null),
916 | s = Object.create(null),
917 | o = Object.create(null),
918 | a = Object.create(null),
919 | c = 0;
920 | c < this.fields.length;
921 | c++
922 | )
923 | i[this.fields[c]] = new t.Vector();
924 | e.call(n, n);
925 | for (var c = 0; c < n.clauses.length; c++) {
926 | var l = n.clauses[c],
927 | d = null,
928 | f = t.Set.empty;
929 | l.usePipeline
930 | ? (d = this.pipeline.runString(l.term, { fields: l.fields }))
931 | : (d = [l.term]);
932 | for (var p = 0; p < d.length; p++) {
933 | var v = d[p];
934 | l.term = v;
935 | var x = t.TokenSet.fromClause(l),
936 | w = this.tokenSet.intersect(x).toArray();
937 | if (w.length === 0 && l.presence === t.Query.presence.REQUIRED) {
938 | for (var m = 0; m < l.fields.length; m++) {
939 | var g = l.fields[m];
940 | o[g] = t.Set.empty;
941 | }
942 | break;
943 | }
944 | for (var T = 0; T < w.length; T++)
945 | for (
946 | var L = w[T], C = this.invertedIndex[L], O = C._index, m = 0;
947 | m < l.fields.length;
948 | m++
949 | ) {
950 | var g = l.fields[m],
951 | j = C[g],
952 | N = Object.keys(j),
953 | q = L + "/" + g,
954 | W = new t.Set(N);
955 | if (
956 | (l.presence == t.Query.presence.REQUIRED &&
957 | ((f = f.union(W)),
958 | o[g] === void 0 && (o[g] = t.Set.complete)),
959 | l.presence == t.Query.presence.PROHIBITED)
960 | ) {
961 | a[g] === void 0 && (a[g] = t.Set.empty),
962 | (a[g] = a[g].union(W));
963 | continue;
964 | }
965 | if (
966 | (i[g].upsert(O, l.boost, function (Ue, Je) {
967 | return Ue + Je;
968 | }),
969 | !s[q])
970 | ) {
971 | for (var B = 0; B < N.length; B++) {
972 | var z = N[B],
973 | _ = new t.FieldRef(z, g),
974 | U = j[z],
975 | J;
976 | (J = r[_]) === void 0
977 | ? (r[_] = new t.MatchData(L, g, U))
978 | : J.add(L, g, U);
979 | }
980 | s[q] = !0;
981 | }
982 | }
983 | }
984 | if (l.presence === t.Query.presence.REQUIRED)
985 | for (var m = 0; m < l.fields.length; m++) {
986 | var g = l.fields[m];
987 | o[g] = o[g].intersect(f);
988 | }
989 | }
990 | for (
991 | var V = t.Set.complete, A = t.Set.empty, c = 0;
992 | c < this.fields.length;
993 | c++
994 | ) {
995 | var g = this.fields[c];
996 | o[g] && (V = V.intersect(o[g])), a[g] && (A = A.union(a[g]));
997 | }
998 | var u = Object.keys(r),
999 | y = [],
1000 | P = Object.create(null);
1001 | if (n.isNegated()) {
1002 | u = Object.keys(this.fieldVectors);
1003 | for (var c = 0; c < u.length; c++) {
1004 | var _ = u[c],
1005 | k = t.FieldRef.fromString(_);
1006 | r[_] = new t.MatchData();
1007 | }
1008 | }
1009 | for (var c = 0; c < u.length; c++) {
1010 | var k = t.FieldRef.fromString(u[c]),
1011 | h = k.docRef;
1012 | if (V.contains(h) && !A.contains(h)) {
1013 | var E = this.fieldVectors[k],
1014 | Q = i[k.fieldName].similarity(E),
1015 | H;
1016 | if ((H = P[h]) !== void 0)
1017 | (H.score += Q), H.matchData.combine(r[k]);
1018 | else {
1019 | var b = { ref: h, score: Q, matchData: r[k] };
1020 | (P[h] = b), y.push(b);
1021 | }
1022 | }
1023 | }
1024 | return y.sort(function (We, ze) {
1025 | return ze.score - We.score;
1026 | });
1027 | }),
1028 | (t.Index.prototype.toJSON = function () {
1029 | var e = Object.keys(this.invertedIndex)
1030 | .sort()
1031 | .map(function (r) {
1032 | return [r, this.invertedIndex[r]];
1033 | }, this),
1034 | n = Object.keys(this.fieldVectors).map(function (r) {
1035 | return [r, this.fieldVectors[r].toJSON()];
1036 | }, this);
1037 | return {
1038 | version: t.version,
1039 | fields: this.fields,
1040 | fieldVectors: n,
1041 | invertedIndex: e,
1042 | pipeline: this.pipeline.toJSON(),
1043 | };
1044 | }),
1045 | (t.Index.load = function (e) {
1046 | var n = {},
1047 | r = {},
1048 | i = e.fieldVectors,
1049 | s = Object.create(null),
1050 | o = e.invertedIndex,
1051 | a = new t.TokenSet.Builder(),
1052 | c = t.Pipeline.load(e.pipeline);
1053 | e.version != t.version &&
1054 | t.utils.warn(
1055 | "Version mismatch when loading serialised index. Current version of lunr '" +
1056 | t.version +
1057 | "' does not match serialized index '" +
1058 | e.version +
1059 | "'",
1060 | );
1061 | for (var l = 0; l < i.length; l++) {
1062 | var d = i[l],
1063 | f = d[0],
1064 | p = d[1];
1065 | r[f] = new t.Vector(p);
1066 | }
1067 | for (var l = 0; l < o.length; l++) {
1068 | var d = o[l],
1069 | v = d[0],
1070 | x = d[1];
1071 | a.insert(v), (s[v] = x);
1072 | }
1073 | return (
1074 | a.finish(),
1075 | (n.fields = e.fields),
1076 | (n.fieldVectors = r),
1077 | (n.invertedIndex = s),
1078 | (n.tokenSet = a.root),
1079 | (n.pipeline = c),
1080 | new t.Index(n)
1081 | );
1082 | });
1083 | (t.Builder = function () {
1084 | (this._ref = "id"),
1085 | (this._fields = Object.create(null)),
1086 | (this._documents = Object.create(null)),
1087 | (this.invertedIndex = Object.create(null)),
1088 | (this.fieldTermFrequencies = {}),
1089 | (this.fieldLengths = {}),
1090 | (this.tokenizer = t.tokenizer),
1091 | (this.pipeline = new t.Pipeline()),
1092 | (this.searchPipeline = new t.Pipeline()),
1093 | (this.documentCount = 0),
1094 | (this._b = 0.75),
1095 | (this._k1 = 1.2),
1096 | (this.termIndex = 0),
1097 | (this.metadataWhitelist = []);
1098 | }),
1099 | (t.Builder.prototype.ref = function (e) {
1100 | this._ref = e;
1101 | }),
1102 | (t.Builder.prototype.field = function (e, n) {
1103 | if (/\//.test(e))
1104 | throw new RangeError(
1105 | "Field '" + e + "' contains illegal character '/'",
1106 | );
1107 | this._fields[e] = n || {};
1108 | }),
1109 | (t.Builder.prototype.b = function (e) {
1110 | e < 0 ? (this._b = 0) : e > 1 ? (this._b = 1) : (this._b = e);
1111 | }),
1112 | (t.Builder.prototype.k1 = function (e) {
1113 | this._k1 = e;
1114 | }),
1115 | (t.Builder.prototype.add = function (e, n) {
1116 | var r = e[this._ref],
1117 | i = Object.keys(this._fields);
1118 | (this._documents[r] = n || {}), (this.documentCount += 1);
1119 | for (var s = 0; s < i.length; s++) {
1120 | var o = i[s],
1121 | a = this._fields[o].extractor,
1122 | c = a ? a(e) : e[o],
1123 | l = this.tokenizer(c, { fields: [o] }),
1124 | d = this.pipeline.run(l),
1125 | f = new t.FieldRef(r, o),
1126 | p = Object.create(null);
1127 | (this.fieldTermFrequencies[f] = p),
1128 | (this.fieldLengths[f] = 0),
1129 | (this.fieldLengths[f] += d.length);
1130 | for (var v = 0; v < d.length; v++) {
1131 | var x = d[v];
1132 | if (
1133 | (p[x] == null && (p[x] = 0),
1134 | (p[x] += 1),
1135 | this.invertedIndex[x] == null)
1136 | ) {
1137 | var w = Object.create(null);
1138 | (w._index = this.termIndex), (this.termIndex += 1);
1139 | for (var m = 0; m < i.length; m++)
1140 | w[i[m]] = Object.create(null);
1141 | this.invertedIndex[x] = w;
1142 | }
1143 | this.invertedIndex[x][o][r] == null &&
1144 | (this.invertedIndex[x][o][r] = Object.create(null));
1145 | for (var g = 0; g < this.metadataWhitelist.length; g++) {
1146 | var T = this.metadataWhitelist[g],
1147 | L = x.metadata[T];
1148 | this.invertedIndex[x][o][r][T] == null &&
1149 | (this.invertedIndex[x][o][r][T] = []),
1150 | this.invertedIndex[x][o][r][T].push(L);
1151 | }
1152 | }
1153 | }
1154 | }),
1155 | (t.Builder.prototype.calculateAverageFieldLengths = function () {
1156 | for (
1157 | var e = Object.keys(this.fieldLengths),
1158 | n = e.length,
1159 | r = {},
1160 | i = {},
1161 | s = 0;
1162 | s < n;
1163 | s++
1164 | ) {
1165 | var o = t.FieldRef.fromString(e[s]),
1166 | a = o.fieldName;
1167 | i[a] || (i[a] = 0),
1168 | (i[a] += 1),
1169 | r[a] || (r[a] = 0),
1170 | (r[a] += this.fieldLengths[o]);
1171 | }
1172 | for (var c = Object.keys(this._fields), s = 0; s < c.length; s++) {
1173 | var l = c[s];
1174 | r[l] = r[l] / i[l];
1175 | }
1176 | this.averageFieldLength = r;
1177 | }),
1178 | (t.Builder.prototype.createFieldVectors = function () {
1179 | for (
1180 | var e = {},
1181 | n = Object.keys(this.fieldTermFrequencies),
1182 | r = n.length,
1183 | i = Object.create(null),
1184 | s = 0;
1185 | s < r;
1186 | s++
1187 | ) {
1188 | for (
1189 | var o = t.FieldRef.fromString(n[s]),
1190 | a = o.fieldName,
1191 | c = this.fieldLengths[o],
1192 | l = new t.Vector(),
1193 | d = this.fieldTermFrequencies[o],
1194 | f = Object.keys(d),
1195 | p = f.length,
1196 | v = this._fields[a].boost || 1,
1197 | x = this._documents[o.docRef].boost || 1,
1198 | w = 0;
1199 | w < p;
1200 | w++
1201 | ) {
1202 | var m = f[w],
1203 | g = d[m],
1204 | T = this.invertedIndex[m]._index,
1205 | L,
1206 | C,
1207 | O;
1208 | i[m] === void 0
1209 | ? ((L = t.idf(this.invertedIndex[m], this.documentCount)),
1210 | (i[m] = L))
1211 | : (L = i[m]),
1212 | (C =
1213 | (L * ((this._k1 + 1) * g)) /
1214 | (this._k1 *
1215 | (1 - this._b + this._b * (c / this.averageFieldLength[a])) +
1216 | g)),
1217 | (C *= v),
1218 | (C *= x),
1219 | (O = Math.round(C * 1e3) / 1e3),
1220 | l.insert(T, O);
1221 | }
1222 | e[o] = l;
1223 | }
1224 | this.fieldVectors = e;
1225 | }),
1226 | (t.Builder.prototype.createTokenSet = function () {
1227 | this.tokenSet = t.TokenSet.fromArray(
1228 | Object.keys(this.invertedIndex).sort(),
1229 | );
1230 | }),
1231 | (t.Builder.prototype.build = function () {
1232 | return (
1233 | this.calculateAverageFieldLengths(),
1234 | this.createFieldVectors(),
1235 | this.createTokenSet(),
1236 | new t.Index({
1237 | invertedIndex: this.invertedIndex,
1238 | fieldVectors: this.fieldVectors,
1239 | tokenSet: this.tokenSet,
1240 | fields: Object.keys(this._fields),
1241 | pipeline: this.searchPipeline,
1242 | })
1243 | );
1244 | }),
1245 | (t.Builder.prototype.use = function (e) {
1246 | var n = Array.prototype.slice.call(arguments, 1);
1247 | n.unshift(this), e.apply(this, n);
1248 | }),
1249 | (t.MatchData = function (e, n, r) {
1250 | for (
1251 | var i = Object.create(null), s = Object.keys(r || {}), o = 0;
1252 | o < s.length;
1253 | o++
1254 | ) {
1255 | var a = s[o];
1256 | i[a] = r[a].slice();
1257 | }
1258 | (this.metadata = Object.create(null)),
1259 | e !== void 0 &&
1260 | ((this.metadata[e] = Object.create(null)),
1261 | (this.metadata[e][n] = i));
1262 | }),
1263 | (t.MatchData.prototype.combine = function (e) {
1264 | for (var n = Object.keys(e.metadata), r = 0; r < n.length; r++) {
1265 | var i = n[r],
1266 | s = Object.keys(e.metadata[i]);
1267 | this.metadata[i] == null &&
1268 | (this.metadata[i] = Object.create(null));
1269 | for (var o = 0; o < s.length; o++) {
1270 | var a = s[o],
1271 | c = Object.keys(e.metadata[i][a]);
1272 | this.metadata[i][a] == null &&
1273 | (this.metadata[i][a] = Object.create(null));
1274 | for (var l = 0; l < c.length; l++) {
1275 | var d = c[l];
1276 | this.metadata[i][a][d] == null
1277 | ? (this.metadata[i][a][d] = e.metadata[i][a][d])
1278 | : (this.metadata[i][a][d] = this.metadata[i][a][d].concat(
1279 | e.metadata[i][a][d],
1280 | ));
1281 | }
1282 | }
1283 | }
1284 | }),
1285 | (t.MatchData.prototype.add = function (e, n, r) {
1286 | if (!(e in this.metadata)) {
1287 | (this.metadata[e] = Object.create(null)), (this.metadata[e][n] = r);
1288 | return;
1289 | }
1290 | if (!(n in this.metadata[e])) {
1291 | this.metadata[e][n] = r;
1292 | return;
1293 | }
1294 | for (var i = Object.keys(r), s = 0; s < i.length; s++) {
1295 | var o = i[s];
1296 | o in this.metadata[e][n]
1297 | ? (this.metadata[e][n][o] = this.metadata[e][n][o].concat(r[o]))
1298 | : (this.metadata[e][n][o] = r[o]);
1299 | }
1300 | }),
1301 | (t.Query = function (e) {
1302 | (this.clauses = []), (this.allFields = e);
1303 | }),
1304 | (t.Query.wildcard = new String("*")),
1305 | (t.Query.wildcard.NONE = 0),
1306 | (t.Query.wildcard.LEADING = 1),
1307 | (t.Query.wildcard.TRAILING = 2),
1308 | (t.Query.presence = { OPTIONAL: 1, REQUIRED: 2, PROHIBITED: 3 }),
1309 | (t.Query.prototype.clause = function (e) {
1310 | return (
1311 | "fields" in e || (e.fields = this.allFields),
1312 | "boost" in e || (e.boost = 1),
1313 | "usePipeline" in e || (e.usePipeline = !0),
1314 | "wildcard" in e || (e.wildcard = t.Query.wildcard.NONE),
1315 | e.wildcard & t.Query.wildcard.LEADING &&
1316 | e.term.charAt(0) != t.Query.wildcard &&
1317 | (e.term = "*" + e.term),
1318 | e.wildcard & t.Query.wildcard.TRAILING &&
1319 | e.term.slice(-1) != t.Query.wildcard &&
1320 | (e.term = "" + e.term + "*"),
1321 | "presence" in e || (e.presence = t.Query.presence.OPTIONAL),
1322 | this.clauses.push(e),
1323 | this
1324 | );
1325 | }),
1326 | (t.Query.prototype.isNegated = function () {
1327 | for (var e = 0; e < this.clauses.length; e++)
1328 | if (this.clauses[e].presence != t.Query.presence.PROHIBITED)
1329 | return !1;
1330 | return !0;
1331 | }),
1332 | (t.Query.prototype.term = function (e, n) {
1333 | if (Array.isArray(e))
1334 | return (
1335 | e.forEach(function (i) {
1336 | this.term(i, t.utils.clone(n));
1337 | }, this),
1338 | this
1339 | );
1340 | var r = n || {};
1341 | return (r.term = e.toString()), this.clause(r), this;
1342 | }),
1343 | (t.QueryParseError = function (e, n, r) {
1344 | (this.name = "QueryParseError"),
1345 | (this.message = e),
1346 | (this.start = n),
1347 | (this.end = r);
1348 | }),
1349 | (t.QueryParseError.prototype = new Error()),
1350 | (t.QueryLexer = function (e) {
1351 | (this.lexemes = []),
1352 | (this.str = e),
1353 | (this.length = e.length),
1354 | (this.pos = 0),
1355 | (this.start = 0),
1356 | (this.escapeCharPositions = []);
1357 | }),
1358 | (t.QueryLexer.prototype.run = function () {
1359 | for (var e = t.QueryLexer.lexText; e; ) e = e(this);
1360 | }),
1361 | (t.QueryLexer.prototype.sliceString = function () {
1362 | for (
1363 | var e = [], n = this.start, r = this.pos, i = 0;
1364 | i < this.escapeCharPositions.length;
1365 | i++
1366 | )
1367 | (r = this.escapeCharPositions[i]),
1368 | e.push(this.str.slice(n, r)),
1369 | (n = r + 1);
1370 | return (
1371 | e.push(this.str.slice(n, this.pos)),
1372 | (this.escapeCharPositions.length = 0),
1373 | e.join("")
1374 | );
1375 | }),
1376 | (t.QueryLexer.prototype.emit = function (e) {
1377 | this.lexemes.push({
1378 | type: e,
1379 | str: this.sliceString(),
1380 | start: this.start,
1381 | end: this.pos,
1382 | }),
1383 | (this.start = this.pos);
1384 | }),
1385 | (t.QueryLexer.prototype.escapeCharacter = function () {
1386 | this.escapeCharPositions.push(this.pos - 1), (this.pos += 1);
1387 | }),
1388 | (t.QueryLexer.prototype.next = function () {
1389 | if (this.pos >= this.length) return t.QueryLexer.EOS;
1390 | var e = this.str.charAt(this.pos);
1391 | return (this.pos += 1), e;
1392 | }),
1393 | (t.QueryLexer.prototype.width = function () {
1394 | return this.pos - this.start;
1395 | }),
1396 | (t.QueryLexer.prototype.ignore = function () {
1397 | this.start == this.pos && (this.pos += 1), (this.start = this.pos);
1398 | }),
1399 | (t.QueryLexer.prototype.backup = function () {
1400 | this.pos -= 1;
1401 | }),
1402 | (t.QueryLexer.prototype.acceptDigitRun = function () {
1403 | var e, n;
1404 | do (e = this.next()), (n = e.charCodeAt(0));
1405 | while (n > 47 && n < 58);
1406 | e != t.QueryLexer.EOS && this.backup();
1407 | }),
1408 | (t.QueryLexer.prototype.more = function () {
1409 | return this.pos < this.length;
1410 | }),
1411 | (t.QueryLexer.EOS = "EOS"),
1412 | (t.QueryLexer.FIELD = "FIELD"),
1413 | (t.QueryLexer.TERM = "TERM"),
1414 | (t.QueryLexer.EDIT_DISTANCE = "EDIT_DISTANCE"),
1415 | (t.QueryLexer.BOOST = "BOOST"),
1416 | (t.QueryLexer.PRESENCE = "PRESENCE"),
1417 | (t.QueryLexer.lexField = function (e) {
1418 | return (
1419 | e.backup(),
1420 | e.emit(t.QueryLexer.FIELD),
1421 | e.ignore(),
1422 | t.QueryLexer.lexText
1423 | );
1424 | }),
1425 | (t.QueryLexer.lexTerm = function (e) {
1426 | if (
1427 | (e.width() > 1 && (e.backup(), e.emit(t.QueryLexer.TERM)),
1428 | e.ignore(),
1429 | e.more())
1430 | )
1431 | return t.QueryLexer.lexText;
1432 | }),
1433 | (t.QueryLexer.lexEditDistance = function (e) {
1434 | return (
1435 | e.ignore(),
1436 | e.acceptDigitRun(),
1437 | e.emit(t.QueryLexer.EDIT_DISTANCE),
1438 | t.QueryLexer.lexText
1439 | );
1440 | }),
1441 | (t.QueryLexer.lexBoost = function (e) {
1442 | return (
1443 | e.ignore(),
1444 | e.acceptDigitRun(),
1445 | e.emit(t.QueryLexer.BOOST),
1446 | t.QueryLexer.lexText
1447 | );
1448 | }),
1449 | (t.QueryLexer.lexEOS = function (e) {
1450 | e.width() > 0 && e.emit(t.QueryLexer.TERM);
1451 | }),
1452 | (t.QueryLexer.termSeparator = t.tokenizer.separator),
1453 | (t.QueryLexer.lexText = function (e) {
1454 | for (;;) {
1455 | var n = e.next();
1456 | if (n == t.QueryLexer.EOS) return t.QueryLexer.lexEOS;
1457 | if (n.charCodeAt(0) == 92) {
1458 | e.escapeCharacter();
1459 | continue;
1460 | }
1461 | if (n == ":") return t.QueryLexer.lexField;
1462 | if (n == "~")
1463 | return (
1464 | e.backup(),
1465 | e.width() > 0 && e.emit(t.QueryLexer.TERM),
1466 | t.QueryLexer.lexEditDistance
1467 | );
1468 | if (n == "^")
1469 | return (
1470 | e.backup(),
1471 | e.width() > 0 && e.emit(t.QueryLexer.TERM),
1472 | t.QueryLexer.lexBoost
1473 | );
1474 | if ((n == "+" && e.width() === 1) || (n == "-" && e.width() === 1))
1475 | return e.emit(t.QueryLexer.PRESENCE), t.QueryLexer.lexText;
1476 | if (n.match(t.QueryLexer.termSeparator))
1477 | return t.QueryLexer.lexTerm;
1478 | }
1479 | }),
1480 | (t.QueryParser = function (e, n) {
1481 | (this.lexer = new t.QueryLexer(e)),
1482 | (this.query = n),
1483 | (this.currentClause = {}),
1484 | (this.lexemeIdx = 0);
1485 | }),
1486 | (t.QueryParser.prototype.parse = function () {
1487 | this.lexer.run(), (this.lexemes = this.lexer.lexemes);
1488 | for (var e = t.QueryParser.parseClause; e; ) e = e(this);
1489 | return this.query;
1490 | }),
1491 | (t.QueryParser.prototype.peekLexeme = function () {
1492 | return this.lexemes[this.lexemeIdx];
1493 | }),
1494 | (t.QueryParser.prototype.consumeLexeme = function () {
1495 | var e = this.peekLexeme();
1496 | return (this.lexemeIdx += 1), e;
1497 | }),
1498 | (t.QueryParser.prototype.nextClause = function () {
1499 | var e = this.currentClause;
1500 | this.query.clause(e), (this.currentClause = {});
1501 | }),
1502 | (t.QueryParser.parseClause = function (e) {
1503 | var n = e.peekLexeme();
1504 | if (n != null)
1505 | switch (n.type) {
1506 | case t.QueryLexer.PRESENCE:
1507 | return t.QueryParser.parsePresence;
1508 | case t.QueryLexer.FIELD:
1509 | return t.QueryParser.parseField;
1510 | case t.QueryLexer.TERM:
1511 | return t.QueryParser.parseTerm;
1512 | default:
1513 | var r = "expected either a field or a term, found " + n.type;
1514 | throw (
1515 | (n.str.length >= 1 && (r += " with value '" + n.str + "'"),
1516 | new t.QueryParseError(r, n.start, n.end))
1517 | );
1518 | }
1519 | }),
1520 | (t.QueryParser.parsePresence = function (e) {
1521 | var n = e.consumeLexeme();
1522 | if (n != null) {
1523 | switch (n.str) {
1524 | case "-":
1525 | e.currentClause.presence = t.Query.presence.PROHIBITED;
1526 | break;
1527 | case "+":
1528 | e.currentClause.presence = t.Query.presence.REQUIRED;
1529 | break;
1530 | default:
1531 | var r = "unrecognised presence operator'" + n.str + "'";
1532 | throw new t.QueryParseError(r, n.start, n.end);
1533 | }
1534 | var i = e.peekLexeme();
1535 | if (i == null) {
1536 | var r = "expecting term or field, found nothing";
1537 | throw new t.QueryParseError(r, n.start, n.end);
1538 | }
1539 | switch (i.type) {
1540 | case t.QueryLexer.FIELD:
1541 | return t.QueryParser.parseField;
1542 | case t.QueryLexer.TERM:
1543 | return t.QueryParser.parseTerm;
1544 | default:
1545 | var r = "expecting term or field, found '" + i.type + "'";
1546 | throw new t.QueryParseError(r, i.start, i.end);
1547 | }
1548 | }
1549 | }),
1550 | (t.QueryParser.parseField = function (e) {
1551 | var n = e.consumeLexeme();
1552 | if (n != null) {
1553 | if (e.query.allFields.indexOf(n.str) == -1) {
1554 | var r = e.query.allFields
1555 | .map(function (o) {
1556 | return "'" + o + "'";
1557 | })
1558 | .join(", "),
1559 | i = "unrecognised field '" + n.str + "', possible fields: " + r;
1560 | throw new t.QueryParseError(i, n.start, n.end);
1561 | }
1562 | e.currentClause.fields = [n.str];
1563 | var s = e.peekLexeme();
1564 | if (s == null) {
1565 | var i = "expecting term, found nothing";
1566 | throw new t.QueryParseError(i, n.start, n.end);
1567 | }
1568 | switch (s.type) {
1569 | case t.QueryLexer.TERM:
1570 | return t.QueryParser.parseTerm;
1571 | default:
1572 | var i = "expecting term, found '" + s.type + "'";
1573 | throw new t.QueryParseError(i, s.start, s.end);
1574 | }
1575 | }
1576 | }),
1577 | (t.QueryParser.parseTerm = function (e) {
1578 | var n = e.consumeLexeme();
1579 | if (n != null) {
1580 | (e.currentClause.term = n.str.toLowerCase()),
1581 | n.str.indexOf("*") != -1 && (e.currentClause.usePipeline = !1);
1582 | var r = e.peekLexeme();
1583 | if (r == null) {
1584 | e.nextClause();
1585 | return;
1586 | }
1587 | switch (r.type) {
1588 | case t.QueryLexer.TERM:
1589 | return e.nextClause(), t.QueryParser.parseTerm;
1590 | case t.QueryLexer.FIELD:
1591 | return e.nextClause(), t.QueryParser.parseField;
1592 | case t.QueryLexer.EDIT_DISTANCE:
1593 | return t.QueryParser.parseEditDistance;
1594 | case t.QueryLexer.BOOST:
1595 | return t.QueryParser.parseBoost;
1596 | case t.QueryLexer.PRESENCE:
1597 | return e.nextClause(), t.QueryParser.parsePresence;
1598 | default:
1599 | var i = "Unexpected lexeme type '" + r.type + "'";
1600 | throw new t.QueryParseError(i, r.start, r.end);
1601 | }
1602 | }
1603 | }),
1604 | (t.QueryParser.parseEditDistance = function (e) {
1605 | var n = e.consumeLexeme();
1606 | if (n != null) {
1607 | var r = parseInt(n.str, 10);
1608 | if (isNaN(r)) {
1609 | var i = "edit distance must be numeric";
1610 | throw new t.QueryParseError(i, n.start, n.end);
1611 | }
1612 | e.currentClause.editDistance = r;
1613 | var s = e.peekLexeme();
1614 | if (s == null) {
1615 | e.nextClause();
1616 | return;
1617 | }
1618 | switch (s.type) {
1619 | case t.QueryLexer.TERM:
1620 | return e.nextClause(), t.QueryParser.parseTerm;
1621 | case t.QueryLexer.FIELD:
1622 | return e.nextClause(), t.QueryParser.parseField;
1623 | case t.QueryLexer.EDIT_DISTANCE:
1624 | return t.QueryParser.parseEditDistance;
1625 | case t.QueryLexer.BOOST:
1626 | return t.QueryParser.parseBoost;
1627 | case t.QueryLexer.PRESENCE:
1628 | return e.nextClause(), t.QueryParser.parsePresence;
1629 | default:
1630 | var i = "Unexpected lexeme type '" + s.type + "'";
1631 | throw new t.QueryParseError(i, s.start, s.end);
1632 | }
1633 | }
1634 | }),
1635 | (t.QueryParser.parseBoost = function (e) {
1636 | var n = e.consumeLexeme();
1637 | if (n != null) {
1638 | var r = parseInt(n.str, 10);
1639 | if (isNaN(r)) {
1640 | var i = "boost must be numeric";
1641 | throw new t.QueryParseError(i, n.start, n.end);
1642 | }
1643 | e.currentClause.boost = r;
1644 | var s = e.peekLexeme();
1645 | if (s == null) {
1646 | e.nextClause();
1647 | return;
1648 | }
1649 | switch (s.type) {
1650 | case t.QueryLexer.TERM:
1651 | return e.nextClause(), t.QueryParser.parseTerm;
1652 | case t.QueryLexer.FIELD:
1653 | return e.nextClause(), t.QueryParser.parseField;
1654 | case t.QueryLexer.EDIT_DISTANCE:
1655 | return t.QueryParser.parseEditDistance;
1656 | case t.QueryLexer.BOOST:
1657 | return t.QueryParser.parseBoost;
1658 | case t.QueryLexer.PRESENCE:
1659 | return e.nextClause(), t.QueryParser.parsePresence;
1660 | default:
1661 | var i = "Unexpected lexeme type '" + s.type + "'";
1662 | throw new t.QueryParseError(i, s.start, s.end);
1663 | }
1664 | }
1665 | }),
1666 | (function (e, n) {
1667 | typeof define == "function" && define.amd
1668 | ? define(n)
1669 | : typeof me == "object"
1670 | ? (ge.exports = n())
1671 | : (e.lunr = n());
1672 | })(this, function () {
1673 | return t;
1674 | });
1675 | })();
1676 | });
1677 | var M,
1678 | G = {
1679 | getItem() {
1680 | return null;
1681 | },
1682 | setItem() {},
1683 | },
1684 | K;
1685 | try {
1686 | (K = localStorage), (M = K);
1687 | } catch {
1688 | (K = G), (M = G);
1689 | }
1690 | var S = {
1691 | getItem: (t) => M.getItem(t),
1692 | setItem: (t, e) => M.setItem(t, e),
1693 | disableWritingLocalStorage() {
1694 | M = G;
1695 | },
1696 | disable() {
1697 | localStorage.clear(), (M = G);
1698 | },
1699 | enable() {
1700 | M = K;
1701 | },
1702 | };
1703 | window.TypeDoc ||= {
1704 | disableWritingLocalStorage() {
1705 | S.disableWritingLocalStorage();
1706 | },
1707 | disableLocalStorage: () => {
1708 | S.disable();
1709 | },
1710 | enableLocalStorage: () => {
1711 | S.enable();
1712 | },
1713 | };
1714 | window.translations ||= {
1715 | copy: "Copy",
1716 | copied: "Copied!",
1717 | normally_hidden:
1718 | "This member is normally hidden due to your filter settings.",
1719 | hierarchy_expand: "Expand",
1720 | hierarchy_collapse: "Collapse",
1721 | search_index_not_available: "The search index is not available",
1722 | search_no_results_found_for_0: "No results found for {0}",
1723 | folder: "Folder",
1724 | kind_1: "Project",
1725 | kind_2: "Module",
1726 | kind_4: "Namespace",
1727 | kind_8: "Enumeration",
1728 | kind_16: "Enumeration Member",
1729 | kind_32: "Variable",
1730 | kind_64: "Function",
1731 | kind_128: "Class",
1732 | kind_256: "Interface",
1733 | kind_512: "Constructor",
1734 | kind_1024: "Property",
1735 | kind_2048: "Method",
1736 | kind_4096: "Call Signature",
1737 | kind_8192: "Index Signature",
1738 | kind_16384: "Constructor Signature",
1739 | kind_32768: "Parameter",
1740 | kind_65536: "Type Literal",
1741 | kind_131072: "Type Parameter",
1742 | kind_262144: "Accessor",
1743 | kind_524288: "Get Signature",
1744 | kind_1048576: "Set Signature",
1745 | kind_2097152: "Type Alias",
1746 | kind_4194304: "Reference",
1747 | kind_8388608: "Document",
1748 | };
1749 | var pe = [];
1750 | function X(t, e) {
1751 | pe.push({ selector: e, constructor: t });
1752 | }
1753 | var Z = class {
1754 | alwaysVisibleMember = null;
1755 | constructor() {
1756 | this.createComponents(document.body),
1757 | this.ensureFocusedElementVisible(),
1758 | this.listenForCodeCopies(),
1759 | window.addEventListener("hashchange", () =>
1760 | this.ensureFocusedElementVisible(),
1761 | ),
1762 | document.body.style.display ||
1763 | (this.ensureFocusedElementVisible(),
1764 | this.updateIndexVisibility(),
1765 | this.scrollToHash());
1766 | }
1767 | createComponents(e) {
1768 | pe.forEach((n) => {
1769 | e.querySelectorAll(n.selector).forEach((r) => {
1770 | r.dataset.hasInstance ||
1771 | (new n.constructor({ el: r, app: this }),
1772 | (r.dataset.hasInstance = String(!0)));
1773 | });
1774 | });
1775 | }
1776 | filterChanged() {
1777 | this.ensureFocusedElementVisible();
1778 | }
1779 | showPage() {
1780 | document.body.style.display &&
1781 | (document.body.style.removeProperty("display"),
1782 | this.ensureFocusedElementVisible(),
1783 | this.updateIndexVisibility(),
1784 | this.scrollToHash());
1785 | }
1786 | scrollToHash() {
1787 | if (location.hash) {
1788 | let e = document.getElementById(location.hash.substring(1));
1789 | if (!e) return;
1790 | e.scrollIntoView({ behavior: "instant", block: "start" });
1791 | }
1792 | }
1793 | ensureActivePageVisible() {
1794 | let e = document.querySelector(".tsd-navigation .current"),
1795 | n = e?.parentElement;
1796 | for (; n && !n.classList.contains(".tsd-navigation"); )
1797 | n instanceof HTMLDetailsElement && (n.open = !0), (n = n.parentElement);
1798 | if (e && !rt(e)) {
1799 | let r =
1800 | e.getBoundingClientRect().top -
1801 | document.documentElement.clientHeight / 4;
1802 | (document.querySelector(".site-menu").scrollTop = r),
1803 | (document.querySelector(".col-sidebar").scrollTop = r);
1804 | }
1805 | }
1806 | updateIndexVisibility() {
1807 | let e = document.querySelector(".tsd-index-content"),
1808 | n = e?.open;
1809 | e && (e.open = !0),
1810 | document.querySelectorAll(".tsd-index-section").forEach((r) => {
1811 | r.style.display = "block";
1812 | let i = Array.from(r.querySelectorAll(".tsd-index-link")).every(
1813 | (s) => s.offsetParent == null,
1814 | );
1815 | r.style.display = i ? "none" : "block";
1816 | }),
1817 | e && (e.open = n);
1818 | }
1819 | ensureFocusedElementVisible() {
1820 | if (
1821 | (this.alwaysVisibleMember &&
1822 | (this.alwaysVisibleMember.classList.remove("always-visible"),
1823 | this.alwaysVisibleMember.firstElementChild.remove(),
1824 | (this.alwaysVisibleMember = null)),
1825 | !location.hash)
1826 | )
1827 | return;
1828 | let e = document.getElementById(location.hash.substring(1));
1829 | if (!e) return;
1830 | let n = e.parentElement;
1831 | for (; n && n.tagName !== "SECTION"; ) n = n.parentElement;
1832 | if (!n) return;
1833 | let r = n.offsetParent == null,
1834 | i = n;
1835 | for (; i !== document.body; )
1836 | i instanceof HTMLDetailsElement && (i.open = !0), (i = i.parentElement);
1837 | if (n.offsetParent == null) {
1838 | (this.alwaysVisibleMember = n), n.classList.add("always-visible");
1839 | let s = document.createElement("p");
1840 | s.classList.add("warning"),
1841 | (s.textContent = window.translations.normally_hidden),
1842 | n.prepend(s);
1843 | }
1844 | r && e.scrollIntoView();
1845 | }
1846 | listenForCodeCopies() {
1847 | document.querySelectorAll("pre > button").forEach((e) => {
1848 | let n;
1849 | e.addEventListener("click", () => {
1850 | e.previousElementSibling instanceof HTMLElement &&
1851 | navigator.clipboard.writeText(
1852 | e.previousElementSibling.innerText.trim(),
1853 | ),
1854 | (e.textContent = window.translations.copied),
1855 | e.classList.add("visible"),
1856 | clearTimeout(n),
1857 | (n = setTimeout(() => {
1858 | e.classList.remove("visible"),
1859 | (n = setTimeout(() => {
1860 | e.textContent = window.translations.copy;
1861 | }, 100));
1862 | }, 1e3));
1863 | });
1864 | });
1865 | }
1866 | };
1867 | function rt(t) {
1868 | let e = t.getBoundingClientRect(),
1869 | n = Math.max(document.documentElement.clientHeight, window.innerHeight);
1870 | return !(e.bottom < 0 || e.top - n >= 0);
1871 | }
1872 | var fe = (t, e = 100) => {
1873 | let n;
1874 | return () => {
1875 | clearTimeout(n), (n = setTimeout(() => t(), e));
1876 | };
1877 | };
1878 | var Ie = nt(ye(), 1);
1879 | async function R(t) {
1880 | let e = Uint8Array.from(atob(t), (s) => s.charCodeAt(0)),
1881 | r = new Blob([e])
1882 | .stream()
1883 | .pipeThrough(new DecompressionStream("deflate")),
1884 | i = await new Response(r).text();
1885 | return JSON.parse(i);
1886 | }
1887 | var Y = "closing",
1888 | ae = "tsd-overlay";
1889 | function it() {
1890 | let t = Math.abs(window.innerWidth - document.documentElement.clientWidth);
1891 | (document.body.style.overflow = "hidden"),
1892 | (document.body.style.paddingRight = `${t}px`);
1893 | }
1894 | function st() {
1895 | document.body.style.removeProperty("overflow"),
1896 | document.body.style.removeProperty("padding-right");
1897 | }
1898 | function xe(t, e) {
1899 | t.addEventListener("animationend", () => {
1900 | t.classList.contains(Y) &&
1901 | (t.classList.remove(Y),
1902 | document.getElementById(ae)?.remove(),
1903 | t.close(),
1904 | st());
1905 | }),
1906 | t.addEventListener("cancel", (n) => {
1907 | n.preventDefault(), ve(t);
1908 | }),
1909 | e?.closeOnClick &&
1910 | document.addEventListener(
1911 | "click",
1912 | (n) => {
1913 | t.open && !t.contains(n.target) && ve(t);
1914 | },
1915 | !0,
1916 | );
1917 | }
1918 | function Ee(t) {
1919 | if (t.open) return;
1920 | let e = document.createElement("div");
1921 | (e.id = ae), document.body.appendChild(e), t.showModal(), it();
1922 | }
1923 | function ve(t) {
1924 | if (!t.open) return;
1925 | document.getElementById(ae)?.classList.add(Y), t.classList.add(Y);
1926 | }
1927 | var I = class {
1928 | el;
1929 | app;
1930 | constructor(e) {
1931 | (this.el = e.el), (this.app = e.app);
1932 | }
1933 | };
1934 | var be = document.head.appendChild(document.createElement("style"));
1935 | be.dataset.for = "filters";
1936 | var le = {};
1937 | function we(t) {
1938 | for (let e of t.split(/\s+/)) if (le.hasOwnProperty(e) && !le[e]) return !0;
1939 | return !1;
1940 | }
1941 | var ee = class extends I {
1942 | key;
1943 | value;
1944 | constructor(e) {
1945 | super(e),
1946 | (this.key = `filter-${this.el.name}`),
1947 | (this.value = this.el.checked),
1948 | this.el.addEventListener("change", () => {
1949 | this.setLocalStorage(this.el.checked);
1950 | }),
1951 | this.setLocalStorage(this.fromLocalStorage()),
1952 | (be.innerHTML += `html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; }
1953 | `),
1954 | this.app.updateIndexVisibility();
1955 | }
1956 | fromLocalStorage() {
1957 | let e = S.getItem(this.key);
1958 | return e ? e === "true" : this.el.checked;
1959 | }
1960 | setLocalStorage(e) {
1961 | S.setItem(this.key, e.toString()),
1962 | (this.value = e),
1963 | this.handleValueChange();
1964 | }
1965 | handleValueChange() {
1966 | (this.el.checked = this.value),
1967 | document.documentElement.classList.toggle(this.key, this.value),
1968 | (le[`tsd-is-${this.el.name}`] = this.value),
1969 | this.app.filterChanged(),
1970 | this.app.updateIndexVisibility();
1971 | }
1972 | };
1973 | var Le = 0;
1974 | async function Se(t, e) {
1975 | if (!window.searchData) return;
1976 | let n = await R(window.searchData);
1977 | (t.data = n), (t.index = Ie.Index.load(n.index)), (e.innerHTML = "");
1978 | }
1979 | function _e() {
1980 | let t = document.getElementById("tsd-search-trigger"),
1981 | e = document.getElementById("tsd-search"),
1982 | n = document.getElementById("tsd-search-input"),
1983 | r = document.getElementById("tsd-search-results"),
1984 | i = document.getElementById("tsd-search-script"),
1985 | s = document.getElementById("tsd-search-status");
1986 | if (!(t && e && n && r && i && s))
1987 | throw new Error("Search controls missing");
1988 | let o = { base: document.documentElement.dataset.base };
1989 | o.base.endsWith("/") || (o.base += "/"),
1990 | i.addEventListener("error", () => {
1991 | let a = window.translations.search_index_not_available;
1992 | Pe(s, a);
1993 | }),
1994 | i.addEventListener("load", () => {
1995 | Se(o, s);
1996 | }),
1997 | Se(o, s),
1998 | ot({ trigger: t, searchEl: e, results: r, field: n, status: s }, o);
1999 | }
2000 | function ot(t, e) {
2001 | let { field: n, results: r, searchEl: i, status: s, trigger: o } = t;
2002 | xe(i, { closeOnClick: !0 });
2003 | function a() {
2004 | Ee(i), n.setSelectionRange(0, n.value.length);
2005 | }
2006 | o.addEventListener("click", a),
2007 | n.addEventListener(
2008 | "input",
2009 | fe(() => {
2010 | at(r, n, s, e);
2011 | }, 200),
2012 | ),
2013 | n.addEventListener("keydown", (l) => {
2014 | if (r.childElementCount === 0 || l.ctrlKey || l.metaKey || l.altKey)
2015 | return;
2016 | let d = n.getAttribute("aria-activedescendant"),
2017 | f = d ? document.getElementById(d) : null;
2018 | if (f) {
2019 | let p = !1,
2020 | v = !1;
2021 | switch (l.key) {
2022 | case "Home":
2023 | case "End":
2024 | case "ArrowLeft":
2025 | case "ArrowRight":
2026 | v = !0;
2027 | break;
2028 | case "ArrowDown":
2029 | case "ArrowUp":
2030 | p = l.shiftKey;
2031 | break;
2032 | }
2033 | (p || v) && ke(n);
2034 | }
2035 | if (!l.shiftKey)
2036 | switch (l.key) {
2037 | case "Enter":
2038 | f?.querySelector("a")?.click();
2039 | break;
2040 | case "ArrowUp":
2041 | Te(r, n, f, -1), l.preventDefault();
2042 | break;
2043 | case "ArrowDown":
2044 | Te(r, n, f, 1), l.preventDefault();
2045 | break;
2046 | }
2047 | });
2048 | function c() {
2049 | ke(n);
2050 | }
2051 | n.addEventListener("change", c),
2052 | n.addEventListener("blur", c),
2053 | n.addEventListener("click", c),
2054 | document.body.addEventListener("keydown", (l) => {
2055 | if (l.altKey || l.metaKey || l.shiftKey) return;
2056 | let d = l.ctrlKey && l.key === "k",
2057 | f = !l.ctrlKey && !ut() && l.key === "/";
2058 | (d || f) && (l.preventDefault(), a());
2059 | });
2060 | }
2061 | function at(t, e, n, r) {
2062 | if (!r.index || !r.data) return;
2063 | (t.innerHTML = ""), (n.innerHTML = ""), (Le += 1);
2064 | let i = e.value.trim(),
2065 | s;
2066 | if (i) {
2067 | let a = i
2068 | .split(" ")
2069 | .map((c) => (c.length ? `*${c}*` : ""))
2070 | .join(" ");
2071 | s = r.index.search(a).filter(({ ref: c }) => {
2072 | let l = r.data.rows[Number(c)].classes;
2073 | return !l || !we(l);
2074 | });
2075 | } else s = [];
2076 | if (s.length === 0 && i) {
2077 | let a = window.translations.search_no_results_found_for_0.replace(
2078 | "{0}",
2079 | ` "<strong>${te(i)}</strong>" `,
2080 | );
2081 | Pe(n, a);
2082 | return;
2083 | }
2084 | for (let a = 0; a < s.length; a++) {
2085 | let c = s[a],
2086 | l = r.data.rows[Number(c.ref)],
2087 | d = 1;
2088 | l.name.toLowerCase().startsWith(i.toLowerCase()) &&
2089 | (d *= 10 / (1 + Math.abs(l.name.length - i.length))),
2090 | (c.score *= d);
2091 | }
2092 | s.sort((a, c) => c.score - a.score);
2093 | let o = Math.min(10, s.length);
2094 | for (let a = 0; a < o; a++) {
2095 | let c = r.data.rows[Number(s[a].ref)],
2096 | d = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon" aria-label="${window.translations[
2097 | `kind_${c.kind}`
2098 | ].replaceAll('"', """)}"><use href="#icon-${
2099 | c.icon || c.kind
2100 | }"></use></svg>`,
2101 | f = Ce(c.name, i);
2102 | globalThis.DEBUG_SEARCH_WEIGHTS &&
2103 | (f += ` (score: ${s[a].score.toFixed(2)})`),
2104 | c.parent &&
2105 | (f = `<span class="parent">
2106 | ${Ce(c.parent, i)}.</span>${f}`);
2107 | let p = document.createElement("li");
2108 | (p.id = `tsd-search:${Le}-${a}`),
2109 | (p.role = "option"),
2110 | (p.ariaSelected = "false"),
2111 | (p.classList.value = c.classes ?? "");
2112 | let v = document.createElement("a");
2113 | (v.tabIndex = -1),
2114 | (v.href = r.base + c.url),
2115 | (v.innerHTML = d + `<span class="text">${f}</span>`),
2116 | p.append(v),
2117 | t.appendChild(p);
2118 | }
2119 | }
2120 | function Te(t, e, n, r) {
2121 | let i;
2122 | if (
2123 | (r === 1
2124 | ? (i = n?.nextElementSibling || t.firstElementChild)
2125 | : (i = n?.previousElementSibling || t.lastElementChild),
2126 | i !== n)
2127 | ) {
2128 | if (!i || i.role !== "option") {
2129 | console.error("Option missing");
2130 | return;
2131 | }
2132 | (i.ariaSelected = "true"),
2133 | i.scrollIntoView({ behavior: "smooth", block: "nearest" }),
2134 | e.setAttribute("aria-activedescendant", i.id),
2135 | n?.setAttribute("aria-selected", "false");
2136 | }
2137 | }
2138 | function ke(t) {
2139 | let e = t.getAttribute("aria-activedescendant");
2140 | (e ? document.getElementById(e) : null)?.setAttribute(
2141 | "aria-selected",
2142 | "false",
2143 | ),
2144 | t.setAttribute("aria-activedescendant", "");
2145 | }
2146 | function Ce(t, e) {
2147 | if (e === "") return t;
2148 | let n = t.toLocaleLowerCase(),
2149 | r = e.toLocaleLowerCase(),
2150 | i = [],
2151 | s = 0,
2152 | o = n.indexOf(r);
2153 | for (; o != -1; )
2154 | i.push(
2155 | te(t.substring(s, o)),
2156 | `<mark>${te(t.substring(o, o + r.length))}</mark>`,
2157 | ),
2158 | (s = o + r.length),
2159 | (o = n.indexOf(r, s));
2160 | return i.push(te(t.substring(s))), i.join("");
2161 | }
2162 | var lt = {
2163 | "&": "&",
2164 | "<": "<",
2165 | ">": ">",
2166 | "'": "'",
2167 | '"': """,
2168 | };
2169 | function te(t) {
2170 | return t.replace(/[&<>"'"]/g, (e) => lt[e]);
2171 | }
2172 | function Pe(t, e) {
2173 | t.innerHTML = e ? `<div>${e}</div>` : "";
2174 | }
2175 | var ct = [
2176 | "button",
2177 | "checkbox",
2178 | "file",
2179 | "hidden",
2180 | "image",
2181 | "radio",
2182 | "range",
2183 | "reset",
2184 | "submit",
2185 | ];
2186 | function ut() {
2187 | let t = document.activeElement;
2188 | return t
2189 | ? t.isContentEditable ||
2190 | t.tagName === "TEXTAREA" ||
2191 | t.tagName === "SEARCH"
2192 | ? !0
2193 | : t.tagName === "INPUT" && !ct.includes(t.type)
2194 | : !1;
2195 | }
2196 | var D = "mousedown",
2197 | Me = "mousemove",
2198 | $ = "mouseup",
2199 | ne = { x: 0, y: 0 },
2200 | Qe = !1,
2201 | ce = !1,
2202 | dt = !1,
2203 | F = !1,
2204 | Oe = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
2205 | navigator.userAgent,
2206 | );
2207 | document.documentElement.classList.add(Oe ? "is-mobile" : "not-mobile");
2208 | Oe &&
2209 | "ontouchstart" in document.documentElement &&
2210 | ((dt = !0), (D = "touchstart"), (Me = "touchmove"), ($ = "touchend"));
2211 | document.addEventListener(D, (t) => {
2212 | (ce = !0), (F = !1);
2213 | let e = D == "touchstart" ? t.targetTouches[0] : t;
2214 | (ne.y = e.pageY || 0), (ne.x = e.pageX || 0);
2215 | });
2216 | document.addEventListener(Me, (t) => {
2217 | if (ce && !F) {
2218 | let e = D == "touchstart" ? t.targetTouches[0] : t,
2219 | n = ne.x - (e.pageX || 0),
2220 | r = ne.y - (e.pageY || 0);
2221 | F = Math.sqrt(n * n + r * r) > 10;
2222 | }
2223 | });
2224 | document.addEventListener($, () => {
2225 | ce = !1;
2226 | });
2227 | document.addEventListener("click", (t) => {
2228 | Qe && (t.preventDefault(), t.stopImmediatePropagation(), (Qe = !1));
2229 | });
2230 | var re = class extends I {
2231 | active;
2232 | className;
2233 | constructor(e) {
2234 | super(e),
2235 | (this.className = this.el.dataset.toggle || ""),
2236 | this.el.addEventListener($, (n) => this.onPointerUp(n)),
2237 | this.el.addEventListener("click", (n) => n.preventDefault()),
2238 | document.addEventListener(D, (n) => this.onDocumentPointerDown(n)),
2239 | document.addEventListener($, (n) => this.onDocumentPointerUp(n));
2240 | }
2241 | setActive(e) {
2242 | if (this.active == e) return;
2243 | (this.active = e),
2244 | document.documentElement.classList.toggle("has-" + this.className, e),
2245 | this.el.classList.toggle("active", e);
2246 | let n = (this.active ? "to-has-" : "from-has-") + this.className;
2247 | document.documentElement.classList.add(n),
2248 | setTimeout(() => document.documentElement.classList.remove(n), 500);
2249 | }
2250 | onPointerUp(e) {
2251 | F || (this.setActive(!0), e.preventDefault());
2252 | }
2253 | onDocumentPointerDown(e) {
2254 | if (this.active) {
2255 | if (e.target.closest(".col-sidebar, .tsd-filter-group")) return;
2256 | this.setActive(!1);
2257 | }
2258 | }
2259 | onDocumentPointerUp(e) {
2260 | if (!F && this.active && e.target.closest(".col-sidebar")) {
2261 | let n = e.target.closest("a");
2262 | if (n) {
2263 | let r = window.location.href;
2264 | r.indexOf("#") != -1 && (r = r.substring(0, r.indexOf("#"))),
2265 | n.href.substring(0, r.length) == r &&
2266 | setTimeout(() => this.setActive(!1), 250);
2267 | }
2268 | }
2269 | }
2270 | };
2271 | var ue = new Map(),
2272 | de = class {
2273 | open;
2274 | accordions = [];
2275 | key;
2276 | constructor(e, n) {
2277 | (this.key = e), (this.open = n);
2278 | }
2279 | add(e) {
2280 | this.accordions.push(e),
2281 | (e.open = this.open),
2282 | e.addEventListener("toggle", () => {
2283 | this.toggle(e.open);
2284 | });
2285 | }
2286 | toggle(e) {
2287 | for (let n of this.accordions) n.open = e;
2288 | S.setItem(this.key, e.toString());
2289 | }
2290 | },
2291 | ie = class extends I {
2292 | constructor(e) {
2293 | super(e);
2294 | let n = this.el.querySelector("summary"),
2295 | r = n.querySelector("a");
2296 | r &&
2297 | r.addEventListener("click", () => {
2298 | location.assign(r.href);
2299 | });
2300 | let i = `tsd-accordion-${
2301 | n.dataset.key ??
2302 | n.textContent.trim().replace(/\s+/g, "-").toLowerCase()
2303 | }`,
2304 | s;
2305 | if (ue.has(i)) s = ue.get(i);
2306 | else {
2307 | let o = S.getItem(i),
2308 | a = o ? o === "true" : this.el.open;
2309 | (s = new de(i, a)), ue.set(i, s);
2310 | }
2311 | s.add(this.el);
2312 | }
2313 | };
2314 | function He(t) {
2315 | let e = S.getItem("tsd-theme") || "os";
2316 | (t.value = e),
2317 | Ae(e),
2318 | t.addEventListener("change", () => {
2319 | S.setItem("tsd-theme", t.value), Ae(t.value);
2320 | });
2321 | }
2322 | function Ae(t) {
2323 | document.documentElement.dataset.theme = t;
2324 | }
2325 | var se;
2326 | function Ne() {
2327 | let t = document.getElementById("tsd-nav-script");
2328 | t && (t.addEventListener("load", Re), Re());
2329 | }
2330 | async function Re() {
2331 | let t = document.getElementById("tsd-nav-container");
2332 | if (!t || !window.navigationData) return;
2333 | let e = await R(window.navigationData);
2334 | (se = document.documentElement.dataset.base),
2335 | se.endsWith("/") || (se += "/"),
2336 | (t.innerHTML = "");
2337 | for (let n of e) Be(n, t, []);
2338 | window.app.createComponents(t),
2339 | window.app.showPage(),
2340 | window.app.ensureActivePageVisible();
2341 | }
2342 | function Be(t, e, n) {
2343 | let r = e.appendChild(document.createElement("li"));
2344 | if (t.children) {
2345 | let i = [...n, t.text],
2346 | s = r.appendChild(document.createElement("details"));
2347 | s.className = t.class ? `${t.class} tsd-accordion` : "tsd-accordion";
2348 | let o = s.appendChild(document.createElement("summary"));
2349 | (o.className = "tsd-accordion-summary"),
2350 | (o.dataset.key = i.join("$")),
2351 | (o.innerHTML =
2352 | '<svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>'),
2353 | De(t, o);
2354 | let a = s.appendChild(document.createElement("div"));
2355 | a.className = "tsd-accordion-details";
2356 | let c = a.appendChild(document.createElement("ul"));
2357 | c.className = "tsd-nested-navigation";
2358 | for (let l of t.children) Be(l, c, i);
2359 | } else De(t, r, t.class);
2360 | }
2361 | function De(t, e, n) {
2362 | if (t.path) {
2363 | let r = e.appendChild(document.createElement("a"));
2364 | if (
2365 | ((r.href = se + t.path),
2366 | n && (r.className = n),
2367 | location.pathname === r.pathname &&
2368 | !r.href.includes("#") &&
2369 | (r.classList.add("current"), (r.ariaCurrent = "page")),
2370 | t.kind)
2371 | ) {
2372 | let i = window.translations[`kind_${t.kind}`].replaceAll('"', """);
2373 | r.innerHTML = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon" aria-label="${i}"><use href="#icon-${
2374 | t.icon || t.kind
2375 | }"></use></svg>`;
2376 | }
2377 | r.appendChild(Fe(t.text, document.createElement("span")));
2378 | } else {
2379 | let r = e.appendChild(document.createElement("span")),
2380 | i = window.translations.folder.replaceAll('"', """);
2381 | (r.innerHTML = `<svg width="20" height="20" viewBox="0 0 24 24" fill="none" class="tsd-kind-icon" aria-label="${i}"><use href="#icon-folder"></use></svg>`),
2382 | r.appendChild(Fe(t.text, document.createElement("span")));
2383 | }
2384 | }
2385 | function Fe(t, e) {
2386 | let n = t.split(
2387 | /(?<=[^A-Z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])|(?<=[_-])(?=[^_-])/,
2388 | );
2389 | for (let r = 0; r < n.length; ++r)
2390 | r !== 0 && e.appendChild(document.createElement("wbr")),
2391 | e.appendChild(document.createTextNode(n[r]));
2392 | return e;
2393 | }
2394 | var oe = document.documentElement.dataset.base;
2395 | oe.endsWith("/") || (oe += "/");
2396 | function $e() {
2397 | document.querySelector(".tsd-full-hierarchy")
2398 | ? ht()
2399 | : document.querySelector(".tsd-hierarchy") && pt();
2400 | }
2401 | function ht() {
2402 | document.addEventListener("click", (r) => {
2403 | let i = r.target;
2404 | for (; i.parentElement && i.parentElement.tagName != "LI"; )
2405 | i = i.parentElement;
2406 | i.dataset.dropdown &&
2407 | (i.dataset.dropdown = String(i.dataset.dropdown !== "true"));
2408 | });
2409 | let t = new Map(),
2410 | e = new Set();
2411 | for (let r of document.querySelectorAll(
2412 | ".tsd-full-hierarchy [data-refl]",
2413 | )) {
2414 | let i = r.querySelector("ul");
2415 | t.has(r.dataset.refl)
2416 | ? e.add(r.dataset.refl)
2417 | : i && t.set(r.dataset.refl, i);
2418 | }
2419 | for (let r of e) n(r);
2420 | function n(r) {
2421 | let i = t.get(r).cloneNode(!0);
2422 | i.querySelectorAll("[id]").forEach((s) => {
2423 | s.removeAttribute("id");
2424 | }),
2425 | i.querySelectorAll("[data-dropdown]").forEach((s) => {
2426 | s.dataset.dropdown = "false";
2427 | });
2428 | for (let s of document.querySelectorAll(`[data-refl="${r}"]`)) {
2429 | let o = gt(),
2430 | a = s.querySelector("ul");
2431 | s.insertBefore(o, a),
2432 | (o.dataset.dropdown = String(!!a)),
2433 | a || s.appendChild(i.cloneNode(!0));
2434 | }
2435 | }
2436 | }
2437 | function pt() {
2438 | let t = document.getElementById("tsd-hierarchy-script");
2439 | t && (t.addEventListener("load", Ve), Ve());
2440 | }
2441 | async function Ve() {
2442 | let t = document.querySelector(".tsd-panel.tsd-hierarchy:has(h4 a)");
2443 | if (!t || !window.hierarchyData) return;
2444 | let e = +t.dataset.refl,
2445 | n = await R(window.hierarchyData),
2446 | r = t.querySelector("ul"),
2447 | i = document.createElement("ul");
2448 | if (
2449 | (i.classList.add("tsd-hierarchy"),
2450 | ft(i, n, e),
2451 | r.querySelectorAll("li").length == i.querySelectorAll("li").length)
2452 | )
2453 | return;
2454 | let s = document.createElement("span");
2455 | s.classList.add("tsd-hierarchy-toggle"),
2456 | (s.textContent = window.translations.hierarchy_expand),
2457 | t.querySelector("h4 a")?.insertAdjacentElement("afterend", s),
2458 | s.insertAdjacentText("beforebegin", ", "),
2459 | s.addEventListener("click", () => {
2460 | s.textContent === window.translations.hierarchy_expand
2461 | ? (r.insertAdjacentElement("afterend", i),
2462 | r.remove(),
2463 | (s.textContent = window.translations.hierarchy_collapse))
2464 | : (i.insertAdjacentElement("afterend", r),
2465 | i.remove(),
2466 | (s.textContent = window.translations.hierarchy_expand));
2467 | });
2468 | }
2469 | function ft(t, e, n) {
2470 | let r = e.roots.filter((i) => mt(e, i, n));
2471 | for (let i of r) t.appendChild(je(e, i, n));
2472 | }
2473 | function je(t, e, n, r = new Set()) {
2474 | if (r.has(e)) return;
2475 | r.add(e);
2476 | let i = t.reflections[e],
2477 | s = document.createElement("li");
2478 | if ((s.classList.add("tsd-hierarchy-item"), e === n)) {
2479 | let o = s.appendChild(document.createElement("span"));
2480 | (o.textContent = i.name), o.classList.add("tsd-hierarchy-target");
2481 | } else {
2482 | for (let a of i.uniqueNameParents || []) {
2483 | let c = t.reflections[a],
2484 | l = s.appendChild(document.createElement("a"));
2485 | (l.textContent = c.name),
2486 | (l.href = oe + c.url),
2487 | (l.className = c.class + " tsd-signature-type"),
2488 | s.append(document.createTextNode("."));
2489 | }
2490 | let o = s.appendChild(document.createElement("a"));
2491 | (o.textContent = t.reflections[e].name),
2492 | (o.href = oe + i.url),
2493 | (o.className = i.class + " tsd-signature-type");
2494 | }
2495 | if (i.children) {
2496 | let o = s.appendChild(document.createElement("ul"));
2497 | o.classList.add("tsd-hierarchy");
2498 | for (let a of i.children) {
2499 | let c = je(t, a, n, r);
2500 | c && o.appendChild(c);
2501 | }
2502 | }
2503 | return r.delete(e), s;
2504 | }
2505 | function mt(t, e, n) {
2506 | if (e === n) return !0;
2507 | let r = new Set(),
2508 | i = [t.reflections[e]];
2509 | for (; i.length; ) {
2510 | let s = i.pop();
2511 | if (!r.has(s)) {
2512 | r.add(s);
2513 | for (let o of s.children || []) {
2514 | if (o === n) return !0;
2515 | i.push(t.reflections[o]);
2516 | }
2517 | }
2518 | }
2519 | return !1;
2520 | }
2521 | function gt() {
2522 | let t = document.createElementNS("http://www.w3.org/2000/svg", "svg");
2523 | return (
2524 | t.setAttribute("width", "20"),
2525 | t.setAttribute("height", "20"),
2526 | t.setAttribute("viewBox", "0 0 24 24"),
2527 | t.setAttribute("fill", "none"),
2528 | (t.innerHTML = '<use href="#icon-chevronDown"></use>'),
2529 | t
2530 | );
2531 | }
2532 | X(re, "a[data-toggle]");
2533 | X(ie, ".tsd-accordion");
2534 | X(ee, ".tsd-filter-item input[type=checkbox]");
2535 | var qe = document.getElementById("tsd-theme");
2536 | qe && He(qe);
2537 | var yt = new Z();
2538 | Object.defineProperty(window, "app", { value: yt });
2539 | _e();
2540 | Ne();
2541 | $e();
2542 | "virtualKeyboard" in navigator &&
2543 | (navigator.virtualKeyboard.overlaysContent = !0);
2544 | })();
2545 | /*! Bundled license information:
2546 |
2547 | lunr/lunr.js:
2548 | (**
2549 | * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9
2550 | * Copyright (C) 2020 Oliver Nightingale
2551 | * @license MIT
2552 | *)
2553 | (*!
2554 | * lunr.utils
2555 | * Copyright (C) 2020 Oliver Nightingale
2556 | *)
2557 | (*!
2558 | * lunr.Set
2559 | * Copyright (C) 2020 Oliver Nightingale
2560 | *)
2561 | (*!
2562 | * lunr.tokenizer
2563 | * Copyright (C) 2020 Oliver Nightingale
2564 | *)
2565 | (*!
2566 | * lunr.Pipeline
2567 | * Copyright (C) 2020 Oliver Nightingale
2568 | *)
2569 | (*!
2570 | * lunr.Vector
2571 | * Copyright (C) 2020 Oliver Nightingale
2572 | *)
2573 | (*!
2574 | * lunr.stemmer
2575 | * Copyright (C) 2020 Oliver Nightingale
2576 | * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
2577 | *)
2578 | (*!
2579 | * lunr.stopWordFilter
2580 | * Copyright (C) 2020 Oliver Nightingale
2581 | *)
2582 | (*!
2583 | * lunr.trimmer
2584 | * Copyright (C) 2020 Oliver Nightingale
2585 | *)
2586 | (*!
2587 | * lunr.TokenSet
2588 | * Copyright (C) 2020 Oliver Nightingale
2589 | *)
2590 | (*!
2591 | * lunr.Index
2592 | * Copyright (C) 2020 Oliver Nightingale
2593 | *)
2594 | (*!
2595 | * lunr.Builder
2596 | * Copyright (C) 2020 Oliver Nightingale
2597 | *)
2598 | */
2599 |
```