From 6c3243b0f7343d436eb7ba56eb4001384fa8af2b Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Thu, 11 May 2023 11:53:32 -0400 Subject: [PATCH 1/7] more missing inline templates --- scratch.js | 10 +++--- src/01-document/redirects.js | 2 +- src/template/custom/aliases.js | 5 ++- src/template/custom/text-only/easy-inline.js | 34 +++++++++++++++++- src/template/custom/text-only/functions.js | 37 ++++++++++++++++++++ src/template/custom/text-only/hardcoded.js | 4 ++- tests/integration/Document.test.js | 10 ++---- 7 files changed, 86 insertions(+), 16 deletions(-) diff --git a/scratch.js b/scratch.js index 120af1a5..1714ac35 100644 --- a/scratch.js +++ b/scratch.js @@ -2,9 +2,11 @@ import wtf from './src/index.js' import plg from './plugins/api/src/index.js' wtf.plugin(plg) -// let str = ` ` -// let doc = wtf(str) -// console.log(doc.json()) +// let str = `{{float |top=2.0em |left=2px |width=10em | the content to float}}.` +// let str = `{{splitspan|foo|bar}}` +let str = ` {{font|text=也可以只選用其中一項選項。|size=25px}} ` +let doc = wtf(str) +console.log(doc.text()) // wtf.fetch("Formula One drivers from Finland", "en") // trunc @@ -14,4 +16,4 @@ wtf.plugin(plg) // wtf.fetch("Sacramento Mountain Lions", "es") // fails on min template -wtf.fetch("Phase finale du Championnat du monde masculin de handball 2019", "fr") \ No newline at end of file +// wtf.fetch("Phase finale du Championnat du monde masculin de handball 2019", "fr") diff --git a/src/01-document/redirects.js b/src/01-document/redirects.js index 11dc4a6c..bf674aa5 100644 --- a/src/01-document/redirects.js +++ b/src/01-document/redirects.js @@ -6,7 +6,7 @@ const REDIRECT_REGEX = new RegExp('^[ \n\t]*?#(' + redirects.join('|') + ') *?(\ const isRedirect = function (wiki) { //too long to be a redirect? - if (!wiki || wiki.length > 500) { + if (!wiki) { return false } return REDIRECT_REGEX.test(wiki) diff --git a/src/template/custom/aliases.js b/src/template/custom/aliases.js index e96772f8..8097c228 100644 --- a/src/template/custom/aliases.js +++ b/src/template/custom/aliases.js @@ -27,7 +27,10 @@ let aliases = { 'metrod': 'metro', 'fw': 'ferry', 'rws': 'stnlnk', - sclass2: 'sclass' + sclass2: 'sclass', + under: 'underline', + brackets: 'bracket', + raise: 'lower' } //multiple aliases diff --git a/src/template/custom/text-only/easy-inline.js b/src/template/custom/text-only/easy-inline.js index c6aadf68..c123aef6 100644 --- a/src/template/custom/text-only/easy-inline.js +++ b/src/template/custom/text-only/easy-inline.js @@ -72,14 +72,46 @@ let zeros = [ 'nowiki', 'nowiki2', 'unstrip', - 'UnstripNoWiki', + 'unstripnowiki', 'plain text', 'make code', 'killmarkers', + 'longitem', + 'longlink', + 'strikethrough', + 'underline', + 'uuline', + 'not a typo', + 'text', + 'resize', + 'var serif', + 'double underline', + 'nee', + 'ne', + 'left', + 'right', + 'center', + 'centered', + 'justify', + 'smalldiv', + 'bold div', + 'monodiv', + 'italic div', + 'bigdiv', + 'strikethroughdiv', + 'strikethrough color', ] zeros.forEach((k) => { templates[k] = 0 }) +// templates we simply grab the 2nd param of +let ones = [ + 'line-height' +] +ones.forEach((k) => { + templates[k] = 1 +}) + export default templates diff --git a/src/template/custom/text-only/functions.js b/src/template/custom/text-only/functions.js index 98b8ef95..1874fa61 100644 --- a/src/template/custom/text-only/functions.js +++ b/src/template/custom/text-only/functions.js @@ -665,6 +665,43 @@ export default { let { cl, type } = parse(tmpl, ['cl', 'type', 'fmt']) return `[[${cl}-class ${type} |''${cl}''-class]] [[${type}]]` }, + 'center block': (tmpl) => { + let { txt } = parse(tmpl, ['txt']) + return txt || '' + }, + 'align': (tmpl) => { + let { txt } = parse(tmpl, ['dir', 'txt']) + return txt || '' + }, + 'font': (tmpl) => { + let { txt } = parse(tmpl, ['txt']) + return txt || '' + }, + 'float': (tmpl) => { + let { txt, dir } = parse(tmpl, ['dir', 'txt']) + if (!txt) { + return dir + } + return txt || '' + }, + 'lower': (tmpl) => { + let { txt, n } = parse(tmpl, ['n', 'txt']) + if (!txt) { + return n + } + return txt || '' + }, + 'splitspan': (tmpl) => { + let { left, right } = parse(tmpl, ['left', 'right']) + return (left || '') + '\n' + (right || '') + }, + 'bracket': (tmpl) => { + let { word } = parse(tmpl, ['word']) + if (word) { + return `[${word}]` + } + return '[' + }, // https://en.wikipedia.org/wiki/Template:In_title diff --git a/src/template/custom/text-only/hardcoded.js b/src/template/custom/text-only/hardcoded.js index 95ed63d3..4c8f01ef 100644 --- a/src/template/custom/text-only/hardcoded.js +++ b/src/template/custom/text-only/hardcoded.js @@ -33,7 +33,7 @@ export default { "'": `'`, '\\': ' /', '`': '`', - bracket: '[', + // bracket: '[', '[': '[', '*': '*', asterisk: '*', @@ -58,4 +58,6 @@ export default { checked: '✔️', 'thumbs up': '👍', 'thumbs down': '👎', + 'minusplus': '∓', + 'plusminus': '±' } diff --git a/tests/integration/Document.test.js b/tests/integration/Document.test.js index b78cb383..06090b9f 100644 --- a/tests/integration/Document.test.js +++ b/tests/integration/Document.test.js @@ -216,19 +216,13 @@ test('isRedirect - get - should initially be false', (t) => { test('isRedirect - get - if the type of page is should default to page and return false', (t) => { let doc = wtf('', { type: 'redirect' }) - t.equal(doc.isRedirect(), false, 'the isRedirect equals false') + t.equal(doc.isRedirect(), false, 'the empty-string isRedirect equals false') t.end() }) test('isRedirect - get - if the page is a redirect than return true', (t) => { let doc = wtf('#DOORVERWIJZING [[Doelpagina]]') - t.equal(doc.isRedirect(), true, 'the isRedirect equals true') - t.end() -}) - -test('isRedirect - get - if the page is too long to be a redirect page than return false', (t) => { - let doc = wtf('#DOORVERWIJZING [[Doelpagina]]' + 'l'.repeat(505)) - t.equal(doc.isRedirect(), false, 'the isRedirect equals false') + t.equal(doc.isRedirect(), true, 'the DOORVERWIJZING isRedirect equals true') t.end() }) From 4251e8cc7ac2653f3da868e741cc3519c8791a97 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Thu, 11 May 2023 11:58:01 -0400 Subject: [PATCH 2/7] fix for #530 --- scratch.js | 15 +++++++++++++-- src/template/parse/toJSON/02-keyMaker.js | 4 ++++ tests/integration/infobox.test.js | 13 +++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/scratch.js b/scratch.js index 1714ac35..fa5fb499 100644 --- a/scratch.js +++ b/scratch.js @@ -4,9 +4,20 @@ wtf.plugin(plg) // let str = `{{float |top=2.0em |left=2px |width=10em | the content to float}}.` // let str = `{{splitspan|foo|bar}}` -let str = ` {{font|text=也可以只選用其中一項選項。|size=25px}} ` +// let str = ` {{font|text=也可以只選用其中一項選項。|size=25px}} ` +// let doc = wtf(str) +// console.log(doc.text()) + + +let str = ` {{Infobox officeholder + | name = Dr. Rajesh Sonkar + | office = [[President Bhartiya Janta Party(BJP) Indore, Madhya Pradesh]] + | term_start = 10 May 2020 + | Office = + }}` let doc = wtf(str) -console.log(doc.text()) +console.log(doc.infobox().json()) + // wtf.fetch("Formula One drivers from Finland", "en") // trunc diff --git a/src/template/parse/toJSON/02-keyMaker.js b/src/template/parse/toJSON/02-keyMaker.js index 23690b5f..12daf04a 100644 --- a/src/template/parse/toJSON/02-keyMaker.js +++ b/src/template/parse/toJSON/02-keyMaker.js @@ -53,6 +53,10 @@ const keyMaker = function (arr, order) { if (hasKey.test(str) === true) { let res = parseKey(str) if (res.key) { + // don't overwrite if empty + if (h[res.key] && !res.val) { + return h + } h[res.key] = res.val return h } diff --git a/tests/integration/infobox.test.js b/tests/integration/infobox.test.js index 32a55612..a6c45037 100644 --- a/tests/integration/infobox.test.js +++ b/tests/integration/infobox.test.js @@ -133,3 +133,16 @@ test('slash-in-infobox', function (t) { t.equal(json['jr/sr3'].text, 'United States Senator', 'slash') t.end() }) + +test('double-prop-infobox', function (t) { + let str = ` {{Infobox officeholder + | name = Dr. Rajesh Sonkar + | office = [[President Bhartiya Janta Party(BJP) Indore, Madhya Pradesh]] + | term_start = 10 May 2020 + | Office = + }}` + let doc = wtf(str) + let json = doc.infobox().json() + t.equal(json['office'].text, 'President Bhartiya Janta Party(BJP) Indore, Madhya Pradesh', 'office') + t.end() +}) From eba19310dc0648e477ac66efa2d709904aa37f37 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Thu, 11 May 2023 12:12:11 -0400 Subject: [PATCH 3/7] update deps --- package-lock.json | 801 +++++++++++-------- package.json | 17 +- rollup.config.js | 2 +- scratch.js | 15 +- src/template/custom/text-only/easy-inline.js | 1 + 5 files changed, 478 insertions(+), 358 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2e2e6b57..011ecfe7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,24 +10,24 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { - "isomorphic-unfetch": "^3.1.0", + "isomorphic-unfetch": "4.0.2", "path-exists-cli": "2.0.0" }, "bin": { "wtf_wikipedia": "cli.js" }, "devDependencies": { - "@rollup/plugin-commonjs": "22.0.2", - "@rollup/plugin-node-resolve": "14.1.0", + "@rollup/plugin-commonjs": "24.1.0", + "@rollup/plugin-node-resolve": "15.0.2", + "@rollup/plugin-terser": "^0.4.1", "amble": "1.3.0", "codecov": "3.8.3", - "eslint": "8.38.0", + "eslint": "8.40.0", "eslint-plugin-compat": "4.1.4", - "eslint-plugin-regexp": "1.14.0", + "eslint-plugin-regexp": "1.15.0", "nyc": "^15.1.0", "recursive-install": "1.4.0", - "rollup": "2.79.1", - "rollup-plugin-terser": "7.0.2", + "rollup": "3.21.6", "shelljs": "0.8.5", "tap-dancer": "0.3.4", "tape": "5.6.3" @@ -364,14 +364,14 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", - "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.1", + "espree": "^9.5.2", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -432,9 +432,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.38.0.tgz", - "integrity": "sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz", + "integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -659,74 +659,147 @@ } }, "node_modules/@rollup/plugin-commonjs": { - "version": "22.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.2.tgz", - "integrity": "sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-24.1.0.tgz", + "integrity": "sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ==", "dev": true, "dependencies": { - "@rollup/pluginutils": "^3.1.0", + "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", - "estree-walker": "^2.0.1", - "glob": "^7.1.6", - "is-reference": "^1.2.1", - "magic-string": "^0.25.7", - "resolve": "^1.17.0" + "estree-walker": "^2.0.2", + "glob": "^8.0.3", + "is-reference": "1.2.1", + "magic-string": "^0.27.0" }, "engines": { - "node": ">= 12.0.0" + "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.68.0" + "rollup": "^2.68.0||^3.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-commonjs/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@rollup/plugin-commonjs/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@rollup/plugin-commonjs/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-14.1.0.tgz", - "integrity": "sha512-5G2niJroNCz/1zqwXtk0t9+twOSDlG00k1Wfd7bkbbXmwg8H8dvgHdIWAun53Ps/rckfvOC7scDBjuGFg5OaWw==", + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.0.2.tgz", + "integrity": "sha512-Y35fRGUjC3FaurG722uhUuG8YHOJRJQbI6/CkbRkdPotSpDj9NtIN85z1zrcyDcCQIW4qp5mgG72U+gJ0TAFEg==", "dev": true, "dependencies": { - "@rollup/pluginutils": "^3.1.0", - "@types/resolve": "1.17.1", + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", "deepmerge": "^4.2.2", - "is-builtin-module": "^3.1.0", + "is-builtin-module": "^3.2.1", "is-module": "^1.0.0", - "resolve": "^1.19.0" + "resolve": "^1.22.1" }, "engines": { - "node": ">= 10.0.0" + "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.78.0" + "rollup": "^2.78.0||^3.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, - "node_modules/@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "node_modules/@rollup/plugin-terser": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.1.tgz", + "integrity": "sha512-aKS32sw5a7hy+fEXVy+5T95aDIwjpGHCTv833HXVtyKMDoVS7pBr5K3L9hEQoNqbJFjfANPrNpIXlTQ7is00eA==", "dev": true, "dependencies": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" + "serialize-javascript": "^6.0.0", + "smob": "^0.0.6", + "terser": "^5.15.1" }, "engines": { - "node": ">= 8.0.0" + "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" + "rollup": "^2.x || ^3.x" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, - "node_modules/@rollup/pluginutils/node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true + "node_modules/@rollup/plugin-terser/node_modules/serialize-javascript": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } }, - "node_modules/@rollup/pluginutils/node_modules/estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true + "node_modules/@rollup/pluginutils": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", + "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", + "dev": true, + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } }, "node_modules/@tootallnate/once": { "version": "1.1.2", @@ -754,25 +827,16 @@ "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==" }, - "node_modules/@types/node": { - "version": "16.11.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz", - "integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==", - "dev": true - }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==" }, "node_modules/@types/resolve": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", - "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "dev": true }, "node_modules/acorn": { "version": "8.8.0", @@ -1311,6 +1375,14 @@ "node": ">= 8" } }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "engines": { + "node": ">= 12" + } + }, "node_modules/debug": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", @@ -1614,15 +1686,15 @@ } }, "node_modules/eslint": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz", - "integrity": "sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz", + "integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.38.0", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.40.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -1632,9 +1704,9 @@ "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.1", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1708,9 +1780,9 @@ } }, "node_modules/eslint-plugin-regexp": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.14.0.tgz", - "integrity": "sha512-5+bBSsRTTtkSf8+/iNSjiOW6qbjAdGyqv88HxPaBNFKxROK+UAdOGDl5Jr+csV5wW2BuOOvaG82zsvTriQBRFA==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.15.0.tgz", + "integrity": "sha512-YEtQPfdudafU7RBIFci81R/Q1yErm0mVh3BkGnXD2Dk8DLwTFdc2ITYH1wCnHKim2gnHfPFgrkh+b2ozyyU7ag==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", @@ -1730,9 +1802,9 @@ } }, "node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", @@ -1740,12 +1812,15 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1894,14 +1969,14 @@ } }, "node_modules/espree": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", - "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "dev": true, "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.0" + "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2013,6 +2088,28 @@ "reusify": "^1.0.4" } }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -2110,6 +2207,17 @@ "node": ">=8.0.0" } }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", @@ -2655,9 +2763,9 @@ } }, "node_modules/is-builtin-module": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.0.tgz", - "integrity": "sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", "dev": true, "dependencies": { "builtin-modules": "^3.3.0" @@ -2980,12 +3088,29 @@ "dev": true }, "node_modules/isomorphic-unfetch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz", - "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-4.0.2.tgz", + "integrity": "sha512-1Yd+CF/7al18/N2BDbsLBcp6RO3tucSW+jcLq24dqdX5MNbCNTw1z4BsGsp4zNmjr/Izm2cs/cEqZPp4kvWSCA==", "dependencies": { - "node-fetch": "^2.6.1", - "unfetch": "^4.2.0" + "node-fetch": "^3.2.0", + "unfetch": "^5.0.0" + } + }, + "node_modules/isomorphic-unfetch/node_modules/node-fetch": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", + "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" } }, "node_modules/istanbul-lib-coverage": { @@ -3113,41 +3238,6 @@ "node": ">=8" } }, - "node_modules/jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/js-sdsl": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", @@ -3353,12 +3443,15 @@ } }, "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", + "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", "dev": true, "dependencies": { - "sourcemap-codec": "^1.4.8" + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" } }, "node_modules/make-dir": { @@ -3434,12 +3527,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -3494,10 +3581,29 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, "node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dev": true, "dependencies": { "whatwg-url": "^5.0.0" }, @@ -4624,35 +4730,21 @@ } }, "node_modules/rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "version": "3.21.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.6.tgz", + "integrity": "sha512-SXIICxvxQxR3D4dp/3LDHZIJPC8a4anKMHd4E3Jiz2/JnY+2bEjqrOokAauc5ShGVNFHlEFjBXAXlaxkJqIqSg==", "dev": true, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=10.0.0" + "node": ">=14.18.0", + "npm": ">=8.0.0" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, - "node_modules/rollup-plugin-terser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", - "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "jest-worker": "^26.2.1", - "serialize-javascript": "^4.0.0", - "terser": "^5.0.0" - }, - "peerDependencies": { - "rollup": "^2.0.0" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -4716,15 +4808,6 @@ "semver": "bin/semver.js" } }, - "node_modules/serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -4789,6 +4872,12 @@ "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", "dev": true }, + "node_modules/smob": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/smob/-/smob-0.0.6.tgz", + "integrity": "sha512-V21+XeNni+tTyiST1MHsa84AQhT1aFZipzPpOFAVB8DkHzwJyjjAmt9bgwnuZiZWnIbMo2duE29wybxv/7HWUw==", + "dev": true + }, "node_modules/source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -4817,13 +4906,6 @@ "node": ">=0.10.0" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "deprecated": "Please use @jridgewell/sourcemap-codec instead", - "dev": true - }, "node_modules/spawn-wrap": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", @@ -5167,9 +5249,9 @@ } }, "node_modules/terser": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", - "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", + "version": "5.17.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.3.tgz", + "integrity": "sha512-AudpAZKmZHkG9jueayypz4duuCFJMMNGRMwaPvQKWfxKedh8Z2x3OCoDqIIi1xx5+iwx1u6Au8XQcc9Lke65Yg==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.2", @@ -5234,7 +5316,8 @@ "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true }, "node_modules/trim": { "version": "1.0.1", @@ -5313,9 +5396,9 @@ } }, "node_modules/unfetch": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", - "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-5.0.0.tgz", + "integrity": "sha512-3xM2c89siXg0nHvlmYsQ2zkLASvVMBisZm5lF3gFDqfF2xonNStDJyMpvaOBe0a1Edxmqrf2E0HBdmy9QyZaeg==" }, "node_modules/update-browserslist-db": { "version": "1.0.10", @@ -5386,15 +5469,25 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "engines": { + "node": ">= 8" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dev": true, "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -5920,14 +6013,14 @@ "dev": true }, "@eslint/eslintrc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", - "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", + "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.1", + "espree": "^9.5.2", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -5969,9 +6062,9 @@ } }, "@eslint/js": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.38.0.tgz", - "integrity": "sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz", + "integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==", "dev": true }, "@humanwhocodes/config-array": { @@ -6143,59 +6236,99 @@ } }, "@rollup/plugin-commonjs": { - "version": "22.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.2.tgz", - "integrity": "sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-24.1.0.tgz", + "integrity": "sha512-eSL45hjhCWI0jCCXcNtLVqM5N1JlBGvlFfY0m6oOYnLCJ6N0qEXoZql4sY2MOUArzhH4SA/qBpTxvvZp2Sc+DQ==", "dev": true, "requires": { - "@rollup/pluginutils": "^3.1.0", + "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", - "estree-walker": "^2.0.1", - "glob": "^7.1.6", - "is-reference": "^1.2.1", - "magic-string": "^0.25.7", - "resolve": "^1.17.0" + "estree-walker": "^2.0.2", + "glob": "^8.0.3", + "is-reference": "1.2.1", + "magic-string": "^0.27.0" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, "@rollup/plugin-node-resolve": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-14.1.0.tgz", - "integrity": "sha512-5G2niJroNCz/1zqwXtk0t9+twOSDlG00k1Wfd7bkbbXmwg8H8dvgHdIWAun53Ps/rckfvOC7scDBjuGFg5OaWw==", + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.0.2.tgz", + "integrity": "sha512-Y35fRGUjC3FaurG722uhUuG8YHOJRJQbI6/CkbRkdPotSpDj9NtIN85z1zrcyDcCQIW4qp5mgG72U+gJ0TAFEg==", "dev": true, "requires": { - "@rollup/pluginutils": "^3.1.0", - "@types/resolve": "1.17.1", + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", "deepmerge": "^4.2.2", - "is-builtin-module": "^3.1.0", + "is-builtin-module": "^3.2.1", "is-module": "^1.0.0", - "resolve": "^1.19.0" + "resolve": "^1.22.1" } }, - "@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "@rollup/plugin-terser": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.1.tgz", + "integrity": "sha512-aKS32sw5a7hy+fEXVy+5T95aDIwjpGHCTv833HXVtyKMDoVS7pBr5K3L9hEQoNqbJFjfANPrNpIXlTQ7is00eA==", "dev": true, "requires": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" + "serialize-javascript": "^6.0.0", + "smob": "^0.0.6", + "terser": "^5.15.1" }, "dependencies": { - "@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true + "serialize-javascript": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } } } }, + "@rollup/pluginutils": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.2.tgz", + "integrity": "sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==", + "dev": true, + "requires": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" + } + }, "@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -6219,25 +6352,16 @@ "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==" }, - "@types/node": { - "version": "16.11.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz", - "integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==", - "dev": true - }, "@types/normalize-package-data": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==" }, "@types/resolve": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", - "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", - "dev": true, - "requires": { - "@types/node": "*" - } + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "dev": true }, "acorn": { "version": "8.8.0", @@ -6628,6 +6752,11 @@ "which": "^2.0.1" } }, + "data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==" + }, "debug": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", @@ -6872,15 +7001,15 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "8.38.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz", - "integrity": "sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==", + "version": "8.40.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz", + "integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.2", - "@eslint/js": "8.38.0", + "@eslint/eslintrc": "^2.0.3", + "@eslint/js": "8.40.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -6890,9 +7019,9 @@ "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.4.0", - "espree": "^9.5.1", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.5.2", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -7043,9 +7172,9 @@ } }, "eslint-plugin-regexp": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.14.0.tgz", - "integrity": "sha512-5+bBSsRTTtkSf8+/iNSjiOW6qbjAdGyqv88HxPaBNFKxROK+UAdOGDl5Jr+csV5wW2BuOOvaG82zsvTriQBRFA==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.15.0.tgz", + "integrity": "sha512-YEtQPfdudafU7RBIFci81R/Q1yErm0mVh3BkGnXD2Dk8DLwTFdc2ITYH1wCnHKim2gnHfPFgrkh+b2ozyyU7ag==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", @@ -7059,9 +7188,9 @@ } }, "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "dev": true, "requires": { "esrecurse": "^4.3.0", @@ -7069,20 +7198,20 @@ } }, "eslint-visitor-keys": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", - "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "dev": true }, "espree": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", - "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "version": "9.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", + "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "dev": true, "requires": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.0" + "eslint-visitor-keys": "^3.4.1" } }, "esprima": { @@ -7171,6 +7300,15 @@ "reusify": "^1.0.4" } }, + "fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "requires": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + } + }, "file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -7244,6 +7382,14 @@ "signal-exit": "^3.0.2" } }, + "formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "requires": { + "fetch-blob": "^3.1.2" + } + }, "fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", @@ -7624,9 +7770,9 @@ } }, "is-builtin-module": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.0.tgz", - "integrity": "sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", "dev": true, "requires": { "builtin-modules": "^3.3.0" @@ -7847,12 +7993,24 @@ "dev": true }, "isomorphic-unfetch": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz", - "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-4.0.2.tgz", + "integrity": "sha512-1Yd+CF/7al18/N2BDbsLBcp6RO3tucSW+jcLq24dqdX5MNbCNTw1z4BsGsp4zNmjr/Izm2cs/cEqZPp4kvWSCA==", "requires": { - "node-fetch": "^2.6.1", - "unfetch": "^4.2.0" + "node-fetch": "^3.2.0", + "unfetch": "^5.0.0" + }, + "dependencies": { + "node-fetch": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", + "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", + "requires": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + } + } } }, "istanbul-lib-coverage": { @@ -7954,34 +8112,6 @@ "istanbul-lib-report": "^3.0.0" } }, - "jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "js-sdsl": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.1.5.tgz", @@ -8141,12 +8271,12 @@ } }, "magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz", + "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==", "dev": true, "requires": { - "sourcemap-codec": "^1.4.8" + "@jridgewell/sourcemap-codec": "^1.4.13" } }, "make-dir": { @@ -8194,12 +8324,6 @@ } } }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, "min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", @@ -8242,10 +8366,16 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" + }, "node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dev": true, "requires": { "whatwg-url": "^5.0.0" } @@ -9073,26 +9203,14 @@ } }, "rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "version": "3.21.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.6.tgz", + "integrity": "sha512-SXIICxvxQxR3D4dp/3LDHZIJPC8a4anKMHd4E3Jiz2/JnY+2bEjqrOokAauc5ShGVNFHlEFjBXAXlaxkJqIqSg==", "dev": true, "requires": { "fsevents": "~2.3.2" } }, - "rollup-plugin-terser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", - "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "jest-worker": "^26.2.1", - "serialize-javascript": "^4.0.0", - "terser": "^5.0.0" - } - }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -9136,15 +9254,6 @@ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, - "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -9194,6 +9303,12 @@ "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==", "dev": true }, + "smob": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/smob/-/smob-0.0.6.tgz", + "integrity": "sha512-V21+XeNni+tTyiST1MHsa84AQhT1aFZipzPpOFAVB8DkHzwJyjjAmt9bgwnuZiZWnIbMo2duE29wybxv/7HWUw==", + "dev": true + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -9218,12 +9333,6 @@ } } }, - "sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, "spawn-wrap": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", @@ -9495,9 +9604,9 @@ } }, "terser": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", - "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", + "version": "5.17.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.3.tgz", + "integrity": "sha512-AudpAZKmZHkG9jueayypz4duuCFJMMNGRMwaPvQKWfxKedh8Z2x3OCoDqIIi1xx5+iwx1u6Au8XQcc9Lke65Yg==", "dev": true, "requires": { "@jridgewell/source-map": "^0.3.2", @@ -9547,7 +9656,8 @@ "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true }, "trim": { "version": "1.0.1", @@ -9608,9 +9718,9 @@ } }, "unfetch": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", - "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-5.0.0.tgz", + "integrity": "sha512-3xM2c89siXg0nHvlmYsQ2zkLASvVMBisZm5lF3gFDqfF2xonNStDJyMpvaOBe0a1Edxmqrf2E0HBdmy9QyZaeg==" }, "update-browserslist-db": { "version": "1.0.10", @@ -9661,15 +9771,22 @@ "spdx-expression-parse": "^3.0.0" } }, + "web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" + }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true }, "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dev": true, "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" diff --git a/package.json b/package.json index c8fe3b3e..c471b315 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "exports": { ".": { "import": "./src/index.js", - "require": "./builds/wtf_wikipedia.cjs" + "require": "./builds/wtf_wikipedia.cjs", + "types": "./types/index.d.ts" } }, "author": "Spencer Kelly (http://spencermounta.in)", @@ -61,21 +62,21 @@ "printWidth": 120 }, "dependencies": { - "isomorphic-unfetch": "^3.1.0", + "isomorphic-unfetch": "4.0.2", "path-exists-cli": "2.0.0" }, "devDependencies": { - "@rollup/plugin-commonjs": "22.0.2", - "@rollup/plugin-node-resolve": "14.1.0", + "@rollup/plugin-commonjs": "24.1.0", + "@rollup/plugin-node-resolve": "15.0.2", + "@rollup/plugin-terser": "^0.4.1", "amble": "1.3.0", "codecov": "3.8.3", - "eslint": "8.38.0", + "eslint": "8.40.0", "eslint-plugin-compat": "4.1.4", - "eslint-plugin-regexp": "1.14.0", + "eslint-plugin-regexp": "1.15.0", "nyc": "^15.1.0", "recursive-install": "1.4.0", - "rollup": "2.79.1", - "rollup-plugin-terser": "7.0.2", + "rollup": "3.21.6", "shelljs": "0.8.5", "tap-dancer": "0.3.4", "tape": "5.6.3" diff --git a/rollup.config.js b/rollup.config.js index e770fe76..09b5cf12 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,5 +1,5 @@ import commonjs from '@rollup/plugin-commonjs' -import { terser } from 'rollup-plugin-terser' +import terser from '@rollup/plugin-terser' import { nodeResolve } from '@rollup/plugin-node-resolve' import { version } from './package.json' diff --git a/scratch.js b/scratch.js index fa5fb499..d2ff5825 100644 --- a/scratch.js +++ b/scratch.js @@ -9,14 +9,15 @@ wtf.plugin(plg) // console.log(doc.text()) -let str = ` {{Infobox officeholder - | name = Dr. Rajesh Sonkar - | office = [[President Bhartiya Janta Party(BJP) Indore, Madhya Pradesh]] - | term_start = 10 May 2020 - | Office = - }}` +let str = ` +{{PBPE|Camiseta|''t-shirt''}} ({{IPA-pt|tiˈʃɐrt|}}; {{IPA-en|ˈtiː ʃɜːɹt}}), é uma pequena [[camisa]], de mangas curtas ou sem mangas, geralmente em [[malharia|malha]] de [[algodão]], e mais recentemente em vários outros materiais, tais como [[poliéster]].{{Citar web|titulo=Significado de Camiseta|url=https://www.dicio.com.br/camiseta/|acessodata=10 de outubro de 2019|publicado=Dicio}} + +Trata-se de um elemento do [[vestuário]], que na contemporaneidade é utilizada pelas empresas de [[moda]] para estampar [[imagem|imagens]] e [[frase]]s chamativas. As estampas podem ser de temática [[política]], artística ou de identificação de um grupo, por exemplo militares, funcionário de uma empresa, torcida de um time de futebol, etc. + + +` let doc = wtf(str) -console.log(doc.infobox().json()) +console.log(doc.text()) // wtf.fetch("Formula One drivers from Finland", "en") diff --git a/src/template/custom/text-only/easy-inline.js b/src/template/custom/text-only/easy-inline.js index c123aef6..79043053 100644 --- a/src/template/custom/text-only/easy-inline.js +++ b/src/template/custom/text-only/easy-inline.js @@ -100,6 +100,7 @@ let zeros = [ 'bigdiv', 'strikethroughdiv', 'strikethrough color', + 'pbpe'//pt ] zeros.forEach((k) => { templates[k] = 0 From 9769d3518e0aaabba72d2c23de73390ece692a61 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Thu, 11 May 2023 12:15:58 -0400 Subject: [PATCH 4/7] update builds --- builds/wtf_wikipedia-client.min.js | 4 +- builds/wtf_wikipedia-client.mjs | 4 +- builds/wtf_wikipedia.cjs | 99 ++++++++++++++-- builds/wtf_wikipedia.mjs | 91 ++++++++++++++- package-lock.json | 178 ++++------------------------- package.json | 4 +- rollup.config.js | 3 +- 7 files changed, 202 insertions(+), 181 deletions(-) diff --git a/builds/wtf_wikipedia-client.min.js b/builds/wtf_wikipedia-client.min.js index f4ec36e2..38f8b403 100644 --- a/builds/wtf_wikipedia-client.min.js +++ b/builds/wtf_wikipedia-client.min.js @@ -1,2 +1,2 @@ -/*! wtf_wikipedia 10.1.4 MIT */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).wtf=t()}(this,(function(){"use strict";function e(e){var t=e.default;if("function"==typeof t){var i=function(){return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})})),i}var t=e(Object.freeze({__proto__:null,default:function(e,t){return t=t||{},new Promise((function(i,a){var n=new XMLHttpRequest,r=[],o=[],s={},l=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:l,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in n.open(t.method||"get",e,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,i){r.push(t=t.toLowerCase()),o.push([t,i]),s[t]=s[t]?s[t]+","+i:i})),i(l())},n.onerror=a,n.withCredentials="include"==t.credentials,t.headers)n.setRequestHeader(c,t.headers[c]);n.send(t.body||null)}))}})),i=self.fetch||(self.fetch=t.default||t);const a=function(e){let t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function n(e){return e&&"string"==typeof e?e=(e=(e=(e=e.replace(/^\s+/,"")).replace(/\s+$/,"")).replace(/ {2}/," ")).replace(/\s, /,", "):""}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}const o=/(wikibooks|wikidata|wikimedia|wikinews|wikipedia|wikiquote|wikisource|wikispecies|wikiversity|wikivoyage|wiktionary|foundation|meta)\.org/,s={action:"query",prop:"revisions|pageprops",rvprop:"content",maxlag:5,rvslots:"main",origin:"*",format:"json",redirects:"true"},l=e=>e.replace(/ /g,"_").trim(),c=function(e,t=s){let i=Object.assign({},t),a="";if(e.domain){let t=o.test(e.domain)?"w/api.php":e.path;a=`https://${e.domain}/${t}?`}else{if(!e.lang||!e.wiki)return"";a=`https://${e.lang}.${e.wiki}.org/w/api.php?`}e.follow_redirects||delete i.redirects,e.origin&&(i.origin=e.origin);let n=e.title;if("number"==typeof n)i.pageids=n;else if("string"==typeof n)i.titles=l(n);else if(void 0!==n&&r(n)&&"number"==typeof n[0])i.pageids=n.filter((e=>e)).join("|");else{if(void 0===n||!0!==r(n)||"string"!=typeof n[0])return"";i.titles=n.filter((e=>e)).map(l).join("|")}return`${a}${c=i,Object.entries(c).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&")}`;var c},u=function(e,t,i){let a=[];return e.sections().forEach((e=>{let n=[];n="string"==typeof i?e[t](i):e[t](),n.forEach((e=>{a.push(e)}))})),"number"==typeof i?void 0===a[i]?[]:[a[i]]:a},m=function(e,t){return Object.assign({},t,e)},p={title:!0,sections:!0,pageID:!0,categories:!0};var d=["category","abdeeling","bólkur","catagóir","categori","categoria","categoria","categoría","categorîa","categorìa","catégorie","categorie","catègorie","category","categuria","catigurìa","class","ẹ̀ka","flocc","flocc","flokkur","grup","jamii","kaarangay","kateggoría","kategooria","kategori","kategorî","kategoria","kategória","kategorie","kategoriija","kategorija","kategorio","kategoriya","kategoriýa","kategoriye","kategory","kategorya","kateqoriya","katiguriya","klad","luokka","ñemohenda","roinn","ronney","rummad","setensele","sokajy","sumut","thể","turkum","категорија","категория","категорія","катэгорыя","төркем","קטגוריה","تصنيف","تۈر","رده","श्रेणी","श्रेणी","বিষয়শ্রেণী","หมวดหมู่","분류","분류","分类"],h=["file","image","चित्र","archivo","attēls","berkas","bestand","datei","dosiero","dosya","fájl","fasciculus","fichier","fil","fitxategi","fitxer","gambar","imagem","imej","immagine","larawan","lêer","plik","restr","slika","wêne","wobraz","выява","податотека","слика","файл","სურათი","պատկեր","קובץ","پرونده","دوتنه","ملف","وێنە","चित्र","ไฟล์","파일","ファイル"],g=["infobox","anfo","anuāmapa","bilgi kutusu","bilgi","bilgiquti","boaty","boestkelaouiñ","bosca","capsa","diehtokássa","faktamall","ficha","generalni","gwybodlen3","info","infobokis","infoboks","infochascha","infokašćik","infokast","infokutija","infolentelė","infopolje","informkesto","infoskreine","infotaula","inligtingskas","inligtingskas3","inligtingskas4","kishtey","kotak","tertcita","tietolaatikko","yerleşim bilgi kutusu","ynfoboks","πλαίσιο","акарточка","аҥа","инфобокс","инфокутија","инфокутия","інфобокс","канадский","картка","карточка","карточка2","карточкарус","картуш","қуттӣ","ინფოდაფა","տեղեկաքարտ","אינפאקעסטל","תבנית","بطاقة","ڄاڻخانو","خانہ","لغة","ज्ञानसन्दूक","তথ্যছক","ਜਾਣਕਾਰੀਡੱਬਾ","సమాచారపెట్టె","තොරතුරුකොටුව","กล่องข้อมูล","ប្រអប់ព័ត៌មាន","정보상자","明細"];let b=" disambiguation";const f=["dab","dab","disamb","disambig","geodis","hndis","setindex","ship index","split dab","sport index","wp disambig","disambiguation cleanup","airport"+b,"biology"+b,"call sign"+b,"caselaw"+b,"chinese title"+b,"genus"+b,"hospital"+b,"lake index","letter"+b,"letter-number combination"+b,"mathematical"+b,"military unit"+b,"mountainindex","number"+b,"phonetics"+b,"place name"+b,"portal"+b,"road"+b,"school"+b,"species latin name abbreviation"+b,"species latin name"+b,"station"+b,"synagogue"+b,"taxonomic authority"+b,"taxonomy"+b].reduce(((e,t)=>(e[t]=!0,e)),{}),k=/. may (also )?refer to\b/i,w={about:!0,for:!0,"for multi":!0,"other people":!0,"other uses of":!0,distinguish:!0},y=new RegExp(". \\(("+["disambiguation","homonymie","توضيح","desambiguação","Begriffsklärung","disambigua","曖昧さ回避","消歧義","搞清楚","значения","ابهام‌زدایی","د ابہام","동음이의","dubbelsinnig","այլ կիրառումներ","ujednoznacznienie"].join("|")+")\\)$","i"),$=["dab","disamb","disambig","disambiguation","letter-numbercombdisambig","letter-number combination disambiguation","dmbox","airport disambiguation","biology disambiguation","call sign disambiguation","caselaw disambiguation","chinese title disambiguation","disambiguation cleanup","genus disambiguation","hospital disambiguation","human name disambiguation","human name disambiguation cleanup","letter-number combination disambiguation","mathematical disambiguation","military unit disambiguation","music disambiguation","number disambiguation","opus number disambiguation","phonetics disambiguation","place name disambiguation","portal disambiguation","road disambiguation","school disambiguation","species latin name abbreviation disambiguation","species latin name disambiguation","station disambiguation","synagogue disambiguation","taxonomic authority disambiguation","taxonomy disambiguation","template disambiguation","disamb2","disamb3","disamb4","disambiguation lead","disambiguation lead name","disambiguation name","disamb-term","disamb-terms","aðgreining","aimai","ałtsʼáʼáztiin","anlam ayrımı","anlam ayrımı","apartigilo","argipen","begriepskloorenge","begriffsklärung","begriffsklärung","begriffsklärung","begriffsklearung","bisongidila","bkl","bokokani","caddayn","clerheans","cudakirin","čvor","db","desambig","desambigación","desambiguação","desambiguació","desambiguación","desambiguáncia","desambiguasion","desambiguassiù","desambigui","dezambiguizare","dəqiqləşdirmə","disambigua","disambigua","disambigua","disambìgua","disambigua","disambiguasi","disambiguasi","discretiva","disheñvelout","disingkek","dixanbigua","dixebra","diżambigwazzjoni","doorverwijspagina","dp","dp","dubbelsinnig","dudalipen","dv","egyért","fleiri týdningar","fleirtyding","flertydig","förgrening","gì-ngiê","giklaro","gwahaniaethu","homonimo","homónimos","homonymie","huaʻōlelo puana like","idirdhealú","khu-pia̍t","kthjellim","kujekesa","maana","maneo bin","mehrdüdig begreep","menm non","muardüüdag artiikel","neibetsjuttings","nozīmju atdalīšana","nuorodinis","nyahkekaburan","omonimeye","omonimia","page dé frouque","paglilinaw","panangilawlawag","pansayod","pejy mitovy anarana","peker","razdvojba","razločitev","razvrstavanje","reddaghey","rozcestník","rozlišovacia stránka","sclerir noziun","selvendyssivu","soilleireachadh","suzmunski","täpsustuslehekülg","täsmennyssivu","telplänov","tlahtolmelahuacatlaliztli","trang định hướng","ujednoznacznienie","verdudeliking","wěcejwóznamowosć","wjacezmyslnosć","zambiguaçon","zeimeibu škiršona","αποσαφήνιση","айрық","аҵакырацәа","вишезначна одредница","ибҳомзудоӣ","кёб магъаналы","күп мәгънәләр","күп мәғәнәлелек","мъногосъмꙑслиѥ","неадназначнасць","неадназначнасьць","неоднозначность","олон удхатай","појаснување","пояснение","са шумуд манавал","салаа утгатай","суолталар","текмаанисиздик","цо магіна гуреб","чеперушка","чолхалла","шуко ончыктымаш-влак","მრავალმნიშვნელოვანი","բազմիմաստութիւն","բազմիմաստություն","באדייטן","פירושונים","ابهام‌زدایی","توضيح","توضيح","دقیقلشدیرمه","ڕوونکردنەوە","سلجهائپ","ضد ابہام","گجگجی بیری","نامبهمېدنه","መንታ","अस्पष्टता","बहुअर्थी","बहुविकल्पी शब्द","দ্ব্যর্থতা নিরসন","ਗੁੰਝਲ-ਖੋਲ੍ਹ","સંદિગ્ધ શીર્ષક","பக்கவழி நெறிப்படுத்தல்","అయోమయ నివృత్తి","ದ್ವಂದ್ವ ನಿವಾರಣೆ","വിവക്ഷകൾ","වක්‍රෝත්ති","แก้ความกำกวม","သံတူကြောင်းကွဲ","ណែនាំ","동음이의","扤清楚","搞清楚","曖昧さ回避","消歧义","釋義","gestion dj'omònim","sut'ichana qillqa"].reduce(((e,t)=>(e[t]=!0,e)),{}),x=function(e){if(!e)return!1;let t=e.text();return!(null===t||!t[0]||!0!==k.test(t))},v={caption:!0,alt:!0,links:!0,thumb:!0,url:!0},j=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_={file(){let e=this.data.file||"";if(e){/^(image|file):/i.test(e)||(e=`File:${e}`),e=e.trim(),e=e.charAt(0).toUpperCase()+e.substring(1),e=e.replace(/ /g,"_")}return e},alt(){let e=this.data.alt||this.data.file||"";return e=e.replace(/^(file|image):/i,""),e=e.replace(/\.(jpg|jpeg|png|gif|svg)/i,""),e.replace(/_/g," ")},caption(){return this.data.caption?this.data.caption.text():""},links(){return this.data.caption?this.data.caption.links():[]},url(){let e=function(e){let t=function(e){let t=e.replace(/^(image|file?):/i,"");return t=t.charAt(0).toUpperCase()+t.substring(1),t=t.trim().replace(/ /g,"_"),t}(e);return t=encodeURIComponent(t),t}(this.file());return`https://${this.data.domain||"wikipedia.org"}/wiki/Special:Redirect/file/${e}`},thumbnail(e){return e=e||300,this.url()+"?width="+e},format(){let e=this.file().split(".");return e[e.length-1]?e[e.length-1].toLowerCase():null},json:function(e){return function(e,t){t=m(t,v);let i={file:e.file()};return!1!==t.thumb&&(i.thumb=e.thumbnail()),!1!==t.url&&(i.url=e.url()),!1!==t.caption&&e.data.caption&&(i.caption=e.caption(),!1!==t.links&&e.data.caption.links()&&(i.links=e.links())),!1!==t.alt&&e.data.alt&&(i.alt=e.alt()),i}(this,e=e||{})},text:function(){return""},wikitext:function(){return this.data.wiki||""}};Object.keys(_).forEach((e=>{j.prototype[e]=_[e]})),j.prototype.src=j.prototype.url,j.prototype.thumb=j.prototype.thumbnail;var z={aa:"Afar",ab:"Аҧсуа",af:"Afrikaans",ak:"Akana",als:"Alemannisch",am:"አማርኛ",an:"Aragonés",ang:"Englisc",ar:"العربية",arc:"ܣܘܪܬ",as:"অসমীয়া",ast:"Asturianu",av:"Авар",ay:"Aymar",az:"Azərbaycanca",ba:"Башҡорт",bar:"Boarisch","bat-smg":"Žemaitėška",bcl:"Bikol",be:"Беларуская","be-x-old":"ltr",bg:"Български",bh:"भोजपुरी",bi:"Bislama",bm:"Bamanankan",bn:"বাংলা",bo:"བོད་ཡིག",bpy:"ltr",br:"Brezhoneg",bs:"Bosanski",bug:"ᨅᨔ",bxr:"ltr",ca:"Català",cdo:"Chinese",ce:"Нохчийн",ceb:"Sinugboanong",ch:"Chamoru",cho:"Choctaw",chr:"ᏣᎳᎩ",chy:"Tsetsêhestâhese",co:"Corsu",cr:"Nehiyaw",cs:"Česky",csb:"Kaszëbsczi",cu:"Slavonic",cv:"Чăваш",cy:"Cymraeg",da:"Dansk",de:"Deutsch",diq:"Zazaki",dsb:"ltr",dv:"ދިވެހިބަސް",dz:"ཇོང་ཁ",ee:"Ɛʋɛ",far:"فارسی",el:"Ελληνικά",en:"English",eo:"Esperanto",es:"Español",et:"Eesti",eu:"Euskara",ext:"Estremeñu",ff:"Fulfulde",fi:"Suomi","fiu-vro":"Võro",fj:"Na",fo:"Føroyskt",fr:"Français",frp:"Arpitan",fur:"Furlan",fy:"ltr",ga:"Gaeilge",gan:"ltr",gd:"ltr",gil:"Taetae",gl:"Galego",gn:"Avañe'ẽ",got:"gutisk",gu:"ગુજરાતી",gv:"Gaelg",ha:"هَوُسَ",hak:"ltr",haw:"Hawai`i",he:"עברית",hi:"हिन्दी",ho:"ltr",hr:"Hrvatski",ht:"Krèyol",hu:"Magyar",hy:"Հայերեն",hz:"Otsiherero",ia:"Interlingua",id:"Bahasa",ie:"Interlingue",ig:"Igbo",ii:"ltr",ik:"Iñupiak",ilo:"Ilokano",io:"Ido",is:"Íslenska",it:"Italiano",iu:"ᐃᓄᒃᑎᑐᑦ",ja:"日本語",jbo:"Lojban",jv:"Basa",ka:"ქართული",kg:"KiKongo",ki:"Gĩkũyũ",kj:"Kuanyama",kk:"Қазақша",kl:"Kalaallisut",km:"ភាសាខ្មែរ",kn:"ಕನ್ನಡ",khw:"کھوار",ko:"한국어",kr:"Kanuri",ks:"कश्मीरी",ksh:"Ripoarisch",ku:"Kurdî",kv:"Коми",kw:"Kernewek",ky:"Kırgızca",la:"Latina",lad:"Dzhudezmo",lan:"Leb",lb:"Lëtzebuergesch",lg:"Luganda",li:"Limburgs",lij:"Líguru",lmo:"Lumbaart",ln:"Lingála",lo:"ລາວ",lt:"Lietuvių",lv:"Latviešu","map-bms":"Basa",mg:"Malagasy",man:"官話",mh:"Kajin",mi:"Māori",min:"Minangkabau",mk:"Македонски",ml:"മലയാളം",mn:"Монгол",mo:"Moldovenească",mr:"मराठी",ms:"Bahasa",mt:"bil-Malti",mus:"Muskogee",my:"Myanmasa",na:"Dorerin",nah:"Nahuatl",nap:"Nnapulitano",nd:"ltr",nds:"Plattdüütsch","nds-nl":"Saxon",ne:"नेपाली",new:"नेपालभाषा",ng:"Oshiwambo",nl:"Nederlands",nn:"ltr",no:"Norsk",nr:"ltr",nso:"ltr",nrm:"Nouormand",nv:"Diné",ny:"Chi-Chewa",oc:"Occitan",oj:"ᐊᓂᔑᓈᐯᒧᐎᓐ",om:"Oromoo",or:"ଓଡ଼ିଆ",os:"Иронау",pa:"ਪੰਜਾਬੀ",pag:"Pangasinan",pam:"Kapampangan",pap:"Papiamentu",pdc:"ltr",pi:"Pāli",pih:"Norfuk",pl:"Polski",pms:"Piemontèis",ps:"پښتو",pt:"Português",qu:"Runa",rm:"ltr",rmy:"Romani",rn:"Kirundi",ro:"Română","roa-rup":"Armâneashti",ru:"Русский",rw:"Kinyarwandi",sa:"संस्कृतम्",sc:"Sardu",scn:"Sicilianu",sco:"Scots",sd:"सिनधि",se:"ltr",sg:"Sängö",sh:"Srpskohrvatski",si:"සිංහල",simple:"ltr",sk:"Slovenčina",sl:"Slovenščina",sm:"Gagana",sn:"chiShona",so:"Soomaaliga",sq:"Shqip",sr:"Српски",ss:"SiSwati",st:"ltr",su:"Basa",sv:"Svenska",sw:"Kiswahili",ta:"தமிழ்",te:"తెలుగు",tet:"Tetun",tg:"Тоҷикӣ",th:"ไทย",ti:"ትግርኛ",tk:"Туркмен",tl:"Tagalog",tlh:"tlhIngan-Hol",tn:"Setswana",to:"Lea",tpi:"ltr",tr:"Türkçe",ts:"Xitsonga",tt:"Tatarça",tum:"chiTumbuka",tw:"Twi",ty:"Reo",udm:"Удмурт",ug:"Uyƣurqə",uk:"Українська",ur:"اردو",uz:"Ўзбек",ve:"Tshivenḓa",vi:"Việtnam",vec:"Vèneto",vls:"ltr",vo:"Volapük",wa:"Walon",war:"Winaray",wo:"Wollof",xal:"Хальмг",xh:"isiXhosa",yi:"ייִדיש",yo:"Yorùbá",za:"Cuengh",zh:"中文","zh-classical":"ltr","zh-min-nan":"Bân-lâm-gú","zh-yue":"粵語",zu:"isiZulu"};const O=".wikipedia.org/wiki/$1",E=".wikimedia.org/wiki/$1",N="www.";var q={acronym:N+"acronymfinder.com/$1.html",advisory:"advisory"+E,advogato:N+"advogato.org/$1",aew:"wiki.arabeyes.org/$1",appropedia:N+"appropedia.org/$1",aquariumwiki:N+"theaquariumwiki.com/$1",arborwiki:"localwiki.org/ann-arbor/$1",arxiv:"arxiv.org/abs/$1",atmwiki:N+"otterstedt.de/wiki/index.php/$1",baden:N+"stadtwiki-baden-baden.de/wiki/$1/",battlestarwiki:"en.battlestarwiki.org/wiki/$1",bcnbio:"historiapolitica.bcn.cl/resenas_parlamentarias/wiki/$1",beacha:N+"beachapedia.org/$1",betawiki:"translatewiki.net/wiki/$1",bibcode:"adsabs.harvard.edu/abs/$1",bibliowiki:"wikilivres.org/wiki/$1",bluwiki:"bluwiki.com/go/$1",blw:"britainloves"+O,botwiki:"botwiki.sno.cc/wiki/$1",boxrec:N+"boxrec.com/media/index.php?$1",brickwiki:N+"brickwiki.info/wiki/$1",bugzilla:"bugzilla.wikimedia.org/show_bug.cgi?id=$1",bulba:"bulbapedia.bulbagarden.net/wiki/$1",c:"commons"+E,c2:"c2.com/cgi/wiki?$1",c2find:"c2.com/cgi/wiki?FindPage&value=$1",cache:N+"google.com/search?q=cache:$1","ĉej":"esperanto.blahus.cz/cxej/vikio/index.php/$1",cellwiki:"cell.wikia.com/wiki/$1",centralwikia:"community.wikia.com/wiki/$1",chej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",choralwiki:N+"cpdl.org/wiki/index.php/$1",citizendium:"en.citizendium.org/wiki/$1",ckwiss:N+"ck-wissen.de/ckwiki/index.php?title=$1",comixpedia:N+"comixpedia.org/index.php?title=$1",commons:"commons"+E,communityscheme:"community.schemewiki.org/?c=s&key=$1",communitywiki:"communitywiki.org/$1",comune:"rete.comuni-italiani.it/wiki/$1",creativecommons:"creativecommons.org/licenses/$1",creativecommonswiki:"wiki.creativecommons.org/$1",cxej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",dcc:N+"dccwiki.com/$1",dcdatabase:"dc.wikia.com/$1",dcma:"christian-morgenstern.de/dcma/index.php?title=$1",debian:"wiki.debian.org/$1",delicious:N+"delicious.com/tag/$1",devmo:"developer.mozilla.org/en/docs/$1",dictionary:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",dict:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",disinfopedia:"sourcewatch.org/index.php/$1",distributedproofreaders:N+"pgdp.net/wiki/$1",distributedproofreadersca:N+"pgdpcanada.net/wiki/index.php/$1",dmoz:"curlie.org/$1",dmozs:"curlie.org/search?q=$1",doi:"doi.org/$1",donate:"donate"+E,doom_wiki:"doom.wikia.com/wiki/$1",download:"releases.wikimedia.org/$1",dbdump:"dumps.wikimedia.org/$1/latest/",dpd:"lema.rae.es/dpd/?key=$1",drae:"dle.rae.es/?w=$1",dreamhost:"wiki.dreamhost.com/index.php/$1",drumcorpswiki:N+"drumcorpswiki.com/index.php/$1",dwjwiki:N+"suberic.net/cgi-bin/dwj/wiki.cgi?$1","eĉei":N+"ikso.net/cgi-bin/wiki.pl?$1",ecoreality:N+"EcoReality.org/wiki/$1",ecxei:N+"ikso.net/cgi-bin/wiki.pl?$1",elibre:"enciclopedia.us.es/index.php/$1",emacswiki:N+"emacswiki.org/emacs?$1",encyc:"encyc.org/wiki/$1",energiewiki:N+"netzwerk-energieberater.de/wiki/index.php/$1",englyphwiki:"en.glyphwiki.org/wiki/$1",enkol:"enkol.pl/$1",eokulturcentro:"esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1",esolang:"esolangs.org/wiki/$1",etherpad:"etherpad.wikimedia.org/$1",ethnologue:N+"ethnologue.com/language/$1",ethnologuefamily:N+"ethnologue.com/show_family.asp?subid=$1",evowiki:"wiki.cotch.net/index.php/$1",exotica:N+"exotica.org.uk/wiki/$1",fanimutationwiki:"wiki.animutationportal.com/index.php/$1",fedora:"fedoraproject.org/wiki/$1",finalfantasy:"finalfantasy.wikia.com/wiki/$1",finnix:N+"finnix.org/$1",flickruser:N+"flickr.com/people/$1",flickrphoto:N+"flickr.com/photo.gne?id=$1",floralwiki:N+"floralwiki.co.uk/wiki/$1",foldoc:"foldoc.org/$1",foundation:"foundation"+E,foundationsite:"wikimediafoundation.org/$1",foxwiki:"fox.wikis.com/wc.dll?Wiki~$1",freebio:"freebiology.org/wiki/$1",freebsdman:N+"FreeBSD.org/cgi/man.cgi?apropos=1&query=$1",freeculturewiki:"wiki.freeculture.org/index.php/$1",freedomdefined:"freedomdefined.org/$1",freefeel:"freefeel.org/wiki/$1",freekiwiki:"wiki.freegeek.org/index.php/$1",freesoft:"directory.fsf.org/wiki/$1",ganfyd:"ganfyd.org/index.php?title=$1",gardenology:N+"gardenology.org/wiki/$1",gausswiki:"gauss.ffii.org/$1",gentoo:"wiki.gentoo.org/wiki/$1",genwiki:"wiki.genealogy.net/index.php/$1",gerrit:"gerrit.wikimedia.org/r/$1",git:"gerrit.wikimedia.org/g/$1",google:N+"google.com/search?q=$1",googledefine:N+"google.com/search?q=define:$1",googlegroups:"groups.google.com/groups?q=$1",guildwarswiki:"wiki.guildwars.com/wiki/$1",guildwiki:"guildwars.wikia.com/wiki/$1",guc:"tools.wmflabs.org/guc/?user=$1",gucprefix:"tools.wmflabs.org/guc/?isPrefixPattern=1&src=rc&user=$1",gutenberg:N+"gutenberg.org/etext/$1",gutenbergwiki:N+"gutenberg.org/wiki/$1",hackerspaces:"hackerspaces.org/wiki/$1",h2wiki:"halowiki.net/p/$1",hammondwiki:N+"dairiki.org/HammondWiki/index.php3?$1",hdl:"hdl.handle.net/$1",heraldik:"heraldik-wiki.de/wiki/$1",heroeswiki:"heroeswiki.com/$1",horizonlabs:"horizon.wikimedia.org/$1",hrwiki:N+"hrwiki.org/index.php/$1",hrfwiki:"fanstuff.hrwiki.org/index.php/$1",hupwiki:"wiki.hup.hu/index.php/$1",iarchive:"archive.org/details/$1",imdbname:N+"imdb.com/name/nm$1/",imdbtitle:N+"imdb.com/title/tt$1/",imdbcompany:N+"imdb.com/company/co$1/",imdbcharacter:N+"imdb.com/character/ch$1/",incubator:"incubator"+E,infosecpedia:"infosecpedia.org/wiki/$1",infosphere:"theinfosphere.org/$1","iso639-3":"iso639-3.sil.org/code/$1",issn:N+"worldcat.org/issn/$1",iuridictum:"iuridictum.pecina.cz/w/$1",jaglyphwiki:"glyphwiki.org/wiki/$1",jefo:"esperanto-jeunes.org/wiki/$1",jerseydatabase:"jerseydatabase.com/wiki.php?id=$1",jira:"jira.toolserver.org/browse/$1",jspwiki:N+"ecyrd.com/JSPWiki/Wiki.jsp?page=$1",jstor:N+"jstor.org/journals/$1",kamelo:"kamelopedia.mormo.org/index.php/$1",karlsruhe:"ka.stadtwiki.net/$1",kinowiki:"kino.skripov.com/index.php/$1",komicawiki:"wiki.komica.org/?$1",kontuwiki:"kontu.wiki/$1",wikitech:"wikitech"+E,libreplanet:"libreplanet.org/wiki/$1",linguistlist:"linguistlist.org/forms/langs/LLDescription.cfm?code=$1",linuxwiki:N+"linuxwiki.de/$1",linuxwikide:N+"linuxwiki.de/$1",liswiki:"liswiki.org/wiki/$1",literateprograms:"en.literateprograms.org/$1",livepedia:N+"livepedia.gr/index.php?title=$1",localwiki:"localwiki.org/$1",lojban:"mw.lojban.org/papri/$1",lostpedia:"lostpedia.wikia.com/wiki/$1",lqwiki:"wiki.linuxquestions.org/wiki/$1",luxo:"tools.wmflabs.org/guc/?user=$1",mail:"lists.wikimedia.org/mailman/listinfo/$1",mailarchive:"lists.wikimedia.org/pipermail/$1",mariowiki:N+"mariowiki.com/$1",marveldatabase:N+"marveldatabase.com/wiki/index.php/$1",meatball:"meatballwiki.org/wiki/$1",mw:N+"mediawiki.org/wiki/$1",mediazilla:"bugzilla.wikimedia.org/$1",memoryalpha:"memory-alpha.fandom.com/wiki/$1",metawiki:"meta"+E,metawikimedia:"meta"+E,metawikipedia:"meta"+E,mineralienatlas:N+"mineralienatlas.de/lexikon/index.php/$1",moinmoin:"moinmo.in/$1",monstropedia:N+"monstropedia.org/?title=$1",mosapedia:"mosapedia.de/wiki/index.php/$1",mozcom:"mozilla.wikia.com/wiki/$1",mozillawiki:"wiki.mozilla.org/$1",mozillazinekb:"kb.mozillazine.org/$1",musicbrainz:"musicbrainz.org/doc/$1",mediawikiwiki:N+"mediawiki.org/wiki/$1",mwod:N+"merriam-webster.com/dictionary/$1",mwot:N+"merriam-webster.com/thesaurus/$1",nkcells:N+"nkcells.info/index.php?title=$1",nara:"catalog.archives.gov/id/$1",nosmoke:"no-smok.net/nsmk/$1",nost:"nostalgia"+O,nostalgia:"nostalgia"+O,oeis:"oeis.org/$1",oldwikisource:"wikisource.org/wiki/$1",olpc:"wiki.laptop.org/go/$1",omegawiki:N+"omegawiki.org/Expression:$1",onelook:N+"onelook.com/?ls=b&w=$1",openlibrary:"openlibrary.org/$1",openstreetmap:"wiki.openstreetmap.org/wiki/$1",openwetware:"openwetware.org/wiki/$1",opera7wiki:"operawiki.info/$1",organicdesign:N+"organicdesign.co.nz/$1",orthodoxwiki:"orthodoxwiki.org/$1",osmwiki:"wiki.openstreetmap.org/wiki/$1",otrs:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=$1",otrswiki:"otrs-wiki"+E,ourmedia:N+"socialtext.net/ourmedia/index.cgi?$1",outreach:"outreach"+E,outreachwiki:"outreach"+E,owasp:N+"owasp.org/index.php/$1",panawiki:"wiki.alairelibre.net/index.php?title=$1",patwiki:"gauss.ffii.org/$1",personaltelco:"personaltelco.net/wiki/$1",petscan:"petscan.wmflabs.org/?psid=$1",phab:"phabricator.wikimedia.org/$1",phabricator:"phabricator.wikimedia.org/$1",phwiki:N+"pocketheaven.com/ph/wiki/index.php?title=$1",phpwiki:"phpwiki.sourceforge.net/phpwiki/index.php?$1",planetmath:"planetmath.org/node/$1",pmeg:N+"bertilow.com/pmeg/$1",pmid:N+"ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract",pokewiki:"pokewiki.de/$1","pokéwiki":"pokewiki.de/$1",policy:"policy.wikimedia.org/$1",proofwiki:N+"proofwiki.org/wiki/$1",pyrev:N+"mediawiki.org/wiki/Special:Code/pywikipedia/$1",pythoninfo:"wiki.python.org/moin/$1",pythonwiki:N+"pythonwiki.de/$1",pywiki:"c2.com/cgi/wiki?$1",psycle:"psycle.sourceforge.net/wiki/$1",quality:"quality"+E,quarry:"quarry.wmflabs.org/$1",regiowiki:"regiowiki.at/wiki/$1",rev:N+"mediawiki.org/wiki/Special:Code/MediaWiki/$1",revo:"purl.org/NET/voko/revo/art/$1.html",rfc:"tools.ietf.org/html/rfc$1",rheinneckar:"rhein-neckar-wiki.de/$1",robowiki:"robowiki.net/?$1",rodovid:"en.rodovid.org/wk/$1",reuterswiki:"glossary.reuters.com/index.php/$1",rowiki:"wiki.rennkuckuck.de/index.php/$1",rt:"rt.wikimedia.org/Ticket/Display.html?id=$1",s23wiki:"s23.org/wiki/$1",scholar:"scholar.google.com/scholar?q=$1",schoolswp:"schools-"+O,scores:"imslp.org/wiki/$1",scoutwiki:"en.scoutwiki.org/$1",scramble:N+"scramble.nl/wiki/index.php?title=$1",seapig:N+"seapig.org/$1",seattlewiki:"seattle.wikia.com/wiki/$1",slwiki:"wiki.secondlife.com/wiki/$1","semantic-mw":N+"semantic-mediawiki.org/wiki/$1",senseislibrary:"senseis.xmp.net/?$1",sharemap:"sharemap.org/$1",silcode:N+"sil.org/iso639-3/documentation.asp?id=$1",slashdot:"slashdot.org/article.pl?sid=$1",sourceforge:"sourceforge.net/$1",spcom:"spcom"+E,species:"species"+E,squeak:"wiki.squeak.org/squeak/$1",stats:"stats.wikimedia.org/$1",stewardry:"tools.wmflabs.org/meta/stewardry/?wiki=$1",strategy:"strategy"+E,strategywiki:"strategywiki.org/wiki/$1",sulutil:"meta.wikimedia.org/wiki/Special:CentralAuth/$1",swtrain:"train.spottingworld.com/$1",svn:"svn.wikimedia.org/viewvc/mediawiki/$1?view=log",swinbrain:"swinbrain.ict.swin.edu.au/wiki/$1",tabwiki:N+"tabwiki.com/index.php/$1",tclerswiki:"wiki.tcl.tk/$1",technorati:N+"technorati.com/search/$1",tenwiki:"ten"+O,testwiki:"test"+O,testwikidata:"test.wikidata.org/wiki/$1",test2wiki:"test2"+O,tfwiki:"tfwiki.net/wiki/$1",thelemapedia:N+"thelemapedia.org/index.php/$1",theopedia:N+"theopedia.com/$1",thinkwiki:N+"thinkwiki.org/wiki/$1",ticket:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=$1",tmbw:"tmbw.net/wiki/$1",tmnet:N+"technomanifestos.net/?$1",tmwiki:N+"EasyTopicMaps.com/?page=$1",toolforge:"tools.wmflabs.org/$1",toollabs:"tools.wmflabs.org/$1",tools:"toolserver.org/$1",tswiki:N+"mediawiki.org/wiki/Toolserver:$1",translatewiki:"translatewiki.net/wiki/$1",tviv:"tviv.org/wiki/$1",tvtropes:N+"tvtropes.org/pmwiki/pmwiki.php/Main/$1",twiki:"twiki.org/cgi-bin/view/$1",tyvawiki:N+"tyvawiki.org/wiki/$1",umap:"umap.openstreetmap.fr/$1",uncyclopedia:"en.uncyclopedia.co/wiki/$1",unihan:N+"unicode.org/cgi-bin/GetUnihanData.pl?codepoint=$1",unreal:"wiki.beyondunreal.com/wiki/$1",urbandict:N+"urbandictionary.com/define.php?term=$1",usej:N+"tejo.org/usej/$1",usemod:N+"usemod.com/cgi-bin/wiki.pl?$1",usability:"usability"+E,utrs:"utrs.wmflabs.org/appeal.php?id=$1",vikidia:"fr.vikidia.org/wiki/$1",vlos:"tusach.thuvienkhoahoc.com/wiki/$1",vkol:"kol.coldfront.net/thekolwiki/index.php/$1",voipinfo:N+"voip-info.org/wiki/view/$1",votewiki:"vote"+E,werelate:N+"werelate.org/wiki/$1",wg:"wg-en"+O,wikia:N+"wikia.com/wiki/w:c:$1",wikiasite:N+"wikia.com/wiki/w:c:$1",wikiapiary:"wikiapiary.com/wiki/$1",wikibooks:"en.wikibooks.org/wiki/$1",wikichristian:N+"wikichristian.org/index.php?title=$1",wikicities:N+"wikia.com/wiki/w:$1",wikicity:N+"wikia.com/wiki/w:c:$1",wikiconference:"wikiconference.org/wiki/$1",wikidata:N+"wikidata.org/wiki/$1",wikif1:N+"wikif1.org/$1",wikifur:"en.wikifur.com/wiki/$1",wikihow:N+"wikihow.com/$1",wikiindex:"wikiindex.org/$1",wikilemon:"wiki.illemonati.com/$1",wikilivres:"wikilivres.org/wiki/$1",wikilivresru:"wikilivres.ru/$1","wikimac-de":"apfelwiki.de/wiki/Main/$1",wikimedia:"foundation"+E,wikinews:"en.wikinews.org/wiki/$1",wikinfo:"wikinfo.org/w/index.php/$1",wikinvest:"meta.wikimedia.org/wiki/Interwiki_map/discontinued#Wikinvest",wikiotics:"wikiotics.org/$1",wikipapers:"wikipapers.referata.com/wiki/$1",wikipedia:"en"+O,wikipediawikipedia:"en.wikipedia.org/wiki/Wikipedia:$1",wikiquote:"en.wikiquote.org/wiki/$1",wikisophia:"wikisophia.org/index.php?title=$1",wikisource:"en.wikisource.org/wiki/$1",wikispecies:"species"+E,wikispot:"wikispot.org/?action=gotowikipage&v=$1",wikiskripta:N+"wikiskripta.eu/index.php/$1",labsconsole:"wikitech"+E,wikiti:"wikiti.denglend.net/index.php?title=$1",wikiversity:"en.wikiversity.org/wiki/$1",wikivoyage:"en.wikivoyage.org/wiki/$1",betawikiversity:"beta.wikiversity.org/wiki/$1",wikiwikiweb:"c2.com/cgi/wiki?$1",wiktionary:"en.wiktionary.org/wiki/$1",wipipedia:"wipipedia.org/index.php/$1",wlug:N+"wlug.org.nz/$1",wmam:"am"+E,wmar:N+"wikimedia.org.ar/wiki/$1",wmat:"mitglieder.wikimedia.at/$1",wmau:"wikimedia.org.au/wiki/$1",wmbd:"bd"+E,wmbe:"be"+E,wmbr:"br"+E,wmca:"ca"+E,wmch:N+"wikimedia.ch/$1",wmcl:N+"wikimediachile.cl/index.php?title=$1",wmcn:"cn"+E,wmco:"co"+E,wmcz:N+"wikimedia.cz/web/$1",wmdc:"wikimediadc.org/wiki/$1",securewikidc:"secure.wikidc.org/$1",wmde:"wikimedia.de/wiki/$1",wmdk:"dk"+E,wmee:"ee"+E,wmec:"ec"+E,wmes:N+"wikimedia.es/wiki/$1",wmet:"ee"+E,wmfdashboard:"outreachdashboard.wmflabs.org/$1",wmfi:"fi"+E,wmfr:"wikimedia.fr/$1",wmge:"ge"+E,wmhi:"hi"+E,wmhk:"meta.wikimedia.org/wiki/Wikimedia_Hong_Kong",wmhu:"wikimedia.hu/wiki/$1",wmid:"id"+E,wmil:N+"wikimedia.org.il/$1",wmin:"wiki.wikimedia.in/$1",wmit:"wiki.wikimedia.it/wiki/$1",wmke:"meta.wikimedia.org/wiki/Wikimedia_Kenya",wmmk:"mk"+E,wmmx:"mx"+E,wmnl:"nl"+E,wmnyc:"nyc"+E,wmno:"no"+E,"wmpa-us":"pa-us"+E,wmph:"meta.wikimedia.org/wiki/Wikimedia_Philippines",wmpl:"pl"+E,wmpt:"pt"+E,wmpunjabi:"punjabi"+E,wmromd:"romd"+E,wmrs:"rs"+E,wmru:"ru"+E,wmse:"se"+E,wmsk:"wikimedia.sk/$1",wmtr:"tr"+E,wmtw:"wikimedia.tw/wiki/index.php5/$1",wmua:"ua"+E,wmuk:"wikimedia.org.uk/wiki/$1",wmve:"wikimedia.org.ve/wiki/$1",wmza:"wikimedia.org.za/wiki/$1",wm2005:"wikimania2005"+E,wm2006:"wikimania2006"+E,wm2007:"wikimania2007"+E,wm2008:"wikimania2008"+E,wm2009:"wikimania2009"+E,wm2010:"wikimania2010"+E,wm2011:"wikimania2011"+E,wm2012:"wikimania2012"+E,wm2013:"wikimania2013"+E,wm2014:"wikimania2014"+E,wm2015:"wikimania2015"+E,wm2016:"wikimania2016"+E,wm2017:"wikimania2017"+E,wm2018:"wikimania2018"+E,wmania:"wikimania"+E,wikimania:"wikimania"+E,wmteam:"wikimaniateam"+E,wmf:"foundation"+E,wmfblog:"blog.wikimedia.org/$1",wmdeblog:"blog.wikimedia.de/$1",wookieepedia:"starwars.wikia.com/wiki/$1",wowwiki:N+"wowwiki.com/$1",wqy:"wqy.sourceforge.net/cgi-bin/index.cgi?$1",wurmpedia:"wurmpedia.com/index.php/$1",viaf:"viaf.org/viaf/$1",zrhwiki:N+"zrhwiki.ch/wiki/$1",zum:"wiki.zum.de/$1",zwiki:N+"zwiki.org/$1",m:"meta"+E,meta:"meta"+E,sep11:"sep11"+O,d:N+"wikidata.org/wiki/$1",minnan:"zh-min-nan"+O,nb:"no"+O,"zh-cfr":"zh-min-nan"+O,"zh-cn":"zh"+O,"zh-tw":"zh"+O,nan:"zh-min-nan"+O,vro:"fiu-vro"+O,cmn:"zh"+O,lzh:"zh-classical"+O,rup:"roa-rup"+O,gsw:"als"+O,"be-tarask":"be-x-old"+O,sgs:"bat-smg"+O,egl:"eml"+O,w:"en"+O,wikt:"en.wiktionary.org/wiki/$1",q:"en.wikiquote.org/wiki/$1",b:"en.wikibooks.org/wiki/$1",n:"en.wikinews.org/wiki/$1",s:"en.wikisource.org/wiki/$1",chapter:"en"+E,v:"en.wikiversity.org/wiki/$1",voy:"en.wikivoyage.org/wiki/$1"};Object.keys(z).forEach((e=>{q[e]=e+".wikipedia.org/wiki/$1"}));const S=/^(category|catégorie|kategorie|categoría|categoria|categorie|kategoria|تصنيف|image|file|fichier|datei|media):/i,C=/\[(https?|news|ftp|mailto|gopher|irc)(:\/\/[^\]| ]{4,1500})([| ].*?)?\]/g,L=/\[\[(.{0,1600}?)\]\]([a-z]+)?/gi,A=function(e,t){return t.replace(L,(function(t,i,a){let n=null,r=i;if(i.match(/\|/)&&(r=(i=i.replace(/\[\[(.{2,1000}?)\]\](\w{0,10})/g,"$1$2")).replace(/(.{2,1000})\|.{0,2000}/,"$1"),n=i.replace(/.{2,1000}?\|/,""),null===n&&r.match(/\|$/)&&(r=r.replace(/\|$/,""),n=r)),r.match(S))return i;let o={page:r,raw:t};return o.page=o.page.replace(/#(.*)/,((e,t)=>(o.anchor=t,""))),o=function(e){let t=e.page||"";if(-1!==t.indexOf(":")){let i=t.match(/^(.*):(.*)/);if(null===i)return e;let a=i[1]||"";if(a=a.toLowerCase(),-1!==a.indexOf(":")){let[,t,i]=a.match(/^:?(.*):(.*)/);if(!1===q.hasOwnProperty(t)||!1===z.hasOwnProperty(i))return e;e.wiki={wiki:t,lang:i}}else{if(!1===q.hasOwnProperty(a))return e;e.wiki=a}e.page=i[2]}return e}(o),o.wiki&&(o.type="interwiki"),null!==n&&n!==o.page&&(o.text=n),a&&(o.text=o.text||o.page,o.text+=a.trim()),o.page&&!1===/^[A-Z]/.test(o.page)&&(o.text||(o.text=o.page),o.page=o.page),o.text&&o.text.startsWith(":")&&(o.text=o.text.replace(/^:/,"")),e.push(o),i})),e},P=function(e){let t=[];if(t=function(e,t){return t.replace(C,(function(t,i,a,n){return n=n||"",e.push({type:"external",site:i+a,text:n.trim(),raw:t}),n})),e}(t,e),t=A(t,e),0!==t.length)return t},T=new RegExp("^[ \n\t]*?#("+["adkas","aýdaw","doorverwijzing","ohjaus","patrz","přesměruj","redirección","redireccion","redirección","redirecionamento","redirect","redirection","redirection","rinvia","tilvísun","uudelleenohjaus","weiterleitung","weiterleitung","yönlendi̇r","yönlendirme","yönlendi̇rme","ανακατευθυνση","айдау","перанакіраваньне","перенаправлення","пренасочување","преусмери","преусмјери","تغییر_مسیر","تغییرمسیر","تغییرمسیر","เปลี่ยนทาง","ប្តូរទីតាំងទៅ","転送","重定向"].join("|")+") *?(\\[\\[.{2,180}?\\]\\])","i"),D=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","references","source","syntaxhighlight","timeline"],I=`< ?(${D.join("|")}) ?[^>]{0,200}?>`,M=`< ?/ ?(${D.join("|")}) ?>`,U=new RegExp(`${I}[\\s\\S]+?${M}`,"gi");function R(e){return e=(e=(e=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(U," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%.\-#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/
(.*?)<\/blockquote>/g,"{{blockquote|text=$1}}")).replace(/ ?<[ /]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr|u)[ /]?> ?/g," ")).replace(/ ?<[ /]?(abbr|bdi|bdo|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ /]?> ?/g," ")).replace(/ ?<[ /]?h[0-9][ /]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()}(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~{2,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," ")).replace(/–/g,"–"))).replace(/\([,;: ]+\)/g,"")).replace(/\{\{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,"")}const F=/[\\.$]/,B=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},K=function(e={}){let t=Object.keys(e);for(let i=0;i{Y.prototype[e]=Z[e]}));const G=/^[0-9,.]+$/,V={text:!0,links:!0,formatting:!0,numbers:!0},J=function(e={}){Object.defineProperty(this,"data",{enumerable:!1,value:e})},X={links:function(e){let t=this.data.links||[];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page===e));return void 0===i?[]:[i]}return t},interwiki:function(){return this.links().filter((e=>void 0!==e.wiki))},bolds:function(){return this.data&&this.data.fmt&&this.data.fmt.bold&&this.data.fmt.bold||[]},italics:function(){return this.data&&this.data.fmt&&this.data.fmt.italic&&this.data.fmt.italic||[]},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return function(e,t){t=m(t,V);let i={},a=e.text();if(!0===t.text&&(i.text=a),!0===t.numbers&&G.test(a)){let e=Number(a.replace(/,/g,""));!1===isNaN(e)&&(i.number=e)}return t.links&&e.links().length>0&&(i.links=e.links().map((e=>e.json()))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i}(this,e)},wikitext:function(){return this.data.wiki||""},isEmpty:function(){return""===this.data.text}};Object.keys(X).forEach((e=>{J.prototype[e]=X[e]}));const Q={links:"link",bolds:"bold",italics:"italic"};Object.keys(Q).forEach((e=>{J.prototype[Q[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}})),J.prototype.plaintext=J.prototype.text;const ee=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),te=new RegExp("(^| |')("+ee.join("|")+")[.!?] ?$","i"),ie=/[ .'][A-Z].? *$/i,ae=/\.{3,} +$/,ne=/ c\.\s$/,re=/\p{Letter}/iu;function oe(e){let t={wiki:e,text:e};return function(e){let t=e.text,i=P(t)||[];e.links=i.map((e=>(t=t.replace(e.raw,e.text||e.page||""),new Y(e)))),t=t.replace(/\[\[File:(.{2,80}?)\|([^\]]+)\]\](\w{0,5})/g,"$1"),e.text=t}(t),t.text=n(t.text.replace(/\([,;: ]*\)/g,"").replace(/\( *(; ?)+/g,"(")).replace(/ +\.$/,"."),t=function(e){let t=[],i=[],a=e.text||"";return a=a.replace(/'''''(.{0,2500}?)'''''/g,((e,a)=>(t.push(a),i.push(a),a))),a=a.replace(/''''(.{0,2500}?)''''/g,((e,i)=>(t.push(`'${i}'`),`'${i}'`))),a=a.replace(/'''(.{0,2500}?)'''/g,((e,i)=>(t.push(i),i))),a=a.replace(/''(.{0,2500}?)''/g,((e,t)=>(i.push(t),t))),e.text=a,t.length>0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e}(t),new J(t)}const se=function(e){let t=function(e){let t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;let a=function(e){let t=e.split(/(\n+)/);return t=t.filter((e=>e.match(/\S/))),t=t.map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s|$)/g)})),function(e){let t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t)}(e);for(let e=0;ei.length)return!1;const a=e.match(/"/g);if(a&&a.length%2!=0&&e.length<900)return!1;const n=e.match(/[()]/g);return!(n&&n.length%2!=0&&e.length<900)}(n))?/^\s/.test(i[e+1])||/\s$/.test(i[e])?i[e+1]=i[e]+i[e+1]:i[e+1]=i[e]+" "+i[e+1]:i[e]&&i[e].length>0&&(t.push(i[e]),i[e]="");var n;return 0===t.length?[e]:t}(e.wiki);t=t.map(oe),t[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},le=/.*rowspan *= *["']?([0-9]+)["']?[ |]*/,ce=/.*colspan *= *["']?([0-9]+)["']?[ |]*/,ue=function(e){return e=function(e){return e.forEach(((t,i)=>{t.forEach(((a,n)=>{let r=a.match(le);if(null!==r){let o=parseInt(r[1],10);a=a.replace(le,""),t[n]=a;for(let t=i+1;t{e.forEach(((t,i)=>{let a=t.match(ce);if(null!==a){let n=parseInt(a[1],10);e[i]=t.replace(ce,"");for(let t=1;te.length>0))}(e))},me=/^!/,pe={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},de=function(e){return(e=oe(e).text()).match(/\|/)&&(e=e.replace(/.*?\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},he=function(e){if(e.length<=3)return[];let t=e[0].slice(0);t=t.map((e=>(e=oe(e=e.replace(/^! */,"")).text(),e=(e=de(e)).toLowerCase())));for(let i=0;ie&&!0!==/^\|\+/.test(e))),!0===/^\{\|/.test(e[0])&&e.shift(),!0===/^\|\}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(let a=0;a0&&(t.push(i),i=[]);else{let e=n.charAt(0);"|"!==e&&"!"!==e||(n=n.substring(1)),n=n.split(/(?:\|\||!!)/),"!"===e&&(n[0]=e+n[0]),n.forEach((e=>{e=e.trim(),i.push(e)}))}}return i.length>0&&t.push(i),t}(e.replace(/\r/g,"").replace(/\n(\s*[^|!{\s])/g," $1").split(/\n/).map((e=>e.trim())));if(t=t.filter((e=>e)),0===t.length)return[];t=function(e){return e.filter((e=>1!==e.length||!e[0]||!me.test(e[0])||!1!==/rowspan/i.test(e[0])))}(t),t=ue(t);let i=function(e=[]){let t=[];var i;(i=(i=e[0])||[]).length-i.filter((e=>e)).length>3&&e.shift();let a=e[0];return a&&a[0]&&a[1]&&(/^!/.test(a[0])||/^!/.test(a[1]))&&(t=a.map((e=>(e=e.replace(/^! */,""),de(e)))),e.shift()),a=e[0],a&&a[0]&&a[1]&&/^!/.test(a[0])&&/^!/.test(a[1])&&(a.forEach(((e,i)=>{e=e.replace(/^! */,""),e=de(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(t);if(!i||i.length<=1){i=he(t);let e=t[t.length-1]||[];i.length<=1&&e.length>2&&(i=he(t.slice(1)),i.length>0&&(t=t.slice(2)))}let a=t.map((e=>function(e,t){let i={};return e.forEach(((e,a)=>{let n=t[a]||"col"+(a+1),r=oe(e);r.text(de(r.text())),i[n]=r})),i}(e,i)));return a},be={},fe=function(e=""){return e=(e=(e=(e=e.toLowerCase()).replace(/[_-]/g," ")).replace(/\(.*?\)/,"")).trim()},ke=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_wiki",{enumerable:!1,value:t})},we={links(e){let t=[];if(this.data.forEach((e=>{Object.keys(e).forEach((i=>{t=t.concat(e[i].links())}))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},get(e){let t=this.data[0]||{},i=Object.keys(t).reduce(((e,t)=>(e[fe(t)]=t,e)),{});if("string"==typeof e){let t=fe(e);return t=i[t]||t,this.data.map((e=>e[t]?e[t].text():null))}return e=e.map(fe).map((e=>i[e]||e)),this.data.map((t=>e.reduce(((e,i)=>(t[i]?e[i]=t[i].text():e[i]="",e)),{})))},keyValue(e){let t=this.json(e);return t.forEach((e=>{Object.keys(e).forEach((t=>{e[t]=e[t].text}))})),t},json(e){return e=m(e,be),function(e,t){return e.map((e=>{let i={};return Object.keys(e).forEach((t=>{i[t]=e[t].json()})),!0===t.encode&&(i=K(i)),i}))}(this.data,e)},text:()=>"",wikitext(){return this._wiki||""}};we.keyvalue=we.keyValue,we.keyval=we.keyValue,Object.keys(we).forEach((e=>{ke.prototype[e]=we[e]}));const ye=/^\s*\{\|/,$e=/^\s*\|\}/,xe={sentences:!0},ve={sentences:!0,lists:!0,images:!0},je=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_e={sentences:function(){return this.data.sentences||[]},references:function(){return this.data.references},lists:function(){return this.data.lists},images(){return this.data.images||[]},links:function(e){let t=[];if(this.sentences().forEach((i=>{t=t.concat(i.links(e))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},interwiki(){let e=[];return this.sentences().forEach((t=>{e=e.concat(t.interwiki())})),e||[]},text:function(e){e=m(e,ve);let t=this.sentences().map((t=>t.text(e))).join(" ");return this.lists().forEach((e=>{t+="\n"+e.text()})),t},json:function(e){return function(e,t){let i={};return!0===(t=m(t,xe)).sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=m(e,ve))},wikitext:function(){return this.data.wiki}};_e.citations=_e.references,Object.keys(_e).forEach((e=>{je.prototype[e]=_e[e]}));const ze={sentences:"sentence",references:"reference",citations:"citation",lists:"list",images:"image",links:"link"};Object.keys(ze).forEach((e=>{je.prototype[ze[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}}));const Oe=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},Ee=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},Ne=/^[\p{Letter}0-9._/\- '()\t]+=/iu,qe={template:!0,list:!0,prototype:!0},Se=function(e,t){let i=0;return e.reduce(((e,a="")=>{if(a=a.trim(),!0===Ne.test(a)){let t=function(e){let t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();let a=t.slice(1).join("=");return qe.hasOwnProperty(i)&&(i="_"+i),{key:i,val:a.trim()}}(a);if(t.key)return e[t.key]=t.val,e}if(t&&t[i]){e[t[i]]=a}else e.list=e.list||[],e.list.push(a);return i+=1,e}),{})},Ce={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Le=function(e,t){let i=oe(e);return"json"===t?i.json():"raw"===t?i:i.text()},Ae=function(e,t=[],i){let a=function(e){let t=e.split(/\n?\|/);t.forEach(((e,i)=>{null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)})),t=t.filter((e=>null!==e)),t=t.map((e=>(e||"").trim()));for(let e=t.length-1;e>=0;e-=1){""===t[e]&&t.pop();break}return t}(e=Oe(e||"")),n=a.shift(),r=Se(a,t);return r=function(e){return Object.keys(e).forEach((t=>{!0===Ce[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e}(r),r[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((e=>{r[e]="list"!==e?Le(r[e],i):r[e].map((e=>Le(e,i)))})),n&&(r.template=Ee(n)),r};const Pe=new RegExp("("+h.join("|")+"):","i");let Te=`(${h.join("|")})`;const De=new RegExp(Te+":(.+?)[\\||\\]]","iu"),Ie=/^\[\[:/,Me={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},Ue=function(e,t){let i=e.wiki,a=function(e){let t=[],i=[];const a=e.split("");let n=0;for(let r=0;r0){let e=0,a=0;for(let t=0;ta&&i.push("]"),t.push(i.join("")),i=[]}}return t}(i);a.forEach((function(a){if(!0===Pe.test(a)){e.images=e.images||[];let n=function(e,t){let i=e.match(De);if(null===i||!i[2])return null;if(Ie.test(e))return null;let a=`${i[1]}:${i[2]||""}`;if(a){let i={file:a,lang:t._lang,domain:t._domain,wiki:e,pluginData:{}};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");let n=Ae(e),r=n.list||[];return n.alt&&(i.alt=n.alt),r=r.filter((e=>!1===Me.hasOwnProperty(e))),r[r.length-1]&&(i.caption=oe(r[r.length-1])),new j(i)}return null}(a,t);n&&(e.images.push(n),i=i.replace(a,""))}})),e.wiki=i},Re={},Fe=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},Be={lines(){return this.data},links(e){let t=[];if(this.lines().forEach((e=>{t=t.concat(e.links())})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},json(e){return e=m(e,Re),this.lines().map((t=>t.json(e)))},text(){return((e,t)=>e.map((e=>" * "+e.text(t))).join("\n"))(this.data)},wikitext(){return this.wiki||""}};Object.keys(Be).forEach((e=>{Fe.prototype[e]=Be[e]}));const Ke=/^[#*:;|]+/,We=/^\*+[^:,|]{4}/,He=/^ ?#[^:,|]{4}/,Ye=/[\p{Letter}_0-9\]}]/iu,Ze=function(e){return Ke.test(e)||We.test(e)||He.test(e)},Ge=function(e,t){let i=[];for(let a=t;ae&&Ye.test(e))),i=function(e){let t=1;e=e.filter((e=>e));for(let i=0;ie&&e.trim().length>0)),a=a.map((e=>{let i={wiki:e,lists:[],sentences:[],images:[]};return function(e){let t=e.wiki,i=t.split(/\n/g),a=[],n=[];for(let e=0;e0&&(a.push(t),e+=t.length-1)}else n.push(i[e]);e.lists=a.map((e=>new Fe(e,t))),e.wiki=n.join("\n")}(i),Ue(i,t),se(i),new je(i)})),e._wiki=i,e._paragraphs=a},Xe="{",Qe=function(e){let t=0,i=[],a=[];for(let n=e.indexOf(Xe);-1!==n&&n0?n++:n=e.indexOf(Xe,n+1)){let r=e[n];if(r===Xe&&(t+=1),t>0){if("}"===r&&(t-=1,0===t)){a.push(r);let e=a.join("");a=[],/\{\{/.test(e)&&/\}\}/.test(e)&&i.push(e);continue}if(1===t&&r!==Xe&&"}"!==r){t=0,a=[];continue}a.push(r)}}return i},et=function(e){let t=null;return t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1],t&&(t=t.replace(/:.*/,""),t=Ee(t)),t||null},tt=/\{\{/,it=function(e){return{body:e,name:et(e),children:[]}},at=function(e){let t=e.body.substr(2);return t=t.replace(/\}\}$/,""),e.children=Qe(t),e.children=e.children.map(it),0===e.children.length||e.children.forEach((e=>{let t=e.body.substr(2);return tt.test(t)?at(e):null})),e},nt=function(e){let t=Qe(e);return t=t.map(it),t=t.map(at),t},rt=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce(((e,t)=>(e[t]=!0,e)),{});var ot={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0};const st=new RegExp("^(subst.)?("+g.join("|")+")(?=:| |\n|$)","i");g.forEach((e=>{ot[e]=!0}));const lt=/^infobox /i,ct=/ infobox$/i,ut=/^year in [A-Z]/i,mt=function(e={}){let t=e.template.match(st),i=e.template;t&&t[0]&&(i=i.replace(t[0],"")),i=i.trim();let a={template:"infobox",type:i,data:e};return delete a.data.template,delete a.data.list,a};let pt={imdb:"imdb name","imdb episodes":"imdb episode",localday:"currentday",localdayname:"currentdayname",localyear:"currentyear","birth date based on age at death":"birth based on age as of date","bare anchored list":"anchored list",cvt:"convert",cricon:"flagicon",sfrac:"frac",sqrt:"radic","unreferenced section":"unreferenced",redir:"redirect",sisterlinks:"sister project links","main article":"main",by:"baseball year",aldsy:"alds year",nldsy:"nlds year","str rep":"replace",ushr2:"ushr",stn:"station",metrod:"metro",fw:"ferry",rws:"stnlnk",sclass2:"sclass"},dt={date:["byline","dateline"],citation:["cite","source","source-pr","source-science"],"no spam":["email","@","no spam blue"],"lrt station":["lrt","lrts"],"mrt station":["mrt","mrts"],flagcountry:["cr","cr-rt"],trunc:["str left","str crop"],percentage:["pct","percentage"],rnd:["rndfrac","rndnear"],abbr:["tooltip","abbrv","define"],sfn:["sfnref","harvid","harvnb"],"birth date and age":["death date and age","bda"],currentmonth:["localmonth","currentmonthname","currentmonthabbrev"],currency:["monnaie","unité","nombre","nb","iso4217"],coord:["coor","coor title dms","coor title dec","coor dms","coor dm","coor dec"],"columns-list":["cmn","col-list","columnslist","collist"],nihongo:["nihongo2","nihongo3","nihongo-s","nihongo foot"],plainlist:["flatlist","plain list"],"winning percentage":["winpct","winperc"],"collapsible list":["nblist","nonbulleted list","ubl","ublist","ubt","unbullet","unbulleted list","unbulleted","unbulletedlist","vunblist"],"election box begin":["election box begin no change","election box begin no party","election box begin no party no change","election box inline begin","election box inline begin no change"],"election box candidate":["election box candidate for alliance","election box candidate minor party","election box candidate no party link no change","election box candidate with party link","election box candidate with party link coalition 1918","election box candidate with party link no change","election box inline candidate","election box inline candidate no change","election box inline candidate with party link","election box inline candidate with party link no change","election box inline incumbent"],"4teambracket":["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"],start:["end","birth","death","start date","end date","birth date","death date","start date and age","end date and age","dob"],"start-date":["end-date","birth-date","death-date","birth-date and age","birth-date and given age","death-date and age","death-date and given age"],tl:["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","xpd","para","elc","xtag","mli","mlix","url"],done:["resolved mark large","implemented","pimplemented","resolved mark","accepted","agree","approved","checked2","verified","conditional yes","confirmed","confirmed-nc","tallyho","tick","helped","doneu|example","edited2","donetask","unprod","autp","responded","sure","merge done","marked","pass","aye","yes check","y&","yeac","yeag"],xmark:["expired","deleted","not done","not done empty request","not done unclear","not done not likely","stale-small","smallrejected","x mark","nay","no mark","not done-t","fail","n&","x mark-n","xed box","cancelled","deleted-image","already declined","opblocked","user-blocked","notabug","notfixed","won't fix","withdraw","nojoy","unrelated","off-topic talk","nayc","nayg"],checked:["already done","resolved1","check mark-n","checked box"],"station link":["amtk","cta","bts","mnrr","mtams","munis","njts","scax","wmata","rwsa"]};Object.keys(z).forEach((e=>{pt["ipa-"+e]="ipa",pt["ipac-"+e]="ipac"})),Object.keys(dt).forEach((e=>{dt[e].forEach((t=>{pt[t]=e}))}));var ht={"·":"·",dot:"·",middot:"·","•":" • ",",":",","=":"=","1/2":"1⁄2","1/3":"1⁄3","2/3":"2⁄3","1/4":"1⁄4","3/4":"3⁄4","–":"–",ndash:"–","en dash":"–","spaced ndash":" – ","—":"—",mdash:"—",spd:" – ","em dash":"—","number sign":"#","hash-tag":"#",ibeam:"I","&":"&",";":";",ampersand:"&",dagger:"†","double-dagger":"‡",snds:" – ",snd:" – ","^":" ","!":"|","'":"'","\\":" /","`":"`",bracket:"[","[":"[","*":"*",asterisk:"*","long dash":"———",clear:"\n\n","h.":"ḥ",profit:"▲",loss:"▼",gain:"▲",ell:"ℓ","1~":"~","2~":"~~","3~":"~~~","4~":"~~~~","5~":"~~~~~",goldmedal:"🥇",silvermedal:"🥈",bronzemedal:"🥉",done:"✅",xmark:"❌",checked:"✔️","thumbs up":"👍","thumbs down":"👎"};let gt={p1:0,p2:1,p3:2,resize:1,lang:1,"rtl-lang":1,l:2,h:1,sort:1};["defn","lino","finedetail","nobold","noitalic","nocaps","vanchor","rnd","date","taste","monthname","baseball secondary style","nowrap","nobr","big","cquote","pull quote","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code","char","angle bracket","angbr","symb","dabsearch","key press","nowiki","nowiki2","unstrip","UnstripNoWiki","plain text","make code","killmarkers"].forEach((e=>{gt[e]=0}));let bt={};["mv","m/v","gts","hsc","ms","m/s","my","m/y","ps","rms","rv","r/v","sb","ss","s/s","sv","s/v","sy","s/y","tss","ans","hmas","hmbs","bns","hmcs","ccgs","arc","hdms","bae","ens","eml","rfns","fns","hs","sms","smu","gs","icgv","ins","kri","lé","jsub","jds","js","hnlms","hmnzs","nns","hnoms","hmpngs","bap","rps","brp","orp","nrp","nms","rss","sas","hmsas","roks","hswms","htms","tcg","hms","hmt","rfaux","usat","uscgc","usns","usrc","uss","usav"].forEach((e=>{bt[e]=t=>{let{name:i,id:a}=Ae(t,["name","id"]);return a?`[[${e.toUpperCase()} ${i} (${a})]]`:`[[${e.toUpperCase()} ${i}]]`}}));const ft=function(e){if(!e.numerator&&!e.denominator)return null;let t=Number(e.numerator)/Number(e.denominator);return t*=100,Number(e.decimals),parseInt(t,10)},kt=function(e=""){if("number"==typeof e)return e;e=(e=e.replace(/,/g,"")).replace(/−/g,"-");let t=Number(e);return isNaN(t)?e:t},wt=function(e){let t=e.match(/ipac?-(.+)/);return null!==t?!0===z.hasOwnProperty(t[1])?z[t[1]].english_title:t[1]:null},yt=e=>e.charAt(0).toUpperCase()+e.substring(1),$t=function(e){let t=e%10,i=e%100;return 1===t&&11!==i?e+"st":2===t&&12!==i?e+"nd":3===t&&13!==i?e+"rd":e+"th"},xt={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"};var vt={ra:e=>{let t=Ae(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:e=>(Ae(e,["degrees"]).degrees||"")+"°",hms2deg:e=>{let t=Ae(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:e=>{let t=Ae(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},sortname:e=>{let t=Ae(e,["first","last","target","sort"]),i=`${t.first||""} ${t.last||""}`;return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=` (${t.dab})`,t.target&&(t.target+=` (${t.dab})`)),t.target?`[[${t.target}|${i}]]`:`[[${i}]]`)},"first word":e=>{let t=Ae(e,["text"]),i=t.text||"";return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:e=>{let t=Ae(e,["str","len"]);return(t.str||"").substr(0,t.len)},"str mid":e=>{let t=Ae(e,["str","start","end"]),i=parseInt(t.start,10)-1,a=parseInt(t.end,10);return t.str.substr(i,a)},reign:e=>{let t=Ae(e,["start","end"]);return`(r. ${t.start} – ${t.end})`},circa:e=>{let{year:t}=Ae(e,["year"]);return t?`c. ${t}`:"c. "},"decade link":e=>{let{year:t}=Ae(e,["year"]);return`${t}|${t}s`},decade:e=>{let t=Ae(e,["year"]),i=Number(t.year);return i=10*Math.floor(i/10),`${i}s`},century:e=>{let t=Ae(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/100)+1,`${i}`},radic:e=>{let t=Ae(e,["after","before"]);return`${t.before||""}√${t.after||""}`},"medical cases chart/row":e=>e,oldstyledate:e=>{let t=Ae(e,["date","year"]);return t.year?t.date+" "+t.year:t.date},braces:e=>{let t=Ae(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},hlist:e=>{let t=Ae(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:e=>(Ae(e).list||[]).join(", "),catlist:e=>(Ae(e).list||[]).join(", "),"br separated entries":e=>(Ae(e).list||[]).join("\n\n"),"comma separated entries":e=>(Ae(e).list||[]).join(", "),"anchored list":e=>{let t=Ae(e).list||[];return t=t.map(((e,t)=>`${t+1}. ${e}`)),t.join("\n\n")},"bulleted list":e=>{let t=Ae(e).list||[];return t=t.filter((e=>e)),t=t.map((e=>"• "+e)),t.join("\n\n")},plainlist:e=>{let t=(e=Oe(e)).split("|").slice(1);return t=t.join("|").split(/\n ?\* ?/),t=t.filter((e=>e)),t.join("\n\n")},term:e=>`${Ae(e,["term"]).term}:`,linum:e=>{let{num:t,text:i}=Ae(e,["num","text"]);return`${t}. ${i}`},"block indent":e=>{let t=Ae(e);return t[1]?"\n"+t[1]+"\n":""},lbs:e=>{let t=Ae(e,["text"]);return`[[${t.text} Lifeboat Station|${t.text}]]`},lbc:e=>{let t=Ae(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}-class]]`},lbb:e=>{let t=Ae(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}]]`},"#dateformat":e=>(e=e.replace(/:/,"|"),Ae(e,["date","format"]).date),lc:e=>(e=e.replace(/:/,"|"),(Ae(e,["text"]).text||"").toLowerCase()),uc:e=>(e=e.replace(/:/,"|"),(Ae(e,["text"]).text||"").toUpperCase()),lcfirst:e=>{e=e.replace(/:/,"|");let t=Ae(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},ucfirst:e=>{e=e.replace(/:/,"|");let t=Ae(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:e=>{e=e.replace(/:/,"|");let t=Ae(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:e=>{e=e.replace(/:/,"|");let t=Ae(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbrlink:e=>{let t=Ae(e,["abbr","page"]);return t.page?`[[${t.page}|${t.abbr}]]`:`[[${t.abbr}]]`},own:e=>{let t=Ae(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},formatnum:e=>{e=e.replace(/:/,"|");let t=Ae(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},frac:e=>{let t=Ae(e,["a","b","c"]);return t.c?`${t.a} ${t.b}/${t.c}`:t.b?`${t.a}/${t.b}`:`1/${t.b}`},convert:e=>{let t=Ae(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?`${t.num} ${t.two} ${t.three} ${t.four}`:`${t.num} ${t.two} ${t.three}`:`${t.num} ${t.two}`},tl:e=>{let t=Ae(e,["first","second"]);return t.second||t.first},won:e=>{let t=Ae(e,["text"]);return t.place||t.text||yt(t.template)},tag:e=>{let t=Ae(e,["tag","open"]);const i={span:!0,div:!0,p:!0};return t.open&&"pair"!==t.open?"":i[t.tag]?t.content||"":`<${t.tag} ${t.attribs||""}>${t.content||""}`},plural:e=>{e=e.replace(/plural:/,"plural|");let t=Ae(e,["num","word"]),i=Number(t.num),a=t.word;return 1!==i&&(/.y$/.test(a)?a=a.replace(/y$/,"ies"):a+="s"),i+" "+a},dec:e=>{let t=Ae(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:e=>{let t=Ae(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());let a=i||"";return t.p&&(a=t.p+a),t.s&&(a=t.s+a),(t.u||t.ul||t.upl)&&(a=a+" "+(t.u||t.ul||t.upl)),a},percentage:e=>{let t=Ae(e,["numerator","denominator","decimals"]),i=ft(t);return null===i?"":i+"%"},small:e=>{let t=Ae(e);return t.list&&t.list[0]?t.list[0]:""},"percent-done":e=>{let t=Ae(e,["done","total","digits"]),i=ft({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":`${t.done} (${i}%) done`},loop:e=>{let t=Ae(e,["times","text"]),i=Number(t.times)||0,a="";for(let e=0;e{let t=Ae(e,["text"]);return String((t.text||"").trim().length)},digits:e=>(Ae(e,["text"]).text||"").replace(/[^0-9]/g,""),"last word":e=>{let t=(Ae(e,["text"]).text||"").split(/ /g);return t[t.length-1]||""},replace:e=>{let t=Ae(e,["text","from","to"]);return t.from&&t.to?(t.text||"").replace(t.from,t.to):t.text||""},"title case":e=>(Ae(e,["text"]).text||"").split(/ /).map(((e,t)=>t>0&&"the"===e||"of"===e?e:yt(e))).join(" "),"no spam":e=>{let t=Ae(e,["account","domain"]);return`${t.account||""}@${t.domain}`},"baseball year":e=>{let t=Ae(e,["year"]).year||"";return`[[${t} in baseball|${t}]]`},"mlb year":e=>{let t=Ae(e,["year"]).year||"";return`[[${t} Major League Baseball season|${t}]]`},"nlds year":e=>{let{year:t}=Ae(e,["year"]);return`[[${t||""} National League Division Series|${t}]]`},"alds year":e=>{let{year:t}=Ae(e,["year"]);return`[[${t||""} American League Division Series|${t}]]`},"nfl year":e=>{let{year:t,other:i}=Ae(e,["year","other"]);return i&&t?`[[${t} NFL season|${t}]]–[[${i} NFL season|${i}]]`:`[[${t||""} NFL season|${t}]]`},"nfl playoff year":e=>{let{year:t}=Ae(e,["year"]);return t=Number(t),`[[${t}–${t+1} NFL playoffs|${t}]]`},"nba year":e=>{let{year:t}=Ae(e,["year"]);t=Number(t);let i=t+1;return`[[${t}–${i} NBA season|${t}–${i}]]`},"mhl year":e=>{let t=Ae(e,["year"]),i=Number(t.year),a=i+1;return`[[${i}–${a} NHL season|${i}–${a}]]`},min:e=>{let t=Ae(e).list||[],i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t{let t=Ae(e).list,i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t>i&&(i=t)})),String(i)},uspolabbr:e=>{let{party:t,state:i,house:a}=Ae(e,["party","state","house","link"]);if(!t||!i)return"";let n=`${t}‑${i}`;return a&&(n+=` ${$t(a)}`),n},ushr:e=>{let{state:t,num:i,type:a}=Ae(e,["state","num","type"]),n="";if("AL"!==i)return i=$t(Number(i)),`${t}'s ${i} congressional district`;if(n=`${t}'s at-large congressional district`,a){if(a=a.toLowerCase(),i="AL"===i?"At-large":i,"e"===a)return`[[${n}|${i}]]`;if("u"===a)return`[[${n}|${t}]]`;if("b"===a||"x"===a)return`[[${n}|${t} ${i}]]`}return`[[${n}]]`},metro:e=>{let{name:t,dab:i}=Ae(e,["name","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},station:e=>{let{name:t,dab:i}=Ae(e,["name","x","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},bssrws:e=>{let{one:t,two:i}=Ae(e,["one","two"]),a=t;return i&&(a+=" "+i),`[[${a} railway station|${a}]]`},stnlnk:e=>{let{name:t,dab:i}=Ae(e,["name","dab"]);return i?`[[${t} railway station (${i})|${t}]]`:`[[${t} railway station|${t}]]`},"station link":e=>{let{station:t,system:i}=Ae(e,["system","station"]);return t||i},"line link":e=>{let{station:t,system:i}=Ae(e,["system","station"]);return t||i},subway:e=>{let{name:t}=Ae(e,["name"]);return`[[${t} subway station|${t}]]`},"lrt station":e=>{let{name:t}=Ae(e,["name"]);return`[[${t} LRT station|${t}]]`},"mrt station":e=>{let{name:t}=Ae(e,["name"]);return`[[${t} MRT station|${t}]]`},rht:e=>{let{name:t}=Ae(e,["name"]);return`[[${t} railway halt|${t}]]`},ferry:e=>{let{name:t}=Ae(e,["name"]);return`[[${t} ferry wharf|${t}]]`},tram:e=>{let{name:t,dab:i}=Ae(e,["name","dab"]);return i?`[[${t} tram stop (${i})|${t}]]`:`[[${t} tram stop|${t}]]`},tstop:e=>{let{name:t,dab:i}=Ae(e,["name","dab"]);return i?`[[${t} ${i} stop|${t}]]`:`[[${t} stop|${t}]]`},ship:e=>{let{prefix:t,name:i,id:a}=Ae(e,["prefix","name","id"]);return t=t||"",`[[${t.toUpperCase()} ${i}]]`},sclass:e=>{let{cl:t,type:i}=Ae(e,["cl","type","fmt"]);return`[[${t}-class ${i} |''${t}''-class]] [[${i}]]`},"in title":e=>{let{title:t,text:i}=Ae(e,["title","text"]);return i||(t?`All pages with titles containing ${t}`:"")},"look from":e=>{let{title:t,text:i}=Ae(e,["title","text"]);return i||(t?`All pages with titles beginning with ${t}`:"")}};let jt={};["sr-latn-cyrl","sr-cyrl-latn","sr-latn","sr-cyrl","sr-cyr","sh-latn-cyrl","sh-cyrl-latn","sh-latn","sh-cyrl","cel-1bd","cel-x-proto","en-emodeng","de-at","de-ch","gem-x-proto","gsw-fr","nds-nl","nl-be","ku-arab","ku-cyrl","pt-br","fra-frc","fra-que","roa-leo","roa-nor","ca-valencia","ast-leo","grc-gre","grc-x-doric","grc-x-proto","grc-x-medieval","cpg","gmy","grc","grk-x-proto","pnt","mga","owl","pgl","sga","wlm","xbm","xcb","xcg","xpi","aae","aln","sq-definite","bs-cyrl","hsb","ltg","orv","prg","rsk","rue","rus","sgs","sla","szl","wen","aoa","chn","cri","dlm","egl","fax","frc","frm","fro","fr-gallo","oc-gascon","gcf","gcr","ist","la-x-medieval","lij-mc","lld","lou","mfe","mol","mwl","mxi","nrf","osc","osp","pcd","pln","rcf","rgn","roa","ruo","rup","ruq","sdc","sdn","src","sro","xvo","bzj","cim","dum","enm","frk","frr","frs","gmh","gml","gmw","goh","gos","gsw","gyn","icr","jam","kri","lng","nb","non","nrn","odt","ofs","osx","pey","sli","srm","srn","stq","swg","vmf","wae","wep","wes","zea","hmd","hoc","kha","mnw","mtq","vi-chunom","vi-hantu","mvi","rys","ryu","yoi","ace","akl","ami","bew","bik","bjn","bya","cal","cbk","cjm","coa","cyo","dev","fil","gad","hil","iba","ibg","ibl","ilp","itv","ivv","jax","kne","krj","kxd","ljp","mad","mak","mdh","mrv","mrw","ms-arab","nia","niu","pau","pwn","rap","rar","sgd","su-fonts","szy","tao","tkl","tsg","tvl","uli","wls","xsb","yap","yka","ckt","itl","brh","oty","tcy","abq","ady","ddo","inh","kbd","lbe","lez","rut","tab","uby","udi","bai","bin","bsq","dag","dyu","efi","fan","fmp","fuc","fuf","gaa","ibb","kbp","kcg","kpo","ktu","lu","lua","lun","mkw","mos","oaa","sjo","ude","anm","bft","blk","brx","dng","kjp","kjz","ksw","lbj","lus","aae","aaq","abe","abq","aca","ace","acf","acm","acw","ady","ae","aeb","aec","aer","afb","aht","aii","aij","ain","aiq","akk","akl","akz","ale","aln","alq","alt","ami","anm","aoa","apj","apm","apw","ayn","arb","arh","ari","arn","arp","arq","ary","arz","asb","ath","ats","awa","axm","azb","azd","azj","bai","bal","ban","bax","bdz","bea","ber","bew","bft","bgn","bho","bik","bin","bjn","bla","blc","blk","bqi","brh","brx","bsk","bsq","bua","bvb","bya","bzj","cal","cay","cbk","ccp","chg","chm","chn","chp","cic","cim","ciw","cjm","cjs","ckb","ckt","cku","cld","clm","cmg","cmn","cms","cnu","coa","coc","coj","com","coo","cop","cpg","crg","crh","cri","crj","crk","crl","crm","cro","csw","csz","ctg","ctm","cyo","dag","dak","ddo","deh","del","den","dev","din","dlm","dng","dum","dyu","efi","egl","egy","elx","eml","ems","cmn","och","yue","mjw","mni","my-name-mlcts","nan","nwc","omp","otb","pwo","sip","xct","xsr","1ca","alt","az-arab","azb","azj","chg","cjs","crh","crh3","kaa","kjh","krc","kum","nog","ota","otk","sah","slr","sty","tt-arab","tt-cyrl","tt-latn","tyv","uniturk","chm","est-sea","fit","fkv","izh","jmy","koi","krl","liv","mdf","mhr","mrj","myv","olo","sia","sjd","sje","sjk","sjt","sju","sma","smi","smj","smn","sms","vep","vot","vro","yrk","din","luo","srr","sus","swh","umb","yao"].forEach((e=>{jt["lang-"+e]=0})),Object.keys(z).forEach((e=>{jt["lang-"+e]=0}));var _t=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","us","united states"],["🇺🇸","usa","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]];const zt=["flag","variant"];let Ot={flag:e=>{let t=Ae(e,zt),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();let a=_t.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${a[0]||""} [[${a[2]}|${i}]]`},flagcountry:e=>{let t=Ae(e,zt);t.flag=(t.flag||"").toLowerCase();let i=_t.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} [[${i[2]}]]`},flagcu:e=>{let t=Ae(e,zt);t.flag=(t.flag||"").toLowerCase();let i=_t.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} ${i[2]}`},flagicon:e=>{let t=Ae(e,zt);t.flag=(t.flag||"").toLowerCase();let i=_t.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`[[${i[2]}|${i[0]}]]`:""},flagdeco:e=>{let t=Ae(e,zt);return t.flag=(t.flag||"").toLowerCase(),(_t.find((e=>t.flag===e[1]||t.flag===e[2]))||[])[0]||""},fb:e=>{let t=Ae(e,zt);t.flag=(t.flag||"").toLowerCase();let i=_t.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${i[2]} national football team|${i[2]}]]`:""},fbicon:e=>{let t=Ae(e,zt);t.flag=(t.flag||"").toLowerCase();let i=_t.find((e=>t.flag===e[1]||t.flag===e[2]));return i?` [[${i[2]} national football team|${i[0]}]]`:""},flagathlete:e=>{let t=Ae(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=_t.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${t.name||""}]] (${i[1].toUpperCase()})`:`[[${t.name||""}]]`}};_t.forEach((e=>{Ot[e[1]]=()=>e[0]}));let Et={};["rh","rh2","yes","no","maybe","eliminated","lost","safe","active","site active","coming soon","good","won","nom","sho","longlisted","tba","success","operational","failure","partial","regional","maybecheck","partial success","partial failure","okay","yes-no","some","nonpartisan","pending","unofficial","unofficial2","usually","rarely","sometimes","any","varies","black","non-album single","unreleased","unknown","perhaps","depends","included","dropped","terminated","beta","table-experimental","free","proprietary","nonfree","needs","nightly","release-candidate","planned","scheduled","incorrect","no result","cmain","calso starring","crecurring","cguest","not yet","optional"].forEach((e=>{Et[e]=e=>{let t=Ae(e,["text"]);return t.text||yt(t.template)}}));[["active fire","Active"],["site active","Active"],["site inactive","Inactive"],["yes2",""],["no2",""],["ya","✅"],["na","❌"],["nom","Nominated"],["sho","Shortlisted"],["tba","TBA"],["maybecheck","✔️"],["okay","Neutral"],["n/a","N/A"],["sdash","—"],["dunno","?"],["draw",""],["cnone",""],["nocontest",""]].forEach((e=>{Et[e[0]]=t=>Ae(t,["text"]).text||e[1]}));var Nt=Object.assign({},ht,gt,bt,vt,jt,Ot,Et);let qt={};["goodreads author","twitter","facebook","instagram","tumblr","pinterest","espn nfl","espn nhl","espn fc","hockeydb","fifa player","worldcat","worldcat id","nfl player","ted speaker","playmate"].forEach((e=>{qt[e]=["id","name"]}));let St={};["imdb title","imdb name","imdb episode","imdb event","afi film","allmovie title","allgame","tcmdb title","discogs artist","discogs label","discogs release","discogs master","librivox author","musicbrainz artist","musicbrainz label","musicbrainz recording","musicbrainz release","musicbrainz work","youtube","goodreads book","dmoz"].forEach((e=>{St[e]=["id","title","description","section"]}));var Ct={ipa:(e,t)=>{let i=Ae(e,["transcription","lang","audio"]);return i.lang=wt(i.template),i.template="ipa",t.push(i),""},ipac:(e,t)=>{let i=Ae(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=wt(i.template),i.template="ipac",t.push(i),""},quote:(e,t)=>{let i=Ae(e,["text","author"]);if(t.push(i),i.text){let e=`"${i.text}"`;return i.author&&(e+="\n\n",e+=` - ${i.author}`),e+"\n"}return""},"cite gnis":(e,t)=>{let i=Ae(e,["id","name","type"]);return i.type="gnis",i.template="citation",t.push(i),""},"spoken wikipedia":(e,t)=>{let i=Ae(e,["file","date"]);return i.template="audio",t.push(i),""},yel:(e,t)=>{let i=Ae(e,["min"]);return t.push(i),i.min?`yellow: ${i.min||""}'`:""},subon:(e,t)=>{let i=Ae(e,["min"]);return t.push(i),i.min?`sub on: ${i.min||""}'`:""},suboff:(e,t)=>{let i=Ae(e,["min"]);return t.push(i),i.min?`sub off: ${i.min||""}'`:""},sfn:(e,t,i,a)=>{let n=Ae(e,["author","year","location"]);return a&&(n.name=n.template,n.teplate=a),t.push(n),""},redirect:(e,t)=>{let i=Ae(e,["redirect"]),a=i.list||[],n=[];for(let e=0;e{let i=Ae(e),a={};Object.keys(xt).forEach((e=>{!0===i.hasOwnProperty(e)&&(a[xt[e]]=i[e])}));let n={template:"sister project links",links:a};return t.push(n),""},"subject bar":(e,t)=>{let i=Ae(e);Object.keys(i).forEach((e=>{xt.hasOwnProperty(e)&&(i[xt[e]]=i[e],delete i[e])}));let a={template:"subject bar",links:i};return t.push(a),""},gallery:(e,t)=>{let i=Ae(e),a=(i.list||[]).filter((e=>/^ *File ?:/.test(e)));return a=a.map((e=>new j({file:e}).json())),i={template:"gallery",images:a},t.push(i),""},sky:(e,t)=>{let i=Ae(e,["asc_hours","asc_minutes","asc_seconds","dec_sign","dec_degrees","dec_minutes","dec_seconds","distance"]),a={template:"sky",ascension:{hours:i.asc_hours,minutes:i.asc_minutes,seconds:i.asc_seconds},declination:{sign:i.dec_sign,degrees:i.dec_degrees,minutes:i.dec_minutes,seconds:i.dec_seconds},distance:i.distance};return t.push(a),""},"medical cases chart":(e,t)=>{let i=["date","deathsExpr","recoveriesExpr","casesExpr","4thExpr","5thExpr","col1","col1Change","col2","col2Change"],a=Ae(e);a.data=a.data||"";let n=a.data.split("\n").map((e=>{let t=e.split(";"),a={options:new Map},n=0;for(let e=0;e{let i=Ae(e);i.x&&(i.x=i.x.split(",").map((e=>e.trim()))),i.y&&(i.y=i.y.split(",").map((e=>e.trim())));let a=1;for(;i["y"+a];)i["y"+a]=i["y"+a].split(",").map((e=>e.trim())),a+=1;return t.push(i),""},"historical populations":(e,t)=>{let i=Ae(e);i.list=i.list||[];let a=[];for(let e=0;e{const i=/^jan /i,a=/^year /i;let n=Ae(e);const r=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];let o={},s=Object.keys(n).filter((e=>i.test(e)));s=s.map((e=>e.replace(i,""))),s.forEach((e=>{o[e]=[],r.forEach((t=>{let i=`${t} ${e}`;if(n.hasOwnProperty(i)){let t=kt(n[i]);delete n[i],o[e].push(t)}}))})),n.byMonth=o;let l={};return Object.keys(n).forEach((e=>{if(a.test(e)){let t=e.replace(a,"");l[t]=n[e],delete n[e]}})),n.byYear=l,t.push(n),""},"weather box/concise c":(e,t)=>{let i=Ae(e);return i.list=i.list.map((e=>kt(e))),i.byMonth={"high c":i.list.slice(0,12),"low c":i.list.slice(12,24),"rain mm":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"weather box/concise f":(e,t)=>{let i=Ae(e);return i.list=i.list.map((e=>kt(e))),i.byMonth={"high f":i.list.slice(0,12),"low f":i.list.slice(12,24),"rain inch":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"climate chart":(e,t)=>{let i=Ae(e).list||[],a=i[0],n=i[38];i=i.slice(1),i=i.map((e=>(e&&"−"===e[0]&&(e=e.replace(/−/,"-")),e)));let r=[];for(let e=0;e<36;e+=3)r.push({low:kt(i[e]),high:kt(i[e+1]),precip:kt(i[e+2])});let o={template:"climate chart",data:{title:a,source:n,months:r}};return t.push(o),""},medalcount:(e,t)=>{let i=Ae(e).list||[],a=[];for(let e=0;e{let i=Ae(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},legend:(e,t)=>{let i=Ae(e,["color","label"]);return t.push(i),e},isbn:(e,t)=>{let i=Ae(e,["id","id2","id3"]);return t.push(i),"ISBN "+(i.id||"")},"based on":(e,t)=>{let i=Ae(e,["title","author"]);return t.push(i),`${i.title} by ${i.author||""}`},"bbl to t":(e,t)=>{let i=Ae(e,["barrels"]);return t.push(i),"0"===i.barrels?i.barrels+" barrel":i.barrels+" barrels"},mpc:(e,t)=>{let i=Ae(e,["number","text"]);return t.push(i),`[https://minorplanetcenter.net/db_search/show_object?object_id=P/2011+NO1 ${i.text||i.number}]`},pengoal:(e,t)=>(t.push({template:"pengoal"}),"✅"),penmiss:(e,t)=>(t.push({template:"penmiss"}),"❌"),"ordered list":(e,t)=>{let i=Ae(e);return t.push(i),i.list=i.list||[],i.list.map(((e,t)=>`${t+1}. ${e}`)).join("\n\n")},"title year":(e,t,i,a,n)=>{let r=Ae(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b[0-9]{4}\b/);if(e)return e[0]}return r.nomatch||""},"title century":(e,t,i,a,n)=>{let r=Ae(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)(st|nd|rd|th)\b/);if(e)return e[1]||""}return r.nomatch||""},"title decade":(e,t,i,a,n)=>{let r=Ae(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)s\b/);if(e)return e[1]||""}return r.nomatch||""},nihongo:(e,t)=>{let i=Ae(e,["english","kanji","romaji","extra"]);t.push(i);let a=i.english||i.romaji||"";return i.kanji&&(a+=` (${i.kanji})`),a},marriage:(e,t)=>{let i=Ae(e,["spouse","from","to","end"]);t.push(i);let a=i.spouse||"";return i.from&&(i.to?a+=` (m. ${i.from}-${i.to})`:a+=` (m. ${i.from})`),a},"sent off":(e,t)=>{let i=Ae(e,["cards"]),a={template:"sent off",cards:i.cards,minutes:i.list||[]};return t.push(a),"sent off: "+a.minutes.map((e=>e+"'")).join(", ")},transl:(e,t)=>{let i=Ae(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""},"collapsible list":(e,t)=>{let i=Ae(e);t.push(i);let a="";if(i.title&&(a+=`'''${i.title}'''\n\n`),!i.list){i.list=[];for(let e=1;e<10;e+=1)i[e]&&(i.list.push(i[e]),delete i[e])}return i.list=i.list.filter((e=>e)),a+=i.list.join("\n\n"),a},"columns-list":(e,t)=>{let i=((Ae(e).list||[])[0]||"").split(/\n/).filter((e=>e));return i=i.map((e=>e.replace(/\*/,""))),t.push({template:"columns-list",list:i}),i=i.map((e=>"• "+e)),i.join("\n\n")},height:(e,t)=>{let i=Ae(e);t.push(i);let a=[];return["m","cm","ft","in"].forEach((e=>{!0===i.hasOwnProperty(e)&&a.push(i[e]+e)})),a.join(" ")},sic:(e,t)=>{let i=Ae(e,["one","two","three"]),a=(i.one||"")+(i.two||"");return"?"===i.one&&(a=(i.two||"")+(i.three||"")),t.push({template:"sic",word:a}),"y"===i.nolink?a:`${a} [sic]`},inrconvert:(e,t)=>{let i=Ae(e,["rupee_value","currency_formatting"]);t.push(i);const a={k:1e3,m:1e6,b:1e9,t:1e12,l:1e5,c:1e7,lc:1e12};if(i.currency_formatting){let e=a[i.currency_formatting]||1;i.rupee_value=i.rupee_value*e}return`inr ${i.rupee_value||""}`},frac:(e,t)=>{let i=Ae(e,["a","b","c"]),a={template:"sfrac"};return i.c?(a.integer=i.a,a.numerator=i.b,a.denominator=i.c):i.b?(a.numerator=i.a,a.denominator=i.b):(a.numerator=1,a.denominator=i.a),t.push(a),a.integer?`${a.integer} ${a.numerator}⁄${a.denominator}`:`${a.numerator}⁄${a.denominator}`},"winning percentage":(e,t)=>{let i=Ae(e,["wins","losses","ties"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=Number(i.ties)||0,o=a+n+r;"y"===i.ignore_ties&&(r=0),r&&(a+=r/2);let s=ft({numerator:a,denominator:o,decimals:1});return null===s?"":"."+10*s},winlosspct:(e,t)=>{let i=Ae(e,["wins","losses"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=ft({numerator:a,denominator:a+n,decimals:1});return null===r?"":`${a||0} || ${n||0} || ${"."+10*r||"-"}`},"video game release":(e,t)=>{let i=["region","date","region2","date2","region3","date3","region4","date4"],a=Ae(e,i),n={template:"video game release",releases:[]};for(let e=0;e`${e.region}: ${e.date||""}`)).join("\n\n")+"\n"},uss:(e,t)=>{let i=Ae(e,["name","id"]);return t.push(i),i.id?`[[USS ${i.name} (${i.id})|USS ''${i.name}'' (${i.id})]]`:`[[USS ${i.name}|USS ''${i.name}'']]`},blockquote:(e,t)=>{let i=Ae(e,["text","author","title","source","character"]);t.push(i);let a=i.text;a||(i.list=i.list||[],a=i.list[0]||"");let n=a.replace(/"/g,"'");return n='"'+n+'"',n}};const Dt={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},It=(e,t)=>{let i=Ae(e,["amount","code"]);t.push(i);let a=i.template||"";"currency"===a?(a=i.code,a||(i.code=a="usd")):""!==a&&"monnaie"!==a&&"unité"!==a&&"nombre"!==a&&"nb"!==a||(a=i.code),a=(a||"").toLowerCase(),"us"===a?i.code=a="usd":"uk"===a&&(i.code=a="gbp");let n=`${Dt[a]||""}${i.amount||""}`;return i.code&&!Dt[i.code.toLowerCase()]&&(n+=" "+i.code),n};let Mt={currency:It};Object.keys(Dt).forEach((e=>{Mt[e]=It}));const Ut=864e5,Rt=30*Ut,Ft=365*Ut,Bt=function(e){return new Date(`${e.year}-${e.month||0}-${e.date||1}`).getTime()},Kt=function(e,t){e=Bt(e);let i=(t=Bt(t))-e,a={},n=Math.floor(i/Ft);n>0&&(a.years=n,i-=a.years*Ft);let r=Math.floor(i/Rt);r>0&&(a.months=r,i-=a.months*Rt);let o=Math.floor(i/Ut);return o>0&&(a.days=o),a},Wt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ht=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],Yt=Ht.reduce(((e,t,i)=>(0===i||(e[t.toLowerCase()]=i,e[t.substring(0,3).toLowerCase()]=i),e)),{}),Zt=function(e){let t={},i=["year","month","date","hour","minute","second"];for(let a=0;a{let i=Ae(e,["year","month","date","hour","minute","second","timezone"]),a=Zt([i.year,i.month,i.date||i.day]);return i.text=Vt(a),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=` (${i.timezone})`),i.hour&&i.minute&&(i.second?i.text=`${i.hour}:${i.minute}:${i.second}, `+i.text:i.text=`${i.hour}:${i.minute}, `+i.text),i.text&&t.push(Jt(i)),i.text},natural_date:(e,t)=>{let i=Ae(e,["text"]).text||"",a={};if(/^[0-9]{4}$/.test(i))a.year=parseInt(i,10);else{let e=i.replace(/[a-z]+\/[a-z]+/i,"");e=e.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");let t=new Date(e);!1===isNaN(t.getTime())&&(a.year=t.getFullYear(),a.month=t.getMonth()+1,a.date=t.getDate())}return t.push(Jt(a)),i.trim()},one_year:(e,t)=>{let i=Ae(e,["year"]),a=Number(i.year);return t.push(Jt({year:a})),String(a)},two_dates:(e,t)=>{let i=Ae(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){let e=Zt([i.birth_year,i.birth_month,i.birth_date]);return t.push(Jt(e)),Vt(e)}let a=Zt([i.death_year,i.death_month,i.death_date]);return t.push(Jt(a)),Vt(a)},age:e=>{let t=Xt(e);return Kt(t.from,t.to).years||0},"diff-y":e=>{let t=Xt(e),i=Kt(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":e=>{let t=Xt(e),i=Kt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),a.join(", ")},"diff-ymd":e=>{let t=Xt(e),i=Kt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-yd":e=>{let t=Xt(e),i=Kt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-d":e=>{let t=Xt(e),i=Kt(t.from,t.to),a=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")}},ei=["January","February","March","April","May","June","July","August","September","October","November","December"];var ti={currentday:()=>{let e=new Date;return String(e.getDate())},currentdayname:()=>{let e=new Date;return Wt[e.getDay()]},currentmonth:()=>{let e=new Date;return ei[e.getMonth()]},currentyear:()=>{let e=new Date;return String(e.getFullYear())},monthyear:()=>{let e=new Date;return ei[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":()=>{let e=new Date;return e.setMonth(e.getMonth()-1),ei[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":()=>{let e=new Date;return e.setMonth(e.getMonth()+1),ei[e.getMonth()]+" "+e.getFullYear()},year:e=>{let t=Ae(e,["date"]).date,i=new Date(t);return t&&!1===isNaN(i.getTime())?String(i.getFullYear()):""},"time ago":e=>function(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let i=(new Date).getTime()-t.getTime(),a="ago";i<0&&(a="from now",i=Math.abs(i));let n=i/1e3/60/60/24;return n<365?Number(n)+" days "+a:Number(n/365)+" years "+a}(Ae(e,["date","fmt"]).date),"birth date and age":(e,t)=>{let i=Ae(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?Qt.natural_date(e,t):(t.push(i),i=Zt([i.year,i.month,i.day]),Vt(i))},"birth year and age":(e,t)=>{let i=Ae(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return Qt.natural_date(e,t);t.push(i);let a=(new Date).getFullYear()-parseInt(i.birth_year,10);i=Zt([i.birth_year,i.birth_month]);let n=Vt(i);return a&&(n+=` (age ${a})`),n},"death year and age":(e,t)=>{let i=Ae(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?Qt.natural_date(e,t):(t.push(i),i=Zt([i.death_year,i.death_month]),Vt(i))},"birth date and age2":(e,t)=>{let i=Ae(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=Zt([i.birth_year,i.birth_month,i.birth_day]),Vt(i)},"birth based on age as of date":(e,t)=>{let i=Ae(e,["age","year","month","day"]);t.push(i);let a=parseInt(i.age,10),n=parseInt(i.year,10)-a;return n&&a?`${n} (age ${i.age})`:`(age ${i.age})`},"death date and given age":(e,t)=>{let i=Ae(e,["year","month","day","age"]);t.push(i),i=Zt([i.year,i.month,i.day]);let a=Vt(i);return i.age&&(a+=` (age ${i.age})`),a},dts:e=>{e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");let t=Ae(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},time:()=>{let e=new Date,t=Zt([e.getFullYear(),e.getMonth(),e.getDate()]);return Vt(t)},millennium:e=>{let t=Ae(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/1e3)+1,t.abbr&&"y"===t.abbr?i<0?`${$t(Math.abs(i))} BC`:`${$t(i)}`:`${$t(i)} millennium`},start:Qt.date,"start-date":Qt.natural_date,birthdeathage:Qt.two_dates,age:Qt.age,"age nts":Qt.age,"age in years":Qt["diff-y"],"age in years and months":Qt["diff-ym"],"age in years, months and days":Qt["diff-ymd"],"age in years and days":Qt["diff-yd"],"age in days":Qt["diff-d"]};function ii(e){let t=e.pop(),i=Number(e[0]||0),a=Number(e[1]||0),n=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;let r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+a/60+n/3600)}const ai=function(e){if("number"!=typeof e)return e;let t=1e5;return Math.round(e*t)/t},ni={s:!0,w:!0},ri=function(e){let t=Ae(e);t=function(e){return e.list=e.list||[],e.list=e.list.map((t=>{let i=Number(t);if(!isNaN(i))return i;let a=t.split(/:/);return a.length>1?(e.props=e.props||{},e.props[a[0]]=a.slice(1).join(":"),null):t})),e.list=e.list.filter((e=>null!==e)),e}(t);let i=function(e){const t=e.map((e=>typeof e)).join("|");return 2===e.length&&"number|number"===t?{lat:e[0],lon:e[1]}:4===e.length&&"number|string|number|string"===t?(ni[e[1].toLowerCase()]&&(e[0]*=-1),"w"===e[3].toLowerCase()&&(e[2]*=-1),{lat:e[0],lon:e[2]}):6===e.length?{lat:ii(e.slice(0,3)),lon:ii(e.slice(3))}:8===e.length?{lat:ii(e.slice(0,4)),lon:ii(e.slice(4))}:{}}(t.list);return t.lat=ai(i.lat),t.lon=ai(i.lon),t.template="coord",delete t.list,t},oi={coord:(e,t)=>{let i=ri(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":`${i.lat||""}°N, ${i.lon||""}°W`}},si=function(e,t,i,a){let n=Ae(e);return a&&(n.name=n.template,n.template=a),t.push(n),""},li={persondata:si,taxobox:si,citation:si,portal:si,reflist:si,"cite book":si,"cite journal":si,"cite web":si,"commons cat":si,"election box candidate":si,"election box begin":si,main:si},ci={adx:"adx",aim:"aim",amex:"amex",asx:"asx",athex:"athex",b3:"b3","B3 (stock exchange)":"B3 (stock exchange)",barbadosse:"barbadosse",bbv:"bbv",bcba:"bcba",bcs:"bcs",bhse:"bhse",bist:"bist",bit:"bit","bm&f bovespa":"b3","bm&f":"b3",bmad:"bmad",bmv:"bmv","bombay stock exchange":"bombay stock exchange","botswana stock exchange":"botswana stock exchange",bpse:"bpse",bse:"bse",bsx:"bsx",bvb:"bvb",bvc:"bvc",bvl:"bvl",bvpasa:"bvpasa",bwse:"bwse","canadian securities exchange":"canadian securities exchange",cse:"cse",darse:"darse",dfm:"dfm",dse:"dse",euronext:"euronext",euronextparis:"euronextparis",fse:"fse",fwb:"fwb",gse:"gse",gtsm:"gtsm",idx:"idx",ise:"ise",iseq:"iseq",isin:"isin",jasdaq:"jasdaq",jse:"jse",kase:"kase",kn:"kn",krx:"krx",lse:"lse",luxse:"luxse","malta stock exchange":"malta stock exchange",mai:"mai",mcx:"mcx",mutf:"mutf",myx:"myx",nag:"nag","nasdaq dubai":"nasdaq dubai",nasdaq:"nasdaq",neeq:"neeq",nepse:"nepse",nex:"nex",nse:"nse",newconnect:"newconnect","nyse arca":"nyse arca",nyse:"nyse",nzx:"nzx","omx baltic":"omx baltic",omx:"omx",ose:"ose","otc expert":"otc expert","otc grey":"otc grey","otc pink":"otc pink",otcqb:"otcqb",otcqx:"otcqx","pfts ukraine stock exchange":"pfts ukraine stock exchange","philippine stock exchange":"philippine stock exchange",prse:"prse",psx:"psx",karse:"karse",qe:"qe","saudi stock exchange":"saudi stock exchange",sehk:"sehk","Stock Exchange of Thailand":"Stock Exchange of Thailand",set:"set",sgx:"sgx",sse:"sse",swx:"swx",szse:"szse",tase:"tase","tsx-v":"tsx-v",tsx:"tsx",tsxv:"tsxv",ttse:"ttse",twse:"twse",tyo:"tyo",wbag:"wbag",wse:"wse","zagreb stock exchange":"zagreb stock exchange","zimbabwe stock exchange":"zimbabwe stock exchange",zse:"zse"},ui=(e,t)=>{let i=Ae(e,["ticketnumber","code"]);t.push(i);let a=i.template||"";""===a&&(a=i.code),a=(a||"").toLowerCase();let n=ci[a]||"";return i.ticketnumber&&(n=`${n}: ${i.ticketnumber}`),i.code&&!ci[i.code.toLowerCase()]&&(n+=" "+i.code),n},mi={};Object.keys(ci).forEach((e=>{mi[e]=ui}));const pi=function(e){return 1===(e=String(e)).length&&(e="0"+e),e},di=function(e,t,i){e[`rd${t}-team${pi(i)}`]&&(i=pi(i));let a=e[`rd${t}-score${i}`],n=Number(a);return!1===isNaN(n)&&(a=n),{team:e[`rd${t}-team${i}`],score:a,seed:e[`rd${t}-seed${i}`]}},hi=function(e){let t=[],i=Ae(e);for(let e=1;e<7;e+=1){let a=[];for(let t=1;t<16;t+=2){let n=`rd${e}-team`;if(!i[n+t]&&!i[n+pi(t)])break;{let n=di(i,e,t),r=di(i,e,t+1);a.push([n,r])}}a.length>0&&t.push(a)}return{template:"playoffbracket",rounds:t}};let gi={"4teambracket":function(e,t){let i=hi(e);return t.push(i),""},player:(e,t)=>{let i=Ae(e,["number","country","name","dl"]);t.push(i);let a=`[[${i.name}]]`;if(i.country){let e=(i.country||"").toLowerCase(),t=_t.find((t=>e===t[1]||e===t[2]))||[];t&&t[0]&&(a=t[0]+" "+a)}return i.number&&(a=i.number+" "+a),a},goal:(e,t)=>{let i={template:"goal",data:[]},a=Ae(e).list||[];for(let e=0;e{let t=e.note;return t&&(t=` (${t})`),e.min+"'"+t})).join(", "),n},"sports table":(e,t)=>{let i=Ae(e),a={};Object.keys(i).filter((e=>/^team[0-9]/.test(e))).map((e=>i[e].toLowerCase())).forEach((e=>{a[e]={name:i[`name_${e}`],win:Number(i[`win_${e}`])||0,loss:Number(i[`loss_${e}`])||0,tie:Number(i[`tie_${e}`])||0,otloss:Number(i[`otloss_${e}`])||0,goals_for:Number(i[`gf_${e}`])||0,goals_against:Number(i[`ga_${e}`])||0}}));let n={date:i.update,header:i.table_header,teams:a};t.push(n)},"cbb roster/header":function(){return'{| class="wikitable"\n |-\n ! POS\n ! #\n ! Name\n ! Height\n ! Weight\n ! Year\n ! Previous School\n ! Hometown\n |-\n'},"cbb roster/player":function(e,t){let i=Ae(e);return t.push(i),`|-\n| ${i.pos||""}\n| ${i.num||""}\n| ${i.first||""} ${i.last||""}\n| ${i.ft||""}${i.in||""}\n| ${i.lbs||""}\n| ${i.class||""}\n| ${i.high_school||""}\n| ${i.home||""}\n`},"cbb roster/footer":function(){return"\n|}"}};var bi=Object.assign({},Pt,Tt,Mt,ti,oi,li,mi,hi,gi);let fi=Object.assign({},Nt,At,bi);Object.keys(pt).forEach((e=>{fi[e]=fi[pt[e]]}));const ki=["0","1","2","3","4","5","6","7","8","9"],wi=function(e,t){let i=e.name;if(!0===rt.hasOwnProperty(i))return[""];if(!0===function(e){return!0===ot.hasOwnProperty(e)||!!st.test(e)||!(!lt.test(e)&&!ct.test(e))||!!ut.test(e)}(i)){let t=Ae(e.body,[],"raw");return["",mt(t)]}if(!0===/^cite [a-z]/.test(i)){let t=Ae(e.body);return t.type=t.template,t.template="citation",["",t]}if(!0===fi.hasOwnProperty(i)){if("number"==typeof fi[i]){return[Ae(e.body,ki)[String(fi[i])]||""]}if("string"==typeof fi[i])return[fi[i]];if(!0===r(fi[i])){return["",Ae(e.body,fi[i])]}if(!0===((a=fi[i])&&"[object Object]"===Object.prototype.toString.call(a))){let t=Ae(e.body,fi[i].props);return[t[fi[i].out],t]}if("function"==typeof fi[i]){let a=[];return[fi[i](e.body,a,Ae,null,t),a[0]]}}var a;if(t&&t._templateFallbackFn){let i=[],a=t._templateFallbackFn(e.body,i,Ae,null,t);if(null!==a)return[a,i[0]]}let n=Ae(e.body);return 0===Object.keys(n).length&&(n=null),["",n]},yi=(e="")=>(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim(),$i=function(e,t){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},xi={type:function(){return this._type},links:function(e){let t=[];if(Object.keys(this.data).forEach((e=>{this.data[e].links().forEach((e=>t.push(e)))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},image:function(){let e=this.data.image||this.data.image2||this.data.logo||this.data.image_skyline||this.data.image_flag;if(!e)return null;let t=e.json(),i=t.text;return t.file=i,t.text="",t.caption=this.data.caption,t.domain=this.domain,new j(t)},get:function(e){let t=Object.keys(this.data);if("string"==typeof e){let i=yi(e);for(let e=0;e{for(let i=0;i(e.data[i]&&(t[i]=e.data[i].json()),t)),{});return!0===t.encode&&(i=K(i)),i}(this,e=e||{})},wikitext:function(){return this.wiki||""},keyValue:function(){return Object.keys(this.data).reduce(((e,t)=>(this.data[t]&&(e[t]=this.data[t].text()),e)),{})}};Object.keys(xi).forEach((e=>{$i.prototype[e]=xi[e]})),$i.prototype.data=$i.prototype.keyValue,$i.prototype.template=$i.prototype.type,$i.prototype.images=$i.prototype.image;const vi=function(e,t){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},ji={title:function(){let e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){let t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},text:function(){return""},wikitext:function(){return this.wiki||""},json:function(e={}){let t=this.data||{};return!0===e.encode&&(t=Object.assign({},t),t=K(t)),t}};Object.keys(ji).forEach((e=>{vi.prototype[e]=ji[e]}));const _i={text:function(){return oe(this._text||"").text()},json:function(){return this.data||{}},wikitext:function(){return this.wiki||""}},zi=function(e,t="",i=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_text",{enumerable:!1,value:t}),Object.defineProperty(this,"wiki",{enumerable:!1,value:i})};Object.keys(_i).forEach((e=>{zi.prototype[e]=_i[e]}));const Oi=/^(cite |citation)/i,Ei={citation:!0,refn:!0,harvnb:!0,source:!0},Ni=function(e,t){let{list:i,wiki:a}=function(e,t){let i=[],a=nt(e);const n=function(a,r){a.parent=r,a.children&&a.children.length>0&&a.children.forEach((e=>n(e,a)));let[o,s]=wi(a,t);a.wiki=o,s&&i.push({name:a.name,wiki:a.body,nested:Boolean(a.parent),text:o,json:s});const l=function(e,t,i){e.parent&&(e.parent.body=e.parent.body.replace(t,i),l(e.parent,t,i))};l(a,a.body,a.wiki),e=e.replace(a.body,a.wiki)};return a.forEach((e=>n(e,null))),a.forEach((t=>{e=e.replace(t.body,t.wiki)})),{list:i,wiki:e}}(e._wiki,t),n=t?t._domain:null,{infoboxes:r,references:o,templates:s}=function(e,t){let i={infoboxes:[],templates:[],references:[]};return e.forEach((e=>{let a=e.json,n=a.template||a.type||a.name;if(!0!==Ei[n]&&!0!==Oi.test(n))return"infobox"===a.template&&"yes"!==a.subbox?(a.domain=t,a.data=a.data||{},void i.infoboxes.push(new $i(a,e.wiki))):void i.templates.push(new zi(a,e.text,e.wiki));i.references.push(new vi(a,e.wiki))})),i}(i,n);e._infoboxes=e._infoboxes||[],e._references=e._references||[],e._templates=e._templates||[],e._infoboxes=e._infoboxes.concat(r),e._references=e._references.concat(o),e._templates=e._templates.concat(s),e._wiki=a},qi=function(e){return/^ *\{\{ *(cite|citation)/i.test(e)&&/\}\} *$/.test(e)&&!1===/citation needed/i.test(e)},Si=function(e){let t=Ae(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Ci=function(e){return{template:"citation",type:"inline",data:{},inline:oe(e)||{}}},Li=function(e){let t=[],i=e._wiki;i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(qi(a)){let n=Si(a);n&&t.push({json:n,wiki:e}),i=i.replace(a,"")}else t.push({json:Ci(a),wiki:e});return" "})),i=i.replace(/ ?]{0,200}?\/> ?/gi," "),i=i.replace(/ ?]{0,200}>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(qi(a)){let e=Si(a);e&&t.push({json:e,wiki:a}),i=i.replace(a,"")}else t.push({json:Ci(a),wiki:e});return" "})),i=i.replace(/ ?<[ /]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ /]?> ?/g," "),e._references=t.map((e=>new vi(e.json,e.wiki))),e._wiki=i},Ai={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]};let Pi=["res","record","opponent","method","event","date","round","time","location","notes"];const Ti=function(e,t){const i={templates:[],text:e._wiki};var a;return function(e,t){e.text=e.text.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(i=>{let a={_wiki:i,_templates:[]};Ni(a,t);let n=a._templates.map((e=>e.json())),r=n.find((e=>"election box"===e.template))||{},o=n.filter((e=>"election box candidate"===e.template)),s=n.find((e=>"election box gain"===e.template||"election box hold"===e.template))||{};return(o.length>0||s)&&e.templates.push({template:"election box",title:r.title,candidates:o,summary:s.data}),""}))}(i,t),function(e,t,i){e.text=e.text.replace(/]*)>([\s\S]+)<\/gallery>/g,((a,n,r)=>{let o=r.split(/\n/g);return o=o.filter((e=>e&&""!==e.trim())),o=o.map((e=>{let i=e.split(/\|/),a={file:i[0].trim(),lang:t.lang(),domain:t.domain()},n=new j(a).json(),r=i.slice(1).join("|");return""!==r&&(n.caption=oe(r)),n})),o.length>0&&e.templates.push({template:"gallery",images:o,pos:i.title}),""}))}(i,t,e),(a=i).text=a.text.replace(/]*)>([\s\S]*?)<\/math>/g,((e,t,i)=>{let n=oe(i).text();return a.templates.push({template:"math",formula:n,raw:i}),n&&n.length<12?n:""})),a.text=a.text.replace(/]*)>([\s\S]*?)<\/chem>/g,((e,t,i)=>(a.templates.push({template:"chem",data:i}),""))),function(e){e.text=e.text.replace(/\{\{mlb game log /gi,"{{game log "),e.text=e.text.replace(/\{\{game log (section|month)[\s\S]+?\{\{game log (section|month) end\}\}/gi,(t=>{let i=function(e){let t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{game log (section|month) end\}\}/i,"");let a="! "+i.join(" !! "),n=ge("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mlb game log section",data:n}),""}))}(i),function(e){e.text=e.text.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(t=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");let i="! "+Pi.join(" !! "),a=ge("{|\n"+i+"\n"+t+"\n|}");return a=a.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mma record start",data:a}),""}))}(i),function(e){e.text=e.text.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,((t,i)=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();let a="! "+Ai[i].join(" !! "),n=ge("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"NBA "+i+" statistics",data:n}),""}))}(i),i.templates=i.templates.map((e=>new zi(e))),i},Di={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0};class Ii{constructor(e,t){let i={doc:t,title:e.title||"",depth:e.depth,wiki:e.wiki||"",templates:[],tables:[],infoboxes:[],references:[],paragraphs:[]};Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})}));const a=Ti(this,t);this._wiki=a.text,this._templates=this._templates.concat(a.templates),Li(this),Ni(this,t),function(e){let t=[],i=e._wiki,a=i.split("\n"),n=[];for(let e=0;e0&&(n[n.length-1]+="\n"+a[e]);else{n[n.length-1]+="\n"+a[e];let i=n.pop();t.push(i)}else n.push(a[e]);let r=[];t.forEach((e=>{if(e){i=i.replace(e+"\n",""),i=i.replace(e,"");let t=ge(e);t&&t.length>0&&r.push(new ke(t,e))}})),r.length>0&&(e._tables=r),e._wiki=i}(this),Je(this,t)}title(){return this._title||""}index(){if(!this._doc)return null;let e=this._doc.sections().indexOf(this);return-1===e?null:e}depth(){return this._depth}indentation(){return this.depth()}sentences(){return this.paragraphs().reduce(((e,t)=>e.concat(t.sentences())),[])}paragraphs(){return this._paragraphs||[]}links(e){let t=[];if(this.infoboxes().forEach((e=>{t.push(e.links())})),this.sentences().forEach((e=>{t.push(e.links())})),this.tables().forEach((e=>{t.push(e.links())})),this.lists().forEach((e=>{t.push(e.links())})),t=t.reduce(((e,t)=>e.concat(t)),[]).filter((e=>void 0!==e)),"string"==typeof e){let i=t.find((t=>t.page().toLowerCase()===e.toLowerCase()));return void 0===i?[]:[i]}return t}tables(){return this._tables||[]}templates(e){let t=this._templates||[];return"string"==typeof e?(e=e.toLowerCase(),t.filter((t=>t.data.template===e||t.data.name===e))):t}infoboxes(e){let t=this._infoboxes||[];return"string"==typeof e?(e=(e=e.replace(/^infobox /i,"")).trim().toLowerCase(),t.filter((t=>t._type===e))):t}coordinates(){return[...this.templates("coord"),...this.templates("coor")].map((e=>e.json()))}lists(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.lists())})),e}interwiki(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.interwiki())})),e}images(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.images())})),e}references(){return this._references||[]}remove(){if(!this._doc)return null;let e={};e[this.title()]=!0,this.children().forEach((t=>e[t.title()]=!0));let t=this._doc.sections();return t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),this._doc._sections=t,this._doc}nextSibling(){if(!this._doc)return null;let e=this._doc.sections();for(let t=(this.index()||0)+1;tthis.depth())for(let e=i+1;ethis.depth();e+=1)a.push(t[e]);return"string"==typeof e?a.find((t=>t.title().toLowerCase()===e.toLowerCase())):a}sections(e){return this.children(e)}parent(){if(!this._doc)return null;let e=this._doc.sections();for(let t=this.index()||0;t>=0;t-=1)if(e[t]&&e[t].depth()t.text(e))).join("\n\n")}wikitext(){return this._wiki}json(e){return function(e,t){let i={};if(!0===(t=m(t,W)).headers&&(i.title=e.title()),!0===t.depth&&(i.depth=e.depth()),!0===t.paragraphs){let a=e.paragraphs().map((e=>e.json(t)));a.length>0&&(i.paragraphs=a)}if(!0===t.images){let a=e.images().map((e=>e.json(t)));a.length>0&&(i.images=a)}if(!0===t.tables){let a=e.tables().map((e=>e.json(t)));a.length>0&&(i.tables=a)}if(!0===t.templates){let a=e.templates().map((e=>e.json()));a.length>0&&(i.templates=a,!0===t.encode&&i.templates.forEach((e=>K(e))))}if(!0===t.infoboxes){let a=e.infoboxes().map((e=>e.json(t)));a.length>0&&(i.infoboxes=a)}if(!0===t.lists){let a=e.lists().map((e=>e.json(t)));a.length>0&&(i.lists=a)}if(!0===t.references||!0===t.citations){let a=e.references().map((e=>e.json(t)));a.length>0&&(i.references=a)}return!0===t.sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=m(e,Di))}}Ii.prototype.citations=Ii.prototype.references;const Mi={sentences:"sentence",paragraphs:"paragraph",links:"link",tables:"table",templates:"template",infoboxes:"infobox",coordinates:"coordinate",lists:"list",images:"image",references:"reference",citations:"citation"};Object.keys(Mi).forEach((e=>{let t=Mi[e];Ii.prototype[t]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]||null}}));const Ui=/^(={1,6})(.{1,200}?)={1,6}$/,Ri=/\{\{.+?\}\}/,Fi=function(e,t,i){let a=t.match(Ui);if(!a)return e.title="",e.depth=0,e;let r=a[2]||"";r=oe(r).text(),Ri.test(r)&&(r=function(e,t){return nt(e).forEach((i=>{let[a]=wi(i,t);e=e.replace(i.body,a)})),e}(r,i));let o={_wiki:r};Li(o),r=o._wiki,r=n(r);let s=0;return a[1]&&(s=a[1].length-2),e.title=r,e.depth=s,e},Bi=new RegExp("^("+["references","reference","einzelnachweise","referencias","références","notes et références","脚注","referenser","bronnen","примечания"].join("|")+"):?","i"),Ki=/(?:\n|^)(={2,6}.{1,200}?={2,6})/g,Wi=function(e){let t=[],i=e._wiki.split(Ki);for(let a=0;a!0!==Bi.test(t.title())||t.paragraphs().length>0||t.templates().length>0||(e[i+1]&&e[i+1].depth()>t.depth()&&(e[i+1]._depth-=1),!1)))}(t)},Hi=new RegExp("\\[\\[("+d.join("|")+"):(.{2,178}?)]](w{0,10})","gi"),Yi=new RegExp("^\\[\\[:?("+d.join("|")+"):","gi"),Zi=function(e){const t=[];let i=e.match(Hi);i&&i.forEach((function(e){(e=(e=(e=e.replace(Yi,"")).replace(/\|?[ *]?\]\]$/,"")).replace(/\|.*/,""))&&!e.match(/[[\]]/)&&t.push(e.trim())}));const a=e.replace(Hi,"");return[t,a]},Gi={tables:!0,lists:!0,paragraphs:!0};class Vi{constructor(e,t){t=t||{},this._options=t;let i={pageID:t.pageID||t.id||null,namespace:t.namespace||t.ns||null,lang:t.lang||t.language||null,domain:t.domain||null,title:t.title||null,type:"page",redirectTo:null,wikidata:t.wikidata||null,wiki:e||"",categories:[],sections:[],coordinates:[],userAgent:t.userAgent||t["User-Agent"]||t["Api-User-Agent"]||"User of the wtf_wikipedia library",templateFallbackFn:t.templateFallbackFn||null};if(Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})})),!0===function(e){return!(!e||e.length>500)&&T.test(e)}(this._wiki)){this._type="redirect",this._redirectTo=function(e){let t=e.match(T);if(t&&t[2])return(P(t[2])||[])[0];return{}}(this._wiki);const[e,t]=Zi(this._wiki);return this._categories=e,void(this._wiki=t)}this._wiki=R(this._wiki);const[a,n]=Zi(this._wiki);this._categories=a,this._wiki=n,this._sections=Wi(this)}title(e){if(void 0!==e)return this._title=e,e;if(this._title)return this._title;let t=null,i=this.sentences()[0];return i&&(t=i.bold()),t}pageID(e){return void 0!==e&&(this._pageID=e),this._pageID||null}wikidata(e){return void 0!==e&&(this._wikidata=e),this._wikidata||null}domain(e){return void 0!==e&&(this._domain=e),this._domain||null}language(e){return void 0!==e&&(this._lang=e),this._lang||null}url(){let e=this.title();if(!e)return null;let t=this.language()||"en",i=this.domain()||"wikipedia.org";return e=e.replace(/ /g,"_"),e=encodeURIComponent(e),`https://${t}.${i}/wiki/${e}`}namespace(e){return void 0!==e&&(this._namespace=e),this._namespace||null}isRedirect(){return"redirect"===this._type}redirectTo(){return this._redirectTo}isDisambiguation(){return function(e){let t=e.templates().map((e=>e.json()));if(t.find((e=>f.hasOwnProperty(e.template)||$.hasOwnProperty(e.template))))return!0;let i=e.title();return!(!i||!0!==y.test(i))||!t.find((e=>w.hasOwnProperty(e.template)))&&(!0===x(e.sentence(0))||!0===x(e.sentence(1)))}(this)}categories(e){let t=this._categories||[];return"number"==typeof e?[t[e]]:t}sections(e){let t=this._sections||[];if(t.forEach((e=>{e._doc=this})),"string"==typeof e){let i=e.toLowerCase().trim();return t.filter((e=>e.title().toLowerCase()===i))}return"number"==typeof e?[t[e]]:t}paragraphs(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.paragraphs())})),"number"==typeof e?[t[e]]:t}sentences(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.sentences())})),"number"==typeof e?[t[e]]:t}images(e){let t=u(this,"images",null);return this.infoboxes().forEach((e=>{let i=e.image();i&&t.unshift(i)})),this.templates().forEach((e=>{"gallery"===e.data.template&&(e.data.images=e.data.images||[],e.data.images.forEach((e=>{e instanceof j||(e.language=this.language(),e.domain=this.domain(),e=new j(e)),t.push(e)})))})),"number"==typeof e?[t[e]]:t}links(e){return u(this,"links",e)}interwiki(e){return u(this,"interwiki",e)}lists(e){return u(this,"lists",e)}tables(e){return u(this,"tables",e)}templates(e){return u(this,"templates",e)}references(e){return u(this,"references",e)}citations(e){return this.references(e)}coordinates(e){return u(this,"coordinates",e)}infoboxes(e){let t=u(this,"infoboxes",e);return t=t.sort(((e,t)=>Object.keys(e.data).length>Object.keys(t.data).length?-1:1)),t}text(e){if(e=m(e,Gi),!0===this.isRedirect())return"";return this.sections().map((t=>t.text(e))).join("\n\n")}json(e){return function(e,t){let i={};return(t=m(t,p)).title&&(i.title=e.title()),t.pageID&&(i.pageID=e.pageID()),t.categories&&(i.categories=e.categories()),t.sections&&(i.sections=e.sections().map((e=>e.json(t)))),!0===e.isRedirect()&&(i.isRedirect=!0,i.redirectTo=e.redirectTo(),i.sections=[]),t.coordinates&&(i.coordinates=e.coordinates()),t.infoboxes&&(i.infoboxes=e.infoboxes().map((e=>e.json(t)))),t.images&&(i.images=e.images().map((e=>e.json(t)))),t.plaintext&&(i.plaintext=e.text(t)),(t.citations||t.references)&&(i.references=e.references()),i}(this,e=m(e,Gi))}wikitext(){return this._wiki||""}debug(){return console.log("\n"),this.sections().forEach((e=>{let t=" - ";for(let i=0;i{let t=Ji[e];Vi.prototype[t]=function(t){return this[e](t)[0]||null}})),Vi.prototype.lang=Vi.prototype.language,Vi.prototype.ns=Vi.prototype.namespace,Vi.prototype.plaintext=Vi.prototype.text,Vi.prototype.isDisambig=Vi.prototype.isDisambiguation,Vi.prototype.citations=Vi.prototype.references,Vi.prototype.redirectsTo=Vi.prototype.redirectTo,Vi.prototype.redirect=Vi.prototype.redirectTo,Vi.prototype.redirects=Vi.prototype.redirectTo;const Xi=/^https?:\/\//,Qi={lang:"en",wiki:"wikipedia",domain:void 0,follow_redirects:!0,path:"api.php"},ea=function(e,t,n){"string"==typeof t&&(t={lang:t}),(t={...Qi,...t}).title=e,"string"==typeof e&&Xi.test(e)&&(t={...t,...a(e)});const o=c(t),s=function(e){let t,i=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return t=e.noOrigin?"":e.origin||e.Origin||"*",{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":i,"User-Agent":i,Origin:t,"Accept-Encoding":"gzip"},redirect:"follow"}}(t);return i(o,s).then((e=>e.json())).then((i=>{let a=function(e,t={}){return Object.keys(e.query.pages).map((i=>{let a=e.query.pages[i]||{};if(a.hasOwnProperty("missing")||a.hasOwnProperty("invalid"))return null;let n=a.revisions[0]["*"];!n&&a.revisions[0].slots&&(n=a.revisions[0].slots.main["*"]),a.pageprops=a.pageprops||{};let r=t.domain;return!r&&t.wiki&&(r=`${t.wiki}.org`),{wiki:n,meta:Object.assign({},t,{title:a.title,pageID:a.pageid,namespace:a.ns,domain:r,wikidata:a.pageprops.wikibase_item,description:a.pageprops["wikibase-shortdesc"]})}}))}(i,t);return a=function(e,t){let i=(e=e.filter((e=>e))).map((e=>new Vi(e.wiki,e.meta)));return 0===i.length?null:r(t)||1!==i.length?i:i[0]}(a,e),n&&n(null,a),a})).catch((e=>(console.error(e),n&&n(e,null),null)))};const ta=function(e,t){return new Vi(e,t)},ia={Doc:Vi,Section:Ii,Paragraph:je,Sentence:J,Image:j,Infobox:$i,Link:Y,List:Fe,Reference:vi,Table:ke,Template:zi,http:function(e,t){return i(e,t).then((function(e){return e.json()})).catch((t=>(console.error("\n\n=-=- http response error =-=-=-"),console.error(e),console.error(t),{})))},wtf:ta};return ta.fetch=function(e,t,i){return ea(e,t,i)},ta.plugin=ta.extend=function(e){return e(ia,fi,ot),this},ta.version="10.1.4",ta})); +/*! wtf_wikipedia MIT */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).wtf=t()}(this,(function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var i=function e(){if(this instanceof e){var i=[null];return i.push.apply(i,arguments),new(Function.bind.apply(t,i))}return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})})),i}var i=t(Object.freeze({__proto__:null,default:function(e,t){return t=t||{},new Promise((function(i,a){var n=new XMLHttpRequest,r=[],o=[],s={},l=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:l,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in n.open(t.method||"get",e,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,i){r.push(t=t.toLowerCase()),o.push([t,i]),s[t]=s[t]?s[t]+","+i:i})),i(l())},n.onerror=a,n.withCredentials="include"==t.credentials,t.headers)n.setRequestHeader(c,t.headers[c]);n.send(t.body||null)}))}})),a=e(self.fetch||(self.fetch=i.default||i));const n=function(e){let t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function r(e){return e&&"string"==typeof e?e=(e=(e=(e=e.replace(/^\s+/,"")).replace(/\s+$/,"")).replace(/ {2}/," ")).replace(/\s, /,", "):""}function o(e){return"[object Array]"===Object.prototype.toString.call(e)}const s=/(wikibooks|wikidata|wikimedia|wikinews|wikipedia|wikiquote|wikisource|wikispecies|wikiversity|wikivoyage|wiktionary|foundation|meta)\.org/,l={action:"query",prop:"revisions|pageprops",rvprop:"content",maxlag:5,rvslots:"main",origin:"*",format:"json",redirects:"true"},c=e=>e.replace(/ /g,"_").trim(),u=function(e,t=l){let i=Object.assign({},t),a="";if(e.domain){let t=s.test(e.domain)?"w/api.php":e.path;a=`https://${e.domain}/${t}?`}else{if(!e.lang||!e.wiki)return"";a=`https://${e.lang}.${e.wiki}.org/w/api.php?`}e.follow_redirects||delete i.redirects,e.origin&&(i.origin=e.origin);let n=e.title;if("number"==typeof n)i.pageids=n;else if("string"==typeof n)i.titles=c(n);else if(void 0!==n&&o(n)&&"number"==typeof n[0])i.pageids=n.filter((e=>e)).join("|");else{if(void 0===n||!0!==o(n)||"string"!=typeof n[0])return"";i.titles=n.filter((e=>e)).map(c).join("|")}return`${a}${r=i,Object.entries(r).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&")}`;var r},m=function(e,t,i){let a=[];return e.sections().forEach((e=>{let n=[];n="string"==typeof i?e[t](i):e[t](),n.forEach((e=>{a.push(e)}))})),"number"==typeof i?void 0===a[i]?[]:[a[i]]:a},p=function(e,t){return Object.assign({},t,e)},d={title:!0,sections:!0,pageID:!0,categories:!0};var h=["category","abdeeling","bólkur","catagóir","categori","categoria","categoria","categoría","categorîa","categorìa","catégorie","categorie","catègorie","category","categuria","catigurìa","class","ẹ̀ka","flocc","flocc","flokkur","grup","jamii","kaarangay","kateggoría","kategooria","kategori","kategorî","kategoria","kategória","kategorie","kategoriija","kategorija","kategorio","kategoriya","kategoriýa","kategoriye","kategory","kategorya","kateqoriya","katiguriya","klad","luokka","ñemohenda","roinn","ronney","rummad","setensele","sokajy","sumut","thể","turkum","категорија","категория","категорія","катэгорыя","төркем","קטגוריה","تصنيف","تۈر","رده","श्रेणी","श्रेणी","বিষয়শ্রেণী","หมวดหมู่","분류","분류","分类"],g=["file","image","चित्र","archivo","attēls","berkas","bestand","datei","dosiero","dosya","fájl","fasciculus","fichier","fil","fitxategi","fitxer","gambar","imagem","imej","immagine","larawan","lêer","plik","restr","slika","wêne","wobraz","выява","податотека","слика","файл","სურათი","պատկեր","קובץ","پرونده","دوتنه","ملف","وێنە","चित्र","ไฟล์","파일","ファイル"],b=["infobox","anfo","anuāmapa","bilgi kutusu","bilgi","bilgiquti","boaty","boestkelaouiñ","bosca","capsa","diehtokássa","faktamall","ficha","generalni","gwybodlen3","info","infobokis","infoboks","infochascha","infokašćik","infokast","infokutija","infolentelė","infopolje","informkesto","infoskreine","infotaula","inligtingskas","inligtingskas3","inligtingskas4","kishtey","kotak","tertcita","tietolaatikko","yerleşim bilgi kutusu","ynfoboks","πλαίσιο","акарточка","аҥа","инфобокс","инфокутија","инфокутия","інфобокс","канадский","картка","карточка","карточка2","карточкарус","картуш","қуттӣ","ინფოდაფა","տեղեկաքարտ","אינפאקעסטל","תבנית","بطاقة","ڄاڻخانو","خانہ","لغة","ज्ञानसन्दूक","তথ্যছক","ਜਾਣਕਾਰੀਡੱਬਾ","సమాచారపెట్టె","තොරතුරුකොටුව","กล่องข้อมูล","ប្រអប់ព័ត៌មាន","정보상자","明細"];let f=" disambiguation";const k=["dab","dab","disamb","disambig","geodis","hndis","setindex","ship index","split dab","sport index","wp disambig","disambiguation cleanup","airport"+f,"biology"+f,"call sign"+f,"caselaw"+f,"chinese title"+f,"genus"+f,"hospital"+f,"lake index","letter"+f,"letter-number combination"+f,"mathematical"+f,"military unit"+f,"mountainindex","number"+f,"phonetics"+f,"place name"+f,"portal"+f,"road"+f,"school"+f,"species latin name abbreviation"+f,"species latin name"+f,"station"+f,"synagogue"+f,"taxonomic authority"+f,"taxonomy"+f].reduce(((e,t)=>(e[t]=!0,e)),{}),w=/. may (also )?refer to\b/i,y={about:!0,for:!0,"for multi":!0,"other people":!0,"other uses of":!0,distinguish:!0},$=new RegExp(". \\(("+["disambiguation","homonymie","توضيح","desambiguação","Begriffsklärung","disambigua","曖昧さ回避","消歧義","搞清楚","значения","ابهام‌زدایی","د ابہام","동음이의","dubbelsinnig","այլ կիրառումներ","ujednoznacznienie"].join("|")+")\\)$","i"),x=["dab","disamb","disambig","disambiguation","letter-numbercombdisambig","letter-number combination disambiguation","dmbox","airport disambiguation","biology disambiguation","call sign disambiguation","caselaw disambiguation","chinese title disambiguation","disambiguation cleanup","genus disambiguation","hospital disambiguation","human name disambiguation","human name disambiguation cleanup","letter-number combination disambiguation","mathematical disambiguation","military unit disambiguation","music disambiguation","number disambiguation","opus number disambiguation","phonetics disambiguation","place name disambiguation","portal disambiguation","road disambiguation","school disambiguation","species latin name abbreviation disambiguation","species latin name disambiguation","station disambiguation","synagogue disambiguation","taxonomic authority disambiguation","taxonomy disambiguation","template disambiguation","disamb2","disamb3","disamb4","disambiguation lead","disambiguation lead name","disambiguation name","disamb-term","disamb-terms","aðgreining","aimai","ałtsʼáʼáztiin","anlam ayrımı","anlam ayrımı","apartigilo","argipen","begriepskloorenge","begriffsklärung","begriffsklärung","begriffsklärung","begriffsklearung","bisongidila","bkl","bokokani","caddayn","clerheans","cudakirin","čvor","db","desambig","desambigación","desambiguação","desambiguació","desambiguación","desambiguáncia","desambiguasion","desambiguassiù","desambigui","dezambiguizare","dəqiqləşdirmə","disambigua","disambigua","disambigua","disambìgua","disambigua","disambiguasi","disambiguasi","discretiva","disheñvelout","disingkek","dixanbigua","dixebra","diżambigwazzjoni","doorverwijspagina","dp","dp","dubbelsinnig","dudalipen","dv","egyért","fleiri týdningar","fleirtyding","flertydig","förgrening","gì-ngiê","giklaro","gwahaniaethu","homonimo","homónimos","homonymie","huaʻōlelo puana like","idirdhealú","khu-pia̍t","kthjellim","kujekesa","maana","maneo bin","mehrdüdig begreep","menm non","muardüüdag artiikel","neibetsjuttings","nozīmju atdalīšana","nuorodinis","nyahkekaburan","omonimeye","omonimia","page dé frouque","paglilinaw","panangilawlawag","pansayod","pejy mitovy anarana","peker","razdvojba","razločitev","razvrstavanje","reddaghey","rozcestník","rozlišovacia stránka","sclerir noziun","selvendyssivu","soilleireachadh","suzmunski","täpsustuslehekülg","täsmennyssivu","telplänov","tlahtolmelahuacatlaliztli","trang định hướng","ujednoznacznienie","verdudeliking","wěcejwóznamowosć","wjacezmyslnosć","zambiguaçon","zeimeibu škiršona","αποσαφήνιση","айрық","аҵакырацәа","вишезначна одредница","ибҳомзудоӣ","кёб магъаналы","күп мәгънәләр","күп мәғәнәлелек","мъногосъмꙑслиѥ","неадназначнасць","неадназначнасьць","неоднозначность","олон удхатай","појаснување","пояснение","са шумуд манавал","салаа утгатай","суолталар","текмаанисиздик","цо магіна гуреб","чеперушка","чолхалла","шуко ончыктымаш-влак","მრავალმნიშვნელოვანი","բազմիմաստութիւն","բազմիմաստություն","באדייטן","פירושונים","ابهام‌زدایی","توضيح","توضيح","دقیقلشدیرمه","ڕوونکردنەوە","سلجهائپ","ضد ابہام","گجگجی بیری","نامبهمېدنه","መንታ","अस्पष्टता","बहुअर्थी","बहुविकल्पी शब्द","দ্ব্যর্থতা নিরসন","ਗੁੰਝਲ-ਖੋਲ੍ਹ","સંદિગ્ધ શીર્ષક","பக்கவழி நெறிப்படுத்தல்","అయోమయ నివృత్తి","ದ್ವಂದ್ವ ನಿವಾರಣೆ","വിവക്ഷകൾ","වක්‍රෝත්ති","แก้ความกำกวม","သံတူကြောင်းကွဲ","ណែនាំ","동음이의","扤清楚","搞清楚","曖昧さ回避","消歧义","釋義","gestion dj'omònim","sut'ichana qillqa"].reduce(((e,t)=>(e[t]=!0,e)),{}),v=function(e){if(!e)return!1;let t=e.text();return!(null===t||!t[0]||!0!==w.test(t))},j={caption:!0,alt:!0,links:!0,thumb:!0,url:!0},_=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},z={file(){let e=this.data.file||"";if(e){/^(image|file):/i.test(e)||(e=`File:${e}`),e=e.trim(),e=e.charAt(0).toUpperCase()+e.substring(1),e=e.replace(/ /g,"_")}return e},alt(){let e=this.data.alt||this.data.file||"";return e=e.replace(/^(file|image):/i,""),e=e.replace(/\.(jpg|jpeg|png|gif|svg)/i,""),e.replace(/_/g," ")},caption(){return this.data.caption?this.data.caption.text():""},links(){return this.data.caption?this.data.caption.links():[]},url(){let e=function(e){let t=function(e){let t=e.replace(/^(image|file?):/i,"");return t=t.charAt(0).toUpperCase()+t.substring(1),t=t.trim().replace(/ /g,"_"),t}(e);return t=encodeURIComponent(t),t}(this.file());return`https://${this.data.domain||"wikipedia.org"}/wiki/Special:Redirect/file/${e}`},thumbnail(e){return e=e||300,this.url()+"?width="+e},format(){let e=this.file().split(".");return e[e.length-1]?e[e.length-1].toLowerCase():null},json:function(e){return function(e,t){t=p(t,j);let i={file:e.file()};return!1!==t.thumb&&(i.thumb=e.thumbnail()),!1!==t.url&&(i.url=e.url()),!1!==t.caption&&e.data.caption&&(i.caption=e.caption(),!1!==t.links&&e.data.caption.links()&&(i.links=e.links())),!1!==t.alt&&e.data.alt&&(i.alt=e.alt()),i}(this,e=e||{})},text:function(){return""},wikitext:function(){return this.data.wiki||""}};Object.keys(z).forEach((e=>{_.prototype[e]=z[e]})),_.prototype.src=_.prototype.url,_.prototype.thumb=_.prototype.thumbnail;var O={aa:"Afar",ab:"Аҧсуа",af:"Afrikaans",ak:"Akana",als:"Alemannisch",am:"አማርኛ",an:"Aragonés",ang:"Englisc",ar:"العربية",arc:"ܣܘܪܬ",as:"অসমীয়া",ast:"Asturianu",av:"Авар",ay:"Aymar",az:"Azərbaycanca",ba:"Башҡорт",bar:"Boarisch","bat-smg":"Žemaitėška",bcl:"Bikol",be:"Беларуская","be-x-old":"ltr",bg:"Български",bh:"भोजपुरी",bi:"Bislama",bm:"Bamanankan",bn:"বাংলা",bo:"བོད་ཡིག",bpy:"ltr",br:"Brezhoneg",bs:"Bosanski",bug:"ᨅᨔ",bxr:"ltr",ca:"Català",cdo:"Chinese",ce:"Нохчийн",ceb:"Sinugboanong",ch:"Chamoru",cho:"Choctaw",chr:"ᏣᎳᎩ",chy:"Tsetsêhestâhese",co:"Corsu",cr:"Nehiyaw",cs:"Česky",csb:"Kaszëbsczi",cu:"Slavonic",cv:"Чăваш",cy:"Cymraeg",da:"Dansk",de:"Deutsch",diq:"Zazaki",dsb:"ltr",dv:"ދިވެހިބަސް",dz:"ཇོང་ཁ",ee:"Ɛʋɛ",far:"فارسی",el:"Ελληνικά",en:"English",eo:"Esperanto",es:"Español",et:"Eesti",eu:"Euskara",ext:"Estremeñu",ff:"Fulfulde",fi:"Suomi","fiu-vro":"Võro",fj:"Na",fo:"Føroyskt",fr:"Français",frp:"Arpitan",fur:"Furlan",fy:"ltr",ga:"Gaeilge",gan:"ltr",gd:"ltr",gil:"Taetae",gl:"Galego",gn:"Avañe'ẽ",got:"gutisk",gu:"ગુજરાતી",gv:"Gaelg",ha:"هَوُسَ",hak:"ltr",haw:"Hawai`i",he:"עברית",hi:"हिन्दी",ho:"ltr",hr:"Hrvatski",ht:"Krèyol",hu:"Magyar",hy:"Հայերեն",hz:"Otsiherero",ia:"Interlingua",id:"Bahasa",ie:"Interlingue",ig:"Igbo",ii:"ltr",ik:"Iñupiak",ilo:"Ilokano",io:"Ido",is:"Íslenska",it:"Italiano",iu:"ᐃᓄᒃᑎᑐᑦ",ja:"日本語",jbo:"Lojban",jv:"Basa",ka:"ქართული",kg:"KiKongo",ki:"Gĩkũyũ",kj:"Kuanyama",kk:"Қазақша",kl:"Kalaallisut",km:"ភាសាខ្មែរ",kn:"ಕನ್ನಡ",khw:"کھوار",ko:"한국어",kr:"Kanuri",ks:"कश्मीरी",ksh:"Ripoarisch",ku:"Kurdî",kv:"Коми",kw:"Kernewek",ky:"Kırgızca",la:"Latina",lad:"Dzhudezmo",lan:"Leb",lb:"Lëtzebuergesch",lg:"Luganda",li:"Limburgs",lij:"Líguru",lmo:"Lumbaart",ln:"Lingála",lo:"ລາວ",lt:"Lietuvių",lv:"Latviešu","map-bms":"Basa",mg:"Malagasy",man:"官話",mh:"Kajin",mi:"Māori",min:"Minangkabau",mk:"Македонски",ml:"മലയാളം",mn:"Монгол",mo:"Moldovenească",mr:"मराठी",ms:"Bahasa",mt:"bil-Malti",mus:"Muskogee",my:"Myanmasa",na:"Dorerin",nah:"Nahuatl",nap:"Nnapulitano",nd:"ltr",nds:"Plattdüütsch","nds-nl":"Saxon",ne:"नेपाली",new:"नेपालभाषा",ng:"Oshiwambo",nl:"Nederlands",nn:"ltr",no:"Norsk",nr:"ltr",nso:"ltr",nrm:"Nouormand",nv:"Diné",ny:"Chi-Chewa",oc:"Occitan",oj:"ᐊᓂᔑᓈᐯᒧᐎᓐ",om:"Oromoo",or:"ଓଡ଼ିଆ",os:"Иронау",pa:"ਪੰਜਾਬੀ",pag:"Pangasinan",pam:"Kapampangan",pap:"Papiamentu",pdc:"ltr",pi:"Pāli",pih:"Norfuk",pl:"Polski",pms:"Piemontèis",ps:"پښتو",pt:"Português",qu:"Runa",rm:"ltr",rmy:"Romani",rn:"Kirundi",ro:"Română","roa-rup":"Armâneashti",ru:"Русский",rw:"Kinyarwandi",sa:"संस्कृतम्",sc:"Sardu",scn:"Sicilianu",sco:"Scots",sd:"सिनधि",se:"ltr",sg:"Sängö",sh:"Srpskohrvatski",si:"සිංහල",simple:"ltr",sk:"Slovenčina",sl:"Slovenščina",sm:"Gagana",sn:"chiShona",so:"Soomaaliga",sq:"Shqip",sr:"Српски",ss:"SiSwati",st:"ltr",su:"Basa",sv:"Svenska",sw:"Kiswahili",ta:"தமிழ்",te:"తెలుగు",tet:"Tetun",tg:"Тоҷикӣ",th:"ไทย",ti:"ትግርኛ",tk:"Туркмен",tl:"Tagalog",tlh:"tlhIngan-Hol",tn:"Setswana",to:"Lea",tpi:"ltr",tr:"Türkçe",ts:"Xitsonga",tt:"Tatarça",tum:"chiTumbuka",tw:"Twi",ty:"Reo",udm:"Удмурт",ug:"Uyƣurqə",uk:"Українська",ur:"اردو",uz:"Ўзбек",ve:"Tshivenḓa",vi:"Việtnam",vec:"Vèneto",vls:"ltr",vo:"Volapük",wa:"Walon",war:"Winaray",wo:"Wollof",xal:"Хальмг",xh:"isiXhosa",yi:"ייִדיש",yo:"Yorùbá",za:"Cuengh",zh:"中文","zh-classical":"ltr","zh-min-nan":"Bân-lâm-gú","zh-yue":"粵語",zu:"isiZulu"};const E=".wikipedia.org/wiki/$1",q=".wikimedia.org/wiki/$1",N="www.";var S={acronym:N+"acronymfinder.com/$1.html",advisory:"advisory"+q,advogato:N+"advogato.org/$1",aew:"wiki.arabeyes.org/$1",appropedia:N+"appropedia.org/$1",aquariumwiki:N+"theaquariumwiki.com/$1",arborwiki:"localwiki.org/ann-arbor/$1",arxiv:"arxiv.org/abs/$1",atmwiki:N+"otterstedt.de/wiki/index.php/$1",baden:N+"stadtwiki-baden-baden.de/wiki/$1/",battlestarwiki:"en.battlestarwiki.org/wiki/$1",bcnbio:"historiapolitica.bcn.cl/resenas_parlamentarias/wiki/$1",beacha:N+"beachapedia.org/$1",betawiki:"translatewiki.net/wiki/$1",bibcode:"adsabs.harvard.edu/abs/$1",bibliowiki:"wikilivres.org/wiki/$1",bluwiki:"bluwiki.com/go/$1",blw:"britainloves"+E,botwiki:"botwiki.sno.cc/wiki/$1",boxrec:N+"boxrec.com/media/index.php?$1",brickwiki:N+"brickwiki.info/wiki/$1",bugzilla:"bugzilla.wikimedia.org/show_bug.cgi?id=$1",bulba:"bulbapedia.bulbagarden.net/wiki/$1",c:"commons"+q,c2:"c2.com/cgi/wiki?$1",c2find:"c2.com/cgi/wiki?FindPage&value=$1",cache:N+"google.com/search?q=cache:$1","ĉej":"esperanto.blahus.cz/cxej/vikio/index.php/$1",cellwiki:"cell.wikia.com/wiki/$1",centralwikia:"community.wikia.com/wiki/$1",chej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",choralwiki:N+"cpdl.org/wiki/index.php/$1",citizendium:"en.citizendium.org/wiki/$1",ckwiss:N+"ck-wissen.de/ckwiki/index.php?title=$1",comixpedia:N+"comixpedia.org/index.php?title=$1",commons:"commons"+q,communityscheme:"community.schemewiki.org/?c=s&key=$1",communitywiki:"communitywiki.org/$1",comune:"rete.comuni-italiani.it/wiki/$1",creativecommons:"creativecommons.org/licenses/$1",creativecommonswiki:"wiki.creativecommons.org/$1",cxej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",dcc:N+"dccwiki.com/$1",dcdatabase:"dc.wikia.com/$1",dcma:"christian-morgenstern.de/dcma/index.php?title=$1",debian:"wiki.debian.org/$1",delicious:N+"delicious.com/tag/$1",devmo:"developer.mozilla.org/en/docs/$1",dictionary:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",dict:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",disinfopedia:"sourcewatch.org/index.php/$1",distributedproofreaders:N+"pgdp.net/wiki/$1",distributedproofreadersca:N+"pgdpcanada.net/wiki/index.php/$1",dmoz:"curlie.org/$1",dmozs:"curlie.org/search?q=$1",doi:"doi.org/$1",donate:"donate"+q,doom_wiki:"doom.wikia.com/wiki/$1",download:"releases.wikimedia.org/$1",dbdump:"dumps.wikimedia.org/$1/latest/",dpd:"lema.rae.es/dpd/?key=$1",drae:"dle.rae.es/?w=$1",dreamhost:"wiki.dreamhost.com/index.php/$1",drumcorpswiki:N+"drumcorpswiki.com/index.php/$1",dwjwiki:N+"suberic.net/cgi-bin/dwj/wiki.cgi?$1","eĉei":N+"ikso.net/cgi-bin/wiki.pl?$1",ecoreality:N+"EcoReality.org/wiki/$1",ecxei:N+"ikso.net/cgi-bin/wiki.pl?$1",elibre:"enciclopedia.us.es/index.php/$1",emacswiki:N+"emacswiki.org/emacs?$1",encyc:"encyc.org/wiki/$1",energiewiki:N+"netzwerk-energieberater.de/wiki/index.php/$1",englyphwiki:"en.glyphwiki.org/wiki/$1",enkol:"enkol.pl/$1",eokulturcentro:"esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1",esolang:"esolangs.org/wiki/$1",etherpad:"etherpad.wikimedia.org/$1",ethnologue:N+"ethnologue.com/language/$1",ethnologuefamily:N+"ethnologue.com/show_family.asp?subid=$1",evowiki:"wiki.cotch.net/index.php/$1",exotica:N+"exotica.org.uk/wiki/$1",fanimutationwiki:"wiki.animutationportal.com/index.php/$1",fedora:"fedoraproject.org/wiki/$1",finalfantasy:"finalfantasy.wikia.com/wiki/$1",finnix:N+"finnix.org/$1",flickruser:N+"flickr.com/people/$1",flickrphoto:N+"flickr.com/photo.gne?id=$1",floralwiki:N+"floralwiki.co.uk/wiki/$1",foldoc:"foldoc.org/$1",foundation:"foundation"+q,foundationsite:"wikimediafoundation.org/$1",foxwiki:"fox.wikis.com/wc.dll?Wiki~$1",freebio:"freebiology.org/wiki/$1",freebsdman:N+"FreeBSD.org/cgi/man.cgi?apropos=1&query=$1",freeculturewiki:"wiki.freeculture.org/index.php/$1",freedomdefined:"freedomdefined.org/$1",freefeel:"freefeel.org/wiki/$1",freekiwiki:"wiki.freegeek.org/index.php/$1",freesoft:"directory.fsf.org/wiki/$1",ganfyd:"ganfyd.org/index.php?title=$1",gardenology:N+"gardenology.org/wiki/$1",gausswiki:"gauss.ffii.org/$1",gentoo:"wiki.gentoo.org/wiki/$1",genwiki:"wiki.genealogy.net/index.php/$1",gerrit:"gerrit.wikimedia.org/r/$1",git:"gerrit.wikimedia.org/g/$1",google:N+"google.com/search?q=$1",googledefine:N+"google.com/search?q=define:$1",googlegroups:"groups.google.com/groups?q=$1",guildwarswiki:"wiki.guildwars.com/wiki/$1",guildwiki:"guildwars.wikia.com/wiki/$1",guc:"tools.wmflabs.org/guc/?user=$1",gucprefix:"tools.wmflabs.org/guc/?isPrefixPattern=1&src=rc&user=$1",gutenberg:N+"gutenberg.org/etext/$1",gutenbergwiki:N+"gutenberg.org/wiki/$1",hackerspaces:"hackerspaces.org/wiki/$1",h2wiki:"halowiki.net/p/$1",hammondwiki:N+"dairiki.org/HammondWiki/index.php3?$1",hdl:"hdl.handle.net/$1",heraldik:"heraldik-wiki.de/wiki/$1",heroeswiki:"heroeswiki.com/$1",horizonlabs:"horizon.wikimedia.org/$1",hrwiki:N+"hrwiki.org/index.php/$1",hrfwiki:"fanstuff.hrwiki.org/index.php/$1",hupwiki:"wiki.hup.hu/index.php/$1",iarchive:"archive.org/details/$1",imdbname:N+"imdb.com/name/nm$1/",imdbtitle:N+"imdb.com/title/tt$1/",imdbcompany:N+"imdb.com/company/co$1/",imdbcharacter:N+"imdb.com/character/ch$1/",incubator:"incubator"+q,infosecpedia:"infosecpedia.org/wiki/$1",infosphere:"theinfosphere.org/$1","iso639-3":"iso639-3.sil.org/code/$1",issn:N+"worldcat.org/issn/$1",iuridictum:"iuridictum.pecina.cz/w/$1",jaglyphwiki:"glyphwiki.org/wiki/$1",jefo:"esperanto-jeunes.org/wiki/$1",jerseydatabase:"jerseydatabase.com/wiki.php?id=$1",jira:"jira.toolserver.org/browse/$1",jspwiki:N+"ecyrd.com/JSPWiki/Wiki.jsp?page=$1",jstor:N+"jstor.org/journals/$1",kamelo:"kamelopedia.mormo.org/index.php/$1",karlsruhe:"ka.stadtwiki.net/$1",kinowiki:"kino.skripov.com/index.php/$1",komicawiki:"wiki.komica.org/?$1",kontuwiki:"kontu.wiki/$1",wikitech:"wikitech"+q,libreplanet:"libreplanet.org/wiki/$1",linguistlist:"linguistlist.org/forms/langs/LLDescription.cfm?code=$1",linuxwiki:N+"linuxwiki.de/$1",linuxwikide:N+"linuxwiki.de/$1",liswiki:"liswiki.org/wiki/$1",literateprograms:"en.literateprograms.org/$1",livepedia:N+"livepedia.gr/index.php?title=$1",localwiki:"localwiki.org/$1",lojban:"mw.lojban.org/papri/$1",lostpedia:"lostpedia.wikia.com/wiki/$1",lqwiki:"wiki.linuxquestions.org/wiki/$1",luxo:"tools.wmflabs.org/guc/?user=$1",mail:"lists.wikimedia.org/mailman/listinfo/$1",mailarchive:"lists.wikimedia.org/pipermail/$1",mariowiki:N+"mariowiki.com/$1",marveldatabase:N+"marveldatabase.com/wiki/index.php/$1",meatball:"meatballwiki.org/wiki/$1",mw:N+"mediawiki.org/wiki/$1",mediazilla:"bugzilla.wikimedia.org/$1",memoryalpha:"memory-alpha.fandom.com/wiki/$1",metawiki:"meta"+q,metawikimedia:"meta"+q,metawikipedia:"meta"+q,mineralienatlas:N+"mineralienatlas.de/lexikon/index.php/$1",moinmoin:"moinmo.in/$1",monstropedia:N+"monstropedia.org/?title=$1",mosapedia:"mosapedia.de/wiki/index.php/$1",mozcom:"mozilla.wikia.com/wiki/$1",mozillawiki:"wiki.mozilla.org/$1",mozillazinekb:"kb.mozillazine.org/$1",musicbrainz:"musicbrainz.org/doc/$1",mediawikiwiki:N+"mediawiki.org/wiki/$1",mwod:N+"merriam-webster.com/dictionary/$1",mwot:N+"merriam-webster.com/thesaurus/$1",nkcells:N+"nkcells.info/index.php?title=$1",nara:"catalog.archives.gov/id/$1",nosmoke:"no-smok.net/nsmk/$1",nost:"nostalgia"+E,nostalgia:"nostalgia"+E,oeis:"oeis.org/$1",oldwikisource:"wikisource.org/wiki/$1",olpc:"wiki.laptop.org/go/$1",omegawiki:N+"omegawiki.org/Expression:$1",onelook:N+"onelook.com/?ls=b&w=$1",openlibrary:"openlibrary.org/$1",openstreetmap:"wiki.openstreetmap.org/wiki/$1",openwetware:"openwetware.org/wiki/$1",opera7wiki:"operawiki.info/$1",organicdesign:N+"organicdesign.co.nz/$1",orthodoxwiki:"orthodoxwiki.org/$1",osmwiki:"wiki.openstreetmap.org/wiki/$1",otrs:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=$1",otrswiki:"otrs-wiki"+q,ourmedia:N+"socialtext.net/ourmedia/index.cgi?$1",outreach:"outreach"+q,outreachwiki:"outreach"+q,owasp:N+"owasp.org/index.php/$1",panawiki:"wiki.alairelibre.net/index.php?title=$1",patwiki:"gauss.ffii.org/$1",personaltelco:"personaltelco.net/wiki/$1",petscan:"petscan.wmflabs.org/?psid=$1",phab:"phabricator.wikimedia.org/$1",phabricator:"phabricator.wikimedia.org/$1",phwiki:N+"pocketheaven.com/ph/wiki/index.php?title=$1",phpwiki:"phpwiki.sourceforge.net/phpwiki/index.php?$1",planetmath:"planetmath.org/node/$1",pmeg:N+"bertilow.com/pmeg/$1",pmid:N+"ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract",pokewiki:"pokewiki.de/$1","pokéwiki":"pokewiki.de/$1",policy:"policy.wikimedia.org/$1",proofwiki:N+"proofwiki.org/wiki/$1",pyrev:N+"mediawiki.org/wiki/Special:Code/pywikipedia/$1",pythoninfo:"wiki.python.org/moin/$1",pythonwiki:N+"pythonwiki.de/$1",pywiki:"c2.com/cgi/wiki?$1",psycle:"psycle.sourceforge.net/wiki/$1",quality:"quality"+q,quarry:"quarry.wmflabs.org/$1",regiowiki:"regiowiki.at/wiki/$1",rev:N+"mediawiki.org/wiki/Special:Code/MediaWiki/$1",revo:"purl.org/NET/voko/revo/art/$1.html",rfc:"tools.ietf.org/html/rfc$1",rheinneckar:"rhein-neckar-wiki.de/$1",robowiki:"robowiki.net/?$1",rodovid:"en.rodovid.org/wk/$1",reuterswiki:"glossary.reuters.com/index.php/$1",rowiki:"wiki.rennkuckuck.de/index.php/$1",rt:"rt.wikimedia.org/Ticket/Display.html?id=$1",s23wiki:"s23.org/wiki/$1",scholar:"scholar.google.com/scholar?q=$1",schoolswp:"schools-"+E,scores:"imslp.org/wiki/$1",scoutwiki:"en.scoutwiki.org/$1",scramble:N+"scramble.nl/wiki/index.php?title=$1",seapig:N+"seapig.org/$1",seattlewiki:"seattle.wikia.com/wiki/$1",slwiki:"wiki.secondlife.com/wiki/$1","semantic-mw":N+"semantic-mediawiki.org/wiki/$1",senseislibrary:"senseis.xmp.net/?$1",sharemap:"sharemap.org/$1",silcode:N+"sil.org/iso639-3/documentation.asp?id=$1",slashdot:"slashdot.org/article.pl?sid=$1",sourceforge:"sourceforge.net/$1",spcom:"spcom"+q,species:"species"+q,squeak:"wiki.squeak.org/squeak/$1",stats:"stats.wikimedia.org/$1",stewardry:"tools.wmflabs.org/meta/stewardry/?wiki=$1",strategy:"strategy"+q,strategywiki:"strategywiki.org/wiki/$1",sulutil:"meta.wikimedia.org/wiki/Special:CentralAuth/$1",swtrain:"train.spottingworld.com/$1",svn:"svn.wikimedia.org/viewvc/mediawiki/$1?view=log",swinbrain:"swinbrain.ict.swin.edu.au/wiki/$1",tabwiki:N+"tabwiki.com/index.php/$1",tclerswiki:"wiki.tcl.tk/$1",technorati:N+"technorati.com/search/$1",tenwiki:"ten"+E,testwiki:"test"+E,testwikidata:"test.wikidata.org/wiki/$1",test2wiki:"test2"+E,tfwiki:"tfwiki.net/wiki/$1",thelemapedia:N+"thelemapedia.org/index.php/$1",theopedia:N+"theopedia.com/$1",thinkwiki:N+"thinkwiki.org/wiki/$1",ticket:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=$1",tmbw:"tmbw.net/wiki/$1",tmnet:N+"technomanifestos.net/?$1",tmwiki:N+"EasyTopicMaps.com/?page=$1",toolforge:"tools.wmflabs.org/$1",toollabs:"tools.wmflabs.org/$1",tools:"toolserver.org/$1",tswiki:N+"mediawiki.org/wiki/Toolserver:$1",translatewiki:"translatewiki.net/wiki/$1",tviv:"tviv.org/wiki/$1",tvtropes:N+"tvtropes.org/pmwiki/pmwiki.php/Main/$1",twiki:"twiki.org/cgi-bin/view/$1",tyvawiki:N+"tyvawiki.org/wiki/$1",umap:"umap.openstreetmap.fr/$1",uncyclopedia:"en.uncyclopedia.co/wiki/$1",unihan:N+"unicode.org/cgi-bin/GetUnihanData.pl?codepoint=$1",unreal:"wiki.beyondunreal.com/wiki/$1",urbandict:N+"urbandictionary.com/define.php?term=$1",usej:N+"tejo.org/usej/$1",usemod:N+"usemod.com/cgi-bin/wiki.pl?$1",usability:"usability"+q,utrs:"utrs.wmflabs.org/appeal.php?id=$1",vikidia:"fr.vikidia.org/wiki/$1",vlos:"tusach.thuvienkhoahoc.com/wiki/$1",vkol:"kol.coldfront.net/thekolwiki/index.php/$1",voipinfo:N+"voip-info.org/wiki/view/$1",votewiki:"vote"+q,werelate:N+"werelate.org/wiki/$1",wg:"wg-en"+E,wikia:N+"wikia.com/wiki/w:c:$1",wikiasite:N+"wikia.com/wiki/w:c:$1",wikiapiary:"wikiapiary.com/wiki/$1",wikibooks:"en.wikibooks.org/wiki/$1",wikichristian:N+"wikichristian.org/index.php?title=$1",wikicities:N+"wikia.com/wiki/w:$1",wikicity:N+"wikia.com/wiki/w:c:$1",wikiconference:"wikiconference.org/wiki/$1",wikidata:N+"wikidata.org/wiki/$1",wikif1:N+"wikif1.org/$1",wikifur:"en.wikifur.com/wiki/$1",wikihow:N+"wikihow.com/$1",wikiindex:"wikiindex.org/$1",wikilemon:"wiki.illemonati.com/$1",wikilivres:"wikilivres.org/wiki/$1",wikilivresru:"wikilivres.ru/$1","wikimac-de":"apfelwiki.de/wiki/Main/$1",wikimedia:"foundation"+q,wikinews:"en.wikinews.org/wiki/$1",wikinfo:"wikinfo.org/w/index.php/$1",wikinvest:"meta.wikimedia.org/wiki/Interwiki_map/discontinued#Wikinvest",wikiotics:"wikiotics.org/$1",wikipapers:"wikipapers.referata.com/wiki/$1",wikipedia:"en"+E,wikipediawikipedia:"en.wikipedia.org/wiki/Wikipedia:$1",wikiquote:"en.wikiquote.org/wiki/$1",wikisophia:"wikisophia.org/index.php?title=$1",wikisource:"en.wikisource.org/wiki/$1",wikispecies:"species"+q,wikispot:"wikispot.org/?action=gotowikipage&v=$1",wikiskripta:N+"wikiskripta.eu/index.php/$1",labsconsole:"wikitech"+q,wikiti:"wikiti.denglend.net/index.php?title=$1",wikiversity:"en.wikiversity.org/wiki/$1",wikivoyage:"en.wikivoyage.org/wiki/$1",betawikiversity:"beta.wikiversity.org/wiki/$1",wikiwikiweb:"c2.com/cgi/wiki?$1",wiktionary:"en.wiktionary.org/wiki/$1",wipipedia:"wipipedia.org/index.php/$1",wlug:N+"wlug.org.nz/$1",wmam:"am"+q,wmar:N+"wikimedia.org.ar/wiki/$1",wmat:"mitglieder.wikimedia.at/$1",wmau:"wikimedia.org.au/wiki/$1",wmbd:"bd"+q,wmbe:"be"+q,wmbr:"br"+q,wmca:"ca"+q,wmch:N+"wikimedia.ch/$1",wmcl:N+"wikimediachile.cl/index.php?title=$1",wmcn:"cn"+q,wmco:"co"+q,wmcz:N+"wikimedia.cz/web/$1",wmdc:"wikimediadc.org/wiki/$1",securewikidc:"secure.wikidc.org/$1",wmde:"wikimedia.de/wiki/$1",wmdk:"dk"+q,wmee:"ee"+q,wmec:"ec"+q,wmes:N+"wikimedia.es/wiki/$1",wmet:"ee"+q,wmfdashboard:"outreachdashboard.wmflabs.org/$1",wmfi:"fi"+q,wmfr:"wikimedia.fr/$1",wmge:"ge"+q,wmhi:"hi"+q,wmhk:"meta.wikimedia.org/wiki/Wikimedia_Hong_Kong",wmhu:"wikimedia.hu/wiki/$1",wmid:"id"+q,wmil:N+"wikimedia.org.il/$1",wmin:"wiki.wikimedia.in/$1",wmit:"wiki.wikimedia.it/wiki/$1",wmke:"meta.wikimedia.org/wiki/Wikimedia_Kenya",wmmk:"mk"+q,wmmx:"mx"+q,wmnl:"nl"+q,wmnyc:"nyc"+q,wmno:"no"+q,"wmpa-us":"pa-us"+q,wmph:"meta.wikimedia.org/wiki/Wikimedia_Philippines",wmpl:"pl"+q,wmpt:"pt"+q,wmpunjabi:"punjabi"+q,wmromd:"romd"+q,wmrs:"rs"+q,wmru:"ru"+q,wmse:"se"+q,wmsk:"wikimedia.sk/$1",wmtr:"tr"+q,wmtw:"wikimedia.tw/wiki/index.php5/$1",wmua:"ua"+q,wmuk:"wikimedia.org.uk/wiki/$1",wmve:"wikimedia.org.ve/wiki/$1",wmza:"wikimedia.org.za/wiki/$1",wm2005:"wikimania2005"+q,wm2006:"wikimania2006"+q,wm2007:"wikimania2007"+q,wm2008:"wikimania2008"+q,wm2009:"wikimania2009"+q,wm2010:"wikimania2010"+q,wm2011:"wikimania2011"+q,wm2012:"wikimania2012"+q,wm2013:"wikimania2013"+q,wm2014:"wikimania2014"+q,wm2015:"wikimania2015"+q,wm2016:"wikimania2016"+q,wm2017:"wikimania2017"+q,wm2018:"wikimania2018"+q,wmania:"wikimania"+q,wikimania:"wikimania"+q,wmteam:"wikimaniateam"+q,wmf:"foundation"+q,wmfblog:"blog.wikimedia.org/$1",wmdeblog:"blog.wikimedia.de/$1",wookieepedia:"starwars.wikia.com/wiki/$1",wowwiki:N+"wowwiki.com/$1",wqy:"wqy.sourceforge.net/cgi-bin/index.cgi?$1",wurmpedia:"wurmpedia.com/index.php/$1",viaf:"viaf.org/viaf/$1",zrhwiki:N+"zrhwiki.ch/wiki/$1",zum:"wiki.zum.de/$1",zwiki:N+"zwiki.org/$1",m:"meta"+q,meta:"meta"+q,sep11:"sep11"+E,d:N+"wikidata.org/wiki/$1",minnan:"zh-min-nan"+E,nb:"no"+E,"zh-cfr":"zh-min-nan"+E,"zh-cn":"zh"+E,"zh-tw":"zh"+E,nan:"zh-min-nan"+E,vro:"fiu-vro"+E,cmn:"zh"+E,lzh:"zh-classical"+E,rup:"roa-rup"+E,gsw:"als"+E,"be-tarask":"be-x-old"+E,sgs:"bat-smg"+E,egl:"eml"+E,w:"en"+E,wikt:"en.wiktionary.org/wiki/$1",q:"en.wikiquote.org/wiki/$1",b:"en.wikibooks.org/wiki/$1",n:"en.wikinews.org/wiki/$1",s:"en.wikisource.org/wiki/$1",chapter:"en"+q,v:"en.wikiversity.org/wiki/$1",voy:"en.wikivoyage.org/wiki/$1"};Object.keys(O).forEach((e=>{S[e]=e+".wikipedia.org/wiki/$1"}));const C=/^(category|catégorie|kategorie|categoría|categoria|categorie|kategoria|تصنيف|image|file|fichier|datei|media):/i,L=/\[(https?|news|ftp|mailto|gopher|irc)(:\/\/[^\]| ]{4,1500})([| ].*?)?\]/g,A=/\[\[(.{0,1600}?)\]\]([a-z]+)?/gi,P=function(e,t){return t.replace(A,(function(t,i,a){let n=null,r=i;if(i.match(/\|/)&&(r=(i=i.replace(/\[\[(.{2,1000}?)\]\](\w{0,10})/g,"$1$2")).replace(/(.{2,1000})\|.{0,2000}/,"$1"),n=i.replace(/.{2,1000}?\|/,""),null===n&&r.match(/\|$/)&&(r=r.replace(/\|$/,""),n=r)),r.match(C))return i;let o={page:r,raw:t};return o.page=o.page.replace(/#(.*)/,((e,t)=>(o.anchor=t,""))),o=function(e){let t=e.page||"";if(-1!==t.indexOf(":")){let i=t.match(/^(.*):(.*)/);if(null===i)return e;let a=i[1]||"";if(a=a.toLowerCase(),-1!==a.indexOf(":")){let[,t,i]=a.match(/^:?(.*):(.*)/);if(!1===S.hasOwnProperty(t)||!1===O.hasOwnProperty(i))return e;e.wiki={wiki:t,lang:i}}else{if(!1===S.hasOwnProperty(a))return e;e.wiki=a}e.page=i[2]}return e}(o),o.wiki&&(o.type="interwiki"),null!==n&&n!==o.page&&(o.text=n),a&&(o.text=o.text||o.page,o.text+=a.trim()),o.page&&!1===/^[A-Z]/.test(o.page)&&(o.text||(o.text=o.page),o.page=o.page),o.text&&o.text.startsWith(":")&&(o.text=o.text.replace(/^:/,"")),e.push(o),i})),e},T=function(e){let t=[];if(t=function(e,t){return t.replace(L,(function(t,i,a,n){return n=n||"",e.push({type:"external",site:i+a,text:n.trim(),raw:t}),n})),e}(t,e),t=P(t,e),0!==t.length)return t},D=new RegExp("^[ \n\t]*?#("+["adkas","aýdaw","doorverwijzing","ohjaus","patrz","přesměruj","redirección","redireccion","redirección","redirecionamento","redirect","redirection","redirection","rinvia","tilvísun","uudelleenohjaus","weiterleitung","weiterleitung","yönlendi̇r","yönlendirme","yönlendi̇rme","ανακατευθυνση","айдау","перанакіраваньне","перенаправлення","пренасочување","преусмери","преусмјери","تغییر_مسیر","تغییرمسیر","تغییرمسیر","เปลี่ยนทาง","ប្តូរទីតាំងទៅ","転送","重定向"].join("|")+") *?(\\[\\[.{2,180}?\\]\\])","i"),I=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","references","source","syntaxhighlight","timeline"],M=`< ?(${I.join("|")}) ?[^>]{0,200}?>`,R=`< ?/ ?(${I.join("|")}) ?>`,U=new RegExp(`${M}[\\s\\S]+?${R}`,"gi");function F(e){return e=(e=(e=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(U," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%.\-#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/
(.*?)<\/blockquote>/g,"{{blockquote|text=$1}}")).replace(/ ?<[ /]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr|u)[ /]?> ?/g," ")).replace(/ ?<[ /]?(abbr|bdi|bdo|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ /]?> ?/g," ")).replace(/ ?<[ /]?h[0-9][ /]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()}(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~{2,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," ")).replace(/–/g,"–"))).replace(/\([,;: ]+\)/g,"")).replace(/\{\{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,"")}const B=/[\\.$]/,K=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},W=function(e={}){let t=Object.keys(e);for(let i=0;i{Z.prototype[e]=G[e]}));const V=/^[0-9,.]+$/,J={text:!0,links:!0,formatting:!0,numbers:!0},X=function(e={}){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Q={links:function(e){let t=this.data.links||[];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page===e));return void 0===i?[]:[i]}return t},interwiki:function(){return this.links().filter((e=>void 0!==e.wiki))},bolds:function(){return this.data&&this.data.fmt&&this.data.fmt.bold&&this.data.fmt.bold||[]},italics:function(){return this.data&&this.data.fmt&&this.data.fmt.italic&&this.data.fmt.italic||[]},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return function(e,t){t=p(t,J);let i={},a=e.text();if(!0===t.text&&(i.text=a),!0===t.numbers&&V.test(a)){let e=Number(a.replace(/,/g,""));!1===isNaN(e)&&(i.number=e)}return t.links&&e.links().length>0&&(i.links=e.links().map((e=>e.json()))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i}(this,e)},wikitext:function(){return this.data.wiki||""},isEmpty:function(){return""===this.data.text}};Object.keys(Q).forEach((e=>{X.prototype[e]=Q[e]}));const ee={links:"link",bolds:"bold",italics:"italic"};Object.keys(ee).forEach((e=>{X.prototype[ee[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}})),X.prototype.plaintext=X.prototype.text;const te=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),ie=new RegExp("(^| |')("+te.join("|")+")[.!?] ?$","i"),ae=/[ .'][A-Z].? *$/i,ne=/\.{3,} +$/,re=/ c\.\s$/,oe=/\p{Letter}/iu;function se(e){let t={wiki:e,text:e};return function(e){let t=e.text,i=T(t)||[];e.links=i.map((e=>(t=t.replace(e.raw,e.text||e.page||""),new Z(e)))),t=t.replace(/\[\[File:(.{2,80}?)\|([^\]]+)\]\](\w{0,5})/g,"$1"),e.text=t}(t),t.text=r(t.text.replace(/\([,;: ]*\)/g,"").replace(/\( *(; ?)+/g,"(")).replace(/ +\.$/,"."),t=function(e){let t=[],i=[],a=e.text||"";return a=a.replace(/'''''(.{0,2500}?)'''''/g,((e,a)=>(t.push(a),i.push(a),a))),a=a.replace(/''''(.{0,2500}?)''''/g,((e,i)=>(t.push(`'${i}'`),`'${i}'`))),a=a.replace(/'''(.{0,2500}?)'''/g,((e,i)=>(t.push(i),i))),a=a.replace(/''(.{0,2500}?)''/g,((e,t)=>(i.push(t),t))),e.text=a,t.length>0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e}(t),new X(t)}const le=function(e){let t=function(e){let t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;let a=function(e){let t=e.split(/(\n+)/);return t=t.filter((e=>e.match(/\S/))),t=t.map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s|$)/g)})),function(e){let t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t)}(e);for(let e=0;ei.length)return!1;const a=e.match(/"/g);if(a&&a.length%2!=0&&e.length<900)return!1;const n=e.match(/[()]/g);return!(n&&n.length%2!=0&&e.length<900)}(n))?/^\s/.test(i[e+1])||/\s$/.test(i[e])?i[e+1]=i[e]+i[e+1]:i[e+1]=i[e]+" "+i[e+1]:i[e]&&i[e].length>0&&(t.push(i[e]),i[e]="");var n;return 0===t.length?[e]:t}(e.wiki);t=t.map(se),t[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},ce=/.*rowspan *= *["']?([0-9]+)["']?[ |]*/,ue=/.*colspan *= *["']?([0-9]+)["']?[ |]*/,me=function(e){return e=function(e){return e.forEach(((t,i)=>{t.forEach(((a,n)=>{let r=a.match(ce);if(null!==r){let o=parseInt(r[1],10);a=a.replace(ce,""),t[n]=a;for(let t=i+1;t{e.forEach(((t,i)=>{let a=t.match(ue);if(null!==a){let n=parseInt(a[1],10);e[i]=t.replace(ue,"");for(let t=1;te.length>0))}(e))},pe=/^!/,de={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},he=function(e){return(e=se(e).text()).match(/\|/)&&(e=e.replace(/.*?\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},ge=function(e){if(e.length<=3)return[];let t=e[0].slice(0);t=t.map((e=>(e=se(e=e.replace(/^! */,"")).text(),e=(e=he(e)).toLowerCase())));for(let i=0;ie&&!0!==/^\|\+/.test(e))),!0===/^\{\|/.test(e[0])&&e.shift(),!0===/^\|\}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(let a=0;a0&&(t.push(i),i=[]);else{let e=n.charAt(0);"|"!==e&&"!"!==e||(n=n.substring(1)),n=n.split(/(?:\|\||!!)/),"!"===e&&(n[0]=e+n[0]),n.forEach((e=>{e=e.trim(),i.push(e)}))}}return i.length>0&&t.push(i),t}(e.replace(/\r/g,"").replace(/\n(\s*[^|!{\s])/g," $1").split(/\n/).map((e=>e.trim())));if(t=t.filter((e=>e)),0===t.length)return[];t=function(e){return e.filter((e=>1!==e.length||!e[0]||!pe.test(e[0])||!1!==/rowspan/i.test(e[0])))}(t),t=me(t);let i=function(e=[]){let t=[];var i;(i=(i=e[0])||[]).length-i.filter((e=>e)).length>3&&e.shift();let a=e[0];return a&&a[0]&&a[1]&&(/^!/.test(a[0])||/^!/.test(a[1]))&&(t=a.map((e=>(e=e.replace(/^! */,""),he(e)))),e.shift()),a=e[0],a&&a[0]&&a[1]&&/^!/.test(a[0])&&/^!/.test(a[1])&&(a.forEach(((e,i)=>{e=e.replace(/^! */,""),e=he(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(t);if(!i||i.length<=1){i=ge(t);let e=t[t.length-1]||[];i.length<=1&&e.length>2&&(i=ge(t.slice(1)),i.length>0&&(t=t.slice(2)))}let a=t.map((e=>function(e,t){let i={};return e.forEach(((e,a)=>{let n=t[a]||"col"+(a+1),r=se(e);r.text(he(r.text())),i[n]=r})),i}(e,i)));return a},fe={},ke=function(e=""){return e=(e=(e=(e=e.toLowerCase()).replace(/[_-]/g," ")).replace(/\(.*?\)/,"")).trim()},we=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_wiki",{enumerable:!1,value:t})},ye={links(e){let t=[];if(this.data.forEach((e=>{Object.keys(e).forEach((i=>{t=t.concat(e[i].links())}))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},get(e){let t=this.data[0]||{},i=Object.keys(t).reduce(((e,t)=>(e[ke(t)]=t,e)),{});if("string"==typeof e){let t=ke(e);return t=i[t]||t,this.data.map((e=>e[t]?e[t].text():null))}return e=e.map(ke).map((e=>i[e]||e)),this.data.map((t=>e.reduce(((e,i)=>(t[i]?e[i]=t[i].text():e[i]="",e)),{})))},keyValue(e){let t=this.json(e);return t.forEach((e=>{Object.keys(e).forEach((t=>{e[t]=e[t].text}))})),t},json(e){return e=p(e,fe),function(e,t){return e.map((e=>{let i={};return Object.keys(e).forEach((t=>{i[t]=e[t].json()})),!0===t.encode&&(i=W(i)),i}))}(this.data,e)},text:()=>"",wikitext(){return this._wiki||""}};ye.keyvalue=ye.keyValue,ye.keyval=ye.keyValue,Object.keys(ye).forEach((e=>{we.prototype[e]=ye[e]}));const $e=/^\s*\{\|/,xe=/^\s*\|\}/,ve={sentences:!0},je={sentences:!0,lists:!0,images:!0},_e=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},ze={sentences:function(){return this.data.sentences||[]},references:function(){return this.data.references},lists:function(){return this.data.lists},images(){return this.data.images||[]},links:function(e){let t=[];if(this.sentences().forEach((i=>{t=t.concat(i.links(e))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},interwiki(){let e=[];return this.sentences().forEach((t=>{e=e.concat(t.interwiki())})),e||[]},text:function(e){e=p(e,je);let t=this.sentences().map((t=>t.text(e))).join(" ");return this.lists().forEach((e=>{t+="\n"+e.text()})),t},json:function(e){return function(e,t){let i={};return!0===(t=p(t,ve)).sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,je))},wikitext:function(){return this.data.wiki}};ze.citations=ze.references,Object.keys(ze).forEach((e=>{_e.prototype[e]=ze[e]}));const Oe={sentences:"sentence",references:"reference",citations:"citation",lists:"list",images:"image",links:"link"};Object.keys(Oe).forEach((e=>{_e.prototype[Oe[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}}));const Ee=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},qe=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},Ne=/^[\p{Letter}0-9._/\- '()\t]+=/iu,Se={template:!0,list:!0,prototype:!0},Ce=function(e,t){let i=0;return e.reduce(((e,a="")=>{if(a=a.trim(),!0===Ne.test(a)){let t=function(e){let t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();let a=t.slice(1).join("=");return Se.hasOwnProperty(i)&&(i="_"+i),{key:i,val:a.trim()}}(a);if(t.key)return e[t.key]&&!t.val||(e[t.key]=t.val),e}if(t&&t[i]){e[t[i]]=a}else e.list=e.list||[],e.list.push(a);return i+=1,e}),{})},Le={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Ae=function(e,t){let i=se(e);return"json"===t?i.json():"raw"===t?i:i.text()},Pe=function(e,t=[],i){let a=function(e){let t=e.split(/\n?\|/);t.forEach(((e,i)=>{null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)})),t=t.filter((e=>null!==e)),t=t.map((e=>(e||"").trim()));for(let e=t.length-1;e>=0;e-=1){""===t[e]&&t.pop();break}return t}(e=Ee(e||"")),n=a.shift(),r=Ce(a,t);return r=function(e){return Object.keys(e).forEach((t=>{!0===Le[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e}(r),r[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((e=>{r[e]="list"!==e?Ae(r[e],i):r[e].map((e=>Ae(e,i)))})),n&&(r.template=qe(n)),r};const Te=new RegExp("("+g.join("|")+"):","i");let De=`(${g.join("|")})`;const Ie=new RegExp(De+":(.+?)[\\||\\]]","iu"),Me=/^\[\[:/,Re={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},Ue=function(e,t){let i=e.wiki,a=function(e){let t=[],i=[];const a=e.split("");let n=0;for(let r=0;r0){let e=0,a=0;for(let t=0;ta&&i.push("]"),t.push(i.join("")),i=[]}}return t}(i);a.forEach((function(a){if(!0===Te.test(a)){e.images=e.images||[];let n=function(e,t){let i=e.match(Ie);if(null===i||!i[2])return null;if(Me.test(e))return null;let a=`${i[1]}:${i[2]||""}`;if(a){let i={file:a,lang:t._lang,domain:t._domain,wiki:e,pluginData:{}};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");let n=Pe(e),r=n.list||[];return n.alt&&(i.alt=n.alt),r=r.filter((e=>!1===Re.hasOwnProperty(e))),r[r.length-1]&&(i.caption=se(r[r.length-1])),new _(i)}return null}(a,t);n&&(e.images.push(n),i=i.replace(a,""))}})),e.wiki=i},Fe={},Be=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},Ke={lines(){return this.data},links(e){let t=[];if(this.lines().forEach((e=>{t=t.concat(e.links())})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},json(e){return e=p(e,Fe),this.lines().map((t=>t.json(e)))},text(){return((e,t)=>e.map((e=>" * "+e.text(t))).join("\n"))(this.data)},wikitext(){return this.wiki||""}};Object.keys(Ke).forEach((e=>{Be.prototype[e]=Ke[e]}));const We=/^[#*:;|]+/,He=/^\*+[^:,|]{4}/,Ye=/^ ?#[^:,|]{4}/,Ze=/[\p{Letter}_0-9\]}]/iu,Ge=function(e){return We.test(e)||He.test(e)||Ye.test(e)},Ve=function(e,t){let i=[];for(let a=t;ae&&Ze.test(e))),i=function(e){let t=1;e=e.filter((e=>e));for(let i=0;ie&&e.trim().length>0)),a=a.map((e=>{let i={wiki:e,lists:[],sentences:[],images:[]};return function(e){let t=e.wiki,i=t.split(/\n/g),a=[],n=[];for(let e=0;e0&&(a.push(t),e+=t.length-1)}else n.push(i[e]);e.lists=a.map((e=>new Be(e,t))),e.wiki=n.join("\n")}(i),Ue(i,t),le(i),new _e(i)})),e._wiki=i,e._paragraphs=a},Qe="{",et=function(e){let t=0,i=[],a=[];for(let n=e.indexOf(Qe);-1!==n&&n0?n++:n=e.indexOf(Qe,n+1)){let r=e[n];if(r===Qe&&(t+=1),t>0){if("}"===r&&(t-=1,0===t)){a.push(r);let e=a.join("");a=[],/\{\{/.test(e)&&/\}\}/.test(e)&&i.push(e);continue}if(1===t&&r!==Qe&&"}"!==r){t=0,a=[];continue}a.push(r)}}return i},tt=function(e){let t=null;return t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1],t&&(t=t.replace(/:.*/,""),t=qe(t)),t||null},it=/\{\{/,at=function(e){return{body:e,name:tt(e),children:[]}},nt=function(e){let t=e.body.substr(2);return t=t.replace(/\}\}$/,""),e.children=et(t),e.children=e.children.map(at),0===e.children.length||e.children.forEach((e=>{let t=e.body.substr(2);return it.test(t)?nt(e):null})),e},rt=function(e){let t=et(e);return t=t.map(at),t=t.map(nt),t},ot=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce(((e,t)=>(e[t]=!0,e)),{});var st={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0};const lt=new RegExp("^(subst.)?("+b.join("|")+")(?=:| |\n|$)","i");b.forEach((e=>{st[e]=!0}));const ct=/^infobox /i,ut=/ infobox$/i,mt=/^year in [A-Z]/i,pt=function(e={}){let t=e.template.match(lt),i=e.template;t&&t[0]&&(i=i.replace(t[0],"")),i=i.trim();let a={template:"infobox",type:i,data:e};return delete a.data.template,delete a.data.list,a};let dt={imdb:"imdb name","imdb episodes":"imdb episode",localday:"currentday",localdayname:"currentdayname",localyear:"currentyear","birth date based on age at death":"birth based on age as of date","bare anchored list":"anchored list",cvt:"convert",cricon:"flagicon",sfrac:"frac",sqrt:"radic","unreferenced section":"unreferenced",redir:"redirect",sisterlinks:"sister project links","main article":"main",by:"baseball year",aldsy:"alds year",nldsy:"nlds year","str rep":"replace",ushr2:"ushr",stn:"station",metrod:"metro",fw:"ferry",rws:"stnlnk",sclass2:"sclass",under:"underline",brackets:"bracket",raise:"lower"},ht={date:["byline","dateline"],citation:["cite","source","source-pr","source-science"],"no spam":["email","@","no spam blue"],"lrt station":["lrt","lrts"],"mrt station":["mrt","mrts"],flagcountry:["cr","cr-rt"],trunc:["str left","str crop"],percentage:["pct","percentage"],rnd:["rndfrac","rndnear"],abbr:["tooltip","abbrv","define"],sfn:["sfnref","harvid","harvnb"],"birth date and age":["death date and age","bda"],currentmonth:["localmonth","currentmonthname","currentmonthabbrev"],currency:["monnaie","unité","nombre","nb","iso4217"],coord:["coor","coor title dms","coor title dec","coor dms","coor dm","coor dec"],"columns-list":["cmn","col-list","columnslist","collist"],nihongo:["nihongo2","nihongo3","nihongo-s","nihongo foot"],plainlist:["flatlist","plain list"],"winning percentage":["winpct","winperc"],"collapsible list":["nblist","nonbulleted list","ubl","ublist","ubt","unbullet","unbulleted list","unbulleted","unbulletedlist","vunblist"],"election box begin":["election box begin no change","election box begin no party","election box begin no party no change","election box inline begin","election box inline begin no change"],"election box candidate":["election box candidate for alliance","election box candidate minor party","election box candidate no party link no change","election box candidate with party link","election box candidate with party link coalition 1918","election box candidate with party link no change","election box inline candidate","election box inline candidate no change","election box inline candidate with party link","election box inline candidate with party link no change","election box inline incumbent"],"4teambracket":["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"],start:["end","birth","death","start date","end date","birth date","death date","start date and age","end date and age","dob"],"start-date":["end-date","birth-date","death-date","birth-date and age","birth-date and given age","death-date and age","death-date and given age"],tl:["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","xpd","para","elc","xtag","mli","mlix","url"],done:["resolved mark large","implemented","pimplemented","resolved mark","accepted","agree","approved","checked2","verified","conditional yes","confirmed","confirmed-nc","tallyho","tick","helped","doneu|example","edited2","donetask","unprod","autp","responded","sure","merge done","marked","pass","aye","yes check","y&","yeac","yeag"],xmark:["expired","deleted","not done","not done empty request","not done unclear","not done not likely","stale-small","smallrejected","x mark","nay","no mark","not done-t","fail","n&","x mark-n","xed box","cancelled","deleted-image","already declined","opblocked","user-blocked","notabug","notfixed","won't fix","withdraw","nojoy","unrelated","off-topic talk","nayc","nayg"],checked:["already done","resolved1","check mark-n","checked box"],"station link":["amtk","cta","bts","mnrr","mtams","munis","njts","scax","wmata","rwsa"]};Object.keys(O).forEach((e=>{dt["ipa-"+e]="ipa",dt["ipac-"+e]="ipac"})),Object.keys(ht).forEach((e=>{ht[e].forEach((t=>{dt[t]=e}))}));var gt={"·":"·",dot:"·",middot:"·","•":" • ",",":",","=":"=","1/2":"1⁄2","1/3":"1⁄3","2/3":"2⁄3","1/4":"1⁄4","3/4":"3⁄4","–":"–",ndash:"–","en dash":"–","spaced ndash":" – ","—":"—",mdash:"—",spd:" – ","em dash":"—","number sign":"#","hash-tag":"#",ibeam:"I","&":"&",";":";",ampersand:"&",dagger:"†","double-dagger":"‡",snds:" – ",snd:" – ","^":" ","!":"|","'":"'","\\":" /","`":"`","[":"[","*":"*",asterisk:"*","long dash":"———",clear:"\n\n","h.":"ḥ",profit:"▲",loss:"▼",gain:"▲",ell:"ℓ","1~":"~","2~":"~~","3~":"~~~","4~":"~~~~","5~":"~~~~~",goldmedal:"🥇",silvermedal:"🥈",bronzemedal:"🥉",done:"✅",xmark:"❌",checked:"✔️","thumbs up":"👍","thumbs down":"👎",minusplus:"∓",plusminus:"±"};let bt={p1:0,p2:1,p3:2,resize:1,lang:1,"rtl-lang":1,l:2,h:1,sort:1};["defn","lino","finedetail","nobold","noitalic","nocaps","vanchor","rnd","date","taste","monthname","baseball secondary style","nowrap","nobr","big","cquote","pull quote","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code","char","angle bracket","angbr","symb","dabsearch","key press","nowiki","nowiki2","unstrip","unstripnowiki","plain text","make code","killmarkers","longitem","longlink","strikethrough","underline","uuline","not a typo","text","resize","var serif","double underline","nee","ne","left","right","center","centered","justify","smalldiv","bold div","monodiv","italic div","bigdiv","strikethroughdiv","strikethrough color","pbpe"].forEach((e=>{bt[e]=0}));["line-height"].forEach((e=>{bt[e]=1}));let ft={};["mv","m/v","gts","hsc","ms","m/s","my","m/y","ps","rms","rv","r/v","sb","ss","s/s","sv","s/v","sy","s/y","tss","ans","hmas","hmbs","bns","hmcs","ccgs","arc","hdms","bae","ens","eml","rfns","fns","hs","sms","smu","gs","icgv","ins","kri","lé","jsub","jds","js","hnlms","hmnzs","nns","hnoms","hmpngs","bap","rps","brp","orp","nrp","nms","rss","sas","hmsas","roks","hswms","htms","tcg","hms","hmt","rfaux","usat","uscgc","usns","usrc","uss","usav"].forEach((e=>{ft[e]=t=>{let{name:i,id:a}=Pe(t,["name","id"]);return a?`[[${e.toUpperCase()} ${i} (${a})]]`:`[[${e.toUpperCase()} ${i}]]`}}));const kt=function(e){if(!e.numerator&&!e.denominator)return null;let t=Number(e.numerator)/Number(e.denominator);return t*=100,Number(e.decimals),parseInt(t,10)},wt=function(e=""){if("number"==typeof e)return e;e=(e=e.replace(/,/g,"")).replace(/−/g,"-");let t=Number(e);return isNaN(t)?e:t},yt=function(e){let t=e.match(/ipac?-(.+)/);return null!==t?!0===O.hasOwnProperty(t[1])?O[t[1]].english_title:t[1]:null},$t=e=>e.charAt(0).toUpperCase()+e.substring(1),xt=function(e){let t=e%10,i=e%100;return 1===t&&11!==i?e+"st":2===t&&12!==i?e+"nd":3===t&&13!==i?e+"rd":e+"th"},vt={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"};var jt={ra:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:e=>(Pe(e,["degrees"]).degrees||"")+"°",hms2deg:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:e=>{let t=Pe(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},sortname:e=>{let t=Pe(e,["first","last","target","sort"]),i=`${t.first||""} ${t.last||""}`;return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=` (${t.dab})`,t.target&&(t.target+=` (${t.dab})`)),t.target?`[[${t.target}|${i}]]`:`[[${i}]]`)},"first word":e=>{let t=Pe(e,["text"]),i=t.text||"";return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:e=>{let t=Pe(e,["str","len"]);return(t.str||"").substr(0,t.len)},"str mid":e=>{let t=Pe(e,["str","start","end"]),i=parseInt(t.start,10)-1,a=parseInt(t.end,10);return t.str.substr(i,a)},reign:e=>{let t=Pe(e,["start","end"]);return`(r. ${t.start} – ${t.end})`},circa:e=>{let{year:t}=Pe(e,["year"]);return t?`c. ${t}`:"c. "},"decade link":e=>{let{year:t}=Pe(e,["year"]);return`${t}|${t}s`},decade:e=>{let t=Pe(e,["year"]),i=Number(t.year);return i=10*Math.floor(i/10),`${i}s`},century:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/100)+1,`${i}`},radic:e=>{let t=Pe(e,["after","before"]);return`${t.before||""}√${t.after||""}`},"medical cases chart/row":e=>e,oldstyledate:e=>{let t=Pe(e,["date","year"]);return t.year?t.date+" "+t.year:t.date},braces:e=>{let t=Pe(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},hlist:e=>{let t=Pe(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:e=>(Pe(e).list||[]).join(", "),catlist:e=>(Pe(e).list||[]).join(", "),"br separated entries":e=>(Pe(e).list||[]).join("\n\n"),"comma separated entries":e=>(Pe(e).list||[]).join(", "),"anchored list":e=>{let t=Pe(e).list||[];return t=t.map(((e,t)=>`${t+1}. ${e}`)),t.join("\n\n")},"bulleted list":e=>{let t=Pe(e).list||[];return t=t.filter((e=>e)),t=t.map((e=>"• "+e)),t.join("\n\n")},plainlist:e=>{let t=(e=Ee(e)).split("|").slice(1);return t=t.join("|").split(/\n ?\* ?/),t=t.filter((e=>e)),t.join("\n\n")},term:e=>`${Pe(e,["term"]).term}:`,linum:e=>{let{num:t,text:i}=Pe(e,["num","text"]);return`${t}. ${i}`},"block indent":e=>{let t=Pe(e);return t[1]?"\n"+t[1]+"\n":""},lbs:e=>{let t=Pe(e,["text"]);return`[[${t.text} Lifeboat Station|${t.text}]]`},lbc:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}-class]]`},lbb:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}]]`},"#dateformat":e=>(e=e.replace(/:/,"|"),Pe(e,["date","format"]).date),lc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toLowerCase()),uc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toUpperCase()),lcfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},ucfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbrlink:e=>{let t=Pe(e,["abbr","page"]);return t.page?`[[${t.page}|${t.abbr}]]`:`[[${t.abbr}]]`},own:e=>{let t=Pe(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},formatnum:e=>{e=e.replace(/:/,"|");let t=Pe(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},frac:e=>{let t=Pe(e,["a","b","c"]);return t.c?`${t.a} ${t.b}/${t.c}`:t.b?`${t.a}/${t.b}`:`1/${t.b}`},convert:e=>{let t=Pe(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?`${t.num} ${t.two} ${t.three} ${t.four}`:`${t.num} ${t.two} ${t.three}`:`${t.num} ${t.two}`},tl:e=>{let t=Pe(e,["first","second"]);return t.second||t.first},won:e=>{let t=Pe(e,["text"]);return t.place||t.text||$t(t.template)},tag:e=>{let t=Pe(e,["tag","open"]);const i={span:!0,div:!0,p:!0};return t.open&&"pair"!==t.open?"":i[t.tag]?t.content||"":`<${t.tag} ${t.attribs||""}>${t.content||""}`},plural:e=>{e=e.replace(/plural:/,"plural|");let t=Pe(e,["num","word"]),i=Number(t.num),a=t.word;return 1!==i&&(/.y$/.test(a)?a=a.replace(/y$/,"ies"):a+="s"),i+" "+a},dec:e=>{let t=Pe(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:e=>{let t=Pe(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());let a=i||"";return t.p&&(a=t.p+a),t.s&&(a=t.s+a),(t.u||t.ul||t.upl)&&(a=a+" "+(t.u||t.ul||t.upl)),a},percentage:e=>{let t=Pe(e,["numerator","denominator","decimals"]),i=kt(t);return null===i?"":i+"%"},small:e=>{let t=Pe(e);return t.list&&t.list[0]?t.list[0]:""},"percent-done":e=>{let t=Pe(e,["done","total","digits"]),i=kt({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":`${t.done} (${i}%) done`},loop:e=>{let t=Pe(e,["times","text"]),i=Number(t.times)||0,a="";for(let e=0;e{let t=Pe(e,["text"]);return String((t.text||"").trim().length)},digits:e=>(Pe(e,["text"]).text||"").replace(/[^0-9]/g,""),"last word":e=>{let t=(Pe(e,["text"]).text||"").split(/ /g);return t[t.length-1]||""},replace:e=>{let t=Pe(e,["text","from","to"]);return t.from&&t.to?(t.text||"").replace(t.from,t.to):t.text||""},"title case":e=>(Pe(e,["text"]).text||"").split(/ /).map(((e,t)=>t>0&&"the"===e||"of"===e?e:$t(e))).join(" "),"no spam":e=>{let t=Pe(e,["account","domain"]);return`${t.account||""}@${t.domain}`},"baseball year":e=>{let t=Pe(e,["year"]).year||"";return`[[${t} in baseball|${t}]]`},"mlb year":e=>{let t=Pe(e,["year"]).year||"";return`[[${t} Major League Baseball season|${t}]]`},"nlds year":e=>{let{year:t}=Pe(e,["year"]);return`[[${t||""} National League Division Series|${t}]]`},"alds year":e=>{let{year:t}=Pe(e,["year"]);return`[[${t||""} American League Division Series|${t}]]`},"nfl year":e=>{let{year:t,other:i}=Pe(e,["year","other"]);return i&&t?`[[${t} NFL season|${t}]]–[[${i} NFL season|${i}]]`:`[[${t||""} NFL season|${t}]]`},"nfl playoff year":e=>{let{year:t}=Pe(e,["year"]);return t=Number(t),`[[${t}–${t+1} NFL playoffs|${t}]]`},"nba year":e=>{let{year:t}=Pe(e,["year"]);t=Number(t);let i=t+1;return`[[${t}–${i} NBA season|${t}–${i}]]`},"mhl year":e=>{let t=Pe(e,["year"]),i=Number(t.year),a=i+1;return`[[${i}–${a} NHL season|${i}–${a}]]`},min:e=>{let t=Pe(e).list||[],i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t{let t=Pe(e).list,i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t>i&&(i=t)})),String(i)},uspolabbr:e=>{let{party:t,state:i,house:a}=Pe(e,["party","state","house","link"]);if(!t||!i)return"";let n=`${t}‑${i}`;return a&&(n+=` ${xt(a)}`),n},ushr:e=>{let{state:t,num:i,type:a}=Pe(e,["state","num","type"]),n="";if("AL"!==i)return i=xt(Number(i)),`${t}'s ${i} congressional district`;if(n=`${t}'s at-large congressional district`,a){if(a=a.toLowerCase(),i="AL"===i?"At-large":i,"e"===a)return`[[${n}|${i}]]`;if("u"===a)return`[[${n}|${t}]]`;if("b"===a||"x"===a)return`[[${n}|${t} ${i}]]`}return`[[${n}]]`},metro:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},station:e=>{let{name:t,dab:i}=Pe(e,["name","x","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},bssrws:e=>{let{one:t,two:i}=Pe(e,["one","two"]),a=t;return i&&(a+=" "+i),`[[${a} railway station|${a}]]`},stnlnk:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} railway station (${i})|${t}]]`:`[[${t} railway station|${t}]]`},"station link":e=>{let{station:t,system:i}=Pe(e,["system","station"]);return t||i},"line link":e=>{let{station:t,system:i}=Pe(e,["system","station"]);return t||i},subway:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} subway station|${t}]]`},"lrt station":e=>{let{name:t}=Pe(e,["name"]);return`[[${t} LRT station|${t}]]`},"mrt station":e=>{let{name:t}=Pe(e,["name"]);return`[[${t} MRT station|${t}]]`},rht:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} railway halt|${t}]]`},ferry:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} ferry wharf|${t}]]`},tram:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} tram stop (${i})|${t}]]`:`[[${t} tram stop|${t}]]`},tstop:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} ${i} stop|${t}]]`:`[[${t} stop|${t}]]`},ship:e=>{let{prefix:t,name:i,id:a}=Pe(e,["prefix","name","id"]);return t=t||"",`[[${t.toUpperCase()} ${i}]]`},sclass:e=>{let{cl:t,type:i}=Pe(e,["cl","type","fmt"]);return`[[${t}-class ${i} |''${t}''-class]] [[${i}]]`},"center block":e=>{let{txt:t}=Pe(e,["txt"]);return t||""},align:e=>{let{txt:t}=Pe(e,["dir","txt"]);return t||""},font:e=>{let{txt:t}=Pe(e,["txt"]);return t||""},float:e=>{let{txt:t,dir:i}=Pe(e,["dir","txt"]);return t?t||"":i},lower:e=>{let{txt:t,n:i}=Pe(e,["n","txt"]);return t?t||"":i},splitspan:e=>{let{left:t,right:i}=Pe(e,["left","right"]);return(t||"")+"\n"+(i||"")},bracket:e=>{let{word:t}=Pe(e,["word"]);return t?`[${t}]`:"["},"in title":e=>{let{title:t,text:i}=Pe(e,["title","text"]);return i||(t?`All pages with titles containing ${t}`:"")},"look from":e=>{let{title:t,text:i}=Pe(e,["title","text"]);return i||(t?`All pages with titles beginning with ${t}`:"")}};let _t={};["sr-latn-cyrl","sr-cyrl-latn","sr-latn","sr-cyrl","sr-cyr","sh-latn-cyrl","sh-cyrl-latn","sh-latn","sh-cyrl","cel-1bd","cel-x-proto","en-emodeng","de-at","de-ch","gem-x-proto","gsw-fr","nds-nl","nl-be","ku-arab","ku-cyrl","pt-br","fra-frc","fra-que","roa-leo","roa-nor","ca-valencia","ast-leo","grc-gre","grc-x-doric","grc-x-proto","grc-x-medieval","cpg","gmy","grc","grk-x-proto","pnt","mga","owl","pgl","sga","wlm","xbm","xcb","xcg","xpi","aae","aln","sq-definite","bs-cyrl","hsb","ltg","orv","prg","rsk","rue","rus","sgs","sla","szl","wen","aoa","chn","cri","dlm","egl","fax","frc","frm","fro","fr-gallo","oc-gascon","gcf","gcr","ist","la-x-medieval","lij-mc","lld","lou","mfe","mol","mwl","mxi","nrf","osc","osp","pcd","pln","rcf","rgn","roa","ruo","rup","ruq","sdc","sdn","src","sro","xvo","bzj","cim","dum","enm","frk","frr","frs","gmh","gml","gmw","goh","gos","gsw","gyn","icr","jam","kri","lng","nb","non","nrn","odt","ofs","osx","pey","sli","srm","srn","stq","swg","vmf","wae","wep","wes","zea","hmd","hoc","kha","mnw","mtq","vi-chunom","vi-hantu","mvi","rys","ryu","yoi","ace","akl","ami","bew","bik","bjn","bya","cal","cbk","cjm","coa","cyo","dev","fil","gad","hil","iba","ibg","ibl","ilp","itv","ivv","jax","kne","krj","kxd","ljp","mad","mak","mdh","mrv","mrw","ms-arab","nia","niu","pau","pwn","rap","rar","sgd","su-fonts","szy","tao","tkl","tsg","tvl","uli","wls","xsb","yap","yka","ckt","itl","brh","oty","tcy","abq","ady","ddo","inh","kbd","lbe","lez","rut","tab","uby","udi","bai","bin","bsq","dag","dyu","efi","fan","fmp","fuc","fuf","gaa","ibb","kbp","kcg","kpo","ktu","lu","lua","lun","mkw","mos","oaa","sjo","ude","anm","bft","blk","brx","dng","kjp","kjz","ksw","lbj","lus","aae","aaq","abe","abq","aca","ace","acf","acm","acw","ady","ae","aeb","aec","aer","afb","aht","aii","aij","ain","aiq","akk","akl","akz","ale","aln","alq","alt","ami","anm","aoa","apj","apm","apw","ayn","arb","arh","ari","arn","arp","arq","ary","arz","asb","ath","ats","awa","axm","azb","azd","azj","bai","bal","ban","bax","bdz","bea","ber","bew","bft","bgn","bho","bik","bin","bjn","bla","blc","blk","bqi","brh","brx","bsk","bsq","bua","bvb","bya","bzj","cal","cay","cbk","ccp","chg","chm","chn","chp","cic","cim","ciw","cjm","cjs","ckb","ckt","cku","cld","clm","cmg","cmn","cms","cnu","coa","coc","coj","com","coo","cop","cpg","crg","crh","cri","crj","crk","crl","crm","cro","csw","csz","ctg","ctm","cyo","dag","dak","ddo","deh","del","den","dev","din","dlm","dng","dum","dyu","efi","egl","egy","elx","eml","ems","cmn","och","yue","mjw","mni","my-name-mlcts","nan","nwc","omp","otb","pwo","sip","xct","xsr","1ca","alt","az-arab","azb","azj","chg","cjs","crh","crh3","kaa","kjh","krc","kum","nog","ota","otk","sah","slr","sty","tt-arab","tt-cyrl","tt-latn","tyv","uniturk","chm","est-sea","fit","fkv","izh","jmy","koi","krl","liv","mdf","mhr","mrj","myv","olo","sia","sjd","sje","sjk","sjt","sju","sma","smi","smj","smn","sms","vep","vot","vro","yrk","din","luo","srr","sus","swh","umb","yao"].forEach((e=>{_t["lang-"+e]=0})),Object.keys(O).forEach((e=>{_t["lang-"+e]=0}));var zt=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","us","united states"],["🇺🇸","usa","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]];const Ot=["flag","variant"];let Et={flag:e=>{let t=Pe(e,Ot),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();let a=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${a[0]||""} [[${a[2]}|${i}]]`},flagcountry:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} [[${i[2]}]]`},flagcu:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} ${i[2]}`},flagicon:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`[[${i[2]}|${i[0]}]]`:""},flagdeco:e=>{let t=Pe(e,Ot);return t.flag=(t.flag||"").toLowerCase(),(zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[])[0]||""},fb:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${i[2]} national football team|${i[2]}]]`:""},fbicon:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?` [[${i[2]} national football team|${i[0]}]]`:""},flagathlete:e=>{let t=Pe(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${t.name||""}]] (${i[1].toUpperCase()})`:`[[${t.name||""}]]`}};zt.forEach((e=>{Et[e[1]]=()=>e[0]}));let qt={};["rh","rh2","yes","no","maybe","eliminated","lost","safe","active","site active","coming soon","good","won","nom","sho","longlisted","tba","success","operational","failure","partial","regional","maybecheck","partial success","partial failure","okay","yes-no","some","nonpartisan","pending","unofficial","unofficial2","usually","rarely","sometimes","any","varies","black","non-album single","unreleased","unknown","perhaps","depends","included","dropped","terminated","beta","table-experimental","free","proprietary","nonfree","needs","nightly","release-candidate","planned","scheduled","incorrect","no result","cmain","calso starring","crecurring","cguest","not yet","optional"].forEach((e=>{qt[e]=e=>{let t=Pe(e,["text"]);return t.text||$t(t.template)}}));[["active fire","Active"],["site active","Active"],["site inactive","Inactive"],["yes2",""],["no2",""],["ya","✅"],["na","❌"],["nom","Nominated"],["sho","Shortlisted"],["tba","TBA"],["maybecheck","✔️"],["okay","Neutral"],["n/a","N/A"],["sdash","—"],["dunno","?"],["draw",""],["cnone",""],["nocontest",""]].forEach((e=>{qt[e[0]]=t=>Pe(t,["text"]).text||e[1]}));var Nt=Object.assign({},gt,bt,ft,jt,_t,Et,qt);let St={};["goodreads author","twitter","facebook","instagram","tumblr","pinterest","espn nfl","espn nhl","espn fc","hockeydb","fifa player","worldcat","worldcat id","nfl player","ted speaker","playmate"].forEach((e=>{St[e]=["id","name"]}));let Ct={};["imdb title","imdb name","imdb episode","imdb event","afi film","allmovie title","allgame","tcmdb title","discogs artist","discogs label","discogs release","discogs master","librivox author","musicbrainz artist","musicbrainz label","musicbrainz recording","musicbrainz release","musicbrainz work","youtube","goodreads book","dmoz"].forEach((e=>{Ct[e]=["id","title","description","section"]}));var Lt={ipa:(e,t)=>{let i=Pe(e,["transcription","lang","audio"]);return i.lang=yt(i.template),i.template="ipa",t.push(i),""},ipac:(e,t)=>{let i=Pe(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=yt(i.template),i.template="ipac",t.push(i),""},quote:(e,t)=>{let i=Pe(e,["text","author"]);if(t.push(i),i.text){let e=`"${i.text}"`;return i.author&&(e+="\n\n",e+=` - ${i.author}`),e+"\n"}return""},"cite gnis":(e,t)=>{let i=Pe(e,["id","name","type"]);return i.type="gnis",i.template="citation",t.push(i),""},"spoken wikipedia":(e,t)=>{let i=Pe(e,["file","date"]);return i.template="audio",t.push(i),""},yel:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`yellow: ${i.min||""}'`:""},subon:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub on: ${i.min||""}'`:""},suboff:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub off: ${i.min||""}'`:""},sfn:(e,t,i,a)=>{let n=Pe(e,["author","year","location"]);return a&&(n.name=n.template,n.teplate=a),t.push(n),""},redirect:(e,t)=>{let i=Pe(e,["redirect"]),a=i.list||[],n=[];for(let e=0;e{let i=Pe(e),a={};Object.keys(vt).forEach((e=>{!0===i.hasOwnProperty(e)&&(a[vt[e]]=i[e])}));let n={template:"sister project links",links:a};return t.push(n),""},"subject bar":(e,t)=>{let i=Pe(e);Object.keys(i).forEach((e=>{vt.hasOwnProperty(e)&&(i[vt[e]]=i[e],delete i[e])}));let a={template:"subject bar",links:i};return t.push(a),""},gallery:(e,t)=>{let i=Pe(e),a=(i.list||[]).filter((e=>/^ *File ?:/.test(e)));return a=a.map((e=>new _({file:e}).json())),i={template:"gallery",images:a},t.push(i),""},sky:(e,t)=>{let i=Pe(e,["asc_hours","asc_minutes","asc_seconds","dec_sign","dec_degrees","dec_minutes","dec_seconds","distance"]),a={template:"sky",ascension:{hours:i.asc_hours,minutes:i.asc_minutes,seconds:i.asc_seconds},declination:{sign:i.dec_sign,degrees:i.dec_degrees,minutes:i.dec_minutes,seconds:i.dec_seconds},distance:i.distance};return t.push(a),""},"medical cases chart":(e,t)=>{let i=["date","deathsExpr","recoveriesExpr","casesExpr","4thExpr","5thExpr","col1","col1Change","col2","col2Change"],a=Pe(e);a.data=a.data||"";let n=a.data.split("\n").map((e=>{let t=e.split(";"),a={options:new Map},n=0;for(let e=0;e{let i=Pe(e);i.x&&(i.x=i.x.split(",").map((e=>e.trim()))),i.y&&(i.y=i.y.split(",").map((e=>e.trim())));let a=1;for(;i["y"+a];)i["y"+a]=i["y"+a].split(",").map((e=>e.trim())),a+=1;return t.push(i),""},"historical populations":(e,t)=>{let i=Pe(e);i.list=i.list||[];let a=[];for(let e=0;e{const i=/^jan /i,a=/^year /i;let n=Pe(e);const r=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];let o={},s=Object.keys(n).filter((e=>i.test(e)));s=s.map((e=>e.replace(i,""))),s.forEach((e=>{o[e]=[],r.forEach((t=>{let i=`${t} ${e}`;if(n.hasOwnProperty(i)){let t=wt(n[i]);delete n[i],o[e].push(t)}}))})),n.byMonth=o;let l={};return Object.keys(n).forEach((e=>{if(a.test(e)){let t=e.replace(a,"");l[t]=n[e],delete n[e]}})),n.byYear=l,t.push(n),""},"weather box/concise c":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>wt(e))),i.byMonth={"high c":i.list.slice(0,12),"low c":i.list.slice(12,24),"rain mm":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"weather box/concise f":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>wt(e))),i.byMonth={"high f":i.list.slice(0,12),"low f":i.list.slice(12,24),"rain inch":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"climate chart":(e,t)=>{let i=Pe(e).list||[],a=i[0],n=i[38];i=i.slice(1),i=i.map((e=>(e&&"−"===e[0]&&(e=e.replace(/−/,"-")),e)));let r=[];for(let e=0;e<36;e+=3)r.push({low:wt(i[e]),high:wt(i[e+1]),precip:wt(i[e+2])});let o={template:"climate chart",data:{title:a,source:n,months:r}};return t.push(o),""},medalcount:(e,t)=>{let i=Pe(e).list||[],a=[];for(let e=0;e{let i=Pe(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},legend:(e,t)=>{let i=Pe(e,["color","label"]);return t.push(i),e},isbn:(e,t)=>{let i=Pe(e,["id","id2","id3"]);return t.push(i),"ISBN "+(i.id||"")},"based on":(e,t)=>{let i=Pe(e,["title","author"]);return t.push(i),`${i.title} by ${i.author||""}`},"bbl to t":(e,t)=>{let i=Pe(e,["barrels"]);return t.push(i),"0"===i.barrels?i.barrels+" barrel":i.barrels+" barrels"},mpc:(e,t)=>{let i=Pe(e,["number","text"]);return t.push(i),`[https://minorplanetcenter.net/db_search/show_object?object_id=P/2011+NO1 ${i.text||i.number}]`},pengoal:(e,t)=>(t.push({template:"pengoal"}),"✅"),penmiss:(e,t)=>(t.push({template:"penmiss"}),"❌"),"ordered list":(e,t)=>{let i=Pe(e);return t.push(i),i.list=i.list||[],i.list.map(((e,t)=>`${t+1}. ${e}`)).join("\n\n")},"title year":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b[0-9]{4}\b/);if(e)return e[0]}return r.nomatch||""},"title century":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)(st|nd|rd|th)\b/);if(e)return e[1]||""}return r.nomatch||""},"title decade":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)s\b/);if(e)return e[1]||""}return r.nomatch||""},nihongo:(e,t)=>{let i=Pe(e,["english","kanji","romaji","extra"]);t.push(i);let a=i.english||i.romaji||"";return i.kanji&&(a+=` (${i.kanji})`),a},marriage:(e,t)=>{let i=Pe(e,["spouse","from","to","end"]);t.push(i);let a=i.spouse||"";return i.from&&(i.to?a+=` (m. ${i.from}-${i.to})`:a+=` (m. ${i.from})`),a},"sent off":(e,t)=>{let i=Pe(e,["cards"]),a={template:"sent off",cards:i.cards,minutes:i.list||[]};return t.push(a),"sent off: "+a.minutes.map((e=>e+"'")).join(", ")},transl:(e,t)=>{let i=Pe(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""},"collapsible list":(e,t)=>{let i=Pe(e);t.push(i);let a="";if(i.title&&(a+=`'''${i.title}'''\n\n`),!i.list){i.list=[];for(let e=1;e<10;e+=1)i[e]&&(i.list.push(i[e]),delete i[e])}return i.list=i.list.filter((e=>e)),a+=i.list.join("\n\n"),a},"columns-list":(e,t)=>{let i=((Pe(e).list||[])[0]||"").split(/\n/).filter((e=>e));return i=i.map((e=>e.replace(/\*/,""))),t.push({template:"columns-list",list:i}),i=i.map((e=>"• "+e)),i.join("\n\n")},height:(e,t)=>{let i=Pe(e);t.push(i);let a=[];return["m","cm","ft","in"].forEach((e=>{!0===i.hasOwnProperty(e)&&a.push(i[e]+e)})),a.join(" ")},sic:(e,t)=>{let i=Pe(e,["one","two","three"]),a=(i.one||"")+(i.two||"");return"?"===i.one&&(a=(i.two||"")+(i.three||"")),t.push({template:"sic",word:a}),"y"===i.nolink?a:`${a} [sic]`},inrconvert:(e,t)=>{let i=Pe(e,["rupee_value","currency_formatting"]);t.push(i);const a={k:1e3,m:1e6,b:1e9,t:1e12,l:1e5,c:1e7,lc:1e12};if(i.currency_formatting){let e=a[i.currency_formatting]||1;i.rupee_value=i.rupee_value*e}return`inr ${i.rupee_value||""}`},frac:(e,t)=>{let i=Pe(e,["a","b","c"]),a={template:"sfrac"};return i.c?(a.integer=i.a,a.numerator=i.b,a.denominator=i.c):i.b?(a.numerator=i.a,a.denominator=i.b):(a.numerator=1,a.denominator=i.a),t.push(a),a.integer?`${a.integer} ${a.numerator}⁄${a.denominator}`:`${a.numerator}⁄${a.denominator}`},"winning percentage":(e,t)=>{let i=Pe(e,["wins","losses","ties"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=Number(i.ties)||0,o=a+n+r;"y"===i.ignore_ties&&(r=0),r&&(a+=r/2);let s=kt({numerator:a,denominator:o,decimals:1});return null===s?"":"."+10*s},winlosspct:(e,t)=>{let i=Pe(e,["wins","losses"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=kt({numerator:a,denominator:a+n,decimals:1});return null===r?"":`${a||0} || ${n||0} || ${"."+10*r||"-"}`},"video game release":(e,t)=>{let i=["region","date","region2","date2","region3","date3","region4","date4"],a=Pe(e,i),n={template:"video game release",releases:[]};for(let e=0;e`${e.region}: ${e.date||""}`)).join("\n\n")+"\n"},uss:(e,t)=>{let i=Pe(e,["name","id"]);return t.push(i),i.id?`[[USS ${i.name} (${i.id})|USS ''${i.name}'' (${i.id})]]`:`[[USS ${i.name}|USS ''${i.name}'']]`},blockquote:(e,t)=>{let i=Pe(e,["text","author","title","source","character"]);t.push(i);let a=i.text;a||(i.list=i.list||[],a=i.list[0]||"");let n=a.replace(/"/g,"'");return n='"'+n+'"',n}};const It={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},Mt=(e,t)=>{let i=Pe(e,["amount","code"]);t.push(i);let a=i.template||"";"currency"===a?(a=i.code,a||(i.code=a="usd")):""!==a&&"monnaie"!==a&&"unité"!==a&&"nombre"!==a&&"nb"!==a||(a=i.code),a=(a||"").toLowerCase(),"us"===a?i.code=a="usd":"uk"===a&&(i.code=a="gbp");let n=`${It[a]||""}${i.amount||""}`;return i.code&&!It[i.code.toLowerCase()]&&(n+=" "+i.code),n};let Rt={currency:Mt};Object.keys(It).forEach((e=>{Rt[e]=Mt}));const Ut=864e5,Ft=30*Ut,Bt=365*Ut,Kt=function(e){return new Date(`${e.year}-${e.month||0}-${e.date||1}`).getTime()},Wt=function(e,t){e=Kt(e);let i=(t=Kt(t))-e,a={},n=Math.floor(i/Bt);n>0&&(a.years=n,i-=a.years*Bt);let r=Math.floor(i/Ft);r>0&&(a.months=r,i-=a.months*Ft);let o=Math.floor(i/Ut);return o>0&&(a.days=o),a},Ht=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Yt=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],Zt=Yt.reduce(((e,t,i)=>(0===i||(e[t.toLowerCase()]=i,e[t.substring(0,3).toLowerCase()]=i),e)),{}),Gt=function(e){let t={},i=["year","month","date","hour","minute","second"];for(let a=0;a{let i=Pe(e,["year","month","date","hour","minute","second","timezone"]),a=Gt([i.year,i.month,i.date||i.day]);return i.text=Jt(a),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=` (${i.timezone})`),i.hour&&i.minute&&(i.second?i.text=`${i.hour}:${i.minute}:${i.second}, `+i.text:i.text=`${i.hour}:${i.minute}, `+i.text),i.text&&t.push(Xt(i)),i.text},natural_date:(e,t)=>{let i=Pe(e,["text"]).text||"",a={};if(/^[0-9]{4}$/.test(i))a.year=parseInt(i,10);else{let e=i.replace(/[a-z]+\/[a-z]+/i,"");e=e.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");let t=new Date(e);!1===isNaN(t.getTime())&&(a.year=t.getFullYear(),a.month=t.getMonth()+1,a.date=t.getDate())}return t.push(Xt(a)),i.trim()},one_year:(e,t)=>{let i=Pe(e,["year"]),a=Number(i.year);return t.push(Xt({year:a})),String(a)},two_dates:(e,t)=>{let i=Pe(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){let e=Gt([i.birth_year,i.birth_month,i.birth_date]);return t.push(Xt(e)),Jt(e)}let a=Gt([i.death_year,i.death_month,i.death_date]);return t.push(Xt(a)),Jt(a)},age:e=>{let t=Qt(e);return Wt(t.from,t.to).years||0},"diff-y":e=>{let t=Qt(e),i=Wt(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),a.join(", ")},"diff-ymd":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-yd":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-d":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")}},ti=["January","February","March","April","May","June","July","August","September","October","November","December"];var ii={currentday:()=>{let e=new Date;return String(e.getDate())},currentdayname:()=>{let e=new Date;return Ht[e.getDay()]},currentmonth:()=>{let e=new Date;return ti[e.getMonth()]},currentyear:()=>{let e=new Date;return String(e.getFullYear())},monthyear:()=>{let e=new Date;return ti[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":()=>{let e=new Date;return e.setMonth(e.getMonth()-1),ti[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":()=>{let e=new Date;return e.setMonth(e.getMonth()+1),ti[e.getMonth()]+" "+e.getFullYear()},year:e=>{let t=Pe(e,["date"]).date,i=new Date(t);return t&&!1===isNaN(i.getTime())?String(i.getFullYear()):""},"time ago":e=>function(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let i=(new Date).getTime()-t.getTime(),a="ago";i<0&&(a="from now",i=Math.abs(i));let n=i/1e3/60/60/24;return n<365?Number(n)+" days "+a:Number(n/365)+" years "+a}(Pe(e,["date","fmt"]).date),"birth date and age":(e,t)=>{let i=Pe(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?ei.natural_date(e,t):(t.push(i),i=Gt([i.year,i.month,i.day]),Jt(i))},"birth year and age":(e,t)=>{let i=Pe(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return ei.natural_date(e,t);t.push(i);let a=(new Date).getFullYear()-parseInt(i.birth_year,10);i=Gt([i.birth_year,i.birth_month]);let n=Jt(i);return a&&(n+=` (age ${a})`),n},"death year and age":(e,t)=>{let i=Pe(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?ei.natural_date(e,t):(t.push(i),i=Gt([i.death_year,i.death_month]),Jt(i))},"birth date and age2":(e,t)=>{let i=Pe(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=Gt([i.birth_year,i.birth_month,i.birth_day]),Jt(i)},"birth based on age as of date":(e,t)=>{let i=Pe(e,["age","year","month","day"]);t.push(i);let a=parseInt(i.age,10),n=parseInt(i.year,10)-a;return n&&a?`${n} (age ${i.age})`:`(age ${i.age})`},"death date and given age":(e,t)=>{let i=Pe(e,["year","month","day","age"]);t.push(i),i=Gt([i.year,i.month,i.day]);let a=Jt(i);return i.age&&(a+=` (age ${i.age})`),a},dts:e=>{e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");let t=Pe(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},time:()=>{let e=new Date,t=Gt([e.getFullYear(),e.getMonth(),e.getDate()]);return Jt(t)},millennium:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/1e3)+1,t.abbr&&"y"===t.abbr?i<0?`${xt(Math.abs(i))} BC`:`${xt(i)}`:`${xt(i)} millennium`},start:ei.date,"start-date":ei.natural_date,birthdeathage:ei.two_dates,age:ei.age,"age nts":ei.age,"age in years":ei["diff-y"],"age in years and months":ei["diff-ym"],"age in years, months and days":ei["diff-ymd"],"age in years and days":ei["diff-yd"],"age in days":ei["diff-d"]};function ai(e){let t=e.pop(),i=Number(e[0]||0),a=Number(e[1]||0),n=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;let r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+a/60+n/3600)}const ni=function(e){if("number"!=typeof e)return e;let t=1e5;return Math.round(e*t)/t},ri={s:!0,w:!0},oi=function(e){let t=Pe(e);t=function(e){return e.list=e.list||[],e.list=e.list.map((t=>{let i=Number(t);if(!isNaN(i))return i;let a=t.split(/:/);return a.length>1?(e.props=e.props||{},e.props[a[0]]=a.slice(1).join(":"),null):t})),e.list=e.list.filter((e=>null!==e)),e}(t);let i=function(e){const t=e.map((e=>typeof e)).join("|");return 2===e.length&&"number|number"===t?{lat:e[0],lon:e[1]}:4===e.length&&"number|string|number|string"===t?(ri[e[1].toLowerCase()]&&(e[0]*=-1),"w"===e[3].toLowerCase()&&(e[2]*=-1),{lat:e[0],lon:e[2]}):6===e.length?{lat:ai(e.slice(0,3)),lon:ai(e.slice(3))}:8===e.length?{lat:ai(e.slice(0,4)),lon:ai(e.slice(4))}:{}}(t.list);return t.lat=ni(i.lat),t.lon=ni(i.lon),t.template="coord",delete t.list,t},si={coord:(e,t)=>{let i=oi(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":`${i.lat||""}°N, ${i.lon||""}°W`}},li=function(e,t,i,a){let n=Pe(e);return a&&(n.name=n.template,n.template=a),t.push(n),""},ci={persondata:li,taxobox:li,citation:li,portal:li,reflist:li,"cite book":li,"cite journal":li,"cite web":li,"commons cat":li,"election box candidate":li,"election box begin":li,main:li},ui={adx:"adx",aim:"aim",amex:"amex",asx:"asx",athex:"athex",b3:"b3","B3 (stock exchange)":"B3 (stock exchange)",barbadosse:"barbadosse",bbv:"bbv",bcba:"bcba",bcs:"bcs",bhse:"bhse",bist:"bist",bit:"bit","bm&f bovespa":"b3","bm&f":"b3",bmad:"bmad",bmv:"bmv","bombay stock exchange":"bombay stock exchange","botswana stock exchange":"botswana stock exchange",bpse:"bpse",bse:"bse",bsx:"bsx",bvb:"bvb",bvc:"bvc",bvl:"bvl",bvpasa:"bvpasa",bwse:"bwse","canadian securities exchange":"canadian securities exchange",cse:"cse",darse:"darse",dfm:"dfm",dse:"dse",euronext:"euronext",euronextparis:"euronextparis",fse:"fse",fwb:"fwb",gse:"gse",gtsm:"gtsm",idx:"idx",ise:"ise",iseq:"iseq",isin:"isin",jasdaq:"jasdaq",jse:"jse",kase:"kase",kn:"kn",krx:"krx",lse:"lse",luxse:"luxse","malta stock exchange":"malta stock exchange",mai:"mai",mcx:"mcx",mutf:"mutf",myx:"myx",nag:"nag","nasdaq dubai":"nasdaq dubai",nasdaq:"nasdaq",neeq:"neeq",nepse:"nepse",nex:"nex",nse:"nse",newconnect:"newconnect","nyse arca":"nyse arca",nyse:"nyse",nzx:"nzx","omx baltic":"omx baltic",omx:"omx",ose:"ose","otc expert":"otc expert","otc grey":"otc grey","otc pink":"otc pink",otcqb:"otcqb",otcqx:"otcqx","pfts ukraine stock exchange":"pfts ukraine stock exchange","philippine stock exchange":"philippine stock exchange",prse:"prse",psx:"psx",karse:"karse",qe:"qe","saudi stock exchange":"saudi stock exchange",sehk:"sehk","Stock Exchange of Thailand":"Stock Exchange of Thailand",set:"set",sgx:"sgx",sse:"sse",swx:"swx",szse:"szse",tase:"tase","tsx-v":"tsx-v",tsx:"tsx",tsxv:"tsxv",ttse:"ttse",twse:"twse",tyo:"tyo",wbag:"wbag",wse:"wse","zagreb stock exchange":"zagreb stock exchange","zimbabwe stock exchange":"zimbabwe stock exchange",zse:"zse"},mi=(e,t)=>{let i=Pe(e,["ticketnumber","code"]);t.push(i);let a=i.template||"";""===a&&(a=i.code),a=(a||"").toLowerCase();let n=ui[a]||"";return i.ticketnumber&&(n=`${n}: ${i.ticketnumber}`),i.code&&!ui[i.code.toLowerCase()]&&(n+=" "+i.code),n},pi={};Object.keys(ui).forEach((e=>{pi[e]=mi}));const di=function(e){return 1===(e=String(e)).length&&(e="0"+e),e},hi=function(e,t,i){e[`rd${t}-team${di(i)}`]&&(i=di(i));let a=e[`rd${t}-score${i}`],n=Number(a);return!1===isNaN(n)&&(a=n),{team:e[`rd${t}-team${i}`],score:a,seed:e[`rd${t}-seed${i}`]}},gi=function(e){let t=[],i=Pe(e);for(let e=1;e<7;e+=1){let a=[];for(let t=1;t<16;t+=2){let n=`rd${e}-team`;if(!i[n+t]&&!i[n+di(t)])break;{let n=hi(i,e,t),r=hi(i,e,t+1);a.push([n,r])}}a.length>0&&t.push(a)}return{template:"playoffbracket",rounds:t}};let bi={"4teambracket":function(e,t){let i=gi(e);return t.push(i),""},player:(e,t)=>{let i=Pe(e,["number","country","name","dl"]);t.push(i);let a=`[[${i.name}]]`;if(i.country){let e=(i.country||"").toLowerCase(),t=zt.find((t=>e===t[1]||e===t[2]))||[];t&&t[0]&&(a=t[0]+" "+a)}return i.number&&(a=i.number+" "+a),a},goal:(e,t)=>{let i={template:"goal",data:[]},a=Pe(e).list||[];for(let e=0;e{let t=e.note;return t&&(t=` (${t})`),e.min+"'"+t})).join(", "),n},"sports table":(e,t)=>{let i=Pe(e),a={};Object.keys(i).filter((e=>/^team[0-9]/.test(e))).map((e=>i[e].toLowerCase())).forEach((e=>{a[e]={name:i[`name_${e}`],win:Number(i[`win_${e}`])||0,loss:Number(i[`loss_${e}`])||0,tie:Number(i[`tie_${e}`])||0,otloss:Number(i[`otloss_${e}`])||0,goals_for:Number(i[`gf_${e}`])||0,goals_against:Number(i[`ga_${e}`])||0}}));let n={date:i.update,header:i.table_header,teams:a};t.push(n)},"cbb roster/header":function(){return'{| class="wikitable"\n |-\n ! POS\n ! #\n ! Name\n ! Height\n ! Weight\n ! Year\n ! Previous School\n ! Hometown\n |-\n'},"cbb roster/player":function(e,t){let i=Pe(e);return t.push(i),`|-\n| ${i.pos||""}\n| ${i.num||""}\n| ${i.first||""} ${i.last||""}\n| ${i.ft||""}${i.in||""}\n| ${i.lbs||""}\n| ${i.class||""}\n| ${i.high_school||""}\n| ${i.home||""}\n`},"cbb roster/footer":function(){return"\n|}"}};var fi=Object.assign({},Tt,Dt,Rt,ii,si,ci,pi,gi,bi);let ki=Object.assign({},Nt,Pt,fi);Object.keys(dt).forEach((e=>{ki[e]=ki[dt[e]]}));const wi=["0","1","2","3","4","5","6","7","8","9"],yi=function(e,t){let i=e.name;if(!0===ot.hasOwnProperty(i))return[""];if(!0===function(e){return!0===st.hasOwnProperty(e)||!!lt.test(e)||!(!ct.test(e)&&!ut.test(e))||!!mt.test(e)}(i)){let t=Pe(e.body,[],"raw");return["",pt(t)]}if(!0===/^cite [a-z]/.test(i)){let t=Pe(e.body);return t.type=t.template,t.template="citation",["",t]}if(!0===ki.hasOwnProperty(i)){if("number"==typeof ki[i]){return[Pe(e.body,wi)[String(ki[i])]||""]}if("string"==typeof ki[i])return[ki[i]];if(!0===o(ki[i])){return["",Pe(e.body,ki[i])]}if(!0===((a=ki[i])&&"[object Object]"===Object.prototype.toString.call(a))){let t=Pe(e.body,ki[i].props);return[t[ki[i].out],t]}if("function"==typeof ki[i]){let a=[];return[ki[i](e.body,a,Pe,null,t),a[0]]}}var a;if(t&&t._templateFallbackFn){let i=[],a=t._templateFallbackFn(e.body,i,Pe,null,t);if(null!==a)return[a,i[0]]}let n=Pe(e.body);return 0===Object.keys(n).length&&(n=null),["",n]},$i=(e="")=>(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim(),xi=function(e,t){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},vi={type:function(){return this._type},links:function(e){let t=[];if(Object.keys(this.data).forEach((e=>{this.data[e].links().forEach((e=>t.push(e)))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},image:function(){let e=this.data.image||this.data.image2||this.data.logo||this.data.image_skyline||this.data.image_flag;if(!e)return null;let t=e.json(),i=t.text;return t.file=i,t.text="",t.caption=this.data.caption,t.domain=this.domain,new _(t)},get:function(e){let t=Object.keys(this.data);if("string"==typeof e){let i=$i(e);for(let e=0;e{for(let i=0;i(e.data[i]&&(t[i]=e.data[i].json()),t)),{});return!0===t.encode&&(i=W(i)),i}(this,e=e||{})},wikitext:function(){return this.wiki||""},keyValue:function(){return Object.keys(this.data).reduce(((e,t)=>(this.data[t]&&(e[t]=this.data[t].text()),e)),{})}};Object.keys(vi).forEach((e=>{xi.prototype[e]=vi[e]})),xi.prototype.data=xi.prototype.keyValue,xi.prototype.template=xi.prototype.type,xi.prototype.images=xi.prototype.image;const ji=function(e,t){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},_i={title:function(){let e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){let t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},text:function(){return""},wikitext:function(){return this.wiki||""},json:function(e={}){let t=this.data||{};return!0===e.encode&&(t=Object.assign({},t),t=W(t)),t}};Object.keys(_i).forEach((e=>{ji.prototype[e]=_i[e]}));const zi={text:function(){return se(this._text||"").text()},json:function(){return this.data||{}},wikitext:function(){return this.wiki||""}},Oi=function(e,t="",i=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_text",{enumerable:!1,value:t}),Object.defineProperty(this,"wiki",{enumerable:!1,value:i})};Object.keys(zi).forEach((e=>{Oi.prototype[e]=zi[e]}));const Ei=/^(cite |citation)/i,qi={citation:!0,refn:!0,harvnb:!0,source:!0},Ni=function(e,t){let{list:i,wiki:a}=function(e,t){let i=[],a=rt(e);const n=function(a,r){a.parent=r,a.children&&a.children.length>0&&a.children.forEach((e=>n(e,a)));let[o,s]=yi(a,t);a.wiki=o,s&&i.push({name:a.name,wiki:a.body,nested:Boolean(a.parent),text:o,json:s});const l=function(e,t,i){e.parent&&(e.parent.body=e.parent.body.replace(t,i),l(e.parent,t,i))};l(a,a.body,a.wiki),e=e.replace(a.body,a.wiki)};return a.forEach((e=>n(e,null))),a.forEach((t=>{e=e.replace(t.body,t.wiki)})),{list:i,wiki:e}}(e._wiki,t),n=t?t._domain:null,{infoboxes:r,references:o,templates:s}=function(e,t){let i={infoboxes:[],templates:[],references:[]};return e.forEach((e=>{let a=e.json,n=a.template||a.type||a.name;if(!0!==qi[n]&&!0!==Ei.test(n))return"infobox"===a.template&&"yes"!==a.subbox?(a.domain=t,a.data=a.data||{},void i.infoboxes.push(new xi(a,e.wiki))):void i.templates.push(new Oi(a,e.text,e.wiki));i.references.push(new ji(a,e.wiki))})),i}(i,n);e._infoboxes=e._infoboxes||[],e._references=e._references||[],e._templates=e._templates||[],e._infoboxes=e._infoboxes.concat(r),e._references=e._references.concat(o),e._templates=e._templates.concat(s),e._wiki=a},Si=function(e){return/^ *\{\{ *(cite|citation)/i.test(e)&&/\}\} *$/.test(e)&&!1===/citation needed/i.test(e)},Ci=function(e){let t=Pe(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Li=function(e){return{template:"citation",type:"inline",data:{},inline:se(e)||{}}},Ai=function(e){let t=[],i=e._wiki;i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Si(a)){let n=Ci(a);n&&t.push({json:n,wiki:e}),i=i.replace(a,"")}else t.push({json:Li(a),wiki:e});return" "})),i=i.replace(/ ?]{0,200}?\/> ?/gi," "),i=i.replace(/ ?]{0,200}>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Si(a)){let e=Ci(a);e&&t.push({json:e,wiki:a}),i=i.replace(a,"")}else t.push({json:Li(a),wiki:e});return" "})),i=i.replace(/ ?<[ /]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ /]?> ?/g," "),e._references=t.map((e=>new ji(e.json,e.wiki))),e._wiki=i},Pi={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]};let Ti=["res","record","opponent","method","event","date","round","time","location","notes"];const Di=function(e,t){const i={templates:[],text:e._wiki};var a;return function(e,t){e.text=e.text.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(i=>{let a={_wiki:i,_templates:[]};Ni(a,t);let n=a._templates.map((e=>e.json())),r=n.find((e=>"election box"===e.template))||{},o=n.filter((e=>"election box candidate"===e.template)),s=n.find((e=>"election box gain"===e.template||"election box hold"===e.template))||{};return(o.length>0||s)&&e.templates.push({template:"election box",title:r.title,candidates:o,summary:s.data}),""}))}(i,t),function(e,t,i){e.text=e.text.replace(/]*)>([\s\S]+)<\/gallery>/g,((a,n,r)=>{let o=r.split(/\n/g);return o=o.filter((e=>e&&""!==e.trim())),o=o.map((e=>{let i=e.split(/\|/),a={file:i[0].trim(),lang:t.lang(),domain:t.domain()},n=new _(a).json(),r=i.slice(1).join("|");return""!==r&&(n.caption=se(r)),n})),o.length>0&&e.templates.push({template:"gallery",images:o,pos:i.title}),""}))}(i,t,e),(a=i).text=a.text.replace(/]*)>([\s\S]*?)<\/math>/g,((e,t,i)=>{let n=se(i).text();return a.templates.push({template:"math",formula:n,raw:i}),n&&n.length<12?n:""})),a.text=a.text.replace(/]*)>([\s\S]*?)<\/chem>/g,((e,t,i)=>(a.templates.push({template:"chem",data:i}),""))),function(e){e.text=e.text.replace(/\{\{mlb game log /gi,"{{game log "),e.text=e.text.replace(/\{\{game log (section|month)[\s\S]+?\{\{game log (section|month) end\}\}/gi,(t=>{let i=function(e){let t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{game log (section|month) end\}\}/i,"");let a="! "+i.join(" !! "),n=be("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mlb game log section",data:n}),""}))}(i),function(e){e.text=e.text.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(t=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");let i="! "+Ti.join(" !! "),a=be("{|\n"+i+"\n"+t+"\n|}");return a=a.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mma record start",data:a}),""}))}(i),function(e){e.text=e.text.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,((t,i)=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();let a="! "+Pi[i].join(" !! "),n=be("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"NBA "+i+" statistics",data:n}),""}))}(i),i.templates=i.templates.map((e=>new Oi(e))),i},Ii={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0};class Mi{constructor(e,t){let i={doc:t,title:e.title||"",depth:e.depth,wiki:e.wiki||"",templates:[],tables:[],infoboxes:[],references:[],paragraphs:[]};Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})}));const a=Di(this,t);this._wiki=a.text,this._templates=this._templates.concat(a.templates),Ai(this),Ni(this,t),function(e){let t=[],i=e._wiki,a=i.split("\n"),n=[];for(let e=0;e0&&(n[n.length-1]+="\n"+a[e]);else{n[n.length-1]+="\n"+a[e];let i=n.pop();t.push(i)}else n.push(a[e]);let r=[];t.forEach((e=>{if(e){i=i.replace(e+"\n",""),i=i.replace(e,"");let t=be(e);t&&t.length>0&&r.push(new we(t,e))}})),r.length>0&&(e._tables=r),e._wiki=i}(this),Xe(this,t)}title(){return this._title||""}index(){if(!this._doc)return null;let e=this._doc.sections().indexOf(this);return-1===e?null:e}depth(){return this._depth}indentation(){return this.depth()}sentences(){return this.paragraphs().reduce(((e,t)=>e.concat(t.sentences())),[])}paragraphs(){return this._paragraphs||[]}links(e){let t=[];if(this.infoboxes().forEach((e=>{t.push(e.links())})),this.sentences().forEach((e=>{t.push(e.links())})),this.tables().forEach((e=>{t.push(e.links())})),this.lists().forEach((e=>{t.push(e.links())})),t=t.reduce(((e,t)=>e.concat(t)),[]).filter((e=>void 0!==e)),"string"==typeof e){let i=t.find((t=>t.page().toLowerCase()===e.toLowerCase()));return void 0===i?[]:[i]}return t}tables(){return this._tables||[]}templates(e){let t=this._templates||[];return"string"==typeof e?(e=e.toLowerCase(),t.filter((t=>t.data.template===e||t.data.name===e))):t}infoboxes(e){let t=this._infoboxes||[];return"string"==typeof e?(e=(e=e.replace(/^infobox /i,"")).trim().toLowerCase(),t.filter((t=>t._type===e))):t}coordinates(){return[...this.templates("coord"),...this.templates("coor")].map((e=>e.json()))}lists(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.lists())})),e}interwiki(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.interwiki())})),e}images(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.images())})),e}references(){return this._references||[]}remove(){if(!this._doc)return null;let e={};e[this.title()]=!0,this.children().forEach((t=>e[t.title()]=!0));let t=this._doc.sections();return t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),this._doc._sections=t,this._doc}nextSibling(){if(!this._doc)return null;let e=this._doc.sections();for(let t=(this.index()||0)+1;tthis.depth())for(let e=i+1;ethis.depth();e+=1)a.push(t[e]);return"string"==typeof e?a.find((t=>t.title().toLowerCase()===e.toLowerCase())):a}sections(e){return this.children(e)}parent(){if(!this._doc)return null;let e=this._doc.sections();for(let t=this.index()||0;t>=0;t-=1)if(e[t]&&e[t].depth()t.text(e))).join("\n\n")}wikitext(){return this._wiki}json(e){return function(e,t){let i={};if(!0===(t=p(t,H)).headers&&(i.title=e.title()),!0===t.depth&&(i.depth=e.depth()),!0===t.paragraphs){let a=e.paragraphs().map((e=>e.json(t)));a.length>0&&(i.paragraphs=a)}if(!0===t.images){let a=e.images().map((e=>e.json(t)));a.length>0&&(i.images=a)}if(!0===t.tables){let a=e.tables().map((e=>e.json(t)));a.length>0&&(i.tables=a)}if(!0===t.templates){let a=e.templates().map((e=>e.json()));a.length>0&&(i.templates=a,!0===t.encode&&i.templates.forEach((e=>W(e))))}if(!0===t.infoboxes){let a=e.infoboxes().map((e=>e.json(t)));a.length>0&&(i.infoboxes=a)}if(!0===t.lists){let a=e.lists().map((e=>e.json(t)));a.length>0&&(i.lists=a)}if(!0===t.references||!0===t.citations){let a=e.references().map((e=>e.json(t)));a.length>0&&(i.references=a)}return!0===t.sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,Ii))}}Mi.prototype.citations=Mi.prototype.references;const Ri={sentences:"sentence",paragraphs:"paragraph",links:"link",tables:"table",templates:"template",infoboxes:"infobox",coordinates:"coordinate",lists:"list",images:"image",references:"reference",citations:"citation"};Object.keys(Ri).forEach((e=>{let t=Ri[e];Mi.prototype[t]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]||null}}));const Ui=/^(={1,6})(.{1,200}?)={1,6}$/,Fi=/\{\{.+?\}\}/,Bi=function(e,t,i){let a=t.match(Ui);if(!a)return e.title="",e.depth=0,e;let n=a[2]||"";n=se(n).text(),Fi.test(n)&&(n=function(e,t){return rt(e).forEach((i=>{let[a]=yi(i,t);e=e.replace(i.body,a)})),e}(n,i));let o={_wiki:n};Ai(o),n=o._wiki,n=r(n);let s=0;return a[1]&&(s=a[1].length-2),e.title=n,e.depth=s,e},Ki=new RegExp("^("+["references","reference","einzelnachweise","referencias","références","notes et références","脚注","referenser","bronnen","примечания"].join("|")+"):?","i"),Wi=/(?:\n|^)(={2,6}.{1,200}?={2,6})/g,Hi=function(e){let t=[],i=e._wiki.split(Wi);for(let a=0;a!0!==Ki.test(t.title())||t.paragraphs().length>0||t.templates().length>0||(e[i+1]&&e[i+1].depth()>t.depth()&&(e[i+1]._depth-=1),!1)))}(t)},Yi=new RegExp("\\[\\[("+h.join("|")+"):(.{2,178}?)]](w{0,10})","gi"),Zi=new RegExp("^\\[\\[:?("+h.join("|")+"):","gi"),Gi=function(e){const t=[];let i=e.match(Yi);i&&i.forEach((function(e){(e=(e=(e=e.replace(Zi,"")).replace(/\|?[ *]?\]\]$/,"")).replace(/\|.*/,""))&&!e.match(/[[\]]/)&&t.push(e.trim())}));const a=e.replace(Yi,"");return[t,a]},Vi={tables:!0,lists:!0,paragraphs:!0};class Ji{constructor(e,t){t=t||{},this._options=t;let i={pageID:t.pageID||t.id||null,namespace:t.namespace||t.ns||null,lang:t.lang||t.language||null,domain:t.domain||null,title:t.title||null,type:"page",redirectTo:null,wikidata:t.wikidata||null,wiki:e||"",categories:[],sections:[],coordinates:[],userAgent:t.userAgent||t["User-Agent"]||t["Api-User-Agent"]||"User of the wtf_wikipedia library",templateFallbackFn:t.templateFallbackFn||null};if(Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})})),!0===function(e){return!!e&&D.test(e)}(this._wiki)){this._type="redirect",this._redirectTo=function(e){let t=e.match(D);if(t&&t[2])return(T(t[2])||[])[0];return{}}(this._wiki);const[e,t]=Gi(this._wiki);return this._categories=e,void(this._wiki=t)}this._wiki=F(this._wiki);const[a,n]=Gi(this._wiki);this._categories=a,this._wiki=n,this._sections=Hi(this)}title(e){if(void 0!==e)return this._title=e,e;if(this._title)return this._title;let t=null,i=this.sentences()[0];return i&&(t=i.bold()),t}pageID(e){return void 0!==e&&(this._pageID=e),this._pageID||null}wikidata(e){return void 0!==e&&(this._wikidata=e),this._wikidata||null}domain(e){return void 0!==e&&(this._domain=e),this._domain||null}language(e){return void 0!==e&&(this._lang=e),this._lang||null}url(){let e=this.title();if(!e)return null;let t=this.language()||"en",i=this.domain()||"wikipedia.org";return e=e.replace(/ /g,"_"),e=encodeURIComponent(e),`https://${t}.${i}/wiki/${e}`}namespace(e){return void 0!==e&&(this._namespace=e),this._namespace||null}isRedirect(){return"redirect"===this._type}redirectTo(){return this._redirectTo}isDisambiguation(){return function(e){let t=e.templates().map((e=>e.json()));if(t.find((e=>k.hasOwnProperty(e.template)||x.hasOwnProperty(e.template))))return!0;let i=e.title();return!(!i||!0!==$.test(i))||!t.find((e=>y.hasOwnProperty(e.template)))&&(!0===v(e.sentence(0))||!0===v(e.sentence(1)))}(this)}categories(e){let t=this._categories||[];return"number"==typeof e?[t[e]]:t}sections(e){let t=this._sections||[];if(t.forEach((e=>{e._doc=this})),"string"==typeof e){let i=e.toLowerCase().trim();return t.filter((e=>e.title().toLowerCase()===i))}return"number"==typeof e?[t[e]]:t}paragraphs(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.paragraphs())})),"number"==typeof e?[t[e]]:t}sentences(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.sentences())})),"number"==typeof e?[t[e]]:t}images(e){let t=m(this,"images",null);return this.infoboxes().forEach((e=>{let i=e.image();i&&t.unshift(i)})),this.templates().forEach((e=>{"gallery"===e.data.template&&(e.data.images=e.data.images||[],e.data.images.forEach((e=>{e instanceof _||(e.language=this.language(),e.domain=this.domain(),e=new _(e)),t.push(e)})))})),"number"==typeof e?[t[e]]:t}links(e){return m(this,"links",e)}interwiki(e){return m(this,"interwiki",e)}lists(e){return m(this,"lists",e)}tables(e){return m(this,"tables",e)}templates(e){return m(this,"templates",e)}references(e){return m(this,"references",e)}citations(e){return this.references(e)}coordinates(e){return m(this,"coordinates",e)}infoboxes(e){let t=m(this,"infoboxes",e);return t=t.sort(((e,t)=>Object.keys(e.data).length>Object.keys(t.data).length?-1:1)),t}text(e){if(e=p(e,Vi),!0===this.isRedirect())return"";return this.sections().map((t=>t.text(e))).join("\n\n")}json(e){return function(e,t){let i={};return(t=p(t,d)).title&&(i.title=e.title()),t.pageID&&(i.pageID=e.pageID()),t.categories&&(i.categories=e.categories()),t.sections&&(i.sections=e.sections().map((e=>e.json(t)))),!0===e.isRedirect()&&(i.isRedirect=!0,i.redirectTo=e.redirectTo(),i.sections=[]),t.coordinates&&(i.coordinates=e.coordinates()),t.infoboxes&&(i.infoboxes=e.infoboxes().map((e=>e.json(t)))),t.images&&(i.images=e.images().map((e=>e.json(t)))),t.plaintext&&(i.plaintext=e.text(t)),(t.citations||t.references)&&(i.references=e.references()),i}(this,e=p(e,Vi))}wikitext(){return this._wiki||""}debug(){return console.log("\n"),this.sections().forEach((e=>{let t=" - ";for(let i=0;i{let t=Xi[e];Ji.prototype[t]=function(t){return this[e](t)[0]||null}})),Ji.prototype.lang=Ji.prototype.language,Ji.prototype.ns=Ji.prototype.namespace,Ji.prototype.plaintext=Ji.prototype.text,Ji.prototype.isDisambig=Ji.prototype.isDisambiguation,Ji.prototype.citations=Ji.prototype.references,Ji.prototype.redirectsTo=Ji.prototype.redirectTo,Ji.prototype.redirect=Ji.prototype.redirectTo,Ji.prototype.redirects=Ji.prototype.redirectTo;const Qi=/^https?:\/\//,ea={lang:"en",wiki:"wikipedia",domain:void 0,follow_redirects:!0,path:"api.php"},ta=function(e,t,i){"string"==typeof t&&(t={lang:t}),(t={...ea,...t}).title=e,"string"==typeof e&&Qi.test(e)&&(t={...t,...n(e)});const r=u(t),s=function(e){let t,i=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return t=e.noOrigin?"":e.origin||e.Origin||"*",{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":i,"User-Agent":i,Origin:t,"Accept-Encoding":"gzip"},redirect:"follow"}}(t);return a(r,s).then((e=>e.json())).then((a=>{let n=function(e,t={}){return Object.keys(e.query.pages).map((i=>{let a=e.query.pages[i]||{};if(a.hasOwnProperty("missing")||a.hasOwnProperty("invalid"))return null;let n=a.revisions[0]["*"];!n&&a.revisions[0].slots&&(n=a.revisions[0].slots.main["*"]),a.pageprops=a.pageprops||{};let r=t.domain;return!r&&t.wiki&&(r=`${t.wiki}.org`),{wiki:n,meta:Object.assign({},t,{title:a.title,pageID:a.pageid,namespace:a.ns,domain:r,wikidata:a.pageprops.wikibase_item,description:a.pageprops["wikibase-shortdesc"]})}}))}(a,t);return n=function(e,t){let i=(e=e.filter((e=>e))).map((e=>new Ji(e.wiki,e.meta)));return 0===i.length?null:o(t)||1!==i.length?i:i[0]}(n,e),i&&i(null,n),n})).catch((e=>(console.error(e),i&&i(e,null),null)))};const ia=function(e,t){return new Ji(e,t)},aa={Doc:Ji,Section:Mi,Paragraph:_e,Sentence:X,Image:_,Infobox:xi,Link:Z,List:Be,Reference:ji,Table:we,Template:Oi,http:function(e,t){return a(e,t).then((function(e){return e.json()})).catch((t=>(console.error("\n\n=-=- http response error =-=-=-"),console.error(e),console.error(t),{})))},wtf:ia};return ia.fetch=function(e,t,i){return ta(e,t,i)},ia.plugin=ia.extend=function(e){return e(aa,ki,st),this},ia.version="10.1.4",ia})); diff --git a/builds/wtf_wikipedia-client.mjs b/builds/wtf_wikipedia-client.mjs index 589809e3..4dd8351e 100644 --- a/builds/wtf_wikipedia-client.mjs +++ b/builds/wtf_wikipedia-client.mjs @@ -1,2 +1,2 @@ -/*! wtf_wikipedia 10.1.4 MIT */ -function e(e){var t=e.default;if("function"==typeof t){var i=function(){return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})})),i}var t=e(Object.freeze({__proto__:null,default:function(e,t){return t=t||{},new Promise((function(i,a){var n=new XMLHttpRequest,r=[],o=[],s={},l=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:l,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in n.open(t.method||"get",e,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,i){r.push(t=t.toLowerCase()),o.push([t,i]),s[t]=s[t]?s[t]+","+i:i})),i(l())},n.onerror=a,n.withCredentials="include"==t.credentials,t.headers)n.setRequestHeader(c,t.headers[c]);n.send(t.body||null)}))}})),i=self.fetch||(self.fetch=t.default||t);const a=function(e){let t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function n(e){return e&&"string"==typeof e?e=(e=(e=(e=e.replace(/^\s+/,"")).replace(/\s+$/,"")).replace(/ {2}/," ")).replace(/\s, /,", "):""}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}const o=/(wikibooks|wikidata|wikimedia|wikinews|wikipedia|wikiquote|wikisource|wikispecies|wikiversity|wikivoyage|wiktionary|foundation|meta)\.org/,s={action:"query",prop:"revisions|pageprops",rvprop:"content",maxlag:5,rvslots:"main",origin:"*",format:"json",redirects:"true"},l=e=>e.replace(/ /g,"_").trim(),c=function(e,t=s){let i=Object.assign({},t),a="";if(e.domain){let t=o.test(e.domain)?"w/api.php":e.path;a=`https://${e.domain}/${t}?`}else{if(!e.lang||!e.wiki)return"";a=`https://${e.lang}.${e.wiki}.org/w/api.php?`}e.follow_redirects||delete i.redirects,e.origin&&(i.origin=e.origin);let n=e.title;if("number"==typeof n)i.pageids=n;else if("string"==typeof n)i.titles=l(n);else if(void 0!==n&&r(n)&&"number"==typeof n[0])i.pageids=n.filter((e=>e)).join("|");else{if(void 0===n||!0!==r(n)||"string"!=typeof n[0])return"";i.titles=n.filter((e=>e)).map(l).join("|")}return`${a}${c=i,Object.entries(c).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&")}`;var c},u=function(e,t,i){let a=[];return e.sections().forEach((e=>{let n=[];n="string"==typeof i?e[t](i):e[t](),n.forEach((e=>{a.push(e)}))})),"number"==typeof i?void 0===a[i]?[]:[a[i]]:a},m=function(e,t){return Object.assign({},t,e)},p={title:!0,sections:!0,pageID:!0,categories:!0};var d=["category","abdeeling","bólkur","catagóir","categori","categoria","categoria","categoría","categorîa","categorìa","catégorie","categorie","catègorie","category","categuria","catigurìa","class","ẹ̀ka","flocc","flocc","flokkur","grup","jamii","kaarangay","kateggoría","kategooria","kategori","kategorî","kategoria","kategória","kategorie","kategoriija","kategorija","kategorio","kategoriya","kategoriýa","kategoriye","kategory","kategorya","kateqoriya","katiguriya","klad","luokka","ñemohenda","roinn","ronney","rummad","setensele","sokajy","sumut","thể","turkum","категорија","категория","категорія","катэгорыя","төркем","קטגוריה","تصنيف","تۈر","رده","श्रेणी","श्रेणी","বিষয়শ্রেণী","หมวดหมู่","분류","분류","分类"],h=["file","image","चित्र","archivo","attēls","berkas","bestand","datei","dosiero","dosya","fájl","fasciculus","fichier","fil","fitxategi","fitxer","gambar","imagem","imej","immagine","larawan","lêer","plik","restr","slika","wêne","wobraz","выява","податотека","слика","файл","სურათი","պատկեր","קובץ","پرونده","دوتنه","ملف","وێنە","चित्र","ไฟล์","파일","ファイル"],g=["infobox","anfo","anuāmapa","bilgi kutusu","bilgi","bilgiquti","boaty","boestkelaouiñ","bosca","capsa","diehtokássa","faktamall","ficha","generalni","gwybodlen3","info","infobokis","infoboks","infochascha","infokašćik","infokast","infokutija","infolentelė","infopolje","informkesto","infoskreine","infotaula","inligtingskas","inligtingskas3","inligtingskas4","kishtey","kotak","tertcita","tietolaatikko","yerleşim bilgi kutusu","ynfoboks","πλαίσιο","акарточка","аҥа","инфобокс","инфокутија","инфокутия","інфобокс","канадский","картка","карточка","карточка2","карточкарус","картуш","қуттӣ","ინფოდაფა","տեղեկաքարտ","אינפאקעסטל","תבנית","بطاقة","ڄاڻخانو","خانہ","لغة","ज्ञानसन्दूक","তথ্যছক","ਜਾਣਕਾਰੀਡੱਬਾ","సమాచారపెట్టె","තොරතුරුකොටුව","กล่องข้อมูล","ប្រអប់ព័ត៌មាន","정보상자","明細"];let b=" disambiguation";const k=["dab","dab","disamb","disambig","geodis","hndis","setindex","ship index","split dab","sport index","wp disambig","disambiguation cleanup","airport"+b,"biology"+b,"call sign"+b,"caselaw"+b,"chinese title"+b,"genus"+b,"hospital"+b,"lake index","letter"+b,"letter-number combination"+b,"mathematical"+b,"military unit"+b,"mountainindex","number"+b,"phonetics"+b,"place name"+b,"portal"+b,"road"+b,"school"+b,"species latin name abbreviation"+b,"species latin name"+b,"station"+b,"synagogue"+b,"taxonomic authority"+b,"taxonomy"+b].reduce(((e,t)=>(e[t]=!0,e)),{}),f=/. may (also )?refer to\b/i,w={about:!0,for:!0,"for multi":!0,"other people":!0,"other uses of":!0,distinguish:!0},y=new RegExp(". \\(("+["disambiguation","homonymie","توضيح","desambiguação","Begriffsklärung","disambigua","曖昧さ回避","消歧義","搞清楚","значения","ابهام‌زدایی","د ابہام","동음이의","dubbelsinnig","այլ կիրառումներ","ujednoznacznienie"].join("|")+")\\)$","i"),$=["dab","disamb","disambig","disambiguation","letter-numbercombdisambig","letter-number combination disambiguation","dmbox","airport disambiguation","biology disambiguation","call sign disambiguation","caselaw disambiguation","chinese title disambiguation","disambiguation cleanup","genus disambiguation","hospital disambiguation","human name disambiguation","human name disambiguation cleanup","letter-number combination disambiguation","mathematical disambiguation","military unit disambiguation","music disambiguation","number disambiguation","opus number disambiguation","phonetics disambiguation","place name disambiguation","portal disambiguation","road disambiguation","school disambiguation","species latin name abbreviation disambiguation","species latin name disambiguation","station disambiguation","synagogue disambiguation","taxonomic authority disambiguation","taxonomy disambiguation","template disambiguation","disamb2","disamb3","disamb4","disambiguation lead","disambiguation lead name","disambiguation name","disamb-term","disamb-terms","aðgreining","aimai","ałtsʼáʼáztiin","anlam ayrımı","anlam ayrımı","apartigilo","argipen","begriepskloorenge","begriffsklärung","begriffsklärung","begriffsklärung","begriffsklearung","bisongidila","bkl","bokokani","caddayn","clerheans","cudakirin","čvor","db","desambig","desambigación","desambiguação","desambiguació","desambiguación","desambiguáncia","desambiguasion","desambiguassiù","desambigui","dezambiguizare","dəqiqləşdirmə","disambigua","disambigua","disambigua","disambìgua","disambigua","disambiguasi","disambiguasi","discretiva","disheñvelout","disingkek","dixanbigua","dixebra","diżambigwazzjoni","doorverwijspagina","dp","dp","dubbelsinnig","dudalipen","dv","egyért","fleiri týdningar","fleirtyding","flertydig","förgrening","gì-ngiê","giklaro","gwahaniaethu","homonimo","homónimos","homonymie","huaʻōlelo puana like","idirdhealú","khu-pia̍t","kthjellim","kujekesa","maana","maneo bin","mehrdüdig begreep","menm non","muardüüdag artiikel","neibetsjuttings","nozīmju atdalīšana","nuorodinis","nyahkekaburan","omonimeye","omonimia","page dé frouque","paglilinaw","panangilawlawag","pansayod","pejy mitovy anarana","peker","razdvojba","razločitev","razvrstavanje","reddaghey","rozcestník","rozlišovacia stránka","sclerir noziun","selvendyssivu","soilleireachadh","suzmunski","täpsustuslehekülg","täsmennyssivu","telplänov","tlahtolmelahuacatlaliztli","trang định hướng","ujednoznacznienie","verdudeliking","wěcejwóznamowosć","wjacezmyslnosć","zambiguaçon","zeimeibu škiršona","αποσαφήνιση","айрық","аҵакырацәа","вишезначна одредница","ибҳомзудоӣ","кёб магъаналы","күп мәгънәләр","күп мәғәнәлелек","мъногосъмꙑслиѥ","неадназначнасць","неадназначнасьць","неоднозначность","олон удхатай","појаснување","пояснение","са шумуд манавал","салаа утгатай","суолталар","текмаанисиздик","цо магіна гуреб","чеперушка","чолхалла","шуко ончыктымаш-влак","მრავალმნიშვნელოვანი","բազմիմաստութիւն","բազմիմաստություն","באדייטן","פירושונים","ابهام‌زدایی","توضيح","توضيح","دقیقلشدیرمه","ڕوونکردنەوە","سلجهائپ","ضد ابہام","گجگجی بیری","نامبهمېدنه","መንታ","अस्पष्टता","बहुअर्थी","बहुविकल्पी शब्द","দ্ব্যর্থতা নিরসন","ਗੁੰਝਲ-ਖੋਲ੍ਹ","સંદિગ્ધ શીર્ષક","பக்கவழி நெறிப்படுத்தல்","అయోమయ నివృత్తి","ದ್ವಂದ್ವ ನಿವಾರಣೆ","വിവക്ഷകൾ","වක්‍රෝත්ති","แก้ความกำกวม","သံတူကြောင်းကွဲ","ណែនាំ","동음이의","扤清楚","搞清楚","曖昧さ回避","消歧义","釋義","gestion dj'omònim","sut'ichana qillqa"].reduce(((e,t)=>(e[t]=!0,e)),{}),x=function(e){if(!e)return!1;let t=e.text();return!(null===t||!t[0]||!0!==f.test(t))},v={caption:!0,alt:!0,links:!0,thumb:!0,url:!0},j=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_={file(){let e=this.data.file||"";if(e){/^(image|file):/i.test(e)||(e=`File:${e}`),e=e.trim(),e=e.charAt(0).toUpperCase()+e.substring(1),e=e.replace(/ /g,"_")}return e},alt(){let e=this.data.alt||this.data.file||"";return e=e.replace(/^(file|image):/i,""),e=e.replace(/\.(jpg|jpeg|png|gif|svg)/i,""),e.replace(/_/g," ")},caption(){return this.data.caption?this.data.caption.text():""},links(){return this.data.caption?this.data.caption.links():[]},url(){let e=function(e){let t=function(e){let t=e.replace(/^(image|file?):/i,"");return t=t.charAt(0).toUpperCase()+t.substring(1),t=t.trim().replace(/ /g,"_"),t}(e);return t=encodeURIComponent(t),t}(this.file());return`https://${this.data.domain||"wikipedia.org"}/wiki/Special:Redirect/file/${e}`},thumbnail(e){return e=e||300,this.url()+"?width="+e},format(){let e=this.file().split(".");return e[e.length-1]?e[e.length-1].toLowerCase():null},json:function(e){return function(e,t){t=m(t,v);let i={file:e.file()};return!1!==t.thumb&&(i.thumb=e.thumbnail()),!1!==t.url&&(i.url=e.url()),!1!==t.caption&&e.data.caption&&(i.caption=e.caption(),!1!==t.links&&e.data.caption.links()&&(i.links=e.links())),!1!==t.alt&&e.data.alt&&(i.alt=e.alt()),i}(this,e=e||{})},text:function(){return""},wikitext:function(){return this.data.wiki||""}};Object.keys(_).forEach((e=>{j.prototype[e]=_[e]})),j.prototype.src=j.prototype.url,j.prototype.thumb=j.prototype.thumbnail;var z={aa:"Afar",ab:"Аҧсуа",af:"Afrikaans",ak:"Akana",als:"Alemannisch",am:"አማርኛ",an:"Aragonés",ang:"Englisc",ar:"العربية",arc:"ܣܘܪܬ",as:"অসমীয়া",ast:"Asturianu",av:"Авар",ay:"Aymar",az:"Azərbaycanca",ba:"Башҡорт",bar:"Boarisch","bat-smg":"Žemaitėška",bcl:"Bikol",be:"Беларуская","be-x-old":"ltr",bg:"Български",bh:"भोजपुरी",bi:"Bislama",bm:"Bamanankan",bn:"বাংলা",bo:"བོད་ཡིག",bpy:"ltr",br:"Brezhoneg",bs:"Bosanski",bug:"ᨅᨔ",bxr:"ltr",ca:"Català",cdo:"Chinese",ce:"Нохчийн",ceb:"Sinugboanong",ch:"Chamoru",cho:"Choctaw",chr:"ᏣᎳᎩ",chy:"Tsetsêhestâhese",co:"Corsu",cr:"Nehiyaw",cs:"Česky",csb:"Kaszëbsczi",cu:"Slavonic",cv:"Чăваш",cy:"Cymraeg",da:"Dansk",de:"Deutsch",diq:"Zazaki",dsb:"ltr",dv:"ދިވެހިބަސް",dz:"ཇོང་ཁ",ee:"Ɛʋɛ",far:"فارسی",el:"Ελληνικά",en:"English",eo:"Esperanto",es:"Español",et:"Eesti",eu:"Euskara",ext:"Estremeñu",ff:"Fulfulde",fi:"Suomi","fiu-vro":"Võro",fj:"Na",fo:"Føroyskt",fr:"Français",frp:"Arpitan",fur:"Furlan",fy:"ltr",ga:"Gaeilge",gan:"ltr",gd:"ltr",gil:"Taetae",gl:"Galego",gn:"Avañe'ẽ",got:"gutisk",gu:"ગુજરાતી",gv:"Gaelg",ha:"هَوُسَ",hak:"ltr",haw:"Hawai`i",he:"עברית",hi:"हिन्दी",ho:"ltr",hr:"Hrvatski",ht:"Krèyol",hu:"Magyar",hy:"Հայերեն",hz:"Otsiherero",ia:"Interlingua",id:"Bahasa",ie:"Interlingue",ig:"Igbo",ii:"ltr",ik:"Iñupiak",ilo:"Ilokano",io:"Ido",is:"Íslenska",it:"Italiano",iu:"ᐃᓄᒃᑎᑐᑦ",ja:"日本語",jbo:"Lojban",jv:"Basa",ka:"ქართული",kg:"KiKongo",ki:"Gĩkũyũ",kj:"Kuanyama",kk:"Қазақша",kl:"Kalaallisut",km:"ភាសាខ្មែរ",kn:"ಕನ್ನಡ",khw:"کھوار",ko:"한국어",kr:"Kanuri",ks:"कश्मीरी",ksh:"Ripoarisch",ku:"Kurdî",kv:"Коми",kw:"Kernewek",ky:"Kırgızca",la:"Latina",lad:"Dzhudezmo",lan:"Leb",lb:"Lëtzebuergesch",lg:"Luganda",li:"Limburgs",lij:"Líguru",lmo:"Lumbaart",ln:"Lingála",lo:"ລາວ",lt:"Lietuvių",lv:"Latviešu","map-bms":"Basa",mg:"Malagasy",man:"官話",mh:"Kajin",mi:"Māori",min:"Minangkabau",mk:"Македонски",ml:"മലയാളം",mn:"Монгол",mo:"Moldovenească",mr:"मराठी",ms:"Bahasa",mt:"bil-Malti",mus:"Muskogee",my:"Myanmasa",na:"Dorerin",nah:"Nahuatl",nap:"Nnapulitano",nd:"ltr",nds:"Plattdüütsch","nds-nl":"Saxon",ne:"नेपाली",new:"नेपालभाषा",ng:"Oshiwambo",nl:"Nederlands",nn:"ltr",no:"Norsk",nr:"ltr",nso:"ltr",nrm:"Nouormand",nv:"Diné",ny:"Chi-Chewa",oc:"Occitan",oj:"ᐊᓂᔑᓈᐯᒧᐎᓐ",om:"Oromoo",or:"ଓଡ଼ିଆ",os:"Иронау",pa:"ਪੰਜਾਬੀ",pag:"Pangasinan",pam:"Kapampangan",pap:"Papiamentu",pdc:"ltr",pi:"Pāli",pih:"Norfuk",pl:"Polski",pms:"Piemontèis",ps:"پښتو",pt:"Português",qu:"Runa",rm:"ltr",rmy:"Romani",rn:"Kirundi",ro:"Română","roa-rup":"Armâneashti",ru:"Русский",rw:"Kinyarwandi",sa:"संस्कृतम्",sc:"Sardu",scn:"Sicilianu",sco:"Scots",sd:"सिनधि",se:"ltr",sg:"Sängö",sh:"Srpskohrvatski",si:"සිංහල",simple:"ltr",sk:"Slovenčina",sl:"Slovenščina",sm:"Gagana",sn:"chiShona",so:"Soomaaliga",sq:"Shqip",sr:"Српски",ss:"SiSwati",st:"ltr",su:"Basa",sv:"Svenska",sw:"Kiswahili",ta:"தமிழ்",te:"తెలుగు",tet:"Tetun",tg:"Тоҷикӣ",th:"ไทย",ti:"ትግርኛ",tk:"Туркмен",tl:"Tagalog",tlh:"tlhIngan-Hol",tn:"Setswana",to:"Lea",tpi:"ltr",tr:"Türkçe",ts:"Xitsonga",tt:"Tatarça",tum:"chiTumbuka",tw:"Twi",ty:"Reo",udm:"Удмурт",ug:"Uyƣurqə",uk:"Українська",ur:"اردو",uz:"Ўзбек",ve:"Tshivenḓa",vi:"Việtnam",vec:"Vèneto",vls:"ltr",vo:"Volapük",wa:"Walon",war:"Winaray",wo:"Wollof",xal:"Хальмг",xh:"isiXhosa",yi:"ייִדיש",yo:"Yorùbá",za:"Cuengh",zh:"中文","zh-classical":"ltr","zh-min-nan":"Bân-lâm-gú","zh-yue":"粵語",zu:"isiZulu"};const O=".wikipedia.org/wiki/$1",E=".wikimedia.org/wiki/$1",N="www.";var q={acronym:N+"acronymfinder.com/$1.html",advisory:"advisory"+E,advogato:N+"advogato.org/$1",aew:"wiki.arabeyes.org/$1",appropedia:N+"appropedia.org/$1",aquariumwiki:N+"theaquariumwiki.com/$1",arborwiki:"localwiki.org/ann-arbor/$1",arxiv:"arxiv.org/abs/$1",atmwiki:N+"otterstedt.de/wiki/index.php/$1",baden:N+"stadtwiki-baden-baden.de/wiki/$1/",battlestarwiki:"en.battlestarwiki.org/wiki/$1",bcnbio:"historiapolitica.bcn.cl/resenas_parlamentarias/wiki/$1",beacha:N+"beachapedia.org/$1",betawiki:"translatewiki.net/wiki/$1",bibcode:"adsabs.harvard.edu/abs/$1",bibliowiki:"wikilivres.org/wiki/$1",bluwiki:"bluwiki.com/go/$1",blw:"britainloves"+O,botwiki:"botwiki.sno.cc/wiki/$1",boxrec:N+"boxrec.com/media/index.php?$1",brickwiki:N+"brickwiki.info/wiki/$1",bugzilla:"bugzilla.wikimedia.org/show_bug.cgi?id=$1",bulba:"bulbapedia.bulbagarden.net/wiki/$1",c:"commons"+E,c2:"c2.com/cgi/wiki?$1",c2find:"c2.com/cgi/wiki?FindPage&value=$1",cache:N+"google.com/search?q=cache:$1","ĉej":"esperanto.blahus.cz/cxej/vikio/index.php/$1",cellwiki:"cell.wikia.com/wiki/$1",centralwikia:"community.wikia.com/wiki/$1",chej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",choralwiki:N+"cpdl.org/wiki/index.php/$1",citizendium:"en.citizendium.org/wiki/$1",ckwiss:N+"ck-wissen.de/ckwiki/index.php?title=$1",comixpedia:N+"comixpedia.org/index.php?title=$1",commons:"commons"+E,communityscheme:"community.schemewiki.org/?c=s&key=$1",communitywiki:"communitywiki.org/$1",comune:"rete.comuni-italiani.it/wiki/$1",creativecommons:"creativecommons.org/licenses/$1",creativecommonswiki:"wiki.creativecommons.org/$1",cxej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",dcc:N+"dccwiki.com/$1",dcdatabase:"dc.wikia.com/$1",dcma:"christian-morgenstern.de/dcma/index.php?title=$1",debian:"wiki.debian.org/$1",delicious:N+"delicious.com/tag/$1",devmo:"developer.mozilla.org/en/docs/$1",dictionary:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",dict:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",disinfopedia:"sourcewatch.org/index.php/$1",distributedproofreaders:N+"pgdp.net/wiki/$1",distributedproofreadersca:N+"pgdpcanada.net/wiki/index.php/$1",dmoz:"curlie.org/$1",dmozs:"curlie.org/search?q=$1",doi:"doi.org/$1",donate:"donate"+E,doom_wiki:"doom.wikia.com/wiki/$1",download:"releases.wikimedia.org/$1",dbdump:"dumps.wikimedia.org/$1/latest/",dpd:"lema.rae.es/dpd/?key=$1",drae:"dle.rae.es/?w=$1",dreamhost:"wiki.dreamhost.com/index.php/$1",drumcorpswiki:N+"drumcorpswiki.com/index.php/$1",dwjwiki:N+"suberic.net/cgi-bin/dwj/wiki.cgi?$1","eĉei":N+"ikso.net/cgi-bin/wiki.pl?$1",ecoreality:N+"EcoReality.org/wiki/$1",ecxei:N+"ikso.net/cgi-bin/wiki.pl?$1",elibre:"enciclopedia.us.es/index.php/$1",emacswiki:N+"emacswiki.org/emacs?$1",encyc:"encyc.org/wiki/$1",energiewiki:N+"netzwerk-energieberater.de/wiki/index.php/$1",englyphwiki:"en.glyphwiki.org/wiki/$1",enkol:"enkol.pl/$1",eokulturcentro:"esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1",esolang:"esolangs.org/wiki/$1",etherpad:"etherpad.wikimedia.org/$1",ethnologue:N+"ethnologue.com/language/$1",ethnologuefamily:N+"ethnologue.com/show_family.asp?subid=$1",evowiki:"wiki.cotch.net/index.php/$1",exotica:N+"exotica.org.uk/wiki/$1",fanimutationwiki:"wiki.animutationportal.com/index.php/$1",fedora:"fedoraproject.org/wiki/$1",finalfantasy:"finalfantasy.wikia.com/wiki/$1",finnix:N+"finnix.org/$1",flickruser:N+"flickr.com/people/$1",flickrphoto:N+"flickr.com/photo.gne?id=$1",floralwiki:N+"floralwiki.co.uk/wiki/$1",foldoc:"foldoc.org/$1",foundation:"foundation"+E,foundationsite:"wikimediafoundation.org/$1",foxwiki:"fox.wikis.com/wc.dll?Wiki~$1",freebio:"freebiology.org/wiki/$1",freebsdman:N+"FreeBSD.org/cgi/man.cgi?apropos=1&query=$1",freeculturewiki:"wiki.freeculture.org/index.php/$1",freedomdefined:"freedomdefined.org/$1",freefeel:"freefeel.org/wiki/$1",freekiwiki:"wiki.freegeek.org/index.php/$1",freesoft:"directory.fsf.org/wiki/$1",ganfyd:"ganfyd.org/index.php?title=$1",gardenology:N+"gardenology.org/wiki/$1",gausswiki:"gauss.ffii.org/$1",gentoo:"wiki.gentoo.org/wiki/$1",genwiki:"wiki.genealogy.net/index.php/$1",gerrit:"gerrit.wikimedia.org/r/$1",git:"gerrit.wikimedia.org/g/$1",google:N+"google.com/search?q=$1",googledefine:N+"google.com/search?q=define:$1",googlegroups:"groups.google.com/groups?q=$1",guildwarswiki:"wiki.guildwars.com/wiki/$1",guildwiki:"guildwars.wikia.com/wiki/$1",guc:"tools.wmflabs.org/guc/?user=$1",gucprefix:"tools.wmflabs.org/guc/?isPrefixPattern=1&src=rc&user=$1",gutenberg:N+"gutenberg.org/etext/$1",gutenbergwiki:N+"gutenberg.org/wiki/$1",hackerspaces:"hackerspaces.org/wiki/$1",h2wiki:"halowiki.net/p/$1",hammondwiki:N+"dairiki.org/HammondWiki/index.php3?$1",hdl:"hdl.handle.net/$1",heraldik:"heraldik-wiki.de/wiki/$1",heroeswiki:"heroeswiki.com/$1",horizonlabs:"horizon.wikimedia.org/$1",hrwiki:N+"hrwiki.org/index.php/$1",hrfwiki:"fanstuff.hrwiki.org/index.php/$1",hupwiki:"wiki.hup.hu/index.php/$1",iarchive:"archive.org/details/$1",imdbname:N+"imdb.com/name/nm$1/",imdbtitle:N+"imdb.com/title/tt$1/",imdbcompany:N+"imdb.com/company/co$1/",imdbcharacter:N+"imdb.com/character/ch$1/",incubator:"incubator"+E,infosecpedia:"infosecpedia.org/wiki/$1",infosphere:"theinfosphere.org/$1","iso639-3":"iso639-3.sil.org/code/$1",issn:N+"worldcat.org/issn/$1",iuridictum:"iuridictum.pecina.cz/w/$1",jaglyphwiki:"glyphwiki.org/wiki/$1",jefo:"esperanto-jeunes.org/wiki/$1",jerseydatabase:"jerseydatabase.com/wiki.php?id=$1",jira:"jira.toolserver.org/browse/$1",jspwiki:N+"ecyrd.com/JSPWiki/Wiki.jsp?page=$1",jstor:N+"jstor.org/journals/$1",kamelo:"kamelopedia.mormo.org/index.php/$1",karlsruhe:"ka.stadtwiki.net/$1",kinowiki:"kino.skripov.com/index.php/$1",komicawiki:"wiki.komica.org/?$1",kontuwiki:"kontu.wiki/$1",wikitech:"wikitech"+E,libreplanet:"libreplanet.org/wiki/$1",linguistlist:"linguistlist.org/forms/langs/LLDescription.cfm?code=$1",linuxwiki:N+"linuxwiki.de/$1",linuxwikide:N+"linuxwiki.de/$1",liswiki:"liswiki.org/wiki/$1",literateprograms:"en.literateprograms.org/$1",livepedia:N+"livepedia.gr/index.php?title=$1",localwiki:"localwiki.org/$1",lojban:"mw.lojban.org/papri/$1",lostpedia:"lostpedia.wikia.com/wiki/$1",lqwiki:"wiki.linuxquestions.org/wiki/$1",luxo:"tools.wmflabs.org/guc/?user=$1",mail:"lists.wikimedia.org/mailman/listinfo/$1",mailarchive:"lists.wikimedia.org/pipermail/$1",mariowiki:N+"mariowiki.com/$1",marveldatabase:N+"marveldatabase.com/wiki/index.php/$1",meatball:"meatballwiki.org/wiki/$1",mw:N+"mediawiki.org/wiki/$1",mediazilla:"bugzilla.wikimedia.org/$1",memoryalpha:"memory-alpha.fandom.com/wiki/$1",metawiki:"meta"+E,metawikimedia:"meta"+E,metawikipedia:"meta"+E,mineralienatlas:N+"mineralienatlas.de/lexikon/index.php/$1",moinmoin:"moinmo.in/$1",monstropedia:N+"monstropedia.org/?title=$1",mosapedia:"mosapedia.de/wiki/index.php/$1",mozcom:"mozilla.wikia.com/wiki/$1",mozillawiki:"wiki.mozilla.org/$1",mozillazinekb:"kb.mozillazine.org/$1",musicbrainz:"musicbrainz.org/doc/$1",mediawikiwiki:N+"mediawiki.org/wiki/$1",mwod:N+"merriam-webster.com/dictionary/$1",mwot:N+"merriam-webster.com/thesaurus/$1",nkcells:N+"nkcells.info/index.php?title=$1",nara:"catalog.archives.gov/id/$1",nosmoke:"no-smok.net/nsmk/$1",nost:"nostalgia"+O,nostalgia:"nostalgia"+O,oeis:"oeis.org/$1",oldwikisource:"wikisource.org/wiki/$1",olpc:"wiki.laptop.org/go/$1",omegawiki:N+"omegawiki.org/Expression:$1",onelook:N+"onelook.com/?ls=b&w=$1",openlibrary:"openlibrary.org/$1",openstreetmap:"wiki.openstreetmap.org/wiki/$1",openwetware:"openwetware.org/wiki/$1",opera7wiki:"operawiki.info/$1",organicdesign:N+"organicdesign.co.nz/$1",orthodoxwiki:"orthodoxwiki.org/$1",osmwiki:"wiki.openstreetmap.org/wiki/$1",otrs:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=$1",otrswiki:"otrs-wiki"+E,ourmedia:N+"socialtext.net/ourmedia/index.cgi?$1",outreach:"outreach"+E,outreachwiki:"outreach"+E,owasp:N+"owasp.org/index.php/$1",panawiki:"wiki.alairelibre.net/index.php?title=$1",patwiki:"gauss.ffii.org/$1",personaltelco:"personaltelco.net/wiki/$1",petscan:"petscan.wmflabs.org/?psid=$1",phab:"phabricator.wikimedia.org/$1",phabricator:"phabricator.wikimedia.org/$1",phwiki:N+"pocketheaven.com/ph/wiki/index.php?title=$1",phpwiki:"phpwiki.sourceforge.net/phpwiki/index.php?$1",planetmath:"planetmath.org/node/$1",pmeg:N+"bertilow.com/pmeg/$1",pmid:N+"ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract",pokewiki:"pokewiki.de/$1","pokéwiki":"pokewiki.de/$1",policy:"policy.wikimedia.org/$1",proofwiki:N+"proofwiki.org/wiki/$1",pyrev:N+"mediawiki.org/wiki/Special:Code/pywikipedia/$1",pythoninfo:"wiki.python.org/moin/$1",pythonwiki:N+"pythonwiki.de/$1",pywiki:"c2.com/cgi/wiki?$1",psycle:"psycle.sourceforge.net/wiki/$1",quality:"quality"+E,quarry:"quarry.wmflabs.org/$1",regiowiki:"regiowiki.at/wiki/$1",rev:N+"mediawiki.org/wiki/Special:Code/MediaWiki/$1",revo:"purl.org/NET/voko/revo/art/$1.html",rfc:"tools.ietf.org/html/rfc$1",rheinneckar:"rhein-neckar-wiki.de/$1",robowiki:"robowiki.net/?$1",rodovid:"en.rodovid.org/wk/$1",reuterswiki:"glossary.reuters.com/index.php/$1",rowiki:"wiki.rennkuckuck.de/index.php/$1",rt:"rt.wikimedia.org/Ticket/Display.html?id=$1",s23wiki:"s23.org/wiki/$1",scholar:"scholar.google.com/scholar?q=$1",schoolswp:"schools-"+O,scores:"imslp.org/wiki/$1",scoutwiki:"en.scoutwiki.org/$1",scramble:N+"scramble.nl/wiki/index.php?title=$1",seapig:N+"seapig.org/$1",seattlewiki:"seattle.wikia.com/wiki/$1",slwiki:"wiki.secondlife.com/wiki/$1","semantic-mw":N+"semantic-mediawiki.org/wiki/$1",senseislibrary:"senseis.xmp.net/?$1",sharemap:"sharemap.org/$1",silcode:N+"sil.org/iso639-3/documentation.asp?id=$1",slashdot:"slashdot.org/article.pl?sid=$1",sourceforge:"sourceforge.net/$1",spcom:"spcom"+E,species:"species"+E,squeak:"wiki.squeak.org/squeak/$1",stats:"stats.wikimedia.org/$1",stewardry:"tools.wmflabs.org/meta/stewardry/?wiki=$1",strategy:"strategy"+E,strategywiki:"strategywiki.org/wiki/$1",sulutil:"meta.wikimedia.org/wiki/Special:CentralAuth/$1",swtrain:"train.spottingworld.com/$1",svn:"svn.wikimedia.org/viewvc/mediawiki/$1?view=log",swinbrain:"swinbrain.ict.swin.edu.au/wiki/$1",tabwiki:N+"tabwiki.com/index.php/$1",tclerswiki:"wiki.tcl.tk/$1",technorati:N+"technorati.com/search/$1",tenwiki:"ten"+O,testwiki:"test"+O,testwikidata:"test.wikidata.org/wiki/$1",test2wiki:"test2"+O,tfwiki:"tfwiki.net/wiki/$1",thelemapedia:N+"thelemapedia.org/index.php/$1",theopedia:N+"theopedia.com/$1",thinkwiki:N+"thinkwiki.org/wiki/$1",ticket:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=$1",tmbw:"tmbw.net/wiki/$1",tmnet:N+"technomanifestos.net/?$1",tmwiki:N+"EasyTopicMaps.com/?page=$1",toolforge:"tools.wmflabs.org/$1",toollabs:"tools.wmflabs.org/$1",tools:"toolserver.org/$1",tswiki:N+"mediawiki.org/wiki/Toolserver:$1",translatewiki:"translatewiki.net/wiki/$1",tviv:"tviv.org/wiki/$1",tvtropes:N+"tvtropes.org/pmwiki/pmwiki.php/Main/$1",twiki:"twiki.org/cgi-bin/view/$1",tyvawiki:N+"tyvawiki.org/wiki/$1",umap:"umap.openstreetmap.fr/$1",uncyclopedia:"en.uncyclopedia.co/wiki/$1",unihan:N+"unicode.org/cgi-bin/GetUnihanData.pl?codepoint=$1",unreal:"wiki.beyondunreal.com/wiki/$1",urbandict:N+"urbandictionary.com/define.php?term=$1",usej:N+"tejo.org/usej/$1",usemod:N+"usemod.com/cgi-bin/wiki.pl?$1",usability:"usability"+E,utrs:"utrs.wmflabs.org/appeal.php?id=$1",vikidia:"fr.vikidia.org/wiki/$1",vlos:"tusach.thuvienkhoahoc.com/wiki/$1",vkol:"kol.coldfront.net/thekolwiki/index.php/$1",voipinfo:N+"voip-info.org/wiki/view/$1",votewiki:"vote"+E,werelate:N+"werelate.org/wiki/$1",wg:"wg-en"+O,wikia:N+"wikia.com/wiki/w:c:$1",wikiasite:N+"wikia.com/wiki/w:c:$1",wikiapiary:"wikiapiary.com/wiki/$1",wikibooks:"en.wikibooks.org/wiki/$1",wikichristian:N+"wikichristian.org/index.php?title=$1",wikicities:N+"wikia.com/wiki/w:$1",wikicity:N+"wikia.com/wiki/w:c:$1",wikiconference:"wikiconference.org/wiki/$1",wikidata:N+"wikidata.org/wiki/$1",wikif1:N+"wikif1.org/$1",wikifur:"en.wikifur.com/wiki/$1",wikihow:N+"wikihow.com/$1",wikiindex:"wikiindex.org/$1",wikilemon:"wiki.illemonati.com/$1",wikilivres:"wikilivres.org/wiki/$1",wikilivresru:"wikilivres.ru/$1","wikimac-de":"apfelwiki.de/wiki/Main/$1",wikimedia:"foundation"+E,wikinews:"en.wikinews.org/wiki/$1",wikinfo:"wikinfo.org/w/index.php/$1",wikinvest:"meta.wikimedia.org/wiki/Interwiki_map/discontinued#Wikinvest",wikiotics:"wikiotics.org/$1",wikipapers:"wikipapers.referata.com/wiki/$1",wikipedia:"en"+O,wikipediawikipedia:"en.wikipedia.org/wiki/Wikipedia:$1",wikiquote:"en.wikiquote.org/wiki/$1",wikisophia:"wikisophia.org/index.php?title=$1",wikisource:"en.wikisource.org/wiki/$1",wikispecies:"species"+E,wikispot:"wikispot.org/?action=gotowikipage&v=$1",wikiskripta:N+"wikiskripta.eu/index.php/$1",labsconsole:"wikitech"+E,wikiti:"wikiti.denglend.net/index.php?title=$1",wikiversity:"en.wikiversity.org/wiki/$1",wikivoyage:"en.wikivoyage.org/wiki/$1",betawikiversity:"beta.wikiversity.org/wiki/$1",wikiwikiweb:"c2.com/cgi/wiki?$1",wiktionary:"en.wiktionary.org/wiki/$1",wipipedia:"wipipedia.org/index.php/$1",wlug:N+"wlug.org.nz/$1",wmam:"am"+E,wmar:N+"wikimedia.org.ar/wiki/$1",wmat:"mitglieder.wikimedia.at/$1",wmau:"wikimedia.org.au/wiki/$1",wmbd:"bd"+E,wmbe:"be"+E,wmbr:"br"+E,wmca:"ca"+E,wmch:N+"wikimedia.ch/$1",wmcl:N+"wikimediachile.cl/index.php?title=$1",wmcn:"cn"+E,wmco:"co"+E,wmcz:N+"wikimedia.cz/web/$1",wmdc:"wikimediadc.org/wiki/$1",securewikidc:"secure.wikidc.org/$1",wmde:"wikimedia.de/wiki/$1",wmdk:"dk"+E,wmee:"ee"+E,wmec:"ec"+E,wmes:N+"wikimedia.es/wiki/$1",wmet:"ee"+E,wmfdashboard:"outreachdashboard.wmflabs.org/$1",wmfi:"fi"+E,wmfr:"wikimedia.fr/$1",wmge:"ge"+E,wmhi:"hi"+E,wmhk:"meta.wikimedia.org/wiki/Wikimedia_Hong_Kong",wmhu:"wikimedia.hu/wiki/$1",wmid:"id"+E,wmil:N+"wikimedia.org.il/$1",wmin:"wiki.wikimedia.in/$1",wmit:"wiki.wikimedia.it/wiki/$1",wmke:"meta.wikimedia.org/wiki/Wikimedia_Kenya",wmmk:"mk"+E,wmmx:"mx"+E,wmnl:"nl"+E,wmnyc:"nyc"+E,wmno:"no"+E,"wmpa-us":"pa-us"+E,wmph:"meta.wikimedia.org/wiki/Wikimedia_Philippines",wmpl:"pl"+E,wmpt:"pt"+E,wmpunjabi:"punjabi"+E,wmromd:"romd"+E,wmrs:"rs"+E,wmru:"ru"+E,wmse:"se"+E,wmsk:"wikimedia.sk/$1",wmtr:"tr"+E,wmtw:"wikimedia.tw/wiki/index.php5/$1",wmua:"ua"+E,wmuk:"wikimedia.org.uk/wiki/$1",wmve:"wikimedia.org.ve/wiki/$1",wmza:"wikimedia.org.za/wiki/$1",wm2005:"wikimania2005"+E,wm2006:"wikimania2006"+E,wm2007:"wikimania2007"+E,wm2008:"wikimania2008"+E,wm2009:"wikimania2009"+E,wm2010:"wikimania2010"+E,wm2011:"wikimania2011"+E,wm2012:"wikimania2012"+E,wm2013:"wikimania2013"+E,wm2014:"wikimania2014"+E,wm2015:"wikimania2015"+E,wm2016:"wikimania2016"+E,wm2017:"wikimania2017"+E,wm2018:"wikimania2018"+E,wmania:"wikimania"+E,wikimania:"wikimania"+E,wmteam:"wikimaniateam"+E,wmf:"foundation"+E,wmfblog:"blog.wikimedia.org/$1",wmdeblog:"blog.wikimedia.de/$1",wookieepedia:"starwars.wikia.com/wiki/$1",wowwiki:N+"wowwiki.com/$1",wqy:"wqy.sourceforge.net/cgi-bin/index.cgi?$1",wurmpedia:"wurmpedia.com/index.php/$1",viaf:"viaf.org/viaf/$1",zrhwiki:N+"zrhwiki.ch/wiki/$1",zum:"wiki.zum.de/$1",zwiki:N+"zwiki.org/$1",m:"meta"+E,meta:"meta"+E,sep11:"sep11"+O,d:N+"wikidata.org/wiki/$1",minnan:"zh-min-nan"+O,nb:"no"+O,"zh-cfr":"zh-min-nan"+O,"zh-cn":"zh"+O,"zh-tw":"zh"+O,nan:"zh-min-nan"+O,vro:"fiu-vro"+O,cmn:"zh"+O,lzh:"zh-classical"+O,rup:"roa-rup"+O,gsw:"als"+O,"be-tarask":"be-x-old"+O,sgs:"bat-smg"+O,egl:"eml"+O,w:"en"+O,wikt:"en.wiktionary.org/wiki/$1",q:"en.wikiquote.org/wiki/$1",b:"en.wikibooks.org/wiki/$1",n:"en.wikinews.org/wiki/$1",s:"en.wikisource.org/wiki/$1",chapter:"en"+E,v:"en.wikiversity.org/wiki/$1",voy:"en.wikivoyage.org/wiki/$1"};Object.keys(z).forEach((e=>{q[e]=e+".wikipedia.org/wiki/$1"}));const S=/^(category|catégorie|kategorie|categoría|categoria|categorie|kategoria|تصنيف|image|file|fichier|datei|media):/i,C=/\[(https?|news|ftp|mailto|gopher|irc)(:\/\/[^\]| ]{4,1500})([| ].*?)?\]/g,L=/\[\[(.{0,1600}?)\]\]([a-z]+)?/gi,A=function(e,t){return t.replace(L,(function(t,i,a){let n=null,r=i;if(i.match(/\|/)&&(r=(i=i.replace(/\[\[(.{2,1000}?)\]\](\w{0,10})/g,"$1$2")).replace(/(.{2,1000})\|.{0,2000}/,"$1"),n=i.replace(/.{2,1000}?\|/,""),null===n&&r.match(/\|$/)&&(r=r.replace(/\|$/,""),n=r)),r.match(S))return i;let o={page:r,raw:t};return o.page=o.page.replace(/#(.*)/,((e,t)=>(o.anchor=t,""))),o=function(e){let t=e.page||"";if(-1!==t.indexOf(":")){let i=t.match(/^(.*):(.*)/);if(null===i)return e;let a=i[1]||"";if(a=a.toLowerCase(),-1!==a.indexOf(":")){let[,t,i]=a.match(/^:?(.*):(.*)/);if(!1===q.hasOwnProperty(t)||!1===z.hasOwnProperty(i))return e;e.wiki={wiki:t,lang:i}}else{if(!1===q.hasOwnProperty(a))return e;e.wiki=a}e.page=i[2]}return e}(o),o.wiki&&(o.type="interwiki"),null!==n&&n!==o.page&&(o.text=n),a&&(o.text=o.text||o.page,o.text+=a.trim()),o.page&&!1===/^[A-Z]/.test(o.page)&&(o.text||(o.text=o.page),o.page=o.page),o.text&&o.text.startsWith(":")&&(o.text=o.text.replace(/^:/,"")),e.push(o),i})),e},P=function(e){let t=[];if(t=function(e,t){return t.replace(C,(function(t,i,a,n){return n=n||"",e.push({type:"external",site:i+a,text:n.trim(),raw:t}),n})),e}(t,e),t=A(t,e),0!==t.length)return t},D=new RegExp("^[ \n\t]*?#("+["adkas","aýdaw","doorverwijzing","ohjaus","patrz","přesměruj","redirección","redireccion","redirección","redirecionamento","redirect","redirection","redirection","rinvia","tilvísun","uudelleenohjaus","weiterleitung","weiterleitung","yönlendi̇r","yönlendirme","yönlendi̇rme","ανακατευθυνση","айдау","перанакіраваньне","перенаправлення","пренасочување","преусмери","преусмјери","تغییر_مسیر","تغییرمسیر","تغییرمسیر","เปลี่ยนทาง","ប្តូរទីតាំងទៅ","転送","重定向"].join("|")+") *?(\\[\\[.{2,180}?\\]\\])","i"),T=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","references","source","syntaxhighlight","timeline"],I=`< ?(${T.join("|")}) ?[^>]{0,200}?>`,M=`< ?/ ?(${T.join("|")}) ?>`,U=new RegExp(`${I}[\\s\\S]+?${M}`,"gi");function R(e){return e=(e=(e=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(U," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%.\-#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/
(.*?)<\/blockquote>/g,"{{blockquote|text=$1}}")).replace(/ ?<[ /]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr|u)[ /]?> ?/g," ")).replace(/ ?<[ /]?(abbr|bdi|bdo|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ /]?> ?/g," ")).replace(/ ?<[ /]?h[0-9][ /]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()}(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~{2,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," ")).replace(/–/g,"–"))).replace(/\([,;: ]+\)/g,"")).replace(/\{\{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,"")}const F=/[\\.$]/,B=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},K=function(e={}){let t=Object.keys(e);for(let i=0;i{Y.prototype[e]=Z[e]}));const G=/^[0-9,.]+$/,V={text:!0,links:!0,formatting:!0,numbers:!0},J=function(e={}){Object.defineProperty(this,"data",{enumerable:!1,value:e})},X={links:function(e){let t=this.data.links||[];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page===e));return void 0===i?[]:[i]}return t},interwiki:function(){return this.links().filter((e=>void 0!==e.wiki))},bolds:function(){return this.data&&this.data.fmt&&this.data.fmt.bold&&this.data.fmt.bold||[]},italics:function(){return this.data&&this.data.fmt&&this.data.fmt.italic&&this.data.fmt.italic||[]},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return function(e,t){t=m(t,V);let i={},a=e.text();if(!0===t.text&&(i.text=a),!0===t.numbers&&G.test(a)){let e=Number(a.replace(/,/g,""));!1===isNaN(e)&&(i.number=e)}return t.links&&e.links().length>0&&(i.links=e.links().map((e=>e.json()))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i}(this,e)},wikitext:function(){return this.data.wiki||""},isEmpty:function(){return""===this.data.text}};Object.keys(X).forEach((e=>{J.prototype[e]=X[e]}));const Q={links:"link",bolds:"bold",italics:"italic"};Object.keys(Q).forEach((e=>{J.prototype[Q[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}})),J.prototype.plaintext=J.prototype.text;const ee=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),te=new RegExp("(^| |')("+ee.join("|")+")[.!?] ?$","i"),ie=/[ .'][A-Z].? *$/i,ae=/\.{3,} +$/,ne=/ c\.\s$/,re=/\p{Letter}/iu;function oe(e){let t={wiki:e,text:e};return function(e){let t=e.text,i=P(t)||[];e.links=i.map((e=>(t=t.replace(e.raw,e.text||e.page||""),new Y(e)))),t=t.replace(/\[\[File:(.{2,80}?)\|([^\]]+)\]\](\w{0,5})/g,"$1"),e.text=t}(t),t.text=n(t.text.replace(/\([,;: ]*\)/g,"").replace(/\( *(; ?)+/g,"(")).replace(/ +\.$/,"."),t=function(e){let t=[],i=[],a=e.text||"";return a=a.replace(/'''''(.{0,2500}?)'''''/g,((e,a)=>(t.push(a),i.push(a),a))),a=a.replace(/''''(.{0,2500}?)''''/g,((e,i)=>(t.push(`'${i}'`),`'${i}'`))),a=a.replace(/'''(.{0,2500}?)'''/g,((e,i)=>(t.push(i),i))),a=a.replace(/''(.{0,2500}?)''/g,((e,t)=>(i.push(t),t))),e.text=a,t.length>0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e}(t),new J(t)}const se=function(e){let t=function(e){let t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;let a=function(e){let t=e.split(/(\n+)/);return t=t.filter((e=>e.match(/\S/))),t=t.map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s|$)/g)})),function(e){let t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t)}(e);for(let e=0;ei.length)return!1;const a=e.match(/"/g);if(a&&a.length%2!=0&&e.length<900)return!1;const n=e.match(/[()]/g);return!(n&&n.length%2!=0&&e.length<900)}(n))?/^\s/.test(i[e+1])||/\s$/.test(i[e])?i[e+1]=i[e]+i[e+1]:i[e+1]=i[e]+" "+i[e+1]:i[e]&&i[e].length>0&&(t.push(i[e]),i[e]="");var n;return 0===t.length?[e]:t}(e.wiki);t=t.map(oe),t[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},le=/.*rowspan *= *["']?([0-9]+)["']?[ |]*/,ce=/.*colspan *= *["']?([0-9]+)["']?[ |]*/,ue=function(e){return e=function(e){return e.forEach(((t,i)=>{t.forEach(((a,n)=>{let r=a.match(le);if(null!==r){let o=parseInt(r[1],10);a=a.replace(le,""),t[n]=a;for(let t=i+1;t{e.forEach(((t,i)=>{let a=t.match(ce);if(null!==a){let n=parseInt(a[1],10);e[i]=t.replace(ce,"");for(let t=1;te.length>0))}(e))},me=/^!/,pe={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},de=function(e){return(e=oe(e).text()).match(/\|/)&&(e=e.replace(/.*?\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},he=function(e){if(e.length<=3)return[];let t=e[0].slice(0);t=t.map((e=>(e=oe(e=e.replace(/^! */,"")).text(),e=(e=de(e)).toLowerCase())));for(let i=0;ie&&!0!==/^\|\+/.test(e))),!0===/^\{\|/.test(e[0])&&e.shift(),!0===/^\|\}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(let a=0;a0&&(t.push(i),i=[]);else{let e=n.charAt(0);"|"!==e&&"!"!==e||(n=n.substring(1)),n=n.split(/(?:\|\||!!)/),"!"===e&&(n[0]=e+n[0]),n.forEach((e=>{e=e.trim(),i.push(e)}))}}return i.length>0&&t.push(i),t}(e.replace(/\r/g,"").replace(/\n(\s*[^|!{\s])/g," $1").split(/\n/).map((e=>e.trim())));if(t=t.filter((e=>e)),0===t.length)return[];t=function(e){return e.filter((e=>1!==e.length||!e[0]||!me.test(e[0])||!1!==/rowspan/i.test(e[0])))}(t),t=ue(t);let i=function(e=[]){let t=[];var i;(i=(i=e[0])||[]).length-i.filter((e=>e)).length>3&&e.shift();let a=e[0];return a&&a[0]&&a[1]&&(/^!/.test(a[0])||/^!/.test(a[1]))&&(t=a.map((e=>(e=e.replace(/^! */,""),de(e)))),e.shift()),a=e[0],a&&a[0]&&a[1]&&/^!/.test(a[0])&&/^!/.test(a[1])&&(a.forEach(((e,i)=>{e=e.replace(/^! */,""),e=de(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(t);if(!i||i.length<=1){i=he(t);let e=t[t.length-1]||[];i.length<=1&&e.length>2&&(i=he(t.slice(1)),i.length>0&&(t=t.slice(2)))}let a=t.map((e=>function(e,t){let i={};return e.forEach(((e,a)=>{let n=t[a]||"col"+(a+1),r=oe(e);r.text(de(r.text())),i[n]=r})),i}(e,i)));return a},be={},ke=function(e=""){return e=(e=(e=(e=e.toLowerCase()).replace(/[_-]/g," ")).replace(/\(.*?\)/,"")).trim()},fe=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_wiki",{enumerable:!1,value:t})},we={links(e){let t=[];if(this.data.forEach((e=>{Object.keys(e).forEach((i=>{t=t.concat(e[i].links())}))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},get(e){let t=this.data[0]||{},i=Object.keys(t).reduce(((e,t)=>(e[ke(t)]=t,e)),{});if("string"==typeof e){let t=ke(e);return t=i[t]||t,this.data.map((e=>e[t]?e[t].text():null))}return e=e.map(ke).map((e=>i[e]||e)),this.data.map((t=>e.reduce(((e,i)=>(t[i]?e[i]=t[i].text():e[i]="",e)),{})))},keyValue(e){let t=this.json(e);return t.forEach((e=>{Object.keys(e).forEach((t=>{e[t]=e[t].text}))})),t},json(e){return e=m(e,be),function(e,t){return e.map((e=>{let i={};return Object.keys(e).forEach((t=>{i[t]=e[t].json()})),!0===t.encode&&(i=K(i)),i}))}(this.data,e)},text:()=>"",wikitext(){return this._wiki||""}};we.keyvalue=we.keyValue,we.keyval=we.keyValue,Object.keys(we).forEach((e=>{fe.prototype[e]=we[e]}));const ye=/^\s*\{\|/,$e=/^\s*\|\}/,xe={sentences:!0},ve={sentences:!0,lists:!0,images:!0},je=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},_e={sentences:function(){return this.data.sentences||[]},references:function(){return this.data.references},lists:function(){return this.data.lists},images(){return this.data.images||[]},links:function(e){let t=[];if(this.sentences().forEach((i=>{t=t.concat(i.links(e))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},interwiki(){let e=[];return this.sentences().forEach((t=>{e=e.concat(t.interwiki())})),e||[]},text:function(e){e=m(e,ve);let t=this.sentences().map((t=>t.text(e))).join(" ");return this.lists().forEach((e=>{t+="\n"+e.text()})),t},json:function(e){return function(e,t){let i={};return!0===(t=m(t,xe)).sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=m(e,ve))},wikitext:function(){return this.data.wiki}};_e.citations=_e.references,Object.keys(_e).forEach((e=>{je.prototype[e]=_e[e]}));const ze={sentences:"sentence",references:"reference",citations:"citation",lists:"list",images:"image",links:"link"};Object.keys(ze).forEach((e=>{je.prototype[ze[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}}));const Oe=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},Ee=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},Ne=/^[\p{Letter}0-9._/\- '()\t]+=/iu,qe={template:!0,list:!0,prototype:!0},Se=function(e,t){let i=0;return e.reduce(((e,a="")=>{if(a=a.trim(),!0===Ne.test(a)){let t=function(e){let t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();let a=t.slice(1).join("=");return qe.hasOwnProperty(i)&&(i="_"+i),{key:i,val:a.trim()}}(a);if(t.key)return e[t.key]=t.val,e}if(t&&t[i]){e[t[i]]=a}else e.list=e.list||[],e.list.push(a);return i+=1,e}),{})},Ce={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Le=function(e,t){let i=oe(e);return"json"===t?i.json():"raw"===t?i:i.text()},Ae=function(e,t=[],i){let a=function(e){let t=e.split(/\n?\|/);t.forEach(((e,i)=>{null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)})),t=t.filter((e=>null!==e)),t=t.map((e=>(e||"").trim()));for(let e=t.length-1;e>=0;e-=1){""===t[e]&&t.pop();break}return t}(e=Oe(e||"")),n=a.shift(),r=Se(a,t);return r=function(e){return Object.keys(e).forEach((t=>{!0===Ce[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e}(r),r[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((e=>{r[e]="list"!==e?Le(r[e],i):r[e].map((e=>Le(e,i)))})),n&&(r.template=Ee(n)),r};const Pe=new RegExp("("+h.join("|")+"):","i");let De=`(${h.join("|")})`;const Te=new RegExp(De+":(.+?)[\\||\\]]","iu"),Ie=/^\[\[:/,Me={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},Ue=function(e,t){let i=e.wiki,a=function(e){let t=[],i=[];const a=e.split("");let n=0;for(let r=0;r0){let e=0,a=0;for(let t=0;ta&&i.push("]"),t.push(i.join("")),i=[]}}return t}(i);a.forEach((function(a){if(!0===Pe.test(a)){e.images=e.images||[];let n=function(e,t){let i=e.match(Te);if(null===i||!i[2])return null;if(Ie.test(e))return null;let a=`${i[1]}:${i[2]||""}`;if(a){let i={file:a,lang:t._lang,domain:t._domain,wiki:e,pluginData:{}};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");let n=Ae(e),r=n.list||[];return n.alt&&(i.alt=n.alt),r=r.filter((e=>!1===Me.hasOwnProperty(e))),r[r.length-1]&&(i.caption=oe(r[r.length-1])),new j(i)}return null}(a,t);n&&(e.images.push(n),i=i.replace(a,""))}})),e.wiki=i},Re={},Fe=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},Be={lines(){return this.data},links(e){let t=[];if(this.lines().forEach((e=>{t=t.concat(e.links())})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},json(e){return e=m(e,Re),this.lines().map((t=>t.json(e)))},text(){return((e,t)=>e.map((e=>" * "+e.text(t))).join("\n"))(this.data)},wikitext(){return this.wiki||""}};Object.keys(Be).forEach((e=>{Fe.prototype[e]=Be[e]}));const Ke=/^[#*:;|]+/,We=/^\*+[^:,|]{4}/,He=/^ ?#[^:,|]{4}/,Ye=/[\p{Letter}_0-9\]}]/iu,Ze=function(e){return Ke.test(e)||We.test(e)||He.test(e)},Ge=function(e,t){let i=[];for(let a=t;ae&&Ye.test(e))),i=function(e){let t=1;e=e.filter((e=>e));for(let i=0;ie&&e.trim().length>0)),a=a.map((e=>{let i={wiki:e,lists:[],sentences:[],images:[]};return function(e){let t=e.wiki,i=t.split(/\n/g),a=[],n=[];for(let e=0;e0&&(a.push(t),e+=t.length-1)}else n.push(i[e]);e.lists=a.map((e=>new Fe(e,t))),e.wiki=n.join("\n")}(i),Ue(i,t),se(i),new je(i)})),e._wiki=i,e._paragraphs=a},Xe=function(e){let t=0,i=[],a=[];for(let n=e.indexOf("{");-1!==n&&n0?n++:n=e.indexOf("{",n+1)){let r=e[n];if("{"===r&&(t+=1),t>0){if("}"===r&&(t-=1,0===t)){a.push(r);let e=a.join("");a=[],/\{\{/.test(e)&&/\}\}/.test(e)&&i.push(e);continue}if(1===t&&"{"!==r&&"}"!==r){t=0,a=[];continue}a.push(r)}}return i},Qe=function(e){let t=null;return t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1],t&&(t=t.replace(/:.*/,""),t=Ee(t)),t||null},et=/\{\{/,tt=function(e){return{body:e,name:Qe(e),children:[]}},it=function(e){let t=e.body.substr(2);return t=t.replace(/\}\}$/,""),e.children=Xe(t),e.children=e.children.map(tt),0===e.children.length||e.children.forEach((e=>{let t=e.body.substr(2);return et.test(t)?it(e):null})),e},at=function(e){let t=Xe(e);return t=t.map(tt),t=t.map(it),t},nt=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce(((e,t)=>(e[t]=!0,e)),{});var rt={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0};const ot=new RegExp("^(subst.)?("+g.join("|")+")(?=:| |\n|$)","i");g.forEach((e=>{rt[e]=!0}));const st=/^infobox /i,lt=/ infobox$/i,ct=/^year in [A-Z]/i,ut=function(e={}){let t=e.template.match(ot),i=e.template;t&&t[0]&&(i=i.replace(t[0],"")),i=i.trim();let a={template:"infobox",type:i,data:e};return delete a.data.template,delete a.data.list,a};let mt={imdb:"imdb name","imdb episodes":"imdb episode",localday:"currentday",localdayname:"currentdayname",localyear:"currentyear","birth date based on age at death":"birth based on age as of date","bare anchored list":"anchored list",cvt:"convert",cricon:"flagicon",sfrac:"frac",sqrt:"radic","unreferenced section":"unreferenced",redir:"redirect",sisterlinks:"sister project links","main article":"main",by:"baseball year",aldsy:"alds year",nldsy:"nlds year","str rep":"replace",ushr2:"ushr",stn:"station",metrod:"metro",fw:"ferry",rws:"stnlnk",sclass2:"sclass"},pt={date:["byline","dateline"],citation:["cite","source","source-pr","source-science"],"no spam":["email","@","no spam blue"],"lrt station":["lrt","lrts"],"mrt station":["mrt","mrts"],flagcountry:["cr","cr-rt"],trunc:["str left","str crop"],percentage:["pct","percentage"],rnd:["rndfrac","rndnear"],abbr:["tooltip","abbrv","define"],sfn:["sfnref","harvid","harvnb"],"birth date and age":["death date and age","bda"],currentmonth:["localmonth","currentmonthname","currentmonthabbrev"],currency:["monnaie","unité","nombre","nb","iso4217"],coord:["coor","coor title dms","coor title dec","coor dms","coor dm","coor dec"],"columns-list":["cmn","col-list","columnslist","collist"],nihongo:["nihongo2","nihongo3","nihongo-s","nihongo foot"],plainlist:["flatlist","plain list"],"winning percentage":["winpct","winperc"],"collapsible list":["nblist","nonbulleted list","ubl","ublist","ubt","unbullet","unbulleted list","unbulleted","unbulletedlist","vunblist"],"election box begin":["election box begin no change","election box begin no party","election box begin no party no change","election box inline begin","election box inline begin no change"],"election box candidate":["election box candidate for alliance","election box candidate minor party","election box candidate no party link no change","election box candidate with party link","election box candidate with party link coalition 1918","election box candidate with party link no change","election box inline candidate","election box inline candidate no change","election box inline candidate with party link","election box inline candidate with party link no change","election box inline incumbent"],"4teambracket":["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"],start:["end","birth","death","start date","end date","birth date","death date","start date and age","end date and age","dob"],"start-date":["end-date","birth-date","death-date","birth-date and age","birth-date and given age","death-date and age","death-date and given age"],tl:["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","xpd","para","elc","xtag","mli","mlix","url"],done:["resolved mark large","implemented","pimplemented","resolved mark","accepted","agree","approved","checked2","verified","conditional yes","confirmed","confirmed-nc","tallyho","tick","helped","doneu|example","edited2","donetask","unprod","autp","responded","sure","merge done","marked","pass","aye","yes check","y&","yeac","yeag"],xmark:["expired","deleted","not done","not done empty request","not done unclear","not done not likely","stale-small","smallrejected","x mark","nay","no mark","not done-t","fail","n&","x mark-n","xed box","cancelled","deleted-image","already declined","opblocked","user-blocked","notabug","notfixed","won't fix","withdraw","nojoy","unrelated","off-topic talk","nayc","nayg"],checked:["already done","resolved1","check mark-n","checked box"],"station link":["amtk","cta","bts","mnrr","mtams","munis","njts","scax","wmata","rwsa"]};Object.keys(z).forEach((e=>{mt["ipa-"+e]="ipa",mt["ipac-"+e]="ipac"})),Object.keys(pt).forEach((e=>{pt[e].forEach((t=>{mt[t]=e}))}));var dt={"·":"·",dot:"·",middot:"·","•":" • ",",":",","=":"=","1/2":"1⁄2","1/3":"1⁄3","2/3":"2⁄3","1/4":"1⁄4","3/4":"3⁄4","–":"–",ndash:"–","en dash":"–","spaced ndash":" – ","—":"—",mdash:"—",spd:" – ","em dash":"—","number sign":"#","hash-tag":"#",ibeam:"I","&":"&",";":";",ampersand:"&",dagger:"†","double-dagger":"‡",snds:" – ",snd:" – ","^":" ","!":"|","'":"'","\\":" /","`":"`",bracket:"[","[":"[","*":"*",asterisk:"*","long dash":"———",clear:"\n\n","h.":"ḥ",profit:"▲",loss:"▼",gain:"▲",ell:"ℓ","1~":"~","2~":"~~","3~":"~~~","4~":"~~~~","5~":"~~~~~",goldmedal:"🥇",silvermedal:"🥈",bronzemedal:"🥉",done:"✅",xmark:"❌",checked:"✔️","thumbs up":"👍","thumbs down":"👎"};let ht={p1:0,p2:1,p3:2,resize:1,lang:1,"rtl-lang":1,l:2,h:1,sort:1};["defn","lino","finedetail","nobold","noitalic","nocaps","vanchor","rnd","date","taste","monthname","baseball secondary style","nowrap","nobr","big","cquote","pull quote","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code","char","angle bracket","angbr","symb","dabsearch","key press","nowiki","nowiki2","unstrip","UnstripNoWiki","plain text","make code","killmarkers"].forEach((e=>{ht[e]=0}));let gt={};["mv","m/v","gts","hsc","ms","m/s","my","m/y","ps","rms","rv","r/v","sb","ss","s/s","sv","s/v","sy","s/y","tss","ans","hmas","hmbs","bns","hmcs","ccgs","arc","hdms","bae","ens","eml","rfns","fns","hs","sms","smu","gs","icgv","ins","kri","lé","jsub","jds","js","hnlms","hmnzs","nns","hnoms","hmpngs","bap","rps","brp","orp","nrp","nms","rss","sas","hmsas","roks","hswms","htms","tcg","hms","hmt","rfaux","usat","uscgc","usns","usrc","uss","usav"].forEach((e=>{gt[e]=t=>{let{name:i,id:a}=Ae(t,["name","id"]);return a?`[[${e.toUpperCase()} ${i} (${a})]]`:`[[${e.toUpperCase()} ${i}]]`}}));const bt=function(e){if(!e.numerator&&!e.denominator)return null;let t=Number(e.numerator)/Number(e.denominator);return t*=100,Number(e.decimals),parseInt(t,10)},kt=function(e=""){if("number"==typeof e)return e;e=(e=e.replace(/,/g,"")).replace(/−/g,"-");let t=Number(e);return isNaN(t)?e:t},ft=function(e){let t=e.match(/ipac?-(.+)/);return null!==t?!0===z.hasOwnProperty(t[1])?z[t[1]].english_title:t[1]:null},wt=e=>e.charAt(0).toUpperCase()+e.substring(1),yt=function(e){let t=e%10,i=e%100;return 1===t&&11!==i?e+"st":2===t&&12!==i?e+"nd":3===t&&13!==i?e+"rd":e+"th"},$t={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"};var xt={ra:e=>{let t=Ae(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:e=>(Ae(e,["degrees"]).degrees||"")+"°",hms2deg:e=>{let t=Ae(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:e=>{let t=Ae(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},sortname:e=>{let t=Ae(e,["first","last","target","sort"]),i=`${t.first||""} ${t.last||""}`;return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=` (${t.dab})`,t.target&&(t.target+=` (${t.dab})`)),t.target?`[[${t.target}|${i}]]`:`[[${i}]]`)},"first word":e=>{let t=Ae(e,["text"]),i=t.text||"";return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:e=>{let t=Ae(e,["str","len"]);return(t.str||"").substr(0,t.len)},"str mid":e=>{let t=Ae(e,["str","start","end"]),i=parseInt(t.start,10)-1,a=parseInt(t.end,10);return t.str.substr(i,a)},reign:e=>{let t=Ae(e,["start","end"]);return`(r. ${t.start} – ${t.end})`},circa:e=>{let{year:t}=Ae(e,["year"]);return t?`c. ${t}`:"c. "},"decade link":e=>{let{year:t}=Ae(e,["year"]);return`${t}|${t}s`},decade:e=>{let t=Ae(e,["year"]),i=Number(t.year);return i=10*Math.floor(i/10),`${i}s`},century:e=>{let t=Ae(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/100)+1,`${i}`},radic:e=>{let t=Ae(e,["after","before"]);return`${t.before||""}√${t.after||""}`},"medical cases chart/row":e=>e,oldstyledate:e=>{let t=Ae(e,["date","year"]);return t.year?t.date+" "+t.year:t.date},braces:e=>{let t=Ae(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},hlist:e=>{let t=Ae(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:e=>(Ae(e).list||[]).join(", "),catlist:e=>(Ae(e).list||[]).join(", "),"br separated entries":e=>(Ae(e).list||[]).join("\n\n"),"comma separated entries":e=>(Ae(e).list||[]).join(", "),"anchored list":e=>{let t=Ae(e).list||[];return t=t.map(((e,t)=>`${t+1}. ${e}`)),t.join("\n\n")},"bulleted list":e=>{let t=Ae(e).list||[];return t=t.filter((e=>e)),t=t.map((e=>"• "+e)),t.join("\n\n")},plainlist:e=>{let t=(e=Oe(e)).split("|").slice(1);return t=t.join("|").split(/\n ?\* ?/),t=t.filter((e=>e)),t.join("\n\n")},term:e=>`${Ae(e,["term"]).term}:`,linum:e=>{let{num:t,text:i}=Ae(e,["num","text"]);return`${t}. ${i}`},"block indent":e=>{let t=Ae(e);return t[1]?"\n"+t[1]+"\n":""},lbs:e=>{let t=Ae(e,["text"]);return`[[${t.text} Lifeboat Station|${t.text}]]`},lbc:e=>{let t=Ae(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}-class]]`},lbb:e=>{let t=Ae(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}]]`},"#dateformat":e=>(e=e.replace(/:/,"|"),Ae(e,["date","format"]).date),lc:e=>(e=e.replace(/:/,"|"),(Ae(e,["text"]).text||"").toLowerCase()),uc:e=>(e=e.replace(/:/,"|"),(Ae(e,["text"]).text||"").toUpperCase()),lcfirst:e=>{e=e.replace(/:/,"|");let t=Ae(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},ucfirst:e=>{e=e.replace(/:/,"|");let t=Ae(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:e=>{e=e.replace(/:/,"|");let t=Ae(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:e=>{e=e.replace(/:/,"|");let t=Ae(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbrlink:e=>{let t=Ae(e,["abbr","page"]);return t.page?`[[${t.page}|${t.abbr}]]`:`[[${t.abbr}]]`},own:e=>{let t=Ae(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},formatnum:e=>{e=e.replace(/:/,"|");let t=Ae(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},frac:e=>{let t=Ae(e,["a","b","c"]);return t.c?`${t.a} ${t.b}/${t.c}`:t.b?`${t.a}/${t.b}`:`1/${t.b}`},convert:e=>{let t=Ae(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?`${t.num} ${t.two} ${t.three} ${t.four}`:`${t.num} ${t.two} ${t.three}`:`${t.num} ${t.two}`},tl:e=>{let t=Ae(e,["first","second"]);return t.second||t.first},won:e=>{let t=Ae(e,["text"]);return t.place||t.text||wt(t.template)},tag:e=>{let t=Ae(e,["tag","open"]);const i={span:!0,div:!0,p:!0};return t.open&&"pair"!==t.open?"":i[t.tag]?t.content||"":`<${t.tag} ${t.attribs||""}>${t.content||""}`},plural:e=>{e=e.replace(/plural:/,"plural|");let t=Ae(e,["num","word"]),i=Number(t.num),a=t.word;return 1!==i&&(/.y$/.test(a)?a=a.replace(/y$/,"ies"):a+="s"),i+" "+a},dec:e=>{let t=Ae(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:e=>{let t=Ae(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());let a=i||"";return t.p&&(a=t.p+a),t.s&&(a=t.s+a),(t.u||t.ul||t.upl)&&(a=a+" "+(t.u||t.ul||t.upl)),a},percentage:e=>{let t=Ae(e,["numerator","denominator","decimals"]),i=bt(t);return null===i?"":i+"%"},small:e=>{let t=Ae(e);return t.list&&t.list[0]?t.list[0]:""},"percent-done":e=>{let t=Ae(e,["done","total","digits"]),i=bt({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":`${t.done} (${i}%) done`},loop:e=>{let t=Ae(e,["times","text"]),i=Number(t.times)||0,a="";for(let e=0;e{let t=Ae(e,["text"]);return String((t.text||"").trim().length)},digits:e=>(Ae(e,["text"]).text||"").replace(/[^0-9]/g,""),"last word":e=>{let t=(Ae(e,["text"]).text||"").split(/ /g);return t[t.length-1]||""},replace:e=>{let t=Ae(e,["text","from","to"]);return t.from&&t.to?(t.text||"").replace(t.from,t.to):t.text||""},"title case":e=>(Ae(e,["text"]).text||"").split(/ /).map(((e,t)=>t>0&&"the"===e||"of"===e?e:wt(e))).join(" "),"no spam":e=>{let t=Ae(e,["account","domain"]);return`${t.account||""}@${t.domain}`},"baseball year":e=>{let t=Ae(e,["year"]).year||"";return`[[${t} in baseball|${t}]]`},"mlb year":e=>{let t=Ae(e,["year"]).year||"";return`[[${t} Major League Baseball season|${t}]]`},"nlds year":e=>{let{year:t}=Ae(e,["year"]);return`[[${t||""} National League Division Series|${t}]]`},"alds year":e=>{let{year:t}=Ae(e,["year"]);return`[[${t||""} American League Division Series|${t}]]`},"nfl year":e=>{let{year:t,other:i}=Ae(e,["year","other"]);return i&&t?`[[${t} NFL season|${t}]]–[[${i} NFL season|${i}]]`:`[[${t||""} NFL season|${t}]]`},"nfl playoff year":e=>{let{year:t}=Ae(e,["year"]);return t=Number(t),`[[${t}–${t+1} NFL playoffs|${t}]]`},"nba year":e=>{let{year:t}=Ae(e,["year"]);t=Number(t);let i=t+1;return`[[${t}–${i} NBA season|${t}–${i}]]`},"mhl year":e=>{let t=Ae(e,["year"]),i=Number(t.year),a=i+1;return`[[${i}–${a} NHL season|${i}–${a}]]`},min:e=>{let t=Ae(e).list||[],i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t{let t=Ae(e).list,i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t>i&&(i=t)})),String(i)},uspolabbr:e=>{let{party:t,state:i,house:a}=Ae(e,["party","state","house","link"]);if(!t||!i)return"";let n=`${t}‑${i}`;return a&&(n+=` ${yt(a)}`),n},ushr:e=>{let{state:t,num:i,type:a}=Ae(e,["state","num","type"]),n="";if("AL"!==i)return i=yt(Number(i)),`${t}'s ${i} congressional district`;if(n=`${t}'s at-large congressional district`,a){if(a=a.toLowerCase(),i="AL"===i?"At-large":i,"e"===a)return`[[${n}|${i}]]`;if("u"===a)return`[[${n}|${t}]]`;if("b"===a||"x"===a)return`[[${n}|${t} ${i}]]`}return`[[${n}]]`},metro:e=>{let{name:t,dab:i}=Ae(e,["name","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},station:e=>{let{name:t,dab:i}=Ae(e,["name","x","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},bssrws:e=>{let{one:t,two:i}=Ae(e,["one","two"]),a=t;return i&&(a+=" "+i),`[[${a} railway station|${a}]]`},stnlnk:e=>{let{name:t,dab:i}=Ae(e,["name","dab"]);return i?`[[${t} railway station (${i})|${t}]]`:`[[${t} railway station|${t}]]`},"station link":e=>{let{station:t,system:i}=Ae(e,["system","station"]);return t||i},"line link":e=>{let{station:t,system:i}=Ae(e,["system","station"]);return t||i},subway:e=>{let{name:t}=Ae(e,["name"]);return`[[${t} subway station|${t}]]`},"lrt station":e=>{let{name:t}=Ae(e,["name"]);return`[[${t} LRT station|${t}]]`},"mrt station":e=>{let{name:t}=Ae(e,["name"]);return`[[${t} MRT station|${t}]]`},rht:e=>{let{name:t}=Ae(e,["name"]);return`[[${t} railway halt|${t}]]`},ferry:e=>{let{name:t}=Ae(e,["name"]);return`[[${t} ferry wharf|${t}]]`},tram:e=>{let{name:t,dab:i}=Ae(e,["name","dab"]);return i?`[[${t} tram stop (${i})|${t}]]`:`[[${t} tram stop|${t}]]`},tstop:e=>{let{name:t,dab:i}=Ae(e,["name","dab"]);return i?`[[${t} ${i} stop|${t}]]`:`[[${t} stop|${t}]]`},ship:e=>{let{prefix:t,name:i,id:a}=Ae(e,["prefix","name","id"]);return t=t||"",`[[${t.toUpperCase()} ${i}]]`},sclass:e=>{let{cl:t,type:i}=Ae(e,["cl","type","fmt"]);return`[[${t}-class ${i} |''${t}''-class]] [[${i}]]`},"in title":e=>{let{title:t,text:i}=Ae(e,["title","text"]);return i||(t?`All pages with titles containing ${t}`:"")},"look from":e=>{let{title:t,text:i}=Ae(e,["title","text"]);return i||(t?`All pages with titles beginning with ${t}`:"")}};let vt={};["sr-latn-cyrl","sr-cyrl-latn","sr-latn","sr-cyrl","sr-cyr","sh-latn-cyrl","sh-cyrl-latn","sh-latn","sh-cyrl","cel-1bd","cel-x-proto","en-emodeng","de-at","de-ch","gem-x-proto","gsw-fr","nds-nl","nl-be","ku-arab","ku-cyrl","pt-br","fra-frc","fra-que","roa-leo","roa-nor","ca-valencia","ast-leo","grc-gre","grc-x-doric","grc-x-proto","grc-x-medieval","cpg","gmy","grc","grk-x-proto","pnt","mga","owl","pgl","sga","wlm","xbm","xcb","xcg","xpi","aae","aln","sq-definite","bs-cyrl","hsb","ltg","orv","prg","rsk","rue","rus","sgs","sla","szl","wen","aoa","chn","cri","dlm","egl","fax","frc","frm","fro","fr-gallo","oc-gascon","gcf","gcr","ist","la-x-medieval","lij-mc","lld","lou","mfe","mol","mwl","mxi","nrf","osc","osp","pcd","pln","rcf","rgn","roa","ruo","rup","ruq","sdc","sdn","src","sro","xvo","bzj","cim","dum","enm","frk","frr","frs","gmh","gml","gmw","goh","gos","gsw","gyn","icr","jam","kri","lng","nb","non","nrn","odt","ofs","osx","pey","sli","srm","srn","stq","swg","vmf","wae","wep","wes","zea","hmd","hoc","kha","mnw","mtq","vi-chunom","vi-hantu","mvi","rys","ryu","yoi","ace","akl","ami","bew","bik","bjn","bya","cal","cbk","cjm","coa","cyo","dev","fil","gad","hil","iba","ibg","ibl","ilp","itv","ivv","jax","kne","krj","kxd","ljp","mad","mak","mdh","mrv","mrw","ms-arab","nia","niu","pau","pwn","rap","rar","sgd","su-fonts","szy","tao","tkl","tsg","tvl","uli","wls","xsb","yap","yka","ckt","itl","brh","oty","tcy","abq","ady","ddo","inh","kbd","lbe","lez","rut","tab","uby","udi","bai","bin","bsq","dag","dyu","efi","fan","fmp","fuc","fuf","gaa","ibb","kbp","kcg","kpo","ktu","lu","lua","lun","mkw","mos","oaa","sjo","ude","anm","bft","blk","brx","dng","kjp","kjz","ksw","lbj","lus","aae","aaq","abe","abq","aca","ace","acf","acm","acw","ady","ae","aeb","aec","aer","afb","aht","aii","aij","ain","aiq","akk","akl","akz","ale","aln","alq","alt","ami","anm","aoa","apj","apm","apw","ayn","arb","arh","ari","arn","arp","arq","ary","arz","asb","ath","ats","awa","axm","azb","azd","azj","bai","bal","ban","bax","bdz","bea","ber","bew","bft","bgn","bho","bik","bin","bjn","bla","blc","blk","bqi","brh","brx","bsk","bsq","bua","bvb","bya","bzj","cal","cay","cbk","ccp","chg","chm","chn","chp","cic","cim","ciw","cjm","cjs","ckb","ckt","cku","cld","clm","cmg","cmn","cms","cnu","coa","coc","coj","com","coo","cop","cpg","crg","crh","cri","crj","crk","crl","crm","cro","csw","csz","ctg","ctm","cyo","dag","dak","ddo","deh","del","den","dev","din","dlm","dng","dum","dyu","efi","egl","egy","elx","eml","ems","cmn","och","yue","mjw","mni","my-name-mlcts","nan","nwc","omp","otb","pwo","sip","xct","xsr","1ca","alt","az-arab","azb","azj","chg","cjs","crh","crh3","kaa","kjh","krc","kum","nog","ota","otk","sah","slr","sty","tt-arab","tt-cyrl","tt-latn","tyv","uniturk","chm","est-sea","fit","fkv","izh","jmy","koi","krl","liv","mdf","mhr","mrj","myv","olo","sia","sjd","sje","sjk","sjt","sju","sma","smi","smj","smn","sms","vep","vot","vro","yrk","din","luo","srr","sus","swh","umb","yao"].forEach((e=>{vt["lang-"+e]=0})),Object.keys(z).forEach((e=>{vt["lang-"+e]=0}));var jt=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","us","united states"],["🇺🇸","usa","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]];const _t=["flag","variant"];let zt={flag:e=>{let t=Ae(e,_t),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();let a=jt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${a[0]||""} [[${a[2]}|${i}]]`},flagcountry:e=>{let t=Ae(e,_t);t.flag=(t.flag||"").toLowerCase();let i=jt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} [[${i[2]}]]`},flagcu:e=>{let t=Ae(e,_t);t.flag=(t.flag||"").toLowerCase();let i=jt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} ${i[2]}`},flagicon:e=>{let t=Ae(e,_t);t.flag=(t.flag||"").toLowerCase();let i=jt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`[[${i[2]}|${i[0]}]]`:""},flagdeco:e=>{let t=Ae(e,_t);return t.flag=(t.flag||"").toLowerCase(),(jt.find((e=>t.flag===e[1]||t.flag===e[2]))||[])[0]||""},fb:e=>{let t=Ae(e,_t);t.flag=(t.flag||"").toLowerCase();let i=jt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${i[2]} national football team|${i[2]}]]`:""},fbicon:e=>{let t=Ae(e,_t);t.flag=(t.flag||"").toLowerCase();let i=jt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?` [[${i[2]} national football team|${i[0]}]]`:""},flagathlete:e=>{let t=Ae(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=jt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${t.name||""}]] (${i[1].toUpperCase()})`:`[[${t.name||""}]]`}};jt.forEach((e=>{zt[e[1]]=()=>e[0]}));let Ot={};["rh","rh2","yes","no","maybe","eliminated","lost","safe","active","site active","coming soon","good","won","nom","sho","longlisted","tba","success","operational","failure","partial","regional","maybecheck","partial success","partial failure","okay","yes-no","some","nonpartisan","pending","unofficial","unofficial2","usually","rarely","sometimes","any","varies","black","non-album single","unreleased","unknown","perhaps","depends","included","dropped","terminated","beta","table-experimental","free","proprietary","nonfree","needs","nightly","release-candidate","planned","scheduled","incorrect","no result","cmain","calso starring","crecurring","cguest","not yet","optional"].forEach((e=>{Ot[e]=e=>{let t=Ae(e,["text"]);return t.text||wt(t.template)}}));[["active fire","Active"],["site active","Active"],["site inactive","Inactive"],["yes2",""],["no2",""],["ya","✅"],["na","❌"],["nom","Nominated"],["sho","Shortlisted"],["tba","TBA"],["maybecheck","✔️"],["okay","Neutral"],["n/a","N/A"],["sdash","—"],["dunno","?"],["draw",""],["cnone",""],["nocontest",""]].forEach((e=>{Ot[e[0]]=t=>Ae(t,["text"]).text||e[1]}));var Et=Object.assign({},dt,ht,gt,xt,vt,zt,Ot);let Nt={};["goodreads author","twitter","facebook","instagram","tumblr","pinterest","espn nfl","espn nhl","espn fc","hockeydb","fifa player","worldcat","worldcat id","nfl player","ted speaker","playmate"].forEach((e=>{Nt[e]=["id","name"]}));let qt={};["imdb title","imdb name","imdb episode","imdb event","afi film","allmovie title","allgame","tcmdb title","discogs artist","discogs label","discogs release","discogs master","librivox author","musicbrainz artist","musicbrainz label","musicbrainz recording","musicbrainz release","musicbrainz work","youtube","goodreads book","dmoz"].forEach((e=>{qt[e]=["id","title","description","section"]}));var St={ipa:(e,t)=>{let i=Ae(e,["transcription","lang","audio"]);return i.lang=ft(i.template),i.template="ipa",t.push(i),""},ipac:(e,t)=>{let i=Ae(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=ft(i.template),i.template="ipac",t.push(i),""},quote:(e,t)=>{let i=Ae(e,["text","author"]);if(t.push(i),i.text){let e=`"${i.text}"`;return i.author&&(e+="\n\n",e+=` - ${i.author}`),e+"\n"}return""},"cite gnis":(e,t)=>{let i=Ae(e,["id","name","type"]);return i.type="gnis",i.template="citation",t.push(i),""},"spoken wikipedia":(e,t)=>{let i=Ae(e,["file","date"]);return i.template="audio",t.push(i),""},yel:(e,t)=>{let i=Ae(e,["min"]);return t.push(i),i.min?`yellow: ${i.min||""}'`:""},subon:(e,t)=>{let i=Ae(e,["min"]);return t.push(i),i.min?`sub on: ${i.min||""}'`:""},suboff:(e,t)=>{let i=Ae(e,["min"]);return t.push(i),i.min?`sub off: ${i.min||""}'`:""},sfn:(e,t,i,a)=>{let n=Ae(e,["author","year","location"]);return a&&(n.name=n.template,n.teplate=a),t.push(n),""},redirect:(e,t)=>{let i=Ae(e,["redirect"]),a=i.list||[],n=[];for(let e=0;e{let i=Ae(e),a={};Object.keys($t).forEach((e=>{!0===i.hasOwnProperty(e)&&(a[$t[e]]=i[e])}));let n={template:"sister project links",links:a};return t.push(n),""},"subject bar":(e,t)=>{let i=Ae(e);Object.keys(i).forEach((e=>{$t.hasOwnProperty(e)&&(i[$t[e]]=i[e],delete i[e])}));let a={template:"subject bar",links:i};return t.push(a),""},gallery:(e,t)=>{let i=Ae(e),a=(i.list||[]).filter((e=>/^ *File ?:/.test(e)));return a=a.map((e=>new j({file:e}).json())),i={template:"gallery",images:a},t.push(i),""},sky:(e,t)=>{let i=Ae(e,["asc_hours","asc_minutes","asc_seconds","dec_sign","dec_degrees","dec_minutes","dec_seconds","distance"]),a={template:"sky",ascension:{hours:i.asc_hours,minutes:i.asc_minutes,seconds:i.asc_seconds},declination:{sign:i.dec_sign,degrees:i.dec_degrees,minutes:i.dec_minutes,seconds:i.dec_seconds},distance:i.distance};return t.push(a),""},"medical cases chart":(e,t)=>{let i=["date","deathsExpr","recoveriesExpr","casesExpr","4thExpr","5thExpr","col1","col1Change","col2","col2Change"],a=Ae(e);a.data=a.data||"";let n=a.data.split("\n").map((e=>{let t=e.split(";"),a={options:new Map},n=0;for(let e=0;e{let i=Ae(e);i.x&&(i.x=i.x.split(",").map((e=>e.trim()))),i.y&&(i.y=i.y.split(",").map((e=>e.trim())));let a=1;for(;i["y"+a];)i["y"+a]=i["y"+a].split(",").map((e=>e.trim())),a+=1;return t.push(i),""},"historical populations":(e,t)=>{let i=Ae(e);i.list=i.list||[];let a=[];for(let e=0;e{const i=/^jan /i,a=/^year /i;let n=Ae(e);const r=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];let o={},s=Object.keys(n).filter((e=>i.test(e)));s=s.map((e=>e.replace(i,""))),s.forEach((e=>{o[e]=[],r.forEach((t=>{let i=`${t} ${e}`;if(n.hasOwnProperty(i)){let t=kt(n[i]);delete n[i],o[e].push(t)}}))})),n.byMonth=o;let l={};return Object.keys(n).forEach((e=>{if(a.test(e)){let t=e.replace(a,"");l[t]=n[e],delete n[e]}})),n.byYear=l,t.push(n),""},"weather box/concise c":(e,t)=>{let i=Ae(e);return i.list=i.list.map((e=>kt(e))),i.byMonth={"high c":i.list.slice(0,12),"low c":i.list.slice(12,24),"rain mm":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"weather box/concise f":(e,t)=>{let i=Ae(e);return i.list=i.list.map((e=>kt(e))),i.byMonth={"high f":i.list.slice(0,12),"low f":i.list.slice(12,24),"rain inch":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"climate chart":(e,t)=>{let i=Ae(e).list||[],a=i[0],n=i[38];i=i.slice(1),i=i.map((e=>(e&&"−"===e[0]&&(e=e.replace(/−/,"-")),e)));let r=[];for(let e=0;e<36;e+=3)r.push({low:kt(i[e]),high:kt(i[e+1]),precip:kt(i[e+2])});let o={template:"climate chart",data:{title:a,source:n,months:r}};return t.push(o),""},medalcount:(e,t)=>{let i=Ae(e).list||[],a=[];for(let e=0;e{let i=Ae(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},legend:(e,t)=>{let i=Ae(e,["color","label"]);return t.push(i),e},isbn:(e,t)=>{let i=Ae(e,["id","id2","id3"]);return t.push(i),"ISBN "+(i.id||"")},"based on":(e,t)=>{let i=Ae(e,["title","author"]);return t.push(i),`${i.title} by ${i.author||""}`},"bbl to t":(e,t)=>{let i=Ae(e,["barrels"]);return t.push(i),"0"===i.barrels?i.barrels+" barrel":i.barrels+" barrels"},mpc:(e,t)=>{let i=Ae(e,["number","text"]);return t.push(i),`[https://minorplanetcenter.net/db_search/show_object?object_id=P/2011+NO1 ${i.text||i.number}]`},pengoal:(e,t)=>(t.push({template:"pengoal"}),"✅"),penmiss:(e,t)=>(t.push({template:"penmiss"}),"❌"),"ordered list":(e,t)=>{let i=Ae(e);return t.push(i),i.list=i.list||[],i.list.map(((e,t)=>`${t+1}. ${e}`)).join("\n\n")},"title year":(e,t,i,a,n)=>{let r=Ae(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b[0-9]{4}\b/);if(e)return e[0]}return r.nomatch||""},"title century":(e,t,i,a,n)=>{let r=Ae(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)(st|nd|rd|th)\b/);if(e)return e[1]||""}return r.nomatch||""},"title decade":(e,t,i,a,n)=>{let r=Ae(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)s\b/);if(e)return e[1]||""}return r.nomatch||""},nihongo:(e,t)=>{let i=Ae(e,["english","kanji","romaji","extra"]);t.push(i);let a=i.english||i.romaji||"";return i.kanji&&(a+=` (${i.kanji})`),a},marriage:(e,t)=>{let i=Ae(e,["spouse","from","to","end"]);t.push(i);let a=i.spouse||"";return i.from&&(i.to?a+=` (m. ${i.from}-${i.to})`:a+=` (m. ${i.from})`),a},"sent off":(e,t)=>{let i=Ae(e,["cards"]),a={template:"sent off",cards:i.cards,minutes:i.list||[]};return t.push(a),"sent off: "+a.minutes.map((e=>e+"'")).join(", ")},transl:(e,t)=>{let i=Ae(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""},"collapsible list":(e,t)=>{let i=Ae(e);t.push(i);let a="";if(i.title&&(a+=`'''${i.title}'''\n\n`),!i.list){i.list=[];for(let e=1;e<10;e+=1)i[e]&&(i.list.push(i[e]),delete i[e])}return i.list=i.list.filter((e=>e)),a+=i.list.join("\n\n"),a},"columns-list":(e,t)=>{let i=((Ae(e).list||[])[0]||"").split(/\n/).filter((e=>e));return i=i.map((e=>e.replace(/\*/,""))),t.push({template:"columns-list",list:i}),i=i.map((e=>"• "+e)),i.join("\n\n")},height:(e,t)=>{let i=Ae(e);t.push(i);let a=[];return["m","cm","ft","in"].forEach((e=>{!0===i.hasOwnProperty(e)&&a.push(i[e]+e)})),a.join(" ")},sic:(e,t)=>{let i=Ae(e,["one","two","three"]),a=(i.one||"")+(i.two||"");return"?"===i.one&&(a=(i.two||"")+(i.three||"")),t.push({template:"sic",word:a}),"y"===i.nolink?a:`${a} [sic]`},inrconvert:(e,t)=>{let i=Ae(e,["rupee_value","currency_formatting"]);t.push(i);const a={k:1e3,m:1e6,b:1e9,t:1e12,l:1e5,c:1e7,lc:1e12};if(i.currency_formatting){let e=a[i.currency_formatting]||1;i.rupee_value=i.rupee_value*e}return`inr ${i.rupee_value||""}`},frac:(e,t)=>{let i=Ae(e,["a","b","c"]),a={template:"sfrac"};return i.c?(a.integer=i.a,a.numerator=i.b,a.denominator=i.c):i.b?(a.numerator=i.a,a.denominator=i.b):(a.numerator=1,a.denominator=i.a),t.push(a),a.integer?`${a.integer} ${a.numerator}⁄${a.denominator}`:`${a.numerator}⁄${a.denominator}`},"winning percentage":(e,t)=>{let i=Ae(e,["wins","losses","ties"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=Number(i.ties)||0,o=a+n+r;"y"===i.ignore_ties&&(r=0),r&&(a+=r/2);let s=bt({numerator:a,denominator:o,decimals:1});return null===s?"":"."+10*s},winlosspct:(e,t)=>{let i=Ae(e,["wins","losses"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=bt({numerator:a,denominator:a+n,decimals:1});return null===r?"":`${a||0} || ${n||0} || ${"."+10*r||"-"}`},"video game release":(e,t)=>{let i=["region","date","region2","date2","region3","date3","region4","date4"],a=Ae(e,i),n={template:"video game release",releases:[]};for(let e=0;e`${e.region}: ${e.date||""}`)).join("\n\n")+"\n"},uss:(e,t)=>{let i=Ae(e,["name","id"]);return t.push(i),i.id?`[[USS ${i.name} (${i.id})|USS ''${i.name}'' (${i.id})]]`:`[[USS ${i.name}|USS ''${i.name}'']]`},blockquote:(e,t)=>{let i=Ae(e,["text","author","title","source","character"]);t.push(i);let a=i.text;a||(i.list=i.list||[],a=i.list[0]||"");let n=a.replace(/"/g,"'");return n='"'+n+'"',n}};const Dt={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},Tt=(e,t)=>{let i=Ae(e,["amount","code"]);t.push(i);let a=i.template||"";"currency"===a?(a=i.code,a||(i.code=a="usd")):""!==a&&"monnaie"!==a&&"unité"!==a&&"nombre"!==a&&"nb"!==a||(a=i.code),a=(a||"").toLowerCase(),"us"===a?i.code=a="usd":"uk"===a&&(i.code=a="gbp");let n=`${Dt[a]||""}${i.amount||""}`;return i.code&&!Dt[i.code.toLowerCase()]&&(n+=" "+i.code),n};let It={currency:Tt};Object.keys(Dt).forEach((e=>{It[e]=Tt}));const Mt=864e5,Ut=function(e){return new Date(`${e.year}-${e.month||0}-${e.date||1}`).getTime()},Rt=function(e,t){e=Ut(e);let i=(t=Ut(t))-e,a={},n=Math.floor(i/31536e6);n>0&&(a.years=n,i-=31536e6*a.years);let r=Math.floor(i/2592e6);r>0&&(a.months=r,i-=2592e6*a.months);let o=Math.floor(i/Mt);return o>0&&(a.days=o),a},Ft=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Bt=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],Kt=Bt.reduce(((e,t,i)=>(0===i||(e[t.toLowerCase()]=i,e[t.substring(0,3).toLowerCase()]=i),e)),{}),Wt=function(e){let t={},i=["year","month","date","hour","minute","second"];for(let a=0;a{let i=Ae(e,["year","month","date","hour","minute","second","timezone"]),a=Wt([i.year,i.month,i.date||i.day]);return i.text=Yt(a),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=` (${i.timezone})`),i.hour&&i.minute&&(i.second?i.text=`${i.hour}:${i.minute}:${i.second}, `+i.text:i.text=`${i.hour}:${i.minute}, `+i.text),i.text&&t.push(Zt(i)),i.text},natural_date:(e,t)=>{let i=Ae(e,["text"]).text||"",a={};if(/^[0-9]{4}$/.test(i))a.year=parseInt(i,10);else{let e=i.replace(/[a-z]+\/[a-z]+/i,"");e=e.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");let t=new Date(e);!1===isNaN(t.getTime())&&(a.year=t.getFullYear(),a.month=t.getMonth()+1,a.date=t.getDate())}return t.push(Zt(a)),i.trim()},one_year:(e,t)=>{let i=Ae(e,["year"]),a=Number(i.year);return t.push(Zt({year:a})),String(a)},two_dates:(e,t)=>{let i=Ae(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){let e=Wt([i.birth_year,i.birth_month,i.birth_date]);return t.push(Zt(e)),Yt(e)}let a=Wt([i.death_year,i.death_month,i.death_date]);return t.push(Zt(a)),Yt(a)},age:e=>{let t=Gt(e);return Rt(t.from,t.to).years||0},"diff-y":e=>{let t=Gt(e),i=Rt(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":e=>{let t=Gt(e),i=Rt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),a.join(", ")},"diff-ymd":e=>{let t=Gt(e),i=Rt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-yd":e=>{let t=Gt(e),i=Rt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-d":e=>{let t=Gt(e),i=Rt(t.from,t.to),a=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")}},Jt=["January","February","March","April","May","June","July","August","September","October","November","December"];var Xt={currentday:()=>{let e=new Date;return String(e.getDate())},currentdayname:()=>{let e=new Date;return Ft[e.getDay()]},currentmonth:()=>{let e=new Date;return Jt[e.getMonth()]},currentyear:()=>{let e=new Date;return String(e.getFullYear())},monthyear:()=>{let e=new Date;return Jt[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":()=>{let e=new Date;return e.setMonth(e.getMonth()-1),Jt[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":()=>{let e=new Date;return e.setMonth(e.getMonth()+1),Jt[e.getMonth()]+" "+e.getFullYear()},year:e=>{let t=Ae(e,["date"]).date,i=new Date(t);return t&&!1===isNaN(i.getTime())?String(i.getFullYear()):""},"time ago":e=>function(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let i=(new Date).getTime()-t.getTime(),a="ago";i<0&&(a="from now",i=Math.abs(i));let n=i/1e3/60/60/24;return n<365?Number(n)+" days "+a:Number(n/365)+" years "+a}(Ae(e,["date","fmt"]).date),"birth date and age":(e,t)=>{let i=Ae(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?Vt.natural_date(e,t):(t.push(i),i=Wt([i.year,i.month,i.day]),Yt(i))},"birth year and age":(e,t)=>{let i=Ae(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return Vt.natural_date(e,t);t.push(i);let a=(new Date).getFullYear()-parseInt(i.birth_year,10);i=Wt([i.birth_year,i.birth_month]);let n=Yt(i);return a&&(n+=` (age ${a})`),n},"death year and age":(e,t)=>{let i=Ae(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?Vt.natural_date(e,t):(t.push(i),i=Wt([i.death_year,i.death_month]),Yt(i))},"birth date and age2":(e,t)=>{let i=Ae(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=Wt([i.birth_year,i.birth_month,i.birth_day]),Yt(i)},"birth based on age as of date":(e,t)=>{let i=Ae(e,["age","year","month","day"]);t.push(i);let a=parseInt(i.age,10),n=parseInt(i.year,10)-a;return n&&a?`${n} (age ${i.age})`:`(age ${i.age})`},"death date and given age":(e,t)=>{let i=Ae(e,["year","month","day","age"]);t.push(i),i=Wt([i.year,i.month,i.day]);let a=Yt(i);return i.age&&(a+=` (age ${i.age})`),a},dts:e=>{e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");let t=Ae(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},time:()=>{let e=new Date,t=Wt([e.getFullYear(),e.getMonth(),e.getDate()]);return Yt(t)},millennium:e=>{let t=Ae(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/1e3)+1,t.abbr&&"y"===t.abbr?i<0?`${yt(Math.abs(i))} BC`:`${yt(i)}`:`${yt(i)} millennium`},start:Vt.date,"start-date":Vt.natural_date,birthdeathage:Vt.two_dates,age:Vt.age,"age nts":Vt.age,"age in years":Vt["diff-y"],"age in years and months":Vt["diff-ym"],"age in years, months and days":Vt["diff-ymd"],"age in years and days":Vt["diff-yd"],"age in days":Vt["diff-d"]};function Qt(e){let t=e.pop(),i=Number(e[0]||0),a=Number(e[1]||0),n=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;let r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+a/60+n/3600)}const ei=function(e){if("number"!=typeof e)return e;let t=1e5;return Math.round(e*t)/t},ti={s:!0,w:!0},ii=function(e){let t=Ae(e);t=function(e){return e.list=e.list||[],e.list=e.list.map((t=>{let i=Number(t);if(!isNaN(i))return i;let a=t.split(/:/);return a.length>1?(e.props=e.props||{},e.props[a[0]]=a.slice(1).join(":"),null):t})),e.list=e.list.filter((e=>null!==e)),e}(t);let i=function(e){const t=e.map((e=>typeof e)).join("|");return 2===e.length&&"number|number"===t?{lat:e[0],lon:e[1]}:4===e.length&&"number|string|number|string"===t?(ti[e[1].toLowerCase()]&&(e[0]*=-1),"w"===e[3].toLowerCase()&&(e[2]*=-1),{lat:e[0],lon:e[2]}):6===e.length?{lat:Qt(e.slice(0,3)),lon:Qt(e.slice(3))}:8===e.length?{lat:Qt(e.slice(0,4)),lon:Qt(e.slice(4))}:{}}(t.list);return t.lat=ei(i.lat),t.lon=ei(i.lon),t.template="coord",delete t.list,t},ai={coord:(e,t)=>{let i=ii(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":`${i.lat||""}°N, ${i.lon||""}°W`}},ni=function(e,t,i,a){let n=Ae(e);return a&&(n.name=n.template,n.template=a),t.push(n),""},ri={persondata:ni,taxobox:ni,citation:ni,portal:ni,reflist:ni,"cite book":ni,"cite journal":ni,"cite web":ni,"commons cat":ni,"election box candidate":ni,"election box begin":ni,main:ni},oi={adx:"adx",aim:"aim",amex:"amex",asx:"asx",athex:"athex",b3:"b3","B3 (stock exchange)":"B3 (stock exchange)",barbadosse:"barbadosse",bbv:"bbv",bcba:"bcba",bcs:"bcs",bhse:"bhse",bist:"bist",bit:"bit","bm&f bovespa":"b3","bm&f":"b3",bmad:"bmad",bmv:"bmv","bombay stock exchange":"bombay stock exchange","botswana stock exchange":"botswana stock exchange",bpse:"bpse",bse:"bse",bsx:"bsx",bvb:"bvb",bvc:"bvc",bvl:"bvl",bvpasa:"bvpasa",bwse:"bwse","canadian securities exchange":"canadian securities exchange",cse:"cse",darse:"darse",dfm:"dfm",dse:"dse",euronext:"euronext",euronextparis:"euronextparis",fse:"fse",fwb:"fwb",gse:"gse",gtsm:"gtsm",idx:"idx",ise:"ise",iseq:"iseq",isin:"isin",jasdaq:"jasdaq",jse:"jse",kase:"kase",kn:"kn",krx:"krx",lse:"lse",luxse:"luxse","malta stock exchange":"malta stock exchange",mai:"mai",mcx:"mcx",mutf:"mutf",myx:"myx",nag:"nag","nasdaq dubai":"nasdaq dubai",nasdaq:"nasdaq",neeq:"neeq",nepse:"nepse",nex:"nex",nse:"nse",newconnect:"newconnect","nyse arca":"nyse arca",nyse:"nyse",nzx:"nzx","omx baltic":"omx baltic",omx:"omx",ose:"ose","otc expert":"otc expert","otc grey":"otc grey","otc pink":"otc pink",otcqb:"otcqb",otcqx:"otcqx","pfts ukraine stock exchange":"pfts ukraine stock exchange","philippine stock exchange":"philippine stock exchange",prse:"prse",psx:"psx",karse:"karse",qe:"qe","saudi stock exchange":"saudi stock exchange",sehk:"sehk","Stock Exchange of Thailand":"Stock Exchange of Thailand",set:"set",sgx:"sgx",sse:"sse",swx:"swx",szse:"szse",tase:"tase","tsx-v":"tsx-v",tsx:"tsx",tsxv:"tsxv",ttse:"ttse",twse:"twse",tyo:"tyo",wbag:"wbag",wse:"wse","zagreb stock exchange":"zagreb stock exchange","zimbabwe stock exchange":"zimbabwe stock exchange",zse:"zse"},si=(e,t)=>{let i=Ae(e,["ticketnumber","code"]);t.push(i);let a=i.template||"";""===a&&(a=i.code),a=(a||"").toLowerCase();let n=oi[a]||"";return i.ticketnumber&&(n=`${n}: ${i.ticketnumber}`),i.code&&!oi[i.code.toLowerCase()]&&(n+=" "+i.code),n},li={};Object.keys(oi).forEach((e=>{li[e]=si}));const ci=function(e){return 1===(e=String(e)).length&&(e="0"+e),e},ui=function(e,t,i){e[`rd${t}-team${ci(i)}`]&&(i=ci(i));let a=e[`rd${t}-score${i}`],n=Number(a);return!1===isNaN(n)&&(a=n),{team:e[`rd${t}-team${i}`],score:a,seed:e[`rd${t}-seed${i}`]}},mi=function(e){let t=[],i=Ae(e);for(let e=1;e<7;e+=1){let a=[];for(let t=1;t<16;t+=2){let n=`rd${e}-team`;if(!i[n+t]&&!i[n+ci(t)])break;{let n=ui(i,e,t),r=ui(i,e,t+1);a.push([n,r])}}a.length>0&&t.push(a)}return{template:"playoffbracket",rounds:t}};let pi={"4teambracket":function(e,t){let i=mi(e);return t.push(i),""},player:(e,t)=>{let i=Ae(e,["number","country","name","dl"]);t.push(i);let a=`[[${i.name}]]`;if(i.country){let e=(i.country||"").toLowerCase(),t=jt.find((t=>e===t[1]||e===t[2]))||[];t&&t[0]&&(a=t[0]+" "+a)}return i.number&&(a=i.number+" "+a),a},goal:(e,t)=>{let i={template:"goal",data:[]},a=Ae(e).list||[];for(let e=0;e{let t=e.note;return t&&(t=` (${t})`),e.min+"'"+t})).join(", "),n},"sports table":(e,t)=>{let i=Ae(e),a={};Object.keys(i).filter((e=>/^team[0-9]/.test(e))).map((e=>i[e].toLowerCase())).forEach((e=>{a[e]={name:i[`name_${e}`],win:Number(i[`win_${e}`])||0,loss:Number(i[`loss_${e}`])||0,tie:Number(i[`tie_${e}`])||0,otloss:Number(i[`otloss_${e}`])||0,goals_for:Number(i[`gf_${e}`])||0,goals_against:Number(i[`ga_${e}`])||0}}));let n={date:i.update,header:i.table_header,teams:a};t.push(n)},"cbb roster/header":function(){return'{| class="wikitable"\n |-\n ! POS\n ! #\n ! Name\n ! Height\n ! Weight\n ! Year\n ! Previous School\n ! Hometown\n |-\n'},"cbb roster/player":function(e,t){let i=Ae(e);return t.push(i),`|-\n| ${i.pos||""}\n| ${i.num||""}\n| ${i.first||""} ${i.last||""}\n| ${i.ft||""}${i.in||""}\n| ${i.lbs||""}\n| ${i.class||""}\n| ${i.high_school||""}\n| ${i.home||""}\n`},"cbb roster/footer":function(){return"\n|}"}};var di=Object.assign({},At,Pt,It,Xt,ai,ri,li,mi,pi);let hi=Object.assign({},Et,Lt,di);Object.keys(mt).forEach((e=>{hi[e]=hi[mt[e]]}));const gi=["0","1","2","3","4","5","6","7","8","9"],bi=function(e,t){let i=e.name;if(!0===nt.hasOwnProperty(i))return[""];if(!0===function(e){return!0===rt.hasOwnProperty(e)||!!ot.test(e)||!(!st.test(e)&&!lt.test(e))||!!ct.test(e)}(i)){let t=Ae(e.body,[],"raw");return["",ut(t)]}if(!0===/^cite [a-z]/.test(i)){let t=Ae(e.body);return t.type=t.template,t.template="citation",["",t]}if(!0===hi.hasOwnProperty(i)){if("number"==typeof hi[i]){return[Ae(e.body,gi)[String(hi[i])]||""]}if("string"==typeof hi[i])return[hi[i]];if(!0===r(hi[i])){return["",Ae(e.body,hi[i])]}if(!0===((a=hi[i])&&"[object Object]"===Object.prototype.toString.call(a))){let t=Ae(e.body,hi[i].props);return[t[hi[i].out],t]}if("function"==typeof hi[i]){let a=[];return[hi[i](e.body,a,Ae,null,t),a[0]]}}var a;if(t&&t._templateFallbackFn){let i=[],a=t._templateFallbackFn(e.body,i,Ae,null,t);if(null!==a)return[a,i[0]]}let n=Ae(e.body);return 0===Object.keys(n).length&&(n=null),["",n]},ki=(e="")=>(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim(),fi=function(e,t){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},wi={type:function(){return this._type},links:function(e){let t=[];if(Object.keys(this.data).forEach((e=>{this.data[e].links().forEach((e=>t.push(e)))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},image:function(){let e=this.data.image||this.data.image2||this.data.logo||this.data.image_skyline||this.data.image_flag;if(!e)return null;let t=e.json(),i=t.text;return t.file=i,t.text="",t.caption=this.data.caption,t.domain=this.domain,new j(t)},get:function(e){let t=Object.keys(this.data);if("string"==typeof e){let i=ki(e);for(let e=0;e{for(let i=0;i(e.data[i]&&(t[i]=e.data[i].json()),t)),{});return!0===t.encode&&(i=K(i)),i}(this,e=e||{})},wikitext:function(){return this.wiki||""},keyValue:function(){return Object.keys(this.data).reduce(((e,t)=>(this.data[t]&&(e[t]=this.data[t].text()),e)),{})}};Object.keys(wi).forEach((e=>{fi.prototype[e]=wi[e]})),fi.prototype.data=fi.prototype.keyValue,fi.prototype.template=fi.prototype.type,fi.prototype.images=fi.prototype.image;const yi=function(e,t){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},$i={title:function(){let e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){let t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},text:function(){return""},wikitext:function(){return this.wiki||""},json:function(e={}){let t=this.data||{};return!0===e.encode&&(t=Object.assign({},t),t=K(t)),t}};Object.keys($i).forEach((e=>{yi.prototype[e]=$i[e]}));const xi={text:function(){return oe(this._text||"").text()},json:function(){return this.data||{}},wikitext:function(){return this.wiki||""}},vi=function(e,t="",i=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_text",{enumerable:!1,value:t}),Object.defineProperty(this,"wiki",{enumerable:!1,value:i})};Object.keys(xi).forEach((e=>{vi.prototype[e]=xi[e]}));const ji=/^(cite |citation)/i,_i={citation:!0,refn:!0,harvnb:!0,source:!0},zi=function(e,t){let{list:i,wiki:a}=function(e,t){let i=[],a=at(e);const n=function(a,r){a.parent=r,a.children&&a.children.length>0&&a.children.forEach((e=>n(e,a)));let[o,s]=bi(a,t);a.wiki=o,s&&i.push({name:a.name,wiki:a.body,nested:Boolean(a.parent),text:o,json:s});const l=function(e,t,i){e.parent&&(e.parent.body=e.parent.body.replace(t,i),l(e.parent,t,i))};l(a,a.body,a.wiki),e=e.replace(a.body,a.wiki)};return a.forEach((e=>n(e,null))),a.forEach((t=>{e=e.replace(t.body,t.wiki)})),{list:i,wiki:e}}(e._wiki,t),n=t?t._domain:null,{infoboxes:r,references:o,templates:s}=function(e,t){let i={infoboxes:[],templates:[],references:[]};return e.forEach((e=>{let a=e.json,n=a.template||a.type||a.name;if(!0!==_i[n]&&!0!==ji.test(n))return"infobox"===a.template&&"yes"!==a.subbox?(a.domain=t,a.data=a.data||{},void i.infoboxes.push(new fi(a,e.wiki))):void i.templates.push(new vi(a,e.text,e.wiki));i.references.push(new yi(a,e.wiki))})),i}(i,n);e._infoboxes=e._infoboxes||[],e._references=e._references||[],e._templates=e._templates||[],e._infoboxes=e._infoboxes.concat(r),e._references=e._references.concat(o),e._templates=e._templates.concat(s),e._wiki=a},Oi=function(e){return/^ *\{\{ *(cite|citation)/i.test(e)&&/\}\} *$/.test(e)&&!1===/citation needed/i.test(e)},Ei=function(e){let t=Ae(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Ni=function(e){return{template:"citation",type:"inline",data:{},inline:oe(e)||{}}},qi=function(e){let t=[],i=e._wiki;i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Oi(a)){let n=Ei(a);n&&t.push({json:n,wiki:e}),i=i.replace(a,"")}else t.push({json:Ni(a),wiki:e});return" "})),i=i.replace(/ ?]{0,200}?\/> ?/gi," "),i=i.replace(/ ?]{0,200}>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Oi(a)){let e=Ei(a);e&&t.push({json:e,wiki:a}),i=i.replace(a,"")}else t.push({json:Ni(a),wiki:e});return" "})),i=i.replace(/ ?<[ /]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ /]?> ?/g," "),e._references=t.map((e=>new yi(e.json,e.wiki))),e._wiki=i},Si={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]};let Ci=["res","record","opponent","method","event","date","round","time","location","notes"];const Li=function(e,t){const i={templates:[],text:e._wiki};var a;return function(e,t){e.text=e.text.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(i=>{let a={_wiki:i,_templates:[]};zi(a,t);let n=a._templates.map((e=>e.json())),r=n.find((e=>"election box"===e.template))||{},o=n.filter((e=>"election box candidate"===e.template)),s=n.find((e=>"election box gain"===e.template||"election box hold"===e.template))||{};return(o.length>0||s)&&e.templates.push({template:"election box",title:r.title,candidates:o,summary:s.data}),""}))}(i,t),function(e,t,i){e.text=e.text.replace(/]*)>([\s\S]+)<\/gallery>/g,((a,n,r)=>{let o=r.split(/\n/g);return o=o.filter((e=>e&&""!==e.trim())),o=o.map((e=>{let i=e.split(/\|/),a={file:i[0].trim(),lang:t.lang(),domain:t.domain()},n=new j(a).json(),r=i.slice(1).join("|");return""!==r&&(n.caption=oe(r)),n})),o.length>0&&e.templates.push({template:"gallery",images:o,pos:i.title}),""}))}(i,t,e),(a=i).text=a.text.replace(/]*)>([\s\S]*?)<\/math>/g,((e,t,i)=>{let n=oe(i).text();return a.templates.push({template:"math",formula:n,raw:i}),n&&n.length<12?n:""})),a.text=a.text.replace(/]*)>([\s\S]*?)<\/chem>/g,((e,t,i)=>(a.templates.push({template:"chem",data:i}),""))),function(e){e.text=e.text.replace(/\{\{mlb game log /gi,"{{game log "),e.text=e.text.replace(/\{\{game log (section|month)[\s\S]+?\{\{game log (section|month) end\}\}/gi,(t=>{let i=function(e){let t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{game log (section|month) end\}\}/i,"");let a="! "+i.join(" !! "),n=ge("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mlb game log section",data:n}),""}))}(i),function(e){e.text=e.text.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(t=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");let i="! "+Ci.join(" !! "),a=ge("{|\n"+i+"\n"+t+"\n|}");return a=a.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mma record start",data:a}),""}))}(i),function(e){e.text=e.text.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,((t,i)=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();let a="! "+Si[i].join(" !! "),n=ge("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"NBA "+i+" statistics",data:n}),""}))}(i),i.templates=i.templates.map((e=>new vi(e))),i},Ai={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0};class Pi{constructor(e,t){let i={doc:t,title:e.title||"",depth:e.depth,wiki:e.wiki||"",templates:[],tables:[],infoboxes:[],references:[],paragraphs:[]};Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})}));const a=Li(this,t);this._wiki=a.text,this._templates=this._templates.concat(a.templates),qi(this),zi(this,t),function(e){let t=[],i=e._wiki,a=i.split("\n"),n=[];for(let e=0;e0&&(n[n.length-1]+="\n"+a[e]);else{n[n.length-1]+="\n"+a[e];let i=n.pop();t.push(i)}else n.push(a[e]);let r=[];t.forEach((e=>{if(e){i=i.replace(e+"\n",""),i=i.replace(e,"");let t=ge(e);t&&t.length>0&&r.push(new fe(t,e))}})),r.length>0&&(e._tables=r),e._wiki=i}(this),Je(this,t)}title(){return this._title||""}index(){if(!this._doc)return null;let e=this._doc.sections().indexOf(this);return-1===e?null:e}depth(){return this._depth}indentation(){return this.depth()}sentences(){return this.paragraphs().reduce(((e,t)=>e.concat(t.sentences())),[])}paragraphs(){return this._paragraphs||[]}links(e){let t=[];if(this.infoboxes().forEach((e=>{t.push(e.links())})),this.sentences().forEach((e=>{t.push(e.links())})),this.tables().forEach((e=>{t.push(e.links())})),this.lists().forEach((e=>{t.push(e.links())})),t=t.reduce(((e,t)=>e.concat(t)),[]).filter((e=>void 0!==e)),"string"==typeof e){let i=t.find((t=>t.page().toLowerCase()===e.toLowerCase()));return void 0===i?[]:[i]}return t}tables(){return this._tables||[]}templates(e){let t=this._templates||[];return"string"==typeof e?(e=e.toLowerCase(),t.filter((t=>t.data.template===e||t.data.name===e))):t}infoboxes(e){let t=this._infoboxes||[];return"string"==typeof e?(e=(e=e.replace(/^infobox /i,"")).trim().toLowerCase(),t.filter((t=>t._type===e))):t}coordinates(){return[...this.templates("coord"),...this.templates("coor")].map((e=>e.json()))}lists(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.lists())})),e}interwiki(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.interwiki())})),e}images(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.images())})),e}references(){return this._references||[]}remove(){if(!this._doc)return null;let e={};e[this.title()]=!0,this.children().forEach((t=>e[t.title()]=!0));let t=this._doc.sections();return t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),this._doc._sections=t,this._doc}nextSibling(){if(!this._doc)return null;let e=this._doc.sections();for(let t=(this.index()||0)+1;tthis.depth())for(let e=i+1;ethis.depth();e+=1)a.push(t[e]);return"string"==typeof e?a.find((t=>t.title().toLowerCase()===e.toLowerCase())):a}sections(e){return this.children(e)}parent(){if(!this._doc)return null;let e=this._doc.sections();for(let t=this.index()||0;t>=0;t-=1)if(e[t]&&e[t].depth()t.text(e))).join("\n\n")}wikitext(){return this._wiki}json(e){return function(e,t){let i={};if(!0===(t=m(t,W)).headers&&(i.title=e.title()),!0===t.depth&&(i.depth=e.depth()),!0===t.paragraphs){let a=e.paragraphs().map((e=>e.json(t)));a.length>0&&(i.paragraphs=a)}if(!0===t.images){let a=e.images().map((e=>e.json(t)));a.length>0&&(i.images=a)}if(!0===t.tables){let a=e.tables().map((e=>e.json(t)));a.length>0&&(i.tables=a)}if(!0===t.templates){let a=e.templates().map((e=>e.json()));a.length>0&&(i.templates=a,!0===t.encode&&i.templates.forEach((e=>K(e))))}if(!0===t.infoboxes){let a=e.infoboxes().map((e=>e.json(t)));a.length>0&&(i.infoboxes=a)}if(!0===t.lists){let a=e.lists().map((e=>e.json(t)));a.length>0&&(i.lists=a)}if(!0===t.references||!0===t.citations){let a=e.references().map((e=>e.json(t)));a.length>0&&(i.references=a)}return!0===t.sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=m(e,Ai))}}Pi.prototype.citations=Pi.prototype.references;const Di={sentences:"sentence",paragraphs:"paragraph",links:"link",tables:"table",templates:"template",infoboxes:"infobox",coordinates:"coordinate",lists:"list",images:"image",references:"reference",citations:"citation"};Object.keys(Di).forEach((e=>{let t=Di[e];Pi.prototype[t]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]||null}}));const Ti=/^(={1,6})(.{1,200}?)={1,6}$/,Ii=/\{\{.+?\}\}/,Mi=function(e,t,i){let a=t.match(Ti);if(!a)return e.title="",e.depth=0,e;let r=a[2]||"";r=oe(r).text(),Ii.test(r)&&(r=function(e,t){return at(e).forEach((i=>{let[a]=bi(i,t);e=e.replace(i.body,a)})),e}(r,i));let o={_wiki:r};qi(o),r=o._wiki,r=n(r);let s=0;return a[1]&&(s=a[1].length-2),e.title=r,e.depth=s,e},Ui=new RegExp("^("+["references","reference","einzelnachweise","referencias","références","notes et références","脚注","referenser","bronnen","примечания"].join("|")+"):?","i"),Ri=/(?:\n|^)(={2,6}.{1,200}?={2,6})/g,Fi=function(e){let t=[],i=e._wiki.split(Ri);for(let a=0;a!0!==Ui.test(t.title())||t.paragraphs().length>0||t.templates().length>0||(e[i+1]&&e[i+1].depth()>t.depth()&&(e[i+1]._depth-=1),!1)))}(t)},Bi=new RegExp("\\[\\[("+d.join("|")+"):(.{2,178}?)]](w{0,10})","gi"),Ki=new RegExp("^\\[\\[:?("+d.join("|")+"):","gi"),Wi=function(e){const t=[];let i=e.match(Bi);i&&i.forEach((function(e){(e=(e=(e=e.replace(Ki,"")).replace(/\|?[ *]?\]\]$/,"")).replace(/\|.*/,""))&&!e.match(/[[\]]/)&&t.push(e.trim())}));const a=e.replace(Bi,"");return[t,a]},Hi={tables:!0,lists:!0,paragraphs:!0};class Yi{constructor(e,t){t=t||{},this._options=t;let i={pageID:t.pageID||t.id||null,namespace:t.namespace||t.ns||null,lang:t.lang||t.language||null,domain:t.domain||null,title:t.title||null,type:"page",redirectTo:null,wikidata:t.wikidata||null,wiki:e||"",categories:[],sections:[],coordinates:[],userAgent:t.userAgent||t["User-Agent"]||t["Api-User-Agent"]||"User of the wtf_wikipedia library",templateFallbackFn:t.templateFallbackFn||null};if(Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})})),!0===function(e){return!(!e||e.length>500)&&D.test(e)}(this._wiki)){this._type="redirect",this._redirectTo=function(e){let t=e.match(D);if(t&&t[2])return(P(t[2])||[])[0];return{}}(this._wiki);const[e,t]=Wi(this._wiki);return this._categories=e,void(this._wiki=t)}this._wiki=R(this._wiki);const[a,n]=Wi(this._wiki);this._categories=a,this._wiki=n,this._sections=Fi(this)}title(e){if(void 0!==e)return this._title=e,e;if(this._title)return this._title;let t=null,i=this.sentences()[0];return i&&(t=i.bold()),t}pageID(e){return void 0!==e&&(this._pageID=e),this._pageID||null}wikidata(e){return void 0!==e&&(this._wikidata=e),this._wikidata||null}domain(e){return void 0!==e&&(this._domain=e),this._domain||null}language(e){return void 0!==e&&(this._lang=e),this._lang||null}url(){let e=this.title();if(!e)return null;let t=this.language()||"en",i=this.domain()||"wikipedia.org";return e=e.replace(/ /g,"_"),e=encodeURIComponent(e),`https://${t}.${i}/wiki/${e}`}namespace(e){return void 0!==e&&(this._namespace=e),this._namespace||null}isRedirect(){return"redirect"===this._type}redirectTo(){return this._redirectTo}isDisambiguation(){return function(e){let t=e.templates().map((e=>e.json()));if(t.find((e=>k.hasOwnProperty(e.template)||$.hasOwnProperty(e.template))))return!0;let i=e.title();return!(!i||!0!==y.test(i))||!t.find((e=>w.hasOwnProperty(e.template)))&&(!0===x(e.sentence(0))||!0===x(e.sentence(1)))}(this)}categories(e){let t=this._categories||[];return"number"==typeof e?[t[e]]:t}sections(e){let t=this._sections||[];if(t.forEach((e=>{e._doc=this})),"string"==typeof e){let i=e.toLowerCase().trim();return t.filter((e=>e.title().toLowerCase()===i))}return"number"==typeof e?[t[e]]:t}paragraphs(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.paragraphs())})),"number"==typeof e?[t[e]]:t}sentences(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.sentences())})),"number"==typeof e?[t[e]]:t}images(e){let t=u(this,"images",null);return this.infoboxes().forEach((e=>{let i=e.image();i&&t.unshift(i)})),this.templates().forEach((e=>{"gallery"===e.data.template&&(e.data.images=e.data.images||[],e.data.images.forEach((e=>{e instanceof j||(e.language=this.language(),e.domain=this.domain(),e=new j(e)),t.push(e)})))})),"number"==typeof e?[t[e]]:t}links(e){return u(this,"links",e)}interwiki(e){return u(this,"interwiki",e)}lists(e){return u(this,"lists",e)}tables(e){return u(this,"tables",e)}templates(e){return u(this,"templates",e)}references(e){return u(this,"references",e)}citations(e){return this.references(e)}coordinates(e){return u(this,"coordinates",e)}infoboxes(e){let t=u(this,"infoboxes",e);return t=t.sort(((e,t)=>Object.keys(e.data).length>Object.keys(t.data).length?-1:1)),t}text(e){if(e=m(e,Hi),!0===this.isRedirect())return"";return this.sections().map((t=>t.text(e))).join("\n\n")}json(e){return function(e,t){let i={};return(t=m(t,p)).title&&(i.title=e.title()),t.pageID&&(i.pageID=e.pageID()),t.categories&&(i.categories=e.categories()),t.sections&&(i.sections=e.sections().map((e=>e.json(t)))),!0===e.isRedirect()&&(i.isRedirect=!0,i.redirectTo=e.redirectTo(),i.sections=[]),t.coordinates&&(i.coordinates=e.coordinates()),t.infoboxes&&(i.infoboxes=e.infoboxes().map((e=>e.json(t)))),t.images&&(i.images=e.images().map((e=>e.json(t)))),t.plaintext&&(i.plaintext=e.text(t)),(t.citations||t.references)&&(i.references=e.references()),i}(this,e=m(e,Hi))}wikitext(){return this._wiki||""}debug(){return console.log("\n"),this.sections().forEach((e=>{let t=" - ";for(let i=0;i{let t=Zi[e];Yi.prototype[t]=function(t){return this[e](t)[0]||null}})),Yi.prototype.lang=Yi.prototype.language,Yi.prototype.ns=Yi.prototype.namespace,Yi.prototype.plaintext=Yi.prototype.text,Yi.prototype.isDisambig=Yi.prototype.isDisambiguation,Yi.prototype.citations=Yi.prototype.references,Yi.prototype.redirectsTo=Yi.prototype.redirectTo,Yi.prototype.redirect=Yi.prototype.redirectTo,Yi.prototype.redirects=Yi.prototype.redirectTo;const Gi=/^https?:\/\//,Vi={lang:"en",wiki:"wikipedia",domain:void 0,follow_redirects:!0,path:"api.php"},Ji=function(e,t,n){"string"==typeof t&&(t={lang:t}),(t={...Vi,...t}).title=e,"string"==typeof e&&Gi.test(e)&&(t={...t,...a(e)});const o=c(t),s=function(e){let t,i=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return t=e.noOrigin?"":e.origin||e.Origin||"*",{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":i,"User-Agent":i,Origin:t,"Accept-Encoding":"gzip"},redirect:"follow"}}(t);return i(o,s).then((e=>e.json())).then((i=>{let a=function(e,t={}){return Object.keys(e.query.pages).map((i=>{let a=e.query.pages[i]||{};if(a.hasOwnProperty("missing")||a.hasOwnProperty("invalid"))return null;let n=a.revisions[0]["*"];!n&&a.revisions[0].slots&&(n=a.revisions[0].slots.main["*"]),a.pageprops=a.pageprops||{};let r=t.domain;return!r&&t.wiki&&(r=`${t.wiki}.org`),{wiki:n,meta:Object.assign({},t,{title:a.title,pageID:a.pageid,namespace:a.ns,domain:r,wikidata:a.pageprops.wikibase_item,description:a.pageprops["wikibase-shortdesc"]})}}))}(i,t);return a=function(e,t){let i=(e=e.filter((e=>e))).map((e=>new Yi(e.wiki,e.meta)));return 0===i.length?null:r(t)||1!==i.length?i:i[0]}(a,e),n&&n(null,a),a})).catch((e=>(console.error(e),n&&n(e,null),null)))};const Xi=function(e,t){return new Yi(e,t)},Qi={Doc:Yi,Section:Pi,Paragraph:je,Sentence:J,Image:j,Infobox:fi,Link:Y,List:Fe,Reference:yi,Table:fe,Template:vi,http:function(e,t){return i(e,t).then((function(e){return e.json()})).catch((t=>(console.error("\n\n=-=- http response error =-=-=-"),console.error(e),console.error(t),{})))},wtf:Xi};Xi.fetch=function(e,t,i){return Ji(e,t,i)},Xi.plugin=Xi.extend=function(e){return e(Qi,hi,rt),this},Xi.version="10.1.4";export{Xi as default}; +/*! wtf_wikipedia MIT */ +function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var i=function e(){if(this instanceof e){var i=[null];return i.push.apply(i,arguments),new(Function.bind.apply(t,i))}return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})})),i}var i=t(Object.freeze({__proto__:null,default:function(e,t){return t=t||{},new Promise((function(i,a){var n=new XMLHttpRequest,r=[],o=[],s={},l=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:l,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in n.open(t.method||"get",e,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,i){r.push(t=t.toLowerCase()),o.push([t,i]),s[t]=s[t]?s[t]+","+i:i})),i(l())},n.onerror=a,n.withCredentials="include"==t.credentials,t.headers)n.setRequestHeader(c,t.headers[c]);n.send(t.body||null)}))}})),a=e(self.fetch||(self.fetch=i.default||i));const n=function(e){let t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function r(e){return e&&"string"==typeof e?e=(e=(e=(e=e.replace(/^\s+/,"")).replace(/\s+$/,"")).replace(/ {2}/," ")).replace(/\s, /,", "):""}function o(e){return"[object Array]"===Object.prototype.toString.call(e)}const s=/(wikibooks|wikidata|wikimedia|wikinews|wikipedia|wikiquote|wikisource|wikispecies|wikiversity|wikivoyage|wiktionary|foundation|meta)\.org/,l={action:"query",prop:"revisions|pageprops",rvprop:"content",maxlag:5,rvslots:"main",origin:"*",format:"json",redirects:"true"},c=e=>e.replace(/ /g,"_").trim(),u=function(e,t=l){let i=Object.assign({},t),a="";if(e.domain){let t=s.test(e.domain)?"w/api.php":e.path;a=`https://${e.domain}/${t}?`}else{if(!e.lang||!e.wiki)return"";a=`https://${e.lang}.${e.wiki}.org/w/api.php?`}e.follow_redirects||delete i.redirects,e.origin&&(i.origin=e.origin);let n=e.title;if("number"==typeof n)i.pageids=n;else if("string"==typeof n)i.titles=c(n);else if(void 0!==n&&o(n)&&"number"==typeof n[0])i.pageids=n.filter((e=>e)).join("|");else{if(void 0===n||!0!==o(n)||"string"!=typeof n[0])return"";i.titles=n.filter((e=>e)).map(c).join("|")}return`${a}${r=i,Object.entries(r).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&")}`;var r},m=function(e,t,i){let a=[];return e.sections().forEach((e=>{let n=[];n="string"==typeof i?e[t](i):e[t](),n.forEach((e=>{a.push(e)}))})),"number"==typeof i?void 0===a[i]?[]:[a[i]]:a},p=function(e,t){return Object.assign({},t,e)},d={title:!0,sections:!0,pageID:!0,categories:!0};var h=["category","abdeeling","bólkur","catagóir","categori","categoria","categoria","categoría","categorîa","categorìa","catégorie","categorie","catègorie","category","categuria","catigurìa","class","ẹ̀ka","flocc","flocc","flokkur","grup","jamii","kaarangay","kateggoría","kategooria","kategori","kategorî","kategoria","kategória","kategorie","kategoriija","kategorija","kategorio","kategoriya","kategoriýa","kategoriye","kategory","kategorya","kateqoriya","katiguriya","klad","luokka","ñemohenda","roinn","ronney","rummad","setensele","sokajy","sumut","thể","turkum","категорија","категория","категорія","катэгорыя","төркем","קטגוריה","تصنيف","تۈر","رده","श्रेणी","श्रेणी","বিষয়শ্রেণী","หมวดหมู่","분류","분류","分类"],g=["file","image","चित्र","archivo","attēls","berkas","bestand","datei","dosiero","dosya","fájl","fasciculus","fichier","fil","fitxategi","fitxer","gambar","imagem","imej","immagine","larawan","lêer","plik","restr","slika","wêne","wobraz","выява","податотека","слика","файл","სურათი","պատկեր","קובץ","پرونده","دوتنه","ملف","وێنە","चित्र","ไฟล์","파일","ファイル"],b=["infobox","anfo","anuāmapa","bilgi kutusu","bilgi","bilgiquti","boaty","boestkelaouiñ","bosca","capsa","diehtokássa","faktamall","ficha","generalni","gwybodlen3","info","infobokis","infoboks","infochascha","infokašćik","infokast","infokutija","infolentelė","infopolje","informkesto","infoskreine","infotaula","inligtingskas","inligtingskas3","inligtingskas4","kishtey","kotak","tertcita","tietolaatikko","yerleşim bilgi kutusu","ynfoboks","πλαίσιο","акарточка","аҥа","инфобокс","инфокутија","инфокутия","інфобокс","канадский","картка","карточка","карточка2","карточкарус","картуш","қуттӣ","ინფოდაფა","տեղեկաքարտ","אינפאקעסטל","תבנית","بطاقة","ڄاڻخانو","خانہ","لغة","ज्ञानसन्दूक","তথ্যছক","ਜਾਣਕਾਰੀਡੱਬਾ","సమాచారపెట్టె","තොරතුරුකොටුව","กล่องข้อมูล","ប្រអប់ព័ត៌មាន","정보상자","明細"];let f=" disambiguation";const k=["dab","dab","disamb","disambig","geodis","hndis","setindex","ship index","split dab","sport index","wp disambig","disambiguation cleanup","airport"+f,"biology"+f,"call sign"+f,"caselaw"+f,"chinese title"+f,"genus"+f,"hospital"+f,"lake index","letter"+f,"letter-number combination"+f,"mathematical"+f,"military unit"+f,"mountainindex","number"+f,"phonetics"+f,"place name"+f,"portal"+f,"road"+f,"school"+f,"species latin name abbreviation"+f,"species latin name"+f,"station"+f,"synagogue"+f,"taxonomic authority"+f,"taxonomy"+f].reduce(((e,t)=>(e[t]=!0,e)),{}),w=/. may (also )?refer to\b/i,y={about:!0,for:!0,"for multi":!0,"other people":!0,"other uses of":!0,distinguish:!0},$=new RegExp(". \\(("+["disambiguation","homonymie","توضيح","desambiguação","Begriffsklärung","disambigua","曖昧さ回避","消歧義","搞清楚","значения","ابهام‌زدایی","د ابہام","동음이의","dubbelsinnig","այլ կիրառումներ","ujednoznacznienie"].join("|")+")\\)$","i"),x=["dab","disamb","disambig","disambiguation","letter-numbercombdisambig","letter-number combination disambiguation","dmbox","airport disambiguation","biology disambiguation","call sign disambiguation","caselaw disambiguation","chinese title disambiguation","disambiguation cleanup","genus disambiguation","hospital disambiguation","human name disambiguation","human name disambiguation cleanup","letter-number combination disambiguation","mathematical disambiguation","military unit disambiguation","music disambiguation","number disambiguation","opus number disambiguation","phonetics disambiguation","place name disambiguation","portal disambiguation","road disambiguation","school disambiguation","species latin name abbreviation disambiguation","species latin name disambiguation","station disambiguation","synagogue disambiguation","taxonomic authority disambiguation","taxonomy disambiguation","template disambiguation","disamb2","disamb3","disamb4","disambiguation lead","disambiguation lead name","disambiguation name","disamb-term","disamb-terms","aðgreining","aimai","ałtsʼáʼáztiin","anlam ayrımı","anlam ayrımı","apartigilo","argipen","begriepskloorenge","begriffsklärung","begriffsklärung","begriffsklärung","begriffsklearung","bisongidila","bkl","bokokani","caddayn","clerheans","cudakirin","čvor","db","desambig","desambigación","desambiguação","desambiguació","desambiguación","desambiguáncia","desambiguasion","desambiguassiù","desambigui","dezambiguizare","dəqiqləşdirmə","disambigua","disambigua","disambigua","disambìgua","disambigua","disambiguasi","disambiguasi","discretiva","disheñvelout","disingkek","dixanbigua","dixebra","diżambigwazzjoni","doorverwijspagina","dp","dp","dubbelsinnig","dudalipen","dv","egyért","fleiri týdningar","fleirtyding","flertydig","förgrening","gì-ngiê","giklaro","gwahaniaethu","homonimo","homónimos","homonymie","huaʻōlelo puana like","idirdhealú","khu-pia̍t","kthjellim","kujekesa","maana","maneo bin","mehrdüdig begreep","menm non","muardüüdag artiikel","neibetsjuttings","nozīmju atdalīšana","nuorodinis","nyahkekaburan","omonimeye","omonimia","page dé frouque","paglilinaw","panangilawlawag","pansayod","pejy mitovy anarana","peker","razdvojba","razločitev","razvrstavanje","reddaghey","rozcestník","rozlišovacia stránka","sclerir noziun","selvendyssivu","soilleireachadh","suzmunski","täpsustuslehekülg","täsmennyssivu","telplänov","tlahtolmelahuacatlaliztli","trang định hướng","ujednoznacznienie","verdudeliking","wěcejwóznamowosć","wjacezmyslnosć","zambiguaçon","zeimeibu škiršona","αποσαφήνιση","айрық","аҵакырацәа","вишезначна одредница","ибҳомзудоӣ","кёб магъаналы","күп мәгънәләр","күп мәғәнәлелек","мъногосъмꙑслиѥ","неадназначнасць","неадназначнасьць","неоднозначность","олон удхатай","појаснување","пояснение","са шумуд манавал","салаа утгатай","суолталар","текмаанисиздик","цо магіна гуреб","чеперушка","чолхалла","шуко ончыктымаш-влак","მრავალმნიშვნელოვანი","բազմիմաստութիւն","բազմիմաստություն","באדייטן","פירושונים","ابهام‌زدایی","توضيح","توضيح","دقیقلشدیرمه","ڕوونکردنەوە","سلجهائپ","ضد ابہام","گجگجی بیری","نامبهمېدنه","መንታ","अस्पष्टता","बहुअर्थी","बहुविकल्पी शब्द","দ্ব্যর্থতা নিরসন","ਗੁੰਝਲ-ਖੋਲ੍ਹ","સંદિગ્ધ શીર્ષક","பக்கவழி நெறிப்படுத்தல்","అయోమయ నివృత్తి","ದ್ವಂದ್ವ ನಿವಾರಣೆ","വിവക്ഷകൾ","වක්‍රෝත්ති","แก้ความกำกวม","သံတူကြောင်းကွဲ","ណែនាំ","동음이의","扤清楚","搞清楚","曖昧さ回避","消歧义","釋義","gestion dj'omònim","sut'ichana qillqa"].reduce(((e,t)=>(e[t]=!0,e)),{}),v=function(e){if(!e)return!1;let t=e.text();return!(null===t||!t[0]||!0!==w.test(t))},j={caption:!0,alt:!0,links:!0,thumb:!0,url:!0},_=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},z={file(){let e=this.data.file||"";if(e){/^(image|file):/i.test(e)||(e=`File:${e}`),e=e.trim(),e=e.charAt(0).toUpperCase()+e.substring(1),e=e.replace(/ /g,"_")}return e},alt(){let e=this.data.alt||this.data.file||"";return e=e.replace(/^(file|image):/i,""),e=e.replace(/\.(jpg|jpeg|png|gif|svg)/i,""),e.replace(/_/g," ")},caption(){return this.data.caption?this.data.caption.text():""},links(){return this.data.caption?this.data.caption.links():[]},url(){let e=function(e){let t=function(e){let t=e.replace(/^(image|file?):/i,"");return t=t.charAt(0).toUpperCase()+t.substring(1),t=t.trim().replace(/ /g,"_"),t}(e);return t=encodeURIComponent(t),t}(this.file());return`https://${this.data.domain||"wikipedia.org"}/wiki/Special:Redirect/file/${e}`},thumbnail(e){return e=e||300,this.url()+"?width="+e},format(){let e=this.file().split(".");return e[e.length-1]?e[e.length-1].toLowerCase():null},json:function(e){return function(e,t){t=p(t,j);let i={file:e.file()};return!1!==t.thumb&&(i.thumb=e.thumbnail()),!1!==t.url&&(i.url=e.url()),!1!==t.caption&&e.data.caption&&(i.caption=e.caption(),!1!==t.links&&e.data.caption.links()&&(i.links=e.links())),!1!==t.alt&&e.data.alt&&(i.alt=e.alt()),i}(this,e=e||{})},text:function(){return""},wikitext:function(){return this.data.wiki||""}};Object.keys(z).forEach((e=>{_.prototype[e]=z[e]})),_.prototype.src=_.prototype.url,_.prototype.thumb=_.prototype.thumbnail;var O={aa:"Afar",ab:"Аҧсуа",af:"Afrikaans",ak:"Akana",als:"Alemannisch",am:"አማርኛ",an:"Aragonés",ang:"Englisc",ar:"العربية",arc:"ܣܘܪܬ",as:"অসমীয়া",ast:"Asturianu",av:"Авар",ay:"Aymar",az:"Azərbaycanca",ba:"Башҡорт",bar:"Boarisch","bat-smg":"Žemaitėška",bcl:"Bikol",be:"Беларуская","be-x-old":"ltr",bg:"Български",bh:"भोजपुरी",bi:"Bislama",bm:"Bamanankan",bn:"বাংলা",bo:"བོད་ཡིག",bpy:"ltr",br:"Brezhoneg",bs:"Bosanski",bug:"ᨅᨔ",bxr:"ltr",ca:"Català",cdo:"Chinese",ce:"Нохчийн",ceb:"Sinugboanong",ch:"Chamoru",cho:"Choctaw",chr:"ᏣᎳᎩ",chy:"Tsetsêhestâhese",co:"Corsu",cr:"Nehiyaw",cs:"Česky",csb:"Kaszëbsczi",cu:"Slavonic",cv:"Чăваш",cy:"Cymraeg",da:"Dansk",de:"Deutsch",diq:"Zazaki",dsb:"ltr",dv:"ދިވެހިބަސް",dz:"ཇོང་ཁ",ee:"Ɛʋɛ",far:"فارسی",el:"Ελληνικά",en:"English",eo:"Esperanto",es:"Español",et:"Eesti",eu:"Euskara",ext:"Estremeñu",ff:"Fulfulde",fi:"Suomi","fiu-vro":"Võro",fj:"Na",fo:"Føroyskt",fr:"Français",frp:"Arpitan",fur:"Furlan",fy:"ltr",ga:"Gaeilge",gan:"ltr",gd:"ltr",gil:"Taetae",gl:"Galego",gn:"Avañe'ẽ",got:"gutisk",gu:"ગુજરાતી",gv:"Gaelg",ha:"هَوُسَ",hak:"ltr",haw:"Hawai`i",he:"עברית",hi:"हिन्दी",ho:"ltr",hr:"Hrvatski",ht:"Krèyol",hu:"Magyar",hy:"Հայերեն",hz:"Otsiherero",ia:"Interlingua",id:"Bahasa",ie:"Interlingue",ig:"Igbo",ii:"ltr",ik:"Iñupiak",ilo:"Ilokano",io:"Ido",is:"Íslenska",it:"Italiano",iu:"ᐃᓄᒃᑎᑐᑦ",ja:"日本語",jbo:"Lojban",jv:"Basa",ka:"ქართული",kg:"KiKongo",ki:"Gĩkũyũ",kj:"Kuanyama",kk:"Қазақша",kl:"Kalaallisut",km:"ភាសាខ្មែរ",kn:"ಕನ್ನಡ",khw:"کھوار",ko:"한국어",kr:"Kanuri",ks:"कश्मीरी",ksh:"Ripoarisch",ku:"Kurdî",kv:"Коми",kw:"Kernewek",ky:"Kırgızca",la:"Latina",lad:"Dzhudezmo",lan:"Leb",lb:"Lëtzebuergesch",lg:"Luganda",li:"Limburgs",lij:"Líguru",lmo:"Lumbaart",ln:"Lingála",lo:"ລາວ",lt:"Lietuvių",lv:"Latviešu","map-bms":"Basa",mg:"Malagasy",man:"官話",mh:"Kajin",mi:"Māori",min:"Minangkabau",mk:"Македонски",ml:"മലയാളം",mn:"Монгол",mo:"Moldovenească",mr:"मराठी",ms:"Bahasa",mt:"bil-Malti",mus:"Muskogee",my:"Myanmasa",na:"Dorerin",nah:"Nahuatl",nap:"Nnapulitano",nd:"ltr",nds:"Plattdüütsch","nds-nl":"Saxon",ne:"नेपाली",new:"नेपालभाषा",ng:"Oshiwambo",nl:"Nederlands",nn:"ltr",no:"Norsk",nr:"ltr",nso:"ltr",nrm:"Nouormand",nv:"Diné",ny:"Chi-Chewa",oc:"Occitan",oj:"ᐊᓂᔑᓈᐯᒧᐎᓐ",om:"Oromoo",or:"ଓଡ଼ିଆ",os:"Иронау",pa:"ਪੰਜਾਬੀ",pag:"Pangasinan",pam:"Kapampangan",pap:"Papiamentu",pdc:"ltr",pi:"Pāli",pih:"Norfuk",pl:"Polski",pms:"Piemontèis",ps:"پښتو",pt:"Português",qu:"Runa",rm:"ltr",rmy:"Romani",rn:"Kirundi",ro:"Română","roa-rup":"Armâneashti",ru:"Русский",rw:"Kinyarwandi",sa:"संस्कृतम्",sc:"Sardu",scn:"Sicilianu",sco:"Scots",sd:"सिनधि",se:"ltr",sg:"Sängö",sh:"Srpskohrvatski",si:"සිංහල",simple:"ltr",sk:"Slovenčina",sl:"Slovenščina",sm:"Gagana",sn:"chiShona",so:"Soomaaliga",sq:"Shqip",sr:"Српски",ss:"SiSwati",st:"ltr",su:"Basa",sv:"Svenska",sw:"Kiswahili",ta:"தமிழ்",te:"తెలుగు",tet:"Tetun",tg:"Тоҷикӣ",th:"ไทย",ti:"ትግርኛ",tk:"Туркмен",tl:"Tagalog",tlh:"tlhIngan-Hol",tn:"Setswana",to:"Lea",tpi:"ltr",tr:"Türkçe",ts:"Xitsonga",tt:"Tatarça",tum:"chiTumbuka",tw:"Twi",ty:"Reo",udm:"Удмурт",ug:"Uyƣurqə",uk:"Українська",ur:"اردو",uz:"Ўзбек",ve:"Tshivenḓa",vi:"Việtnam",vec:"Vèneto",vls:"ltr",vo:"Volapük",wa:"Walon",war:"Winaray",wo:"Wollof",xal:"Хальмг",xh:"isiXhosa",yi:"ייִדיש",yo:"Yorùbá",za:"Cuengh",zh:"中文","zh-classical":"ltr","zh-min-nan":"Bân-lâm-gú","zh-yue":"粵語",zu:"isiZulu"};const E=".wikipedia.org/wiki/$1",q=".wikimedia.org/wiki/$1",N="www.";var S={acronym:N+"acronymfinder.com/$1.html",advisory:"advisory"+q,advogato:N+"advogato.org/$1",aew:"wiki.arabeyes.org/$1",appropedia:N+"appropedia.org/$1",aquariumwiki:N+"theaquariumwiki.com/$1",arborwiki:"localwiki.org/ann-arbor/$1",arxiv:"arxiv.org/abs/$1",atmwiki:N+"otterstedt.de/wiki/index.php/$1",baden:N+"stadtwiki-baden-baden.de/wiki/$1/",battlestarwiki:"en.battlestarwiki.org/wiki/$1",bcnbio:"historiapolitica.bcn.cl/resenas_parlamentarias/wiki/$1",beacha:N+"beachapedia.org/$1",betawiki:"translatewiki.net/wiki/$1",bibcode:"adsabs.harvard.edu/abs/$1",bibliowiki:"wikilivres.org/wiki/$1",bluwiki:"bluwiki.com/go/$1",blw:"britainloves"+E,botwiki:"botwiki.sno.cc/wiki/$1",boxrec:N+"boxrec.com/media/index.php?$1",brickwiki:N+"brickwiki.info/wiki/$1",bugzilla:"bugzilla.wikimedia.org/show_bug.cgi?id=$1",bulba:"bulbapedia.bulbagarden.net/wiki/$1",c:"commons"+q,c2:"c2.com/cgi/wiki?$1",c2find:"c2.com/cgi/wiki?FindPage&value=$1",cache:N+"google.com/search?q=cache:$1","ĉej":"esperanto.blahus.cz/cxej/vikio/index.php/$1",cellwiki:"cell.wikia.com/wiki/$1",centralwikia:"community.wikia.com/wiki/$1",chej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",choralwiki:N+"cpdl.org/wiki/index.php/$1",citizendium:"en.citizendium.org/wiki/$1",ckwiss:N+"ck-wissen.de/ckwiki/index.php?title=$1",comixpedia:N+"comixpedia.org/index.php?title=$1",commons:"commons"+q,communityscheme:"community.schemewiki.org/?c=s&key=$1",communitywiki:"communitywiki.org/$1",comune:"rete.comuni-italiani.it/wiki/$1",creativecommons:"creativecommons.org/licenses/$1",creativecommonswiki:"wiki.creativecommons.org/$1",cxej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",dcc:N+"dccwiki.com/$1",dcdatabase:"dc.wikia.com/$1",dcma:"christian-morgenstern.de/dcma/index.php?title=$1",debian:"wiki.debian.org/$1",delicious:N+"delicious.com/tag/$1",devmo:"developer.mozilla.org/en/docs/$1",dictionary:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",dict:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",disinfopedia:"sourcewatch.org/index.php/$1",distributedproofreaders:N+"pgdp.net/wiki/$1",distributedproofreadersca:N+"pgdpcanada.net/wiki/index.php/$1",dmoz:"curlie.org/$1",dmozs:"curlie.org/search?q=$1",doi:"doi.org/$1",donate:"donate"+q,doom_wiki:"doom.wikia.com/wiki/$1",download:"releases.wikimedia.org/$1",dbdump:"dumps.wikimedia.org/$1/latest/",dpd:"lema.rae.es/dpd/?key=$1",drae:"dle.rae.es/?w=$1",dreamhost:"wiki.dreamhost.com/index.php/$1",drumcorpswiki:N+"drumcorpswiki.com/index.php/$1",dwjwiki:N+"suberic.net/cgi-bin/dwj/wiki.cgi?$1","eĉei":N+"ikso.net/cgi-bin/wiki.pl?$1",ecoreality:N+"EcoReality.org/wiki/$1",ecxei:N+"ikso.net/cgi-bin/wiki.pl?$1",elibre:"enciclopedia.us.es/index.php/$1",emacswiki:N+"emacswiki.org/emacs?$1",encyc:"encyc.org/wiki/$1",energiewiki:N+"netzwerk-energieberater.de/wiki/index.php/$1",englyphwiki:"en.glyphwiki.org/wiki/$1",enkol:"enkol.pl/$1",eokulturcentro:"esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1",esolang:"esolangs.org/wiki/$1",etherpad:"etherpad.wikimedia.org/$1",ethnologue:N+"ethnologue.com/language/$1",ethnologuefamily:N+"ethnologue.com/show_family.asp?subid=$1",evowiki:"wiki.cotch.net/index.php/$1",exotica:N+"exotica.org.uk/wiki/$1",fanimutationwiki:"wiki.animutationportal.com/index.php/$1",fedora:"fedoraproject.org/wiki/$1",finalfantasy:"finalfantasy.wikia.com/wiki/$1",finnix:N+"finnix.org/$1",flickruser:N+"flickr.com/people/$1",flickrphoto:N+"flickr.com/photo.gne?id=$1",floralwiki:N+"floralwiki.co.uk/wiki/$1",foldoc:"foldoc.org/$1",foundation:"foundation"+q,foundationsite:"wikimediafoundation.org/$1",foxwiki:"fox.wikis.com/wc.dll?Wiki~$1",freebio:"freebiology.org/wiki/$1",freebsdman:N+"FreeBSD.org/cgi/man.cgi?apropos=1&query=$1",freeculturewiki:"wiki.freeculture.org/index.php/$1",freedomdefined:"freedomdefined.org/$1",freefeel:"freefeel.org/wiki/$1",freekiwiki:"wiki.freegeek.org/index.php/$1",freesoft:"directory.fsf.org/wiki/$1",ganfyd:"ganfyd.org/index.php?title=$1",gardenology:N+"gardenology.org/wiki/$1",gausswiki:"gauss.ffii.org/$1",gentoo:"wiki.gentoo.org/wiki/$1",genwiki:"wiki.genealogy.net/index.php/$1",gerrit:"gerrit.wikimedia.org/r/$1",git:"gerrit.wikimedia.org/g/$1",google:N+"google.com/search?q=$1",googledefine:N+"google.com/search?q=define:$1",googlegroups:"groups.google.com/groups?q=$1",guildwarswiki:"wiki.guildwars.com/wiki/$1",guildwiki:"guildwars.wikia.com/wiki/$1",guc:"tools.wmflabs.org/guc/?user=$1",gucprefix:"tools.wmflabs.org/guc/?isPrefixPattern=1&src=rc&user=$1",gutenberg:N+"gutenberg.org/etext/$1",gutenbergwiki:N+"gutenberg.org/wiki/$1",hackerspaces:"hackerspaces.org/wiki/$1",h2wiki:"halowiki.net/p/$1",hammondwiki:N+"dairiki.org/HammondWiki/index.php3?$1",hdl:"hdl.handle.net/$1",heraldik:"heraldik-wiki.de/wiki/$1",heroeswiki:"heroeswiki.com/$1",horizonlabs:"horizon.wikimedia.org/$1",hrwiki:N+"hrwiki.org/index.php/$1",hrfwiki:"fanstuff.hrwiki.org/index.php/$1",hupwiki:"wiki.hup.hu/index.php/$1",iarchive:"archive.org/details/$1",imdbname:N+"imdb.com/name/nm$1/",imdbtitle:N+"imdb.com/title/tt$1/",imdbcompany:N+"imdb.com/company/co$1/",imdbcharacter:N+"imdb.com/character/ch$1/",incubator:"incubator"+q,infosecpedia:"infosecpedia.org/wiki/$1",infosphere:"theinfosphere.org/$1","iso639-3":"iso639-3.sil.org/code/$1",issn:N+"worldcat.org/issn/$1",iuridictum:"iuridictum.pecina.cz/w/$1",jaglyphwiki:"glyphwiki.org/wiki/$1",jefo:"esperanto-jeunes.org/wiki/$1",jerseydatabase:"jerseydatabase.com/wiki.php?id=$1",jira:"jira.toolserver.org/browse/$1",jspwiki:N+"ecyrd.com/JSPWiki/Wiki.jsp?page=$1",jstor:N+"jstor.org/journals/$1",kamelo:"kamelopedia.mormo.org/index.php/$1",karlsruhe:"ka.stadtwiki.net/$1",kinowiki:"kino.skripov.com/index.php/$1",komicawiki:"wiki.komica.org/?$1",kontuwiki:"kontu.wiki/$1",wikitech:"wikitech"+q,libreplanet:"libreplanet.org/wiki/$1",linguistlist:"linguistlist.org/forms/langs/LLDescription.cfm?code=$1",linuxwiki:N+"linuxwiki.de/$1",linuxwikide:N+"linuxwiki.de/$1",liswiki:"liswiki.org/wiki/$1",literateprograms:"en.literateprograms.org/$1",livepedia:N+"livepedia.gr/index.php?title=$1",localwiki:"localwiki.org/$1",lojban:"mw.lojban.org/papri/$1",lostpedia:"lostpedia.wikia.com/wiki/$1",lqwiki:"wiki.linuxquestions.org/wiki/$1",luxo:"tools.wmflabs.org/guc/?user=$1",mail:"lists.wikimedia.org/mailman/listinfo/$1",mailarchive:"lists.wikimedia.org/pipermail/$1",mariowiki:N+"mariowiki.com/$1",marveldatabase:N+"marveldatabase.com/wiki/index.php/$1",meatball:"meatballwiki.org/wiki/$1",mw:N+"mediawiki.org/wiki/$1",mediazilla:"bugzilla.wikimedia.org/$1",memoryalpha:"memory-alpha.fandom.com/wiki/$1",metawiki:"meta"+q,metawikimedia:"meta"+q,metawikipedia:"meta"+q,mineralienatlas:N+"mineralienatlas.de/lexikon/index.php/$1",moinmoin:"moinmo.in/$1",monstropedia:N+"monstropedia.org/?title=$1",mosapedia:"mosapedia.de/wiki/index.php/$1",mozcom:"mozilla.wikia.com/wiki/$1",mozillawiki:"wiki.mozilla.org/$1",mozillazinekb:"kb.mozillazine.org/$1",musicbrainz:"musicbrainz.org/doc/$1",mediawikiwiki:N+"mediawiki.org/wiki/$1",mwod:N+"merriam-webster.com/dictionary/$1",mwot:N+"merriam-webster.com/thesaurus/$1",nkcells:N+"nkcells.info/index.php?title=$1",nara:"catalog.archives.gov/id/$1",nosmoke:"no-smok.net/nsmk/$1",nost:"nostalgia"+E,nostalgia:"nostalgia"+E,oeis:"oeis.org/$1",oldwikisource:"wikisource.org/wiki/$1",olpc:"wiki.laptop.org/go/$1",omegawiki:N+"omegawiki.org/Expression:$1",onelook:N+"onelook.com/?ls=b&w=$1",openlibrary:"openlibrary.org/$1",openstreetmap:"wiki.openstreetmap.org/wiki/$1",openwetware:"openwetware.org/wiki/$1",opera7wiki:"operawiki.info/$1",organicdesign:N+"organicdesign.co.nz/$1",orthodoxwiki:"orthodoxwiki.org/$1",osmwiki:"wiki.openstreetmap.org/wiki/$1",otrs:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=$1",otrswiki:"otrs-wiki"+q,ourmedia:N+"socialtext.net/ourmedia/index.cgi?$1",outreach:"outreach"+q,outreachwiki:"outreach"+q,owasp:N+"owasp.org/index.php/$1",panawiki:"wiki.alairelibre.net/index.php?title=$1",patwiki:"gauss.ffii.org/$1",personaltelco:"personaltelco.net/wiki/$1",petscan:"petscan.wmflabs.org/?psid=$1",phab:"phabricator.wikimedia.org/$1",phabricator:"phabricator.wikimedia.org/$1",phwiki:N+"pocketheaven.com/ph/wiki/index.php?title=$1",phpwiki:"phpwiki.sourceforge.net/phpwiki/index.php?$1",planetmath:"planetmath.org/node/$1",pmeg:N+"bertilow.com/pmeg/$1",pmid:N+"ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract",pokewiki:"pokewiki.de/$1","pokéwiki":"pokewiki.de/$1",policy:"policy.wikimedia.org/$1",proofwiki:N+"proofwiki.org/wiki/$1",pyrev:N+"mediawiki.org/wiki/Special:Code/pywikipedia/$1",pythoninfo:"wiki.python.org/moin/$1",pythonwiki:N+"pythonwiki.de/$1",pywiki:"c2.com/cgi/wiki?$1",psycle:"psycle.sourceforge.net/wiki/$1",quality:"quality"+q,quarry:"quarry.wmflabs.org/$1",regiowiki:"regiowiki.at/wiki/$1",rev:N+"mediawiki.org/wiki/Special:Code/MediaWiki/$1",revo:"purl.org/NET/voko/revo/art/$1.html",rfc:"tools.ietf.org/html/rfc$1",rheinneckar:"rhein-neckar-wiki.de/$1",robowiki:"robowiki.net/?$1",rodovid:"en.rodovid.org/wk/$1",reuterswiki:"glossary.reuters.com/index.php/$1",rowiki:"wiki.rennkuckuck.de/index.php/$1",rt:"rt.wikimedia.org/Ticket/Display.html?id=$1",s23wiki:"s23.org/wiki/$1",scholar:"scholar.google.com/scholar?q=$1",schoolswp:"schools-"+E,scores:"imslp.org/wiki/$1",scoutwiki:"en.scoutwiki.org/$1",scramble:N+"scramble.nl/wiki/index.php?title=$1",seapig:N+"seapig.org/$1",seattlewiki:"seattle.wikia.com/wiki/$1",slwiki:"wiki.secondlife.com/wiki/$1","semantic-mw":N+"semantic-mediawiki.org/wiki/$1",senseislibrary:"senseis.xmp.net/?$1",sharemap:"sharemap.org/$1",silcode:N+"sil.org/iso639-3/documentation.asp?id=$1",slashdot:"slashdot.org/article.pl?sid=$1",sourceforge:"sourceforge.net/$1",spcom:"spcom"+q,species:"species"+q,squeak:"wiki.squeak.org/squeak/$1",stats:"stats.wikimedia.org/$1",stewardry:"tools.wmflabs.org/meta/stewardry/?wiki=$1",strategy:"strategy"+q,strategywiki:"strategywiki.org/wiki/$1",sulutil:"meta.wikimedia.org/wiki/Special:CentralAuth/$1",swtrain:"train.spottingworld.com/$1",svn:"svn.wikimedia.org/viewvc/mediawiki/$1?view=log",swinbrain:"swinbrain.ict.swin.edu.au/wiki/$1",tabwiki:N+"tabwiki.com/index.php/$1",tclerswiki:"wiki.tcl.tk/$1",technorati:N+"technorati.com/search/$1",tenwiki:"ten"+E,testwiki:"test"+E,testwikidata:"test.wikidata.org/wiki/$1",test2wiki:"test2"+E,tfwiki:"tfwiki.net/wiki/$1",thelemapedia:N+"thelemapedia.org/index.php/$1",theopedia:N+"theopedia.com/$1",thinkwiki:N+"thinkwiki.org/wiki/$1",ticket:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=$1",tmbw:"tmbw.net/wiki/$1",tmnet:N+"technomanifestos.net/?$1",tmwiki:N+"EasyTopicMaps.com/?page=$1",toolforge:"tools.wmflabs.org/$1",toollabs:"tools.wmflabs.org/$1",tools:"toolserver.org/$1",tswiki:N+"mediawiki.org/wiki/Toolserver:$1",translatewiki:"translatewiki.net/wiki/$1",tviv:"tviv.org/wiki/$1",tvtropes:N+"tvtropes.org/pmwiki/pmwiki.php/Main/$1",twiki:"twiki.org/cgi-bin/view/$1",tyvawiki:N+"tyvawiki.org/wiki/$1",umap:"umap.openstreetmap.fr/$1",uncyclopedia:"en.uncyclopedia.co/wiki/$1",unihan:N+"unicode.org/cgi-bin/GetUnihanData.pl?codepoint=$1",unreal:"wiki.beyondunreal.com/wiki/$1",urbandict:N+"urbandictionary.com/define.php?term=$1",usej:N+"tejo.org/usej/$1",usemod:N+"usemod.com/cgi-bin/wiki.pl?$1",usability:"usability"+q,utrs:"utrs.wmflabs.org/appeal.php?id=$1",vikidia:"fr.vikidia.org/wiki/$1",vlos:"tusach.thuvienkhoahoc.com/wiki/$1",vkol:"kol.coldfront.net/thekolwiki/index.php/$1",voipinfo:N+"voip-info.org/wiki/view/$1",votewiki:"vote"+q,werelate:N+"werelate.org/wiki/$1",wg:"wg-en"+E,wikia:N+"wikia.com/wiki/w:c:$1",wikiasite:N+"wikia.com/wiki/w:c:$1",wikiapiary:"wikiapiary.com/wiki/$1",wikibooks:"en.wikibooks.org/wiki/$1",wikichristian:N+"wikichristian.org/index.php?title=$1",wikicities:N+"wikia.com/wiki/w:$1",wikicity:N+"wikia.com/wiki/w:c:$1",wikiconference:"wikiconference.org/wiki/$1",wikidata:N+"wikidata.org/wiki/$1",wikif1:N+"wikif1.org/$1",wikifur:"en.wikifur.com/wiki/$1",wikihow:N+"wikihow.com/$1",wikiindex:"wikiindex.org/$1",wikilemon:"wiki.illemonati.com/$1",wikilivres:"wikilivres.org/wiki/$1",wikilivresru:"wikilivres.ru/$1","wikimac-de":"apfelwiki.de/wiki/Main/$1",wikimedia:"foundation"+q,wikinews:"en.wikinews.org/wiki/$1",wikinfo:"wikinfo.org/w/index.php/$1",wikinvest:"meta.wikimedia.org/wiki/Interwiki_map/discontinued#Wikinvest",wikiotics:"wikiotics.org/$1",wikipapers:"wikipapers.referata.com/wiki/$1",wikipedia:"en"+E,wikipediawikipedia:"en.wikipedia.org/wiki/Wikipedia:$1",wikiquote:"en.wikiquote.org/wiki/$1",wikisophia:"wikisophia.org/index.php?title=$1",wikisource:"en.wikisource.org/wiki/$1",wikispecies:"species"+q,wikispot:"wikispot.org/?action=gotowikipage&v=$1",wikiskripta:N+"wikiskripta.eu/index.php/$1",labsconsole:"wikitech"+q,wikiti:"wikiti.denglend.net/index.php?title=$1",wikiversity:"en.wikiversity.org/wiki/$1",wikivoyage:"en.wikivoyage.org/wiki/$1",betawikiversity:"beta.wikiversity.org/wiki/$1",wikiwikiweb:"c2.com/cgi/wiki?$1",wiktionary:"en.wiktionary.org/wiki/$1",wipipedia:"wipipedia.org/index.php/$1",wlug:N+"wlug.org.nz/$1",wmam:"am"+q,wmar:N+"wikimedia.org.ar/wiki/$1",wmat:"mitglieder.wikimedia.at/$1",wmau:"wikimedia.org.au/wiki/$1",wmbd:"bd"+q,wmbe:"be"+q,wmbr:"br"+q,wmca:"ca"+q,wmch:N+"wikimedia.ch/$1",wmcl:N+"wikimediachile.cl/index.php?title=$1",wmcn:"cn"+q,wmco:"co"+q,wmcz:N+"wikimedia.cz/web/$1",wmdc:"wikimediadc.org/wiki/$1",securewikidc:"secure.wikidc.org/$1",wmde:"wikimedia.de/wiki/$1",wmdk:"dk"+q,wmee:"ee"+q,wmec:"ec"+q,wmes:N+"wikimedia.es/wiki/$1",wmet:"ee"+q,wmfdashboard:"outreachdashboard.wmflabs.org/$1",wmfi:"fi"+q,wmfr:"wikimedia.fr/$1",wmge:"ge"+q,wmhi:"hi"+q,wmhk:"meta.wikimedia.org/wiki/Wikimedia_Hong_Kong",wmhu:"wikimedia.hu/wiki/$1",wmid:"id"+q,wmil:N+"wikimedia.org.il/$1",wmin:"wiki.wikimedia.in/$1",wmit:"wiki.wikimedia.it/wiki/$1",wmke:"meta.wikimedia.org/wiki/Wikimedia_Kenya",wmmk:"mk"+q,wmmx:"mx"+q,wmnl:"nl"+q,wmnyc:"nyc"+q,wmno:"no"+q,"wmpa-us":"pa-us"+q,wmph:"meta.wikimedia.org/wiki/Wikimedia_Philippines",wmpl:"pl"+q,wmpt:"pt"+q,wmpunjabi:"punjabi"+q,wmromd:"romd"+q,wmrs:"rs"+q,wmru:"ru"+q,wmse:"se"+q,wmsk:"wikimedia.sk/$1",wmtr:"tr"+q,wmtw:"wikimedia.tw/wiki/index.php5/$1",wmua:"ua"+q,wmuk:"wikimedia.org.uk/wiki/$1",wmve:"wikimedia.org.ve/wiki/$1",wmza:"wikimedia.org.za/wiki/$1",wm2005:"wikimania2005"+q,wm2006:"wikimania2006"+q,wm2007:"wikimania2007"+q,wm2008:"wikimania2008"+q,wm2009:"wikimania2009"+q,wm2010:"wikimania2010"+q,wm2011:"wikimania2011"+q,wm2012:"wikimania2012"+q,wm2013:"wikimania2013"+q,wm2014:"wikimania2014"+q,wm2015:"wikimania2015"+q,wm2016:"wikimania2016"+q,wm2017:"wikimania2017"+q,wm2018:"wikimania2018"+q,wmania:"wikimania"+q,wikimania:"wikimania"+q,wmteam:"wikimaniateam"+q,wmf:"foundation"+q,wmfblog:"blog.wikimedia.org/$1",wmdeblog:"blog.wikimedia.de/$1",wookieepedia:"starwars.wikia.com/wiki/$1",wowwiki:N+"wowwiki.com/$1",wqy:"wqy.sourceforge.net/cgi-bin/index.cgi?$1",wurmpedia:"wurmpedia.com/index.php/$1",viaf:"viaf.org/viaf/$1",zrhwiki:N+"zrhwiki.ch/wiki/$1",zum:"wiki.zum.de/$1",zwiki:N+"zwiki.org/$1",m:"meta"+q,meta:"meta"+q,sep11:"sep11"+E,d:N+"wikidata.org/wiki/$1",minnan:"zh-min-nan"+E,nb:"no"+E,"zh-cfr":"zh-min-nan"+E,"zh-cn":"zh"+E,"zh-tw":"zh"+E,nan:"zh-min-nan"+E,vro:"fiu-vro"+E,cmn:"zh"+E,lzh:"zh-classical"+E,rup:"roa-rup"+E,gsw:"als"+E,"be-tarask":"be-x-old"+E,sgs:"bat-smg"+E,egl:"eml"+E,w:"en"+E,wikt:"en.wiktionary.org/wiki/$1",q:"en.wikiquote.org/wiki/$1",b:"en.wikibooks.org/wiki/$1",n:"en.wikinews.org/wiki/$1",s:"en.wikisource.org/wiki/$1",chapter:"en"+q,v:"en.wikiversity.org/wiki/$1",voy:"en.wikivoyage.org/wiki/$1"};Object.keys(O).forEach((e=>{S[e]=e+".wikipedia.org/wiki/$1"}));const C=/^(category|catégorie|kategorie|categoría|categoria|categorie|kategoria|تصنيف|image|file|fichier|datei|media):/i,L=/\[(https?|news|ftp|mailto|gopher|irc)(:\/\/[^\]| ]{4,1500})([| ].*?)?\]/g,A=/\[\[(.{0,1600}?)\]\]([a-z]+)?/gi,P=function(e,t){return t.replace(A,(function(t,i,a){let n=null,r=i;if(i.match(/\|/)&&(r=(i=i.replace(/\[\[(.{2,1000}?)\]\](\w{0,10})/g,"$1$2")).replace(/(.{2,1000})\|.{0,2000}/,"$1"),n=i.replace(/.{2,1000}?\|/,""),null===n&&r.match(/\|$/)&&(r=r.replace(/\|$/,""),n=r)),r.match(C))return i;let o={page:r,raw:t};return o.page=o.page.replace(/#(.*)/,((e,t)=>(o.anchor=t,""))),o=function(e){let t=e.page||"";if(-1!==t.indexOf(":")){let i=t.match(/^(.*):(.*)/);if(null===i)return e;let a=i[1]||"";if(a=a.toLowerCase(),-1!==a.indexOf(":")){let[,t,i]=a.match(/^:?(.*):(.*)/);if(!1===S.hasOwnProperty(t)||!1===O.hasOwnProperty(i))return e;e.wiki={wiki:t,lang:i}}else{if(!1===S.hasOwnProperty(a))return e;e.wiki=a}e.page=i[2]}return e}(o),o.wiki&&(o.type="interwiki"),null!==n&&n!==o.page&&(o.text=n),a&&(o.text=o.text||o.page,o.text+=a.trim()),o.page&&!1===/^[A-Z]/.test(o.page)&&(o.text||(o.text=o.page),o.page=o.page),o.text&&o.text.startsWith(":")&&(o.text=o.text.replace(/^:/,"")),e.push(o),i})),e},D=function(e){let t=[];if(t=function(e,t){return t.replace(L,(function(t,i,a,n){return n=n||"",e.push({type:"external",site:i+a,text:n.trim(),raw:t}),n})),e}(t,e),t=P(t,e),0!==t.length)return t},T=new RegExp("^[ \n\t]*?#("+["adkas","aýdaw","doorverwijzing","ohjaus","patrz","přesměruj","redirección","redireccion","redirección","redirecionamento","redirect","redirection","redirection","rinvia","tilvísun","uudelleenohjaus","weiterleitung","weiterleitung","yönlendi̇r","yönlendirme","yönlendi̇rme","ανακατευθυνση","айдау","перанакіраваньне","перенаправлення","пренасочување","преусмери","преусмјери","تغییر_مسیر","تغییرمسیر","تغییرمسیر","เปลี่ยนทาง","ប្តូរទីតាំងទៅ","転送","重定向"].join("|")+") *?(\\[\\[.{2,180}?\\]\\])","i"),I=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","references","source","syntaxhighlight","timeline"],M=`< ?(${I.join("|")}) ?[^>]{0,200}?>`,R=`< ?/ ?(${I.join("|")}) ?>`,U=new RegExp(`${M}[\\s\\S]+?${R}`,"gi");function F(e){return e=(e=(e=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(U," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%.\-#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/
(.*?)<\/blockquote>/g,"{{blockquote|text=$1}}")).replace(/ ?<[ /]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr|u)[ /]?> ?/g," ")).replace(/ ?<[ /]?(abbr|bdi|bdo|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ /]?> ?/g," ")).replace(/ ?<[ /]?h[0-9][ /]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()}(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~{2,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," ")).replace(/–/g,"–"))).replace(/\([,;: ]+\)/g,"")).replace(/\{\{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,"")}const B=/[\\.$]/,K=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},W=function(e={}){let t=Object.keys(e);for(let i=0;i{Z.prototype[e]=G[e]}));const V=/^[0-9,.]+$/,J={text:!0,links:!0,formatting:!0,numbers:!0},X=function(e={}){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Q={links:function(e){let t=this.data.links||[];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page===e));return void 0===i?[]:[i]}return t},interwiki:function(){return this.links().filter((e=>void 0!==e.wiki))},bolds:function(){return this.data&&this.data.fmt&&this.data.fmt.bold&&this.data.fmt.bold||[]},italics:function(){return this.data&&this.data.fmt&&this.data.fmt.italic&&this.data.fmt.italic||[]},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return function(e,t){t=p(t,J);let i={},a=e.text();if(!0===t.text&&(i.text=a),!0===t.numbers&&V.test(a)){let e=Number(a.replace(/,/g,""));!1===isNaN(e)&&(i.number=e)}return t.links&&e.links().length>0&&(i.links=e.links().map((e=>e.json()))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i}(this,e)},wikitext:function(){return this.data.wiki||""},isEmpty:function(){return""===this.data.text}};Object.keys(Q).forEach((e=>{X.prototype[e]=Q[e]}));const ee={links:"link",bolds:"bold",italics:"italic"};Object.keys(ee).forEach((e=>{X.prototype[ee[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}})),X.prototype.plaintext=X.prototype.text;const te=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),ie=new RegExp("(^| |')("+te.join("|")+")[.!?] ?$","i"),ae=/[ .'][A-Z].? *$/i,ne=/\.{3,} +$/,re=/ c\.\s$/,oe=/\p{Letter}/iu;function se(e){let t={wiki:e,text:e};return function(e){let t=e.text,i=D(t)||[];e.links=i.map((e=>(t=t.replace(e.raw,e.text||e.page||""),new Z(e)))),t=t.replace(/\[\[File:(.{2,80}?)\|([^\]]+)\]\](\w{0,5})/g,"$1"),e.text=t}(t),t.text=r(t.text.replace(/\([,;: ]*\)/g,"").replace(/\( *(; ?)+/g,"(")).replace(/ +\.$/,"."),t=function(e){let t=[],i=[],a=e.text||"";return a=a.replace(/'''''(.{0,2500}?)'''''/g,((e,a)=>(t.push(a),i.push(a),a))),a=a.replace(/''''(.{0,2500}?)''''/g,((e,i)=>(t.push(`'${i}'`),`'${i}'`))),a=a.replace(/'''(.{0,2500}?)'''/g,((e,i)=>(t.push(i),i))),a=a.replace(/''(.{0,2500}?)''/g,((e,t)=>(i.push(t),t))),e.text=a,t.length>0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e}(t),new X(t)}const le=function(e){let t=function(e){let t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;let a=function(e){let t=e.split(/(\n+)/);return t=t.filter((e=>e.match(/\S/))),t=t.map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s|$)/g)})),function(e){let t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t)}(e);for(let e=0;ei.length)return!1;const a=e.match(/"/g);if(a&&a.length%2!=0&&e.length<900)return!1;const n=e.match(/[()]/g);return!(n&&n.length%2!=0&&e.length<900)}(n))?/^\s/.test(i[e+1])||/\s$/.test(i[e])?i[e+1]=i[e]+i[e+1]:i[e+1]=i[e]+" "+i[e+1]:i[e]&&i[e].length>0&&(t.push(i[e]),i[e]="");var n;return 0===t.length?[e]:t}(e.wiki);t=t.map(se),t[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},ce=/.*rowspan *= *["']?([0-9]+)["']?[ |]*/,ue=/.*colspan *= *["']?([0-9]+)["']?[ |]*/,me=function(e){return e=function(e){return e.forEach(((t,i)=>{t.forEach(((a,n)=>{let r=a.match(ce);if(null!==r){let o=parseInt(r[1],10);a=a.replace(ce,""),t[n]=a;for(let t=i+1;t{e.forEach(((t,i)=>{let a=t.match(ue);if(null!==a){let n=parseInt(a[1],10);e[i]=t.replace(ue,"");for(let t=1;te.length>0))}(e))},pe=/^!/,de={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},he=function(e){return(e=se(e).text()).match(/\|/)&&(e=e.replace(/.*?\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},ge=function(e){if(e.length<=3)return[];let t=e[0].slice(0);t=t.map((e=>(e=se(e=e.replace(/^! */,"")).text(),e=(e=he(e)).toLowerCase())));for(let i=0;ie&&!0!==/^\|\+/.test(e))),!0===/^\{\|/.test(e[0])&&e.shift(),!0===/^\|\}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(let a=0;a0&&(t.push(i),i=[]);else{let e=n.charAt(0);"|"!==e&&"!"!==e||(n=n.substring(1)),n=n.split(/(?:\|\||!!)/),"!"===e&&(n[0]=e+n[0]),n.forEach((e=>{e=e.trim(),i.push(e)}))}}return i.length>0&&t.push(i),t}(e.replace(/\r/g,"").replace(/\n(\s*[^|!{\s])/g," $1").split(/\n/).map((e=>e.trim())));if(t=t.filter((e=>e)),0===t.length)return[];t=function(e){return e.filter((e=>1!==e.length||!e[0]||!pe.test(e[0])||!1!==/rowspan/i.test(e[0])))}(t),t=me(t);let i=function(e=[]){let t=[];var i;(i=(i=e[0])||[]).length-i.filter((e=>e)).length>3&&e.shift();let a=e[0];return a&&a[0]&&a[1]&&(/^!/.test(a[0])||/^!/.test(a[1]))&&(t=a.map((e=>(e=e.replace(/^! */,""),he(e)))),e.shift()),a=e[0],a&&a[0]&&a[1]&&/^!/.test(a[0])&&/^!/.test(a[1])&&(a.forEach(((e,i)=>{e=e.replace(/^! */,""),e=he(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(t);if(!i||i.length<=1){i=ge(t);let e=t[t.length-1]||[];i.length<=1&&e.length>2&&(i=ge(t.slice(1)),i.length>0&&(t=t.slice(2)))}let a=t.map((e=>function(e,t){let i={};return e.forEach(((e,a)=>{let n=t[a]||"col"+(a+1),r=se(e);r.text(he(r.text())),i[n]=r})),i}(e,i)));return a},fe={},ke=function(e=""){return e=(e=(e=(e=e.toLowerCase()).replace(/[_-]/g," ")).replace(/\(.*?\)/,"")).trim()},we=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_wiki",{enumerable:!1,value:t})},ye={links(e){let t=[];if(this.data.forEach((e=>{Object.keys(e).forEach((i=>{t=t.concat(e[i].links())}))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},get(e){let t=this.data[0]||{},i=Object.keys(t).reduce(((e,t)=>(e[ke(t)]=t,e)),{});if("string"==typeof e){let t=ke(e);return t=i[t]||t,this.data.map((e=>e[t]?e[t].text():null))}return e=e.map(ke).map((e=>i[e]||e)),this.data.map((t=>e.reduce(((e,i)=>(t[i]?e[i]=t[i].text():e[i]="",e)),{})))},keyValue(e){let t=this.json(e);return t.forEach((e=>{Object.keys(e).forEach((t=>{e[t]=e[t].text}))})),t},json(e){return e=p(e,fe),function(e,t){return e.map((e=>{let i={};return Object.keys(e).forEach((t=>{i[t]=e[t].json()})),!0===t.encode&&(i=W(i)),i}))}(this.data,e)},text:()=>"",wikitext(){return this._wiki||""}};ye.keyvalue=ye.keyValue,ye.keyval=ye.keyValue,Object.keys(ye).forEach((e=>{we.prototype[e]=ye[e]}));const $e=/^\s*\{\|/,xe=/^\s*\|\}/,ve={sentences:!0},je={sentences:!0,lists:!0,images:!0},_e=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},ze={sentences:function(){return this.data.sentences||[]},references:function(){return this.data.references},lists:function(){return this.data.lists},images(){return this.data.images||[]},links:function(e){let t=[];if(this.sentences().forEach((i=>{t=t.concat(i.links(e))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},interwiki(){let e=[];return this.sentences().forEach((t=>{e=e.concat(t.interwiki())})),e||[]},text:function(e){e=p(e,je);let t=this.sentences().map((t=>t.text(e))).join(" ");return this.lists().forEach((e=>{t+="\n"+e.text()})),t},json:function(e){return function(e,t){let i={};return!0===(t=p(t,ve)).sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,je))},wikitext:function(){return this.data.wiki}};ze.citations=ze.references,Object.keys(ze).forEach((e=>{_e.prototype[e]=ze[e]}));const Oe={sentences:"sentence",references:"reference",citations:"citation",lists:"list",images:"image",links:"link"};Object.keys(Oe).forEach((e=>{_e.prototype[Oe[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}}));const Ee=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},qe=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},Ne=/^[\p{Letter}0-9._/\- '()\t]+=/iu,Se={template:!0,list:!0,prototype:!0},Ce=function(e,t){let i=0;return e.reduce(((e,a="")=>{if(a=a.trim(),!0===Ne.test(a)){let t=function(e){let t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();let a=t.slice(1).join("=");return Se.hasOwnProperty(i)&&(i="_"+i),{key:i,val:a.trim()}}(a);if(t.key)return e[t.key]&&!t.val||(e[t.key]=t.val),e}if(t&&t[i]){e[t[i]]=a}else e.list=e.list||[],e.list.push(a);return i+=1,e}),{})},Le={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Ae=function(e,t){let i=se(e);return"json"===t?i.json():"raw"===t?i:i.text()},Pe=function(e,t=[],i){let a=function(e){let t=e.split(/\n?\|/);t.forEach(((e,i)=>{null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)})),t=t.filter((e=>null!==e)),t=t.map((e=>(e||"").trim()));for(let e=t.length-1;e>=0;e-=1){""===t[e]&&t.pop();break}return t}(e=Ee(e||"")),n=a.shift(),r=Ce(a,t);return r=function(e){return Object.keys(e).forEach((t=>{!0===Le[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e}(r),r[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((e=>{r[e]="list"!==e?Ae(r[e],i):r[e].map((e=>Ae(e,i)))})),n&&(r.template=qe(n)),r};const De=new RegExp("("+g.join("|")+"):","i");let Te=`(${g.join("|")})`;const Ie=new RegExp(Te+":(.+?)[\\||\\]]","iu"),Me=/^\[\[:/,Re={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},Ue=function(e,t){let i=e.wiki,a=function(e){let t=[],i=[];const a=e.split("");let n=0;for(let r=0;r0){let e=0,a=0;for(let t=0;ta&&i.push("]"),t.push(i.join("")),i=[]}}return t}(i);a.forEach((function(a){if(!0===De.test(a)){e.images=e.images||[];let n=function(e,t){let i=e.match(Ie);if(null===i||!i[2])return null;if(Me.test(e))return null;let a=`${i[1]}:${i[2]||""}`;if(a){let i={file:a,lang:t._lang,domain:t._domain,wiki:e,pluginData:{}};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");let n=Pe(e),r=n.list||[];return n.alt&&(i.alt=n.alt),r=r.filter((e=>!1===Re.hasOwnProperty(e))),r[r.length-1]&&(i.caption=se(r[r.length-1])),new _(i)}return null}(a,t);n&&(e.images.push(n),i=i.replace(a,""))}})),e.wiki=i},Fe={},Be=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},Ke={lines(){return this.data},links(e){let t=[];if(this.lines().forEach((e=>{t=t.concat(e.links())})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},json(e){return e=p(e,Fe),this.lines().map((t=>t.json(e)))},text(){return((e,t)=>e.map((e=>" * "+e.text(t))).join("\n"))(this.data)},wikitext(){return this.wiki||""}};Object.keys(Ke).forEach((e=>{Be.prototype[e]=Ke[e]}));const We=/^[#*:;|]+/,He=/^\*+[^:,|]{4}/,Ye=/^ ?#[^:,|]{4}/,Ze=/[\p{Letter}_0-9\]}]/iu,Ge=function(e){return We.test(e)||He.test(e)||Ye.test(e)},Ve=function(e,t){let i=[];for(let a=t;ae&&Ze.test(e))),i=function(e){let t=1;e=e.filter((e=>e));for(let i=0;ie&&e.trim().length>0)),a=a.map((e=>{let i={wiki:e,lists:[],sentences:[],images:[]};return function(e){let t=e.wiki,i=t.split(/\n/g),a=[],n=[];for(let e=0;e0&&(a.push(t),e+=t.length-1)}else n.push(i[e]);e.lists=a.map((e=>new Be(e,t))),e.wiki=n.join("\n")}(i),Ue(i,t),le(i),new _e(i)})),e._wiki=i,e._paragraphs=a},Qe="{",et=function(e){let t=0,i=[],a=[];for(let n=e.indexOf(Qe);-1!==n&&n0?n++:n=e.indexOf(Qe,n+1)){let r=e[n];if(r===Qe&&(t+=1),t>0){if("}"===r&&(t-=1,0===t)){a.push(r);let e=a.join("");a=[],/\{\{/.test(e)&&/\}\}/.test(e)&&i.push(e);continue}if(1===t&&r!==Qe&&"}"!==r){t=0,a=[];continue}a.push(r)}}return i},tt=function(e){let t=null;return t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1],t&&(t=t.replace(/:.*/,""),t=qe(t)),t||null},it=/\{\{/,at=function(e){return{body:e,name:tt(e),children:[]}},nt=function(e){let t=e.body.substr(2);return t=t.replace(/\}\}$/,""),e.children=et(t),e.children=e.children.map(at),0===e.children.length||e.children.forEach((e=>{let t=e.body.substr(2);return it.test(t)?nt(e):null})),e},rt=function(e){let t=et(e);return t=t.map(at),t=t.map(nt),t},ot=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce(((e,t)=>(e[t]=!0,e)),{});var st={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0};const lt=new RegExp("^(subst.)?("+b.join("|")+")(?=:| |\n|$)","i");b.forEach((e=>{st[e]=!0}));const ct=/^infobox /i,ut=/ infobox$/i,mt=/^year in [A-Z]/i,pt=function(e={}){let t=e.template.match(lt),i=e.template;t&&t[0]&&(i=i.replace(t[0],"")),i=i.trim();let a={template:"infobox",type:i,data:e};return delete a.data.template,delete a.data.list,a};let dt={imdb:"imdb name","imdb episodes":"imdb episode",localday:"currentday",localdayname:"currentdayname",localyear:"currentyear","birth date based on age at death":"birth based on age as of date","bare anchored list":"anchored list",cvt:"convert",cricon:"flagicon",sfrac:"frac",sqrt:"radic","unreferenced section":"unreferenced",redir:"redirect",sisterlinks:"sister project links","main article":"main",by:"baseball year",aldsy:"alds year",nldsy:"nlds year","str rep":"replace",ushr2:"ushr",stn:"station",metrod:"metro",fw:"ferry",rws:"stnlnk",sclass2:"sclass",under:"underline",brackets:"bracket",raise:"lower"},ht={date:["byline","dateline"],citation:["cite","source","source-pr","source-science"],"no spam":["email","@","no spam blue"],"lrt station":["lrt","lrts"],"mrt station":["mrt","mrts"],flagcountry:["cr","cr-rt"],trunc:["str left","str crop"],percentage:["pct","percentage"],rnd:["rndfrac","rndnear"],abbr:["tooltip","abbrv","define"],sfn:["sfnref","harvid","harvnb"],"birth date and age":["death date and age","bda"],currentmonth:["localmonth","currentmonthname","currentmonthabbrev"],currency:["monnaie","unité","nombre","nb","iso4217"],coord:["coor","coor title dms","coor title dec","coor dms","coor dm","coor dec"],"columns-list":["cmn","col-list","columnslist","collist"],nihongo:["nihongo2","nihongo3","nihongo-s","nihongo foot"],plainlist:["flatlist","plain list"],"winning percentage":["winpct","winperc"],"collapsible list":["nblist","nonbulleted list","ubl","ublist","ubt","unbullet","unbulleted list","unbulleted","unbulletedlist","vunblist"],"election box begin":["election box begin no change","election box begin no party","election box begin no party no change","election box inline begin","election box inline begin no change"],"election box candidate":["election box candidate for alliance","election box candidate minor party","election box candidate no party link no change","election box candidate with party link","election box candidate with party link coalition 1918","election box candidate with party link no change","election box inline candidate","election box inline candidate no change","election box inline candidate with party link","election box inline candidate with party link no change","election box inline incumbent"],"4teambracket":["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"],start:["end","birth","death","start date","end date","birth date","death date","start date and age","end date and age","dob"],"start-date":["end-date","birth-date","death-date","birth-date and age","birth-date and given age","death-date and age","death-date and given age"],tl:["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","xpd","para","elc","xtag","mli","mlix","url"],done:["resolved mark large","implemented","pimplemented","resolved mark","accepted","agree","approved","checked2","verified","conditional yes","confirmed","confirmed-nc","tallyho","tick","helped","doneu|example","edited2","donetask","unprod","autp","responded","sure","merge done","marked","pass","aye","yes check","y&","yeac","yeag"],xmark:["expired","deleted","not done","not done empty request","not done unclear","not done not likely","stale-small","smallrejected","x mark","nay","no mark","not done-t","fail","n&","x mark-n","xed box","cancelled","deleted-image","already declined","opblocked","user-blocked","notabug","notfixed","won't fix","withdraw","nojoy","unrelated","off-topic talk","nayc","nayg"],checked:["already done","resolved1","check mark-n","checked box"],"station link":["amtk","cta","bts","mnrr","mtams","munis","njts","scax","wmata","rwsa"]};Object.keys(O).forEach((e=>{dt["ipa-"+e]="ipa",dt["ipac-"+e]="ipac"})),Object.keys(ht).forEach((e=>{ht[e].forEach((t=>{dt[t]=e}))}));var gt={"·":"·",dot:"·",middot:"·","•":" • ",",":",","=":"=","1/2":"1⁄2","1/3":"1⁄3","2/3":"2⁄3","1/4":"1⁄4","3/4":"3⁄4","–":"–",ndash:"–","en dash":"–","spaced ndash":" – ","—":"—",mdash:"—",spd:" – ","em dash":"—","number sign":"#","hash-tag":"#",ibeam:"I","&":"&",";":";",ampersand:"&",dagger:"†","double-dagger":"‡",snds:" – ",snd:" – ","^":" ","!":"|","'":"'","\\":" /","`":"`","[":"[","*":"*",asterisk:"*","long dash":"———",clear:"\n\n","h.":"ḥ",profit:"▲",loss:"▼",gain:"▲",ell:"ℓ","1~":"~","2~":"~~","3~":"~~~","4~":"~~~~","5~":"~~~~~",goldmedal:"🥇",silvermedal:"🥈",bronzemedal:"🥉",done:"✅",xmark:"❌",checked:"✔️","thumbs up":"👍","thumbs down":"👎",minusplus:"∓",plusminus:"±"};let bt={p1:0,p2:1,p3:2,resize:1,lang:1,"rtl-lang":1,l:2,h:1,sort:1};["defn","lino","finedetail","nobold","noitalic","nocaps","vanchor","rnd","date","taste","monthname","baseball secondary style","nowrap","nobr","big","cquote","pull quote","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code","char","angle bracket","angbr","symb","dabsearch","key press","nowiki","nowiki2","unstrip","unstripnowiki","plain text","make code","killmarkers","longitem","longlink","strikethrough","underline","uuline","not a typo","text","resize","var serif","double underline","nee","ne","left","right","center","centered","justify","smalldiv","bold div","monodiv","italic div","bigdiv","strikethroughdiv","strikethrough color","pbpe"].forEach((e=>{bt[e]=0}));["line-height"].forEach((e=>{bt[e]=1}));let ft={};["mv","m/v","gts","hsc","ms","m/s","my","m/y","ps","rms","rv","r/v","sb","ss","s/s","sv","s/v","sy","s/y","tss","ans","hmas","hmbs","bns","hmcs","ccgs","arc","hdms","bae","ens","eml","rfns","fns","hs","sms","smu","gs","icgv","ins","kri","lé","jsub","jds","js","hnlms","hmnzs","nns","hnoms","hmpngs","bap","rps","brp","orp","nrp","nms","rss","sas","hmsas","roks","hswms","htms","tcg","hms","hmt","rfaux","usat","uscgc","usns","usrc","uss","usav"].forEach((e=>{ft[e]=t=>{let{name:i,id:a}=Pe(t,["name","id"]);return a?`[[${e.toUpperCase()} ${i} (${a})]]`:`[[${e.toUpperCase()} ${i}]]`}}));const kt=function(e){if(!e.numerator&&!e.denominator)return null;let t=Number(e.numerator)/Number(e.denominator);return t*=100,Number(e.decimals),parseInt(t,10)},wt=function(e=""){if("number"==typeof e)return e;e=(e=e.replace(/,/g,"")).replace(/−/g,"-");let t=Number(e);return isNaN(t)?e:t},yt=function(e){let t=e.match(/ipac?-(.+)/);return null!==t?!0===O.hasOwnProperty(t[1])?O[t[1]].english_title:t[1]:null},$t=e=>e.charAt(0).toUpperCase()+e.substring(1),xt=function(e){let t=e%10,i=e%100;return 1===t&&11!==i?e+"st":2===t&&12!==i?e+"nd":3===t&&13!==i?e+"rd":e+"th"},vt={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"};var jt={ra:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:e=>(Pe(e,["degrees"]).degrees||"")+"°",hms2deg:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:e=>{let t=Pe(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},sortname:e=>{let t=Pe(e,["first","last","target","sort"]),i=`${t.first||""} ${t.last||""}`;return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=` (${t.dab})`,t.target&&(t.target+=` (${t.dab})`)),t.target?`[[${t.target}|${i}]]`:`[[${i}]]`)},"first word":e=>{let t=Pe(e,["text"]),i=t.text||"";return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:e=>{let t=Pe(e,["str","len"]);return(t.str||"").substr(0,t.len)},"str mid":e=>{let t=Pe(e,["str","start","end"]),i=parseInt(t.start,10)-1,a=parseInt(t.end,10);return t.str.substr(i,a)},reign:e=>{let t=Pe(e,["start","end"]);return`(r. ${t.start} – ${t.end})`},circa:e=>{let{year:t}=Pe(e,["year"]);return t?`c. ${t}`:"c. "},"decade link":e=>{let{year:t}=Pe(e,["year"]);return`${t}|${t}s`},decade:e=>{let t=Pe(e,["year"]),i=Number(t.year);return i=10*Math.floor(i/10),`${i}s`},century:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/100)+1,`${i}`},radic:e=>{let t=Pe(e,["after","before"]);return`${t.before||""}√${t.after||""}`},"medical cases chart/row":e=>e,oldstyledate:e=>{let t=Pe(e,["date","year"]);return t.year?t.date+" "+t.year:t.date},braces:e=>{let t=Pe(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},hlist:e=>{let t=Pe(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:e=>(Pe(e).list||[]).join(", "),catlist:e=>(Pe(e).list||[]).join(", "),"br separated entries":e=>(Pe(e).list||[]).join("\n\n"),"comma separated entries":e=>(Pe(e).list||[]).join(", "),"anchored list":e=>{let t=Pe(e).list||[];return t=t.map(((e,t)=>`${t+1}. ${e}`)),t.join("\n\n")},"bulleted list":e=>{let t=Pe(e).list||[];return t=t.filter((e=>e)),t=t.map((e=>"• "+e)),t.join("\n\n")},plainlist:e=>{let t=(e=Ee(e)).split("|").slice(1);return t=t.join("|").split(/\n ?\* ?/),t=t.filter((e=>e)),t.join("\n\n")},term:e=>`${Pe(e,["term"]).term}:`,linum:e=>{let{num:t,text:i}=Pe(e,["num","text"]);return`${t}. ${i}`},"block indent":e=>{let t=Pe(e);return t[1]?"\n"+t[1]+"\n":""},lbs:e=>{let t=Pe(e,["text"]);return`[[${t.text} Lifeboat Station|${t.text}]]`},lbc:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}-class]]`},lbb:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}]]`},"#dateformat":e=>(e=e.replace(/:/,"|"),Pe(e,["date","format"]).date),lc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toLowerCase()),uc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toUpperCase()),lcfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},ucfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbrlink:e=>{let t=Pe(e,["abbr","page"]);return t.page?`[[${t.page}|${t.abbr}]]`:`[[${t.abbr}]]`},own:e=>{let t=Pe(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},formatnum:e=>{e=e.replace(/:/,"|");let t=Pe(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},frac:e=>{let t=Pe(e,["a","b","c"]);return t.c?`${t.a} ${t.b}/${t.c}`:t.b?`${t.a}/${t.b}`:`1/${t.b}`},convert:e=>{let t=Pe(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?`${t.num} ${t.two} ${t.three} ${t.four}`:`${t.num} ${t.two} ${t.three}`:`${t.num} ${t.two}`},tl:e=>{let t=Pe(e,["first","second"]);return t.second||t.first},won:e=>{let t=Pe(e,["text"]);return t.place||t.text||$t(t.template)},tag:e=>{let t=Pe(e,["tag","open"]);const i={span:!0,div:!0,p:!0};return t.open&&"pair"!==t.open?"":i[t.tag]?t.content||"":`<${t.tag} ${t.attribs||""}>${t.content||""}`},plural:e=>{e=e.replace(/plural:/,"plural|");let t=Pe(e,["num","word"]),i=Number(t.num),a=t.word;return 1!==i&&(/.y$/.test(a)?a=a.replace(/y$/,"ies"):a+="s"),i+" "+a},dec:e=>{let t=Pe(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:e=>{let t=Pe(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());let a=i||"";return t.p&&(a=t.p+a),t.s&&(a=t.s+a),(t.u||t.ul||t.upl)&&(a=a+" "+(t.u||t.ul||t.upl)),a},percentage:e=>{let t=Pe(e,["numerator","denominator","decimals"]),i=kt(t);return null===i?"":i+"%"},small:e=>{let t=Pe(e);return t.list&&t.list[0]?t.list[0]:""},"percent-done":e=>{let t=Pe(e,["done","total","digits"]),i=kt({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":`${t.done} (${i}%) done`},loop:e=>{let t=Pe(e,["times","text"]),i=Number(t.times)||0,a="";for(let e=0;e{let t=Pe(e,["text"]);return String((t.text||"").trim().length)},digits:e=>(Pe(e,["text"]).text||"").replace(/[^0-9]/g,""),"last word":e=>{let t=(Pe(e,["text"]).text||"").split(/ /g);return t[t.length-1]||""},replace:e=>{let t=Pe(e,["text","from","to"]);return t.from&&t.to?(t.text||"").replace(t.from,t.to):t.text||""},"title case":e=>(Pe(e,["text"]).text||"").split(/ /).map(((e,t)=>t>0&&"the"===e||"of"===e?e:$t(e))).join(" "),"no spam":e=>{let t=Pe(e,["account","domain"]);return`${t.account||""}@${t.domain}`},"baseball year":e=>{let t=Pe(e,["year"]).year||"";return`[[${t} in baseball|${t}]]`},"mlb year":e=>{let t=Pe(e,["year"]).year||"";return`[[${t} Major League Baseball season|${t}]]`},"nlds year":e=>{let{year:t}=Pe(e,["year"]);return`[[${t||""} National League Division Series|${t}]]`},"alds year":e=>{let{year:t}=Pe(e,["year"]);return`[[${t||""} American League Division Series|${t}]]`},"nfl year":e=>{let{year:t,other:i}=Pe(e,["year","other"]);return i&&t?`[[${t} NFL season|${t}]]–[[${i} NFL season|${i}]]`:`[[${t||""} NFL season|${t}]]`},"nfl playoff year":e=>{let{year:t}=Pe(e,["year"]);return t=Number(t),`[[${t}–${t+1} NFL playoffs|${t}]]`},"nba year":e=>{let{year:t}=Pe(e,["year"]);t=Number(t);let i=t+1;return`[[${t}–${i} NBA season|${t}–${i}]]`},"mhl year":e=>{let t=Pe(e,["year"]),i=Number(t.year),a=i+1;return`[[${i}–${a} NHL season|${i}–${a}]]`},min:e=>{let t=Pe(e).list||[],i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t{let t=Pe(e).list,i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t>i&&(i=t)})),String(i)},uspolabbr:e=>{let{party:t,state:i,house:a}=Pe(e,["party","state","house","link"]);if(!t||!i)return"";let n=`${t}‑${i}`;return a&&(n+=` ${xt(a)}`),n},ushr:e=>{let{state:t,num:i,type:a}=Pe(e,["state","num","type"]),n="";if("AL"!==i)return i=xt(Number(i)),`${t}'s ${i} congressional district`;if(n=`${t}'s at-large congressional district`,a){if(a=a.toLowerCase(),i="AL"===i?"At-large":i,"e"===a)return`[[${n}|${i}]]`;if("u"===a)return`[[${n}|${t}]]`;if("b"===a||"x"===a)return`[[${n}|${t} ${i}]]`}return`[[${n}]]`},metro:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},station:e=>{let{name:t,dab:i}=Pe(e,["name","x","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},bssrws:e=>{let{one:t,two:i}=Pe(e,["one","two"]),a=t;return i&&(a+=" "+i),`[[${a} railway station|${a}]]`},stnlnk:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} railway station (${i})|${t}]]`:`[[${t} railway station|${t}]]`},"station link":e=>{let{station:t,system:i}=Pe(e,["system","station"]);return t||i},"line link":e=>{let{station:t,system:i}=Pe(e,["system","station"]);return t||i},subway:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} subway station|${t}]]`},"lrt station":e=>{let{name:t}=Pe(e,["name"]);return`[[${t} LRT station|${t}]]`},"mrt station":e=>{let{name:t}=Pe(e,["name"]);return`[[${t} MRT station|${t}]]`},rht:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} railway halt|${t}]]`},ferry:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} ferry wharf|${t}]]`},tram:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} tram stop (${i})|${t}]]`:`[[${t} tram stop|${t}]]`},tstop:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} ${i} stop|${t}]]`:`[[${t} stop|${t}]]`},ship:e=>{let{prefix:t,name:i,id:a}=Pe(e,["prefix","name","id"]);return t=t||"",`[[${t.toUpperCase()} ${i}]]`},sclass:e=>{let{cl:t,type:i}=Pe(e,["cl","type","fmt"]);return`[[${t}-class ${i} |''${t}''-class]] [[${i}]]`},"center block":e=>{let{txt:t}=Pe(e,["txt"]);return t||""},align:e=>{let{txt:t}=Pe(e,["dir","txt"]);return t||""},font:e=>{let{txt:t}=Pe(e,["txt"]);return t||""},float:e=>{let{txt:t,dir:i}=Pe(e,["dir","txt"]);return t?t||"":i},lower:e=>{let{txt:t,n:i}=Pe(e,["n","txt"]);return t?t||"":i},splitspan:e=>{let{left:t,right:i}=Pe(e,["left","right"]);return(t||"")+"\n"+(i||"")},bracket:e=>{let{word:t}=Pe(e,["word"]);return t?`[${t}]`:"["},"in title":e=>{let{title:t,text:i}=Pe(e,["title","text"]);return i||(t?`All pages with titles containing ${t}`:"")},"look from":e=>{let{title:t,text:i}=Pe(e,["title","text"]);return i||(t?`All pages with titles beginning with ${t}`:"")}};let _t={};["sr-latn-cyrl","sr-cyrl-latn","sr-latn","sr-cyrl","sr-cyr","sh-latn-cyrl","sh-cyrl-latn","sh-latn","sh-cyrl","cel-1bd","cel-x-proto","en-emodeng","de-at","de-ch","gem-x-proto","gsw-fr","nds-nl","nl-be","ku-arab","ku-cyrl","pt-br","fra-frc","fra-que","roa-leo","roa-nor","ca-valencia","ast-leo","grc-gre","grc-x-doric","grc-x-proto","grc-x-medieval","cpg","gmy","grc","grk-x-proto","pnt","mga","owl","pgl","sga","wlm","xbm","xcb","xcg","xpi","aae","aln","sq-definite","bs-cyrl","hsb","ltg","orv","prg","rsk","rue","rus","sgs","sla","szl","wen","aoa","chn","cri","dlm","egl","fax","frc","frm","fro","fr-gallo","oc-gascon","gcf","gcr","ist","la-x-medieval","lij-mc","lld","lou","mfe","mol","mwl","mxi","nrf","osc","osp","pcd","pln","rcf","rgn","roa","ruo","rup","ruq","sdc","sdn","src","sro","xvo","bzj","cim","dum","enm","frk","frr","frs","gmh","gml","gmw","goh","gos","gsw","gyn","icr","jam","kri","lng","nb","non","nrn","odt","ofs","osx","pey","sli","srm","srn","stq","swg","vmf","wae","wep","wes","zea","hmd","hoc","kha","mnw","mtq","vi-chunom","vi-hantu","mvi","rys","ryu","yoi","ace","akl","ami","bew","bik","bjn","bya","cal","cbk","cjm","coa","cyo","dev","fil","gad","hil","iba","ibg","ibl","ilp","itv","ivv","jax","kne","krj","kxd","ljp","mad","mak","mdh","mrv","mrw","ms-arab","nia","niu","pau","pwn","rap","rar","sgd","su-fonts","szy","tao","tkl","tsg","tvl","uli","wls","xsb","yap","yka","ckt","itl","brh","oty","tcy","abq","ady","ddo","inh","kbd","lbe","lez","rut","tab","uby","udi","bai","bin","bsq","dag","dyu","efi","fan","fmp","fuc","fuf","gaa","ibb","kbp","kcg","kpo","ktu","lu","lua","lun","mkw","mos","oaa","sjo","ude","anm","bft","blk","brx","dng","kjp","kjz","ksw","lbj","lus","aae","aaq","abe","abq","aca","ace","acf","acm","acw","ady","ae","aeb","aec","aer","afb","aht","aii","aij","ain","aiq","akk","akl","akz","ale","aln","alq","alt","ami","anm","aoa","apj","apm","apw","ayn","arb","arh","ari","arn","arp","arq","ary","arz","asb","ath","ats","awa","axm","azb","azd","azj","bai","bal","ban","bax","bdz","bea","ber","bew","bft","bgn","bho","bik","bin","bjn","bla","blc","blk","bqi","brh","brx","bsk","bsq","bua","bvb","bya","bzj","cal","cay","cbk","ccp","chg","chm","chn","chp","cic","cim","ciw","cjm","cjs","ckb","ckt","cku","cld","clm","cmg","cmn","cms","cnu","coa","coc","coj","com","coo","cop","cpg","crg","crh","cri","crj","crk","crl","crm","cro","csw","csz","ctg","ctm","cyo","dag","dak","ddo","deh","del","den","dev","din","dlm","dng","dum","dyu","efi","egl","egy","elx","eml","ems","cmn","och","yue","mjw","mni","my-name-mlcts","nan","nwc","omp","otb","pwo","sip","xct","xsr","1ca","alt","az-arab","azb","azj","chg","cjs","crh","crh3","kaa","kjh","krc","kum","nog","ota","otk","sah","slr","sty","tt-arab","tt-cyrl","tt-latn","tyv","uniturk","chm","est-sea","fit","fkv","izh","jmy","koi","krl","liv","mdf","mhr","mrj","myv","olo","sia","sjd","sje","sjk","sjt","sju","sma","smi","smj","smn","sms","vep","vot","vro","yrk","din","luo","srr","sus","swh","umb","yao"].forEach((e=>{_t["lang-"+e]=0})),Object.keys(O).forEach((e=>{_t["lang-"+e]=0}));var zt=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","us","united states"],["🇺🇸","usa","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]];const Ot=["flag","variant"];let Et={flag:e=>{let t=Pe(e,Ot),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();let a=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${a[0]||""} [[${a[2]}|${i}]]`},flagcountry:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} [[${i[2]}]]`},flagcu:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} ${i[2]}`},flagicon:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`[[${i[2]}|${i[0]}]]`:""},flagdeco:e=>{let t=Pe(e,Ot);return t.flag=(t.flag||"").toLowerCase(),(zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[])[0]||""},fb:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${i[2]} national football team|${i[2]}]]`:""},fbicon:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?` [[${i[2]} national football team|${i[0]}]]`:""},flagathlete:e=>{let t=Pe(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${t.name||""}]] (${i[1].toUpperCase()})`:`[[${t.name||""}]]`}};zt.forEach((e=>{Et[e[1]]=()=>e[0]}));let qt={};["rh","rh2","yes","no","maybe","eliminated","lost","safe","active","site active","coming soon","good","won","nom","sho","longlisted","tba","success","operational","failure","partial","regional","maybecheck","partial success","partial failure","okay","yes-no","some","nonpartisan","pending","unofficial","unofficial2","usually","rarely","sometimes","any","varies","black","non-album single","unreleased","unknown","perhaps","depends","included","dropped","terminated","beta","table-experimental","free","proprietary","nonfree","needs","nightly","release-candidate","planned","scheduled","incorrect","no result","cmain","calso starring","crecurring","cguest","not yet","optional"].forEach((e=>{qt[e]=e=>{let t=Pe(e,["text"]);return t.text||$t(t.template)}}));[["active fire","Active"],["site active","Active"],["site inactive","Inactive"],["yes2",""],["no2",""],["ya","✅"],["na","❌"],["nom","Nominated"],["sho","Shortlisted"],["tba","TBA"],["maybecheck","✔️"],["okay","Neutral"],["n/a","N/A"],["sdash","—"],["dunno","?"],["draw",""],["cnone",""],["nocontest",""]].forEach((e=>{qt[e[0]]=t=>Pe(t,["text"]).text||e[1]}));var Nt=Object.assign({},gt,bt,ft,jt,_t,Et,qt);let St={};["goodreads author","twitter","facebook","instagram","tumblr","pinterest","espn nfl","espn nhl","espn fc","hockeydb","fifa player","worldcat","worldcat id","nfl player","ted speaker","playmate"].forEach((e=>{St[e]=["id","name"]}));let Ct={};["imdb title","imdb name","imdb episode","imdb event","afi film","allmovie title","allgame","tcmdb title","discogs artist","discogs label","discogs release","discogs master","librivox author","musicbrainz artist","musicbrainz label","musicbrainz recording","musicbrainz release","musicbrainz work","youtube","goodreads book","dmoz"].forEach((e=>{Ct[e]=["id","title","description","section"]}));var Lt={ipa:(e,t)=>{let i=Pe(e,["transcription","lang","audio"]);return i.lang=yt(i.template),i.template="ipa",t.push(i),""},ipac:(e,t)=>{let i=Pe(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=yt(i.template),i.template="ipac",t.push(i),""},quote:(e,t)=>{let i=Pe(e,["text","author"]);if(t.push(i),i.text){let e=`"${i.text}"`;return i.author&&(e+="\n\n",e+=` - ${i.author}`),e+"\n"}return""},"cite gnis":(e,t)=>{let i=Pe(e,["id","name","type"]);return i.type="gnis",i.template="citation",t.push(i),""},"spoken wikipedia":(e,t)=>{let i=Pe(e,["file","date"]);return i.template="audio",t.push(i),""},yel:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`yellow: ${i.min||""}'`:""},subon:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub on: ${i.min||""}'`:""},suboff:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub off: ${i.min||""}'`:""},sfn:(e,t,i,a)=>{let n=Pe(e,["author","year","location"]);return a&&(n.name=n.template,n.teplate=a),t.push(n),""},redirect:(e,t)=>{let i=Pe(e,["redirect"]),a=i.list||[],n=[];for(let e=0;e{let i=Pe(e),a={};Object.keys(vt).forEach((e=>{!0===i.hasOwnProperty(e)&&(a[vt[e]]=i[e])}));let n={template:"sister project links",links:a};return t.push(n),""},"subject bar":(e,t)=>{let i=Pe(e);Object.keys(i).forEach((e=>{vt.hasOwnProperty(e)&&(i[vt[e]]=i[e],delete i[e])}));let a={template:"subject bar",links:i};return t.push(a),""},gallery:(e,t)=>{let i=Pe(e),a=(i.list||[]).filter((e=>/^ *File ?:/.test(e)));return a=a.map((e=>new _({file:e}).json())),i={template:"gallery",images:a},t.push(i),""},sky:(e,t)=>{let i=Pe(e,["asc_hours","asc_minutes","asc_seconds","dec_sign","dec_degrees","dec_minutes","dec_seconds","distance"]),a={template:"sky",ascension:{hours:i.asc_hours,minutes:i.asc_minutes,seconds:i.asc_seconds},declination:{sign:i.dec_sign,degrees:i.dec_degrees,minutes:i.dec_minutes,seconds:i.dec_seconds},distance:i.distance};return t.push(a),""},"medical cases chart":(e,t)=>{let i=["date","deathsExpr","recoveriesExpr","casesExpr","4thExpr","5thExpr","col1","col1Change","col2","col2Change"],a=Pe(e);a.data=a.data||"";let n=a.data.split("\n").map((e=>{let t=e.split(";"),a={options:new Map},n=0;for(let e=0;e{let i=Pe(e);i.x&&(i.x=i.x.split(",").map((e=>e.trim()))),i.y&&(i.y=i.y.split(",").map((e=>e.trim())));let a=1;for(;i["y"+a];)i["y"+a]=i["y"+a].split(",").map((e=>e.trim())),a+=1;return t.push(i),""},"historical populations":(e,t)=>{let i=Pe(e);i.list=i.list||[];let a=[];for(let e=0;e{const i=/^jan /i,a=/^year /i;let n=Pe(e);const r=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];let o={},s=Object.keys(n).filter((e=>i.test(e)));s=s.map((e=>e.replace(i,""))),s.forEach((e=>{o[e]=[],r.forEach((t=>{let i=`${t} ${e}`;if(n.hasOwnProperty(i)){let t=wt(n[i]);delete n[i],o[e].push(t)}}))})),n.byMonth=o;let l={};return Object.keys(n).forEach((e=>{if(a.test(e)){let t=e.replace(a,"");l[t]=n[e],delete n[e]}})),n.byYear=l,t.push(n),""},"weather box/concise c":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>wt(e))),i.byMonth={"high c":i.list.slice(0,12),"low c":i.list.slice(12,24),"rain mm":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"weather box/concise f":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>wt(e))),i.byMonth={"high f":i.list.slice(0,12),"low f":i.list.slice(12,24),"rain inch":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"climate chart":(e,t)=>{let i=Pe(e).list||[],a=i[0],n=i[38];i=i.slice(1),i=i.map((e=>(e&&"−"===e[0]&&(e=e.replace(/−/,"-")),e)));let r=[];for(let e=0;e<36;e+=3)r.push({low:wt(i[e]),high:wt(i[e+1]),precip:wt(i[e+2])});let o={template:"climate chart",data:{title:a,source:n,months:r}};return t.push(o),""},medalcount:(e,t)=>{let i=Pe(e).list||[],a=[];for(let e=0;e{let i=Pe(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},legend:(e,t)=>{let i=Pe(e,["color","label"]);return t.push(i),e},isbn:(e,t)=>{let i=Pe(e,["id","id2","id3"]);return t.push(i),"ISBN "+(i.id||"")},"based on":(e,t)=>{let i=Pe(e,["title","author"]);return t.push(i),`${i.title} by ${i.author||""}`},"bbl to t":(e,t)=>{let i=Pe(e,["barrels"]);return t.push(i),"0"===i.barrels?i.barrels+" barrel":i.barrels+" barrels"},mpc:(e,t)=>{let i=Pe(e,["number","text"]);return t.push(i),`[https://minorplanetcenter.net/db_search/show_object?object_id=P/2011+NO1 ${i.text||i.number}]`},pengoal:(e,t)=>(t.push({template:"pengoal"}),"✅"),penmiss:(e,t)=>(t.push({template:"penmiss"}),"❌"),"ordered list":(e,t)=>{let i=Pe(e);return t.push(i),i.list=i.list||[],i.list.map(((e,t)=>`${t+1}. ${e}`)).join("\n\n")},"title year":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b[0-9]{4}\b/);if(e)return e[0]}return r.nomatch||""},"title century":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)(st|nd|rd|th)\b/);if(e)return e[1]||""}return r.nomatch||""},"title decade":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)s\b/);if(e)return e[1]||""}return r.nomatch||""},nihongo:(e,t)=>{let i=Pe(e,["english","kanji","romaji","extra"]);t.push(i);let a=i.english||i.romaji||"";return i.kanji&&(a+=` (${i.kanji})`),a},marriage:(e,t)=>{let i=Pe(e,["spouse","from","to","end"]);t.push(i);let a=i.spouse||"";return i.from&&(i.to?a+=` (m. ${i.from}-${i.to})`:a+=` (m. ${i.from})`),a},"sent off":(e,t)=>{let i=Pe(e,["cards"]),a={template:"sent off",cards:i.cards,minutes:i.list||[]};return t.push(a),"sent off: "+a.minutes.map((e=>e+"'")).join(", ")},transl:(e,t)=>{let i=Pe(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""},"collapsible list":(e,t)=>{let i=Pe(e);t.push(i);let a="";if(i.title&&(a+=`'''${i.title}'''\n\n`),!i.list){i.list=[];for(let e=1;e<10;e+=1)i[e]&&(i.list.push(i[e]),delete i[e])}return i.list=i.list.filter((e=>e)),a+=i.list.join("\n\n"),a},"columns-list":(e,t)=>{let i=((Pe(e).list||[])[0]||"").split(/\n/).filter((e=>e));return i=i.map((e=>e.replace(/\*/,""))),t.push({template:"columns-list",list:i}),i=i.map((e=>"• "+e)),i.join("\n\n")},height:(e,t)=>{let i=Pe(e);t.push(i);let a=[];return["m","cm","ft","in"].forEach((e=>{!0===i.hasOwnProperty(e)&&a.push(i[e]+e)})),a.join(" ")},sic:(e,t)=>{let i=Pe(e,["one","two","three"]),a=(i.one||"")+(i.two||"");return"?"===i.one&&(a=(i.two||"")+(i.three||"")),t.push({template:"sic",word:a}),"y"===i.nolink?a:`${a} [sic]`},inrconvert:(e,t)=>{let i=Pe(e,["rupee_value","currency_formatting"]);t.push(i);const a={k:1e3,m:1e6,b:1e9,t:1e12,l:1e5,c:1e7,lc:1e12};if(i.currency_formatting){let e=a[i.currency_formatting]||1;i.rupee_value=i.rupee_value*e}return`inr ${i.rupee_value||""}`},frac:(e,t)=>{let i=Pe(e,["a","b","c"]),a={template:"sfrac"};return i.c?(a.integer=i.a,a.numerator=i.b,a.denominator=i.c):i.b?(a.numerator=i.a,a.denominator=i.b):(a.numerator=1,a.denominator=i.a),t.push(a),a.integer?`${a.integer} ${a.numerator}⁄${a.denominator}`:`${a.numerator}⁄${a.denominator}`},"winning percentage":(e,t)=>{let i=Pe(e,["wins","losses","ties"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=Number(i.ties)||0,o=a+n+r;"y"===i.ignore_ties&&(r=0),r&&(a+=r/2);let s=kt({numerator:a,denominator:o,decimals:1});return null===s?"":"."+10*s},winlosspct:(e,t)=>{let i=Pe(e,["wins","losses"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=kt({numerator:a,denominator:a+n,decimals:1});return null===r?"":`${a||0} || ${n||0} || ${"."+10*r||"-"}`},"video game release":(e,t)=>{let i=["region","date","region2","date2","region3","date3","region4","date4"],a=Pe(e,i),n={template:"video game release",releases:[]};for(let e=0;e`${e.region}: ${e.date||""}`)).join("\n\n")+"\n"},uss:(e,t)=>{let i=Pe(e,["name","id"]);return t.push(i),i.id?`[[USS ${i.name} (${i.id})|USS ''${i.name}'' (${i.id})]]`:`[[USS ${i.name}|USS ''${i.name}'']]`},blockquote:(e,t)=>{let i=Pe(e,["text","author","title","source","character"]);t.push(i);let a=i.text;a||(i.list=i.list||[],a=i.list[0]||"");let n=a.replace(/"/g,"'");return n='"'+n+'"',n}};const It={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},Mt=(e,t)=>{let i=Pe(e,["amount","code"]);t.push(i);let a=i.template||"";"currency"===a?(a=i.code,a||(i.code=a="usd")):""!==a&&"monnaie"!==a&&"unité"!==a&&"nombre"!==a&&"nb"!==a||(a=i.code),a=(a||"").toLowerCase(),"us"===a?i.code=a="usd":"uk"===a&&(i.code=a="gbp");let n=`${It[a]||""}${i.amount||""}`;return i.code&&!It[i.code.toLowerCase()]&&(n+=" "+i.code),n};let Rt={currency:Mt};Object.keys(It).forEach((e=>{Rt[e]=Mt}));const Ut=864e5,Ft=30*Ut,Bt=365*Ut,Kt=function(e){return new Date(`${e.year}-${e.month||0}-${e.date||1}`).getTime()},Wt=function(e,t){e=Kt(e);let i=(t=Kt(t))-e,a={},n=Math.floor(i/Bt);n>0&&(a.years=n,i-=a.years*Bt);let r=Math.floor(i/Ft);r>0&&(a.months=r,i-=a.months*Ft);let o=Math.floor(i/Ut);return o>0&&(a.days=o),a},Ht=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Yt=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],Zt=Yt.reduce(((e,t,i)=>(0===i||(e[t.toLowerCase()]=i,e[t.substring(0,3).toLowerCase()]=i),e)),{}),Gt=function(e){let t={},i=["year","month","date","hour","minute","second"];for(let a=0;a{let i=Pe(e,["year","month","date","hour","minute","second","timezone"]),a=Gt([i.year,i.month,i.date||i.day]);return i.text=Jt(a),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=` (${i.timezone})`),i.hour&&i.minute&&(i.second?i.text=`${i.hour}:${i.minute}:${i.second}, `+i.text:i.text=`${i.hour}:${i.minute}, `+i.text),i.text&&t.push(Xt(i)),i.text},natural_date:(e,t)=>{let i=Pe(e,["text"]).text||"",a={};if(/^[0-9]{4}$/.test(i))a.year=parseInt(i,10);else{let e=i.replace(/[a-z]+\/[a-z]+/i,"");e=e.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");let t=new Date(e);!1===isNaN(t.getTime())&&(a.year=t.getFullYear(),a.month=t.getMonth()+1,a.date=t.getDate())}return t.push(Xt(a)),i.trim()},one_year:(e,t)=>{let i=Pe(e,["year"]),a=Number(i.year);return t.push(Xt({year:a})),String(a)},two_dates:(e,t)=>{let i=Pe(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){let e=Gt([i.birth_year,i.birth_month,i.birth_date]);return t.push(Xt(e)),Jt(e)}let a=Gt([i.death_year,i.death_month,i.death_date]);return t.push(Xt(a)),Jt(a)},age:e=>{let t=Qt(e);return Wt(t.from,t.to).years||0},"diff-y":e=>{let t=Qt(e),i=Wt(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),a.join(", ")},"diff-ymd":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-yd":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-d":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")}},ti=["January","February","March","April","May","June","July","August","September","October","November","December"];var ii={currentday:()=>{let e=new Date;return String(e.getDate())},currentdayname:()=>{let e=new Date;return Ht[e.getDay()]},currentmonth:()=>{let e=new Date;return ti[e.getMonth()]},currentyear:()=>{let e=new Date;return String(e.getFullYear())},monthyear:()=>{let e=new Date;return ti[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":()=>{let e=new Date;return e.setMonth(e.getMonth()-1),ti[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":()=>{let e=new Date;return e.setMonth(e.getMonth()+1),ti[e.getMonth()]+" "+e.getFullYear()},year:e=>{let t=Pe(e,["date"]).date,i=new Date(t);return t&&!1===isNaN(i.getTime())?String(i.getFullYear()):""},"time ago":e=>function(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let i=(new Date).getTime()-t.getTime(),a="ago";i<0&&(a="from now",i=Math.abs(i));let n=i/1e3/60/60/24;return n<365?Number(n)+" days "+a:Number(n/365)+" years "+a}(Pe(e,["date","fmt"]).date),"birth date and age":(e,t)=>{let i=Pe(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?ei.natural_date(e,t):(t.push(i),i=Gt([i.year,i.month,i.day]),Jt(i))},"birth year and age":(e,t)=>{let i=Pe(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return ei.natural_date(e,t);t.push(i);let a=(new Date).getFullYear()-parseInt(i.birth_year,10);i=Gt([i.birth_year,i.birth_month]);let n=Jt(i);return a&&(n+=` (age ${a})`),n},"death year and age":(e,t)=>{let i=Pe(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?ei.natural_date(e,t):(t.push(i),i=Gt([i.death_year,i.death_month]),Jt(i))},"birth date and age2":(e,t)=>{let i=Pe(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=Gt([i.birth_year,i.birth_month,i.birth_day]),Jt(i)},"birth based on age as of date":(e,t)=>{let i=Pe(e,["age","year","month","day"]);t.push(i);let a=parseInt(i.age,10),n=parseInt(i.year,10)-a;return n&&a?`${n} (age ${i.age})`:`(age ${i.age})`},"death date and given age":(e,t)=>{let i=Pe(e,["year","month","day","age"]);t.push(i),i=Gt([i.year,i.month,i.day]);let a=Jt(i);return i.age&&(a+=` (age ${i.age})`),a},dts:e=>{e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");let t=Pe(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},time:()=>{let e=new Date,t=Gt([e.getFullYear(),e.getMonth(),e.getDate()]);return Jt(t)},millennium:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/1e3)+1,t.abbr&&"y"===t.abbr?i<0?`${xt(Math.abs(i))} BC`:`${xt(i)}`:`${xt(i)} millennium`},start:ei.date,"start-date":ei.natural_date,birthdeathage:ei.two_dates,age:ei.age,"age nts":ei.age,"age in years":ei["diff-y"],"age in years and months":ei["diff-ym"],"age in years, months and days":ei["diff-ymd"],"age in years and days":ei["diff-yd"],"age in days":ei["diff-d"]};function ai(e){let t=e.pop(),i=Number(e[0]||0),a=Number(e[1]||0),n=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;let r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+a/60+n/3600)}const ni=function(e){if("number"!=typeof e)return e;let t=1e5;return Math.round(e*t)/t},ri={s:!0,w:!0},oi=function(e){let t=Pe(e);t=function(e){return e.list=e.list||[],e.list=e.list.map((t=>{let i=Number(t);if(!isNaN(i))return i;let a=t.split(/:/);return a.length>1?(e.props=e.props||{},e.props[a[0]]=a.slice(1).join(":"),null):t})),e.list=e.list.filter((e=>null!==e)),e}(t);let i=function(e){const t=e.map((e=>typeof e)).join("|");return 2===e.length&&"number|number"===t?{lat:e[0],lon:e[1]}:4===e.length&&"number|string|number|string"===t?(ri[e[1].toLowerCase()]&&(e[0]*=-1),"w"===e[3].toLowerCase()&&(e[2]*=-1),{lat:e[0],lon:e[2]}):6===e.length?{lat:ai(e.slice(0,3)),lon:ai(e.slice(3))}:8===e.length?{lat:ai(e.slice(0,4)),lon:ai(e.slice(4))}:{}}(t.list);return t.lat=ni(i.lat),t.lon=ni(i.lon),t.template="coord",delete t.list,t},si={coord:(e,t)=>{let i=oi(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":`${i.lat||""}°N, ${i.lon||""}°W`}},li=function(e,t,i,a){let n=Pe(e);return a&&(n.name=n.template,n.template=a),t.push(n),""},ci={persondata:li,taxobox:li,citation:li,portal:li,reflist:li,"cite book":li,"cite journal":li,"cite web":li,"commons cat":li,"election box candidate":li,"election box begin":li,main:li},ui={adx:"adx",aim:"aim",amex:"amex",asx:"asx",athex:"athex",b3:"b3","B3 (stock exchange)":"B3 (stock exchange)",barbadosse:"barbadosse",bbv:"bbv",bcba:"bcba",bcs:"bcs",bhse:"bhse",bist:"bist",bit:"bit","bm&f bovespa":"b3","bm&f":"b3",bmad:"bmad",bmv:"bmv","bombay stock exchange":"bombay stock exchange","botswana stock exchange":"botswana stock exchange",bpse:"bpse",bse:"bse",bsx:"bsx",bvb:"bvb",bvc:"bvc",bvl:"bvl",bvpasa:"bvpasa",bwse:"bwse","canadian securities exchange":"canadian securities exchange",cse:"cse",darse:"darse",dfm:"dfm",dse:"dse",euronext:"euronext",euronextparis:"euronextparis",fse:"fse",fwb:"fwb",gse:"gse",gtsm:"gtsm",idx:"idx",ise:"ise",iseq:"iseq",isin:"isin",jasdaq:"jasdaq",jse:"jse",kase:"kase",kn:"kn",krx:"krx",lse:"lse",luxse:"luxse","malta stock exchange":"malta stock exchange",mai:"mai",mcx:"mcx",mutf:"mutf",myx:"myx",nag:"nag","nasdaq dubai":"nasdaq dubai",nasdaq:"nasdaq",neeq:"neeq",nepse:"nepse",nex:"nex",nse:"nse",newconnect:"newconnect","nyse arca":"nyse arca",nyse:"nyse",nzx:"nzx","omx baltic":"omx baltic",omx:"omx",ose:"ose","otc expert":"otc expert","otc grey":"otc grey","otc pink":"otc pink",otcqb:"otcqb",otcqx:"otcqx","pfts ukraine stock exchange":"pfts ukraine stock exchange","philippine stock exchange":"philippine stock exchange",prse:"prse",psx:"psx",karse:"karse",qe:"qe","saudi stock exchange":"saudi stock exchange",sehk:"sehk","Stock Exchange of Thailand":"Stock Exchange of Thailand",set:"set",sgx:"sgx",sse:"sse",swx:"swx",szse:"szse",tase:"tase","tsx-v":"tsx-v",tsx:"tsx",tsxv:"tsxv",ttse:"ttse",twse:"twse",tyo:"tyo",wbag:"wbag",wse:"wse","zagreb stock exchange":"zagreb stock exchange","zimbabwe stock exchange":"zimbabwe stock exchange",zse:"zse"},mi=(e,t)=>{let i=Pe(e,["ticketnumber","code"]);t.push(i);let a=i.template||"";""===a&&(a=i.code),a=(a||"").toLowerCase();let n=ui[a]||"";return i.ticketnumber&&(n=`${n}: ${i.ticketnumber}`),i.code&&!ui[i.code.toLowerCase()]&&(n+=" "+i.code),n},pi={};Object.keys(ui).forEach((e=>{pi[e]=mi}));const di=function(e){return 1===(e=String(e)).length&&(e="0"+e),e},hi=function(e,t,i){e[`rd${t}-team${di(i)}`]&&(i=di(i));let a=e[`rd${t}-score${i}`],n=Number(a);return!1===isNaN(n)&&(a=n),{team:e[`rd${t}-team${i}`],score:a,seed:e[`rd${t}-seed${i}`]}},gi=function(e){let t=[],i=Pe(e);for(let e=1;e<7;e+=1){let a=[];for(let t=1;t<16;t+=2){let n=`rd${e}-team`;if(!i[n+t]&&!i[n+di(t)])break;{let n=hi(i,e,t),r=hi(i,e,t+1);a.push([n,r])}}a.length>0&&t.push(a)}return{template:"playoffbracket",rounds:t}};let bi={"4teambracket":function(e,t){let i=gi(e);return t.push(i),""},player:(e,t)=>{let i=Pe(e,["number","country","name","dl"]);t.push(i);let a=`[[${i.name}]]`;if(i.country){let e=(i.country||"").toLowerCase(),t=zt.find((t=>e===t[1]||e===t[2]))||[];t&&t[0]&&(a=t[0]+" "+a)}return i.number&&(a=i.number+" "+a),a},goal:(e,t)=>{let i={template:"goal",data:[]},a=Pe(e).list||[];for(let e=0;e{let t=e.note;return t&&(t=` (${t})`),e.min+"'"+t})).join(", "),n},"sports table":(e,t)=>{let i=Pe(e),a={};Object.keys(i).filter((e=>/^team[0-9]/.test(e))).map((e=>i[e].toLowerCase())).forEach((e=>{a[e]={name:i[`name_${e}`],win:Number(i[`win_${e}`])||0,loss:Number(i[`loss_${e}`])||0,tie:Number(i[`tie_${e}`])||0,otloss:Number(i[`otloss_${e}`])||0,goals_for:Number(i[`gf_${e}`])||0,goals_against:Number(i[`ga_${e}`])||0}}));let n={date:i.update,header:i.table_header,teams:a};t.push(n)},"cbb roster/header":function(){return'{| class="wikitable"\n |-\n ! POS\n ! #\n ! Name\n ! Height\n ! Weight\n ! Year\n ! Previous School\n ! Hometown\n |-\n'},"cbb roster/player":function(e,t){let i=Pe(e);return t.push(i),`|-\n| ${i.pos||""}\n| ${i.num||""}\n| ${i.first||""} ${i.last||""}\n| ${i.ft||""}${i.in||""}\n| ${i.lbs||""}\n| ${i.class||""}\n| ${i.high_school||""}\n| ${i.home||""}\n`},"cbb roster/footer":function(){return"\n|}"}};var fi=Object.assign({},Dt,Tt,Rt,ii,si,ci,pi,gi,bi);let ki=Object.assign({},Nt,Pt,fi);Object.keys(dt).forEach((e=>{ki[e]=ki[dt[e]]}));const wi=["0","1","2","3","4","5","6","7","8","9"],yi=function(e,t){let i=e.name;if(!0===ot.hasOwnProperty(i))return[""];if(!0===function(e){return!0===st.hasOwnProperty(e)||!!lt.test(e)||!(!ct.test(e)&&!ut.test(e))||!!mt.test(e)}(i)){let t=Pe(e.body,[],"raw");return["",pt(t)]}if(!0===/^cite [a-z]/.test(i)){let t=Pe(e.body);return t.type=t.template,t.template="citation",["",t]}if(!0===ki.hasOwnProperty(i)){if("number"==typeof ki[i]){return[Pe(e.body,wi)[String(ki[i])]||""]}if("string"==typeof ki[i])return[ki[i]];if(!0===o(ki[i])){return["",Pe(e.body,ki[i])]}if(!0===((a=ki[i])&&"[object Object]"===Object.prototype.toString.call(a))){let t=Pe(e.body,ki[i].props);return[t[ki[i].out],t]}if("function"==typeof ki[i]){let a=[];return[ki[i](e.body,a,Pe,null,t),a[0]]}}var a;if(t&&t._templateFallbackFn){let i=[],a=t._templateFallbackFn(e.body,i,Pe,null,t);if(null!==a)return[a,i[0]]}let n=Pe(e.body);return 0===Object.keys(n).length&&(n=null),["",n]},$i=(e="")=>(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim(),xi=function(e,t){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},vi={type:function(){return this._type},links:function(e){let t=[];if(Object.keys(this.data).forEach((e=>{this.data[e].links().forEach((e=>t.push(e)))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},image:function(){let e=this.data.image||this.data.image2||this.data.logo||this.data.image_skyline||this.data.image_flag;if(!e)return null;let t=e.json(),i=t.text;return t.file=i,t.text="",t.caption=this.data.caption,t.domain=this.domain,new _(t)},get:function(e){let t=Object.keys(this.data);if("string"==typeof e){let i=$i(e);for(let e=0;e{for(let i=0;i(e.data[i]&&(t[i]=e.data[i].json()),t)),{});return!0===t.encode&&(i=W(i)),i}(this,e=e||{})},wikitext:function(){return this.wiki||""},keyValue:function(){return Object.keys(this.data).reduce(((e,t)=>(this.data[t]&&(e[t]=this.data[t].text()),e)),{})}};Object.keys(vi).forEach((e=>{xi.prototype[e]=vi[e]})),xi.prototype.data=xi.prototype.keyValue,xi.prototype.template=xi.prototype.type,xi.prototype.images=xi.prototype.image;const ji=function(e,t){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},_i={title:function(){let e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){let t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},text:function(){return""},wikitext:function(){return this.wiki||""},json:function(e={}){let t=this.data||{};return!0===e.encode&&(t=Object.assign({},t),t=W(t)),t}};Object.keys(_i).forEach((e=>{ji.prototype[e]=_i[e]}));const zi={text:function(){return se(this._text||"").text()},json:function(){return this.data||{}},wikitext:function(){return this.wiki||""}},Oi=function(e,t="",i=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_text",{enumerable:!1,value:t}),Object.defineProperty(this,"wiki",{enumerable:!1,value:i})};Object.keys(zi).forEach((e=>{Oi.prototype[e]=zi[e]}));const Ei=/^(cite |citation)/i,qi={citation:!0,refn:!0,harvnb:!0,source:!0},Ni=function(e,t){let{list:i,wiki:a}=function(e,t){let i=[],a=rt(e);const n=function(a,r){a.parent=r,a.children&&a.children.length>0&&a.children.forEach((e=>n(e,a)));let[o,s]=yi(a,t);a.wiki=o,s&&i.push({name:a.name,wiki:a.body,nested:Boolean(a.parent),text:o,json:s});const l=function(e,t,i){e.parent&&(e.parent.body=e.parent.body.replace(t,i),l(e.parent,t,i))};l(a,a.body,a.wiki),e=e.replace(a.body,a.wiki)};return a.forEach((e=>n(e,null))),a.forEach((t=>{e=e.replace(t.body,t.wiki)})),{list:i,wiki:e}}(e._wiki,t),n=t?t._domain:null,{infoboxes:r,references:o,templates:s}=function(e,t){let i={infoboxes:[],templates:[],references:[]};return e.forEach((e=>{let a=e.json,n=a.template||a.type||a.name;if(!0!==qi[n]&&!0!==Ei.test(n))return"infobox"===a.template&&"yes"!==a.subbox?(a.domain=t,a.data=a.data||{},void i.infoboxes.push(new xi(a,e.wiki))):void i.templates.push(new Oi(a,e.text,e.wiki));i.references.push(new ji(a,e.wiki))})),i}(i,n);e._infoboxes=e._infoboxes||[],e._references=e._references||[],e._templates=e._templates||[],e._infoboxes=e._infoboxes.concat(r),e._references=e._references.concat(o),e._templates=e._templates.concat(s),e._wiki=a},Si=function(e){return/^ *\{\{ *(cite|citation)/i.test(e)&&/\}\} *$/.test(e)&&!1===/citation needed/i.test(e)},Ci=function(e){let t=Pe(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Li=function(e){return{template:"citation",type:"inline",data:{},inline:se(e)||{}}},Ai=function(e){let t=[],i=e._wiki;i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Si(a)){let n=Ci(a);n&&t.push({json:n,wiki:e}),i=i.replace(a,"")}else t.push({json:Li(a),wiki:e});return" "})),i=i.replace(/ ?]{0,200}?\/> ?/gi," "),i=i.replace(/ ?]{0,200}>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Si(a)){let e=Ci(a);e&&t.push({json:e,wiki:a}),i=i.replace(a,"")}else t.push({json:Li(a),wiki:e});return" "})),i=i.replace(/ ?<[ /]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ /]?> ?/g," "),e._references=t.map((e=>new ji(e.json,e.wiki))),e._wiki=i},Pi={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]};let Di=["res","record","opponent","method","event","date","round","time","location","notes"];const Ti=function(e,t){const i={templates:[],text:e._wiki};var a;return function(e,t){e.text=e.text.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(i=>{let a={_wiki:i,_templates:[]};Ni(a,t);let n=a._templates.map((e=>e.json())),r=n.find((e=>"election box"===e.template))||{},o=n.filter((e=>"election box candidate"===e.template)),s=n.find((e=>"election box gain"===e.template||"election box hold"===e.template))||{};return(o.length>0||s)&&e.templates.push({template:"election box",title:r.title,candidates:o,summary:s.data}),""}))}(i,t),function(e,t,i){e.text=e.text.replace(/]*)>([\s\S]+)<\/gallery>/g,((a,n,r)=>{let o=r.split(/\n/g);return o=o.filter((e=>e&&""!==e.trim())),o=o.map((e=>{let i=e.split(/\|/),a={file:i[0].trim(),lang:t.lang(),domain:t.domain()},n=new _(a).json(),r=i.slice(1).join("|");return""!==r&&(n.caption=se(r)),n})),o.length>0&&e.templates.push({template:"gallery",images:o,pos:i.title}),""}))}(i,t,e),(a=i).text=a.text.replace(/]*)>([\s\S]*?)<\/math>/g,((e,t,i)=>{let n=se(i).text();return a.templates.push({template:"math",formula:n,raw:i}),n&&n.length<12?n:""})),a.text=a.text.replace(/]*)>([\s\S]*?)<\/chem>/g,((e,t,i)=>(a.templates.push({template:"chem",data:i}),""))),function(e){e.text=e.text.replace(/\{\{mlb game log /gi,"{{game log "),e.text=e.text.replace(/\{\{game log (section|month)[\s\S]+?\{\{game log (section|month) end\}\}/gi,(t=>{let i=function(e){let t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{game log (section|month) end\}\}/i,"");let a="! "+i.join(" !! "),n=be("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mlb game log section",data:n}),""}))}(i),function(e){e.text=e.text.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(t=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");let i="! "+Di.join(" !! "),a=be("{|\n"+i+"\n"+t+"\n|}");return a=a.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mma record start",data:a}),""}))}(i),function(e){e.text=e.text.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,((t,i)=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();let a="! "+Pi[i].join(" !! "),n=be("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"NBA "+i+" statistics",data:n}),""}))}(i),i.templates=i.templates.map((e=>new Oi(e))),i},Ii={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0};class Mi{constructor(e,t){let i={doc:t,title:e.title||"",depth:e.depth,wiki:e.wiki||"",templates:[],tables:[],infoboxes:[],references:[],paragraphs:[]};Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})}));const a=Ti(this,t);this._wiki=a.text,this._templates=this._templates.concat(a.templates),Ai(this),Ni(this,t),function(e){let t=[],i=e._wiki,a=i.split("\n"),n=[];for(let e=0;e0&&(n[n.length-1]+="\n"+a[e]);else{n[n.length-1]+="\n"+a[e];let i=n.pop();t.push(i)}else n.push(a[e]);let r=[];t.forEach((e=>{if(e){i=i.replace(e+"\n",""),i=i.replace(e,"");let t=be(e);t&&t.length>0&&r.push(new we(t,e))}})),r.length>0&&(e._tables=r),e._wiki=i}(this),Xe(this,t)}title(){return this._title||""}index(){if(!this._doc)return null;let e=this._doc.sections().indexOf(this);return-1===e?null:e}depth(){return this._depth}indentation(){return this.depth()}sentences(){return this.paragraphs().reduce(((e,t)=>e.concat(t.sentences())),[])}paragraphs(){return this._paragraphs||[]}links(e){let t=[];if(this.infoboxes().forEach((e=>{t.push(e.links())})),this.sentences().forEach((e=>{t.push(e.links())})),this.tables().forEach((e=>{t.push(e.links())})),this.lists().forEach((e=>{t.push(e.links())})),t=t.reduce(((e,t)=>e.concat(t)),[]).filter((e=>void 0!==e)),"string"==typeof e){let i=t.find((t=>t.page().toLowerCase()===e.toLowerCase()));return void 0===i?[]:[i]}return t}tables(){return this._tables||[]}templates(e){let t=this._templates||[];return"string"==typeof e?(e=e.toLowerCase(),t.filter((t=>t.data.template===e||t.data.name===e))):t}infoboxes(e){let t=this._infoboxes||[];return"string"==typeof e?(e=(e=e.replace(/^infobox /i,"")).trim().toLowerCase(),t.filter((t=>t._type===e))):t}coordinates(){return[...this.templates("coord"),...this.templates("coor")].map((e=>e.json()))}lists(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.lists())})),e}interwiki(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.interwiki())})),e}images(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.images())})),e}references(){return this._references||[]}remove(){if(!this._doc)return null;let e={};e[this.title()]=!0,this.children().forEach((t=>e[t.title()]=!0));let t=this._doc.sections();return t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),this._doc._sections=t,this._doc}nextSibling(){if(!this._doc)return null;let e=this._doc.sections();for(let t=(this.index()||0)+1;tthis.depth())for(let e=i+1;ethis.depth();e+=1)a.push(t[e]);return"string"==typeof e?a.find((t=>t.title().toLowerCase()===e.toLowerCase())):a}sections(e){return this.children(e)}parent(){if(!this._doc)return null;let e=this._doc.sections();for(let t=this.index()||0;t>=0;t-=1)if(e[t]&&e[t].depth()t.text(e))).join("\n\n")}wikitext(){return this._wiki}json(e){return function(e,t){let i={};if(!0===(t=p(t,H)).headers&&(i.title=e.title()),!0===t.depth&&(i.depth=e.depth()),!0===t.paragraphs){let a=e.paragraphs().map((e=>e.json(t)));a.length>0&&(i.paragraphs=a)}if(!0===t.images){let a=e.images().map((e=>e.json(t)));a.length>0&&(i.images=a)}if(!0===t.tables){let a=e.tables().map((e=>e.json(t)));a.length>0&&(i.tables=a)}if(!0===t.templates){let a=e.templates().map((e=>e.json()));a.length>0&&(i.templates=a,!0===t.encode&&i.templates.forEach((e=>W(e))))}if(!0===t.infoboxes){let a=e.infoboxes().map((e=>e.json(t)));a.length>0&&(i.infoboxes=a)}if(!0===t.lists){let a=e.lists().map((e=>e.json(t)));a.length>0&&(i.lists=a)}if(!0===t.references||!0===t.citations){let a=e.references().map((e=>e.json(t)));a.length>0&&(i.references=a)}return!0===t.sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,Ii))}}Mi.prototype.citations=Mi.prototype.references;const Ri={sentences:"sentence",paragraphs:"paragraph",links:"link",tables:"table",templates:"template",infoboxes:"infobox",coordinates:"coordinate",lists:"list",images:"image",references:"reference",citations:"citation"};Object.keys(Ri).forEach((e=>{let t=Ri[e];Mi.prototype[t]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]||null}}));const Ui=/^(={1,6})(.{1,200}?)={1,6}$/,Fi=/\{\{.+?\}\}/,Bi=function(e,t,i){let a=t.match(Ui);if(!a)return e.title="",e.depth=0,e;let n=a[2]||"";n=se(n).text(),Fi.test(n)&&(n=function(e,t){return rt(e).forEach((i=>{let[a]=yi(i,t);e=e.replace(i.body,a)})),e}(n,i));let o={_wiki:n};Ai(o),n=o._wiki,n=r(n);let s=0;return a[1]&&(s=a[1].length-2),e.title=n,e.depth=s,e},Ki=new RegExp("^("+["references","reference","einzelnachweise","referencias","références","notes et références","脚注","referenser","bronnen","примечания"].join("|")+"):?","i"),Wi=/(?:\n|^)(={2,6}.{1,200}?={2,6})/g,Hi=function(e){let t=[],i=e._wiki.split(Wi);for(let a=0;a!0!==Ki.test(t.title())||t.paragraphs().length>0||t.templates().length>0||(e[i+1]&&e[i+1].depth()>t.depth()&&(e[i+1]._depth-=1),!1)))}(t)},Yi=new RegExp("\\[\\[("+h.join("|")+"):(.{2,178}?)]](w{0,10})","gi"),Zi=new RegExp("^\\[\\[:?("+h.join("|")+"):","gi"),Gi=function(e){const t=[];let i=e.match(Yi);i&&i.forEach((function(e){(e=(e=(e=e.replace(Zi,"")).replace(/\|?[ *]?\]\]$/,"")).replace(/\|.*/,""))&&!e.match(/[[\]]/)&&t.push(e.trim())}));const a=e.replace(Yi,"");return[t,a]},Vi={tables:!0,lists:!0,paragraphs:!0};class Ji{constructor(e,t){t=t||{},this._options=t;let i={pageID:t.pageID||t.id||null,namespace:t.namespace||t.ns||null,lang:t.lang||t.language||null,domain:t.domain||null,title:t.title||null,type:"page",redirectTo:null,wikidata:t.wikidata||null,wiki:e||"",categories:[],sections:[],coordinates:[],userAgent:t.userAgent||t["User-Agent"]||t["Api-User-Agent"]||"User of the wtf_wikipedia library",templateFallbackFn:t.templateFallbackFn||null};if(Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})})),!0===function(e){return!!e&&T.test(e)}(this._wiki)){this._type="redirect",this._redirectTo=function(e){let t=e.match(T);if(t&&t[2])return(D(t[2])||[])[0];return{}}(this._wiki);const[e,t]=Gi(this._wiki);return this._categories=e,void(this._wiki=t)}this._wiki=F(this._wiki);const[a,n]=Gi(this._wiki);this._categories=a,this._wiki=n,this._sections=Hi(this)}title(e){if(void 0!==e)return this._title=e,e;if(this._title)return this._title;let t=null,i=this.sentences()[0];return i&&(t=i.bold()),t}pageID(e){return void 0!==e&&(this._pageID=e),this._pageID||null}wikidata(e){return void 0!==e&&(this._wikidata=e),this._wikidata||null}domain(e){return void 0!==e&&(this._domain=e),this._domain||null}language(e){return void 0!==e&&(this._lang=e),this._lang||null}url(){let e=this.title();if(!e)return null;let t=this.language()||"en",i=this.domain()||"wikipedia.org";return e=e.replace(/ /g,"_"),e=encodeURIComponent(e),`https://${t}.${i}/wiki/${e}`}namespace(e){return void 0!==e&&(this._namespace=e),this._namespace||null}isRedirect(){return"redirect"===this._type}redirectTo(){return this._redirectTo}isDisambiguation(){return function(e){let t=e.templates().map((e=>e.json()));if(t.find((e=>k.hasOwnProperty(e.template)||x.hasOwnProperty(e.template))))return!0;let i=e.title();return!(!i||!0!==$.test(i))||!t.find((e=>y.hasOwnProperty(e.template)))&&(!0===v(e.sentence(0))||!0===v(e.sentence(1)))}(this)}categories(e){let t=this._categories||[];return"number"==typeof e?[t[e]]:t}sections(e){let t=this._sections||[];if(t.forEach((e=>{e._doc=this})),"string"==typeof e){let i=e.toLowerCase().trim();return t.filter((e=>e.title().toLowerCase()===i))}return"number"==typeof e?[t[e]]:t}paragraphs(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.paragraphs())})),"number"==typeof e?[t[e]]:t}sentences(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.sentences())})),"number"==typeof e?[t[e]]:t}images(e){let t=m(this,"images",null);return this.infoboxes().forEach((e=>{let i=e.image();i&&t.unshift(i)})),this.templates().forEach((e=>{"gallery"===e.data.template&&(e.data.images=e.data.images||[],e.data.images.forEach((e=>{e instanceof _||(e.language=this.language(),e.domain=this.domain(),e=new _(e)),t.push(e)})))})),"number"==typeof e?[t[e]]:t}links(e){return m(this,"links",e)}interwiki(e){return m(this,"interwiki",e)}lists(e){return m(this,"lists",e)}tables(e){return m(this,"tables",e)}templates(e){return m(this,"templates",e)}references(e){return m(this,"references",e)}citations(e){return this.references(e)}coordinates(e){return m(this,"coordinates",e)}infoboxes(e){let t=m(this,"infoboxes",e);return t=t.sort(((e,t)=>Object.keys(e.data).length>Object.keys(t.data).length?-1:1)),t}text(e){if(e=p(e,Vi),!0===this.isRedirect())return"";return this.sections().map((t=>t.text(e))).join("\n\n")}json(e){return function(e,t){let i={};return(t=p(t,d)).title&&(i.title=e.title()),t.pageID&&(i.pageID=e.pageID()),t.categories&&(i.categories=e.categories()),t.sections&&(i.sections=e.sections().map((e=>e.json(t)))),!0===e.isRedirect()&&(i.isRedirect=!0,i.redirectTo=e.redirectTo(),i.sections=[]),t.coordinates&&(i.coordinates=e.coordinates()),t.infoboxes&&(i.infoboxes=e.infoboxes().map((e=>e.json(t)))),t.images&&(i.images=e.images().map((e=>e.json(t)))),t.plaintext&&(i.plaintext=e.text(t)),(t.citations||t.references)&&(i.references=e.references()),i}(this,e=p(e,Vi))}wikitext(){return this._wiki||""}debug(){return console.log("\n"),this.sections().forEach((e=>{let t=" - ";for(let i=0;i{let t=Xi[e];Ji.prototype[t]=function(t){return this[e](t)[0]||null}})),Ji.prototype.lang=Ji.prototype.language,Ji.prototype.ns=Ji.prototype.namespace,Ji.prototype.plaintext=Ji.prototype.text,Ji.prototype.isDisambig=Ji.prototype.isDisambiguation,Ji.prototype.citations=Ji.prototype.references,Ji.prototype.redirectsTo=Ji.prototype.redirectTo,Ji.prototype.redirect=Ji.prototype.redirectTo,Ji.prototype.redirects=Ji.prototype.redirectTo;const Qi=/^https?:\/\//,ea={lang:"en",wiki:"wikipedia",domain:void 0,follow_redirects:!0,path:"api.php"},ta=function(e,t,i){"string"==typeof t&&(t={lang:t}),(t={...ea,...t}).title=e,"string"==typeof e&&Qi.test(e)&&(t={...t,...n(e)});const r=u(t),s=function(e){let t,i=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return t=e.noOrigin?"":e.origin||e.Origin||"*",{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":i,"User-Agent":i,Origin:t,"Accept-Encoding":"gzip"},redirect:"follow"}}(t);return a(r,s).then((e=>e.json())).then((a=>{let n=function(e,t={}){return Object.keys(e.query.pages).map((i=>{let a=e.query.pages[i]||{};if(a.hasOwnProperty("missing")||a.hasOwnProperty("invalid"))return null;let n=a.revisions[0]["*"];!n&&a.revisions[0].slots&&(n=a.revisions[0].slots.main["*"]),a.pageprops=a.pageprops||{};let r=t.domain;return!r&&t.wiki&&(r=`${t.wiki}.org`),{wiki:n,meta:Object.assign({},t,{title:a.title,pageID:a.pageid,namespace:a.ns,domain:r,wikidata:a.pageprops.wikibase_item,description:a.pageprops["wikibase-shortdesc"]})}}))}(a,t);return n=function(e,t){let i=(e=e.filter((e=>e))).map((e=>new Ji(e.wiki,e.meta)));return 0===i.length?null:o(t)||1!==i.length?i:i[0]}(n,e),i&&i(null,n),n})).catch((e=>(console.error(e),i&&i(e,null),null)))};const ia=function(e,t){return new Ji(e,t)},aa={Doc:Ji,Section:Mi,Paragraph:_e,Sentence:X,Image:_,Infobox:xi,Link:Z,List:Be,Reference:ji,Table:we,Template:Oi,http:function(e,t){return a(e,t).then((function(e){return e.json()})).catch((t=>(console.error("\n\n=-=- http response error =-=-=-"),console.error(e),console.error(t),{})))},wtf:ia};ia.fetch=function(e,t,i){return ta(e,t,i)},ia.plugin=ia.extend=function(e){return e(aa,ki,st),this},ia.version="10.1.4";export{ia as default}; diff --git a/builds/wtf_wikipedia.cjs b/builds/wtf_wikipedia.cjs index 91316320..5924690c 100644 --- a/builds/wtf_wikipedia.cjs +++ b/builds/wtf_wikipedia.cjs @@ -1,14 +1,10 @@ -/*! wtf_wikipedia 10.1.4 MIT */ +/*! wtf_wikipedia MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('isomorphic-unfetch')) : typeof define === 'function' && define.amd ? define(['isomorphic-unfetch'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.wtf = factory(global.unfetch)); })(this, (function (unfetch) { 'use strict'; - function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - - var unfetch__default = /*#__PURE__*/_interopDefaultLegacy(unfetch); - /** * Parses out the domain and title from a url * @@ -1941,7 +1937,7 @@ const isRedirect = function (wiki) { //too long to be a redirect? - if (!wiki || wiki.length > 500) { + if (!wiki) { return false } return REDIRECT_REGEX.test(wiki) @@ -2669,6 +2665,8 @@ ]; //split text into sentences, using regex + //@spencermountain MIT + const abbreviations = literalAbbreviations.concat('[^]][^]]'); const abbrev_reg = new RegExp("(^| |')(" + abbreviations.join('|') + `)[.!?] ?$`, 'i'); const acronym_reg = /[ .'][A-Z].? *$/i; @@ -3488,6 +3486,10 @@ if (hasKey.test(str) === true) { let res = parseKey(str); if (res.key) { + // don't overwrite if empty + if (h[res.key] && !res.val) { + return h + } h[res.key] = res.val; return h } @@ -4158,7 +4160,10 @@ 'metrod': 'metro', 'fw': 'ferry', 'rws': 'stnlnk', - sclass2: 'sclass' + sclass2: 'sclass', + under: 'underline', + brackets: 'bracket', + raise: 'lower' }; //multiple aliases @@ -4456,7 +4461,7 @@ "'": `'`, '\\': ' /', '`': '`', - bracket: '[', + // bracket: '[', '[': '[', '*': '*', asterisk: '*', @@ -4481,6 +4486,8 @@ checked: '✔️', 'thumbs up': '👍', 'thumbs down': '👎', + 'minusplus': '∓', + 'plusminus': '±' }; //grab the first, second or third pipe.. @@ -4557,15 +4564,48 @@ 'nowiki', 'nowiki2', 'unstrip', - 'UnstripNoWiki', + 'unstripnowiki', 'plain text', 'make code', 'killmarkers', + 'longitem', + 'longlink', + 'strikethrough', + 'underline', + 'uuline', + 'not a typo', + 'text', + 'resize', + 'var serif', + 'double underline', + 'nee', + 'ne', + 'left', + 'right', + 'center', + 'centered', + 'justify', + 'smalldiv', + 'bold div', + 'monodiv', + 'italic div', + 'bigdiv', + 'strikethroughdiv', + 'strikethrough color', + 'pbpe'//pt ]; zeros.forEach((k) => { templates$b[k] = 0; }); + // templates we simply grab the 2nd param of + let ones = [ + 'line-height' + ]; + ones.forEach((k) => { + templates$b[k] = 1; + }); + let templates$a = {}; // these templates all have a predictable pattern // {{HSC|Ship Name|ID}} -> [[HSC Name (id)]] @@ -5388,6 +5428,43 @@ let { cl, type } = parser(tmpl, ['cl', 'type', 'fmt']); return `[[${cl}-class ${type} |''${cl}''-class]] [[${type}]]` }, + 'center block': (tmpl) => { + let { txt } = parser(tmpl, ['txt']); + return txt || '' + }, + 'align': (tmpl) => { + let { txt } = parser(tmpl, ['dir', 'txt']); + return txt || '' + }, + 'font': (tmpl) => { + let { txt } = parser(tmpl, ['txt']); + return txt || '' + }, + 'float': (tmpl) => { + let { txt, dir } = parser(tmpl, ['dir', 'txt']); + if (!txt) { + return dir + } + return txt || '' + }, + 'lower': (tmpl) => { + let { txt, n } = parser(tmpl, ['n', 'txt']); + if (!txt) { + return n + } + return txt || '' + }, + 'splitspan': (tmpl) => { + let { left, right } = parser(tmpl, ['left', 'right']); + return (left || '') + '\n' + (right || '') + }, + 'bracket': (tmpl) => { + let { word } = parser(tmpl, ['word']); + if (word) { + return `[${word}]` + } + return '[' + }, // https://en.wikipedia.org/wiki/Template:In_title @@ -10403,7 +10480,7 @@ const url = makeUrl(options); const headers = makeHeaders(options); - return unfetch__default["default"](url, headers) + return unfetch(url, headers) .then((res) => res.json()) .then((res) => { let data = getResult(res, options); @@ -10433,7 +10510,7 @@ * @returns {Promise} the response from fetch */ const request = function (url, opts) { - return unfetch__default["default"](url, opts).then(function (res) { + return unfetch(url, opts).then(function (res) { return res.json() }).catch((e) => { console.error('\n\n=-=- http response error =-=-=-'); diff --git a/builds/wtf_wikipedia.mjs b/builds/wtf_wikipedia.mjs index 662918ce..29fb54b2 100644 --- a/builds/wtf_wikipedia.mjs +++ b/builds/wtf_wikipedia.mjs @@ -1,4 +1,4 @@ -/*! wtf_wikipedia 10.1.4 MIT */ +/*! wtf_wikipedia MIT */ import unfetch from 'isomorphic-unfetch'; /** @@ -1933,7 +1933,7 @@ const REDIRECT_REGEX = new RegExp('^[ \n\t]*?#(' + redirects.join('|') + ') *?(\ const isRedirect = function (wiki) { //too long to be a redirect? - if (!wiki || wiki.length > 500) { + if (!wiki) { return false } return REDIRECT_REGEX.test(wiki) @@ -2661,6 +2661,8 @@ var literalAbbreviations = [ ]; //split text into sentences, using regex +//@spencermountain MIT + const abbreviations = literalAbbreviations.concat('[^]][^]]'); const abbrev_reg = new RegExp("(^| |')(" + abbreviations.join('|') + `)[.!?] ?$`, 'i'); const acronym_reg = /[ .'][A-Z].? *$/i; @@ -3480,6 +3482,10 @@ const keyMaker = function (arr, order) { if (hasKey.test(str) === true) { let res = parseKey(str); if (res.key) { + // don't overwrite if empty + if (h[res.key] && !res.val) { + return h + } h[res.key] = res.val; return h } @@ -4150,7 +4156,10 @@ let aliases = { 'metrod': 'metro', 'fw': 'ferry', 'rws': 'stnlnk', - sclass2: 'sclass' + sclass2: 'sclass', + under: 'underline', + brackets: 'bracket', + raise: 'lower' }; //multiple aliases @@ -4448,7 +4457,7 @@ var hardcoded = { "'": `'`, '\\': ' /', '`': '`', - bracket: '[', + // bracket: '[', '[': '[', '*': '*', asterisk: '*', @@ -4473,6 +4482,8 @@ var hardcoded = { checked: '✔️', 'thumbs up': '👍', 'thumbs down': '👎', + 'minusplus': '∓', + 'plusminus': '±' }; //grab the first, second or third pipe.. @@ -4549,15 +4560,48 @@ let zeros = [ 'nowiki', 'nowiki2', 'unstrip', - 'UnstripNoWiki', + 'unstripnowiki', 'plain text', 'make code', 'killmarkers', + 'longitem', + 'longlink', + 'strikethrough', + 'underline', + 'uuline', + 'not a typo', + 'text', + 'resize', + 'var serif', + 'double underline', + 'nee', + 'ne', + 'left', + 'right', + 'center', + 'centered', + 'justify', + 'smalldiv', + 'bold div', + 'monodiv', + 'italic div', + 'bigdiv', + 'strikethroughdiv', + 'strikethrough color', + 'pbpe'//pt ]; zeros.forEach((k) => { templates$b[k] = 0; }); +// templates we simply grab the 2nd param of +let ones = [ + 'line-height' +]; +ones.forEach((k) => { + templates$b[k] = 1; +}); + let templates$a = {}; // these templates all have a predictable pattern // {{HSC|Ship Name|ID}} -> [[HSC Name (id)]] @@ -5380,6 +5424,43 @@ var functions = { let { cl, type } = parser(tmpl, ['cl', 'type', 'fmt']); return `[[${cl}-class ${type} |''${cl}''-class]] [[${type}]]` }, + 'center block': (tmpl) => { + let { txt } = parser(tmpl, ['txt']); + return txt || '' + }, + 'align': (tmpl) => { + let { txt } = parser(tmpl, ['dir', 'txt']); + return txt || '' + }, + 'font': (tmpl) => { + let { txt } = parser(tmpl, ['txt']); + return txt || '' + }, + 'float': (tmpl) => { + let { txt, dir } = parser(tmpl, ['dir', 'txt']); + if (!txt) { + return dir + } + return txt || '' + }, + 'lower': (tmpl) => { + let { txt, n } = parser(tmpl, ['n', 'txt']); + if (!txt) { + return n + } + return txt || '' + }, + 'splitspan': (tmpl) => { + let { left, right } = parser(tmpl, ['left', 'right']); + return (left || '') + '\n' + (right || '') + }, + 'bracket': (tmpl) => { + let { word } = parser(tmpl, ['word']); + if (word) { + return `[${word}]` + } + return '[' + }, // https://en.wikipedia.org/wiki/Template:In_title diff --git a/package-lock.json b/package-lock.json index 011ecfe7..806852a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { - "isomorphic-unfetch": "4.0.2", + "isomorphic-unfetch": "^3.1.0", "path-exists-cli": "2.0.0" }, "bin": { @@ -1375,14 +1375,6 @@ "node": ">= 8" } }, - "node_modules/data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", - "engines": { - "node": ">= 12" - } - }, "node_modules/debug": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", @@ -2088,28 +2080,6 @@ "reusify": "^1.0.4" } }, - "node_modules/fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "paypal", - "url": "https://paypal.me/jimmywarting" - } - ], - "dependencies": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - }, - "engines": { - "node": "^12.20 || >= 14.13" - } - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -2207,17 +2177,6 @@ "node": ">=8.0.0" } }, - "node_modules/formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "dependencies": { - "fetch-blob": "^3.1.2" - }, - "engines": { - "node": ">=12.20.0" - } - }, "node_modules/fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", @@ -3088,29 +3047,12 @@ "dev": true }, "node_modules/isomorphic-unfetch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-4.0.2.tgz", - "integrity": "sha512-1Yd+CF/7al18/N2BDbsLBcp6RO3tucSW+jcLq24dqdX5MNbCNTw1z4BsGsp4zNmjr/Izm2cs/cEqZPp4kvWSCA==", - "dependencies": { - "node-fetch": "^3.2.0", - "unfetch": "^5.0.0" - } - }, - "node_modules/isomorphic-unfetch/node_modules/node-fetch": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", - "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz", + "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==", "dependencies": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-fetch" + "node-fetch": "^2.6.1", + "unfetch": "^4.2.0" } }, "node_modules/istanbul-lib-coverage": { @@ -3581,29 +3523,10 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "engines": { - "node": ">=10.5.0" - } - }, "node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dev": true, "dependencies": { "whatwg-url": "^5.0.0" }, @@ -5316,8 +5239,7 @@ "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", - "dev": true + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, "node_modules/trim": { "version": "1.0.1", @@ -5396,9 +5318,9 @@ } }, "node_modules/unfetch": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-5.0.0.tgz", - "integrity": "sha512-3xM2c89siXg0nHvlmYsQ2zkLASvVMBisZm5lF3gFDqfF2xonNStDJyMpvaOBe0a1Edxmqrf2E0HBdmy9QyZaeg==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", + "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==" }, "node_modules/update-browserslist-db": { "version": "1.0.10", @@ -5469,25 +5391,15 @@ "spdx-expression-parse": "^3.0.0" } }, - "node_modules/web-streams-polyfill": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", - "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", - "engines": { - "node": ">= 8" - } - }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", - "dev": true + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "dev": true, "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -6752,11 +6664,6 @@ "which": "^2.0.1" } }, - "data-uri-to-buffer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", - "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==" - }, "debug": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", @@ -7300,15 +7207,6 @@ "reusify": "^1.0.4" } }, - "fetch-blob": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", - "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", - "requires": { - "node-domexception": "^1.0.0", - "web-streams-polyfill": "^3.0.3" - } - }, "file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -7382,14 +7280,6 @@ "signal-exit": "^3.0.2" } }, - "formdata-polyfill": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", - "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", - "requires": { - "fetch-blob": "^3.1.2" - } - }, "fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", @@ -7993,24 +7883,12 @@ "dev": true }, "isomorphic-unfetch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-4.0.2.tgz", - "integrity": "sha512-1Yd+CF/7al18/N2BDbsLBcp6RO3tucSW+jcLq24dqdX5MNbCNTw1z4BsGsp4zNmjr/Izm2cs/cEqZPp4kvWSCA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz", + "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==", "requires": { - "node-fetch": "^3.2.0", - "unfetch": "^5.0.0" - }, - "dependencies": { - "node-fetch": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz", - "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==", - "requires": { - "data-uri-to-buffer": "^4.0.0", - "fetch-blob": "^3.1.4", - "formdata-polyfill": "^4.0.10" - } - } + "node-fetch": "^2.6.1", + "unfetch": "^4.2.0" } }, "istanbul-lib-coverage": { @@ -8366,16 +8244,10 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" - }, "node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dev": true, "requires": { "whatwg-url": "^5.0.0" } @@ -9656,8 +9528,7 @@ "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", - "dev": true + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" }, "trim": { "version": "1.0.1", @@ -9718,9 +9589,9 @@ } }, "unfetch": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-5.0.0.tgz", - "integrity": "sha512-3xM2c89siXg0nHvlmYsQ2zkLASvVMBisZm5lF3gFDqfF2xonNStDJyMpvaOBe0a1Edxmqrf2E0HBdmy9QyZaeg==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz", + "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==" }, "update-browserslist-db": { "version": "1.0.10", @@ -9771,22 +9642,15 @@ "spdx-expression-parse": "^3.0.0" } }, - "web-streams-polyfill": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", - "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" - }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", - "dev": true + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" }, "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "dev": true, "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" diff --git a/package.json b/package.json index c471b315..60913d63 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "printWidth": 120 }, "dependencies": { - "isomorphic-unfetch": "4.0.2", + "isomorphic-unfetch": "^3.1.0", "path-exists-cli": "2.0.0" }, "devDependencies": { @@ -85,4 +85,4 @@ "builds/*.js" ], "license": "MIT" -} +} \ No newline at end of file diff --git a/rollup.config.js b/rollup.config.js index 09b5cf12..9a5b75a9 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -2,10 +2,9 @@ import commonjs from '@rollup/plugin-commonjs' import terser from '@rollup/plugin-terser' import { nodeResolve } from '@rollup/plugin-node-resolve' -import { version } from './package.json' console.log('\n 📦 - running rollup..\n') -const banner = '/*! wtf_wikipedia ' + version + ' MIT */' +const banner = '/*! wtf_wikipedia MIT */' export default [ // === server-side .mjs (typescript)=== { From a20c5d8626be5191e199ec578c5a162422ced93b Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Thu, 11 May 2023 12:24:10 -0400 Subject: [PATCH 5/7] fix resize template --- scratch.js | 15 +++++++++++---- src/template/custom/text-only/easy-inline.js | 10 +--------- src/template/custom/text-only/functions.js | 7 +++++++ 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/scratch.js b/scratch.js index d2ff5825..db80c6c1 100644 --- a/scratch.js +++ b/scratch.js @@ -10,14 +10,21 @@ wtf.plugin(plg) let str = ` -{{PBPE|Camiseta|''t-shirt''}} ({{IPA-pt|tiˈʃɐrt|}}; {{IPA-en|ˈtiː ʃɜːɹt}}), é uma pequena [[camisa]], de mangas curtas ou sem mangas, geralmente em [[malharia|malha]] de [[algodão]], e mais recentemente em vários outros materiais, tais como [[poliéster]].{{Citar web|titulo=Significado de Camiseta|url=https://www.dicio.com.br/camiseta/|acessodata=10 de outubro de 2019|publicado=Dicio}} - -Trata-se de um elemento do [[vestuário]], que na contemporaneidade é utilizada pelas empresas de [[moda]] para estampar [[imagem|imagens]] e [[frase]]s chamativas. As estampas podem ser de temática [[política]], artística ou de identificação de um grupo, por exemplo militares, funcionário de uma empresa, torcida de um time de futebol, etc. - + {{Collapsible list + | title = {{resize|1.25em|United Kingdom of Great
Britain and Northern Ireland}} + | [[Iceland]] + | [[Liechtenstein]] + | [[Norway]] + | [[Switzerland]] + }} ` let doc = wtf(str) +console.log(doc.templates().map((s) => JSON.stringify(s.json()).length)[4]) +console.log(doc.templates().map((s) => JSON.stringify(s.json()))[4]) console.log(doc.text()) +// doc.templates().map((s) => s.json()) +// console.log(doc.templates()[4].json()) // wtf.fetch("Formula One drivers from Finland", "en") diff --git a/src/template/custom/text-only/easy-inline.js b/src/template/custom/text-only/easy-inline.js index 79043053..c9fcbb8c 100644 --- a/src/template/custom/text-only/easy-inline.js +++ b/src/template/custom/text-only/easy-inline.js @@ -6,6 +6,7 @@ let templates = { resize: 1, //https://en.wikipedia.org/wiki/'Resize', lang: 1, 'rtl-lang': 1, + 'line-height': 1, l: 2, h: 1, //https://en.wikipedia.org/wiki/'Hover_title', sort: 1, //https://en.wikipedia.org/wiki/'Sort', @@ -83,7 +84,6 @@ let zeros = [ 'uuline', 'not a typo', 'text', - 'resize', 'var serif', 'double underline', 'nee', @@ -106,13 +106,5 @@ zeros.forEach((k) => { templates[k] = 0 }) -// templates we simply grab the 2nd param of -let ones = [ - 'line-height' -] -ones.forEach((k) => { - templates[k] = 1 -}) - export default templates diff --git a/src/template/custom/text-only/functions.js b/src/template/custom/text-only/functions.js index 1874fa61..1e990a8d 100644 --- a/src/template/custom/text-only/functions.js +++ b/src/template/custom/text-only/functions.js @@ -453,6 +453,13 @@ export default { let data = parse(tmpl, ['text']) return (data.text || '').replace(/[^0-9]/g, '') }, + 'resize': (tmpl) => { + let { n, text } = parse(tmpl, ['n', 'text']) + if (!text) { + return n || '' + } + return text || '' + }, 'last word': (tmpl) => { let data = parse(tmpl, ['text']) let arr = (data.text || '').split(/ /g) From 7d5bd153286ba53e28d9cda13d7803d6484a62e1 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Thu, 11 May 2023 12:29:01 -0400 Subject: [PATCH 6/7] fix for inline fns --- package.json | 2 +- scratch.js | 21 ++----------- src/template/custom/text-only/functions.js | 34 +++++++++++----------- 3 files changed, 21 insertions(+), 36 deletions(-) diff --git a/package.json b/package.json index 60913d63..d109f277 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "wtf_wikipedia", "description": "parse wikiscript into json", - "version": "10.1.4", + "version": "10.1.5", "main": "src/index.js", "module": "builds/wtf_wikipedia.mjs", "unpkg": "builds/wtf_wikipedia-client.min.js", diff --git a/scratch.js b/scratch.js index db80c6c1..feb45040 100644 --- a/scratch.js +++ b/scratch.js @@ -2,27 +2,12 @@ import wtf from './src/index.js' import plg from './plugins/api/src/index.js' wtf.plugin(plg) -// let str = `{{float |top=2.0em |left=2px |width=10em | the content to float}}.` -// let str = `{{splitspan|foo|bar}}` +let str = `{{splitspan|foo|bar}}` // let str = ` {{font|text=也可以只選用其中一項選項。|size=25px}} ` -// let doc = wtf(str) -// console.log(doc.text()) - - -let str = ` - {{Collapsible list - | title = {{resize|1.25em|United Kingdom of Great
Britain and Northern Ireland}} - | [[Iceland]] - | [[Liechtenstein]] - | [[Norway]] - | [[Switzerland]] - }} - -` let doc = wtf(str) -console.log(doc.templates().map((s) => JSON.stringify(s.json()).length)[4]) -console.log(doc.templates().map((s) => JSON.stringify(s.json()))[4]) console.log(doc.text()) + + // doc.templates().map((s) => s.json()) // console.log(doc.templates()[4].json()) diff --git a/src/template/custom/text-only/functions.js b/src/template/custom/text-only/functions.js index 1e990a8d..ae7e1459 100644 --- a/src/template/custom/text-only/functions.js +++ b/src/template/custom/text-only/functions.js @@ -673,39 +673,39 @@ export default { return `[[${cl}-class ${type} |''${cl}''-class]] [[${type}]]` }, 'center block': (tmpl) => { - let { txt } = parse(tmpl, ['txt']) - return txt || '' + let { text } = parse(tmpl, ['text']) + return text || '' }, 'align': (tmpl) => { - let { txt } = parse(tmpl, ['dir', 'txt']) - return txt || '' + let { text } = parse(tmpl, ['dir', 'text']) + return text || '' }, 'font': (tmpl) => { - let { txt } = parse(tmpl, ['txt']) - return txt || '' + let { text } = parse(tmpl, ['text']) + return text || '' }, 'float': (tmpl) => { - let { txt, dir } = parse(tmpl, ['dir', 'txt']) - if (!txt) { + let { text, dir } = parse(tmpl, ['dir', 'text']) + if (!text) { return dir } - return txt || '' + return text || '' }, 'lower': (tmpl) => { - let { txt, n } = parse(tmpl, ['n', 'txt']) - if (!txt) { + let { text, n } = parse(tmpl, ['n', 'text']) + if (!text) { return n } - return txt || '' + return text || '' }, 'splitspan': (tmpl) => { - let { left, right } = parse(tmpl, ['left', 'right']) - return (left || '') + '\n' + (right || '') + let list = parse(tmpl).list || [] + return (list[0] || '') + '\n' + (list[1] || '') }, 'bracket': (tmpl) => { - let { word } = parse(tmpl, ['word']) - if (word) { - return `[${word}]` + let { text } = parse(tmpl, ['text']) + if (text) { + return `[${text}]` } return '[' }, From 6bab0b675f5fe70c867e967cfa447c03d5225aa3 Mon Sep 17 00:00:00 2001 From: spencer kelly Date: Thu, 11 May 2023 12:30:25 -0400 Subject: [PATCH 7/7] 10.1.5rc --- builds/wtf_wikipedia-client.min.js | 2 +- builds/wtf_wikipedia-client.mjs | 2 +- builds/wtf_wikipedia.cjs | 53 +++++++++++++++--------------- builds/wtf_wikipedia.mjs | 53 +++++++++++++++--------------- changelog.md | 5 +++ src/_version.js | 2 +- 6 files changed, 60 insertions(+), 57 deletions(-) diff --git a/builds/wtf_wikipedia-client.min.js b/builds/wtf_wikipedia-client.min.js index 38f8b403..965c7db5 100644 --- a/builds/wtf_wikipedia-client.min.js +++ b/builds/wtf_wikipedia-client.min.js @@ -1,2 +1,2 @@ /*! wtf_wikipedia MIT */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).wtf=t()}(this,(function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var i=function e(){if(this instanceof e){var i=[null];return i.push.apply(i,arguments),new(Function.bind.apply(t,i))}return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})})),i}var i=t(Object.freeze({__proto__:null,default:function(e,t){return t=t||{},new Promise((function(i,a){var n=new XMLHttpRequest,r=[],o=[],s={},l=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:l,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in n.open(t.method||"get",e,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,i){r.push(t=t.toLowerCase()),o.push([t,i]),s[t]=s[t]?s[t]+","+i:i})),i(l())},n.onerror=a,n.withCredentials="include"==t.credentials,t.headers)n.setRequestHeader(c,t.headers[c]);n.send(t.body||null)}))}})),a=e(self.fetch||(self.fetch=i.default||i));const n=function(e){let t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function r(e){return e&&"string"==typeof e?e=(e=(e=(e=e.replace(/^\s+/,"")).replace(/\s+$/,"")).replace(/ {2}/," ")).replace(/\s, /,", "):""}function o(e){return"[object Array]"===Object.prototype.toString.call(e)}const s=/(wikibooks|wikidata|wikimedia|wikinews|wikipedia|wikiquote|wikisource|wikispecies|wikiversity|wikivoyage|wiktionary|foundation|meta)\.org/,l={action:"query",prop:"revisions|pageprops",rvprop:"content",maxlag:5,rvslots:"main",origin:"*",format:"json",redirects:"true"},c=e=>e.replace(/ /g,"_").trim(),u=function(e,t=l){let i=Object.assign({},t),a="";if(e.domain){let t=s.test(e.domain)?"w/api.php":e.path;a=`https://${e.domain}/${t}?`}else{if(!e.lang||!e.wiki)return"";a=`https://${e.lang}.${e.wiki}.org/w/api.php?`}e.follow_redirects||delete i.redirects,e.origin&&(i.origin=e.origin);let n=e.title;if("number"==typeof n)i.pageids=n;else if("string"==typeof n)i.titles=c(n);else if(void 0!==n&&o(n)&&"number"==typeof n[0])i.pageids=n.filter((e=>e)).join("|");else{if(void 0===n||!0!==o(n)||"string"!=typeof n[0])return"";i.titles=n.filter((e=>e)).map(c).join("|")}return`${a}${r=i,Object.entries(r).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&")}`;var r},m=function(e,t,i){let a=[];return e.sections().forEach((e=>{let n=[];n="string"==typeof i?e[t](i):e[t](),n.forEach((e=>{a.push(e)}))})),"number"==typeof i?void 0===a[i]?[]:[a[i]]:a},p=function(e,t){return Object.assign({},t,e)},d={title:!0,sections:!0,pageID:!0,categories:!0};var h=["category","abdeeling","bólkur","catagóir","categori","categoria","categoria","categoría","categorîa","categorìa","catégorie","categorie","catègorie","category","categuria","catigurìa","class","ẹ̀ka","flocc","flocc","flokkur","grup","jamii","kaarangay","kateggoría","kategooria","kategori","kategorî","kategoria","kategória","kategorie","kategoriija","kategorija","kategorio","kategoriya","kategoriýa","kategoriye","kategory","kategorya","kateqoriya","katiguriya","klad","luokka","ñemohenda","roinn","ronney","rummad","setensele","sokajy","sumut","thể","turkum","категорија","категория","категорія","катэгорыя","төркем","קטגוריה","تصنيف","تۈر","رده","श्रेणी","श्रेणी","বিষয়শ্রেণী","หมวดหมู่","분류","분류","分类"],g=["file","image","चित्र","archivo","attēls","berkas","bestand","datei","dosiero","dosya","fájl","fasciculus","fichier","fil","fitxategi","fitxer","gambar","imagem","imej","immagine","larawan","lêer","plik","restr","slika","wêne","wobraz","выява","податотека","слика","файл","სურათი","պատկեր","קובץ","پرونده","دوتنه","ملف","وێنە","चित्र","ไฟล์","파일","ファイル"],b=["infobox","anfo","anuāmapa","bilgi kutusu","bilgi","bilgiquti","boaty","boestkelaouiñ","bosca","capsa","diehtokássa","faktamall","ficha","generalni","gwybodlen3","info","infobokis","infoboks","infochascha","infokašćik","infokast","infokutija","infolentelė","infopolje","informkesto","infoskreine","infotaula","inligtingskas","inligtingskas3","inligtingskas4","kishtey","kotak","tertcita","tietolaatikko","yerleşim bilgi kutusu","ynfoboks","πλαίσιο","акарточка","аҥа","инфобокс","инфокутија","инфокутия","інфобокс","канадский","картка","карточка","карточка2","карточкарус","картуш","қуттӣ","ინფოდაფა","տեղեկաքարտ","אינפאקעסטל","תבנית","بطاقة","ڄاڻخانو","خانہ","لغة","ज्ञानसन्दूक","তথ্যছক","ਜਾਣਕਾਰੀਡੱਬਾ","సమాచారపెట్టె","තොරතුරුකොටුව","กล่องข้อมูล","ប្រអប់ព័ត៌មាន","정보상자","明細"];let f=" disambiguation";const k=["dab","dab","disamb","disambig","geodis","hndis","setindex","ship index","split dab","sport index","wp disambig","disambiguation cleanup","airport"+f,"biology"+f,"call sign"+f,"caselaw"+f,"chinese title"+f,"genus"+f,"hospital"+f,"lake index","letter"+f,"letter-number combination"+f,"mathematical"+f,"military unit"+f,"mountainindex","number"+f,"phonetics"+f,"place name"+f,"portal"+f,"road"+f,"school"+f,"species latin name abbreviation"+f,"species latin name"+f,"station"+f,"synagogue"+f,"taxonomic authority"+f,"taxonomy"+f].reduce(((e,t)=>(e[t]=!0,e)),{}),w=/. may (also )?refer to\b/i,y={about:!0,for:!0,"for multi":!0,"other people":!0,"other uses of":!0,distinguish:!0},$=new RegExp(". \\(("+["disambiguation","homonymie","توضيح","desambiguação","Begriffsklärung","disambigua","曖昧さ回避","消歧義","搞清楚","значения","ابهام‌زدایی","د ابہام","동음이의","dubbelsinnig","այլ կիրառումներ","ujednoznacznienie"].join("|")+")\\)$","i"),x=["dab","disamb","disambig","disambiguation","letter-numbercombdisambig","letter-number combination disambiguation","dmbox","airport disambiguation","biology disambiguation","call sign disambiguation","caselaw disambiguation","chinese title disambiguation","disambiguation cleanup","genus disambiguation","hospital disambiguation","human name disambiguation","human name disambiguation cleanup","letter-number combination disambiguation","mathematical disambiguation","military unit disambiguation","music disambiguation","number disambiguation","opus number disambiguation","phonetics disambiguation","place name disambiguation","portal disambiguation","road disambiguation","school disambiguation","species latin name abbreviation disambiguation","species latin name disambiguation","station disambiguation","synagogue disambiguation","taxonomic authority disambiguation","taxonomy disambiguation","template disambiguation","disamb2","disamb3","disamb4","disambiguation lead","disambiguation lead name","disambiguation name","disamb-term","disamb-terms","aðgreining","aimai","ałtsʼáʼáztiin","anlam ayrımı","anlam ayrımı","apartigilo","argipen","begriepskloorenge","begriffsklärung","begriffsklärung","begriffsklärung","begriffsklearung","bisongidila","bkl","bokokani","caddayn","clerheans","cudakirin","čvor","db","desambig","desambigación","desambiguação","desambiguació","desambiguación","desambiguáncia","desambiguasion","desambiguassiù","desambigui","dezambiguizare","dəqiqləşdirmə","disambigua","disambigua","disambigua","disambìgua","disambigua","disambiguasi","disambiguasi","discretiva","disheñvelout","disingkek","dixanbigua","dixebra","diżambigwazzjoni","doorverwijspagina","dp","dp","dubbelsinnig","dudalipen","dv","egyért","fleiri týdningar","fleirtyding","flertydig","förgrening","gì-ngiê","giklaro","gwahaniaethu","homonimo","homónimos","homonymie","huaʻōlelo puana like","idirdhealú","khu-pia̍t","kthjellim","kujekesa","maana","maneo bin","mehrdüdig begreep","menm non","muardüüdag artiikel","neibetsjuttings","nozīmju atdalīšana","nuorodinis","nyahkekaburan","omonimeye","omonimia","page dé frouque","paglilinaw","panangilawlawag","pansayod","pejy mitovy anarana","peker","razdvojba","razločitev","razvrstavanje","reddaghey","rozcestník","rozlišovacia stránka","sclerir noziun","selvendyssivu","soilleireachadh","suzmunski","täpsustuslehekülg","täsmennyssivu","telplänov","tlahtolmelahuacatlaliztli","trang định hướng","ujednoznacznienie","verdudeliking","wěcejwóznamowosć","wjacezmyslnosć","zambiguaçon","zeimeibu škiršona","αποσαφήνιση","айрық","аҵакырацәа","вишезначна одредница","ибҳомзудоӣ","кёб магъаналы","күп мәгънәләр","күп мәғәнәлелек","мъногосъмꙑслиѥ","неадназначнасць","неадназначнасьць","неоднозначность","олон удхатай","појаснување","пояснение","са шумуд манавал","салаа утгатай","суолталар","текмаанисиздик","цо магіна гуреб","чеперушка","чолхалла","шуко ончыктымаш-влак","მრავალმნიშვნელოვანი","բազմիմաստութիւն","բազմիմաստություն","באדייטן","פירושונים","ابهام‌زدایی","توضيح","توضيح","دقیقلشدیرمه","ڕوونکردنەوە","سلجهائپ","ضد ابہام","گجگجی بیری","نامبهمېدنه","መንታ","अस्पष्टता","बहुअर्थी","बहुविकल्पी शब्द","দ্ব্যর্থতা নিরসন","ਗੁੰਝਲ-ਖੋਲ੍ਹ","સંદિગ્ધ શીર્ષક","பக்கவழி நெறிப்படுத்தல்","అయోమయ నివృత్తి","ದ್ವಂದ್ವ ನಿವಾರಣೆ","വിവക്ഷകൾ","වක්‍රෝත්ති","แก้ความกำกวม","သံတူကြောင်းကွဲ","ណែនាំ","동음이의","扤清楚","搞清楚","曖昧さ回避","消歧义","釋義","gestion dj'omònim","sut'ichana qillqa"].reduce(((e,t)=>(e[t]=!0,e)),{}),v=function(e){if(!e)return!1;let t=e.text();return!(null===t||!t[0]||!0!==w.test(t))},j={caption:!0,alt:!0,links:!0,thumb:!0,url:!0},_=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},z={file(){let e=this.data.file||"";if(e){/^(image|file):/i.test(e)||(e=`File:${e}`),e=e.trim(),e=e.charAt(0).toUpperCase()+e.substring(1),e=e.replace(/ /g,"_")}return e},alt(){let e=this.data.alt||this.data.file||"";return e=e.replace(/^(file|image):/i,""),e=e.replace(/\.(jpg|jpeg|png|gif|svg)/i,""),e.replace(/_/g," ")},caption(){return this.data.caption?this.data.caption.text():""},links(){return this.data.caption?this.data.caption.links():[]},url(){let e=function(e){let t=function(e){let t=e.replace(/^(image|file?):/i,"");return t=t.charAt(0).toUpperCase()+t.substring(1),t=t.trim().replace(/ /g,"_"),t}(e);return t=encodeURIComponent(t),t}(this.file());return`https://${this.data.domain||"wikipedia.org"}/wiki/Special:Redirect/file/${e}`},thumbnail(e){return e=e||300,this.url()+"?width="+e},format(){let e=this.file().split(".");return e[e.length-1]?e[e.length-1].toLowerCase():null},json:function(e){return function(e,t){t=p(t,j);let i={file:e.file()};return!1!==t.thumb&&(i.thumb=e.thumbnail()),!1!==t.url&&(i.url=e.url()),!1!==t.caption&&e.data.caption&&(i.caption=e.caption(),!1!==t.links&&e.data.caption.links()&&(i.links=e.links())),!1!==t.alt&&e.data.alt&&(i.alt=e.alt()),i}(this,e=e||{})},text:function(){return""},wikitext:function(){return this.data.wiki||""}};Object.keys(z).forEach((e=>{_.prototype[e]=z[e]})),_.prototype.src=_.prototype.url,_.prototype.thumb=_.prototype.thumbnail;var O={aa:"Afar",ab:"Аҧсуа",af:"Afrikaans",ak:"Akana",als:"Alemannisch",am:"አማርኛ",an:"Aragonés",ang:"Englisc",ar:"العربية",arc:"ܣܘܪܬ",as:"অসমীয়া",ast:"Asturianu",av:"Авар",ay:"Aymar",az:"Azərbaycanca",ba:"Башҡорт",bar:"Boarisch","bat-smg":"Žemaitėška",bcl:"Bikol",be:"Беларуская","be-x-old":"ltr",bg:"Български",bh:"भोजपुरी",bi:"Bislama",bm:"Bamanankan",bn:"বাংলা",bo:"བོད་ཡིག",bpy:"ltr",br:"Brezhoneg",bs:"Bosanski",bug:"ᨅᨔ",bxr:"ltr",ca:"Català",cdo:"Chinese",ce:"Нохчийн",ceb:"Sinugboanong",ch:"Chamoru",cho:"Choctaw",chr:"ᏣᎳᎩ",chy:"Tsetsêhestâhese",co:"Corsu",cr:"Nehiyaw",cs:"Česky",csb:"Kaszëbsczi",cu:"Slavonic",cv:"Чăваш",cy:"Cymraeg",da:"Dansk",de:"Deutsch",diq:"Zazaki",dsb:"ltr",dv:"ދިވެހިބަސް",dz:"ཇོང་ཁ",ee:"Ɛʋɛ",far:"فارسی",el:"Ελληνικά",en:"English",eo:"Esperanto",es:"Español",et:"Eesti",eu:"Euskara",ext:"Estremeñu",ff:"Fulfulde",fi:"Suomi","fiu-vro":"Võro",fj:"Na",fo:"Føroyskt",fr:"Français",frp:"Arpitan",fur:"Furlan",fy:"ltr",ga:"Gaeilge",gan:"ltr",gd:"ltr",gil:"Taetae",gl:"Galego",gn:"Avañe'ẽ",got:"gutisk",gu:"ગુજરાતી",gv:"Gaelg",ha:"هَوُسَ",hak:"ltr",haw:"Hawai`i",he:"עברית",hi:"हिन्दी",ho:"ltr",hr:"Hrvatski",ht:"Krèyol",hu:"Magyar",hy:"Հայերեն",hz:"Otsiherero",ia:"Interlingua",id:"Bahasa",ie:"Interlingue",ig:"Igbo",ii:"ltr",ik:"Iñupiak",ilo:"Ilokano",io:"Ido",is:"Íslenska",it:"Italiano",iu:"ᐃᓄᒃᑎᑐᑦ",ja:"日本語",jbo:"Lojban",jv:"Basa",ka:"ქართული",kg:"KiKongo",ki:"Gĩkũyũ",kj:"Kuanyama",kk:"Қазақша",kl:"Kalaallisut",km:"ភាសាខ្មែរ",kn:"ಕನ್ನಡ",khw:"کھوار",ko:"한국어",kr:"Kanuri",ks:"कश्मीरी",ksh:"Ripoarisch",ku:"Kurdî",kv:"Коми",kw:"Kernewek",ky:"Kırgızca",la:"Latina",lad:"Dzhudezmo",lan:"Leb",lb:"Lëtzebuergesch",lg:"Luganda",li:"Limburgs",lij:"Líguru",lmo:"Lumbaart",ln:"Lingála",lo:"ລາວ",lt:"Lietuvių",lv:"Latviešu","map-bms":"Basa",mg:"Malagasy",man:"官話",mh:"Kajin",mi:"Māori",min:"Minangkabau",mk:"Македонски",ml:"മലയാളം",mn:"Монгол",mo:"Moldovenească",mr:"मराठी",ms:"Bahasa",mt:"bil-Malti",mus:"Muskogee",my:"Myanmasa",na:"Dorerin",nah:"Nahuatl",nap:"Nnapulitano",nd:"ltr",nds:"Plattdüütsch","nds-nl":"Saxon",ne:"नेपाली",new:"नेपालभाषा",ng:"Oshiwambo",nl:"Nederlands",nn:"ltr",no:"Norsk",nr:"ltr",nso:"ltr",nrm:"Nouormand",nv:"Diné",ny:"Chi-Chewa",oc:"Occitan",oj:"ᐊᓂᔑᓈᐯᒧᐎᓐ",om:"Oromoo",or:"ଓଡ଼ିଆ",os:"Иронау",pa:"ਪੰਜਾਬੀ",pag:"Pangasinan",pam:"Kapampangan",pap:"Papiamentu",pdc:"ltr",pi:"Pāli",pih:"Norfuk",pl:"Polski",pms:"Piemontèis",ps:"پښتو",pt:"Português",qu:"Runa",rm:"ltr",rmy:"Romani",rn:"Kirundi",ro:"Română","roa-rup":"Armâneashti",ru:"Русский",rw:"Kinyarwandi",sa:"संस्कृतम्",sc:"Sardu",scn:"Sicilianu",sco:"Scots",sd:"सिनधि",se:"ltr",sg:"Sängö",sh:"Srpskohrvatski",si:"සිංහල",simple:"ltr",sk:"Slovenčina",sl:"Slovenščina",sm:"Gagana",sn:"chiShona",so:"Soomaaliga",sq:"Shqip",sr:"Српски",ss:"SiSwati",st:"ltr",su:"Basa",sv:"Svenska",sw:"Kiswahili",ta:"தமிழ்",te:"తెలుగు",tet:"Tetun",tg:"Тоҷикӣ",th:"ไทย",ti:"ትግርኛ",tk:"Туркмен",tl:"Tagalog",tlh:"tlhIngan-Hol",tn:"Setswana",to:"Lea",tpi:"ltr",tr:"Türkçe",ts:"Xitsonga",tt:"Tatarça",tum:"chiTumbuka",tw:"Twi",ty:"Reo",udm:"Удмурт",ug:"Uyƣurqə",uk:"Українська",ur:"اردو",uz:"Ўзбек",ve:"Tshivenḓa",vi:"Việtnam",vec:"Vèneto",vls:"ltr",vo:"Volapük",wa:"Walon",war:"Winaray",wo:"Wollof",xal:"Хальмг",xh:"isiXhosa",yi:"ייִדיש",yo:"Yorùbá",za:"Cuengh",zh:"中文","zh-classical":"ltr","zh-min-nan":"Bân-lâm-gú","zh-yue":"粵語",zu:"isiZulu"};const E=".wikipedia.org/wiki/$1",q=".wikimedia.org/wiki/$1",N="www.";var S={acronym:N+"acronymfinder.com/$1.html",advisory:"advisory"+q,advogato:N+"advogato.org/$1",aew:"wiki.arabeyes.org/$1",appropedia:N+"appropedia.org/$1",aquariumwiki:N+"theaquariumwiki.com/$1",arborwiki:"localwiki.org/ann-arbor/$1",arxiv:"arxiv.org/abs/$1",atmwiki:N+"otterstedt.de/wiki/index.php/$1",baden:N+"stadtwiki-baden-baden.de/wiki/$1/",battlestarwiki:"en.battlestarwiki.org/wiki/$1",bcnbio:"historiapolitica.bcn.cl/resenas_parlamentarias/wiki/$1",beacha:N+"beachapedia.org/$1",betawiki:"translatewiki.net/wiki/$1",bibcode:"adsabs.harvard.edu/abs/$1",bibliowiki:"wikilivres.org/wiki/$1",bluwiki:"bluwiki.com/go/$1",blw:"britainloves"+E,botwiki:"botwiki.sno.cc/wiki/$1",boxrec:N+"boxrec.com/media/index.php?$1",brickwiki:N+"brickwiki.info/wiki/$1",bugzilla:"bugzilla.wikimedia.org/show_bug.cgi?id=$1",bulba:"bulbapedia.bulbagarden.net/wiki/$1",c:"commons"+q,c2:"c2.com/cgi/wiki?$1",c2find:"c2.com/cgi/wiki?FindPage&value=$1",cache:N+"google.com/search?q=cache:$1","ĉej":"esperanto.blahus.cz/cxej/vikio/index.php/$1",cellwiki:"cell.wikia.com/wiki/$1",centralwikia:"community.wikia.com/wiki/$1",chej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",choralwiki:N+"cpdl.org/wiki/index.php/$1",citizendium:"en.citizendium.org/wiki/$1",ckwiss:N+"ck-wissen.de/ckwiki/index.php?title=$1",comixpedia:N+"comixpedia.org/index.php?title=$1",commons:"commons"+q,communityscheme:"community.schemewiki.org/?c=s&key=$1",communitywiki:"communitywiki.org/$1",comune:"rete.comuni-italiani.it/wiki/$1",creativecommons:"creativecommons.org/licenses/$1",creativecommonswiki:"wiki.creativecommons.org/$1",cxej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",dcc:N+"dccwiki.com/$1",dcdatabase:"dc.wikia.com/$1",dcma:"christian-morgenstern.de/dcma/index.php?title=$1",debian:"wiki.debian.org/$1",delicious:N+"delicious.com/tag/$1",devmo:"developer.mozilla.org/en/docs/$1",dictionary:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",dict:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",disinfopedia:"sourcewatch.org/index.php/$1",distributedproofreaders:N+"pgdp.net/wiki/$1",distributedproofreadersca:N+"pgdpcanada.net/wiki/index.php/$1",dmoz:"curlie.org/$1",dmozs:"curlie.org/search?q=$1",doi:"doi.org/$1",donate:"donate"+q,doom_wiki:"doom.wikia.com/wiki/$1",download:"releases.wikimedia.org/$1",dbdump:"dumps.wikimedia.org/$1/latest/",dpd:"lema.rae.es/dpd/?key=$1",drae:"dle.rae.es/?w=$1",dreamhost:"wiki.dreamhost.com/index.php/$1",drumcorpswiki:N+"drumcorpswiki.com/index.php/$1",dwjwiki:N+"suberic.net/cgi-bin/dwj/wiki.cgi?$1","eĉei":N+"ikso.net/cgi-bin/wiki.pl?$1",ecoreality:N+"EcoReality.org/wiki/$1",ecxei:N+"ikso.net/cgi-bin/wiki.pl?$1",elibre:"enciclopedia.us.es/index.php/$1",emacswiki:N+"emacswiki.org/emacs?$1",encyc:"encyc.org/wiki/$1",energiewiki:N+"netzwerk-energieberater.de/wiki/index.php/$1",englyphwiki:"en.glyphwiki.org/wiki/$1",enkol:"enkol.pl/$1",eokulturcentro:"esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1",esolang:"esolangs.org/wiki/$1",etherpad:"etherpad.wikimedia.org/$1",ethnologue:N+"ethnologue.com/language/$1",ethnologuefamily:N+"ethnologue.com/show_family.asp?subid=$1",evowiki:"wiki.cotch.net/index.php/$1",exotica:N+"exotica.org.uk/wiki/$1",fanimutationwiki:"wiki.animutationportal.com/index.php/$1",fedora:"fedoraproject.org/wiki/$1",finalfantasy:"finalfantasy.wikia.com/wiki/$1",finnix:N+"finnix.org/$1",flickruser:N+"flickr.com/people/$1",flickrphoto:N+"flickr.com/photo.gne?id=$1",floralwiki:N+"floralwiki.co.uk/wiki/$1",foldoc:"foldoc.org/$1",foundation:"foundation"+q,foundationsite:"wikimediafoundation.org/$1",foxwiki:"fox.wikis.com/wc.dll?Wiki~$1",freebio:"freebiology.org/wiki/$1",freebsdman:N+"FreeBSD.org/cgi/man.cgi?apropos=1&query=$1",freeculturewiki:"wiki.freeculture.org/index.php/$1",freedomdefined:"freedomdefined.org/$1",freefeel:"freefeel.org/wiki/$1",freekiwiki:"wiki.freegeek.org/index.php/$1",freesoft:"directory.fsf.org/wiki/$1",ganfyd:"ganfyd.org/index.php?title=$1",gardenology:N+"gardenology.org/wiki/$1",gausswiki:"gauss.ffii.org/$1",gentoo:"wiki.gentoo.org/wiki/$1",genwiki:"wiki.genealogy.net/index.php/$1",gerrit:"gerrit.wikimedia.org/r/$1",git:"gerrit.wikimedia.org/g/$1",google:N+"google.com/search?q=$1",googledefine:N+"google.com/search?q=define:$1",googlegroups:"groups.google.com/groups?q=$1",guildwarswiki:"wiki.guildwars.com/wiki/$1",guildwiki:"guildwars.wikia.com/wiki/$1",guc:"tools.wmflabs.org/guc/?user=$1",gucprefix:"tools.wmflabs.org/guc/?isPrefixPattern=1&src=rc&user=$1",gutenberg:N+"gutenberg.org/etext/$1",gutenbergwiki:N+"gutenberg.org/wiki/$1",hackerspaces:"hackerspaces.org/wiki/$1",h2wiki:"halowiki.net/p/$1",hammondwiki:N+"dairiki.org/HammondWiki/index.php3?$1",hdl:"hdl.handle.net/$1",heraldik:"heraldik-wiki.de/wiki/$1",heroeswiki:"heroeswiki.com/$1",horizonlabs:"horizon.wikimedia.org/$1",hrwiki:N+"hrwiki.org/index.php/$1",hrfwiki:"fanstuff.hrwiki.org/index.php/$1",hupwiki:"wiki.hup.hu/index.php/$1",iarchive:"archive.org/details/$1",imdbname:N+"imdb.com/name/nm$1/",imdbtitle:N+"imdb.com/title/tt$1/",imdbcompany:N+"imdb.com/company/co$1/",imdbcharacter:N+"imdb.com/character/ch$1/",incubator:"incubator"+q,infosecpedia:"infosecpedia.org/wiki/$1",infosphere:"theinfosphere.org/$1","iso639-3":"iso639-3.sil.org/code/$1",issn:N+"worldcat.org/issn/$1",iuridictum:"iuridictum.pecina.cz/w/$1",jaglyphwiki:"glyphwiki.org/wiki/$1",jefo:"esperanto-jeunes.org/wiki/$1",jerseydatabase:"jerseydatabase.com/wiki.php?id=$1",jira:"jira.toolserver.org/browse/$1",jspwiki:N+"ecyrd.com/JSPWiki/Wiki.jsp?page=$1",jstor:N+"jstor.org/journals/$1",kamelo:"kamelopedia.mormo.org/index.php/$1",karlsruhe:"ka.stadtwiki.net/$1",kinowiki:"kino.skripov.com/index.php/$1",komicawiki:"wiki.komica.org/?$1",kontuwiki:"kontu.wiki/$1",wikitech:"wikitech"+q,libreplanet:"libreplanet.org/wiki/$1",linguistlist:"linguistlist.org/forms/langs/LLDescription.cfm?code=$1",linuxwiki:N+"linuxwiki.de/$1",linuxwikide:N+"linuxwiki.de/$1",liswiki:"liswiki.org/wiki/$1",literateprograms:"en.literateprograms.org/$1",livepedia:N+"livepedia.gr/index.php?title=$1",localwiki:"localwiki.org/$1",lojban:"mw.lojban.org/papri/$1",lostpedia:"lostpedia.wikia.com/wiki/$1",lqwiki:"wiki.linuxquestions.org/wiki/$1",luxo:"tools.wmflabs.org/guc/?user=$1",mail:"lists.wikimedia.org/mailman/listinfo/$1",mailarchive:"lists.wikimedia.org/pipermail/$1",mariowiki:N+"mariowiki.com/$1",marveldatabase:N+"marveldatabase.com/wiki/index.php/$1",meatball:"meatballwiki.org/wiki/$1",mw:N+"mediawiki.org/wiki/$1",mediazilla:"bugzilla.wikimedia.org/$1",memoryalpha:"memory-alpha.fandom.com/wiki/$1",metawiki:"meta"+q,metawikimedia:"meta"+q,metawikipedia:"meta"+q,mineralienatlas:N+"mineralienatlas.de/lexikon/index.php/$1",moinmoin:"moinmo.in/$1",monstropedia:N+"monstropedia.org/?title=$1",mosapedia:"mosapedia.de/wiki/index.php/$1",mozcom:"mozilla.wikia.com/wiki/$1",mozillawiki:"wiki.mozilla.org/$1",mozillazinekb:"kb.mozillazine.org/$1",musicbrainz:"musicbrainz.org/doc/$1",mediawikiwiki:N+"mediawiki.org/wiki/$1",mwod:N+"merriam-webster.com/dictionary/$1",mwot:N+"merriam-webster.com/thesaurus/$1",nkcells:N+"nkcells.info/index.php?title=$1",nara:"catalog.archives.gov/id/$1",nosmoke:"no-smok.net/nsmk/$1",nost:"nostalgia"+E,nostalgia:"nostalgia"+E,oeis:"oeis.org/$1",oldwikisource:"wikisource.org/wiki/$1",olpc:"wiki.laptop.org/go/$1",omegawiki:N+"omegawiki.org/Expression:$1",onelook:N+"onelook.com/?ls=b&w=$1",openlibrary:"openlibrary.org/$1",openstreetmap:"wiki.openstreetmap.org/wiki/$1",openwetware:"openwetware.org/wiki/$1",opera7wiki:"operawiki.info/$1",organicdesign:N+"organicdesign.co.nz/$1",orthodoxwiki:"orthodoxwiki.org/$1",osmwiki:"wiki.openstreetmap.org/wiki/$1",otrs:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=$1",otrswiki:"otrs-wiki"+q,ourmedia:N+"socialtext.net/ourmedia/index.cgi?$1",outreach:"outreach"+q,outreachwiki:"outreach"+q,owasp:N+"owasp.org/index.php/$1",panawiki:"wiki.alairelibre.net/index.php?title=$1",patwiki:"gauss.ffii.org/$1",personaltelco:"personaltelco.net/wiki/$1",petscan:"petscan.wmflabs.org/?psid=$1",phab:"phabricator.wikimedia.org/$1",phabricator:"phabricator.wikimedia.org/$1",phwiki:N+"pocketheaven.com/ph/wiki/index.php?title=$1",phpwiki:"phpwiki.sourceforge.net/phpwiki/index.php?$1",planetmath:"planetmath.org/node/$1",pmeg:N+"bertilow.com/pmeg/$1",pmid:N+"ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract",pokewiki:"pokewiki.de/$1","pokéwiki":"pokewiki.de/$1",policy:"policy.wikimedia.org/$1",proofwiki:N+"proofwiki.org/wiki/$1",pyrev:N+"mediawiki.org/wiki/Special:Code/pywikipedia/$1",pythoninfo:"wiki.python.org/moin/$1",pythonwiki:N+"pythonwiki.de/$1",pywiki:"c2.com/cgi/wiki?$1",psycle:"psycle.sourceforge.net/wiki/$1",quality:"quality"+q,quarry:"quarry.wmflabs.org/$1",regiowiki:"regiowiki.at/wiki/$1",rev:N+"mediawiki.org/wiki/Special:Code/MediaWiki/$1",revo:"purl.org/NET/voko/revo/art/$1.html",rfc:"tools.ietf.org/html/rfc$1",rheinneckar:"rhein-neckar-wiki.de/$1",robowiki:"robowiki.net/?$1",rodovid:"en.rodovid.org/wk/$1",reuterswiki:"glossary.reuters.com/index.php/$1",rowiki:"wiki.rennkuckuck.de/index.php/$1",rt:"rt.wikimedia.org/Ticket/Display.html?id=$1",s23wiki:"s23.org/wiki/$1",scholar:"scholar.google.com/scholar?q=$1",schoolswp:"schools-"+E,scores:"imslp.org/wiki/$1",scoutwiki:"en.scoutwiki.org/$1",scramble:N+"scramble.nl/wiki/index.php?title=$1",seapig:N+"seapig.org/$1",seattlewiki:"seattle.wikia.com/wiki/$1",slwiki:"wiki.secondlife.com/wiki/$1","semantic-mw":N+"semantic-mediawiki.org/wiki/$1",senseislibrary:"senseis.xmp.net/?$1",sharemap:"sharemap.org/$1",silcode:N+"sil.org/iso639-3/documentation.asp?id=$1",slashdot:"slashdot.org/article.pl?sid=$1",sourceforge:"sourceforge.net/$1",spcom:"spcom"+q,species:"species"+q,squeak:"wiki.squeak.org/squeak/$1",stats:"stats.wikimedia.org/$1",stewardry:"tools.wmflabs.org/meta/stewardry/?wiki=$1",strategy:"strategy"+q,strategywiki:"strategywiki.org/wiki/$1",sulutil:"meta.wikimedia.org/wiki/Special:CentralAuth/$1",swtrain:"train.spottingworld.com/$1",svn:"svn.wikimedia.org/viewvc/mediawiki/$1?view=log",swinbrain:"swinbrain.ict.swin.edu.au/wiki/$1",tabwiki:N+"tabwiki.com/index.php/$1",tclerswiki:"wiki.tcl.tk/$1",technorati:N+"technorati.com/search/$1",tenwiki:"ten"+E,testwiki:"test"+E,testwikidata:"test.wikidata.org/wiki/$1",test2wiki:"test2"+E,tfwiki:"tfwiki.net/wiki/$1",thelemapedia:N+"thelemapedia.org/index.php/$1",theopedia:N+"theopedia.com/$1",thinkwiki:N+"thinkwiki.org/wiki/$1",ticket:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=$1",tmbw:"tmbw.net/wiki/$1",tmnet:N+"technomanifestos.net/?$1",tmwiki:N+"EasyTopicMaps.com/?page=$1",toolforge:"tools.wmflabs.org/$1",toollabs:"tools.wmflabs.org/$1",tools:"toolserver.org/$1",tswiki:N+"mediawiki.org/wiki/Toolserver:$1",translatewiki:"translatewiki.net/wiki/$1",tviv:"tviv.org/wiki/$1",tvtropes:N+"tvtropes.org/pmwiki/pmwiki.php/Main/$1",twiki:"twiki.org/cgi-bin/view/$1",tyvawiki:N+"tyvawiki.org/wiki/$1",umap:"umap.openstreetmap.fr/$1",uncyclopedia:"en.uncyclopedia.co/wiki/$1",unihan:N+"unicode.org/cgi-bin/GetUnihanData.pl?codepoint=$1",unreal:"wiki.beyondunreal.com/wiki/$1",urbandict:N+"urbandictionary.com/define.php?term=$1",usej:N+"tejo.org/usej/$1",usemod:N+"usemod.com/cgi-bin/wiki.pl?$1",usability:"usability"+q,utrs:"utrs.wmflabs.org/appeal.php?id=$1",vikidia:"fr.vikidia.org/wiki/$1",vlos:"tusach.thuvienkhoahoc.com/wiki/$1",vkol:"kol.coldfront.net/thekolwiki/index.php/$1",voipinfo:N+"voip-info.org/wiki/view/$1",votewiki:"vote"+q,werelate:N+"werelate.org/wiki/$1",wg:"wg-en"+E,wikia:N+"wikia.com/wiki/w:c:$1",wikiasite:N+"wikia.com/wiki/w:c:$1",wikiapiary:"wikiapiary.com/wiki/$1",wikibooks:"en.wikibooks.org/wiki/$1",wikichristian:N+"wikichristian.org/index.php?title=$1",wikicities:N+"wikia.com/wiki/w:$1",wikicity:N+"wikia.com/wiki/w:c:$1",wikiconference:"wikiconference.org/wiki/$1",wikidata:N+"wikidata.org/wiki/$1",wikif1:N+"wikif1.org/$1",wikifur:"en.wikifur.com/wiki/$1",wikihow:N+"wikihow.com/$1",wikiindex:"wikiindex.org/$1",wikilemon:"wiki.illemonati.com/$1",wikilivres:"wikilivres.org/wiki/$1",wikilivresru:"wikilivres.ru/$1","wikimac-de":"apfelwiki.de/wiki/Main/$1",wikimedia:"foundation"+q,wikinews:"en.wikinews.org/wiki/$1",wikinfo:"wikinfo.org/w/index.php/$1",wikinvest:"meta.wikimedia.org/wiki/Interwiki_map/discontinued#Wikinvest",wikiotics:"wikiotics.org/$1",wikipapers:"wikipapers.referata.com/wiki/$1",wikipedia:"en"+E,wikipediawikipedia:"en.wikipedia.org/wiki/Wikipedia:$1",wikiquote:"en.wikiquote.org/wiki/$1",wikisophia:"wikisophia.org/index.php?title=$1",wikisource:"en.wikisource.org/wiki/$1",wikispecies:"species"+q,wikispot:"wikispot.org/?action=gotowikipage&v=$1",wikiskripta:N+"wikiskripta.eu/index.php/$1",labsconsole:"wikitech"+q,wikiti:"wikiti.denglend.net/index.php?title=$1",wikiversity:"en.wikiversity.org/wiki/$1",wikivoyage:"en.wikivoyage.org/wiki/$1",betawikiversity:"beta.wikiversity.org/wiki/$1",wikiwikiweb:"c2.com/cgi/wiki?$1",wiktionary:"en.wiktionary.org/wiki/$1",wipipedia:"wipipedia.org/index.php/$1",wlug:N+"wlug.org.nz/$1",wmam:"am"+q,wmar:N+"wikimedia.org.ar/wiki/$1",wmat:"mitglieder.wikimedia.at/$1",wmau:"wikimedia.org.au/wiki/$1",wmbd:"bd"+q,wmbe:"be"+q,wmbr:"br"+q,wmca:"ca"+q,wmch:N+"wikimedia.ch/$1",wmcl:N+"wikimediachile.cl/index.php?title=$1",wmcn:"cn"+q,wmco:"co"+q,wmcz:N+"wikimedia.cz/web/$1",wmdc:"wikimediadc.org/wiki/$1",securewikidc:"secure.wikidc.org/$1",wmde:"wikimedia.de/wiki/$1",wmdk:"dk"+q,wmee:"ee"+q,wmec:"ec"+q,wmes:N+"wikimedia.es/wiki/$1",wmet:"ee"+q,wmfdashboard:"outreachdashboard.wmflabs.org/$1",wmfi:"fi"+q,wmfr:"wikimedia.fr/$1",wmge:"ge"+q,wmhi:"hi"+q,wmhk:"meta.wikimedia.org/wiki/Wikimedia_Hong_Kong",wmhu:"wikimedia.hu/wiki/$1",wmid:"id"+q,wmil:N+"wikimedia.org.il/$1",wmin:"wiki.wikimedia.in/$1",wmit:"wiki.wikimedia.it/wiki/$1",wmke:"meta.wikimedia.org/wiki/Wikimedia_Kenya",wmmk:"mk"+q,wmmx:"mx"+q,wmnl:"nl"+q,wmnyc:"nyc"+q,wmno:"no"+q,"wmpa-us":"pa-us"+q,wmph:"meta.wikimedia.org/wiki/Wikimedia_Philippines",wmpl:"pl"+q,wmpt:"pt"+q,wmpunjabi:"punjabi"+q,wmromd:"romd"+q,wmrs:"rs"+q,wmru:"ru"+q,wmse:"se"+q,wmsk:"wikimedia.sk/$1",wmtr:"tr"+q,wmtw:"wikimedia.tw/wiki/index.php5/$1",wmua:"ua"+q,wmuk:"wikimedia.org.uk/wiki/$1",wmve:"wikimedia.org.ve/wiki/$1",wmza:"wikimedia.org.za/wiki/$1",wm2005:"wikimania2005"+q,wm2006:"wikimania2006"+q,wm2007:"wikimania2007"+q,wm2008:"wikimania2008"+q,wm2009:"wikimania2009"+q,wm2010:"wikimania2010"+q,wm2011:"wikimania2011"+q,wm2012:"wikimania2012"+q,wm2013:"wikimania2013"+q,wm2014:"wikimania2014"+q,wm2015:"wikimania2015"+q,wm2016:"wikimania2016"+q,wm2017:"wikimania2017"+q,wm2018:"wikimania2018"+q,wmania:"wikimania"+q,wikimania:"wikimania"+q,wmteam:"wikimaniateam"+q,wmf:"foundation"+q,wmfblog:"blog.wikimedia.org/$1",wmdeblog:"blog.wikimedia.de/$1",wookieepedia:"starwars.wikia.com/wiki/$1",wowwiki:N+"wowwiki.com/$1",wqy:"wqy.sourceforge.net/cgi-bin/index.cgi?$1",wurmpedia:"wurmpedia.com/index.php/$1",viaf:"viaf.org/viaf/$1",zrhwiki:N+"zrhwiki.ch/wiki/$1",zum:"wiki.zum.de/$1",zwiki:N+"zwiki.org/$1",m:"meta"+q,meta:"meta"+q,sep11:"sep11"+E,d:N+"wikidata.org/wiki/$1",minnan:"zh-min-nan"+E,nb:"no"+E,"zh-cfr":"zh-min-nan"+E,"zh-cn":"zh"+E,"zh-tw":"zh"+E,nan:"zh-min-nan"+E,vro:"fiu-vro"+E,cmn:"zh"+E,lzh:"zh-classical"+E,rup:"roa-rup"+E,gsw:"als"+E,"be-tarask":"be-x-old"+E,sgs:"bat-smg"+E,egl:"eml"+E,w:"en"+E,wikt:"en.wiktionary.org/wiki/$1",q:"en.wikiquote.org/wiki/$1",b:"en.wikibooks.org/wiki/$1",n:"en.wikinews.org/wiki/$1",s:"en.wikisource.org/wiki/$1",chapter:"en"+q,v:"en.wikiversity.org/wiki/$1",voy:"en.wikivoyage.org/wiki/$1"};Object.keys(O).forEach((e=>{S[e]=e+".wikipedia.org/wiki/$1"}));const C=/^(category|catégorie|kategorie|categoría|categoria|categorie|kategoria|تصنيف|image|file|fichier|datei|media):/i,L=/\[(https?|news|ftp|mailto|gopher|irc)(:\/\/[^\]| ]{4,1500})([| ].*?)?\]/g,A=/\[\[(.{0,1600}?)\]\]([a-z]+)?/gi,P=function(e,t){return t.replace(A,(function(t,i,a){let n=null,r=i;if(i.match(/\|/)&&(r=(i=i.replace(/\[\[(.{2,1000}?)\]\](\w{0,10})/g,"$1$2")).replace(/(.{2,1000})\|.{0,2000}/,"$1"),n=i.replace(/.{2,1000}?\|/,""),null===n&&r.match(/\|$/)&&(r=r.replace(/\|$/,""),n=r)),r.match(C))return i;let o={page:r,raw:t};return o.page=o.page.replace(/#(.*)/,((e,t)=>(o.anchor=t,""))),o=function(e){let t=e.page||"";if(-1!==t.indexOf(":")){let i=t.match(/^(.*):(.*)/);if(null===i)return e;let a=i[1]||"";if(a=a.toLowerCase(),-1!==a.indexOf(":")){let[,t,i]=a.match(/^:?(.*):(.*)/);if(!1===S.hasOwnProperty(t)||!1===O.hasOwnProperty(i))return e;e.wiki={wiki:t,lang:i}}else{if(!1===S.hasOwnProperty(a))return e;e.wiki=a}e.page=i[2]}return e}(o),o.wiki&&(o.type="interwiki"),null!==n&&n!==o.page&&(o.text=n),a&&(o.text=o.text||o.page,o.text+=a.trim()),o.page&&!1===/^[A-Z]/.test(o.page)&&(o.text||(o.text=o.page),o.page=o.page),o.text&&o.text.startsWith(":")&&(o.text=o.text.replace(/^:/,"")),e.push(o),i})),e},T=function(e){let t=[];if(t=function(e,t){return t.replace(L,(function(t,i,a,n){return n=n||"",e.push({type:"external",site:i+a,text:n.trim(),raw:t}),n})),e}(t,e),t=P(t,e),0!==t.length)return t},D=new RegExp("^[ \n\t]*?#("+["adkas","aýdaw","doorverwijzing","ohjaus","patrz","přesměruj","redirección","redireccion","redirección","redirecionamento","redirect","redirection","redirection","rinvia","tilvísun","uudelleenohjaus","weiterleitung","weiterleitung","yönlendi̇r","yönlendirme","yönlendi̇rme","ανακατευθυνση","айдау","перанакіраваньне","перенаправлення","пренасочување","преусмери","преусмјери","تغییر_مسیر","تغییرمسیر","تغییرمسیر","เปลี่ยนทาง","ប្តូរទីតាំងទៅ","転送","重定向"].join("|")+") *?(\\[\\[.{2,180}?\\]\\])","i"),I=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","references","source","syntaxhighlight","timeline"],M=`< ?(${I.join("|")}) ?[^>]{0,200}?>`,R=`< ?/ ?(${I.join("|")}) ?>`,U=new RegExp(`${M}[\\s\\S]+?${R}`,"gi");function F(e){return e=(e=(e=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(U," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%.\-#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/
(.*?)<\/blockquote>/g,"{{blockquote|text=$1}}")).replace(/ ?<[ /]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr|u)[ /]?> ?/g," ")).replace(/ ?<[ /]?(abbr|bdi|bdo|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ /]?> ?/g," ")).replace(/ ?<[ /]?h[0-9][ /]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()}(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~{2,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," ")).replace(/–/g,"–"))).replace(/\([,;: ]+\)/g,"")).replace(/\{\{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,"")}const B=/[\\.$]/,K=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},W=function(e={}){let t=Object.keys(e);for(let i=0;i{Z.prototype[e]=G[e]}));const V=/^[0-9,.]+$/,J={text:!0,links:!0,formatting:!0,numbers:!0},X=function(e={}){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Q={links:function(e){let t=this.data.links||[];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page===e));return void 0===i?[]:[i]}return t},interwiki:function(){return this.links().filter((e=>void 0!==e.wiki))},bolds:function(){return this.data&&this.data.fmt&&this.data.fmt.bold&&this.data.fmt.bold||[]},italics:function(){return this.data&&this.data.fmt&&this.data.fmt.italic&&this.data.fmt.italic||[]},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return function(e,t){t=p(t,J);let i={},a=e.text();if(!0===t.text&&(i.text=a),!0===t.numbers&&V.test(a)){let e=Number(a.replace(/,/g,""));!1===isNaN(e)&&(i.number=e)}return t.links&&e.links().length>0&&(i.links=e.links().map((e=>e.json()))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i}(this,e)},wikitext:function(){return this.data.wiki||""},isEmpty:function(){return""===this.data.text}};Object.keys(Q).forEach((e=>{X.prototype[e]=Q[e]}));const ee={links:"link",bolds:"bold",italics:"italic"};Object.keys(ee).forEach((e=>{X.prototype[ee[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}})),X.prototype.plaintext=X.prototype.text;const te=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),ie=new RegExp("(^| |')("+te.join("|")+")[.!?] ?$","i"),ae=/[ .'][A-Z].? *$/i,ne=/\.{3,} +$/,re=/ c\.\s$/,oe=/\p{Letter}/iu;function se(e){let t={wiki:e,text:e};return function(e){let t=e.text,i=T(t)||[];e.links=i.map((e=>(t=t.replace(e.raw,e.text||e.page||""),new Z(e)))),t=t.replace(/\[\[File:(.{2,80}?)\|([^\]]+)\]\](\w{0,5})/g,"$1"),e.text=t}(t),t.text=r(t.text.replace(/\([,;: ]*\)/g,"").replace(/\( *(; ?)+/g,"(")).replace(/ +\.$/,"."),t=function(e){let t=[],i=[],a=e.text||"";return a=a.replace(/'''''(.{0,2500}?)'''''/g,((e,a)=>(t.push(a),i.push(a),a))),a=a.replace(/''''(.{0,2500}?)''''/g,((e,i)=>(t.push(`'${i}'`),`'${i}'`))),a=a.replace(/'''(.{0,2500}?)'''/g,((e,i)=>(t.push(i),i))),a=a.replace(/''(.{0,2500}?)''/g,((e,t)=>(i.push(t),t))),e.text=a,t.length>0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e}(t),new X(t)}const le=function(e){let t=function(e){let t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;let a=function(e){let t=e.split(/(\n+)/);return t=t.filter((e=>e.match(/\S/))),t=t.map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s|$)/g)})),function(e){let t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t)}(e);for(let e=0;ei.length)return!1;const a=e.match(/"/g);if(a&&a.length%2!=0&&e.length<900)return!1;const n=e.match(/[()]/g);return!(n&&n.length%2!=0&&e.length<900)}(n))?/^\s/.test(i[e+1])||/\s$/.test(i[e])?i[e+1]=i[e]+i[e+1]:i[e+1]=i[e]+" "+i[e+1]:i[e]&&i[e].length>0&&(t.push(i[e]),i[e]="");var n;return 0===t.length?[e]:t}(e.wiki);t=t.map(se),t[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},ce=/.*rowspan *= *["']?([0-9]+)["']?[ |]*/,ue=/.*colspan *= *["']?([0-9]+)["']?[ |]*/,me=function(e){return e=function(e){return e.forEach(((t,i)=>{t.forEach(((a,n)=>{let r=a.match(ce);if(null!==r){let o=parseInt(r[1],10);a=a.replace(ce,""),t[n]=a;for(let t=i+1;t{e.forEach(((t,i)=>{let a=t.match(ue);if(null!==a){let n=parseInt(a[1],10);e[i]=t.replace(ue,"");for(let t=1;te.length>0))}(e))},pe=/^!/,de={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},he=function(e){return(e=se(e).text()).match(/\|/)&&(e=e.replace(/.*?\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},ge=function(e){if(e.length<=3)return[];let t=e[0].slice(0);t=t.map((e=>(e=se(e=e.replace(/^! */,"")).text(),e=(e=he(e)).toLowerCase())));for(let i=0;ie&&!0!==/^\|\+/.test(e))),!0===/^\{\|/.test(e[0])&&e.shift(),!0===/^\|\}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(let a=0;a0&&(t.push(i),i=[]);else{let e=n.charAt(0);"|"!==e&&"!"!==e||(n=n.substring(1)),n=n.split(/(?:\|\||!!)/),"!"===e&&(n[0]=e+n[0]),n.forEach((e=>{e=e.trim(),i.push(e)}))}}return i.length>0&&t.push(i),t}(e.replace(/\r/g,"").replace(/\n(\s*[^|!{\s])/g," $1").split(/\n/).map((e=>e.trim())));if(t=t.filter((e=>e)),0===t.length)return[];t=function(e){return e.filter((e=>1!==e.length||!e[0]||!pe.test(e[0])||!1!==/rowspan/i.test(e[0])))}(t),t=me(t);let i=function(e=[]){let t=[];var i;(i=(i=e[0])||[]).length-i.filter((e=>e)).length>3&&e.shift();let a=e[0];return a&&a[0]&&a[1]&&(/^!/.test(a[0])||/^!/.test(a[1]))&&(t=a.map((e=>(e=e.replace(/^! */,""),he(e)))),e.shift()),a=e[0],a&&a[0]&&a[1]&&/^!/.test(a[0])&&/^!/.test(a[1])&&(a.forEach(((e,i)=>{e=e.replace(/^! */,""),e=he(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(t);if(!i||i.length<=1){i=ge(t);let e=t[t.length-1]||[];i.length<=1&&e.length>2&&(i=ge(t.slice(1)),i.length>0&&(t=t.slice(2)))}let a=t.map((e=>function(e,t){let i={};return e.forEach(((e,a)=>{let n=t[a]||"col"+(a+1),r=se(e);r.text(he(r.text())),i[n]=r})),i}(e,i)));return a},fe={},ke=function(e=""){return e=(e=(e=(e=e.toLowerCase()).replace(/[_-]/g," ")).replace(/\(.*?\)/,"")).trim()},we=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_wiki",{enumerable:!1,value:t})},ye={links(e){let t=[];if(this.data.forEach((e=>{Object.keys(e).forEach((i=>{t=t.concat(e[i].links())}))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},get(e){let t=this.data[0]||{},i=Object.keys(t).reduce(((e,t)=>(e[ke(t)]=t,e)),{});if("string"==typeof e){let t=ke(e);return t=i[t]||t,this.data.map((e=>e[t]?e[t].text():null))}return e=e.map(ke).map((e=>i[e]||e)),this.data.map((t=>e.reduce(((e,i)=>(t[i]?e[i]=t[i].text():e[i]="",e)),{})))},keyValue(e){let t=this.json(e);return t.forEach((e=>{Object.keys(e).forEach((t=>{e[t]=e[t].text}))})),t},json(e){return e=p(e,fe),function(e,t){return e.map((e=>{let i={};return Object.keys(e).forEach((t=>{i[t]=e[t].json()})),!0===t.encode&&(i=W(i)),i}))}(this.data,e)},text:()=>"",wikitext(){return this._wiki||""}};ye.keyvalue=ye.keyValue,ye.keyval=ye.keyValue,Object.keys(ye).forEach((e=>{we.prototype[e]=ye[e]}));const $e=/^\s*\{\|/,xe=/^\s*\|\}/,ve={sentences:!0},je={sentences:!0,lists:!0,images:!0},_e=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},ze={sentences:function(){return this.data.sentences||[]},references:function(){return this.data.references},lists:function(){return this.data.lists},images(){return this.data.images||[]},links:function(e){let t=[];if(this.sentences().forEach((i=>{t=t.concat(i.links(e))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},interwiki(){let e=[];return this.sentences().forEach((t=>{e=e.concat(t.interwiki())})),e||[]},text:function(e){e=p(e,je);let t=this.sentences().map((t=>t.text(e))).join(" ");return this.lists().forEach((e=>{t+="\n"+e.text()})),t},json:function(e){return function(e,t){let i={};return!0===(t=p(t,ve)).sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,je))},wikitext:function(){return this.data.wiki}};ze.citations=ze.references,Object.keys(ze).forEach((e=>{_e.prototype[e]=ze[e]}));const Oe={sentences:"sentence",references:"reference",citations:"citation",lists:"list",images:"image",links:"link"};Object.keys(Oe).forEach((e=>{_e.prototype[Oe[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}}));const Ee=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},qe=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},Ne=/^[\p{Letter}0-9._/\- '()\t]+=/iu,Se={template:!0,list:!0,prototype:!0},Ce=function(e,t){let i=0;return e.reduce(((e,a="")=>{if(a=a.trim(),!0===Ne.test(a)){let t=function(e){let t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();let a=t.slice(1).join("=");return Se.hasOwnProperty(i)&&(i="_"+i),{key:i,val:a.trim()}}(a);if(t.key)return e[t.key]&&!t.val||(e[t.key]=t.val),e}if(t&&t[i]){e[t[i]]=a}else e.list=e.list||[],e.list.push(a);return i+=1,e}),{})},Le={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Ae=function(e,t){let i=se(e);return"json"===t?i.json():"raw"===t?i:i.text()},Pe=function(e,t=[],i){let a=function(e){let t=e.split(/\n?\|/);t.forEach(((e,i)=>{null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)})),t=t.filter((e=>null!==e)),t=t.map((e=>(e||"").trim()));for(let e=t.length-1;e>=0;e-=1){""===t[e]&&t.pop();break}return t}(e=Ee(e||"")),n=a.shift(),r=Ce(a,t);return r=function(e){return Object.keys(e).forEach((t=>{!0===Le[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e}(r),r[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((e=>{r[e]="list"!==e?Ae(r[e],i):r[e].map((e=>Ae(e,i)))})),n&&(r.template=qe(n)),r};const Te=new RegExp("("+g.join("|")+"):","i");let De=`(${g.join("|")})`;const Ie=new RegExp(De+":(.+?)[\\||\\]]","iu"),Me=/^\[\[:/,Re={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},Ue=function(e,t){let i=e.wiki,a=function(e){let t=[],i=[];const a=e.split("");let n=0;for(let r=0;r0){let e=0,a=0;for(let t=0;ta&&i.push("]"),t.push(i.join("")),i=[]}}return t}(i);a.forEach((function(a){if(!0===Te.test(a)){e.images=e.images||[];let n=function(e,t){let i=e.match(Ie);if(null===i||!i[2])return null;if(Me.test(e))return null;let a=`${i[1]}:${i[2]||""}`;if(a){let i={file:a,lang:t._lang,domain:t._domain,wiki:e,pluginData:{}};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");let n=Pe(e),r=n.list||[];return n.alt&&(i.alt=n.alt),r=r.filter((e=>!1===Re.hasOwnProperty(e))),r[r.length-1]&&(i.caption=se(r[r.length-1])),new _(i)}return null}(a,t);n&&(e.images.push(n),i=i.replace(a,""))}})),e.wiki=i},Fe={},Be=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},Ke={lines(){return this.data},links(e){let t=[];if(this.lines().forEach((e=>{t=t.concat(e.links())})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},json(e){return e=p(e,Fe),this.lines().map((t=>t.json(e)))},text(){return((e,t)=>e.map((e=>" * "+e.text(t))).join("\n"))(this.data)},wikitext(){return this.wiki||""}};Object.keys(Ke).forEach((e=>{Be.prototype[e]=Ke[e]}));const We=/^[#*:;|]+/,He=/^\*+[^:,|]{4}/,Ye=/^ ?#[^:,|]{4}/,Ze=/[\p{Letter}_0-9\]}]/iu,Ge=function(e){return We.test(e)||He.test(e)||Ye.test(e)},Ve=function(e,t){let i=[];for(let a=t;ae&&Ze.test(e))),i=function(e){let t=1;e=e.filter((e=>e));for(let i=0;ie&&e.trim().length>0)),a=a.map((e=>{let i={wiki:e,lists:[],sentences:[],images:[]};return function(e){let t=e.wiki,i=t.split(/\n/g),a=[],n=[];for(let e=0;e0&&(a.push(t),e+=t.length-1)}else n.push(i[e]);e.lists=a.map((e=>new Be(e,t))),e.wiki=n.join("\n")}(i),Ue(i,t),le(i),new _e(i)})),e._wiki=i,e._paragraphs=a},Qe="{",et=function(e){let t=0,i=[],a=[];for(let n=e.indexOf(Qe);-1!==n&&n0?n++:n=e.indexOf(Qe,n+1)){let r=e[n];if(r===Qe&&(t+=1),t>0){if("}"===r&&(t-=1,0===t)){a.push(r);let e=a.join("");a=[],/\{\{/.test(e)&&/\}\}/.test(e)&&i.push(e);continue}if(1===t&&r!==Qe&&"}"!==r){t=0,a=[];continue}a.push(r)}}return i},tt=function(e){let t=null;return t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1],t&&(t=t.replace(/:.*/,""),t=qe(t)),t||null},it=/\{\{/,at=function(e){return{body:e,name:tt(e),children:[]}},nt=function(e){let t=e.body.substr(2);return t=t.replace(/\}\}$/,""),e.children=et(t),e.children=e.children.map(at),0===e.children.length||e.children.forEach((e=>{let t=e.body.substr(2);return it.test(t)?nt(e):null})),e},rt=function(e){let t=et(e);return t=t.map(at),t=t.map(nt),t},ot=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce(((e,t)=>(e[t]=!0,e)),{});var st={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0};const lt=new RegExp("^(subst.)?("+b.join("|")+")(?=:| |\n|$)","i");b.forEach((e=>{st[e]=!0}));const ct=/^infobox /i,ut=/ infobox$/i,mt=/^year in [A-Z]/i,pt=function(e={}){let t=e.template.match(lt),i=e.template;t&&t[0]&&(i=i.replace(t[0],"")),i=i.trim();let a={template:"infobox",type:i,data:e};return delete a.data.template,delete a.data.list,a};let dt={imdb:"imdb name","imdb episodes":"imdb episode",localday:"currentday",localdayname:"currentdayname",localyear:"currentyear","birth date based on age at death":"birth based on age as of date","bare anchored list":"anchored list",cvt:"convert",cricon:"flagicon",sfrac:"frac",sqrt:"radic","unreferenced section":"unreferenced",redir:"redirect",sisterlinks:"sister project links","main article":"main",by:"baseball year",aldsy:"alds year",nldsy:"nlds year","str rep":"replace",ushr2:"ushr",stn:"station",metrod:"metro",fw:"ferry",rws:"stnlnk",sclass2:"sclass",under:"underline",brackets:"bracket",raise:"lower"},ht={date:["byline","dateline"],citation:["cite","source","source-pr","source-science"],"no spam":["email","@","no spam blue"],"lrt station":["lrt","lrts"],"mrt station":["mrt","mrts"],flagcountry:["cr","cr-rt"],trunc:["str left","str crop"],percentage:["pct","percentage"],rnd:["rndfrac","rndnear"],abbr:["tooltip","abbrv","define"],sfn:["sfnref","harvid","harvnb"],"birth date and age":["death date and age","bda"],currentmonth:["localmonth","currentmonthname","currentmonthabbrev"],currency:["monnaie","unité","nombre","nb","iso4217"],coord:["coor","coor title dms","coor title dec","coor dms","coor dm","coor dec"],"columns-list":["cmn","col-list","columnslist","collist"],nihongo:["nihongo2","nihongo3","nihongo-s","nihongo foot"],plainlist:["flatlist","plain list"],"winning percentage":["winpct","winperc"],"collapsible list":["nblist","nonbulleted list","ubl","ublist","ubt","unbullet","unbulleted list","unbulleted","unbulletedlist","vunblist"],"election box begin":["election box begin no change","election box begin no party","election box begin no party no change","election box inline begin","election box inline begin no change"],"election box candidate":["election box candidate for alliance","election box candidate minor party","election box candidate no party link no change","election box candidate with party link","election box candidate with party link coalition 1918","election box candidate with party link no change","election box inline candidate","election box inline candidate no change","election box inline candidate with party link","election box inline candidate with party link no change","election box inline incumbent"],"4teambracket":["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"],start:["end","birth","death","start date","end date","birth date","death date","start date and age","end date and age","dob"],"start-date":["end-date","birth-date","death-date","birth-date and age","birth-date and given age","death-date and age","death-date and given age"],tl:["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","xpd","para","elc","xtag","mli","mlix","url"],done:["resolved mark large","implemented","pimplemented","resolved mark","accepted","agree","approved","checked2","verified","conditional yes","confirmed","confirmed-nc","tallyho","tick","helped","doneu|example","edited2","donetask","unprod","autp","responded","sure","merge done","marked","pass","aye","yes check","y&","yeac","yeag"],xmark:["expired","deleted","not done","not done empty request","not done unclear","not done not likely","stale-small","smallrejected","x mark","nay","no mark","not done-t","fail","n&","x mark-n","xed box","cancelled","deleted-image","already declined","opblocked","user-blocked","notabug","notfixed","won't fix","withdraw","nojoy","unrelated","off-topic talk","nayc","nayg"],checked:["already done","resolved1","check mark-n","checked box"],"station link":["amtk","cta","bts","mnrr","mtams","munis","njts","scax","wmata","rwsa"]};Object.keys(O).forEach((e=>{dt["ipa-"+e]="ipa",dt["ipac-"+e]="ipac"})),Object.keys(ht).forEach((e=>{ht[e].forEach((t=>{dt[t]=e}))}));var gt={"·":"·",dot:"·",middot:"·","•":" • ",",":",","=":"=","1/2":"1⁄2","1/3":"1⁄3","2/3":"2⁄3","1/4":"1⁄4","3/4":"3⁄4","–":"–",ndash:"–","en dash":"–","spaced ndash":" – ","—":"—",mdash:"—",spd:" – ","em dash":"—","number sign":"#","hash-tag":"#",ibeam:"I","&":"&",";":";",ampersand:"&",dagger:"†","double-dagger":"‡",snds:" – ",snd:" – ","^":" ","!":"|","'":"'","\\":" /","`":"`","[":"[","*":"*",asterisk:"*","long dash":"———",clear:"\n\n","h.":"ḥ",profit:"▲",loss:"▼",gain:"▲",ell:"ℓ","1~":"~","2~":"~~","3~":"~~~","4~":"~~~~","5~":"~~~~~",goldmedal:"🥇",silvermedal:"🥈",bronzemedal:"🥉",done:"✅",xmark:"❌",checked:"✔️","thumbs up":"👍","thumbs down":"👎",minusplus:"∓",plusminus:"±"};let bt={p1:0,p2:1,p3:2,resize:1,lang:1,"rtl-lang":1,l:2,h:1,sort:1};["defn","lino","finedetail","nobold","noitalic","nocaps","vanchor","rnd","date","taste","monthname","baseball secondary style","nowrap","nobr","big","cquote","pull quote","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code","char","angle bracket","angbr","symb","dabsearch","key press","nowiki","nowiki2","unstrip","unstripnowiki","plain text","make code","killmarkers","longitem","longlink","strikethrough","underline","uuline","not a typo","text","resize","var serif","double underline","nee","ne","left","right","center","centered","justify","smalldiv","bold div","monodiv","italic div","bigdiv","strikethroughdiv","strikethrough color","pbpe"].forEach((e=>{bt[e]=0}));["line-height"].forEach((e=>{bt[e]=1}));let ft={};["mv","m/v","gts","hsc","ms","m/s","my","m/y","ps","rms","rv","r/v","sb","ss","s/s","sv","s/v","sy","s/y","tss","ans","hmas","hmbs","bns","hmcs","ccgs","arc","hdms","bae","ens","eml","rfns","fns","hs","sms","smu","gs","icgv","ins","kri","lé","jsub","jds","js","hnlms","hmnzs","nns","hnoms","hmpngs","bap","rps","brp","orp","nrp","nms","rss","sas","hmsas","roks","hswms","htms","tcg","hms","hmt","rfaux","usat","uscgc","usns","usrc","uss","usav"].forEach((e=>{ft[e]=t=>{let{name:i,id:a}=Pe(t,["name","id"]);return a?`[[${e.toUpperCase()} ${i} (${a})]]`:`[[${e.toUpperCase()} ${i}]]`}}));const kt=function(e){if(!e.numerator&&!e.denominator)return null;let t=Number(e.numerator)/Number(e.denominator);return t*=100,Number(e.decimals),parseInt(t,10)},wt=function(e=""){if("number"==typeof e)return e;e=(e=e.replace(/,/g,"")).replace(/−/g,"-");let t=Number(e);return isNaN(t)?e:t},yt=function(e){let t=e.match(/ipac?-(.+)/);return null!==t?!0===O.hasOwnProperty(t[1])?O[t[1]].english_title:t[1]:null},$t=e=>e.charAt(0).toUpperCase()+e.substring(1),xt=function(e){let t=e%10,i=e%100;return 1===t&&11!==i?e+"st":2===t&&12!==i?e+"nd":3===t&&13!==i?e+"rd":e+"th"},vt={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"};var jt={ra:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:e=>(Pe(e,["degrees"]).degrees||"")+"°",hms2deg:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:e=>{let t=Pe(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},sortname:e=>{let t=Pe(e,["first","last","target","sort"]),i=`${t.first||""} ${t.last||""}`;return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=` (${t.dab})`,t.target&&(t.target+=` (${t.dab})`)),t.target?`[[${t.target}|${i}]]`:`[[${i}]]`)},"first word":e=>{let t=Pe(e,["text"]),i=t.text||"";return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:e=>{let t=Pe(e,["str","len"]);return(t.str||"").substr(0,t.len)},"str mid":e=>{let t=Pe(e,["str","start","end"]),i=parseInt(t.start,10)-1,a=parseInt(t.end,10);return t.str.substr(i,a)},reign:e=>{let t=Pe(e,["start","end"]);return`(r. ${t.start} – ${t.end})`},circa:e=>{let{year:t}=Pe(e,["year"]);return t?`c. ${t}`:"c. "},"decade link":e=>{let{year:t}=Pe(e,["year"]);return`${t}|${t}s`},decade:e=>{let t=Pe(e,["year"]),i=Number(t.year);return i=10*Math.floor(i/10),`${i}s`},century:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/100)+1,`${i}`},radic:e=>{let t=Pe(e,["after","before"]);return`${t.before||""}√${t.after||""}`},"medical cases chart/row":e=>e,oldstyledate:e=>{let t=Pe(e,["date","year"]);return t.year?t.date+" "+t.year:t.date},braces:e=>{let t=Pe(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},hlist:e=>{let t=Pe(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:e=>(Pe(e).list||[]).join(", "),catlist:e=>(Pe(e).list||[]).join(", "),"br separated entries":e=>(Pe(e).list||[]).join("\n\n"),"comma separated entries":e=>(Pe(e).list||[]).join(", "),"anchored list":e=>{let t=Pe(e).list||[];return t=t.map(((e,t)=>`${t+1}. ${e}`)),t.join("\n\n")},"bulleted list":e=>{let t=Pe(e).list||[];return t=t.filter((e=>e)),t=t.map((e=>"• "+e)),t.join("\n\n")},plainlist:e=>{let t=(e=Ee(e)).split("|").slice(1);return t=t.join("|").split(/\n ?\* ?/),t=t.filter((e=>e)),t.join("\n\n")},term:e=>`${Pe(e,["term"]).term}:`,linum:e=>{let{num:t,text:i}=Pe(e,["num","text"]);return`${t}. ${i}`},"block indent":e=>{let t=Pe(e);return t[1]?"\n"+t[1]+"\n":""},lbs:e=>{let t=Pe(e,["text"]);return`[[${t.text} Lifeboat Station|${t.text}]]`},lbc:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}-class]]`},lbb:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}]]`},"#dateformat":e=>(e=e.replace(/:/,"|"),Pe(e,["date","format"]).date),lc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toLowerCase()),uc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toUpperCase()),lcfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},ucfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbrlink:e=>{let t=Pe(e,["abbr","page"]);return t.page?`[[${t.page}|${t.abbr}]]`:`[[${t.abbr}]]`},own:e=>{let t=Pe(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},formatnum:e=>{e=e.replace(/:/,"|");let t=Pe(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},frac:e=>{let t=Pe(e,["a","b","c"]);return t.c?`${t.a} ${t.b}/${t.c}`:t.b?`${t.a}/${t.b}`:`1/${t.b}`},convert:e=>{let t=Pe(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?`${t.num} ${t.two} ${t.three} ${t.four}`:`${t.num} ${t.two} ${t.three}`:`${t.num} ${t.two}`},tl:e=>{let t=Pe(e,["first","second"]);return t.second||t.first},won:e=>{let t=Pe(e,["text"]);return t.place||t.text||$t(t.template)},tag:e=>{let t=Pe(e,["tag","open"]);const i={span:!0,div:!0,p:!0};return t.open&&"pair"!==t.open?"":i[t.tag]?t.content||"":`<${t.tag} ${t.attribs||""}>${t.content||""}`},plural:e=>{e=e.replace(/plural:/,"plural|");let t=Pe(e,["num","word"]),i=Number(t.num),a=t.word;return 1!==i&&(/.y$/.test(a)?a=a.replace(/y$/,"ies"):a+="s"),i+" "+a},dec:e=>{let t=Pe(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:e=>{let t=Pe(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());let a=i||"";return t.p&&(a=t.p+a),t.s&&(a=t.s+a),(t.u||t.ul||t.upl)&&(a=a+" "+(t.u||t.ul||t.upl)),a},percentage:e=>{let t=Pe(e,["numerator","denominator","decimals"]),i=kt(t);return null===i?"":i+"%"},small:e=>{let t=Pe(e);return t.list&&t.list[0]?t.list[0]:""},"percent-done":e=>{let t=Pe(e,["done","total","digits"]),i=kt({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":`${t.done} (${i}%) done`},loop:e=>{let t=Pe(e,["times","text"]),i=Number(t.times)||0,a="";for(let e=0;e{let t=Pe(e,["text"]);return String((t.text||"").trim().length)},digits:e=>(Pe(e,["text"]).text||"").replace(/[^0-9]/g,""),"last word":e=>{let t=(Pe(e,["text"]).text||"").split(/ /g);return t[t.length-1]||""},replace:e=>{let t=Pe(e,["text","from","to"]);return t.from&&t.to?(t.text||"").replace(t.from,t.to):t.text||""},"title case":e=>(Pe(e,["text"]).text||"").split(/ /).map(((e,t)=>t>0&&"the"===e||"of"===e?e:$t(e))).join(" "),"no spam":e=>{let t=Pe(e,["account","domain"]);return`${t.account||""}@${t.domain}`},"baseball year":e=>{let t=Pe(e,["year"]).year||"";return`[[${t} in baseball|${t}]]`},"mlb year":e=>{let t=Pe(e,["year"]).year||"";return`[[${t} Major League Baseball season|${t}]]`},"nlds year":e=>{let{year:t}=Pe(e,["year"]);return`[[${t||""} National League Division Series|${t}]]`},"alds year":e=>{let{year:t}=Pe(e,["year"]);return`[[${t||""} American League Division Series|${t}]]`},"nfl year":e=>{let{year:t,other:i}=Pe(e,["year","other"]);return i&&t?`[[${t} NFL season|${t}]]–[[${i} NFL season|${i}]]`:`[[${t||""} NFL season|${t}]]`},"nfl playoff year":e=>{let{year:t}=Pe(e,["year"]);return t=Number(t),`[[${t}–${t+1} NFL playoffs|${t}]]`},"nba year":e=>{let{year:t}=Pe(e,["year"]);t=Number(t);let i=t+1;return`[[${t}–${i} NBA season|${t}–${i}]]`},"mhl year":e=>{let t=Pe(e,["year"]),i=Number(t.year),a=i+1;return`[[${i}–${a} NHL season|${i}–${a}]]`},min:e=>{let t=Pe(e).list||[],i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t{let t=Pe(e).list,i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t>i&&(i=t)})),String(i)},uspolabbr:e=>{let{party:t,state:i,house:a}=Pe(e,["party","state","house","link"]);if(!t||!i)return"";let n=`${t}‑${i}`;return a&&(n+=` ${xt(a)}`),n},ushr:e=>{let{state:t,num:i,type:a}=Pe(e,["state","num","type"]),n="";if("AL"!==i)return i=xt(Number(i)),`${t}'s ${i} congressional district`;if(n=`${t}'s at-large congressional district`,a){if(a=a.toLowerCase(),i="AL"===i?"At-large":i,"e"===a)return`[[${n}|${i}]]`;if("u"===a)return`[[${n}|${t}]]`;if("b"===a||"x"===a)return`[[${n}|${t} ${i}]]`}return`[[${n}]]`},metro:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},station:e=>{let{name:t,dab:i}=Pe(e,["name","x","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},bssrws:e=>{let{one:t,two:i}=Pe(e,["one","two"]),a=t;return i&&(a+=" "+i),`[[${a} railway station|${a}]]`},stnlnk:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} railway station (${i})|${t}]]`:`[[${t} railway station|${t}]]`},"station link":e=>{let{station:t,system:i}=Pe(e,["system","station"]);return t||i},"line link":e=>{let{station:t,system:i}=Pe(e,["system","station"]);return t||i},subway:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} subway station|${t}]]`},"lrt station":e=>{let{name:t}=Pe(e,["name"]);return`[[${t} LRT station|${t}]]`},"mrt station":e=>{let{name:t}=Pe(e,["name"]);return`[[${t} MRT station|${t}]]`},rht:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} railway halt|${t}]]`},ferry:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} ferry wharf|${t}]]`},tram:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} tram stop (${i})|${t}]]`:`[[${t} tram stop|${t}]]`},tstop:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} ${i} stop|${t}]]`:`[[${t} stop|${t}]]`},ship:e=>{let{prefix:t,name:i,id:a}=Pe(e,["prefix","name","id"]);return t=t||"",`[[${t.toUpperCase()} ${i}]]`},sclass:e=>{let{cl:t,type:i}=Pe(e,["cl","type","fmt"]);return`[[${t}-class ${i} |''${t}''-class]] [[${i}]]`},"center block":e=>{let{txt:t}=Pe(e,["txt"]);return t||""},align:e=>{let{txt:t}=Pe(e,["dir","txt"]);return t||""},font:e=>{let{txt:t}=Pe(e,["txt"]);return t||""},float:e=>{let{txt:t,dir:i}=Pe(e,["dir","txt"]);return t?t||"":i},lower:e=>{let{txt:t,n:i}=Pe(e,["n","txt"]);return t?t||"":i},splitspan:e=>{let{left:t,right:i}=Pe(e,["left","right"]);return(t||"")+"\n"+(i||"")},bracket:e=>{let{word:t}=Pe(e,["word"]);return t?`[${t}]`:"["},"in title":e=>{let{title:t,text:i}=Pe(e,["title","text"]);return i||(t?`All pages with titles containing ${t}`:"")},"look from":e=>{let{title:t,text:i}=Pe(e,["title","text"]);return i||(t?`All pages with titles beginning with ${t}`:"")}};let _t={};["sr-latn-cyrl","sr-cyrl-latn","sr-latn","sr-cyrl","sr-cyr","sh-latn-cyrl","sh-cyrl-latn","sh-latn","sh-cyrl","cel-1bd","cel-x-proto","en-emodeng","de-at","de-ch","gem-x-proto","gsw-fr","nds-nl","nl-be","ku-arab","ku-cyrl","pt-br","fra-frc","fra-que","roa-leo","roa-nor","ca-valencia","ast-leo","grc-gre","grc-x-doric","grc-x-proto","grc-x-medieval","cpg","gmy","grc","grk-x-proto","pnt","mga","owl","pgl","sga","wlm","xbm","xcb","xcg","xpi","aae","aln","sq-definite","bs-cyrl","hsb","ltg","orv","prg","rsk","rue","rus","sgs","sla","szl","wen","aoa","chn","cri","dlm","egl","fax","frc","frm","fro","fr-gallo","oc-gascon","gcf","gcr","ist","la-x-medieval","lij-mc","lld","lou","mfe","mol","mwl","mxi","nrf","osc","osp","pcd","pln","rcf","rgn","roa","ruo","rup","ruq","sdc","sdn","src","sro","xvo","bzj","cim","dum","enm","frk","frr","frs","gmh","gml","gmw","goh","gos","gsw","gyn","icr","jam","kri","lng","nb","non","nrn","odt","ofs","osx","pey","sli","srm","srn","stq","swg","vmf","wae","wep","wes","zea","hmd","hoc","kha","mnw","mtq","vi-chunom","vi-hantu","mvi","rys","ryu","yoi","ace","akl","ami","bew","bik","bjn","bya","cal","cbk","cjm","coa","cyo","dev","fil","gad","hil","iba","ibg","ibl","ilp","itv","ivv","jax","kne","krj","kxd","ljp","mad","mak","mdh","mrv","mrw","ms-arab","nia","niu","pau","pwn","rap","rar","sgd","su-fonts","szy","tao","tkl","tsg","tvl","uli","wls","xsb","yap","yka","ckt","itl","brh","oty","tcy","abq","ady","ddo","inh","kbd","lbe","lez","rut","tab","uby","udi","bai","bin","bsq","dag","dyu","efi","fan","fmp","fuc","fuf","gaa","ibb","kbp","kcg","kpo","ktu","lu","lua","lun","mkw","mos","oaa","sjo","ude","anm","bft","blk","brx","dng","kjp","kjz","ksw","lbj","lus","aae","aaq","abe","abq","aca","ace","acf","acm","acw","ady","ae","aeb","aec","aer","afb","aht","aii","aij","ain","aiq","akk","akl","akz","ale","aln","alq","alt","ami","anm","aoa","apj","apm","apw","ayn","arb","arh","ari","arn","arp","arq","ary","arz","asb","ath","ats","awa","axm","azb","azd","azj","bai","bal","ban","bax","bdz","bea","ber","bew","bft","bgn","bho","bik","bin","bjn","bla","blc","blk","bqi","brh","brx","bsk","bsq","bua","bvb","bya","bzj","cal","cay","cbk","ccp","chg","chm","chn","chp","cic","cim","ciw","cjm","cjs","ckb","ckt","cku","cld","clm","cmg","cmn","cms","cnu","coa","coc","coj","com","coo","cop","cpg","crg","crh","cri","crj","crk","crl","crm","cro","csw","csz","ctg","ctm","cyo","dag","dak","ddo","deh","del","den","dev","din","dlm","dng","dum","dyu","efi","egl","egy","elx","eml","ems","cmn","och","yue","mjw","mni","my-name-mlcts","nan","nwc","omp","otb","pwo","sip","xct","xsr","1ca","alt","az-arab","azb","azj","chg","cjs","crh","crh3","kaa","kjh","krc","kum","nog","ota","otk","sah","slr","sty","tt-arab","tt-cyrl","tt-latn","tyv","uniturk","chm","est-sea","fit","fkv","izh","jmy","koi","krl","liv","mdf","mhr","mrj","myv","olo","sia","sjd","sje","sjk","sjt","sju","sma","smi","smj","smn","sms","vep","vot","vro","yrk","din","luo","srr","sus","swh","umb","yao"].forEach((e=>{_t["lang-"+e]=0})),Object.keys(O).forEach((e=>{_t["lang-"+e]=0}));var zt=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","us","united states"],["🇺🇸","usa","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]];const Ot=["flag","variant"];let Et={flag:e=>{let t=Pe(e,Ot),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();let a=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${a[0]||""} [[${a[2]}|${i}]]`},flagcountry:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} [[${i[2]}]]`},flagcu:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} ${i[2]}`},flagicon:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`[[${i[2]}|${i[0]}]]`:""},flagdeco:e=>{let t=Pe(e,Ot);return t.flag=(t.flag||"").toLowerCase(),(zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[])[0]||""},fb:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${i[2]} national football team|${i[2]}]]`:""},fbicon:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?` [[${i[2]} national football team|${i[0]}]]`:""},flagathlete:e=>{let t=Pe(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${t.name||""}]] (${i[1].toUpperCase()})`:`[[${t.name||""}]]`}};zt.forEach((e=>{Et[e[1]]=()=>e[0]}));let qt={};["rh","rh2","yes","no","maybe","eliminated","lost","safe","active","site active","coming soon","good","won","nom","sho","longlisted","tba","success","operational","failure","partial","regional","maybecheck","partial success","partial failure","okay","yes-no","some","nonpartisan","pending","unofficial","unofficial2","usually","rarely","sometimes","any","varies","black","non-album single","unreleased","unknown","perhaps","depends","included","dropped","terminated","beta","table-experimental","free","proprietary","nonfree","needs","nightly","release-candidate","planned","scheduled","incorrect","no result","cmain","calso starring","crecurring","cguest","not yet","optional"].forEach((e=>{qt[e]=e=>{let t=Pe(e,["text"]);return t.text||$t(t.template)}}));[["active fire","Active"],["site active","Active"],["site inactive","Inactive"],["yes2",""],["no2",""],["ya","✅"],["na","❌"],["nom","Nominated"],["sho","Shortlisted"],["tba","TBA"],["maybecheck","✔️"],["okay","Neutral"],["n/a","N/A"],["sdash","—"],["dunno","?"],["draw",""],["cnone",""],["nocontest",""]].forEach((e=>{qt[e[0]]=t=>Pe(t,["text"]).text||e[1]}));var Nt=Object.assign({},gt,bt,ft,jt,_t,Et,qt);let St={};["goodreads author","twitter","facebook","instagram","tumblr","pinterest","espn nfl","espn nhl","espn fc","hockeydb","fifa player","worldcat","worldcat id","nfl player","ted speaker","playmate"].forEach((e=>{St[e]=["id","name"]}));let Ct={};["imdb title","imdb name","imdb episode","imdb event","afi film","allmovie title","allgame","tcmdb title","discogs artist","discogs label","discogs release","discogs master","librivox author","musicbrainz artist","musicbrainz label","musicbrainz recording","musicbrainz release","musicbrainz work","youtube","goodreads book","dmoz"].forEach((e=>{Ct[e]=["id","title","description","section"]}));var Lt={ipa:(e,t)=>{let i=Pe(e,["transcription","lang","audio"]);return i.lang=yt(i.template),i.template="ipa",t.push(i),""},ipac:(e,t)=>{let i=Pe(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=yt(i.template),i.template="ipac",t.push(i),""},quote:(e,t)=>{let i=Pe(e,["text","author"]);if(t.push(i),i.text){let e=`"${i.text}"`;return i.author&&(e+="\n\n",e+=` - ${i.author}`),e+"\n"}return""},"cite gnis":(e,t)=>{let i=Pe(e,["id","name","type"]);return i.type="gnis",i.template="citation",t.push(i),""},"spoken wikipedia":(e,t)=>{let i=Pe(e,["file","date"]);return i.template="audio",t.push(i),""},yel:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`yellow: ${i.min||""}'`:""},subon:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub on: ${i.min||""}'`:""},suboff:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub off: ${i.min||""}'`:""},sfn:(e,t,i,a)=>{let n=Pe(e,["author","year","location"]);return a&&(n.name=n.template,n.teplate=a),t.push(n),""},redirect:(e,t)=>{let i=Pe(e,["redirect"]),a=i.list||[],n=[];for(let e=0;e{let i=Pe(e),a={};Object.keys(vt).forEach((e=>{!0===i.hasOwnProperty(e)&&(a[vt[e]]=i[e])}));let n={template:"sister project links",links:a};return t.push(n),""},"subject bar":(e,t)=>{let i=Pe(e);Object.keys(i).forEach((e=>{vt.hasOwnProperty(e)&&(i[vt[e]]=i[e],delete i[e])}));let a={template:"subject bar",links:i};return t.push(a),""},gallery:(e,t)=>{let i=Pe(e),a=(i.list||[]).filter((e=>/^ *File ?:/.test(e)));return a=a.map((e=>new _({file:e}).json())),i={template:"gallery",images:a},t.push(i),""},sky:(e,t)=>{let i=Pe(e,["asc_hours","asc_minutes","asc_seconds","dec_sign","dec_degrees","dec_minutes","dec_seconds","distance"]),a={template:"sky",ascension:{hours:i.asc_hours,minutes:i.asc_minutes,seconds:i.asc_seconds},declination:{sign:i.dec_sign,degrees:i.dec_degrees,minutes:i.dec_minutes,seconds:i.dec_seconds},distance:i.distance};return t.push(a),""},"medical cases chart":(e,t)=>{let i=["date","deathsExpr","recoveriesExpr","casesExpr","4thExpr","5thExpr","col1","col1Change","col2","col2Change"],a=Pe(e);a.data=a.data||"";let n=a.data.split("\n").map((e=>{let t=e.split(";"),a={options:new Map},n=0;for(let e=0;e{let i=Pe(e);i.x&&(i.x=i.x.split(",").map((e=>e.trim()))),i.y&&(i.y=i.y.split(",").map((e=>e.trim())));let a=1;for(;i["y"+a];)i["y"+a]=i["y"+a].split(",").map((e=>e.trim())),a+=1;return t.push(i),""},"historical populations":(e,t)=>{let i=Pe(e);i.list=i.list||[];let a=[];for(let e=0;e{const i=/^jan /i,a=/^year /i;let n=Pe(e);const r=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];let o={},s=Object.keys(n).filter((e=>i.test(e)));s=s.map((e=>e.replace(i,""))),s.forEach((e=>{o[e]=[],r.forEach((t=>{let i=`${t} ${e}`;if(n.hasOwnProperty(i)){let t=wt(n[i]);delete n[i],o[e].push(t)}}))})),n.byMonth=o;let l={};return Object.keys(n).forEach((e=>{if(a.test(e)){let t=e.replace(a,"");l[t]=n[e],delete n[e]}})),n.byYear=l,t.push(n),""},"weather box/concise c":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>wt(e))),i.byMonth={"high c":i.list.slice(0,12),"low c":i.list.slice(12,24),"rain mm":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"weather box/concise f":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>wt(e))),i.byMonth={"high f":i.list.slice(0,12),"low f":i.list.slice(12,24),"rain inch":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"climate chart":(e,t)=>{let i=Pe(e).list||[],a=i[0],n=i[38];i=i.slice(1),i=i.map((e=>(e&&"−"===e[0]&&(e=e.replace(/−/,"-")),e)));let r=[];for(let e=0;e<36;e+=3)r.push({low:wt(i[e]),high:wt(i[e+1]),precip:wt(i[e+2])});let o={template:"climate chart",data:{title:a,source:n,months:r}};return t.push(o),""},medalcount:(e,t)=>{let i=Pe(e).list||[],a=[];for(let e=0;e{let i=Pe(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},legend:(e,t)=>{let i=Pe(e,["color","label"]);return t.push(i),e},isbn:(e,t)=>{let i=Pe(e,["id","id2","id3"]);return t.push(i),"ISBN "+(i.id||"")},"based on":(e,t)=>{let i=Pe(e,["title","author"]);return t.push(i),`${i.title} by ${i.author||""}`},"bbl to t":(e,t)=>{let i=Pe(e,["barrels"]);return t.push(i),"0"===i.barrels?i.barrels+" barrel":i.barrels+" barrels"},mpc:(e,t)=>{let i=Pe(e,["number","text"]);return t.push(i),`[https://minorplanetcenter.net/db_search/show_object?object_id=P/2011+NO1 ${i.text||i.number}]`},pengoal:(e,t)=>(t.push({template:"pengoal"}),"✅"),penmiss:(e,t)=>(t.push({template:"penmiss"}),"❌"),"ordered list":(e,t)=>{let i=Pe(e);return t.push(i),i.list=i.list||[],i.list.map(((e,t)=>`${t+1}. ${e}`)).join("\n\n")},"title year":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b[0-9]{4}\b/);if(e)return e[0]}return r.nomatch||""},"title century":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)(st|nd|rd|th)\b/);if(e)return e[1]||""}return r.nomatch||""},"title decade":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)s\b/);if(e)return e[1]||""}return r.nomatch||""},nihongo:(e,t)=>{let i=Pe(e,["english","kanji","romaji","extra"]);t.push(i);let a=i.english||i.romaji||"";return i.kanji&&(a+=` (${i.kanji})`),a},marriage:(e,t)=>{let i=Pe(e,["spouse","from","to","end"]);t.push(i);let a=i.spouse||"";return i.from&&(i.to?a+=` (m. ${i.from}-${i.to})`:a+=` (m. ${i.from})`),a},"sent off":(e,t)=>{let i=Pe(e,["cards"]),a={template:"sent off",cards:i.cards,minutes:i.list||[]};return t.push(a),"sent off: "+a.minutes.map((e=>e+"'")).join(", ")},transl:(e,t)=>{let i=Pe(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""},"collapsible list":(e,t)=>{let i=Pe(e);t.push(i);let a="";if(i.title&&(a+=`'''${i.title}'''\n\n`),!i.list){i.list=[];for(let e=1;e<10;e+=1)i[e]&&(i.list.push(i[e]),delete i[e])}return i.list=i.list.filter((e=>e)),a+=i.list.join("\n\n"),a},"columns-list":(e,t)=>{let i=((Pe(e).list||[])[0]||"").split(/\n/).filter((e=>e));return i=i.map((e=>e.replace(/\*/,""))),t.push({template:"columns-list",list:i}),i=i.map((e=>"• "+e)),i.join("\n\n")},height:(e,t)=>{let i=Pe(e);t.push(i);let a=[];return["m","cm","ft","in"].forEach((e=>{!0===i.hasOwnProperty(e)&&a.push(i[e]+e)})),a.join(" ")},sic:(e,t)=>{let i=Pe(e,["one","two","three"]),a=(i.one||"")+(i.two||"");return"?"===i.one&&(a=(i.two||"")+(i.three||"")),t.push({template:"sic",word:a}),"y"===i.nolink?a:`${a} [sic]`},inrconvert:(e,t)=>{let i=Pe(e,["rupee_value","currency_formatting"]);t.push(i);const a={k:1e3,m:1e6,b:1e9,t:1e12,l:1e5,c:1e7,lc:1e12};if(i.currency_formatting){let e=a[i.currency_formatting]||1;i.rupee_value=i.rupee_value*e}return`inr ${i.rupee_value||""}`},frac:(e,t)=>{let i=Pe(e,["a","b","c"]),a={template:"sfrac"};return i.c?(a.integer=i.a,a.numerator=i.b,a.denominator=i.c):i.b?(a.numerator=i.a,a.denominator=i.b):(a.numerator=1,a.denominator=i.a),t.push(a),a.integer?`${a.integer} ${a.numerator}⁄${a.denominator}`:`${a.numerator}⁄${a.denominator}`},"winning percentage":(e,t)=>{let i=Pe(e,["wins","losses","ties"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=Number(i.ties)||0,o=a+n+r;"y"===i.ignore_ties&&(r=0),r&&(a+=r/2);let s=kt({numerator:a,denominator:o,decimals:1});return null===s?"":"."+10*s},winlosspct:(e,t)=>{let i=Pe(e,["wins","losses"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=kt({numerator:a,denominator:a+n,decimals:1});return null===r?"":`${a||0} || ${n||0} || ${"."+10*r||"-"}`},"video game release":(e,t)=>{let i=["region","date","region2","date2","region3","date3","region4","date4"],a=Pe(e,i),n={template:"video game release",releases:[]};for(let e=0;e`${e.region}: ${e.date||""}`)).join("\n\n")+"\n"},uss:(e,t)=>{let i=Pe(e,["name","id"]);return t.push(i),i.id?`[[USS ${i.name} (${i.id})|USS ''${i.name}'' (${i.id})]]`:`[[USS ${i.name}|USS ''${i.name}'']]`},blockquote:(e,t)=>{let i=Pe(e,["text","author","title","source","character"]);t.push(i);let a=i.text;a||(i.list=i.list||[],a=i.list[0]||"");let n=a.replace(/"/g,"'");return n='"'+n+'"',n}};const It={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},Mt=(e,t)=>{let i=Pe(e,["amount","code"]);t.push(i);let a=i.template||"";"currency"===a?(a=i.code,a||(i.code=a="usd")):""!==a&&"monnaie"!==a&&"unité"!==a&&"nombre"!==a&&"nb"!==a||(a=i.code),a=(a||"").toLowerCase(),"us"===a?i.code=a="usd":"uk"===a&&(i.code=a="gbp");let n=`${It[a]||""}${i.amount||""}`;return i.code&&!It[i.code.toLowerCase()]&&(n+=" "+i.code),n};let Rt={currency:Mt};Object.keys(It).forEach((e=>{Rt[e]=Mt}));const Ut=864e5,Ft=30*Ut,Bt=365*Ut,Kt=function(e){return new Date(`${e.year}-${e.month||0}-${e.date||1}`).getTime()},Wt=function(e,t){e=Kt(e);let i=(t=Kt(t))-e,a={},n=Math.floor(i/Bt);n>0&&(a.years=n,i-=a.years*Bt);let r=Math.floor(i/Ft);r>0&&(a.months=r,i-=a.months*Ft);let o=Math.floor(i/Ut);return o>0&&(a.days=o),a},Ht=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Yt=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],Zt=Yt.reduce(((e,t,i)=>(0===i||(e[t.toLowerCase()]=i,e[t.substring(0,3).toLowerCase()]=i),e)),{}),Gt=function(e){let t={},i=["year","month","date","hour","minute","second"];for(let a=0;a{let i=Pe(e,["year","month","date","hour","minute","second","timezone"]),a=Gt([i.year,i.month,i.date||i.day]);return i.text=Jt(a),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=` (${i.timezone})`),i.hour&&i.minute&&(i.second?i.text=`${i.hour}:${i.minute}:${i.second}, `+i.text:i.text=`${i.hour}:${i.minute}, `+i.text),i.text&&t.push(Xt(i)),i.text},natural_date:(e,t)=>{let i=Pe(e,["text"]).text||"",a={};if(/^[0-9]{4}$/.test(i))a.year=parseInt(i,10);else{let e=i.replace(/[a-z]+\/[a-z]+/i,"");e=e.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");let t=new Date(e);!1===isNaN(t.getTime())&&(a.year=t.getFullYear(),a.month=t.getMonth()+1,a.date=t.getDate())}return t.push(Xt(a)),i.trim()},one_year:(e,t)=>{let i=Pe(e,["year"]),a=Number(i.year);return t.push(Xt({year:a})),String(a)},two_dates:(e,t)=>{let i=Pe(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){let e=Gt([i.birth_year,i.birth_month,i.birth_date]);return t.push(Xt(e)),Jt(e)}let a=Gt([i.death_year,i.death_month,i.death_date]);return t.push(Xt(a)),Jt(a)},age:e=>{let t=Qt(e);return Wt(t.from,t.to).years||0},"diff-y":e=>{let t=Qt(e),i=Wt(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),a.join(", ")},"diff-ymd":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-yd":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-d":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")}},ti=["January","February","March","April","May","June","July","August","September","October","November","December"];var ii={currentday:()=>{let e=new Date;return String(e.getDate())},currentdayname:()=>{let e=new Date;return Ht[e.getDay()]},currentmonth:()=>{let e=new Date;return ti[e.getMonth()]},currentyear:()=>{let e=new Date;return String(e.getFullYear())},monthyear:()=>{let e=new Date;return ti[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":()=>{let e=new Date;return e.setMonth(e.getMonth()-1),ti[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":()=>{let e=new Date;return e.setMonth(e.getMonth()+1),ti[e.getMonth()]+" "+e.getFullYear()},year:e=>{let t=Pe(e,["date"]).date,i=new Date(t);return t&&!1===isNaN(i.getTime())?String(i.getFullYear()):""},"time ago":e=>function(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let i=(new Date).getTime()-t.getTime(),a="ago";i<0&&(a="from now",i=Math.abs(i));let n=i/1e3/60/60/24;return n<365?Number(n)+" days "+a:Number(n/365)+" years "+a}(Pe(e,["date","fmt"]).date),"birth date and age":(e,t)=>{let i=Pe(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?ei.natural_date(e,t):(t.push(i),i=Gt([i.year,i.month,i.day]),Jt(i))},"birth year and age":(e,t)=>{let i=Pe(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return ei.natural_date(e,t);t.push(i);let a=(new Date).getFullYear()-parseInt(i.birth_year,10);i=Gt([i.birth_year,i.birth_month]);let n=Jt(i);return a&&(n+=` (age ${a})`),n},"death year and age":(e,t)=>{let i=Pe(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?ei.natural_date(e,t):(t.push(i),i=Gt([i.death_year,i.death_month]),Jt(i))},"birth date and age2":(e,t)=>{let i=Pe(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=Gt([i.birth_year,i.birth_month,i.birth_day]),Jt(i)},"birth based on age as of date":(e,t)=>{let i=Pe(e,["age","year","month","day"]);t.push(i);let a=parseInt(i.age,10),n=parseInt(i.year,10)-a;return n&&a?`${n} (age ${i.age})`:`(age ${i.age})`},"death date and given age":(e,t)=>{let i=Pe(e,["year","month","day","age"]);t.push(i),i=Gt([i.year,i.month,i.day]);let a=Jt(i);return i.age&&(a+=` (age ${i.age})`),a},dts:e=>{e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");let t=Pe(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},time:()=>{let e=new Date,t=Gt([e.getFullYear(),e.getMonth(),e.getDate()]);return Jt(t)},millennium:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/1e3)+1,t.abbr&&"y"===t.abbr?i<0?`${xt(Math.abs(i))} BC`:`${xt(i)}`:`${xt(i)} millennium`},start:ei.date,"start-date":ei.natural_date,birthdeathage:ei.two_dates,age:ei.age,"age nts":ei.age,"age in years":ei["diff-y"],"age in years and months":ei["diff-ym"],"age in years, months and days":ei["diff-ymd"],"age in years and days":ei["diff-yd"],"age in days":ei["diff-d"]};function ai(e){let t=e.pop(),i=Number(e[0]||0),a=Number(e[1]||0),n=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;let r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+a/60+n/3600)}const ni=function(e){if("number"!=typeof e)return e;let t=1e5;return Math.round(e*t)/t},ri={s:!0,w:!0},oi=function(e){let t=Pe(e);t=function(e){return e.list=e.list||[],e.list=e.list.map((t=>{let i=Number(t);if(!isNaN(i))return i;let a=t.split(/:/);return a.length>1?(e.props=e.props||{},e.props[a[0]]=a.slice(1).join(":"),null):t})),e.list=e.list.filter((e=>null!==e)),e}(t);let i=function(e){const t=e.map((e=>typeof e)).join("|");return 2===e.length&&"number|number"===t?{lat:e[0],lon:e[1]}:4===e.length&&"number|string|number|string"===t?(ri[e[1].toLowerCase()]&&(e[0]*=-1),"w"===e[3].toLowerCase()&&(e[2]*=-1),{lat:e[0],lon:e[2]}):6===e.length?{lat:ai(e.slice(0,3)),lon:ai(e.slice(3))}:8===e.length?{lat:ai(e.slice(0,4)),lon:ai(e.slice(4))}:{}}(t.list);return t.lat=ni(i.lat),t.lon=ni(i.lon),t.template="coord",delete t.list,t},si={coord:(e,t)=>{let i=oi(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":`${i.lat||""}°N, ${i.lon||""}°W`}},li=function(e,t,i,a){let n=Pe(e);return a&&(n.name=n.template,n.template=a),t.push(n),""},ci={persondata:li,taxobox:li,citation:li,portal:li,reflist:li,"cite book":li,"cite journal":li,"cite web":li,"commons cat":li,"election box candidate":li,"election box begin":li,main:li},ui={adx:"adx",aim:"aim",amex:"amex",asx:"asx",athex:"athex",b3:"b3","B3 (stock exchange)":"B3 (stock exchange)",barbadosse:"barbadosse",bbv:"bbv",bcba:"bcba",bcs:"bcs",bhse:"bhse",bist:"bist",bit:"bit","bm&f bovespa":"b3","bm&f":"b3",bmad:"bmad",bmv:"bmv","bombay stock exchange":"bombay stock exchange","botswana stock exchange":"botswana stock exchange",bpse:"bpse",bse:"bse",bsx:"bsx",bvb:"bvb",bvc:"bvc",bvl:"bvl",bvpasa:"bvpasa",bwse:"bwse","canadian securities exchange":"canadian securities exchange",cse:"cse",darse:"darse",dfm:"dfm",dse:"dse",euronext:"euronext",euronextparis:"euronextparis",fse:"fse",fwb:"fwb",gse:"gse",gtsm:"gtsm",idx:"idx",ise:"ise",iseq:"iseq",isin:"isin",jasdaq:"jasdaq",jse:"jse",kase:"kase",kn:"kn",krx:"krx",lse:"lse",luxse:"luxse","malta stock exchange":"malta stock exchange",mai:"mai",mcx:"mcx",mutf:"mutf",myx:"myx",nag:"nag","nasdaq dubai":"nasdaq dubai",nasdaq:"nasdaq",neeq:"neeq",nepse:"nepse",nex:"nex",nse:"nse",newconnect:"newconnect","nyse arca":"nyse arca",nyse:"nyse",nzx:"nzx","omx baltic":"omx baltic",omx:"omx",ose:"ose","otc expert":"otc expert","otc grey":"otc grey","otc pink":"otc pink",otcqb:"otcqb",otcqx:"otcqx","pfts ukraine stock exchange":"pfts ukraine stock exchange","philippine stock exchange":"philippine stock exchange",prse:"prse",psx:"psx",karse:"karse",qe:"qe","saudi stock exchange":"saudi stock exchange",sehk:"sehk","Stock Exchange of Thailand":"Stock Exchange of Thailand",set:"set",sgx:"sgx",sse:"sse",swx:"swx",szse:"szse",tase:"tase","tsx-v":"tsx-v",tsx:"tsx",tsxv:"tsxv",ttse:"ttse",twse:"twse",tyo:"tyo",wbag:"wbag",wse:"wse","zagreb stock exchange":"zagreb stock exchange","zimbabwe stock exchange":"zimbabwe stock exchange",zse:"zse"},mi=(e,t)=>{let i=Pe(e,["ticketnumber","code"]);t.push(i);let a=i.template||"";""===a&&(a=i.code),a=(a||"").toLowerCase();let n=ui[a]||"";return i.ticketnumber&&(n=`${n}: ${i.ticketnumber}`),i.code&&!ui[i.code.toLowerCase()]&&(n+=" "+i.code),n},pi={};Object.keys(ui).forEach((e=>{pi[e]=mi}));const di=function(e){return 1===(e=String(e)).length&&(e="0"+e),e},hi=function(e,t,i){e[`rd${t}-team${di(i)}`]&&(i=di(i));let a=e[`rd${t}-score${i}`],n=Number(a);return!1===isNaN(n)&&(a=n),{team:e[`rd${t}-team${i}`],score:a,seed:e[`rd${t}-seed${i}`]}},gi=function(e){let t=[],i=Pe(e);for(let e=1;e<7;e+=1){let a=[];for(let t=1;t<16;t+=2){let n=`rd${e}-team`;if(!i[n+t]&&!i[n+di(t)])break;{let n=hi(i,e,t),r=hi(i,e,t+1);a.push([n,r])}}a.length>0&&t.push(a)}return{template:"playoffbracket",rounds:t}};let bi={"4teambracket":function(e,t){let i=gi(e);return t.push(i),""},player:(e,t)=>{let i=Pe(e,["number","country","name","dl"]);t.push(i);let a=`[[${i.name}]]`;if(i.country){let e=(i.country||"").toLowerCase(),t=zt.find((t=>e===t[1]||e===t[2]))||[];t&&t[0]&&(a=t[0]+" "+a)}return i.number&&(a=i.number+" "+a),a},goal:(e,t)=>{let i={template:"goal",data:[]},a=Pe(e).list||[];for(let e=0;e{let t=e.note;return t&&(t=` (${t})`),e.min+"'"+t})).join(", "),n},"sports table":(e,t)=>{let i=Pe(e),a={};Object.keys(i).filter((e=>/^team[0-9]/.test(e))).map((e=>i[e].toLowerCase())).forEach((e=>{a[e]={name:i[`name_${e}`],win:Number(i[`win_${e}`])||0,loss:Number(i[`loss_${e}`])||0,tie:Number(i[`tie_${e}`])||0,otloss:Number(i[`otloss_${e}`])||0,goals_for:Number(i[`gf_${e}`])||0,goals_against:Number(i[`ga_${e}`])||0}}));let n={date:i.update,header:i.table_header,teams:a};t.push(n)},"cbb roster/header":function(){return'{| class="wikitable"\n |-\n ! POS\n ! #\n ! Name\n ! Height\n ! Weight\n ! Year\n ! Previous School\n ! Hometown\n |-\n'},"cbb roster/player":function(e,t){let i=Pe(e);return t.push(i),`|-\n| ${i.pos||""}\n| ${i.num||""}\n| ${i.first||""} ${i.last||""}\n| ${i.ft||""}${i.in||""}\n| ${i.lbs||""}\n| ${i.class||""}\n| ${i.high_school||""}\n| ${i.home||""}\n`},"cbb roster/footer":function(){return"\n|}"}};var fi=Object.assign({},Tt,Dt,Rt,ii,si,ci,pi,gi,bi);let ki=Object.assign({},Nt,Pt,fi);Object.keys(dt).forEach((e=>{ki[e]=ki[dt[e]]}));const wi=["0","1","2","3","4","5","6","7","8","9"],yi=function(e,t){let i=e.name;if(!0===ot.hasOwnProperty(i))return[""];if(!0===function(e){return!0===st.hasOwnProperty(e)||!!lt.test(e)||!(!ct.test(e)&&!ut.test(e))||!!mt.test(e)}(i)){let t=Pe(e.body,[],"raw");return["",pt(t)]}if(!0===/^cite [a-z]/.test(i)){let t=Pe(e.body);return t.type=t.template,t.template="citation",["",t]}if(!0===ki.hasOwnProperty(i)){if("number"==typeof ki[i]){return[Pe(e.body,wi)[String(ki[i])]||""]}if("string"==typeof ki[i])return[ki[i]];if(!0===o(ki[i])){return["",Pe(e.body,ki[i])]}if(!0===((a=ki[i])&&"[object Object]"===Object.prototype.toString.call(a))){let t=Pe(e.body,ki[i].props);return[t[ki[i].out],t]}if("function"==typeof ki[i]){let a=[];return[ki[i](e.body,a,Pe,null,t),a[0]]}}var a;if(t&&t._templateFallbackFn){let i=[],a=t._templateFallbackFn(e.body,i,Pe,null,t);if(null!==a)return[a,i[0]]}let n=Pe(e.body);return 0===Object.keys(n).length&&(n=null),["",n]},$i=(e="")=>(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim(),xi=function(e,t){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},vi={type:function(){return this._type},links:function(e){let t=[];if(Object.keys(this.data).forEach((e=>{this.data[e].links().forEach((e=>t.push(e)))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},image:function(){let e=this.data.image||this.data.image2||this.data.logo||this.data.image_skyline||this.data.image_flag;if(!e)return null;let t=e.json(),i=t.text;return t.file=i,t.text="",t.caption=this.data.caption,t.domain=this.domain,new _(t)},get:function(e){let t=Object.keys(this.data);if("string"==typeof e){let i=$i(e);for(let e=0;e{for(let i=0;i(e.data[i]&&(t[i]=e.data[i].json()),t)),{});return!0===t.encode&&(i=W(i)),i}(this,e=e||{})},wikitext:function(){return this.wiki||""},keyValue:function(){return Object.keys(this.data).reduce(((e,t)=>(this.data[t]&&(e[t]=this.data[t].text()),e)),{})}};Object.keys(vi).forEach((e=>{xi.prototype[e]=vi[e]})),xi.prototype.data=xi.prototype.keyValue,xi.prototype.template=xi.prototype.type,xi.prototype.images=xi.prototype.image;const ji=function(e,t){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},_i={title:function(){let e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){let t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},text:function(){return""},wikitext:function(){return this.wiki||""},json:function(e={}){let t=this.data||{};return!0===e.encode&&(t=Object.assign({},t),t=W(t)),t}};Object.keys(_i).forEach((e=>{ji.prototype[e]=_i[e]}));const zi={text:function(){return se(this._text||"").text()},json:function(){return this.data||{}},wikitext:function(){return this.wiki||""}},Oi=function(e,t="",i=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_text",{enumerable:!1,value:t}),Object.defineProperty(this,"wiki",{enumerable:!1,value:i})};Object.keys(zi).forEach((e=>{Oi.prototype[e]=zi[e]}));const Ei=/^(cite |citation)/i,qi={citation:!0,refn:!0,harvnb:!0,source:!0},Ni=function(e,t){let{list:i,wiki:a}=function(e,t){let i=[],a=rt(e);const n=function(a,r){a.parent=r,a.children&&a.children.length>0&&a.children.forEach((e=>n(e,a)));let[o,s]=yi(a,t);a.wiki=o,s&&i.push({name:a.name,wiki:a.body,nested:Boolean(a.parent),text:o,json:s});const l=function(e,t,i){e.parent&&(e.parent.body=e.parent.body.replace(t,i),l(e.parent,t,i))};l(a,a.body,a.wiki),e=e.replace(a.body,a.wiki)};return a.forEach((e=>n(e,null))),a.forEach((t=>{e=e.replace(t.body,t.wiki)})),{list:i,wiki:e}}(e._wiki,t),n=t?t._domain:null,{infoboxes:r,references:o,templates:s}=function(e,t){let i={infoboxes:[],templates:[],references:[]};return e.forEach((e=>{let a=e.json,n=a.template||a.type||a.name;if(!0!==qi[n]&&!0!==Ei.test(n))return"infobox"===a.template&&"yes"!==a.subbox?(a.domain=t,a.data=a.data||{},void i.infoboxes.push(new xi(a,e.wiki))):void i.templates.push(new Oi(a,e.text,e.wiki));i.references.push(new ji(a,e.wiki))})),i}(i,n);e._infoboxes=e._infoboxes||[],e._references=e._references||[],e._templates=e._templates||[],e._infoboxes=e._infoboxes.concat(r),e._references=e._references.concat(o),e._templates=e._templates.concat(s),e._wiki=a},Si=function(e){return/^ *\{\{ *(cite|citation)/i.test(e)&&/\}\} *$/.test(e)&&!1===/citation needed/i.test(e)},Ci=function(e){let t=Pe(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Li=function(e){return{template:"citation",type:"inline",data:{},inline:se(e)||{}}},Ai=function(e){let t=[],i=e._wiki;i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Si(a)){let n=Ci(a);n&&t.push({json:n,wiki:e}),i=i.replace(a,"")}else t.push({json:Li(a),wiki:e});return" "})),i=i.replace(/ ?]{0,200}?\/> ?/gi," "),i=i.replace(/ ?]{0,200}>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Si(a)){let e=Ci(a);e&&t.push({json:e,wiki:a}),i=i.replace(a,"")}else t.push({json:Li(a),wiki:e});return" "})),i=i.replace(/ ?<[ /]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ /]?> ?/g," "),e._references=t.map((e=>new ji(e.json,e.wiki))),e._wiki=i},Pi={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]};let Ti=["res","record","opponent","method","event","date","round","time","location","notes"];const Di=function(e,t){const i={templates:[],text:e._wiki};var a;return function(e,t){e.text=e.text.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(i=>{let a={_wiki:i,_templates:[]};Ni(a,t);let n=a._templates.map((e=>e.json())),r=n.find((e=>"election box"===e.template))||{},o=n.filter((e=>"election box candidate"===e.template)),s=n.find((e=>"election box gain"===e.template||"election box hold"===e.template))||{};return(o.length>0||s)&&e.templates.push({template:"election box",title:r.title,candidates:o,summary:s.data}),""}))}(i,t),function(e,t,i){e.text=e.text.replace(/]*)>([\s\S]+)<\/gallery>/g,((a,n,r)=>{let o=r.split(/\n/g);return o=o.filter((e=>e&&""!==e.trim())),o=o.map((e=>{let i=e.split(/\|/),a={file:i[0].trim(),lang:t.lang(),domain:t.domain()},n=new _(a).json(),r=i.slice(1).join("|");return""!==r&&(n.caption=se(r)),n})),o.length>0&&e.templates.push({template:"gallery",images:o,pos:i.title}),""}))}(i,t,e),(a=i).text=a.text.replace(/]*)>([\s\S]*?)<\/math>/g,((e,t,i)=>{let n=se(i).text();return a.templates.push({template:"math",formula:n,raw:i}),n&&n.length<12?n:""})),a.text=a.text.replace(/]*)>([\s\S]*?)<\/chem>/g,((e,t,i)=>(a.templates.push({template:"chem",data:i}),""))),function(e){e.text=e.text.replace(/\{\{mlb game log /gi,"{{game log "),e.text=e.text.replace(/\{\{game log (section|month)[\s\S]+?\{\{game log (section|month) end\}\}/gi,(t=>{let i=function(e){let t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{game log (section|month) end\}\}/i,"");let a="! "+i.join(" !! "),n=be("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mlb game log section",data:n}),""}))}(i),function(e){e.text=e.text.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(t=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");let i="! "+Ti.join(" !! "),a=be("{|\n"+i+"\n"+t+"\n|}");return a=a.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mma record start",data:a}),""}))}(i),function(e){e.text=e.text.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,((t,i)=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();let a="! "+Pi[i].join(" !! "),n=be("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"NBA "+i+" statistics",data:n}),""}))}(i),i.templates=i.templates.map((e=>new Oi(e))),i},Ii={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0};class Mi{constructor(e,t){let i={doc:t,title:e.title||"",depth:e.depth,wiki:e.wiki||"",templates:[],tables:[],infoboxes:[],references:[],paragraphs:[]};Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})}));const a=Di(this,t);this._wiki=a.text,this._templates=this._templates.concat(a.templates),Ai(this),Ni(this,t),function(e){let t=[],i=e._wiki,a=i.split("\n"),n=[];for(let e=0;e0&&(n[n.length-1]+="\n"+a[e]);else{n[n.length-1]+="\n"+a[e];let i=n.pop();t.push(i)}else n.push(a[e]);let r=[];t.forEach((e=>{if(e){i=i.replace(e+"\n",""),i=i.replace(e,"");let t=be(e);t&&t.length>0&&r.push(new we(t,e))}})),r.length>0&&(e._tables=r),e._wiki=i}(this),Xe(this,t)}title(){return this._title||""}index(){if(!this._doc)return null;let e=this._doc.sections().indexOf(this);return-1===e?null:e}depth(){return this._depth}indentation(){return this.depth()}sentences(){return this.paragraphs().reduce(((e,t)=>e.concat(t.sentences())),[])}paragraphs(){return this._paragraphs||[]}links(e){let t=[];if(this.infoboxes().forEach((e=>{t.push(e.links())})),this.sentences().forEach((e=>{t.push(e.links())})),this.tables().forEach((e=>{t.push(e.links())})),this.lists().forEach((e=>{t.push(e.links())})),t=t.reduce(((e,t)=>e.concat(t)),[]).filter((e=>void 0!==e)),"string"==typeof e){let i=t.find((t=>t.page().toLowerCase()===e.toLowerCase()));return void 0===i?[]:[i]}return t}tables(){return this._tables||[]}templates(e){let t=this._templates||[];return"string"==typeof e?(e=e.toLowerCase(),t.filter((t=>t.data.template===e||t.data.name===e))):t}infoboxes(e){let t=this._infoboxes||[];return"string"==typeof e?(e=(e=e.replace(/^infobox /i,"")).trim().toLowerCase(),t.filter((t=>t._type===e))):t}coordinates(){return[...this.templates("coord"),...this.templates("coor")].map((e=>e.json()))}lists(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.lists())})),e}interwiki(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.interwiki())})),e}images(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.images())})),e}references(){return this._references||[]}remove(){if(!this._doc)return null;let e={};e[this.title()]=!0,this.children().forEach((t=>e[t.title()]=!0));let t=this._doc.sections();return t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),this._doc._sections=t,this._doc}nextSibling(){if(!this._doc)return null;let e=this._doc.sections();for(let t=(this.index()||0)+1;tthis.depth())for(let e=i+1;ethis.depth();e+=1)a.push(t[e]);return"string"==typeof e?a.find((t=>t.title().toLowerCase()===e.toLowerCase())):a}sections(e){return this.children(e)}parent(){if(!this._doc)return null;let e=this._doc.sections();for(let t=this.index()||0;t>=0;t-=1)if(e[t]&&e[t].depth()t.text(e))).join("\n\n")}wikitext(){return this._wiki}json(e){return function(e,t){let i={};if(!0===(t=p(t,H)).headers&&(i.title=e.title()),!0===t.depth&&(i.depth=e.depth()),!0===t.paragraphs){let a=e.paragraphs().map((e=>e.json(t)));a.length>0&&(i.paragraphs=a)}if(!0===t.images){let a=e.images().map((e=>e.json(t)));a.length>0&&(i.images=a)}if(!0===t.tables){let a=e.tables().map((e=>e.json(t)));a.length>0&&(i.tables=a)}if(!0===t.templates){let a=e.templates().map((e=>e.json()));a.length>0&&(i.templates=a,!0===t.encode&&i.templates.forEach((e=>W(e))))}if(!0===t.infoboxes){let a=e.infoboxes().map((e=>e.json(t)));a.length>0&&(i.infoboxes=a)}if(!0===t.lists){let a=e.lists().map((e=>e.json(t)));a.length>0&&(i.lists=a)}if(!0===t.references||!0===t.citations){let a=e.references().map((e=>e.json(t)));a.length>0&&(i.references=a)}return!0===t.sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,Ii))}}Mi.prototype.citations=Mi.prototype.references;const Ri={sentences:"sentence",paragraphs:"paragraph",links:"link",tables:"table",templates:"template",infoboxes:"infobox",coordinates:"coordinate",lists:"list",images:"image",references:"reference",citations:"citation"};Object.keys(Ri).forEach((e=>{let t=Ri[e];Mi.prototype[t]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]||null}}));const Ui=/^(={1,6})(.{1,200}?)={1,6}$/,Fi=/\{\{.+?\}\}/,Bi=function(e,t,i){let a=t.match(Ui);if(!a)return e.title="",e.depth=0,e;let n=a[2]||"";n=se(n).text(),Fi.test(n)&&(n=function(e,t){return rt(e).forEach((i=>{let[a]=yi(i,t);e=e.replace(i.body,a)})),e}(n,i));let o={_wiki:n};Ai(o),n=o._wiki,n=r(n);let s=0;return a[1]&&(s=a[1].length-2),e.title=n,e.depth=s,e},Ki=new RegExp("^("+["references","reference","einzelnachweise","referencias","références","notes et références","脚注","referenser","bronnen","примечания"].join("|")+"):?","i"),Wi=/(?:\n|^)(={2,6}.{1,200}?={2,6})/g,Hi=function(e){let t=[],i=e._wiki.split(Wi);for(let a=0;a!0!==Ki.test(t.title())||t.paragraphs().length>0||t.templates().length>0||(e[i+1]&&e[i+1].depth()>t.depth()&&(e[i+1]._depth-=1),!1)))}(t)},Yi=new RegExp("\\[\\[("+h.join("|")+"):(.{2,178}?)]](w{0,10})","gi"),Zi=new RegExp("^\\[\\[:?("+h.join("|")+"):","gi"),Gi=function(e){const t=[];let i=e.match(Yi);i&&i.forEach((function(e){(e=(e=(e=e.replace(Zi,"")).replace(/\|?[ *]?\]\]$/,"")).replace(/\|.*/,""))&&!e.match(/[[\]]/)&&t.push(e.trim())}));const a=e.replace(Yi,"");return[t,a]},Vi={tables:!0,lists:!0,paragraphs:!0};class Ji{constructor(e,t){t=t||{},this._options=t;let i={pageID:t.pageID||t.id||null,namespace:t.namespace||t.ns||null,lang:t.lang||t.language||null,domain:t.domain||null,title:t.title||null,type:"page",redirectTo:null,wikidata:t.wikidata||null,wiki:e||"",categories:[],sections:[],coordinates:[],userAgent:t.userAgent||t["User-Agent"]||t["Api-User-Agent"]||"User of the wtf_wikipedia library",templateFallbackFn:t.templateFallbackFn||null};if(Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})})),!0===function(e){return!!e&&D.test(e)}(this._wiki)){this._type="redirect",this._redirectTo=function(e){let t=e.match(D);if(t&&t[2])return(T(t[2])||[])[0];return{}}(this._wiki);const[e,t]=Gi(this._wiki);return this._categories=e,void(this._wiki=t)}this._wiki=F(this._wiki);const[a,n]=Gi(this._wiki);this._categories=a,this._wiki=n,this._sections=Hi(this)}title(e){if(void 0!==e)return this._title=e,e;if(this._title)return this._title;let t=null,i=this.sentences()[0];return i&&(t=i.bold()),t}pageID(e){return void 0!==e&&(this._pageID=e),this._pageID||null}wikidata(e){return void 0!==e&&(this._wikidata=e),this._wikidata||null}domain(e){return void 0!==e&&(this._domain=e),this._domain||null}language(e){return void 0!==e&&(this._lang=e),this._lang||null}url(){let e=this.title();if(!e)return null;let t=this.language()||"en",i=this.domain()||"wikipedia.org";return e=e.replace(/ /g,"_"),e=encodeURIComponent(e),`https://${t}.${i}/wiki/${e}`}namespace(e){return void 0!==e&&(this._namespace=e),this._namespace||null}isRedirect(){return"redirect"===this._type}redirectTo(){return this._redirectTo}isDisambiguation(){return function(e){let t=e.templates().map((e=>e.json()));if(t.find((e=>k.hasOwnProperty(e.template)||x.hasOwnProperty(e.template))))return!0;let i=e.title();return!(!i||!0!==$.test(i))||!t.find((e=>y.hasOwnProperty(e.template)))&&(!0===v(e.sentence(0))||!0===v(e.sentence(1)))}(this)}categories(e){let t=this._categories||[];return"number"==typeof e?[t[e]]:t}sections(e){let t=this._sections||[];if(t.forEach((e=>{e._doc=this})),"string"==typeof e){let i=e.toLowerCase().trim();return t.filter((e=>e.title().toLowerCase()===i))}return"number"==typeof e?[t[e]]:t}paragraphs(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.paragraphs())})),"number"==typeof e?[t[e]]:t}sentences(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.sentences())})),"number"==typeof e?[t[e]]:t}images(e){let t=m(this,"images",null);return this.infoboxes().forEach((e=>{let i=e.image();i&&t.unshift(i)})),this.templates().forEach((e=>{"gallery"===e.data.template&&(e.data.images=e.data.images||[],e.data.images.forEach((e=>{e instanceof _||(e.language=this.language(),e.domain=this.domain(),e=new _(e)),t.push(e)})))})),"number"==typeof e?[t[e]]:t}links(e){return m(this,"links",e)}interwiki(e){return m(this,"interwiki",e)}lists(e){return m(this,"lists",e)}tables(e){return m(this,"tables",e)}templates(e){return m(this,"templates",e)}references(e){return m(this,"references",e)}citations(e){return this.references(e)}coordinates(e){return m(this,"coordinates",e)}infoboxes(e){let t=m(this,"infoboxes",e);return t=t.sort(((e,t)=>Object.keys(e.data).length>Object.keys(t.data).length?-1:1)),t}text(e){if(e=p(e,Vi),!0===this.isRedirect())return"";return this.sections().map((t=>t.text(e))).join("\n\n")}json(e){return function(e,t){let i={};return(t=p(t,d)).title&&(i.title=e.title()),t.pageID&&(i.pageID=e.pageID()),t.categories&&(i.categories=e.categories()),t.sections&&(i.sections=e.sections().map((e=>e.json(t)))),!0===e.isRedirect()&&(i.isRedirect=!0,i.redirectTo=e.redirectTo(),i.sections=[]),t.coordinates&&(i.coordinates=e.coordinates()),t.infoboxes&&(i.infoboxes=e.infoboxes().map((e=>e.json(t)))),t.images&&(i.images=e.images().map((e=>e.json(t)))),t.plaintext&&(i.plaintext=e.text(t)),(t.citations||t.references)&&(i.references=e.references()),i}(this,e=p(e,Vi))}wikitext(){return this._wiki||""}debug(){return console.log("\n"),this.sections().forEach((e=>{let t=" - ";for(let i=0;i{let t=Xi[e];Ji.prototype[t]=function(t){return this[e](t)[0]||null}})),Ji.prototype.lang=Ji.prototype.language,Ji.prototype.ns=Ji.prototype.namespace,Ji.prototype.plaintext=Ji.prototype.text,Ji.prototype.isDisambig=Ji.prototype.isDisambiguation,Ji.prototype.citations=Ji.prototype.references,Ji.prototype.redirectsTo=Ji.prototype.redirectTo,Ji.prototype.redirect=Ji.prototype.redirectTo,Ji.prototype.redirects=Ji.prototype.redirectTo;const Qi=/^https?:\/\//,ea={lang:"en",wiki:"wikipedia",domain:void 0,follow_redirects:!0,path:"api.php"},ta=function(e,t,i){"string"==typeof t&&(t={lang:t}),(t={...ea,...t}).title=e,"string"==typeof e&&Qi.test(e)&&(t={...t,...n(e)});const r=u(t),s=function(e){let t,i=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return t=e.noOrigin?"":e.origin||e.Origin||"*",{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":i,"User-Agent":i,Origin:t,"Accept-Encoding":"gzip"},redirect:"follow"}}(t);return a(r,s).then((e=>e.json())).then((a=>{let n=function(e,t={}){return Object.keys(e.query.pages).map((i=>{let a=e.query.pages[i]||{};if(a.hasOwnProperty("missing")||a.hasOwnProperty("invalid"))return null;let n=a.revisions[0]["*"];!n&&a.revisions[0].slots&&(n=a.revisions[0].slots.main["*"]),a.pageprops=a.pageprops||{};let r=t.domain;return!r&&t.wiki&&(r=`${t.wiki}.org`),{wiki:n,meta:Object.assign({},t,{title:a.title,pageID:a.pageid,namespace:a.ns,domain:r,wikidata:a.pageprops.wikibase_item,description:a.pageprops["wikibase-shortdesc"]})}}))}(a,t);return n=function(e,t){let i=(e=e.filter((e=>e))).map((e=>new Ji(e.wiki,e.meta)));return 0===i.length?null:o(t)||1!==i.length?i:i[0]}(n,e),i&&i(null,n),n})).catch((e=>(console.error(e),i&&i(e,null),null)))};const ia=function(e,t){return new Ji(e,t)},aa={Doc:Ji,Section:Mi,Paragraph:_e,Sentence:X,Image:_,Infobox:xi,Link:Z,List:Be,Reference:ji,Table:we,Template:Oi,http:function(e,t){return a(e,t).then((function(e){return e.json()})).catch((t=>(console.error("\n\n=-=- http response error =-=-=-"),console.error(e),console.error(t),{})))},wtf:ia};return ia.fetch=function(e,t,i){return ta(e,t,i)},ia.plugin=ia.extend=function(e){return e(aa,ki,st),this},ia.version="10.1.4",ia})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).wtf=t()}(this,(function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var i=function e(){if(this instanceof e){var i=[null];return i.push.apply(i,arguments),new(Function.bind.apply(t,i))}return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})})),i}var i=t(Object.freeze({__proto__:null,default:function(e,t){return t=t||{},new Promise((function(i,a){var n=new XMLHttpRequest,r=[],o=[],s={},l=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:l,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in n.open(t.method||"get",e,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,i){r.push(t=t.toLowerCase()),o.push([t,i]),s[t]=s[t]?s[t]+","+i:i})),i(l())},n.onerror=a,n.withCredentials="include"==t.credentials,t.headers)n.setRequestHeader(c,t.headers[c]);n.send(t.body||null)}))}})),a=e(self.fetch||(self.fetch=i.default||i));const n=function(e){let t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function r(e){return e&&"string"==typeof e?e=(e=(e=(e=e.replace(/^\s+/,"")).replace(/\s+$/,"")).replace(/ {2}/," ")).replace(/\s, /,", "):""}function o(e){return"[object Array]"===Object.prototype.toString.call(e)}const s=/(wikibooks|wikidata|wikimedia|wikinews|wikipedia|wikiquote|wikisource|wikispecies|wikiversity|wikivoyage|wiktionary|foundation|meta)\.org/,l={action:"query",prop:"revisions|pageprops",rvprop:"content",maxlag:5,rvslots:"main",origin:"*",format:"json",redirects:"true"},c=e=>e.replace(/ /g,"_").trim(),u=function(e,t=l){let i=Object.assign({},t),a="";if(e.domain){let t=s.test(e.domain)?"w/api.php":e.path;a=`https://${e.domain}/${t}?`}else{if(!e.lang||!e.wiki)return"";a=`https://${e.lang}.${e.wiki}.org/w/api.php?`}e.follow_redirects||delete i.redirects,e.origin&&(i.origin=e.origin);let n=e.title;if("number"==typeof n)i.pageids=n;else if("string"==typeof n)i.titles=c(n);else if(void 0!==n&&o(n)&&"number"==typeof n[0])i.pageids=n.filter((e=>e)).join("|");else{if(void 0===n||!0!==o(n)||"string"!=typeof n[0])return"";i.titles=n.filter((e=>e)).map(c).join("|")}return`${a}${r=i,Object.entries(r).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&")}`;var r},m=function(e,t,i){let a=[];return e.sections().forEach((e=>{let n=[];n="string"==typeof i?e[t](i):e[t](),n.forEach((e=>{a.push(e)}))})),"number"==typeof i?void 0===a[i]?[]:[a[i]]:a},p=function(e,t){return Object.assign({},t,e)},d={title:!0,sections:!0,pageID:!0,categories:!0};var h=["category","abdeeling","bólkur","catagóir","categori","categoria","categoria","categoría","categorîa","categorìa","catégorie","categorie","catègorie","category","categuria","catigurìa","class","ẹ̀ka","flocc","flocc","flokkur","grup","jamii","kaarangay","kateggoría","kategooria","kategori","kategorî","kategoria","kategória","kategorie","kategoriija","kategorija","kategorio","kategoriya","kategoriýa","kategoriye","kategory","kategorya","kateqoriya","katiguriya","klad","luokka","ñemohenda","roinn","ronney","rummad","setensele","sokajy","sumut","thể","turkum","категорија","категория","категорія","катэгорыя","төркем","קטגוריה","تصنيف","تۈر","رده","श्रेणी","श्रेणी","বিষয়শ্রেণী","หมวดหมู่","분류","분류","分类"],g=["file","image","चित्र","archivo","attēls","berkas","bestand","datei","dosiero","dosya","fájl","fasciculus","fichier","fil","fitxategi","fitxer","gambar","imagem","imej","immagine","larawan","lêer","plik","restr","slika","wêne","wobraz","выява","податотека","слика","файл","სურათი","պատկեր","קובץ","پرونده","دوتنه","ملف","وێنە","चित्र","ไฟล์","파일","ファイル"],b=["infobox","anfo","anuāmapa","bilgi kutusu","bilgi","bilgiquti","boaty","boestkelaouiñ","bosca","capsa","diehtokássa","faktamall","ficha","generalni","gwybodlen3","info","infobokis","infoboks","infochascha","infokašćik","infokast","infokutija","infolentelė","infopolje","informkesto","infoskreine","infotaula","inligtingskas","inligtingskas3","inligtingskas4","kishtey","kotak","tertcita","tietolaatikko","yerleşim bilgi kutusu","ynfoboks","πλαίσιο","акарточка","аҥа","инфобокс","инфокутија","инфокутия","інфобокс","канадский","картка","карточка","карточка2","карточкарус","картуш","қуттӣ","ინფოდაფა","տեղեկաքարտ","אינפאקעסטל","תבנית","بطاقة","ڄاڻخانو","خانہ","لغة","ज्ञानसन्दूक","তথ্যছক","ਜਾਣਕਾਰੀਡੱਬਾ","సమాచారపెట్టె","තොරතුරුකොටුව","กล่องข้อมูล","ប្រអប់ព័ត៌មាន","정보상자","明細"];let f=" disambiguation";const k=["dab","dab","disamb","disambig","geodis","hndis","setindex","ship index","split dab","sport index","wp disambig","disambiguation cleanup","airport"+f,"biology"+f,"call sign"+f,"caselaw"+f,"chinese title"+f,"genus"+f,"hospital"+f,"lake index","letter"+f,"letter-number combination"+f,"mathematical"+f,"military unit"+f,"mountainindex","number"+f,"phonetics"+f,"place name"+f,"portal"+f,"road"+f,"school"+f,"species latin name abbreviation"+f,"species latin name"+f,"station"+f,"synagogue"+f,"taxonomic authority"+f,"taxonomy"+f].reduce(((e,t)=>(e[t]=!0,e)),{}),w=/. may (also )?refer to\b/i,y={about:!0,for:!0,"for multi":!0,"other people":!0,"other uses of":!0,distinguish:!0},$=new RegExp(". \\(("+["disambiguation","homonymie","توضيح","desambiguação","Begriffsklärung","disambigua","曖昧さ回避","消歧義","搞清楚","значения","ابهام‌زدایی","د ابہام","동음이의","dubbelsinnig","այլ կիրառումներ","ujednoznacznienie"].join("|")+")\\)$","i"),x=["dab","disamb","disambig","disambiguation","letter-numbercombdisambig","letter-number combination disambiguation","dmbox","airport disambiguation","biology disambiguation","call sign disambiguation","caselaw disambiguation","chinese title disambiguation","disambiguation cleanup","genus disambiguation","hospital disambiguation","human name disambiguation","human name disambiguation cleanup","letter-number combination disambiguation","mathematical disambiguation","military unit disambiguation","music disambiguation","number disambiguation","opus number disambiguation","phonetics disambiguation","place name disambiguation","portal disambiguation","road disambiguation","school disambiguation","species latin name abbreviation disambiguation","species latin name disambiguation","station disambiguation","synagogue disambiguation","taxonomic authority disambiguation","taxonomy disambiguation","template disambiguation","disamb2","disamb3","disamb4","disambiguation lead","disambiguation lead name","disambiguation name","disamb-term","disamb-terms","aðgreining","aimai","ałtsʼáʼáztiin","anlam ayrımı","anlam ayrımı","apartigilo","argipen","begriepskloorenge","begriffsklärung","begriffsklärung","begriffsklärung","begriffsklearung","bisongidila","bkl","bokokani","caddayn","clerheans","cudakirin","čvor","db","desambig","desambigación","desambiguação","desambiguació","desambiguación","desambiguáncia","desambiguasion","desambiguassiù","desambigui","dezambiguizare","dəqiqləşdirmə","disambigua","disambigua","disambigua","disambìgua","disambigua","disambiguasi","disambiguasi","discretiva","disheñvelout","disingkek","dixanbigua","dixebra","diżambigwazzjoni","doorverwijspagina","dp","dp","dubbelsinnig","dudalipen","dv","egyért","fleiri týdningar","fleirtyding","flertydig","förgrening","gì-ngiê","giklaro","gwahaniaethu","homonimo","homónimos","homonymie","huaʻōlelo puana like","idirdhealú","khu-pia̍t","kthjellim","kujekesa","maana","maneo bin","mehrdüdig begreep","menm non","muardüüdag artiikel","neibetsjuttings","nozīmju atdalīšana","nuorodinis","nyahkekaburan","omonimeye","omonimia","page dé frouque","paglilinaw","panangilawlawag","pansayod","pejy mitovy anarana","peker","razdvojba","razločitev","razvrstavanje","reddaghey","rozcestník","rozlišovacia stránka","sclerir noziun","selvendyssivu","soilleireachadh","suzmunski","täpsustuslehekülg","täsmennyssivu","telplänov","tlahtolmelahuacatlaliztli","trang định hướng","ujednoznacznienie","verdudeliking","wěcejwóznamowosć","wjacezmyslnosć","zambiguaçon","zeimeibu škiršona","αποσαφήνιση","айрық","аҵакырацәа","вишезначна одредница","ибҳомзудоӣ","кёб магъаналы","күп мәгънәләр","күп мәғәнәлелек","мъногосъмꙑслиѥ","неадназначнасць","неадназначнасьць","неоднозначность","олон удхатай","појаснување","пояснение","са шумуд манавал","салаа утгатай","суолталар","текмаанисиздик","цо магіна гуреб","чеперушка","чолхалла","шуко ончыктымаш-влак","მრავალმნიშვნელოვანი","բազմիմաստութիւն","բազմիմաստություն","באדייטן","פירושונים","ابهام‌زدایی","توضيح","توضيح","دقیقلشدیرمه","ڕوونکردنەوە","سلجهائپ","ضد ابہام","گجگجی بیری","نامبهمېدنه","መንታ","अस्पष्टता","बहुअर्थी","बहुविकल्पी शब्द","দ্ব্যর্থতা নিরসন","ਗੁੰਝਲ-ਖੋਲ੍ਹ","સંદિગ્ધ શીર્ષક","பக்கவழி நெறிப்படுத்தல்","అయోమయ నివృత్తి","ದ್ವಂದ್ವ ನಿವಾರಣೆ","വിവക്ഷകൾ","වක්‍රෝත්ති","แก้ความกำกวม","သံတူကြောင်းကွဲ","ណែនាំ","동음이의","扤清楚","搞清楚","曖昧さ回避","消歧义","釋義","gestion dj'omònim","sut'ichana qillqa"].reduce(((e,t)=>(e[t]=!0,e)),{}),v=function(e){if(!e)return!1;let t=e.text();return!(null===t||!t[0]||!0!==w.test(t))},j={caption:!0,alt:!0,links:!0,thumb:!0,url:!0},_=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},z={file(){let e=this.data.file||"";if(e){/^(image|file):/i.test(e)||(e=`File:${e}`),e=e.trim(),e=e.charAt(0).toUpperCase()+e.substring(1),e=e.replace(/ /g,"_")}return e},alt(){let e=this.data.alt||this.data.file||"";return e=e.replace(/^(file|image):/i,""),e=e.replace(/\.(jpg|jpeg|png|gif|svg)/i,""),e.replace(/_/g," ")},caption(){return this.data.caption?this.data.caption.text():""},links(){return this.data.caption?this.data.caption.links():[]},url(){let e=function(e){let t=function(e){let t=e.replace(/^(image|file?):/i,"");return t=t.charAt(0).toUpperCase()+t.substring(1),t=t.trim().replace(/ /g,"_"),t}(e);return t=encodeURIComponent(t),t}(this.file());return`https://${this.data.domain||"wikipedia.org"}/wiki/Special:Redirect/file/${e}`},thumbnail(e){return e=e||300,this.url()+"?width="+e},format(){let e=this.file().split(".");return e[e.length-1]?e[e.length-1].toLowerCase():null},json:function(e){return function(e,t){t=p(t,j);let i={file:e.file()};return!1!==t.thumb&&(i.thumb=e.thumbnail()),!1!==t.url&&(i.url=e.url()),!1!==t.caption&&e.data.caption&&(i.caption=e.caption(),!1!==t.links&&e.data.caption.links()&&(i.links=e.links())),!1!==t.alt&&e.data.alt&&(i.alt=e.alt()),i}(this,e=e||{})},text:function(){return""},wikitext:function(){return this.data.wiki||""}};Object.keys(z).forEach((e=>{_.prototype[e]=z[e]})),_.prototype.src=_.prototype.url,_.prototype.thumb=_.prototype.thumbnail;var O={aa:"Afar",ab:"Аҧсуа",af:"Afrikaans",ak:"Akana",als:"Alemannisch",am:"አማርኛ",an:"Aragonés",ang:"Englisc",ar:"العربية",arc:"ܣܘܪܬ",as:"অসমীয়া",ast:"Asturianu",av:"Авар",ay:"Aymar",az:"Azərbaycanca",ba:"Башҡорт",bar:"Boarisch","bat-smg":"Žemaitėška",bcl:"Bikol",be:"Беларуская","be-x-old":"ltr",bg:"Български",bh:"भोजपुरी",bi:"Bislama",bm:"Bamanankan",bn:"বাংলা",bo:"བོད་ཡིག",bpy:"ltr",br:"Brezhoneg",bs:"Bosanski",bug:"ᨅᨔ",bxr:"ltr",ca:"Català",cdo:"Chinese",ce:"Нохчийн",ceb:"Sinugboanong",ch:"Chamoru",cho:"Choctaw",chr:"ᏣᎳᎩ",chy:"Tsetsêhestâhese",co:"Corsu",cr:"Nehiyaw",cs:"Česky",csb:"Kaszëbsczi",cu:"Slavonic",cv:"Чăваш",cy:"Cymraeg",da:"Dansk",de:"Deutsch",diq:"Zazaki",dsb:"ltr",dv:"ދިވެހިބަސް",dz:"ཇོང་ཁ",ee:"Ɛʋɛ",far:"فارسی",el:"Ελληνικά",en:"English",eo:"Esperanto",es:"Español",et:"Eesti",eu:"Euskara",ext:"Estremeñu",ff:"Fulfulde",fi:"Suomi","fiu-vro":"Võro",fj:"Na",fo:"Føroyskt",fr:"Français",frp:"Arpitan",fur:"Furlan",fy:"ltr",ga:"Gaeilge",gan:"ltr",gd:"ltr",gil:"Taetae",gl:"Galego",gn:"Avañe'ẽ",got:"gutisk",gu:"ગુજરાતી",gv:"Gaelg",ha:"هَوُسَ",hak:"ltr",haw:"Hawai`i",he:"עברית",hi:"हिन्दी",ho:"ltr",hr:"Hrvatski",ht:"Krèyol",hu:"Magyar",hy:"Հայերեն",hz:"Otsiherero",ia:"Interlingua",id:"Bahasa",ie:"Interlingue",ig:"Igbo",ii:"ltr",ik:"Iñupiak",ilo:"Ilokano",io:"Ido",is:"Íslenska",it:"Italiano",iu:"ᐃᓄᒃᑎᑐᑦ",ja:"日本語",jbo:"Lojban",jv:"Basa",ka:"ქართული",kg:"KiKongo",ki:"Gĩkũyũ",kj:"Kuanyama",kk:"Қазақша",kl:"Kalaallisut",km:"ភាសាខ្មែរ",kn:"ಕನ್ನಡ",khw:"کھوار",ko:"한국어",kr:"Kanuri",ks:"कश्मीरी",ksh:"Ripoarisch",ku:"Kurdî",kv:"Коми",kw:"Kernewek",ky:"Kırgızca",la:"Latina",lad:"Dzhudezmo",lan:"Leb",lb:"Lëtzebuergesch",lg:"Luganda",li:"Limburgs",lij:"Líguru",lmo:"Lumbaart",ln:"Lingála",lo:"ລາວ",lt:"Lietuvių",lv:"Latviešu","map-bms":"Basa",mg:"Malagasy",man:"官話",mh:"Kajin",mi:"Māori",min:"Minangkabau",mk:"Македонски",ml:"മലയാളം",mn:"Монгол",mo:"Moldovenească",mr:"मराठी",ms:"Bahasa",mt:"bil-Malti",mus:"Muskogee",my:"Myanmasa",na:"Dorerin",nah:"Nahuatl",nap:"Nnapulitano",nd:"ltr",nds:"Plattdüütsch","nds-nl":"Saxon",ne:"नेपाली",new:"नेपालभाषा",ng:"Oshiwambo",nl:"Nederlands",nn:"ltr",no:"Norsk",nr:"ltr",nso:"ltr",nrm:"Nouormand",nv:"Diné",ny:"Chi-Chewa",oc:"Occitan",oj:"ᐊᓂᔑᓈᐯᒧᐎᓐ",om:"Oromoo",or:"ଓଡ଼ିଆ",os:"Иронау",pa:"ਪੰਜਾਬੀ",pag:"Pangasinan",pam:"Kapampangan",pap:"Papiamentu",pdc:"ltr",pi:"Pāli",pih:"Norfuk",pl:"Polski",pms:"Piemontèis",ps:"پښتو",pt:"Português",qu:"Runa",rm:"ltr",rmy:"Romani",rn:"Kirundi",ro:"Română","roa-rup":"Armâneashti",ru:"Русский",rw:"Kinyarwandi",sa:"संस्कृतम्",sc:"Sardu",scn:"Sicilianu",sco:"Scots",sd:"सिनधि",se:"ltr",sg:"Sängö",sh:"Srpskohrvatski",si:"සිංහල",simple:"ltr",sk:"Slovenčina",sl:"Slovenščina",sm:"Gagana",sn:"chiShona",so:"Soomaaliga",sq:"Shqip",sr:"Српски",ss:"SiSwati",st:"ltr",su:"Basa",sv:"Svenska",sw:"Kiswahili",ta:"தமிழ்",te:"తెలుగు",tet:"Tetun",tg:"Тоҷикӣ",th:"ไทย",ti:"ትግርኛ",tk:"Туркмен",tl:"Tagalog",tlh:"tlhIngan-Hol",tn:"Setswana",to:"Lea",tpi:"ltr",tr:"Türkçe",ts:"Xitsonga",tt:"Tatarça",tum:"chiTumbuka",tw:"Twi",ty:"Reo",udm:"Удмурт",ug:"Uyƣurqə",uk:"Українська",ur:"اردو",uz:"Ўзбек",ve:"Tshivenḓa",vi:"Việtnam",vec:"Vèneto",vls:"ltr",vo:"Volapük",wa:"Walon",war:"Winaray",wo:"Wollof",xal:"Хальмг",xh:"isiXhosa",yi:"ייִדיש",yo:"Yorùbá",za:"Cuengh",zh:"中文","zh-classical":"ltr","zh-min-nan":"Bân-lâm-gú","zh-yue":"粵語",zu:"isiZulu"};const E=".wikipedia.org/wiki/$1",q=".wikimedia.org/wiki/$1",N="www.";var S={acronym:N+"acronymfinder.com/$1.html",advisory:"advisory"+q,advogato:N+"advogato.org/$1",aew:"wiki.arabeyes.org/$1",appropedia:N+"appropedia.org/$1",aquariumwiki:N+"theaquariumwiki.com/$1",arborwiki:"localwiki.org/ann-arbor/$1",arxiv:"arxiv.org/abs/$1",atmwiki:N+"otterstedt.de/wiki/index.php/$1",baden:N+"stadtwiki-baden-baden.de/wiki/$1/",battlestarwiki:"en.battlestarwiki.org/wiki/$1",bcnbio:"historiapolitica.bcn.cl/resenas_parlamentarias/wiki/$1",beacha:N+"beachapedia.org/$1",betawiki:"translatewiki.net/wiki/$1",bibcode:"adsabs.harvard.edu/abs/$1",bibliowiki:"wikilivres.org/wiki/$1",bluwiki:"bluwiki.com/go/$1",blw:"britainloves"+E,botwiki:"botwiki.sno.cc/wiki/$1",boxrec:N+"boxrec.com/media/index.php?$1",brickwiki:N+"brickwiki.info/wiki/$1",bugzilla:"bugzilla.wikimedia.org/show_bug.cgi?id=$1",bulba:"bulbapedia.bulbagarden.net/wiki/$1",c:"commons"+q,c2:"c2.com/cgi/wiki?$1",c2find:"c2.com/cgi/wiki?FindPage&value=$1",cache:N+"google.com/search?q=cache:$1","ĉej":"esperanto.blahus.cz/cxej/vikio/index.php/$1",cellwiki:"cell.wikia.com/wiki/$1",centralwikia:"community.wikia.com/wiki/$1",chej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",choralwiki:N+"cpdl.org/wiki/index.php/$1",citizendium:"en.citizendium.org/wiki/$1",ckwiss:N+"ck-wissen.de/ckwiki/index.php?title=$1",comixpedia:N+"comixpedia.org/index.php?title=$1",commons:"commons"+q,communityscheme:"community.schemewiki.org/?c=s&key=$1",communitywiki:"communitywiki.org/$1",comune:"rete.comuni-italiani.it/wiki/$1",creativecommons:"creativecommons.org/licenses/$1",creativecommonswiki:"wiki.creativecommons.org/$1",cxej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",dcc:N+"dccwiki.com/$1",dcdatabase:"dc.wikia.com/$1",dcma:"christian-morgenstern.de/dcma/index.php?title=$1",debian:"wiki.debian.org/$1",delicious:N+"delicious.com/tag/$1",devmo:"developer.mozilla.org/en/docs/$1",dictionary:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",dict:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",disinfopedia:"sourcewatch.org/index.php/$1",distributedproofreaders:N+"pgdp.net/wiki/$1",distributedproofreadersca:N+"pgdpcanada.net/wiki/index.php/$1",dmoz:"curlie.org/$1",dmozs:"curlie.org/search?q=$1",doi:"doi.org/$1",donate:"donate"+q,doom_wiki:"doom.wikia.com/wiki/$1",download:"releases.wikimedia.org/$1",dbdump:"dumps.wikimedia.org/$1/latest/",dpd:"lema.rae.es/dpd/?key=$1",drae:"dle.rae.es/?w=$1",dreamhost:"wiki.dreamhost.com/index.php/$1",drumcorpswiki:N+"drumcorpswiki.com/index.php/$1",dwjwiki:N+"suberic.net/cgi-bin/dwj/wiki.cgi?$1","eĉei":N+"ikso.net/cgi-bin/wiki.pl?$1",ecoreality:N+"EcoReality.org/wiki/$1",ecxei:N+"ikso.net/cgi-bin/wiki.pl?$1",elibre:"enciclopedia.us.es/index.php/$1",emacswiki:N+"emacswiki.org/emacs?$1",encyc:"encyc.org/wiki/$1",energiewiki:N+"netzwerk-energieberater.de/wiki/index.php/$1",englyphwiki:"en.glyphwiki.org/wiki/$1",enkol:"enkol.pl/$1",eokulturcentro:"esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1",esolang:"esolangs.org/wiki/$1",etherpad:"etherpad.wikimedia.org/$1",ethnologue:N+"ethnologue.com/language/$1",ethnologuefamily:N+"ethnologue.com/show_family.asp?subid=$1",evowiki:"wiki.cotch.net/index.php/$1",exotica:N+"exotica.org.uk/wiki/$1",fanimutationwiki:"wiki.animutationportal.com/index.php/$1",fedora:"fedoraproject.org/wiki/$1",finalfantasy:"finalfantasy.wikia.com/wiki/$1",finnix:N+"finnix.org/$1",flickruser:N+"flickr.com/people/$1",flickrphoto:N+"flickr.com/photo.gne?id=$1",floralwiki:N+"floralwiki.co.uk/wiki/$1",foldoc:"foldoc.org/$1",foundation:"foundation"+q,foundationsite:"wikimediafoundation.org/$1",foxwiki:"fox.wikis.com/wc.dll?Wiki~$1",freebio:"freebiology.org/wiki/$1",freebsdman:N+"FreeBSD.org/cgi/man.cgi?apropos=1&query=$1",freeculturewiki:"wiki.freeculture.org/index.php/$1",freedomdefined:"freedomdefined.org/$1",freefeel:"freefeel.org/wiki/$1",freekiwiki:"wiki.freegeek.org/index.php/$1",freesoft:"directory.fsf.org/wiki/$1",ganfyd:"ganfyd.org/index.php?title=$1",gardenology:N+"gardenology.org/wiki/$1",gausswiki:"gauss.ffii.org/$1",gentoo:"wiki.gentoo.org/wiki/$1",genwiki:"wiki.genealogy.net/index.php/$1",gerrit:"gerrit.wikimedia.org/r/$1",git:"gerrit.wikimedia.org/g/$1",google:N+"google.com/search?q=$1",googledefine:N+"google.com/search?q=define:$1",googlegroups:"groups.google.com/groups?q=$1",guildwarswiki:"wiki.guildwars.com/wiki/$1",guildwiki:"guildwars.wikia.com/wiki/$1",guc:"tools.wmflabs.org/guc/?user=$1",gucprefix:"tools.wmflabs.org/guc/?isPrefixPattern=1&src=rc&user=$1",gutenberg:N+"gutenberg.org/etext/$1",gutenbergwiki:N+"gutenberg.org/wiki/$1",hackerspaces:"hackerspaces.org/wiki/$1",h2wiki:"halowiki.net/p/$1",hammondwiki:N+"dairiki.org/HammondWiki/index.php3?$1",hdl:"hdl.handle.net/$1",heraldik:"heraldik-wiki.de/wiki/$1",heroeswiki:"heroeswiki.com/$1",horizonlabs:"horizon.wikimedia.org/$1",hrwiki:N+"hrwiki.org/index.php/$1",hrfwiki:"fanstuff.hrwiki.org/index.php/$1",hupwiki:"wiki.hup.hu/index.php/$1",iarchive:"archive.org/details/$1",imdbname:N+"imdb.com/name/nm$1/",imdbtitle:N+"imdb.com/title/tt$1/",imdbcompany:N+"imdb.com/company/co$1/",imdbcharacter:N+"imdb.com/character/ch$1/",incubator:"incubator"+q,infosecpedia:"infosecpedia.org/wiki/$1",infosphere:"theinfosphere.org/$1","iso639-3":"iso639-3.sil.org/code/$1",issn:N+"worldcat.org/issn/$1",iuridictum:"iuridictum.pecina.cz/w/$1",jaglyphwiki:"glyphwiki.org/wiki/$1",jefo:"esperanto-jeunes.org/wiki/$1",jerseydatabase:"jerseydatabase.com/wiki.php?id=$1",jira:"jira.toolserver.org/browse/$1",jspwiki:N+"ecyrd.com/JSPWiki/Wiki.jsp?page=$1",jstor:N+"jstor.org/journals/$1",kamelo:"kamelopedia.mormo.org/index.php/$1",karlsruhe:"ka.stadtwiki.net/$1",kinowiki:"kino.skripov.com/index.php/$1",komicawiki:"wiki.komica.org/?$1",kontuwiki:"kontu.wiki/$1",wikitech:"wikitech"+q,libreplanet:"libreplanet.org/wiki/$1",linguistlist:"linguistlist.org/forms/langs/LLDescription.cfm?code=$1",linuxwiki:N+"linuxwiki.de/$1",linuxwikide:N+"linuxwiki.de/$1",liswiki:"liswiki.org/wiki/$1",literateprograms:"en.literateprograms.org/$1",livepedia:N+"livepedia.gr/index.php?title=$1",localwiki:"localwiki.org/$1",lojban:"mw.lojban.org/papri/$1",lostpedia:"lostpedia.wikia.com/wiki/$1",lqwiki:"wiki.linuxquestions.org/wiki/$1",luxo:"tools.wmflabs.org/guc/?user=$1",mail:"lists.wikimedia.org/mailman/listinfo/$1",mailarchive:"lists.wikimedia.org/pipermail/$1",mariowiki:N+"mariowiki.com/$1",marveldatabase:N+"marveldatabase.com/wiki/index.php/$1",meatball:"meatballwiki.org/wiki/$1",mw:N+"mediawiki.org/wiki/$1",mediazilla:"bugzilla.wikimedia.org/$1",memoryalpha:"memory-alpha.fandom.com/wiki/$1",metawiki:"meta"+q,metawikimedia:"meta"+q,metawikipedia:"meta"+q,mineralienatlas:N+"mineralienatlas.de/lexikon/index.php/$1",moinmoin:"moinmo.in/$1",monstropedia:N+"monstropedia.org/?title=$1",mosapedia:"mosapedia.de/wiki/index.php/$1",mozcom:"mozilla.wikia.com/wiki/$1",mozillawiki:"wiki.mozilla.org/$1",mozillazinekb:"kb.mozillazine.org/$1",musicbrainz:"musicbrainz.org/doc/$1",mediawikiwiki:N+"mediawiki.org/wiki/$1",mwod:N+"merriam-webster.com/dictionary/$1",mwot:N+"merriam-webster.com/thesaurus/$1",nkcells:N+"nkcells.info/index.php?title=$1",nara:"catalog.archives.gov/id/$1",nosmoke:"no-smok.net/nsmk/$1",nost:"nostalgia"+E,nostalgia:"nostalgia"+E,oeis:"oeis.org/$1",oldwikisource:"wikisource.org/wiki/$1",olpc:"wiki.laptop.org/go/$1",omegawiki:N+"omegawiki.org/Expression:$1",onelook:N+"onelook.com/?ls=b&w=$1",openlibrary:"openlibrary.org/$1",openstreetmap:"wiki.openstreetmap.org/wiki/$1",openwetware:"openwetware.org/wiki/$1",opera7wiki:"operawiki.info/$1",organicdesign:N+"organicdesign.co.nz/$1",orthodoxwiki:"orthodoxwiki.org/$1",osmwiki:"wiki.openstreetmap.org/wiki/$1",otrs:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=$1",otrswiki:"otrs-wiki"+q,ourmedia:N+"socialtext.net/ourmedia/index.cgi?$1",outreach:"outreach"+q,outreachwiki:"outreach"+q,owasp:N+"owasp.org/index.php/$1",panawiki:"wiki.alairelibre.net/index.php?title=$1",patwiki:"gauss.ffii.org/$1",personaltelco:"personaltelco.net/wiki/$1",petscan:"petscan.wmflabs.org/?psid=$1",phab:"phabricator.wikimedia.org/$1",phabricator:"phabricator.wikimedia.org/$1",phwiki:N+"pocketheaven.com/ph/wiki/index.php?title=$1",phpwiki:"phpwiki.sourceforge.net/phpwiki/index.php?$1",planetmath:"planetmath.org/node/$1",pmeg:N+"bertilow.com/pmeg/$1",pmid:N+"ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract",pokewiki:"pokewiki.de/$1","pokéwiki":"pokewiki.de/$1",policy:"policy.wikimedia.org/$1",proofwiki:N+"proofwiki.org/wiki/$1",pyrev:N+"mediawiki.org/wiki/Special:Code/pywikipedia/$1",pythoninfo:"wiki.python.org/moin/$1",pythonwiki:N+"pythonwiki.de/$1",pywiki:"c2.com/cgi/wiki?$1",psycle:"psycle.sourceforge.net/wiki/$1",quality:"quality"+q,quarry:"quarry.wmflabs.org/$1",regiowiki:"regiowiki.at/wiki/$1",rev:N+"mediawiki.org/wiki/Special:Code/MediaWiki/$1",revo:"purl.org/NET/voko/revo/art/$1.html",rfc:"tools.ietf.org/html/rfc$1",rheinneckar:"rhein-neckar-wiki.de/$1",robowiki:"robowiki.net/?$1",rodovid:"en.rodovid.org/wk/$1",reuterswiki:"glossary.reuters.com/index.php/$1",rowiki:"wiki.rennkuckuck.de/index.php/$1",rt:"rt.wikimedia.org/Ticket/Display.html?id=$1",s23wiki:"s23.org/wiki/$1",scholar:"scholar.google.com/scholar?q=$1",schoolswp:"schools-"+E,scores:"imslp.org/wiki/$1",scoutwiki:"en.scoutwiki.org/$1",scramble:N+"scramble.nl/wiki/index.php?title=$1",seapig:N+"seapig.org/$1",seattlewiki:"seattle.wikia.com/wiki/$1",slwiki:"wiki.secondlife.com/wiki/$1","semantic-mw":N+"semantic-mediawiki.org/wiki/$1",senseislibrary:"senseis.xmp.net/?$1",sharemap:"sharemap.org/$1",silcode:N+"sil.org/iso639-3/documentation.asp?id=$1",slashdot:"slashdot.org/article.pl?sid=$1",sourceforge:"sourceforge.net/$1",spcom:"spcom"+q,species:"species"+q,squeak:"wiki.squeak.org/squeak/$1",stats:"stats.wikimedia.org/$1",stewardry:"tools.wmflabs.org/meta/stewardry/?wiki=$1",strategy:"strategy"+q,strategywiki:"strategywiki.org/wiki/$1",sulutil:"meta.wikimedia.org/wiki/Special:CentralAuth/$1",swtrain:"train.spottingworld.com/$1",svn:"svn.wikimedia.org/viewvc/mediawiki/$1?view=log",swinbrain:"swinbrain.ict.swin.edu.au/wiki/$1",tabwiki:N+"tabwiki.com/index.php/$1",tclerswiki:"wiki.tcl.tk/$1",technorati:N+"technorati.com/search/$1",tenwiki:"ten"+E,testwiki:"test"+E,testwikidata:"test.wikidata.org/wiki/$1",test2wiki:"test2"+E,tfwiki:"tfwiki.net/wiki/$1",thelemapedia:N+"thelemapedia.org/index.php/$1",theopedia:N+"theopedia.com/$1",thinkwiki:N+"thinkwiki.org/wiki/$1",ticket:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=$1",tmbw:"tmbw.net/wiki/$1",tmnet:N+"technomanifestos.net/?$1",tmwiki:N+"EasyTopicMaps.com/?page=$1",toolforge:"tools.wmflabs.org/$1",toollabs:"tools.wmflabs.org/$1",tools:"toolserver.org/$1",tswiki:N+"mediawiki.org/wiki/Toolserver:$1",translatewiki:"translatewiki.net/wiki/$1",tviv:"tviv.org/wiki/$1",tvtropes:N+"tvtropes.org/pmwiki/pmwiki.php/Main/$1",twiki:"twiki.org/cgi-bin/view/$1",tyvawiki:N+"tyvawiki.org/wiki/$1",umap:"umap.openstreetmap.fr/$1",uncyclopedia:"en.uncyclopedia.co/wiki/$1",unihan:N+"unicode.org/cgi-bin/GetUnihanData.pl?codepoint=$1",unreal:"wiki.beyondunreal.com/wiki/$1",urbandict:N+"urbandictionary.com/define.php?term=$1",usej:N+"tejo.org/usej/$1",usemod:N+"usemod.com/cgi-bin/wiki.pl?$1",usability:"usability"+q,utrs:"utrs.wmflabs.org/appeal.php?id=$1",vikidia:"fr.vikidia.org/wiki/$1",vlos:"tusach.thuvienkhoahoc.com/wiki/$1",vkol:"kol.coldfront.net/thekolwiki/index.php/$1",voipinfo:N+"voip-info.org/wiki/view/$1",votewiki:"vote"+q,werelate:N+"werelate.org/wiki/$1",wg:"wg-en"+E,wikia:N+"wikia.com/wiki/w:c:$1",wikiasite:N+"wikia.com/wiki/w:c:$1",wikiapiary:"wikiapiary.com/wiki/$1",wikibooks:"en.wikibooks.org/wiki/$1",wikichristian:N+"wikichristian.org/index.php?title=$1",wikicities:N+"wikia.com/wiki/w:$1",wikicity:N+"wikia.com/wiki/w:c:$1",wikiconference:"wikiconference.org/wiki/$1",wikidata:N+"wikidata.org/wiki/$1",wikif1:N+"wikif1.org/$1",wikifur:"en.wikifur.com/wiki/$1",wikihow:N+"wikihow.com/$1",wikiindex:"wikiindex.org/$1",wikilemon:"wiki.illemonati.com/$1",wikilivres:"wikilivres.org/wiki/$1",wikilivresru:"wikilivres.ru/$1","wikimac-de":"apfelwiki.de/wiki/Main/$1",wikimedia:"foundation"+q,wikinews:"en.wikinews.org/wiki/$1",wikinfo:"wikinfo.org/w/index.php/$1",wikinvest:"meta.wikimedia.org/wiki/Interwiki_map/discontinued#Wikinvest",wikiotics:"wikiotics.org/$1",wikipapers:"wikipapers.referata.com/wiki/$1",wikipedia:"en"+E,wikipediawikipedia:"en.wikipedia.org/wiki/Wikipedia:$1",wikiquote:"en.wikiquote.org/wiki/$1",wikisophia:"wikisophia.org/index.php?title=$1",wikisource:"en.wikisource.org/wiki/$1",wikispecies:"species"+q,wikispot:"wikispot.org/?action=gotowikipage&v=$1",wikiskripta:N+"wikiskripta.eu/index.php/$1",labsconsole:"wikitech"+q,wikiti:"wikiti.denglend.net/index.php?title=$1",wikiversity:"en.wikiversity.org/wiki/$1",wikivoyage:"en.wikivoyage.org/wiki/$1",betawikiversity:"beta.wikiversity.org/wiki/$1",wikiwikiweb:"c2.com/cgi/wiki?$1",wiktionary:"en.wiktionary.org/wiki/$1",wipipedia:"wipipedia.org/index.php/$1",wlug:N+"wlug.org.nz/$1",wmam:"am"+q,wmar:N+"wikimedia.org.ar/wiki/$1",wmat:"mitglieder.wikimedia.at/$1",wmau:"wikimedia.org.au/wiki/$1",wmbd:"bd"+q,wmbe:"be"+q,wmbr:"br"+q,wmca:"ca"+q,wmch:N+"wikimedia.ch/$1",wmcl:N+"wikimediachile.cl/index.php?title=$1",wmcn:"cn"+q,wmco:"co"+q,wmcz:N+"wikimedia.cz/web/$1",wmdc:"wikimediadc.org/wiki/$1",securewikidc:"secure.wikidc.org/$1",wmde:"wikimedia.de/wiki/$1",wmdk:"dk"+q,wmee:"ee"+q,wmec:"ec"+q,wmes:N+"wikimedia.es/wiki/$1",wmet:"ee"+q,wmfdashboard:"outreachdashboard.wmflabs.org/$1",wmfi:"fi"+q,wmfr:"wikimedia.fr/$1",wmge:"ge"+q,wmhi:"hi"+q,wmhk:"meta.wikimedia.org/wiki/Wikimedia_Hong_Kong",wmhu:"wikimedia.hu/wiki/$1",wmid:"id"+q,wmil:N+"wikimedia.org.il/$1",wmin:"wiki.wikimedia.in/$1",wmit:"wiki.wikimedia.it/wiki/$1",wmke:"meta.wikimedia.org/wiki/Wikimedia_Kenya",wmmk:"mk"+q,wmmx:"mx"+q,wmnl:"nl"+q,wmnyc:"nyc"+q,wmno:"no"+q,"wmpa-us":"pa-us"+q,wmph:"meta.wikimedia.org/wiki/Wikimedia_Philippines",wmpl:"pl"+q,wmpt:"pt"+q,wmpunjabi:"punjabi"+q,wmromd:"romd"+q,wmrs:"rs"+q,wmru:"ru"+q,wmse:"se"+q,wmsk:"wikimedia.sk/$1",wmtr:"tr"+q,wmtw:"wikimedia.tw/wiki/index.php5/$1",wmua:"ua"+q,wmuk:"wikimedia.org.uk/wiki/$1",wmve:"wikimedia.org.ve/wiki/$1",wmza:"wikimedia.org.za/wiki/$1",wm2005:"wikimania2005"+q,wm2006:"wikimania2006"+q,wm2007:"wikimania2007"+q,wm2008:"wikimania2008"+q,wm2009:"wikimania2009"+q,wm2010:"wikimania2010"+q,wm2011:"wikimania2011"+q,wm2012:"wikimania2012"+q,wm2013:"wikimania2013"+q,wm2014:"wikimania2014"+q,wm2015:"wikimania2015"+q,wm2016:"wikimania2016"+q,wm2017:"wikimania2017"+q,wm2018:"wikimania2018"+q,wmania:"wikimania"+q,wikimania:"wikimania"+q,wmteam:"wikimaniateam"+q,wmf:"foundation"+q,wmfblog:"blog.wikimedia.org/$1",wmdeblog:"blog.wikimedia.de/$1",wookieepedia:"starwars.wikia.com/wiki/$1",wowwiki:N+"wowwiki.com/$1",wqy:"wqy.sourceforge.net/cgi-bin/index.cgi?$1",wurmpedia:"wurmpedia.com/index.php/$1",viaf:"viaf.org/viaf/$1",zrhwiki:N+"zrhwiki.ch/wiki/$1",zum:"wiki.zum.de/$1",zwiki:N+"zwiki.org/$1",m:"meta"+q,meta:"meta"+q,sep11:"sep11"+E,d:N+"wikidata.org/wiki/$1",minnan:"zh-min-nan"+E,nb:"no"+E,"zh-cfr":"zh-min-nan"+E,"zh-cn":"zh"+E,"zh-tw":"zh"+E,nan:"zh-min-nan"+E,vro:"fiu-vro"+E,cmn:"zh"+E,lzh:"zh-classical"+E,rup:"roa-rup"+E,gsw:"als"+E,"be-tarask":"be-x-old"+E,sgs:"bat-smg"+E,egl:"eml"+E,w:"en"+E,wikt:"en.wiktionary.org/wiki/$1",q:"en.wikiquote.org/wiki/$1",b:"en.wikibooks.org/wiki/$1",n:"en.wikinews.org/wiki/$1",s:"en.wikisource.org/wiki/$1",chapter:"en"+q,v:"en.wikiversity.org/wiki/$1",voy:"en.wikivoyage.org/wiki/$1"};Object.keys(O).forEach((e=>{S[e]=e+".wikipedia.org/wiki/$1"}));const C=/^(category|catégorie|kategorie|categoría|categoria|categorie|kategoria|تصنيف|image|file|fichier|datei|media):/i,L=/\[(https?|news|ftp|mailto|gopher|irc)(:\/\/[^\]| ]{4,1500})([| ].*?)?\]/g,A=/\[\[(.{0,1600}?)\]\]([a-z]+)?/gi,P=function(e,t){return t.replace(A,(function(t,i,a){let n=null,r=i;if(i.match(/\|/)&&(r=(i=i.replace(/\[\[(.{2,1000}?)\]\](\w{0,10})/g,"$1$2")).replace(/(.{2,1000})\|.{0,2000}/,"$1"),n=i.replace(/.{2,1000}?\|/,""),null===n&&r.match(/\|$/)&&(r=r.replace(/\|$/,""),n=r)),r.match(C))return i;let o={page:r,raw:t};return o.page=o.page.replace(/#(.*)/,((e,t)=>(o.anchor=t,""))),o=function(e){let t=e.page||"";if(-1!==t.indexOf(":")){let i=t.match(/^(.*):(.*)/);if(null===i)return e;let a=i[1]||"";if(a=a.toLowerCase(),-1!==a.indexOf(":")){let[,t,i]=a.match(/^:?(.*):(.*)/);if(!1===S.hasOwnProperty(t)||!1===O.hasOwnProperty(i))return e;e.wiki={wiki:t,lang:i}}else{if(!1===S.hasOwnProperty(a))return e;e.wiki=a}e.page=i[2]}return e}(o),o.wiki&&(o.type="interwiki"),null!==n&&n!==o.page&&(o.text=n),a&&(o.text=o.text||o.page,o.text+=a.trim()),o.page&&!1===/^[A-Z]/.test(o.page)&&(o.text||(o.text=o.page),o.page=o.page),o.text&&o.text.startsWith(":")&&(o.text=o.text.replace(/^:/,"")),e.push(o),i})),e},T=function(e){let t=[];if(t=function(e,t){return t.replace(L,(function(t,i,a,n){return n=n||"",e.push({type:"external",site:i+a,text:n.trim(),raw:t}),n})),e}(t,e),t=P(t,e),0!==t.length)return t},D=new RegExp("^[ \n\t]*?#("+["adkas","aýdaw","doorverwijzing","ohjaus","patrz","přesměruj","redirección","redireccion","redirección","redirecionamento","redirect","redirection","redirection","rinvia","tilvísun","uudelleenohjaus","weiterleitung","weiterleitung","yönlendi̇r","yönlendirme","yönlendi̇rme","ανακατευθυνση","айдау","перанакіраваньне","перенаправлення","пренасочување","преусмери","преусмјери","تغییر_مسیر","تغییرمسیر","تغییرمسیر","เปลี่ยนทาง","ប្តូរទីតាំងទៅ","転送","重定向"].join("|")+") *?(\\[\\[.{2,180}?\\]\\])","i"),I=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","references","source","syntaxhighlight","timeline"],M=`< ?(${I.join("|")}) ?[^>]{0,200}?>`,R=`< ?/ ?(${I.join("|")}) ?>`,U=new RegExp(`${M}[\\s\\S]+?${R}`,"gi");function F(e){return e=(e=(e=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(U," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%.\-#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/
(.*?)<\/blockquote>/g,"{{blockquote|text=$1}}")).replace(/ ?<[ /]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr|u)[ /]?> ?/g," ")).replace(/ ?<[ /]?(abbr|bdi|bdo|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ /]?> ?/g," ")).replace(/ ?<[ /]?h[0-9][ /]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()}(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~{2,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," ")).replace(/–/g,"–"))).replace(/\([,;: ]+\)/g,"")).replace(/\{\{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,"")}const B=/[\\.$]/,K=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},W=function(e={}){let t=Object.keys(e);for(let i=0;i{Z.prototype[e]=G[e]}));const V=/^[0-9,.]+$/,J={text:!0,links:!0,formatting:!0,numbers:!0},X=function(e={}){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Q={links:function(e){let t=this.data.links||[];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page===e));return void 0===i?[]:[i]}return t},interwiki:function(){return this.links().filter((e=>void 0!==e.wiki))},bolds:function(){return this.data&&this.data.fmt&&this.data.fmt.bold&&this.data.fmt.bold||[]},italics:function(){return this.data&&this.data.fmt&&this.data.fmt.italic&&this.data.fmt.italic||[]},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return function(e,t){t=p(t,J);let i={},a=e.text();if(!0===t.text&&(i.text=a),!0===t.numbers&&V.test(a)){let e=Number(a.replace(/,/g,""));!1===isNaN(e)&&(i.number=e)}return t.links&&e.links().length>0&&(i.links=e.links().map((e=>e.json()))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i}(this,e)},wikitext:function(){return this.data.wiki||""},isEmpty:function(){return""===this.data.text}};Object.keys(Q).forEach((e=>{X.prototype[e]=Q[e]}));const ee={links:"link",bolds:"bold",italics:"italic"};Object.keys(ee).forEach((e=>{X.prototype[ee[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}})),X.prototype.plaintext=X.prototype.text;const te=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),ie=new RegExp("(^| |')("+te.join("|")+")[.!?] ?$","i"),ae=/[ .'][A-Z].? *$/i,ne=/\.{3,} +$/,re=/ c\.\s$/,oe=/\p{Letter}/iu;function se(e){let t={wiki:e,text:e};return function(e){let t=e.text,i=T(t)||[];e.links=i.map((e=>(t=t.replace(e.raw,e.text||e.page||""),new Z(e)))),t=t.replace(/\[\[File:(.{2,80}?)\|([^\]]+)\]\](\w{0,5})/g,"$1"),e.text=t}(t),t.text=r(t.text.replace(/\([,;: ]*\)/g,"").replace(/\( *(; ?)+/g,"(")).replace(/ +\.$/,"."),t=function(e){let t=[],i=[],a=e.text||"";return a=a.replace(/'''''(.{0,2500}?)'''''/g,((e,a)=>(t.push(a),i.push(a),a))),a=a.replace(/''''(.{0,2500}?)''''/g,((e,i)=>(t.push(`'${i}'`),`'${i}'`))),a=a.replace(/'''(.{0,2500}?)'''/g,((e,i)=>(t.push(i),i))),a=a.replace(/''(.{0,2500}?)''/g,((e,t)=>(i.push(t),t))),e.text=a,t.length>0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e}(t),new X(t)}const le=function(e){let t=function(e){let t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;let a=function(e){let t=e.split(/(\n+)/);return t=t.filter((e=>e.match(/\S/))),t=t.map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s|$)/g)})),function(e){let t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t)}(e);for(let e=0;ei.length)return!1;const a=e.match(/"/g);if(a&&a.length%2!=0&&e.length<900)return!1;const n=e.match(/[()]/g);return!(n&&n.length%2!=0&&e.length<900)}(n))?/^\s/.test(i[e+1])||/\s$/.test(i[e])?i[e+1]=i[e]+i[e+1]:i[e+1]=i[e]+" "+i[e+1]:i[e]&&i[e].length>0&&(t.push(i[e]),i[e]="");var n;return 0===t.length?[e]:t}(e.wiki);t=t.map(se),t[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},ce=/.*rowspan *= *["']?([0-9]+)["']?[ |]*/,ue=/.*colspan *= *["']?([0-9]+)["']?[ |]*/,me=function(e){return e=function(e){return e.forEach(((t,i)=>{t.forEach(((a,n)=>{let r=a.match(ce);if(null!==r){let o=parseInt(r[1],10);a=a.replace(ce,""),t[n]=a;for(let t=i+1;t{e.forEach(((t,i)=>{let a=t.match(ue);if(null!==a){let n=parseInt(a[1],10);e[i]=t.replace(ue,"");for(let t=1;te.length>0))}(e))},pe=/^!/,de={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},he=function(e){return(e=se(e).text()).match(/\|/)&&(e=e.replace(/.*?\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},ge=function(e){if(e.length<=3)return[];let t=e[0].slice(0);t=t.map((e=>(e=se(e=e.replace(/^! */,"")).text(),e=(e=he(e)).toLowerCase())));for(let i=0;ie&&!0!==/^\|\+/.test(e))),!0===/^\{\|/.test(e[0])&&e.shift(),!0===/^\|\}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(let a=0;a0&&(t.push(i),i=[]);else{let e=n.charAt(0);"|"!==e&&"!"!==e||(n=n.substring(1)),n=n.split(/(?:\|\||!!)/),"!"===e&&(n[0]=e+n[0]),n.forEach((e=>{e=e.trim(),i.push(e)}))}}return i.length>0&&t.push(i),t}(e.replace(/\r/g,"").replace(/\n(\s*[^|!{\s])/g," $1").split(/\n/).map((e=>e.trim())));if(t=t.filter((e=>e)),0===t.length)return[];t=function(e){return e.filter((e=>1!==e.length||!e[0]||!pe.test(e[0])||!1!==/rowspan/i.test(e[0])))}(t),t=me(t);let i=function(e=[]){let t=[];var i;(i=(i=e[0])||[]).length-i.filter((e=>e)).length>3&&e.shift();let a=e[0];return a&&a[0]&&a[1]&&(/^!/.test(a[0])||/^!/.test(a[1]))&&(t=a.map((e=>(e=e.replace(/^! */,""),he(e)))),e.shift()),a=e[0],a&&a[0]&&a[1]&&/^!/.test(a[0])&&/^!/.test(a[1])&&(a.forEach(((e,i)=>{e=e.replace(/^! */,""),e=he(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(t);if(!i||i.length<=1){i=ge(t);let e=t[t.length-1]||[];i.length<=1&&e.length>2&&(i=ge(t.slice(1)),i.length>0&&(t=t.slice(2)))}let a=t.map((e=>function(e,t){let i={};return e.forEach(((e,a)=>{let n=t[a]||"col"+(a+1),r=se(e);r.text(he(r.text())),i[n]=r})),i}(e,i)));return a},fe={},ke=function(e=""){return e=(e=(e=(e=e.toLowerCase()).replace(/[_-]/g," ")).replace(/\(.*?\)/,"")).trim()},we=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_wiki",{enumerable:!1,value:t})},ye={links(e){let t=[];if(this.data.forEach((e=>{Object.keys(e).forEach((i=>{t=t.concat(e[i].links())}))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},get(e){let t=this.data[0]||{},i=Object.keys(t).reduce(((e,t)=>(e[ke(t)]=t,e)),{});if("string"==typeof e){let t=ke(e);return t=i[t]||t,this.data.map((e=>e[t]?e[t].text():null))}return e=e.map(ke).map((e=>i[e]||e)),this.data.map((t=>e.reduce(((e,i)=>(t[i]?e[i]=t[i].text():e[i]="",e)),{})))},keyValue(e){let t=this.json(e);return t.forEach((e=>{Object.keys(e).forEach((t=>{e[t]=e[t].text}))})),t},json(e){return e=p(e,fe),function(e,t){return e.map((e=>{let i={};return Object.keys(e).forEach((t=>{i[t]=e[t].json()})),!0===t.encode&&(i=W(i)),i}))}(this.data,e)},text:()=>"",wikitext(){return this._wiki||""}};ye.keyvalue=ye.keyValue,ye.keyval=ye.keyValue,Object.keys(ye).forEach((e=>{we.prototype[e]=ye[e]}));const $e=/^\s*\{\|/,xe=/^\s*\|\}/,ve={sentences:!0},je={sentences:!0,lists:!0,images:!0},_e=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},ze={sentences:function(){return this.data.sentences||[]},references:function(){return this.data.references},lists:function(){return this.data.lists},images(){return this.data.images||[]},links:function(e){let t=[];if(this.sentences().forEach((i=>{t=t.concat(i.links(e))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},interwiki(){let e=[];return this.sentences().forEach((t=>{e=e.concat(t.interwiki())})),e||[]},text:function(e){e=p(e,je);let t=this.sentences().map((t=>t.text(e))).join(" ");return this.lists().forEach((e=>{t+="\n"+e.text()})),t},json:function(e){return function(e,t){let i={};return!0===(t=p(t,ve)).sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,je))},wikitext:function(){return this.data.wiki}};ze.citations=ze.references,Object.keys(ze).forEach((e=>{_e.prototype[e]=ze[e]}));const Oe={sentences:"sentence",references:"reference",citations:"citation",lists:"list",images:"image",links:"link"};Object.keys(Oe).forEach((e=>{_e.prototype[Oe[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}}));const Ee=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},qe=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},Ne=/^[\p{Letter}0-9._/\- '()\t]+=/iu,Se={template:!0,list:!0,prototype:!0},Ce=function(e,t){let i=0;return e.reduce(((e,a="")=>{if(a=a.trim(),!0===Ne.test(a)){let t=function(e){let t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();let a=t.slice(1).join("=");return Se.hasOwnProperty(i)&&(i="_"+i),{key:i,val:a.trim()}}(a);if(t.key)return e[t.key]&&!t.val||(e[t.key]=t.val),e}if(t&&t[i]){e[t[i]]=a}else e.list=e.list||[],e.list.push(a);return i+=1,e}),{})},Le={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Ae=function(e,t){let i=se(e);return"json"===t?i.json():"raw"===t?i:i.text()},Pe=function(e,t=[],i){let a=function(e){let t=e.split(/\n?\|/);t.forEach(((e,i)=>{null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)})),t=t.filter((e=>null!==e)),t=t.map((e=>(e||"").trim()));for(let e=t.length-1;e>=0;e-=1){""===t[e]&&t.pop();break}return t}(e=Ee(e||"")),n=a.shift(),r=Ce(a,t);return r=function(e){return Object.keys(e).forEach((t=>{!0===Le[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e}(r),r[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((e=>{r[e]="list"!==e?Ae(r[e],i):r[e].map((e=>Ae(e,i)))})),n&&(r.template=qe(n)),r};const Te=new RegExp("("+g.join("|")+"):","i");let De=`(${g.join("|")})`;const Ie=new RegExp(De+":(.+?)[\\||\\]]","iu"),Me=/^\[\[:/,Re={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},Ue=function(e,t){let i=e.wiki,a=function(e){let t=[],i=[];const a=e.split("");let n=0;for(let r=0;r0){let e=0,a=0;for(let t=0;ta&&i.push("]"),t.push(i.join("")),i=[]}}return t}(i);a.forEach((function(a){if(!0===Te.test(a)){e.images=e.images||[];let n=function(e,t){let i=e.match(Ie);if(null===i||!i[2])return null;if(Me.test(e))return null;let a=`${i[1]}:${i[2]||""}`;if(a){let i={file:a,lang:t._lang,domain:t._domain,wiki:e,pluginData:{}};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");let n=Pe(e),r=n.list||[];return n.alt&&(i.alt=n.alt),r=r.filter((e=>!1===Re.hasOwnProperty(e))),r[r.length-1]&&(i.caption=se(r[r.length-1])),new _(i)}return null}(a,t);n&&(e.images.push(n),i=i.replace(a,""))}})),e.wiki=i},Fe={},Be=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},Ke={lines(){return this.data},links(e){let t=[];if(this.lines().forEach((e=>{t=t.concat(e.links())})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},json(e){return e=p(e,Fe),this.lines().map((t=>t.json(e)))},text(){return((e,t)=>e.map((e=>" * "+e.text(t))).join("\n"))(this.data)},wikitext(){return this.wiki||""}};Object.keys(Ke).forEach((e=>{Be.prototype[e]=Ke[e]}));const We=/^[#*:;|]+/,He=/^\*+[^:,|]{4}/,Ye=/^ ?#[^:,|]{4}/,Ze=/[\p{Letter}_0-9\]}]/iu,Ge=function(e){return We.test(e)||He.test(e)||Ye.test(e)},Ve=function(e,t){let i=[];for(let a=t;ae&&Ze.test(e))),i=function(e){let t=1;e=e.filter((e=>e));for(let i=0;ie&&e.trim().length>0)),a=a.map((e=>{let i={wiki:e,lists:[],sentences:[],images:[]};return function(e){let t=e.wiki,i=t.split(/\n/g),a=[],n=[];for(let e=0;e0&&(a.push(t),e+=t.length-1)}else n.push(i[e]);e.lists=a.map((e=>new Be(e,t))),e.wiki=n.join("\n")}(i),Ue(i,t),le(i),new _e(i)})),e._wiki=i,e._paragraphs=a},Qe="{",et=function(e){let t=0,i=[],a=[];for(let n=e.indexOf(Qe);-1!==n&&n0?n++:n=e.indexOf(Qe,n+1)){let r=e[n];if(r===Qe&&(t+=1),t>0){if("}"===r&&(t-=1,0===t)){a.push(r);let e=a.join("");a=[],/\{\{/.test(e)&&/\}\}/.test(e)&&i.push(e);continue}if(1===t&&r!==Qe&&"}"!==r){t=0,a=[];continue}a.push(r)}}return i},tt=function(e){let t=null;return t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1],t&&(t=t.replace(/:.*/,""),t=qe(t)),t||null},it=/\{\{/,at=function(e){return{body:e,name:tt(e),children:[]}},nt=function(e){let t=e.body.substr(2);return t=t.replace(/\}\}$/,""),e.children=et(t),e.children=e.children.map(at),0===e.children.length||e.children.forEach((e=>{let t=e.body.substr(2);return it.test(t)?nt(e):null})),e},rt=function(e){let t=et(e);return t=t.map(at),t=t.map(nt),t},ot=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce(((e,t)=>(e[t]=!0,e)),{});var st={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0};const lt=new RegExp("^(subst.)?("+b.join("|")+")(?=:| |\n|$)","i");b.forEach((e=>{st[e]=!0}));const ct=/^infobox /i,ut=/ infobox$/i,mt=/^year in [A-Z]/i,pt=function(e={}){let t=e.template.match(lt),i=e.template;t&&t[0]&&(i=i.replace(t[0],"")),i=i.trim();let a={template:"infobox",type:i,data:e};return delete a.data.template,delete a.data.list,a};let dt={imdb:"imdb name","imdb episodes":"imdb episode",localday:"currentday",localdayname:"currentdayname",localyear:"currentyear","birth date based on age at death":"birth based on age as of date","bare anchored list":"anchored list",cvt:"convert",cricon:"flagicon",sfrac:"frac",sqrt:"radic","unreferenced section":"unreferenced",redir:"redirect",sisterlinks:"sister project links","main article":"main",by:"baseball year",aldsy:"alds year",nldsy:"nlds year","str rep":"replace",ushr2:"ushr",stn:"station",metrod:"metro",fw:"ferry",rws:"stnlnk",sclass2:"sclass",under:"underline",brackets:"bracket",raise:"lower"},ht={date:["byline","dateline"],citation:["cite","source","source-pr","source-science"],"no spam":["email","@","no spam blue"],"lrt station":["lrt","lrts"],"mrt station":["mrt","mrts"],flagcountry:["cr","cr-rt"],trunc:["str left","str crop"],percentage:["pct","percentage"],rnd:["rndfrac","rndnear"],abbr:["tooltip","abbrv","define"],sfn:["sfnref","harvid","harvnb"],"birth date and age":["death date and age","bda"],currentmonth:["localmonth","currentmonthname","currentmonthabbrev"],currency:["monnaie","unité","nombre","nb","iso4217"],coord:["coor","coor title dms","coor title dec","coor dms","coor dm","coor dec"],"columns-list":["cmn","col-list","columnslist","collist"],nihongo:["nihongo2","nihongo3","nihongo-s","nihongo foot"],plainlist:["flatlist","plain list"],"winning percentage":["winpct","winperc"],"collapsible list":["nblist","nonbulleted list","ubl","ublist","ubt","unbullet","unbulleted list","unbulleted","unbulletedlist","vunblist"],"election box begin":["election box begin no change","election box begin no party","election box begin no party no change","election box inline begin","election box inline begin no change"],"election box candidate":["election box candidate for alliance","election box candidate minor party","election box candidate no party link no change","election box candidate with party link","election box candidate with party link coalition 1918","election box candidate with party link no change","election box inline candidate","election box inline candidate no change","election box inline candidate with party link","election box inline candidate with party link no change","election box inline incumbent"],"4teambracket":["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"],start:["end","birth","death","start date","end date","birth date","death date","start date and age","end date and age","dob"],"start-date":["end-date","birth-date","death-date","birth-date and age","birth-date and given age","death-date and age","death-date and given age"],tl:["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","xpd","para","elc","xtag","mli","mlix","url"],done:["resolved mark large","implemented","pimplemented","resolved mark","accepted","agree","approved","checked2","verified","conditional yes","confirmed","confirmed-nc","tallyho","tick","helped","doneu|example","edited2","donetask","unprod","autp","responded","sure","merge done","marked","pass","aye","yes check","y&","yeac","yeag"],xmark:["expired","deleted","not done","not done empty request","not done unclear","not done not likely","stale-small","smallrejected","x mark","nay","no mark","not done-t","fail","n&","x mark-n","xed box","cancelled","deleted-image","already declined","opblocked","user-blocked","notabug","notfixed","won't fix","withdraw","nojoy","unrelated","off-topic talk","nayc","nayg"],checked:["already done","resolved1","check mark-n","checked box"],"station link":["amtk","cta","bts","mnrr","mtams","munis","njts","scax","wmata","rwsa"]};Object.keys(O).forEach((e=>{dt["ipa-"+e]="ipa",dt["ipac-"+e]="ipac"})),Object.keys(ht).forEach((e=>{ht[e].forEach((t=>{dt[t]=e}))}));var gt={"·":"·",dot:"·",middot:"·","•":" • ",",":",","=":"=","1/2":"1⁄2","1/3":"1⁄3","2/3":"2⁄3","1/4":"1⁄4","3/4":"3⁄4","–":"–",ndash:"–","en dash":"–","spaced ndash":" – ","—":"—",mdash:"—",spd:" – ","em dash":"—","number sign":"#","hash-tag":"#",ibeam:"I","&":"&",";":";",ampersand:"&",dagger:"†","double-dagger":"‡",snds:" – ",snd:" – ","^":" ","!":"|","'":"'","\\":" /","`":"`","[":"[","*":"*",asterisk:"*","long dash":"———",clear:"\n\n","h.":"ḥ",profit:"▲",loss:"▼",gain:"▲",ell:"ℓ","1~":"~","2~":"~~","3~":"~~~","4~":"~~~~","5~":"~~~~~",goldmedal:"🥇",silvermedal:"🥈",bronzemedal:"🥉",done:"✅",xmark:"❌",checked:"✔️","thumbs up":"👍","thumbs down":"👎",minusplus:"∓",plusminus:"±"};let bt={p1:0,p2:1,p3:2,resize:1,lang:1,"rtl-lang":1,"line-height":1,l:2,h:1,sort:1};["defn","lino","finedetail","nobold","noitalic","nocaps","vanchor","rnd","date","taste","monthname","baseball secondary style","nowrap","nobr","big","cquote","pull quote","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code","char","angle bracket","angbr","symb","dabsearch","key press","nowiki","nowiki2","unstrip","unstripnowiki","plain text","make code","killmarkers","longitem","longlink","strikethrough","underline","uuline","not a typo","text","var serif","double underline","nee","ne","left","right","center","centered","justify","smalldiv","bold div","monodiv","italic div","bigdiv","strikethroughdiv","strikethrough color","pbpe"].forEach((e=>{bt[e]=0}));let ft={};["mv","m/v","gts","hsc","ms","m/s","my","m/y","ps","rms","rv","r/v","sb","ss","s/s","sv","s/v","sy","s/y","tss","ans","hmas","hmbs","bns","hmcs","ccgs","arc","hdms","bae","ens","eml","rfns","fns","hs","sms","smu","gs","icgv","ins","kri","lé","jsub","jds","js","hnlms","hmnzs","nns","hnoms","hmpngs","bap","rps","brp","orp","nrp","nms","rss","sas","hmsas","roks","hswms","htms","tcg","hms","hmt","rfaux","usat","uscgc","usns","usrc","uss","usav"].forEach((e=>{ft[e]=t=>{let{name:i,id:a}=Pe(t,["name","id"]);return a?`[[${e.toUpperCase()} ${i} (${a})]]`:`[[${e.toUpperCase()} ${i}]]`}}));const kt=function(e){if(!e.numerator&&!e.denominator)return null;let t=Number(e.numerator)/Number(e.denominator);return t*=100,Number(e.decimals),parseInt(t,10)},wt=function(e=""){if("number"==typeof e)return e;e=(e=e.replace(/,/g,"")).replace(/−/g,"-");let t=Number(e);return isNaN(t)?e:t},yt=function(e){let t=e.match(/ipac?-(.+)/);return null!==t?!0===O.hasOwnProperty(t[1])?O[t[1]].english_title:t[1]:null},$t=e=>e.charAt(0).toUpperCase()+e.substring(1),xt=function(e){let t=e%10,i=e%100;return 1===t&&11!==i?e+"st":2===t&&12!==i?e+"nd":3===t&&13!==i?e+"rd":e+"th"},vt={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"};var jt={ra:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:e=>(Pe(e,["degrees"]).degrees||"")+"°",hms2deg:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:e=>{let t=Pe(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},sortname:e=>{let t=Pe(e,["first","last","target","sort"]),i=`${t.first||""} ${t.last||""}`;return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=` (${t.dab})`,t.target&&(t.target+=` (${t.dab})`)),t.target?`[[${t.target}|${i}]]`:`[[${i}]]`)},"first word":e=>{let t=Pe(e,["text"]),i=t.text||"";return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:e=>{let t=Pe(e,["str","len"]);return(t.str||"").substr(0,t.len)},"str mid":e=>{let t=Pe(e,["str","start","end"]),i=parseInt(t.start,10)-1,a=parseInt(t.end,10);return t.str.substr(i,a)},reign:e=>{let t=Pe(e,["start","end"]);return`(r. ${t.start} – ${t.end})`},circa:e=>{let{year:t}=Pe(e,["year"]);return t?`c. ${t}`:"c. "},"decade link":e=>{let{year:t}=Pe(e,["year"]);return`${t}|${t}s`},decade:e=>{let t=Pe(e,["year"]),i=Number(t.year);return i=10*Math.floor(i/10),`${i}s`},century:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/100)+1,`${i}`},radic:e=>{let t=Pe(e,["after","before"]);return`${t.before||""}√${t.after||""}`},"medical cases chart/row":e=>e,oldstyledate:e=>{let t=Pe(e,["date","year"]);return t.year?t.date+" "+t.year:t.date},braces:e=>{let t=Pe(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},hlist:e=>{let t=Pe(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:e=>(Pe(e).list||[]).join(", "),catlist:e=>(Pe(e).list||[]).join(", "),"br separated entries":e=>(Pe(e).list||[]).join("\n\n"),"comma separated entries":e=>(Pe(e).list||[]).join(", "),"anchored list":e=>{let t=Pe(e).list||[];return t=t.map(((e,t)=>`${t+1}. ${e}`)),t.join("\n\n")},"bulleted list":e=>{let t=Pe(e).list||[];return t=t.filter((e=>e)),t=t.map((e=>"• "+e)),t.join("\n\n")},plainlist:e=>{let t=(e=Ee(e)).split("|").slice(1);return t=t.join("|").split(/\n ?\* ?/),t=t.filter((e=>e)),t.join("\n\n")},term:e=>`${Pe(e,["term"]).term}:`,linum:e=>{let{num:t,text:i}=Pe(e,["num","text"]);return`${t}. ${i}`},"block indent":e=>{let t=Pe(e);return t[1]?"\n"+t[1]+"\n":""},lbs:e=>{let t=Pe(e,["text"]);return`[[${t.text} Lifeboat Station|${t.text}]]`},lbc:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}-class]]`},lbb:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}]]`},"#dateformat":e=>(e=e.replace(/:/,"|"),Pe(e,["date","format"]).date),lc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toLowerCase()),uc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toUpperCase()),lcfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},ucfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbrlink:e=>{let t=Pe(e,["abbr","page"]);return t.page?`[[${t.page}|${t.abbr}]]`:`[[${t.abbr}]]`},own:e=>{let t=Pe(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},formatnum:e=>{e=e.replace(/:/,"|");let t=Pe(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},frac:e=>{let t=Pe(e,["a","b","c"]);return t.c?`${t.a} ${t.b}/${t.c}`:t.b?`${t.a}/${t.b}`:`1/${t.b}`},convert:e=>{let t=Pe(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?`${t.num} ${t.two} ${t.three} ${t.four}`:`${t.num} ${t.two} ${t.three}`:`${t.num} ${t.two}`},tl:e=>{let t=Pe(e,["first","second"]);return t.second||t.first},won:e=>{let t=Pe(e,["text"]);return t.place||t.text||$t(t.template)},tag:e=>{let t=Pe(e,["tag","open"]);const i={span:!0,div:!0,p:!0};return t.open&&"pair"!==t.open?"":i[t.tag]?t.content||"":`<${t.tag} ${t.attribs||""}>${t.content||""}`},plural:e=>{e=e.replace(/plural:/,"plural|");let t=Pe(e,["num","word"]),i=Number(t.num),a=t.word;return 1!==i&&(/.y$/.test(a)?a=a.replace(/y$/,"ies"):a+="s"),i+" "+a},dec:e=>{let t=Pe(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:e=>{let t=Pe(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());let a=i||"";return t.p&&(a=t.p+a),t.s&&(a=t.s+a),(t.u||t.ul||t.upl)&&(a=a+" "+(t.u||t.ul||t.upl)),a},percentage:e=>{let t=Pe(e,["numerator","denominator","decimals"]),i=kt(t);return null===i?"":i+"%"},small:e=>{let t=Pe(e);return t.list&&t.list[0]?t.list[0]:""},"percent-done":e=>{let t=Pe(e,["done","total","digits"]),i=kt({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":`${t.done} (${i}%) done`},loop:e=>{let t=Pe(e,["times","text"]),i=Number(t.times)||0,a="";for(let e=0;e{let t=Pe(e,["text"]);return String((t.text||"").trim().length)},digits:e=>(Pe(e,["text"]).text||"").replace(/[^0-9]/g,""),resize:e=>{let{n:t,text:i}=Pe(e,["n","text"]);return i?i||"":t||""},"last word":e=>{let t=(Pe(e,["text"]).text||"").split(/ /g);return t[t.length-1]||""},replace:e=>{let t=Pe(e,["text","from","to"]);return t.from&&t.to?(t.text||"").replace(t.from,t.to):t.text||""},"title case":e=>(Pe(e,["text"]).text||"").split(/ /).map(((e,t)=>t>0&&"the"===e||"of"===e?e:$t(e))).join(" "),"no spam":e=>{let t=Pe(e,["account","domain"]);return`${t.account||""}@${t.domain}`},"baseball year":e=>{let t=Pe(e,["year"]).year||"";return`[[${t} in baseball|${t}]]`},"mlb year":e=>{let t=Pe(e,["year"]).year||"";return`[[${t} Major League Baseball season|${t}]]`},"nlds year":e=>{let{year:t}=Pe(e,["year"]);return`[[${t||""} National League Division Series|${t}]]`},"alds year":e=>{let{year:t}=Pe(e,["year"]);return`[[${t||""} American League Division Series|${t}]]`},"nfl year":e=>{let{year:t,other:i}=Pe(e,["year","other"]);return i&&t?`[[${t} NFL season|${t}]]–[[${i} NFL season|${i}]]`:`[[${t||""} NFL season|${t}]]`},"nfl playoff year":e=>{let{year:t}=Pe(e,["year"]);return t=Number(t),`[[${t}–${t+1} NFL playoffs|${t}]]`},"nba year":e=>{let{year:t}=Pe(e,["year"]);t=Number(t);let i=t+1;return`[[${t}–${i} NBA season|${t}–${i}]]`},"mhl year":e=>{let t=Pe(e,["year"]),i=Number(t.year),a=i+1;return`[[${i}–${a} NHL season|${i}–${a}]]`},min:e=>{let t=Pe(e).list||[],i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t{let t=Pe(e).list,i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t>i&&(i=t)})),String(i)},uspolabbr:e=>{let{party:t,state:i,house:a}=Pe(e,["party","state","house","link"]);if(!t||!i)return"";let n=`${t}‑${i}`;return a&&(n+=` ${xt(a)}`),n},ushr:e=>{let{state:t,num:i,type:a}=Pe(e,["state","num","type"]),n="";if("AL"!==i)return i=xt(Number(i)),`${t}'s ${i} congressional district`;if(n=`${t}'s at-large congressional district`,a){if(a=a.toLowerCase(),i="AL"===i?"At-large":i,"e"===a)return`[[${n}|${i}]]`;if("u"===a)return`[[${n}|${t}]]`;if("b"===a||"x"===a)return`[[${n}|${t} ${i}]]`}return`[[${n}]]`},metro:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},station:e=>{let{name:t,dab:i}=Pe(e,["name","x","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},bssrws:e=>{let{one:t,two:i}=Pe(e,["one","two"]),a=t;return i&&(a+=" "+i),`[[${a} railway station|${a}]]`},stnlnk:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} railway station (${i})|${t}]]`:`[[${t} railway station|${t}]]`},"station link":e=>{let{station:t,system:i}=Pe(e,["system","station"]);return t||i},"line link":e=>{let{station:t,system:i}=Pe(e,["system","station"]);return t||i},subway:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} subway station|${t}]]`},"lrt station":e=>{let{name:t}=Pe(e,["name"]);return`[[${t} LRT station|${t}]]`},"mrt station":e=>{let{name:t}=Pe(e,["name"]);return`[[${t} MRT station|${t}]]`},rht:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} railway halt|${t}]]`},ferry:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} ferry wharf|${t}]]`},tram:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} tram stop (${i})|${t}]]`:`[[${t} tram stop|${t}]]`},tstop:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} ${i} stop|${t}]]`:`[[${t} stop|${t}]]`},ship:e=>{let{prefix:t,name:i,id:a}=Pe(e,["prefix","name","id"]);return t=t||"",`[[${t.toUpperCase()} ${i}]]`},sclass:e=>{let{cl:t,type:i}=Pe(e,["cl","type","fmt"]);return`[[${t}-class ${i} |''${t}''-class]] [[${i}]]`},"center block":e=>{let{text:t}=Pe(e,["text"]);return t||""},align:e=>{let{text:t}=Pe(e,["dir","text"]);return t||""},font:e=>{let{text:t}=Pe(e,["text"]);return t||""},float:e=>{let{text:t,dir:i}=Pe(e,["dir","text"]);return t?t||"":i},lower:e=>{let{text:t,n:i}=Pe(e,["n","text"]);return t?t||"":i},splitspan:e=>{let t=Pe(e).list||[];return(t[0]||"")+"\n"+(t[1]||"")},bracket:e=>{let{text:t}=Pe(e,["text"]);return t?`[${t}]`:"["},"in title":e=>{let{title:t,text:i}=Pe(e,["title","text"]);return i||(t?`All pages with titles containing ${t}`:"")},"look from":e=>{let{title:t,text:i}=Pe(e,["title","text"]);return i||(t?`All pages with titles beginning with ${t}`:"")}};let _t={};["sr-latn-cyrl","sr-cyrl-latn","sr-latn","sr-cyrl","sr-cyr","sh-latn-cyrl","sh-cyrl-latn","sh-latn","sh-cyrl","cel-1bd","cel-x-proto","en-emodeng","de-at","de-ch","gem-x-proto","gsw-fr","nds-nl","nl-be","ku-arab","ku-cyrl","pt-br","fra-frc","fra-que","roa-leo","roa-nor","ca-valencia","ast-leo","grc-gre","grc-x-doric","grc-x-proto","grc-x-medieval","cpg","gmy","grc","grk-x-proto","pnt","mga","owl","pgl","sga","wlm","xbm","xcb","xcg","xpi","aae","aln","sq-definite","bs-cyrl","hsb","ltg","orv","prg","rsk","rue","rus","sgs","sla","szl","wen","aoa","chn","cri","dlm","egl","fax","frc","frm","fro","fr-gallo","oc-gascon","gcf","gcr","ist","la-x-medieval","lij-mc","lld","lou","mfe","mol","mwl","mxi","nrf","osc","osp","pcd","pln","rcf","rgn","roa","ruo","rup","ruq","sdc","sdn","src","sro","xvo","bzj","cim","dum","enm","frk","frr","frs","gmh","gml","gmw","goh","gos","gsw","gyn","icr","jam","kri","lng","nb","non","nrn","odt","ofs","osx","pey","sli","srm","srn","stq","swg","vmf","wae","wep","wes","zea","hmd","hoc","kha","mnw","mtq","vi-chunom","vi-hantu","mvi","rys","ryu","yoi","ace","akl","ami","bew","bik","bjn","bya","cal","cbk","cjm","coa","cyo","dev","fil","gad","hil","iba","ibg","ibl","ilp","itv","ivv","jax","kne","krj","kxd","ljp","mad","mak","mdh","mrv","mrw","ms-arab","nia","niu","pau","pwn","rap","rar","sgd","su-fonts","szy","tao","tkl","tsg","tvl","uli","wls","xsb","yap","yka","ckt","itl","brh","oty","tcy","abq","ady","ddo","inh","kbd","lbe","lez","rut","tab","uby","udi","bai","bin","bsq","dag","dyu","efi","fan","fmp","fuc","fuf","gaa","ibb","kbp","kcg","kpo","ktu","lu","lua","lun","mkw","mos","oaa","sjo","ude","anm","bft","blk","brx","dng","kjp","kjz","ksw","lbj","lus","aae","aaq","abe","abq","aca","ace","acf","acm","acw","ady","ae","aeb","aec","aer","afb","aht","aii","aij","ain","aiq","akk","akl","akz","ale","aln","alq","alt","ami","anm","aoa","apj","apm","apw","ayn","arb","arh","ari","arn","arp","arq","ary","arz","asb","ath","ats","awa","axm","azb","azd","azj","bai","bal","ban","bax","bdz","bea","ber","bew","bft","bgn","bho","bik","bin","bjn","bla","blc","blk","bqi","brh","brx","bsk","bsq","bua","bvb","bya","bzj","cal","cay","cbk","ccp","chg","chm","chn","chp","cic","cim","ciw","cjm","cjs","ckb","ckt","cku","cld","clm","cmg","cmn","cms","cnu","coa","coc","coj","com","coo","cop","cpg","crg","crh","cri","crj","crk","crl","crm","cro","csw","csz","ctg","ctm","cyo","dag","dak","ddo","deh","del","den","dev","din","dlm","dng","dum","dyu","efi","egl","egy","elx","eml","ems","cmn","och","yue","mjw","mni","my-name-mlcts","nan","nwc","omp","otb","pwo","sip","xct","xsr","1ca","alt","az-arab","azb","azj","chg","cjs","crh","crh3","kaa","kjh","krc","kum","nog","ota","otk","sah","slr","sty","tt-arab","tt-cyrl","tt-latn","tyv","uniturk","chm","est-sea","fit","fkv","izh","jmy","koi","krl","liv","mdf","mhr","mrj","myv","olo","sia","sjd","sje","sjk","sjt","sju","sma","smi","smj","smn","sms","vep","vot","vro","yrk","din","luo","srr","sus","swh","umb","yao"].forEach((e=>{_t["lang-"+e]=0})),Object.keys(O).forEach((e=>{_t["lang-"+e]=0}));var zt=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","us","united states"],["🇺🇸","usa","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]];const Ot=["flag","variant"];let Et={flag:e=>{let t=Pe(e,Ot),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();let a=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${a[0]||""} [[${a[2]}|${i}]]`},flagcountry:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} [[${i[2]}]]`},flagcu:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} ${i[2]}`},flagicon:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`[[${i[2]}|${i[0]}]]`:""},flagdeco:e=>{let t=Pe(e,Ot);return t.flag=(t.flag||"").toLowerCase(),(zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[])[0]||""},fb:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${i[2]} national football team|${i[2]}]]`:""},fbicon:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?` [[${i[2]} national football team|${i[0]}]]`:""},flagathlete:e=>{let t=Pe(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${t.name||""}]] (${i[1].toUpperCase()})`:`[[${t.name||""}]]`}};zt.forEach((e=>{Et[e[1]]=()=>e[0]}));let qt={};["rh","rh2","yes","no","maybe","eliminated","lost","safe","active","site active","coming soon","good","won","nom","sho","longlisted","tba","success","operational","failure","partial","regional","maybecheck","partial success","partial failure","okay","yes-no","some","nonpartisan","pending","unofficial","unofficial2","usually","rarely","sometimes","any","varies","black","non-album single","unreleased","unknown","perhaps","depends","included","dropped","terminated","beta","table-experimental","free","proprietary","nonfree","needs","nightly","release-candidate","planned","scheduled","incorrect","no result","cmain","calso starring","crecurring","cguest","not yet","optional"].forEach((e=>{qt[e]=e=>{let t=Pe(e,["text"]);return t.text||$t(t.template)}}));[["active fire","Active"],["site active","Active"],["site inactive","Inactive"],["yes2",""],["no2",""],["ya","✅"],["na","❌"],["nom","Nominated"],["sho","Shortlisted"],["tba","TBA"],["maybecheck","✔️"],["okay","Neutral"],["n/a","N/A"],["sdash","—"],["dunno","?"],["draw",""],["cnone",""],["nocontest",""]].forEach((e=>{qt[e[0]]=t=>Pe(t,["text"]).text||e[1]}));var Nt=Object.assign({},gt,bt,ft,jt,_t,Et,qt);let St={};["goodreads author","twitter","facebook","instagram","tumblr","pinterest","espn nfl","espn nhl","espn fc","hockeydb","fifa player","worldcat","worldcat id","nfl player","ted speaker","playmate"].forEach((e=>{St[e]=["id","name"]}));let Ct={};["imdb title","imdb name","imdb episode","imdb event","afi film","allmovie title","allgame","tcmdb title","discogs artist","discogs label","discogs release","discogs master","librivox author","musicbrainz artist","musicbrainz label","musicbrainz recording","musicbrainz release","musicbrainz work","youtube","goodreads book","dmoz"].forEach((e=>{Ct[e]=["id","title","description","section"]}));var Lt={ipa:(e,t)=>{let i=Pe(e,["transcription","lang","audio"]);return i.lang=yt(i.template),i.template="ipa",t.push(i),""},ipac:(e,t)=>{let i=Pe(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=yt(i.template),i.template="ipac",t.push(i),""},quote:(e,t)=>{let i=Pe(e,["text","author"]);if(t.push(i),i.text){let e=`"${i.text}"`;return i.author&&(e+="\n\n",e+=` - ${i.author}`),e+"\n"}return""},"cite gnis":(e,t)=>{let i=Pe(e,["id","name","type"]);return i.type="gnis",i.template="citation",t.push(i),""},"spoken wikipedia":(e,t)=>{let i=Pe(e,["file","date"]);return i.template="audio",t.push(i),""},yel:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`yellow: ${i.min||""}'`:""},subon:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub on: ${i.min||""}'`:""},suboff:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub off: ${i.min||""}'`:""},sfn:(e,t,i,a)=>{let n=Pe(e,["author","year","location"]);return a&&(n.name=n.template,n.teplate=a),t.push(n),""},redirect:(e,t)=>{let i=Pe(e,["redirect"]),a=i.list||[],n=[];for(let e=0;e{let i=Pe(e),a={};Object.keys(vt).forEach((e=>{!0===i.hasOwnProperty(e)&&(a[vt[e]]=i[e])}));let n={template:"sister project links",links:a};return t.push(n),""},"subject bar":(e,t)=>{let i=Pe(e);Object.keys(i).forEach((e=>{vt.hasOwnProperty(e)&&(i[vt[e]]=i[e],delete i[e])}));let a={template:"subject bar",links:i};return t.push(a),""},gallery:(e,t)=>{let i=Pe(e),a=(i.list||[]).filter((e=>/^ *File ?:/.test(e)));return a=a.map((e=>new _({file:e}).json())),i={template:"gallery",images:a},t.push(i),""},sky:(e,t)=>{let i=Pe(e,["asc_hours","asc_minutes","asc_seconds","dec_sign","dec_degrees","dec_minutes","dec_seconds","distance"]),a={template:"sky",ascension:{hours:i.asc_hours,minutes:i.asc_minutes,seconds:i.asc_seconds},declination:{sign:i.dec_sign,degrees:i.dec_degrees,minutes:i.dec_minutes,seconds:i.dec_seconds},distance:i.distance};return t.push(a),""},"medical cases chart":(e,t)=>{let i=["date","deathsExpr","recoveriesExpr","casesExpr","4thExpr","5thExpr","col1","col1Change","col2","col2Change"],a=Pe(e);a.data=a.data||"";let n=a.data.split("\n").map((e=>{let t=e.split(";"),a={options:new Map},n=0;for(let e=0;e{let i=Pe(e);i.x&&(i.x=i.x.split(",").map((e=>e.trim()))),i.y&&(i.y=i.y.split(",").map((e=>e.trim())));let a=1;for(;i["y"+a];)i["y"+a]=i["y"+a].split(",").map((e=>e.trim())),a+=1;return t.push(i),""},"historical populations":(e,t)=>{let i=Pe(e);i.list=i.list||[];let a=[];for(let e=0;e{const i=/^jan /i,a=/^year /i;let n=Pe(e);const r=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];let o={},s=Object.keys(n).filter((e=>i.test(e)));s=s.map((e=>e.replace(i,""))),s.forEach((e=>{o[e]=[],r.forEach((t=>{let i=`${t} ${e}`;if(n.hasOwnProperty(i)){let t=wt(n[i]);delete n[i],o[e].push(t)}}))})),n.byMonth=o;let l={};return Object.keys(n).forEach((e=>{if(a.test(e)){let t=e.replace(a,"");l[t]=n[e],delete n[e]}})),n.byYear=l,t.push(n),""},"weather box/concise c":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>wt(e))),i.byMonth={"high c":i.list.slice(0,12),"low c":i.list.slice(12,24),"rain mm":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"weather box/concise f":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>wt(e))),i.byMonth={"high f":i.list.slice(0,12),"low f":i.list.slice(12,24),"rain inch":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"climate chart":(e,t)=>{let i=Pe(e).list||[],a=i[0],n=i[38];i=i.slice(1),i=i.map((e=>(e&&"−"===e[0]&&(e=e.replace(/−/,"-")),e)));let r=[];for(let e=0;e<36;e+=3)r.push({low:wt(i[e]),high:wt(i[e+1]),precip:wt(i[e+2])});let o={template:"climate chart",data:{title:a,source:n,months:r}};return t.push(o),""},medalcount:(e,t)=>{let i=Pe(e).list||[],a=[];for(let e=0;e{let i=Pe(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},legend:(e,t)=>{let i=Pe(e,["color","label"]);return t.push(i),e},isbn:(e,t)=>{let i=Pe(e,["id","id2","id3"]);return t.push(i),"ISBN "+(i.id||"")},"based on":(e,t)=>{let i=Pe(e,["title","author"]);return t.push(i),`${i.title} by ${i.author||""}`},"bbl to t":(e,t)=>{let i=Pe(e,["barrels"]);return t.push(i),"0"===i.barrels?i.barrels+" barrel":i.barrels+" barrels"},mpc:(e,t)=>{let i=Pe(e,["number","text"]);return t.push(i),`[https://minorplanetcenter.net/db_search/show_object?object_id=P/2011+NO1 ${i.text||i.number}]`},pengoal:(e,t)=>(t.push({template:"pengoal"}),"✅"),penmiss:(e,t)=>(t.push({template:"penmiss"}),"❌"),"ordered list":(e,t)=>{let i=Pe(e);return t.push(i),i.list=i.list||[],i.list.map(((e,t)=>`${t+1}. ${e}`)).join("\n\n")},"title year":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b[0-9]{4}\b/);if(e)return e[0]}return r.nomatch||""},"title century":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)(st|nd|rd|th)\b/);if(e)return e[1]||""}return r.nomatch||""},"title decade":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)s\b/);if(e)return e[1]||""}return r.nomatch||""},nihongo:(e,t)=>{let i=Pe(e,["english","kanji","romaji","extra"]);t.push(i);let a=i.english||i.romaji||"";return i.kanji&&(a+=` (${i.kanji})`),a},marriage:(e,t)=>{let i=Pe(e,["spouse","from","to","end"]);t.push(i);let a=i.spouse||"";return i.from&&(i.to?a+=` (m. ${i.from}-${i.to})`:a+=` (m. ${i.from})`),a},"sent off":(e,t)=>{let i=Pe(e,["cards"]),a={template:"sent off",cards:i.cards,minutes:i.list||[]};return t.push(a),"sent off: "+a.minutes.map((e=>e+"'")).join(", ")},transl:(e,t)=>{let i=Pe(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""},"collapsible list":(e,t)=>{let i=Pe(e);t.push(i);let a="";if(i.title&&(a+=`'''${i.title}'''\n\n`),!i.list){i.list=[];for(let e=1;e<10;e+=1)i[e]&&(i.list.push(i[e]),delete i[e])}return i.list=i.list.filter((e=>e)),a+=i.list.join("\n\n"),a},"columns-list":(e,t)=>{let i=((Pe(e).list||[])[0]||"").split(/\n/).filter((e=>e));return i=i.map((e=>e.replace(/\*/,""))),t.push({template:"columns-list",list:i}),i=i.map((e=>"• "+e)),i.join("\n\n")},height:(e,t)=>{let i=Pe(e);t.push(i);let a=[];return["m","cm","ft","in"].forEach((e=>{!0===i.hasOwnProperty(e)&&a.push(i[e]+e)})),a.join(" ")},sic:(e,t)=>{let i=Pe(e,["one","two","three"]),a=(i.one||"")+(i.two||"");return"?"===i.one&&(a=(i.two||"")+(i.three||"")),t.push({template:"sic",word:a}),"y"===i.nolink?a:`${a} [sic]`},inrconvert:(e,t)=>{let i=Pe(e,["rupee_value","currency_formatting"]);t.push(i);const a={k:1e3,m:1e6,b:1e9,t:1e12,l:1e5,c:1e7,lc:1e12};if(i.currency_formatting){let e=a[i.currency_formatting]||1;i.rupee_value=i.rupee_value*e}return`inr ${i.rupee_value||""}`},frac:(e,t)=>{let i=Pe(e,["a","b","c"]),a={template:"sfrac"};return i.c?(a.integer=i.a,a.numerator=i.b,a.denominator=i.c):i.b?(a.numerator=i.a,a.denominator=i.b):(a.numerator=1,a.denominator=i.a),t.push(a),a.integer?`${a.integer} ${a.numerator}⁄${a.denominator}`:`${a.numerator}⁄${a.denominator}`},"winning percentage":(e,t)=>{let i=Pe(e,["wins","losses","ties"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=Number(i.ties)||0,o=a+n+r;"y"===i.ignore_ties&&(r=0),r&&(a+=r/2);let s=kt({numerator:a,denominator:o,decimals:1});return null===s?"":"."+10*s},winlosspct:(e,t)=>{let i=Pe(e,["wins","losses"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=kt({numerator:a,denominator:a+n,decimals:1});return null===r?"":`${a||0} || ${n||0} || ${"."+10*r||"-"}`},"video game release":(e,t)=>{let i=["region","date","region2","date2","region3","date3","region4","date4"],a=Pe(e,i),n={template:"video game release",releases:[]};for(let e=0;e`${e.region}: ${e.date||""}`)).join("\n\n")+"\n"},uss:(e,t)=>{let i=Pe(e,["name","id"]);return t.push(i),i.id?`[[USS ${i.name} (${i.id})|USS ''${i.name}'' (${i.id})]]`:`[[USS ${i.name}|USS ''${i.name}'']]`},blockquote:(e,t)=>{let i=Pe(e,["text","author","title","source","character"]);t.push(i);let a=i.text;a||(i.list=i.list||[],a=i.list[0]||"");let n=a.replace(/"/g,"'");return n='"'+n+'"',n}};const It={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},Mt=(e,t)=>{let i=Pe(e,["amount","code"]);t.push(i);let a=i.template||"";"currency"===a?(a=i.code,a||(i.code=a="usd")):""!==a&&"monnaie"!==a&&"unité"!==a&&"nombre"!==a&&"nb"!==a||(a=i.code),a=(a||"").toLowerCase(),"us"===a?i.code=a="usd":"uk"===a&&(i.code=a="gbp");let n=`${It[a]||""}${i.amount||""}`;return i.code&&!It[i.code.toLowerCase()]&&(n+=" "+i.code),n};let Rt={currency:Mt};Object.keys(It).forEach((e=>{Rt[e]=Mt}));const Ut=864e5,Ft=30*Ut,Bt=365*Ut,Kt=function(e){return new Date(`${e.year}-${e.month||0}-${e.date||1}`).getTime()},Wt=function(e,t){e=Kt(e);let i=(t=Kt(t))-e,a={},n=Math.floor(i/Bt);n>0&&(a.years=n,i-=a.years*Bt);let r=Math.floor(i/Ft);r>0&&(a.months=r,i-=a.months*Ft);let o=Math.floor(i/Ut);return o>0&&(a.days=o),a},Ht=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Yt=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],Zt=Yt.reduce(((e,t,i)=>(0===i||(e[t.toLowerCase()]=i,e[t.substring(0,3).toLowerCase()]=i),e)),{}),Gt=function(e){let t={},i=["year","month","date","hour","minute","second"];for(let a=0;a{let i=Pe(e,["year","month","date","hour","minute","second","timezone"]),a=Gt([i.year,i.month,i.date||i.day]);return i.text=Jt(a),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=` (${i.timezone})`),i.hour&&i.minute&&(i.second?i.text=`${i.hour}:${i.minute}:${i.second}, `+i.text:i.text=`${i.hour}:${i.minute}, `+i.text),i.text&&t.push(Xt(i)),i.text},natural_date:(e,t)=>{let i=Pe(e,["text"]).text||"",a={};if(/^[0-9]{4}$/.test(i))a.year=parseInt(i,10);else{let e=i.replace(/[a-z]+\/[a-z]+/i,"");e=e.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");let t=new Date(e);!1===isNaN(t.getTime())&&(a.year=t.getFullYear(),a.month=t.getMonth()+1,a.date=t.getDate())}return t.push(Xt(a)),i.trim()},one_year:(e,t)=>{let i=Pe(e,["year"]),a=Number(i.year);return t.push(Xt({year:a})),String(a)},two_dates:(e,t)=>{let i=Pe(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){let e=Gt([i.birth_year,i.birth_month,i.birth_date]);return t.push(Xt(e)),Jt(e)}let a=Gt([i.death_year,i.death_month,i.death_date]);return t.push(Xt(a)),Jt(a)},age:e=>{let t=Qt(e);return Wt(t.from,t.to).years||0},"diff-y":e=>{let t=Qt(e),i=Wt(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),a.join(", ")},"diff-ymd":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-yd":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-d":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")}},ti=["January","February","March","April","May","June","July","August","September","October","November","December"];var ii={currentday:()=>{let e=new Date;return String(e.getDate())},currentdayname:()=>{let e=new Date;return Ht[e.getDay()]},currentmonth:()=>{let e=new Date;return ti[e.getMonth()]},currentyear:()=>{let e=new Date;return String(e.getFullYear())},monthyear:()=>{let e=new Date;return ti[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":()=>{let e=new Date;return e.setMonth(e.getMonth()-1),ti[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":()=>{let e=new Date;return e.setMonth(e.getMonth()+1),ti[e.getMonth()]+" "+e.getFullYear()},year:e=>{let t=Pe(e,["date"]).date,i=new Date(t);return t&&!1===isNaN(i.getTime())?String(i.getFullYear()):""},"time ago":e=>function(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let i=(new Date).getTime()-t.getTime(),a="ago";i<0&&(a="from now",i=Math.abs(i));let n=i/1e3/60/60/24;return n<365?Number(n)+" days "+a:Number(n/365)+" years "+a}(Pe(e,["date","fmt"]).date),"birth date and age":(e,t)=>{let i=Pe(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?ei.natural_date(e,t):(t.push(i),i=Gt([i.year,i.month,i.day]),Jt(i))},"birth year and age":(e,t)=>{let i=Pe(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return ei.natural_date(e,t);t.push(i);let a=(new Date).getFullYear()-parseInt(i.birth_year,10);i=Gt([i.birth_year,i.birth_month]);let n=Jt(i);return a&&(n+=` (age ${a})`),n},"death year and age":(e,t)=>{let i=Pe(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?ei.natural_date(e,t):(t.push(i),i=Gt([i.death_year,i.death_month]),Jt(i))},"birth date and age2":(e,t)=>{let i=Pe(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=Gt([i.birth_year,i.birth_month,i.birth_day]),Jt(i)},"birth based on age as of date":(e,t)=>{let i=Pe(e,["age","year","month","day"]);t.push(i);let a=parseInt(i.age,10),n=parseInt(i.year,10)-a;return n&&a?`${n} (age ${i.age})`:`(age ${i.age})`},"death date and given age":(e,t)=>{let i=Pe(e,["year","month","day","age"]);t.push(i),i=Gt([i.year,i.month,i.day]);let a=Jt(i);return i.age&&(a+=` (age ${i.age})`),a},dts:e=>{e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");let t=Pe(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},time:()=>{let e=new Date,t=Gt([e.getFullYear(),e.getMonth(),e.getDate()]);return Jt(t)},millennium:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/1e3)+1,t.abbr&&"y"===t.abbr?i<0?`${xt(Math.abs(i))} BC`:`${xt(i)}`:`${xt(i)} millennium`},start:ei.date,"start-date":ei.natural_date,birthdeathage:ei.two_dates,age:ei.age,"age nts":ei.age,"age in years":ei["diff-y"],"age in years and months":ei["diff-ym"],"age in years, months and days":ei["diff-ymd"],"age in years and days":ei["diff-yd"],"age in days":ei["diff-d"]};function ai(e){let t=e.pop(),i=Number(e[0]||0),a=Number(e[1]||0),n=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;let r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+a/60+n/3600)}const ni=function(e){if("number"!=typeof e)return e;let t=1e5;return Math.round(e*t)/t},ri={s:!0,w:!0},oi=function(e){let t=Pe(e);t=function(e){return e.list=e.list||[],e.list=e.list.map((t=>{let i=Number(t);if(!isNaN(i))return i;let a=t.split(/:/);return a.length>1?(e.props=e.props||{},e.props[a[0]]=a.slice(1).join(":"),null):t})),e.list=e.list.filter((e=>null!==e)),e}(t);let i=function(e){const t=e.map((e=>typeof e)).join("|");return 2===e.length&&"number|number"===t?{lat:e[0],lon:e[1]}:4===e.length&&"number|string|number|string"===t?(ri[e[1].toLowerCase()]&&(e[0]*=-1),"w"===e[3].toLowerCase()&&(e[2]*=-1),{lat:e[0],lon:e[2]}):6===e.length?{lat:ai(e.slice(0,3)),lon:ai(e.slice(3))}:8===e.length?{lat:ai(e.slice(0,4)),lon:ai(e.slice(4))}:{}}(t.list);return t.lat=ni(i.lat),t.lon=ni(i.lon),t.template="coord",delete t.list,t},si={coord:(e,t)=>{let i=oi(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":`${i.lat||""}°N, ${i.lon||""}°W`}},li=function(e,t,i,a){let n=Pe(e);return a&&(n.name=n.template,n.template=a),t.push(n),""},ci={persondata:li,taxobox:li,citation:li,portal:li,reflist:li,"cite book":li,"cite journal":li,"cite web":li,"commons cat":li,"election box candidate":li,"election box begin":li,main:li},ui={adx:"adx",aim:"aim",amex:"amex",asx:"asx",athex:"athex",b3:"b3","B3 (stock exchange)":"B3 (stock exchange)",barbadosse:"barbadosse",bbv:"bbv",bcba:"bcba",bcs:"bcs",bhse:"bhse",bist:"bist",bit:"bit","bm&f bovespa":"b3","bm&f":"b3",bmad:"bmad",bmv:"bmv","bombay stock exchange":"bombay stock exchange","botswana stock exchange":"botswana stock exchange",bpse:"bpse",bse:"bse",bsx:"bsx",bvb:"bvb",bvc:"bvc",bvl:"bvl",bvpasa:"bvpasa",bwse:"bwse","canadian securities exchange":"canadian securities exchange",cse:"cse",darse:"darse",dfm:"dfm",dse:"dse",euronext:"euronext",euronextparis:"euronextparis",fse:"fse",fwb:"fwb",gse:"gse",gtsm:"gtsm",idx:"idx",ise:"ise",iseq:"iseq",isin:"isin",jasdaq:"jasdaq",jse:"jse",kase:"kase",kn:"kn",krx:"krx",lse:"lse",luxse:"luxse","malta stock exchange":"malta stock exchange",mai:"mai",mcx:"mcx",mutf:"mutf",myx:"myx",nag:"nag","nasdaq dubai":"nasdaq dubai",nasdaq:"nasdaq",neeq:"neeq",nepse:"nepse",nex:"nex",nse:"nse",newconnect:"newconnect","nyse arca":"nyse arca",nyse:"nyse",nzx:"nzx","omx baltic":"omx baltic",omx:"omx",ose:"ose","otc expert":"otc expert","otc grey":"otc grey","otc pink":"otc pink",otcqb:"otcqb",otcqx:"otcqx","pfts ukraine stock exchange":"pfts ukraine stock exchange","philippine stock exchange":"philippine stock exchange",prse:"prse",psx:"psx",karse:"karse",qe:"qe","saudi stock exchange":"saudi stock exchange",sehk:"sehk","Stock Exchange of Thailand":"Stock Exchange of Thailand",set:"set",sgx:"sgx",sse:"sse",swx:"swx",szse:"szse",tase:"tase","tsx-v":"tsx-v",tsx:"tsx",tsxv:"tsxv",ttse:"ttse",twse:"twse",tyo:"tyo",wbag:"wbag",wse:"wse","zagreb stock exchange":"zagreb stock exchange","zimbabwe stock exchange":"zimbabwe stock exchange",zse:"zse"},mi=(e,t)=>{let i=Pe(e,["ticketnumber","code"]);t.push(i);let a=i.template||"";""===a&&(a=i.code),a=(a||"").toLowerCase();let n=ui[a]||"";return i.ticketnumber&&(n=`${n}: ${i.ticketnumber}`),i.code&&!ui[i.code.toLowerCase()]&&(n+=" "+i.code),n},pi={};Object.keys(ui).forEach((e=>{pi[e]=mi}));const di=function(e){return 1===(e=String(e)).length&&(e="0"+e),e},hi=function(e,t,i){e[`rd${t}-team${di(i)}`]&&(i=di(i));let a=e[`rd${t}-score${i}`],n=Number(a);return!1===isNaN(n)&&(a=n),{team:e[`rd${t}-team${i}`],score:a,seed:e[`rd${t}-seed${i}`]}},gi=function(e){let t=[],i=Pe(e);for(let e=1;e<7;e+=1){let a=[];for(let t=1;t<16;t+=2){let n=`rd${e}-team`;if(!i[n+t]&&!i[n+di(t)])break;{let n=hi(i,e,t),r=hi(i,e,t+1);a.push([n,r])}}a.length>0&&t.push(a)}return{template:"playoffbracket",rounds:t}};let bi={"4teambracket":function(e,t){let i=gi(e);return t.push(i),""},player:(e,t)=>{let i=Pe(e,["number","country","name","dl"]);t.push(i);let a=`[[${i.name}]]`;if(i.country){let e=(i.country||"").toLowerCase(),t=zt.find((t=>e===t[1]||e===t[2]))||[];t&&t[0]&&(a=t[0]+" "+a)}return i.number&&(a=i.number+" "+a),a},goal:(e,t)=>{let i={template:"goal",data:[]},a=Pe(e).list||[];for(let e=0;e{let t=e.note;return t&&(t=` (${t})`),e.min+"'"+t})).join(", "),n},"sports table":(e,t)=>{let i=Pe(e),a={};Object.keys(i).filter((e=>/^team[0-9]/.test(e))).map((e=>i[e].toLowerCase())).forEach((e=>{a[e]={name:i[`name_${e}`],win:Number(i[`win_${e}`])||0,loss:Number(i[`loss_${e}`])||0,tie:Number(i[`tie_${e}`])||0,otloss:Number(i[`otloss_${e}`])||0,goals_for:Number(i[`gf_${e}`])||0,goals_against:Number(i[`ga_${e}`])||0}}));let n={date:i.update,header:i.table_header,teams:a};t.push(n)},"cbb roster/header":function(){return'{| class="wikitable"\n |-\n ! POS\n ! #\n ! Name\n ! Height\n ! Weight\n ! Year\n ! Previous School\n ! Hometown\n |-\n'},"cbb roster/player":function(e,t){let i=Pe(e);return t.push(i),`|-\n| ${i.pos||""}\n| ${i.num||""}\n| ${i.first||""} ${i.last||""}\n| ${i.ft||""}${i.in||""}\n| ${i.lbs||""}\n| ${i.class||""}\n| ${i.high_school||""}\n| ${i.home||""}\n`},"cbb roster/footer":function(){return"\n|}"}};var fi=Object.assign({},Tt,Dt,Rt,ii,si,ci,pi,gi,bi);let ki=Object.assign({},Nt,Pt,fi);Object.keys(dt).forEach((e=>{ki[e]=ki[dt[e]]}));const wi=["0","1","2","3","4","5","6","7","8","9"],yi=function(e,t){let i=e.name;if(!0===ot.hasOwnProperty(i))return[""];if(!0===function(e){return!0===st.hasOwnProperty(e)||!!lt.test(e)||!(!ct.test(e)&&!ut.test(e))||!!mt.test(e)}(i)){let t=Pe(e.body,[],"raw");return["",pt(t)]}if(!0===/^cite [a-z]/.test(i)){let t=Pe(e.body);return t.type=t.template,t.template="citation",["",t]}if(!0===ki.hasOwnProperty(i)){if("number"==typeof ki[i]){return[Pe(e.body,wi)[String(ki[i])]||""]}if("string"==typeof ki[i])return[ki[i]];if(!0===o(ki[i])){return["",Pe(e.body,ki[i])]}if(!0===((a=ki[i])&&"[object Object]"===Object.prototype.toString.call(a))){let t=Pe(e.body,ki[i].props);return[t[ki[i].out],t]}if("function"==typeof ki[i]){let a=[];return[ki[i](e.body,a,Pe,null,t),a[0]]}}var a;if(t&&t._templateFallbackFn){let i=[],a=t._templateFallbackFn(e.body,i,Pe,null,t);if(null!==a)return[a,i[0]]}let n=Pe(e.body);return 0===Object.keys(n).length&&(n=null),["",n]},$i=(e="")=>(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim(),xi=function(e,t){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},vi={type:function(){return this._type},links:function(e){let t=[];if(Object.keys(this.data).forEach((e=>{this.data[e].links().forEach((e=>t.push(e)))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},image:function(){let e=this.data.image||this.data.image2||this.data.logo||this.data.image_skyline||this.data.image_flag;if(!e)return null;let t=e.json(),i=t.text;return t.file=i,t.text="",t.caption=this.data.caption,t.domain=this.domain,new _(t)},get:function(e){let t=Object.keys(this.data);if("string"==typeof e){let i=$i(e);for(let e=0;e{for(let i=0;i(e.data[i]&&(t[i]=e.data[i].json()),t)),{});return!0===t.encode&&(i=W(i)),i}(this,e=e||{})},wikitext:function(){return this.wiki||""},keyValue:function(){return Object.keys(this.data).reduce(((e,t)=>(this.data[t]&&(e[t]=this.data[t].text()),e)),{})}};Object.keys(vi).forEach((e=>{xi.prototype[e]=vi[e]})),xi.prototype.data=xi.prototype.keyValue,xi.prototype.template=xi.prototype.type,xi.prototype.images=xi.prototype.image;const ji=function(e,t){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},_i={title:function(){let e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){let t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},text:function(){return""},wikitext:function(){return this.wiki||""},json:function(e={}){let t=this.data||{};return!0===e.encode&&(t=Object.assign({},t),t=W(t)),t}};Object.keys(_i).forEach((e=>{ji.prototype[e]=_i[e]}));const zi={text:function(){return se(this._text||"").text()},json:function(){return this.data||{}},wikitext:function(){return this.wiki||""}},Oi=function(e,t="",i=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_text",{enumerable:!1,value:t}),Object.defineProperty(this,"wiki",{enumerable:!1,value:i})};Object.keys(zi).forEach((e=>{Oi.prototype[e]=zi[e]}));const Ei=/^(cite |citation)/i,qi={citation:!0,refn:!0,harvnb:!0,source:!0},Ni=function(e,t){let{list:i,wiki:a}=function(e,t){let i=[],a=rt(e);const n=function(a,r){a.parent=r,a.children&&a.children.length>0&&a.children.forEach((e=>n(e,a)));let[o,s]=yi(a,t);a.wiki=o,s&&i.push({name:a.name,wiki:a.body,nested:Boolean(a.parent),text:o,json:s});const l=function(e,t,i){e.parent&&(e.parent.body=e.parent.body.replace(t,i),l(e.parent,t,i))};l(a,a.body,a.wiki),e=e.replace(a.body,a.wiki)};return a.forEach((e=>n(e,null))),a.forEach((t=>{e=e.replace(t.body,t.wiki)})),{list:i,wiki:e}}(e._wiki,t),n=t?t._domain:null,{infoboxes:r,references:o,templates:s}=function(e,t){let i={infoboxes:[],templates:[],references:[]};return e.forEach((e=>{let a=e.json,n=a.template||a.type||a.name;if(!0!==qi[n]&&!0!==Ei.test(n))return"infobox"===a.template&&"yes"!==a.subbox?(a.domain=t,a.data=a.data||{},void i.infoboxes.push(new xi(a,e.wiki))):void i.templates.push(new Oi(a,e.text,e.wiki));i.references.push(new ji(a,e.wiki))})),i}(i,n);e._infoboxes=e._infoboxes||[],e._references=e._references||[],e._templates=e._templates||[],e._infoboxes=e._infoboxes.concat(r),e._references=e._references.concat(o),e._templates=e._templates.concat(s),e._wiki=a},Si=function(e){return/^ *\{\{ *(cite|citation)/i.test(e)&&/\}\} *$/.test(e)&&!1===/citation needed/i.test(e)},Ci=function(e){let t=Pe(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Li=function(e){return{template:"citation",type:"inline",data:{},inline:se(e)||{}}},Ai=function(e){let t=[],i=e._wiki;i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Si(a)){let n=Ci(a);n&&t.push({json:n,wiki:e}),i=i.replace(a,"")}else t.push({json:Li(a),wiki:e});return" "})),i=i.replace(/ ?]{0,200}?\/> ?/gi," "),i=i.replace(/ ?]{0,200}>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Si(a)){let e=Ci(a);e&&t.push({json:e,wiki:a}),i=i.replace(a,"")}else t.push({json:Li(a),wiki:e});return" "})),i=i.replace(/ ?<[ /]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ /]?> ?/g," "),e._references=t.map((e=>new ji(e.json,e.wiki))),e._wiki=i},Pi={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]};let Ti=["res","record","opponent","method","event","date","round","time","location","notes"];const Di=function(e,t){const i={templates:[],text:e._wiki};var a;return function(e,t){e.text=e.text.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(i=>{let a={_wiki:i,_templates:[]};Ni(a,t);let n=a._templates.map((e=>e.json())),r=n.find((e=>"election box"===e.template))||{},o=n.filter((e=>"election box candidate"===e.template)),s=n.find((e=>"election box gain"===e.template||"election box hold"===e.template))||{};return(o.length>0||s)&&e.templates.push({template:"election box",title:r.title,candidates:o,summary:s.data}),""}))}(i,t),function(e,t,i){e.text=e.text.replace(/]*)>([\s\S]+)<\/gallery>/g,((a,n,r)=>{let o=r.split(/\n/g);return o=o.filter((e=>e&&""!==e.trim())),o=o.map((e=>{let i=e.split(/\|/),a={file:i[0].trim(),lang:t.lang(),domain:t.domain()},n=new _(a).json(),r=i.slice(1).join("|");return""!==r&&(n.caption=se(r)),n})),o.length>0&&e.templates.push({template:"gallery",images:o,pos:i.title}),""}))}(i,t,e),(a=i).text=a.text.replace(/]*)>([\s\S]*?)<\/math>/g,((e,t,i)=>{let n=se(i).text();return a.templates.push({template:"math",formula:n,raw:i}),n&&n.length<12?n:""})),a.text=a.text.replace(/]*)>([\s\S]*?)<\/chem>/g,((e,t,i)=>(a.templates.push({template:"chem",data:i}),""))),function(e){e.text=e.text.replace(/\{\{mlb game log /gi,"{{game log "),e.text=e.text.replace(/\{\{game log (section|month)[\s\S]+?\{\{game log (section|month) end\}\}/gi,(t=>{let i=function(e){let t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{game log (section|month) end\}\}/i,"");let a="! "+i.join(" !! "),n=be("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mlb game log section",data:n}),""}))}(i),function(e){e.text=e.text.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(t=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");let i="! "+Ti.join(" !! "),a=be("{|\n"+i+"\n"+t+"\n|}");return a=a.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mma record start",data:a}),""}))}(i),function(e){e.text=e.text.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,((t,i)=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();let a="! "+Pi[i].join(" !! "),n=be("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"NBA "+i+" statistics",data:n}),""}))}(i),i.templates=i.templates.map((e=>new Oi(e))),i},Ii={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0};class Mi{constructor(e,t){let i={doc:t,title:e.title||"",depth:e.depth,wiki:e.wiki||"",templates:[],tables:[],infoboxes:[],references:[],paragraphs:[]};Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})}));const a=Di(this,t);this._wiki=a.text,this._templates=this._templates.concat(a.templates),Ai(this),Ni(this,t),function(e){let t=[],i=e._wiki,a=i.split("\n"),n=[];for(let e=0;e0&&(n[n.length-1]+="\n"+a[e]);else{n[n.length-1]+="\n"+a[e];let i=n.pop();t.push(i)}else n.push(a[e]);let r=[];t.forEach((e=>{if(e){i=i.replace(e+"\n",""),i=i.replace(e,"");let t=be(e);t&&t.length>0&&r.push(new we(t,e))}})),r.length>0&&(e._tables=r),e._wiki=i}(this),Xe(this,t)}title(){return this._title||""}index(){if(!this._doc)return null;let e=this._doc.sections().indexOf(this);return-1===e?null:e}depth(){return this._depth}indentation(){return this.depth()}sentences(){return this.paragraphs().reduce(((e,t)=>e.concat(t.sentences())),[])}paragraphs(){return this._paragraphs||[]}links(e){let t=[];if(this.infoboxes().forEach((e=>{t.push(e.links())})),this.sentences().forEach((e=>{t.push(e.links())})),this.tables().forEach((e=>{t.push(e.links())})),this.lists().forEach((e=>{t.push(e.links())})),t=t.reduce(((e,t)=>e.concat(t)),[]).filter((e=>void 0!==e)),"string"==typeof e){let i=t.find((t=>t.page().toLowerCase()===e.toLowerCase()));return void 0===i?[]:[i]}return t}tables(){return this._tables||[]}templates(e){let t=this._templates||[];return"string"==typeof e?(e=e.toLowerCase(),t.filter((t=>t.data.template===e||t.data.name===e))):t}infoboxes(e){let t=this._infoboxes||[];return"string"==typeof e?(e=(e=e.replace(/^infobox /i,"")).trim().toLowerCase(),t.filter((t=>t._type===e))):t}coordinates(){return[...this.templates("coord"),...this.templates("coor")].map((e=>e.json()))}lists(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.lists())})),e}interwiki(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.interwiki())})),e}images(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.images())})),e}references(){return this._references||[]}remove(){if(!this._doc)return null;let e={};e[this.title()]=!0,this.children().forEach((t=>e[t.title()]=!0));let t=this._doc.sections();return t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),this._doc._sections=t,this._doc}nextSibling(){if(!this._doc)return null;let e=this._doc.sections();for(let t=(this.index()||0)+1;tthis.depth())for(let e=i+1;ethis.depth();e+=1)a.push(t[e]);return"string"==typeof e?a.find((t=>t.title().toLowerCase()===e.toLowerCase())):a}sections(e){return this.children(e)}parent(){if(!this._doc)return null;let e=this._doc.sections();for(let t=this.index()||0;t>=0;t-=1)if(e[t]&&e[t].depth()t.text(e))).join("\n\n")}wikitext(){return this._wiki}json(e){return function(e,t){let i={};if(!0===(t=p(t,H)).headers&&(i.title=e.title()),!0===t.depth&&(i.depth=e.depth()),!0===t.paragraphs){let a=e.paragraphs().map((e=>e.json(t)));a.length>0&&(i.paragraphs=a)}if(!0===t.images){let a=e.images().map((e=>e.json(t)));a.length>0&&(i.images=a)}if(!0===t.tables){let a=e.tables().map((e=>e.json(t)));a.length>0&&(i.tables=a)}if(!0===t.templates){let a=e.templates().map((e=>e.json()));a.length>0&&(i.templates=a,!0===t.encode&&i.templates.forEach((e=>W(e))))}if(!0===t.infoboxes){let a=e.infoboxes().map((e=>e.json(t)));a.length>0&&(i.infoboxes=a)}if(!0===t.lists){let a=e.lists().map((e=>e.json(t)));a.length>0&&(i.lists=a)}if(!0===t.references||!0===t.citations){let a=e.references().map((e=>e.json(t)));a.length>0&&(i.references=a)}return!0===t.sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,Ii))}}Mi.prototype.citations=Mi.prototype.references;const Ri={sentences:"sentence",paragraphs:"paragraph",links:"link",tables:"table",templates:"template",infoboxes:"infobox",coordinates:"coordinate",lists:"list",images:"image",references:"reference",citations:"citation"};Object.keys(Ri).forEach((e=>{let t=Ri[e];Mi.prototype[t]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]||null}}));const Ui=/^(={1,6})(.{1,200}?)={1,6}$/,Fi=/\{\{.+?\}\}/,Bi=function(e,t,i){let a=t.match(Ui);if(!a)return e.title="",e.depth=0,e;let n=a[2]||"";n=se(n).text(),Fi.test(n)&&(n=function(e,t){return rt(e).forEach((i=>{let[a]=yi(i,t);e=e.replace(i.body,a)})),e}(n,i));let o={_wiki:n};Ai(o),n=o._wiki,n=r(n);let s=0;return a[1]&&(s=a[1].length-2),e.title=n,e.depth=s,e},Ki=new RegExp("^("+["references","reference","einzelnachweise","referencias","références","notes et références","脚注","referenser","bronnen","примечания"].join("|")+"):?","i"),Wi=/(?:\n|^)(={2,6}.{1,200}?={2,6})/g,Hi=function(e){let t=[],i=e._wiki.split(Wi);for(let a=0;a!0!==Ki.test(t.title())||t.paragraphs().length>0||t.templates().length>0||(e[i+1]&&e[i+1].depth()>t.depth()&&(e[i+1]._depth-=1),!1)))}(t)},Yi=new RegExp("\\[\\[("+h.join("|")+"):(.{2,178}?)]](w{0,10})","gi"),Zi=new RegExp("^\\[\\[:?("+h.join("|")+"):","gi"),Gi=function(e){const t=[];let i=e.match(Yi);i&&i.forEach((function(e){(e=(e=(e=e.replace(Zi,"")).replace(/\|?[ *]?\]\]$/,"")).replace(/\|.*/,""))&&!e.match(/[[\]]/)&&t.push(e.trim())}));const a=e.replace(Yi,"");return[t,a]},Vi={tables:!0,lists:!0,paragraphs:!0};class Ji{constructor(e,t){t=t||{},this._options=t;let i={pageID:t.pageID||t.id||null,namespace:t.namespace||t.ns||null,lang:t.lang||t.language||null,domain:t.domain||null,title:t.title||null,type:"page",redirectTo:null,wikidata:t.wikidata||null,wiki:e||"",categories:[],sections:[],coordinates:[],userAgent:t.userAgent||t["User-Agent"]||t["Api-User-Agent"]||"User of the wtf_wikipedia library",templateFallbackFn:t.templateFallbackFn||null};if(Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})})),!0===function(e){return!!e&&D.test(e)}(this._wiki)){this._type="redirect",this._redirectTo=function(e){let t=e.match(D);if(t&&t[2])return(T(t[2])||[])[0];return{}}(this._wiki);const[e,t]=Gi(this._wiki);return this._categories=e,void(this._wiki=t)}this._wiki=F(this._wiki);const[a,n]=Gi(this._wiki);this._categories=a,this._wiki=n,this._sections=Hi(this)}title(e){if(void 0!==e)return this._title=e,e;if(this._title)return this._title;let t=null,i=this.sentences()[0];return i&&(t=i.bold()),t}pageID(e){return void 0!==e&&(this._pageID=e),this._pageID||null}wikidata(e){return void 0!==e&&(this._wikidata=e),this._wikidata||null}domain(e){return void 0!==e&&(this._domain=e),this._domain||null}language(e){return void 0!==e&&(this._lang=e),this._lang||null}url(){let e=this.title();if(!e)return null;let t=this.language()||"en",i=this.domain()||"wikipedia.org";return e=e.replace(/ /g,"_"),e=encodeURIComponent(e),`https://${t}.${i}/wiki/${e}`}namespace(e){return void 0!==e&&(this._namespace=e),this._namespace||null}isRedirect(){return"redirect"===this._type}redirectTo(){return this._redirectTo}isDisambiguation(){return function(e){let t=e.templates().map((e=>e.json()));if(t.find((e=>k.hasOwnProperty(e.template)||x.hasOwnProperty(e.template))))return!0;let i=e.title();return!(!i||!0!==$.test(i))||!t.find((e=>y.hasOwnProperty(e.template)))&&(!0===v(e.sentence(0))||!0===v(e.sentence(1)))}(this)}categories(e){let t=this._categories||[];return"number"==typeof e?[t[e]]:t}sections(e){let t=this._sections||[];if(t.forEach((e=>{e._doc=this})),"string"==typeof e){let i=e.toLowerCase().trim();return t.filter((e=>e.title().toLowerCase()===i))}return"number"==typeof e?[t[e]]:t}paragraphs(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.paragraphs())})),"number"==typeof e?[t[e]]:t}sentences(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.sentences())})),"number"==typeof e?[t[e]]:t}images(e){let t=m(this,"images",null);return this.infoboxes().forEach((e=>{let i=e.image();i&&t.unshift(i)})),this.templates().forEach((e=>{"gallery"===e.data.template&&(e.data.images=e.data.images||[],e.data.images.forEach((e=>{e instanceof _||(e.language=this.language(),e.domain=this.domain(),e=new _(e)),t.push(e)})))})),"number"==typeof e?[t[e]]:t}links(e){return m(this,"links",e)}interwiki(e){return m(this,"interwiki",e)}lists(e){return m(this,"lists",e)}tables(e){return m(this,"tables",e)}templates(e){return m(this,"templates",e)}references(e){return m(this,"references",e)}citations(e){return this.references(e)}coordinates(e){return m(this,"coordinates",e)}infoboxes(e){let t=m(this,"infoboxes",e);return t=t.sort(((e,t)=>Object.keys(e.data).length>Object.keys(t.data).length?-1:1)),t}text(e){if(e=p(e,Vi),!0===this.isRedirect())return"";return this.sections().map((t=>t.text(e))).join("\n\n")}json(e){return function(e,t){let i={};return(t=p(t,d)).title&&(i.title=e.title()),t.pageID&&(i.pageID=e.pageID()),t.categories&&(i.categories=e.categories()),t.sections&&(i.sections=e.sections().map((e=>e.json(t)))),!0===e.isRedirect()&&(i.isRedirect=!0,i.redirectTo=e.redirectTo(),i.sections=[]),t.coordinates&&(i.coordinates=e.coordinates()),t.infoboxes&&(i.infoboxes=e.infoboxes().map((e=>e.json(t)))),t.images&&(i.images=e.images().map((e=>e.json(t)))),t.plaintext&&(i.plaintext=e.text(t)),(t.citations||t.references)&&(i.references=e.references()),i}(this,e=p(e,Vi))}wikitext(){return this._wiki||""}debug(){return console.log("\n"),this.sections().forEach((e=>{let t=" - ";for(let i=0;i{let t=Xi[e];Ji.prototype[t]=function(t){return this[e](t)[0]||null}})),Ji.prototype.lang=Ji.prototype.language,Ji.prototype.ns=Ji.prototype.namespace,Ji.prototype.plaintext=Ji.prototype.text,Ji.prototype.isDisambig=Ji.prototype.isDisambiguation,Ji.prototype.citations=Ji.prototype.references,Ji.prototype.redirectsTo=Ji.prototype.redirectTo,Ji.prototype.redirect=Ji.prototype.redirectTo,Ji.prototype.redirects=Ji.prototype.redirectTo;const Qi=/^https?:\/\//,ea={lang:"en",wiki:"wikipedia",domain:void 0,follow_redirects:!0,path:"api.php"},ta=function(e,t,i){"string"==typeof t&&(t={lang:t}),(t={...ea,...t}).title=e,"string"==typeof e&&Qi.test(e)&&(t={...t,...n(e)});const r=u(t),s=function(e){let t,i=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return t=e.noOrigin?"":e.origin||e.Origin||"*",{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":i,"User-Agent":i,Origin:t,"Accept-Encoding":"gzip"},redirect:"follow"}}(t);return a(r,s).then((e=>e.json())).then((a=>{let n=function(e,t={}){return Object.keys(e.query.pages).map((i=>{let a=e.query.pages[i]||{};if(a.hasOwnProperty("missing")||a.hasOwnProperty("invalid"))return null;let n=a.revisions[0]["*"];!n&&a.revisions[0].slots&&(n=a.revisions[0].slots.main["*"]),a.pageprops=a.pageprops||{};let r=t.domain;return!r&&t.wiki&&(r=`${t.wiki}.org`),{wiki:n,meta:Object.assign({},t,{title:a.title,pageID:a.pageid,namespace:a.ns,domain:r,wikidata:a.pageprops.wikibase_item,description:a.pageprops["wikibase-shortdesc"]})}}))}(a,t);return n=function(e,t){let i=(e=e.filter((e=>e))).map((e=>new Ji(e.wiki,e.meta)));return 0===i.length?null:o(t)||1!==i.length?i:i[0]}(n,e),i&&i(null,n),n})).catch((e=>(console.error(e),i&&i(e,null),null)))};const ia=function(e,t){return new Ji(e,t)},aa={Doc:Ji,Section:Mi,Paragraph:_e,Sentence:X,Image:_,Infobox:xi,Link:Z,List:Be,Reference:ji,Table:we,Template:Oi,http:function(e,t){return a(e,t).then((function(e){return e.json()})).catch((t=>(console.error("\n\n=-=- http response error =-=-=-"),console.error(e),console.error(t),{})))},wtf:ia};return ia.fetch=function(e,t,i){return ta(e,t,i)},ia.plugin=ia.extend=function(e){return e(aa,ki,st),this},ia.version="10.1.5",ia})); diff --git a/builds/wtf_wikipedia-client.mjs b/builds/wtf_wikipedia-client.mjs index 4dd8351e..0bdbcdbb 100644 --- a/builds/wtf_wikipedia-client.mjs +++ b/builds/wtf_wikipedia-client.mjs @@ -1,2 +1,2 @@ /*! wtf_wikipedia MIT */ -function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var i=function e(){if(this instanceof e){var i=[null];return i.push.apply(i,arguments),new(Function.bind.apply(t,i))}return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})})),i}var i=t(Object.freeze({__proto__:null,default:function(e,t){return t=t||{},new Promise((function(i,a){var n=new XMLHttpRequest,r=[],o=[],s={},l=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:l,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in n.open(t.method||"get",e,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,i){r.push(t=t.toLowerCase()),o.push([t,i]),s[t]=s[t]?s[t]+","+i:i})),i(l())},n.onerror=a,n.withCredentials="include"==t.credentials,t.headers)n.setRequestHeader(c,t.headers[c]);n.send(t.body||null)}))}})),a=e(self.fetch||(self.fetch=i.default||i));const n=function(e){let t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function r(e){return e&&"string"==typeof e?e=(e=(e=(e=e.replace(/^\s+/,"")).replace(/\s+$/,"")).replace(/ {2}/," ")).replace(/\s, /,", "):""}function o(e){return"[object Array]"===Object.prototype.toString.call(e)}const s=/(wikibooks|wikidata|wikimedia|wikinews|wikipedia|wikiquote|wikisource|wikispecies|wikiversity|wikivoyage|wiktionary|foundation|meta)\.org/,l={action:"query",prop:"revisions|pageprops",rvprop:"content",maxlag:5,rvslots:"main",origin:"*",format:"json",redirects:"true"},c=e=>e.replace(/ /g,"_").trim(),u=function(e,t=l){let i=Object.assign({},t),a="";if(e.domain){let t=s.test(e.domain)?"w/api.php":e.path;a=`https://${e.domain}/${t}?`}else{if(!e.lang||!e.wiki)return"";a=`https://${e.lang}.${e.wiki}.org/w/api.php?`}e.follow_redirects||delete i.redirects,e.origin&&(i.origin=e.origin);let n=e.title;if("number"==typeof n)i.pageids=n;else if("string"==typeof n)i.titles=c(n);else if(void 0!==n&&o(n)&&"number"==typeof n[0])i.pageids=n.filter((e=>e)).join("|");else{if(void 0===n||!0!==o(n)||"string"!=typeof n[0])return"";i.titles=n.filter((e=>e)).map(c).join("|")}return`${a}${r=i,Object.entries(r).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&")}`;var r},m=function(e,t,i){let a=[];return e.sections().forEach((e=>{let n=[];n="string"==typeof i?e[t](i):e[t](),n.forEach((e=>{a.push(e)}))})),"number"==typeof i?void 0===a[i]?[]:[a[i]]:a},p=function(e,t){return Object.assign({},t,e)},d={title:!0,sections:!0,pageID:!0,categories:!0};var h=["category","abdeeling","bólkur","catagóir","categori","categoria","categoria","categoría","categorîa","categorìa","catégorie","categorie","catègorie","category","categuria","catigurìa","class","ẹ̀ka","flocc","flocc","flokkur","grup","jamii","kaarangay","kateggoría","kategooria","kategori","kategorî","kategoria","kategória","kategorie","kategoriija","kategorija","kategorio","kategoriya","kategoriýa","kategoriye","kategory","kategorya","kateqoriya","katiguriya","klad","luokka","ñemohenda","roinn","ronney","rummad","setensele","sokajy","sumut","thể","turkum","категорија","категория","категорія","катэгорыя","төркем","קטגוריה","تصنيف","تۈر","رده","श्रेणी","श्रेणी","বিষয়শ্রেণী","หมวดหมู่","분류","분류","分类"],g=["file","image","चित्र","archivo","attēls","berkas","bestand","datei","dosiero","dosya","fájl","fasciculus","fichier","fil","fitxategi","fitxer","gambar","imagem","imej","immagine","larawan","lêer","plik","restr","slika","wêne","wobraz","выява","податотека","слика","файл","სურათი","պատկեր","קובץ","پرونده","دوتنه","ملف","وێنە","चित्र","ไฟล์","파일","ファイル"],b=["infobox","anfo","anuāmapa","bilgi kutusu","bilgi","bilgiquti","boaty","boestkelaouiñ","bosca","capsa","diehtokássa","faktamall","ficha","generalni","gwybodlen3","info","infobokis","infoboks","infochascha","infokašćik","infokast","infokutija","infolentelė","infopolje","informkesto","infoskreine","infotaula","inligtingskas","inligtingskas3","inligtingskas4","kishtey","kotak","tertcita","tietolaatikko","yerleşim bilgi kutusu","ynfoboks","πλαίσιο","акарточка","аҥа","инфобокс","инфокутија","инфокутия","інфобокс","канадский","картка","карточка","карточка2","карточкарус","картуш","қуттӣ","ინფოდაფა","տեղեկաքարտ","אינפאקעסטל","תבנית","بطاقة","ڄاڻخانو","خانہ","لغة","ज्ञानसन्दूक","তথ্যছক","ਜਾਣਕਾਰੀਡੱਬਾ","సమాచారపెట్టె","තොරතුරුකොටුව","กล่องข้อมูล","ប្រអប់ព័ត៌មាន","정보상자","明細"];let f=" disambiguation";const k=["dab","dab","disamb","disambig","geodis","hndis","setindex","ship index","split dab","sport index","wp disambig","disambiguation cleanup","airport"+f,"biology"+f,"call sign"+f,"caselaw"+f,"chinese title"+f,"genus"+f,"hospital"+f,"lake index","letter"+f,"letter-number combination"+f,"mathematical"+f,"military unit"+f,"mountainindex","number"+f,"phonetics"+f,"place name"+f,"portal"+f,"road"+f,"school"+f,"species latin name abbreviation"+f,"species latin name"+f,"station"+f,"synagogue"+f,"taxonomic authority"+f,"taxonomy"+f].reduce(((e,t)=>(e[t]=!0,e)),{}),w=/. may (also )?refer to\b/i,y={about:!0,for:!0,"for multi":!0,"other people":!0,"other uses of":!0,distinguish:!0},$=new RegExp(". \\(("+["disambiguation","homonymie","توضيح","desambiguação","Begriffsklärung","disambigua","曖昧さ回避","消歧義","搞清楚","значения","ابهام‌زدایی","د ابہام","동음이의","dubbelsinnig","այլ կիրառումներ","ujednoznacznienie"].join("|")+")\\)$","i"),x=["dab","disamb","disambig","disambiguation","letter-numbercombdisambig","letter-number combination disambiguation","dmbox","airport disambiguation","biology disambiguation","call sign disambiguation","caselaw disambiguation","chinese title disambiguation","disambiguation cleanup","genus disambiguation","hospital disambiguation","human name disambiguation","human name disambiguation cleanup","letter-number combination disambiguation","mathematical disambiguation","military unit disambiguation","music disambiguation","number disambiguation","opus number disambiguation","phonetics disambiguation","place name disambiguation","portal disambiguation","road disambiguation","school disambiguation","species latin name abbreviation disambiguation","species latin name disambiguation","station disambiguation","synagogue disambiguation","taxonomic authority disambiguation","taxonomy disambiguation","template disambiguation","disamb2","disamb3","disamb4","disambiguation lead","disambiguation lead name","disambiguation name","disamb-term","disamb-terms","aðgreining","aimai","ałtsʼáʼáztiin","anlam ayrımı","anlam ayrımı","apartigilo","argipen","begriepskloorenge","begriffsklärung","begriffsklärung","begriffsklärung","begriffsklearung","bisongidila","bkl","bokokani","caddayn","clerheans","cudakirin","čvor","db","desambig","desambigación","desambiguação","desambiguació","desambiguación","desambiguáncia","desambiguasion","desambiguassiù","desambigui","dezambiguizare","dəqiqləşdirmə","disambigua","disambigua","disambigua","disambìgua","disambigua","disambiguasi","disambiguasi","discretiva","disheñvelout","disingkek","dixanbigua","dixebra","diżambigwazzjoni","doorverwijspagina","dp","dp","dubbelsinnig","dudalipen","dv","egyért","fleiri týdningar","fleirtyding","flertydig","förgrening","gì-ngiê","giklaro","gwahaniaethu","homonimo","homónimos","homonymie","huaʻōlelo puana like","idirdhealú","khu-pia̍t","kthjellim","kujekesa","maana","maneo bin","mehrdüdig begreep","menm non","muardüüdag artiikel","neibetsjuttings","nozīmju atdalīšana","nuorodinis","nyahkekaburan","omonimeye","omonimia","page dé frouque","paglilinaw","panangilawlawag","pansayod","pejy mitovy anarana","peker","razdvojba","razločitev","razvrstavanje","reddaghey","rozcestník","rozlišovacia stránka","sclerir noziun","selvendyssivu","soilleireachadh","suzmunski","täpsustuslehekülg","täsmennyssivu","telplänov","tlahtolmelahuacatlaliztli","trang định hướng","ujednoznacznienie","verdudeliking","wěcejwóznamowosć","wjacezmyslnosć","zambiguaçon","zeimeibu škiršona","αποσαφήνιση","айрық","аҵакырацәа","вишезначна одредница","ибҳомзудоӣ","кёб магъаналы","күп мәгънәләр","күп мәғәнәлелек","мъногосъмꙑслиѥ","неадназначнасць","неадназначнасьць","неоднозначность","олон удхатай","појаснување","пояснение","са шумуд манавал","салаа утгатай","суолталар","текмаанисиздик","цо магіна гуреб","чеперушка","чолхалла","шуко ончыктымаш-влак","მრავალმნიშვნელოვანი","բազմիմաստութիւն","բազմիմաստություն","באדייטן","פירושונים","ابهام‌زدایی","توضيح","توضيح","دقیقلشدیرمه","ڕوونکردنەوە","سلجهائپ","ضد ابہام","گجگجی بیری","نامبهمېدنه","መንታ","अस्पष्टता","बहुअर्थी","बहुविकल्पी शब्द","দ্ব্যর্থতা নিরসন","ਗੁੰਝਲ-ਖੋਲ੍ਹ","સંદિગ્ધ શીર્ષક","பக்கவழி நெறிப்படுத்தல்","అయోమయ నివృత్తి","ದ್ವಂದ್ವ ನಿವಾರಣೆ","വിവക്ഷകൾ","වක්‍රෝත්ති","แก้ความกำกวม","သံတူကြောင်းကွဲ","ណែនាំ","동음이의","扤清楚","搞清楚","曖昧さ回避","消歧义","釋義","gestion dj'omònim","sut'ichana qillqa"].reduce(((e,t)=>(e[t]=!0,e)),{}),v=function(e){if(!e)return!1;let t=e.text();return!(null===t||!t[0]||!0!==w.test(t))},j={caption:!0,alt:!0,links:!0,thumb:!0,url:!0},_=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},z={file(){let e=this.data.file||"";if(e){/^(image|file):/i.test(e)||(e=`File:${e}`),e=e.trim(),e=e.charAt(0).toUpperCase()+e.substring(1),e=e.replace(/ /g,"_")}return e},alt(){let e=this.data.alt||this.data.file||"";return e=e.replace(/^(file|image):/i,""),e=e.replace(/\.(jpg|jpeg|png|gif|svg)/i,""),e.replace(/_/g," ")},caption(){return this.data.caption?this.data.caption.text():""},links(){return this.data.caption?this.data.caption.links():[]},url(){let e=function(e){let t=function(e){let t=e.replace(/^(image|file?):/i,"");return t=t.charAt(0).toUpperCase()+t.substring(1),t=t.trim().replace(/ /g,"_"),t}(e);return t=encodeURIComponent(t),t}(this.file());return`https://${this.data.domain||"wikipedia.org"}/wiki/Special:Redirect/file/${e}`},thumbnail(e){return e=e||300,this.url()+"?width="+e},format(){let e=this.file().split(".");return e[e.length-1]?e[e.length-1].toLowerCase():null},json:function(e){return function(e,t){t=p(t,j);let i={file:e.file()};return!1!==t.thumb&&(i.thumb=e.thumbnail()),!1!==t.url&&(i.url=e.url()),!1!==t.caption&&e.data.caption&&(i.caption=e.caption(),!1!==t.links&&e.data.caption.links()&&(i.links=e.links())),!1!==t.alt&&e.data.alt&&(i.alt=e.alt()),i}(this,e=e||{})},text:function(){return""},wikitext:function(){return this.data.wiki||""}};Object.keys(z).forEach((e=>{_.prototype[e]=z[e]})),_.prototype.src=_.prototype.url,_.prototype.thumb=_.prototype.thumbnail;var O={aa:"Afar",ab:"Аҧсуа",af:"Afrikaans",ak:"Akana",als:"Alemannisch",am:"አማርኛ",an:"Aragonés",ang:"Englisc",ar:"العربية",arc:"ܣܘܪܬ",as:"অসমীয়া",ast:"Asturianu",av:"Авар",ay:"Aymar",az:"Azərbaycanca",ba:"Башҡорт",bar:"Boarisch","bat-smg":"Žemaitėška",bcl:"Bikol",be:"Беларуская","be-x-old":"ltr",bg:"Български",bh:"भोजपुरी",bi:"Bislama",bm:"Bamanankan",bn:"বাংলা",bo:"བོད་ཡིག",bpy:"ltr",br:"Brezhoneg",bs:"Bosanski",bug:"ᨅᨔ",bxr:"ltr",ca:"Català",cdo:"Chinese",ce:"Нохчийн",ceb:"Sinugboanong",ch:"Chamoru",cho:"Choctaw",chr:"ᏣᎳᎩ",chy:"Tsetsêhestâhese",co:"Corsu",cr:"Nehiyaw",cs:"Česky",csb:"Kaszëbsczi",cu:"Slavonic",cv:"Чăваш",cy:"Cymraeg",da:"Dansk",de:"Deutsch",diq:"Zazaki",dsb:"ltr",dv:"ދިވެހިބަސް",dz:"ཇོང་ཁ",ee:"Ɛʋɛ",far:"فارسی",el:"Ελληνικά",en:"English",eo:"Esperanto",es:"Español",et:"Eesti",eu:"Euskara",ext:"Estremeñu",ff:"Fulfulde",fi:"Suomi","fiu-vro":"Võro",fj:"Na",fo:"Føroyskt",fr:"Français",frp:"Arpitan",fur:"Furlan",fy:"ltr",ga:"Gaeilge",gan:"ltr",gd:"ltr",gil:"Taetae",gl:"Galego",gn:"Avañe'ẽ",got:"gutisk",gu:"ગુજરાતી",gv:"Gaelg",ha:"هَوُسَ",hak:"ltr",haw:"Hawai`i",he:"עברית",hi:"हिन्दी",ho:"ltr",hr:"Hrvatski",ht:"Krèyol",hu:"Magyar",hy:"Հայերեն",hz:"Otsiherero",ia:"Interlingua",id:"Bahasa",ie:"Interlingue",ig:"Igbo",ii:"ltr",ik:"Iñupiak",ilo:"Ilokano",io:"Ido",is:"Íslenska",it:"Italiano",iu:"ᐃᓄᒃᑎᑐᑦ",ja:"日本語",jbo:"Lojban",jv:"Basa",ka:"ქართული",kg:"KiKongo",ki:"Gĩkũyũ",kj:"Kuanyama",kk:"Қазақша",kl:"Kalaallisut",km:"ភាសាខ្មែរ",kn:"ಕನ್ನಡ",khw:"کھوار",ko:"한국어",kr:"Kanuri",ks:"कश्मीरी",ksh:"Ripoarisch",ku:"Kurdî",kv:"Коми",kw:"Kernewek",ky:"Kırgızca",la:"Latina",lad:"Dzhudezmo",lan:"Leb",lb:"Lëtzebuergesch",lg:"Luganda",li:"Limburgs",lij:"Líguru",lmo:"Lumbaart",ln:"Lingála",lo:"ລາວ",lt:"Lietuvių",lv:"Latviešu","map-bms":"Basa",mg:"Malagasy",man:"官話",mh:"Kajin",mi:"Māori",min:"Minangkabau",mk:"Македонски",ml:"മലയാളം",mn:"Монгол",mo:"Moldovenească",mr:"मराठी",ms:"Bahasa",mt:"bil-Malti",mus:"Muskogee",my:"Myanmasa",na:"Dorerin",nah:"Nahuatl",nap:"Nnapulitano",nd:"ltr",nds:"Plattdüütsch","nds-nl":"Saxon",ne:"नेपाली",new:"नेपालभाषा",ng:"Oshiwambo",nl:"Nederlands",nn:"ltr",no:"Norsk",nr:"ltr",nso:"ltr",nrm:"Nouormand",nv:"Diné",ny:"Chi-Chewa",oc:"Occitan",oj:"ᐊᓂᔑᓈᐯᒧᐎᓐ",om:"Oromoo",or:"ଓଡ଼ିଆ",os:"Иронау",pa:"ਪੰਜਾਬੀ",pag:"Pangasinan",pam:"Kapampangan",pap:"Papiamentu",pdc:"ltr",pi:"Pāli",pih:"Norfuk",pl:"Polski",pms:"Piemontèis",ps:"پښتو",pt:"Português",qu:"Runa",rm:"ltr",rmy:"Romani",rn:"Kirundi",ro:"Română","roa-rup":"Armâneashti",ru:"Русский",rw:"Kinyarwandi",sa:"संस्कृतम्",sc:"Sardu",scn:"Sicilianu",sco:"Scots",sd:"सिनधि",se:"ltr",sg:"Sängö",sh:"Srpskohrvatski",si:"සිංහල",simple:"ltr",sk:"Slovenčina",sl:"Slovenščina",sm:"Gagana",sn:"chiShona",so:"Soomaaliga",sq:"Shqip",sr:"Српски",ss:"SiSwati",st:"ltr",su:"Basa",sv:"Svenska",sw:"Kiswahili",ta:"தமிழ்",te:"తెలుగు",tet:"Tetun",tg:"Тоҷикӣ",th:"ไทย",ti:"ትግርኛ",tk:"Туркмен",tl:"Tagalog",tlh:"tlhIngan-Hol",tn:"Setswana",to:"Lea",tpi:"ltr",tr:"Türkçe",ts:"Xitsonga",tt:"Tatarça",tum:"chiTumbuka",tw:"Twi",ty:"Reo",udm:"Удмурт",ug:"Uyƣurqə",uk:"Українська",ur:"اردو",uz:"Ўзбек",ve:"Tshivenḓa",vi:"Việtnam",vec:"Vèneto",vls:"ltr",vo:"Volapük",wa:"Walon",war:"Winaray",wo:"Wollof",xal:"Хальмг",xh:"isiXhosa",yi:"ייִדיש",yo:"Yorùbá",za:"Cuengh",zh:"中文","zh-classical":"ltr","zh-min-nan":"Bân-lâm-gú","zh-yue":"粵語",zu:"isiZulu"};const E=".wikipedia.org/wiki/$1",q=".wikimedia.org/wiki/$1",N="www.";var S={acronym:N+"acronymfinder.com/$1.html",advisory:"advisory"+q,advogato:N+"advogato.org/$1",aew:"wiki.arabeyes.org/$1",appropedia:N+"appropedia.org/$1",aquariumwiki:N+"theaquariumwiki.com/$1",arborwiki:"localwiki.org/ann-arbor/$1",arxiv:"arxiv.org/abs/$1",atmwiki:N+"otterstedt.de/wiki/index.php/$1",baden:N+"stadtwiki-baden-baden.de/wiki/$1/",battlestarwiki:"en.battlestarwiki.org/wiki/$1",bcnbio:"historiapolitica.bcn.cl/resenas_parlamentarias/wiki/$1",beacha:N+"beachapedia.org/$1",betawiki:"translatewiki.net/wiki/$1",bibcode:"adsabs.harvard.edu/abs/$1",bibliowiki:"wikilivres.org/wiki/$1",bluwiki:"bluwiki.com/go/$1",blw:"britainloves"+E,botwiki:"botwiki.sno.cc/wiki/$1",boxrec:N+"boxrec.com/media/index.php?$1",brickwiki:N+"brickwiki.info/wiki/$1",bugzilla:"bugzilla.wikimedia.org/show_bug.cgi?id=$1",bulba:"bulbapedia.bulbagarden.net/wiki/$1",c:"commons"+q,c2:"c2.com/cgi/wiki?$1",c2find:"c2.com/cgi/wiki?FindPage&value=$1",cache:N+"google.com/search?q=cache:$1","ĉej":"esperanto.blahus.cz/cxej/vikio/index.php/$1",cellwiki:"cell.wikia.com/wiki/$1",centralwikia:"community.wikia.com/wiki/$1",chej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",choralwiki:N+"cpdl.org/wiki/index.php/$1",citizendium:"en.citizendium.org/wiki/$1",ckwiss:N+"ck-wissen.de/ckwiki/index.php?title=$1",comixpedia:N+"comixpedia.org/index.php?title=$1",commons:"commons"+q,communityscheme:"community.schemewiki.org/?c=s&key=$1",communitywiki:"communitywiki.org/$1",comune:"rete.comuni-italiani.it/wiki/$1",creativecommons:"creativecommons.org/licenses/$1",creativecommonswiki:"wiki.creativecommons.org/$1",cxej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",dcc:N+"dccwiki.com/$1",dcdatabase:"dc.wikia.com/$1",dcma:"christian-morgenstern.de/dcma/index.php?title=$1",debian:"wiki.debian.org/$1",delicious:N+"delicious.com/tag/$1",devmo:"developer.mozilla.org/en/docs/$1",dictionary:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",dict:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",disinfopedia:"sourcewatch.org/index.php/$1",distributedproofreaders:N+"pgdp.net/wiki/$1",distributedproofreadersca:N+"pgdpcanada.net/wiki/index.php/$1",dmoz:"curlie.org/$1",dmozs:"curlie.org/search?q=$1",doi:"doi.org/$1",donate:"donate"+q,doom_wiki:"doom.wikia.com/wiki/$1",download:"releases.wikimedia.org/$1",dbdump:"dumps.wikimedia.org/$1/latest/",dpd:"lema.rae.es/dpd/?key=$1",drae:"dle.rae.es/?w=$1",dreamhost:"wiki.dreamhost.com/index.php/$1",drumcorpswiki:N+"drumcorpswiki.com/index.php/$1",dwjwiki:N+"suberic.net/cgi-bin/dwj/wiki.cgi?$1","eĉei":N+"ikso.net/cgi-bin/wiki.pl?$1",ecoreality:N+"EcoReality.org/wiki/$1",ecxei:N+"ikso.net/cgi-bin/wiki.pl?$1",elibre:"enciclopedia.us.es/index.php/$1",emacswiki:N+"emacswiki.org/emacs?$1",encyc:"encyc.org/wiki/$1",energiewiki:N+"netzwerk-energieberater.de/wiki/index.php/$1",englyphwiki:"en.glyphwiki.org/wiki/$1",enkol:"enkol.pl/$1",eokulturcentro:"esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1",esolang:"esolangs.org/wiki/$1",etherpad:"etherpad.wikimedia.org/$1",ethnologue:N+"ethnologue.com/language/$1",ethnologuefamily:N+"ethnologue.com/show_family.asp?subid=$1",evowiki:"wiki.cotch.net/index.php/$1",exotica:N+"exotica.org.uk/wiki/$1",fanimutationwiki:"wiki.animutationportal.com/index.php/$1",fedora:"fedoraproject.org/wiki/$1",finalfantasy:"finalfantasy.wikia.com/wiki/$1",finnix:N+"finnix.org/$1",flickruser:N+"flickr.com/people/$1",flickrphoto:N+"flickr.com/photo.gne?id=$1",floralwiki:N+"floralwiki.co.uk/wiki/$1",foldoc:"foldoc.org/$1",foundation:"foundation"+q,foundationsite:"wikimediafoundation.org/$1",foxwiki:"fox.wikis.com/wc.dll?Wiki~$1",freebio:"freebiology.org/wiki/$1",freebsdman:N+"FreeBSD.org/cgi/man.cgi?apropos=1&query=$1",freeculturewiki:"wiki.freeculture.org/index.php/$1",freedomdefined:"freedomdefined.org/$1",freefeel:"freefeel.org/wiki/$1",freekiwiki:"wiki.freegeek.org/index.php/$1",freesoft:"directory.fsf.org/wiki/$1",ganfyd:"ganfyd.org/index.php?title=$1",gardenology:N+"gardenology.org/wiki/$1",gausswiki:"gauss.ffii.org/$1",gentoo:"wiki.gentoo.org/wiki/$1",genwiki:"wiki.genealogy.net/index.php/$1",gerrit:"gerrit.wikimedia.org/r/$1",git:"gerrit.wikimedia.org/g/$1",google:N+"google.com/search?q=$1",googledefine:N+"google.com/search?q=define:$1",googlegroups:"groups.google.com/groups?q=$1",guildwarswiki:"wiki.guildwars.com/wiki/$1",guildwiki:"guildwars.wikia.com/wiki/$1",guc:"tools.wmflabs.org/guc/?user=$1",gucprefix:"tools.wmflabs.org/guc/?isPrefixPattern=1&src=rc&user=$1",gutenberg:N+"gutenberg.org/etext/$1",gutenbergwiki:N+"gutenberg.org/wiki/$1",hackerspaces:"hackerspaces.org/wiki/$1",h2wiki:"halowiki.net/p/$1",hammondwiki:N+"dairiki.org/HammondWiki/index.php3?$1",hdl:"hdl.handle.net/$1",heraldik:"heraldik-wiki.de/wiki/$1",heroeswiki:"heroeswiki.com/$1",horizonlabs:"horizon.wikimedia.org/$1",hrwiki:N+"hrwiki.org/index.php/$1",hrfwiki:"fanstuff.hrwiki.org/index.php/$1",hupwiki:"wiki.hup.hu/index.php/$1",iarchive:"archive.org/details/$1",imdbname:N+"imdb.com/name/nm$1/",imdbtitle:N+"imdb.com/title/tt$1/",imdbcompany:N+"imdb.com/company/co$1/",imdbcharacter:N+"imdb.com/character/ch$1/",incubator:"incubator"+q,infosecpedia:"infosecpedia.org/wiki/$1",infosphere:"theinfosphere.org/$1","iso639-3":"iso639-3.sil.org/code/$1",issn:N+"worldcat.org/issn/$1",iuridictum:"iuridictum.pecina.cz/w/$1",jaglyphwiki:"glyphwiki.org/wiki/$1",jefo:"esperanto-jeunes.org/wiki/$1",jerseydatabase:"jerseydatabase.com/wiki.php?id=$1",jira:"jira.toolserver.org/browse/$1",jspwiki:N+"ecyrd.com/JSPWiki/Wiki.jsp?page=$1",jstor:N+"jstor.org/journals/$1",kamelo:"kamelopedia.mormo.org/index.php/$1",karlsruhe:"ka.stadtwiki.net/$1",kinowiki:"kino.skripov.com/index.php/$1",komicawiki:"wiki.komica.org/?$1",kontuwiki:"kontu.wiki/$1",wikitech:"wikitech"+q,libreplanet:"libreplanet.org/wiki/$1",linguistlist:"linguistlist.org/forms/langs/LLDescription.cfm?code=$1",linuxwiki:N+"linuxwiki.de/$1",linuxwikide:N+"linuxwiki.de/$1",liswiki:"liswiki.org/wiki/$1",literateprograms:"en.literateprograms.org/$1",livepedia:N+"livepedia.gr/index.php?title=$1",localwiki:"localwiki.org/$1",lojban:"mw.lojban.org/papri/$1",lostpedia:"lostpedia.wikia.com/wiki/$1",lqwiki:"wiki.linuxquestions.org/wiki/$1",luxo:"tools.wmflabs.org/guc/?user=$1",mail:"lists.wikimedia.org/mailman/listinfo/$1",mailarchive:"lists.wikimedia.org/pipermail/$1",mariowiki:N+"mariowiki.com/$1",marveldatabase:N+"marveldatabase.com/wiki/index.php/$1",meatball:"meatballwiki.org/wiki/$1",mw:N+"mediawiki.org/wiki/$1",mediazilla:"bugzilla.wikimedia.org/$1",memoryalpha:"memory-alpha.fandom.com/wiki/$1",metawiki:"meta"+q,metawikimedia:"meta"+q,metawikipedia:"meta"+q,mineralienatlas:N+"mineralienatlas.de/lexikon/index.php/$1",moinmoin:"moinmo.in/$1",monstropedia:N+"monstropedia.org/?title=$1",mosapedia:"mosapedia.de/wiki/index.php/$1",mozcom:"mozilla.wikia.com/wiki/$1",mozillawiki:"wiki.mozilla.org/$1",mozillazinekb:"kb.mozillazine.org/$1",musicbrainz:"musicbrainz.org/doc/$1",mediawikiwiki:N+"mediawiki.org/wiki/$1",mwod:N+"merriam-webster.com/dictionary/$1",mwot:N+"merriam-webster.com/thesaurus/$1",nkcells:N+"nkcells.info/index.php?title=$1",nara:"catalog.archives.gov/id/$1",nosmoke:"no-smok.net/nsmk/$1",nost:"nostalgia"+E,nostalgia:"nostalgia"+E,oeis:"oeis.org/$1",oldwikisource:"wikisource.org/wiki/$1",olpc:"wiki.laptop.org/go/$1",omegawiki:N+"omegawiki.org/Expression:$1",onelook:N+"onelook.com/?ls=b&w=$1",openlibrary:"openlibrary.org/$1",openstreetmap:"wiki.openstreetmap.org/wiki/$1",openwetware:"openwetware.org/wiki/$1",opera7wiki:"operawiki.info/$1",organicdesign:N+"organicdesign.co.nz/$1",orthodoxwiki:"orthodoxwiki.org/$1",osmwiki:"wiki.openstreetmap.org/wiki/$1",otrs:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=$1",otrswiki:"otrs-wiki"+q,ourmedia:N+"socialtext.net/ourmedia/index.cgi?$1",outreach:"outreach"+q,outreachwiki:"outreach"+q,owasp:N+"owasp.org/index.php/$1",panawiki:"wiki.alairelibre.net/index.php?title=$1",patwiki:"gauss.ffii.org/$1",personaltelco:"personaltelco.net/wiki/$1",petscan:"petscan.wmflabs.org/?psid=$1",phab:"phabricator.wikimedia.org/$1",phabricator:"phabricator.wikimedia.org/$1",phwiki:N+"pocketheaven.com/ph/wiki/index.php?title=$1",phpwiki:"phpwiki.sourceforge.net/phpwiki/index.php?$1",planetmath:"planetmath.org/node/$1",pmeg:N+"bertilow.com/pmeg/$1",pmid:N+"ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract",pokewiki:"pokewiki.de/$1","pokéwiki":"pokewiki.de/$1",policy:"policy.wikimedia.org/$1",proofwiki:N+"proofwiki.org/wiki/$1",pyrev:N+"mediawiki.org/wiki/Special:Code/pywikipedia/$1",pythoninfo:"wiki.python.org/moin/$1",pythonwiki:N+"pythonwiki.de/$1",pywiki:"c2.com/cgi/wiki?$1",psycle:"psycle.sourceforge.net/wiki/$1",quality:"quality"+q,quarry:"quarry.wmflabs.org/$1",regiowiki:"regiowiki.at/wiki/$1",rev:N+"mediawiki.org/wiki/Special:Code/MediaWiki/$1",revo:"purl.org/NET/voko/revo/art/$1.html",rfc:"tools.ietf.org/html/rfc$1",rheinneckar:"rhein-neckar-wiki.de/$1",robowiki:"robowiki.net/?$1",rodovid:"en.rodovid.org/wk/$1",reuterswiki:"glossary.reuters.com/index.php/$1",rowiki:"wiki.rennkuckuck.de/index.php/$1",rt:"rt.wikimedia.org/Ticket/Display.html?id=$1",s23wiki:"s23.org/wiki/$1",scholar:"scholar.google.com/scholar?q=$1",schoolswp:"schools-"+E,scores:"imslp.org/wiki/$1",scoutwiki:"en.scoutwiki.org/$1",scramble:N+"scramble.nl/wiki/index.php?title=$1",seapig:N+"seapig.org/$1",seattlewiki:"seattle.wikia.com/wiki/$1",slwiki:"wiki.secondlife.com/wiki/$1","semantic-mw":N+"semantic-mediawiki.org/wiki/$1",senseislibrary:"senseis.xmp.net/?$1",sharemap:"sharemap.org/$1",silcode:N+"sil.org/iso639-3/documentation.asp?id=$1",slashdot:"slashdot.org/article.pl?sid=$1",sourceforge:"sourceforge.net/$1",spcom:"spcom"+q,species:"species"+q,squeak:"wiki.squeak.org/squeak/$1",stats:"stats.wikimedia.org/$1",stewardry:"tools.wmflabs.org/meta/stewardry/?wiki=$1",strategy:"strategy"+q,strategywiki:"strategywiki.org/wiki/$1",sulutil:"meta.wikimedia.org/wiki/Special:CentralAuth/$1",swtrain:"train.spottingworld.com/$1",svn:"svn.wikimedia.org/viewvc/mediawiki/$1?view=log",swinbrain:"swinbrain.ict.swin.edu.au/wiki/$1",tabwiki:N+"tabwiki.com/index.php/$1",tclerswiki:"wiki.tcl.tk/$1",technorati:N+"technorati.com/search/$1",tenwiki:"ten"+E,testwiki:"test"+E,testwikidata:"test.wikidata.org/wiki/$1",test2wiki:"test2"+E,tfwiki:"tfwiki.net/wiki/$1",thelemapedia:N+"thelemapedia.org/index.php/$1",theopedia:N+"theopedia.com/$1",thinkwiki:N+"thinkwiki.org/wiki/$1",ticket:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=$1",tmbw:"tmbw.net/wiki/$1",tmnet:N+"technomanifestos.net/?$1",tmwiki:N+"EasyTopicMaps.com/?page=$1",toolforge:"tools.wmflabs.org/$1",toollabs:"tools.wmflabs.org/$1",tools:"toolserver.org/$1",tswiki:N+"mediawiki.org/wiki/Toolserver:$1",translatewiki:"translatewiki.net/wiki/$1",tviv:"tviv.org/wiki/$1",tvtropes:N+"tvtropes.org/pmwiki/pmwiki.php/Main/$1",twiki:"twiki.org/cgi-bin/view/$1",tyvawiki:N+"tyvawiki.org/wiki/$1",umap:"umap.openstreetmap.fr/$1",uncyclopedia:"en.uncyclopedia.co/wiki/$1",unihan:N+"unicode.org/cgi-bin/GetUnihanData.pl?codepoint=$1",unreal:"wiki.beyondunreal.com/wiki/$1",urbandict:N+"urbandictionary.com/define.php?term=$1",usej:N+"tejo.org/usej/$1",usemod:N+"usemod.com/cgi-bin/wiki.pl?$1",usability:"usability"+q,utrs:"utrs.wmflabs.org/appeal.php?id=$1",vikidia:"fr.vikidia.org/wiki/$1",vlos:"tusach.thuvienkhoahoc.com/wiki/$1",vkol:"kol.coldfront.net/thekolwiki/index.php/$1",voipinfo:N+"voip-info.org/wiki/view/$1",votewiki:"vote"+q,werelate:N+"werelate.org/wiki/$1",wg:"wg-en"+E,wikia:N+"wikia.com/wiki/w:c:$1",wikiasite:N+"wikia.com/wiki/w:c:$1",wikiapiary:"wikiapiary.com/wiki/$1",wikibooks:"en.wikibooks.org/wiki/$1",wikichristian:N+"wikichristian.org/index.php?title=$1",wikicities:N+"wikia.com/wiki/w:$1",wikicity:N+"wikia.com/wiki/w:c:$1",wikiconference:"wikiconference.org/wiki/$1",wikidata:N+"wikidata.org/wiki/$1",wikif1:N+"wikif1.org/$1",wikifur:"en.wikifur.com/wiki/$1",wikihow:N+"wikihow.com/$1",wikiindex:"wikiindex.org/$1",wikilemon:"wiki.illemonati.com/$1",wikilivres:"wikilivres.org/wiki/$1",wikilivresru:"wikilivres.ru/$1","wikimac-de":"apfelwiki.de/wiki/Main/$1",wikimedia:"foundation"+q,wikinews:"en.wikinews.org/wiki/$1",wikinfo:"wikinfo.org/w/index.php/$1",wikinvest:"meta.wikimedia.org/wiki/Interwiki_map/discontinued#Wikinvest",wikiotics:"wikiotics.org/$1",wikipapers:"wikipapers.referata.com/wiki/$1",wikipedia:"en"+E,wikipediawikipedia:"en.wikipedia.org/wiki/Wikipedia:$1",wikiquote:"en.wikiquote.org/wiki/$1",wikisophia:"wikisophia.org/index.php?title=$1",wikisource:"en.wikisource.org/wiki/$1",wikispecies:"species"+q,wikispot:"wikispot.org/?action=gotowikipage&v=$1",wikiskripta:N+"wikiskripta.eu/index.php/$1",labsconsole:"wikitech"+q,wikiti:"wikiti.denglend.net/index.php?title=$1",wikiversity:"en.wikiversity.org/wiki/$1",wikivoyage:"en.wikivoyage.org/wiki/$1",betawikiversity:"beta.wikiversity.org/wiki/$1",wikiwikiweb:"c2.com/cgi/wiki?$1",wiktionary:"en.wiktionary.org/wiki/$1",wipipedia:"wipipedia.org/index.php/$1",wlug:N+"wlug.org.nz/$1",wmam:"am"+q,wmar:N+"wikimedia.org.ar/wiki/$1",wmat:"mitglieder.wikimedia.at/$1",wmau:"wikimedia.org.au/wiki/$1",wmbd:"bd"+q,wmbe:"be"+q,wmbr:"br"+q,wmca:"ca"+q,wmch:N+"wikimedia.ch/$1",wmcl:N+"wikimediachile.cl/index.php?title=$1",wmcn:"cn"+q,wmco:"co"+q,wmcz:N+"wikimedia.cz/web/$1",wmdc:"wikimediadc.org/wiki/$1",securewikidc:"secure.wikidc.org/$1",wmde:"wikimedia.de/wiki/$1",wmdk:"dk"+q,wmee:"ee"+q,wmec:"ec"+q,wmes:N+"wikimedia.es/wiki/$1",wmet:"ee"+q,wmfdashboard:"outreachdashboard.wmflabs.org/$1",wmfi:"fi"+q,wmfr:"wikimedia.fr/$1",wmge:"ge"+q,wmhi:"hi"+q,wmhk:"meta.wikimedia.org/wiki/Wikimedia_Hong_Kong",wmhu:"wikimedia.hu/wiki/$1",wmid:"id"+q,wmil:N+"wikimedia.org.il/$1",wmin:"wiki.wikimedia.in/$1",wmit:"wiki.wikimedia.it/wiki/$1",wmke:"meta.wikimedia.org/wiki/Wikimedia_Kenya",wmmk:"mk"+q,wmmx:"mx"+q,wmnl:"nl"+q,wmnyc:"nyc"+q,wmno:"no"+q,"wmpa-us":"pa-us"+q,wmph:"meta.wikimedia.org/wiki/Wikimedia_Philippines",wmpl:"pl"+q,wmpt:"pt"+q,wmpunjabi:"punjabi"+q,wmromd:"romd"+q,wmrs:"rs"+q,wmru:"ru"+q,wmse:"se"+q,wmsk:"wikimedia.sk/$1",wmtr:"tr"+q,wmtw:"wikimedia.tw/wiki/index.php5/$1",wmua:"ua"+q,wmuk:"wikimedia.org.uk/wiki/$1",wmve:"wikimedia.org.ve/wiki/$1",wmza:"wikimedia.org.za/wiki/$1",wm2005:"wikimania2005"+q,wm2006:"wikimania2006"+q,wm2007:"wikimania2007"+q,wm2008:"wikimania2008"+q,wm2009:"wikimania2009"+q,wm2010:"wikimania2010"+q,wm2011:"wikimania2011"+q,wm2012:"wikimania2012"+q,wm2013:"wikimania2013"+q,wm2014:"wikimania2014"+q,wm2015:"wikimania2015"+q,wm2016:"wikimania2016"+q,wm2017:"wikimania2017"+q,wm2018:"wikimania2018"+q,wmania:"wikimania"+q,wikimania:"wikimania"+q,wmteam:"wikimaniateam"+q,wmf:"foundation"+q,wmfblog:"blog.wikimedia.org/$1",wmdeblog:"blog.wikimedia.de/$1",wookieepedia:"starwars.wikia.com/wiki/$1",wowwiki:N+"wowwiki.com/$1",wqy:"wqy.sourceforge.net/cgi-bin/index.cgi?$1",wurmpedia:"wurmpedia.com/index.php/$1",viaf:"viaf.org/viaf/$1",zrhwiki:N+"zrhwiki.ch/wiki/$1",zum:"wiki.zum.de/$1",zwiki:N+"zwiki.org/$1",m:"meta"+q,meta:"meta"+q,sep11:"sep11"+E,d:N+"wikidata.org/wiki/$1",minnan:"zh-min-nan"+E,nb:"no"+E,"zh-cfr":"zh-min-nan"+E,"zh-cn":"zh"+E,"zh-tw":"zh"+E,nan:"zh-min-nan"+E,vro:"fiu-vro"+E,cmn:"zh"+E,lzh:"zh-classical"+E,rup:"roa-rup"+E,gsw:"als"+E,"be-tarask":"be-x-old"+E,sgs:"bat-smg"+E,egl:"eml"+E,w:"en"+E,wikt:"en.wiktionary.org/wiki/$1",q:"en.wikiquote.org/wiki/$1",b:"en.wikibooks.org/wiki/$1",n:"en.wikinews.org/wiki/$1",s:"en.wikisource.org/wiki/$1",chapter:"en"+q,v:"en.wikiversity.org/wiki/$1",voy:"en.wikivoyage.org/wiki/$1"};Object.keys(O).forEach((e=>{S[e]=e+".wikipedia.org/wiki/$1"}));const C=/^(category|catégorie|kategorie|categoría|categoria|categorie|kategoria|تصنيف|image|file|fichier|datei|media):/i,L=/\[(https?|news|ftp|mailto|gopher|irc)(:\/\/[^\]| ]{4,1500})([| ].*?)?\]/g,A=/\[\[(.{0,1600}?)\]\]([a-z]+)?/gi,P=function(e,t){return t.replace(A,(function(t,i,a){let n=null,r=i;if(i.match(/\|/)&&(r=(i=i.replace(/\[\[(.{2,1000}?)\]\](\w{0,10})/g,"$1$2")).replace(/(.{2,1000})\|.{0,2000}/,"$1"),n=i.replace(/.{2,1000}?\|/,""),null===n&&r.match(/\|$/)&&(r=r.replace(/\|$/,""),n=r)),r.match(C))return i;let o={page:r,raw:t};return o.page=o.page.replace(/#(.*)/,((e,t)=>(o.anchor=t,""))),o=function(e){let t=e.page||"";if(-1!==t.indexOf(":")){let i=t.match(/^(.*):(.*)/);if(null===i)return e;let a=i[1]||"";if(a=a.toLowerCase(),-1!==a.indexOf(":")){let[,t,i]=a.match(/^:?(.*):(.*)/);if(!1===S.hasOwnProperty(t)||!1===O.hasOwnProperty(i))return e;e.wiki={wiki:t,lang:i}}else{if(!1===S.hasOwnProperty(a))return e;e.wiki=a}e.page=i[2]}return e}(o),o.wiki&&(o.type="interwiki"),null!==n&&n!==o.page&&(o.text=n),a&&(o.text=o.text||o.page,o.text+=a.trim()),o.page&&!1===/^[A-Z]/.test(o.page)&&(o.text||(o.text=o.page),o.page=o.page),o.text&&o.text.startsWith(":")&&(o.text=o.text.replace(/^:/,"")),e.push(o),i})),e},D=function(e){let t=[];if(t=function(e,t){return t.replace(L,(function(t,i,a,n){return n=n||"",e.push({type:"external",site:i+a,text:n.trim(),raw:t}),n})),e}(t,e),t=P(t,e),0!==t.length)return t},T=new RegExp("^[ \n\t]*?#("+["adkas","aýdaw","doorverwijzing","ohjaus","patrz","přesměruj","redirección","redireccion","redirección","redirecionamento","redirect","redirection","redirection","rinvia","tilvísun","uudelleenohjaus","weiterleitung","weiterleitung","yönlendi̇r","yönlendirme","yönlendi̇rme","ανακατευθυνση","айдау","перанакіраваньне","перенаправлення","пренасочување","преусмери","преусмјери","تغییر_مسیر","تغییرمسیر","تغییرمسیر","เปลี่ยนทาง","ប្តូរទីតាំងទៅ","転送","重定向"].join("|")+") *?(\\[\\[.{2,180}?\\]\\])","i"),I=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","references","source","syntaxhighlight","timeline"],M=`< ?(${I.join("|")}) ?[^>]{0,200}?>`,R=`< ?/ ?(${I.join("|")}) ?>`,U=new RegExp(`${M}[\\s\\S]+?${R}`,"gi");function F(e){return e=(e=(e=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(U," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%.\-#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/
(.*?)<\/blockquote>/g,"{{blockquote|text=$1}}")).replace(/ ?<[ /]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr|u)[ /]?> ?/g," ")).replace(/ ?<[ /]?(abbr|bdi|bdo|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ /]?> ?/g," ")).replace(/ ?<[ /]?h[0-9][ /]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()}(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~{2,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," ")).replace(/–/g,"–"))).replace(/\([,;: ]+\)/g,"")).replace(/\{\{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,"")}const B=/[\\.$]/,K=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},W=function(e={}){let t=Object.keys(e);for(let i=0;i{Z.prototype[e]=G[e]}));const V=/^[0-9,.]+$/,J={text:!0,links:!0,formatting:!0,numbers:!0},X=function(e={}){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Q={links:function(e){let t=this.data.links||[];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page===e));return void 0===i?[]:[i]}return t},interwiki:function(){return this.links().filter((e=>void 0!==e.wiki))},bolds:function(){return this.data&&this.data.fmt&&this.data.fmt.bold&&this.data.fmt.bold||[]},italics:function(){return this.data&&this.data.fmt&&this.data.fmt.italic&&this.data.fmt.italic||[]},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return function(e,t){t=p(t,J);let i={},a=e.text();if(!0===t.text&&(i.text=a),!0===t.numbers&&V.test(a)){let e=Number(a.replace(/,/g,""));!1===isNaN(e)&&(i.number=e)}return t.links&&e.links().length>0&&(i.links=e.links().map((e=>e.json()))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i}(this,e)},wikitext:function(){return this.data.wiki||""},isEmpty:function(){return""===this.data.text}};Object.keys(Q).forEach((e=>{X.prototype[e]=Q[e]}));const ee={links:"link",bolds:"bold",italics:"italic"};Object.keys(ee).forEach((e=>{X.prototype[ee[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}})),X.prototype.plaintext=X.prototype.text;const te=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),ie=new RegExp("(^| |')("+te.join("|")+")[.!?] ?$","i"),ae=/[ .'][A-Z].? *$/i,ne=/\.{3,} +$/,re=/ c\.\s$/,oe=/\p{Letter}/iu;function se(e){let t={wiki:e,text:e};return function(e){let t=e.text,i=D(t)||[];e.links=i.map((e=>(t=t.replace(e.raw,e.text||e.page||""),new Z(e)))),t=t.replace(/\[\[File:(.{2,80}?)\|([^\]]+)\]\](\w{0,5})/g,"$1"),e.text=t}(t),t.text=r(t.text.replace(/\([,;: ]*\)/g,"").replace(/\( *(; ?)+/g,"(")).replace(/ +\.$/,"."),t=function(e){let t=[],i=[],a=e.text||"";return a=a.replace(/'''''(.{0,2500}?)'''''/g,((e,a)=>(t.push(a),i.push(a),a))),a=a.replace(/''''(.{0,2500}?)''''/g,((e,i)=>(t.push(`'${i}'`),`'${i}'`))),a=a.replace(/'''(.{0,2500}?)'''/g,((e,i)=>(t.push(i),i))),a=a.replace(/''(.{0,2500}?)''/g,((e,t)=>(i.push(t),t))),e.text=a,t.length>0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e}(t),new X(t)}const le=function(e){let t=function(e){let t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;let a=function(e){let t=e.split(/(\n+)/);return t=t.filter((e=>e.match(/\S/))),t=t.map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s|$)/g)})),function(e){let t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t)}(e);for(let e=0;ei.length)return!1;const a=e.match(/"/g);if(a&&a.length%2!=0&&e.length<900)return!1;const n=e.match(/[()]/g);return!(n&&n.length%2!=0&&e.length<900)}(n))?/^\s/.test(i[e+1])||/\s$/.test(i[e])?i[e+1]=i[e]+i[e+1]:i[e+1]=i[e]+" "+i[e+1]:i[e]&&i[e].length>0&&(t.push(i[e]),i[e]="");var n;return 0===t.length?[e]:t}(e.wiki);t=t.map(se),t[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},ce=/.*rowspan *= *["']?([0-9]+)["']?[ |]*/,ue=/.*colspan *= *["']?([0-9]+)["']?[ |]*/,me=function(e){return e=function(e){return e.forEach(((t,i)=>{t.forEach(((a,n)=>{let r=a.match(ce);if(null!==r){let o=parseInt(r[1],10);a=a.replace(ce,""),t[n]=a;for(let t=i+1;t{e.forEach(((t,i)=>{let a=t.match(ue);if(null!==a){let n=parseInt(a[1],10);e[i]=t.replace(ue,"");for(let t=1;te.length>0))}(e))},pe=/^!/,de={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},he=function(e){return(e=se(e).text()).match(/\|/)&&(e=e.replace(/.*?\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},ge=function(e){if(e.length<=3)return[];let t=e[0].slice(0);t=t.map((e=>(e=se(e=e.replace(/^! */,"")).text(),e=(e=he(e)).toLowerCase())));for(let i=0;ie&&!0!==/^\|\+/.test(e))),!0===/^\{\|/.test(e[0])&&e.shift(),!0===/^\|\}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(let a=0;a0&&(t.push(i),i=[]);else{let e=n.charAt(0);"|"!==e&&"!"!==e||(n=n.substring(1)),n=n.split(/(?:\|\||!!)/),"!"===e&&(n[0]=e+n[0]),n.forEach((e=>{e=e.trim(),i.push(e)}))}}return i.length>0&&t.push(i),t}(e.replace(/\r/g,"").replace(/\n(\s*[^|!{\s])/g," $1").split(/\n/).map((e=>e.trim())));if(t=t.filter((e=>e)),0===t.length)return[];t=function(e){return e.filter((e=>1!==e.length||!e[0]||!pe.test(e[0])||!1!==/rowspan/i.test(e[0])))}(t),t=me(t);let i=function(e=[]){let t=[];var i;(i=(i=e[0])||[]).length-i.filter((e=>e)).length>3&&e.shift();let a=e[0];return a&&a[0]&&a[1]&&(/^!/.test(a[0])||/^!/.test(a[1]))&&(t=a.map((e=>(e=e.replace(/^! */,""),he(e)))),e.shift()),a=e[0],a&&a[0]&&a[1]&&/^!/.test(a[0])&&/^!/.test(a[1])&&(a.forEach(((e,i)=>{e=e.replace(/^! */,""),e=he(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(t);if(!i||i.length<=1){i=ge(t);let e=t[t.length-1]||[];i.length<=1&&e.length>2&&(i=ge(t.slice(1)),i.length>0&&(t=t.slice(2)))}let a=t.map((e=>function(e,t){let i={};return e.forEach(((e,a)=>{let n=t[a]||"col"+(a+1),r=se(e);r.text(he(r.text())),i[n]=r})),i}(e,i)));return a},fe={},ke=function(e=""){return e=(e=(e=(e=e.toLowerCase()).replace(/[_-]/g," ")).replace(/\(.*?\)/,"")).trim()},we=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_wiki",{enumerable:!1,value:t})},ye={links(e){let t=[];if(this.data.forEach((e=>{Object.keys(e).forEach((i=>{t=t.concat(e[i].links())}))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},get(e){let t=this.data[0]||{},i=Object.keys(t).reduce(((e,t)=>(e[ke(t)]=t,e)),{});if("string"==typeof e){let t=ke(e);return t=i[t]||t,this.data.map((e=>e[t]?e[t].text():null))}return e=e.map(ke).map((e=>i[e]||e)),this.data.map((t=>e.reduce(((e,i)=>(t[i]?e[i]=t[i].text():e[i]="",e)),{})))},keyValue(e){let t=this.json(e);return t.forEach((e=>{Object.keys(e).forEach((t=>{e[t]=e[t].text}))})),t},json(e){return e=p(e,fe),function(e,t){return e.map((e=>{let i={};return Object.keys(e).forEach((t=>{i[t]=e[t].json()})),!0===t.encode&&(i=W(i)),i}))}(this.data,e)},text:()=>"",wikitext(){return this._wiki||""}};ye.keyvalue=ye.keyValue,ye.keyval=ye.keyValue,Object.keys(ye).forEach((e=>{we.prototype[e]=ye[e]}));const $e=/^\s*\{\|/,xe=/^\s*\|\}/,ve={sentences:!0},je={sentences:!0,lists:!0,images:!0},_e=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},ze={sentences:function(){return this.data.sentences||[]},references:function(){return this.data.references},lists:function(){return this.data.lists},images(){return this.data.images||[]},links:function(e){let t=[];if(this.sentences().forEach((i=>{t=t.concat(i.links(e))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},interwiki(){let e=[];return this.sentences().forEach((t=>{e=e.concat(t.interwiki())})),e||[]},text:function(e){e=p(e,je);let t=this.sentences().map((t=>t.text(e))).join(" ");return this.lists().forEach((e=>{t+="\n"+e.text()})),t},json:function(e){return function(e,t){let i={};return!0===(t=p(t,ve)).sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,je))},wikitext:function(){return this.data.wiki}};ze.citations=ze.references,Object.keys(ze).forEach((e=>{_e.prototype[e]=ze[e]}));const Oe={sentences:"sentence",references:"reference",citations:"citation",lists:"list",images:"image",links:"link"};Object.keys(Oe).forEach((e=>{_e.prototype[Oe[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}}));const Ee=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},qe=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},Ne=/^[\p{Letter}0-9._/\- '()\t]+=/iu,Se={template:!0,list:!0,prototype:!0},Ce=function(e,t){let i=0;return e.reduce(((e,a="")=>{if(a=a.trim(),!0===Ne.test(a)){let t=function(e){let t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();let a=t.slice(1).join("=");return Se.hasOwnProperty(i)&&(i="_"+i),{key:i,val:a.trim()}}(a);if(t.key)return e[t.key]&&!t.val||(e[t.key]=t.val),e}if(t&&t[i]){e[t[i]]=a}else e.list=e.list||[],e.list.push(a);return i+=1,e}),{})},Le={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Ae=function(e,t){let i=se(e);return"json"===t?i.json():"raw"===t?i:i.text()},Pe=function(e,t=[],i){let a=function(e){let t=e.split(/\n?\|/);t.forEach(((e,i)=>{null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)})),t=t.filter((e=>null!==e)),t=t.map((e=>(e||"").trim()));for(let e=t.length-1;e>=0;e-=1){""===t[e]&&t.pop();break}return t}(e=Ee(e||"")),n=a.shift(),r=Ce(a,t);return r=function(e){return Object.keys(e).forEach((t=>{!0===Le[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e}(r),r[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((e=>{r[e]="list"!==e?Ae(r[e],i):r[e].map((e=>Ae(e,i)))})),n&&(r.template=qe(n)),r};const De=new RegExp("("+g.join("|")+"):","i");let Te=`(${g.join("|")})`;const Ie=new RegExp(Te+":(.+?)[\\||\\]]","iu"),Me=/^\[\[:/,Re={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},Ue=function(e,t){let i=e.wiki,a=function(e){let t=[],i=[];const a=e.split("");let n=0;for(let r=0;r0){let e=0,a=0;for(let t=0;ta&&i.push("]"),t.push(i.join("")),i=[]}}return t}(i);a.forEach((function(a){if(!0===De.test(a)){e.images=e.images||[];let n=function(e,t){let i=e.match(Ie);if(null===i||!i[2])return null;if(Me.test(e))return null;let a=`${i[1]}:${i[2]||""}`;if(a){let i={file:a,lang:t._lang,domain:t._domain,wiki:e,pluginData:{}};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");let n=Pe(e),r=n.list||[];return n.alt&&(i.alt=n.alt),r=r.filter((e=>!1===Re.hasOwnProperty(e))),r[r.length-1]&&(i.caption=se(r[r.length-1])),new _(i)}return null}(a,t);n&&(e.images.push(n),i=i.replace(a,""))}})),e.wiki=i},Fe={},Be=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},Ke={lines(){return this.data},links(e){let t=[];if(this.lines().forEach((e=>{t=t.concat(e.links())})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},json(e){return e=p(e,Fe),this.lines().map((t=>t.json(e)))},text(){return((e,t)=>e.map((e=>" * "+e.text(t))).join("\n"))(this.data)},wikitext(){return this.wiki||""}};Object.keys(Ke).forEach((e=>{Be.prototype[e]=Ke[e]}));const We=/^[#*:;|]+/,He=/^\*+[^:,|]{4}/,Ye=/^ ?#[^:,|]{4}/,Ze=/[\p{Letter}_0-9\]}]/iu,Ge=function(e){return We.test(e)||He.test(e)||Ye.test(e)},Ve=function(e,t){let i=[];for(let a=t;ae&&Ze.test(e))),i=function(e){let t=1;e=e.filter((e=>e));for(let i=0;ie&&e.trim().length>0)),a=a.map((e=>{let i={wiki:e,lists:[],sentences:[],images:[]};return function(e){let t=e.wiki,i=t.split(/\n/g),a=[],n=[];for(let e=0;e0&&(a.push(t),e+=t.length-1)}else n.push(i[e]);e.lists=a.map((e=>new Be(e,t))),e.wiki=n.join("\n")}(i),Ue(i,t),le(i),new _e(i)})),e._wiki=i,e._paragraphs=a},Qe="{",et=function(e){let t=0,i=[],a=[];for(let n=e.indexOf(Qe);-1!==n&&n0?n++:n=e.indexOf(Qe,n+1)){let r=e[n];if(r===Qe&&(t+=1),t>0){if("}"===r&&(t-=1,0===t)){a.push(r);let e=a.join("");a=[],/\{\{/.test(e)&&/\}\}/.test(e)&&i.push(e);continue}if(1===t&&r!==Qe&&"}"!==r){t=0,a=[];continue}a.push(r)}}return i},tt=function(e){let t=null;return t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1],t&&(t=t.replace(/:.*/,""),t=qe(t)),t||null},it=/\{\{/,at=function(e){return{body:e,name:tt(e),children:[]}},nt=function(e){let t=e.body.substr(2);return t=t.replace(/\}\}$/,""),e.children=et(t),e.children=e.children.map(at),0===e.children.length||e.children.forEach((e=>{let t=e.body.substr(2);return it.test(t)?nt(e):null})),e},rt=function(e){let t=et(e);return t=t.map(at),t=t.map(nt),t},ot=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce(((e,t)=>(e[t]=!0,e)),{});var st={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0};const lt=new RegExp("^(subst.)?("+b.join("|")+")(?=:| |\n|$)","i");b.forEach((e=>{st[e]=!0}));const ct=/^infobox /i,ut=/ infobox$/i,mt=/^year in [A-Z]/i,pt=function(e={}){let t=e.template.match(lt),i=e.template;t&&t[0]&&(i=i.replace(t[0],"")),i=i.trim();let a={template:"infobox",type:i,data:e};return delete a.data.template,delete a.data.list,a};let dt={imdb:"imdb name","imdb episodes":"imdb episode",localday:"currentday",localdayname:"currentdayname",localyear:"currentyear","birth date based on age at death":"birth based on age as of date","bare anchored list":"anchored list",cvt:"convert",cricon:"flagicon",sfrac:"frac",sqrt:"radic","unreferenced section":"unreferenced",redir:"redirect",sisterlinks:"sister project links","main article":"main",by:"baseball year",aldsy:"alds year",nldsy:"nlds year","str rep":"replace",ushr2:"ushr",stn:"station",metrod:"metro",fw:"ferry",rws:"stnlnk",sclass2:"sclass",under:"underline",brackets:"bracket",raise:"lower"},ht={date:["byline","dateline"],citation:["cite","source","source-pr","source-science"],"no spam":["email","@","no spam blue"],"lrt station":["lrt","lrts"],"mrt station":["mrt","mrts"],flagcountry:["cr","cr-rt"],trunc:["str left","str crop"],percentage:["pct","percentage"],rnd:["rndfrac","rndnear"],abbr:["tooltip","abbrv","define"],sfn:["sfnref","harvid","harvnb"],"birth date and age":["death date and age","bda"],currentmonth:["localmonth","currentmonthname","currentmonthabbrev"],currency:["monnaie","unité","nombre","nb","iso4217"],coord:["coor","coor title dms","coor title dec","coor dms","coor dm","coor dec"],"columns-list":["cmn","col-list","columnslist","collist"],nihongo:["nihongo2","nihongo3","nihongo-s","nihongo foot"],plainlist:["flatlist","plain list"],"winning percentage":["winpct","winperc"],"collapsible list":["nblist","nonbulleted list","ubl","ublist","ubt","unbullet","unbulleted list","unbulleted","unbulletedlist","vunblist"],"election box begin":["election box begin no change","election box begin no party","election box begin no party no change","election box inline begin","election box inline begin no change"],"election box candidate":["election box candidate for alliance","election box candidate minor party","election box candidate no party link no change","election box candidate with party link","election box candidate with party link coalition 1918","election box candidate with party link no change","election box inline candidate","election box inline candidate no change","election box inline candidate with party link","election box inline candidate with party link no change","election box inline incumbent"],"4teambracket":["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"],start:["end","birth","death","start date","end date","birth date","death date","start date and age","end date and age","dob"],"start-date":["end-date","birth-date","death-date","birth-date and age","birth-date and given age","death-date and age","death-date and given age"],tl:["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","xpd","para","elc","xtag","mli","mlix","url"],done:["resolved mark large","implemented","pimplemented","resolved mark","accepted","agree","approved","checked2","verified","conditional yes","confirmed","confirmed-nc","tallyho","tick","helped","doneu|example","edited2","donetask","unprod","autp","responded","sure","merge done","marked","pass","aye","yes check","y&","yeac","yeag"],xmark:["expired","deleted","not done","not done empty request","not done unclear","not done not likely","stale-small","smallrejected","x mark","nay","no mark","not done-t","fail","n&","x mark-n","xed box","cancelled","deleted-image","already declined","opblocked","user-blocked","notabug","notfixed","won't fix","withdraw","nojoy","unrelated","off-topic talk","nayc","nayg"],checked:["already done","resolved1","check mark-n","checked box"],"station link":["amtk","cta","bts","mnrr","mtams","munis","njts","scax","wmata","rwsa"]};Object.keys(O).forEach((e=>{dt["ipa-"+e]="ipa",dt["ipac-"+e]="ipac"})),Object.keys(ht).forEach((e=>{ht[e].forEach((t=>{dt[t]=e}))}));var gt={"·":"·",dot:"·",middot:"·","•":" • ",",":",","=":"=","1/2":"1⁄2","1/3":"1⁄3","2/3":"2⁄3","1/4":"1⁄4","3/4":"3⁄4","–":"–",ndash:"–","en dash":"–","spaced ndash":" – ","—":"—",mdash:"—",spd:" – ","em dash":"—","number sign":"#","hash-tag":"#",ibeam:"I","&":"&",";":";",ampersand:"&",dagger:"†","double-dagger":"‡",snds:" – ",snd:" – ","^":" ","!":"|","'":"'","\\":" /","`":"`","[":"[","*":"*",asterisk:"*","long dash":"———",clear:"\n\n","h.":"ḥ",profit:"▲",loss:"▼",gain:"▲",ell:"ℓ","1~":"~","2~":"~~","3~":"~~~","4~":"~~~~","5~":"~~~~~",goldmedal:"🥇",silvermedal:"🥈",bronzemedal:"🥉",done:"✅",xmark:"❌",checked:"✔️","thumbs up":"👍","thumbs down":"👎",minusplus:"∓",plusminus:"±"};let bt={p1:0,p2:1,p3:2,resize:1,lang:1,"rtl-lang":1,l:2,h:1,sort:1};["defn","lino","finedetail","nobold","noitalic","nocaps","vanchor","rnd","date","taste","monthname","baseball secondary style","nowrap","nobr","big","cquote","pull quote","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code","char","angle bracket","angbr","symb","dabsearch","key press","nowiki","nowiki2","unstrip","unstripnowiki","plain text","make code","killmarkers","longitem","longlink","strikethrough","underline","uuline","not a typo","text","resize","var serif","double underline","nee","ne","left","right","center","centered","justify","smalldiv","bold div","monodiv","italic div","bigdiv","strikethroughdiv","strikethrough color","pbpe"].forEach((e=>{bt[e]=0}));["line-height"].forEach((e=>{bt[e]=1}));let ft={};["mv","m/v","gts","hsc","ms","m/s","my","m/y","ps","rms","rv","r/v","sb","ss","s/s","sv","s/v","sy","s/y","tss","ans","hmas","hmbs","bns","hmcs","ccgs","arc","hdms","bae","ens","eml","rfns","fns","hs","sms","smu","gs","icgv","ins","kri","lé","jsub","jds","js","hnlms","hmnzs","nns","hnoms","hmpngs","bap","rps","brp","orp","nrp","nms","rss","sas","hmsas","roks","hswms","htms","tcg","hms","hmt","rfaux","usat","uscgc","usns","usrc","uss","usav"].forEach((e=>{ft[e]=t=>{let{name:i,id:a}=Pe(t,["name","id"]);return a?`[[${e.toUpperCase()} ${i} (${a})]]`:`[[${e.toUpperCase()} ${i}]]`}}));const kt=function(e){if(!e.numerator&&!e.denominator)return null;let t=Number(e.numerator)/Number(e.denominator);return t*=100,Number(e.decimals),parseInt(t,10)},wt=function(e=""){if("number"==typeof e)return e;e=(e=e.replace(/,/g,"")).replace(/−/g,"-");let t=Number(e);return isNaN(t)?e:t},yt=function(e){let t=e.match(/ipac?-(.+)/);return null!==t?!0===O.hasOwnProperty(t[1])?O[t[1]].english_title:t[1]:null},$t=e=>e.charAt(0).toUpperCase()+e.substring(1),xt=function(e){let t=e%10,i=e%100;return 1===t&&11!==i?e+"st":2===t&&12!==i?e+"nd":3===t&&13!==i?e+"rd":e+"th"},vt={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"};var jt={ra:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:e=>(Pe(e,["degrees"]).degrees||"")+"°",hms2deg:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:e=>{let t=Pe(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},sortname:e=>{let t=Pe(e,["first","last","target","sort"]),i=`${t.first||""} ${t.last||""}`;return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=` (${t.dab})`,t.target&&(t.target+=` (${t.dab})`)),t.target?`[[${t.target}|${i}]]`:`[[${i}]]`)},"first word":e=>{let t=Pe(e,["text"]),i=t.text||"";return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:e=>{let t=Pe(e,["str","len"]);return(t.str||"").substr(0,t.len)},"str mid":e=>{let t=Pe(e,["str","start","end"]),i=parseInt(t.start,10)-1,a=parseInt(t.end,10);return t.str.substr(i,a)},reign:e=>{let t=Pe(e,["start","end"]);return`(r. ${t.start} – ${t.end})`},circa:e=>{let{year:t}=Pe(e,["year"]);return t?`c. ${t}`:"c. "},"decade link":e=>{let{year:t}=Pe(e,["year"]);return`${t}|${t}s`},decade:e=>{let t=Pe(e,["year"]),i=Number(t.year);return i=10*Math.floor(i/10),`${i}s`},century:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/100)+1,`${i}`},radic:e=>{let t=Pe(e,["after","before"]);return`${t.before||""}√${t.after||""}`},"medical cases chart/row":e=>e,oldstyledate:e=>{let t=Pe(e,["date","year"]);return t.year?t.date+" "+t.year:t.date},braces:e=>{let t=Pe(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},hlist:e=>{let t=Pe(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:e=>(Pe(e).list||[]).join(", "),catlist:e=>(Pe(e).list||[]).join(", "),"br separated entries":e=>(Pe(e).list||[]).join("\n\n"),"comma separated entries":e=>(Pe(e).list||[]).join(", "),"anchored list":e=>{let t=Pe(e).list||[];return t=t.map(((e,t)=>`${t+1}. ${e}`)),t.join("\n\n")},"bulleted list":e=>{let t=Pe(e).list||[];return t=t.filter((e=>e)),t=t.map((e=>"• "+e)),t.join("\n\n")},plainlist:e=>{let t=(e=Ee(e)).split("|").slice(1);return t=t.join("|").split(/\n ?\* ?/),t=t.filter((e=>e)),t.join("\n\n")},term:e=>`${Pe(e,["term"]).term}:`,linum:e=>{let{num:t,text:i}=Pe(e,["num","text"]);return`${t}. ${i}`},"block indent":e=>{let t=Pe(e);return t[1]?"\n"+t[1]+"\n":""},lbs:e=>{let t=Pe(e,["text"]);return`[[${t.text} Lifeboat Station|${t.text}]]`},lbc:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}-class]]`},lbb:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}]]`},"#dateformat":e=>(e=e.replace(/:/,"|"),Pe(e,["date","format"]).date),lc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toLowerCase()),uc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toUpperCase()),lcfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},ucfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbrlink:e=>{let t=Pe(e,["abbr","page"]);return t.page?`[[${t.page}|${t.abbr}]]`:`[[${t.abbr}]]`},own:e=>{let t=Pe(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},formatnum:e=>{e=e.replace(/:/,"|");let t=Pe(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},frac:e=>{let t=Pe(e,["a","b","c"]);return t.c?`${t.a} ${t.b}/${t.c}`:t.b?`${t.a}/${t.b}`:`1/${t.b}`},convert:e=>{let t=Pe(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?`${t.num} ${t.two} ${t.three} ${t.four}`:`${t.num} ${t.two} ${t.three}`:`${t.num} ${t.two}`},tl:e=>{let t=Pe(e,["first","second"]);return t.second||t.first},won:e=>{let t=Pe(e,["text"]);return t.place||t.text||$t(t.template)},tag:e=>{let t=Pe(e,["tag","open"]);const i={span:!0,div:!0,p:!0};return t.open&&"pair"!==t.open?"":i[t.tag]?t.content||"":`<${t.tag} ${t.attribs||""}>${t.content||""}`},plural:e=>{e=e.replace(/plural:/,"plural|");let t=Pe(e,["num","word"]),i=Number(t.num),a=t.word;return 1!==i&&(/.y$/.test(a)?a=a.replace(/y$/,"ies"):a+="s"),i+" "+a},dec:e=>{let t=Pe(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:e=>{let t=Pe(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());let a=i||"";return t.p&&(a=t.p+a),t.s&&(a=t.s+a),(t.u||t.ul||t.upl)&&(a=a+" "+(t.u||t.ul||t.upl)),a},percentage:e=>{let t=Pe(e,["numerator","denominator","decimals"]),i=kt(t);return null===i?"":i+"%"},small:e=>{let t=Pe(e);return t.list&&t.list[0]?t.list[0]:""},"percent-done":e=>{let t=Pe(e,["done","total","digits"]),i=kt({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":`${t.done} (${i}%) done`},loop:e=>{let t=Pe(e,["times","text"]),i=Number(t.times)||0,a="";for(let e=0;e{let t=Pe(e,["text"]);return String((t.text||"").trim().length)},digits:e=>(Pe(e,["text"]).text||"").replace(/[^0-9]/g,""),"last word":e=>{let t=(Pe(e,["text"]).text||"").split(/ /g);return t[t.length-1]||""},replace:e=>{let t=Pe(e,["text","from","to"]);return t.from&&t.to?(t.text||"").replace(t.from,t.to):t.text||""},"title case":e=>(Pe(e,["text"]).text||"").split(/ /).map(((e,t)=>t>0&&"the"===e||"of"===e?e:$t(e))).join(" "),"no spam":e=>{let t=Pe(e,["account","domain"]);return`${t.account||""}@${t.domain}`},"baseball year":e=>{let t=Pe(e,["year"]).year||"";return`[[${t} in baseball|${t}]]`},"mlb year":e=>{let t=Pe(e,["year"]).year||"";return`[[${t} Major League Baseball season|${t}]]`},"nlds year":e=>{let{year:t}=Pe(e,["year"]);return`[[${t||""} National League Division Series|${t}]]`},"alds year":e=>{let{year:t}=Pe(e,["year"]);return`[[${t||""} American League Division Series|${t}]]`},"nfl year":e=>{let{year:t,other:i}=Pe(e,["year","other"]);return i&&t?`[[${t} NFL season|${t}]]–[[${i} NFL season|${i}]]`:`[[${t||""} NFL season|${t}]]`},"nfl playoff year":e=>{let{year:t}=Pe(e,["year"]);return t=Number(t),`[[${t}–${t+1} NFL playoffs|${t}]]`},"nba year":e=>{let{year:t}=Pe(e,["year"]);t=Number(t);let i=t+1;return`[[${t}–${i} NBA season|${t}–${i}]]`},"mhl year":e=>{let t=Pe(e,["year"]),i=Number(t.year),a=i+1;return`[[${i}–${a} NHL season|${i}–${a}]]`},min:e=>{let t=Pe(e).list||[],i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t{let t=Pe(e).list,i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t>i&&(i=t)})),String(i)},uspolabbr:e=>{let{party:t,state:i,house:a}=Pe(e,["party","state","house","link"]);if(!t||!i)return"";let n=`${t}‑${i}`;return a&&(n+=` ${xt(a)}`),n},ushr:e=>{let{state:t,num:i,type:a}=Pe(e,["state","num","type"]),n="";if("AL"!==i)return i=xt(Number(i)),`${t}'s ${i} congressional district`;if(n=`${t}'s at-large congressional district`,a){if(a=a.toLowerCase(),i="AL"===i?"At-large":i,"e"===a)return`[[${n}|${i}]]`;if("u"===a)return`[[${n}|${t}]]`;if("b"===a||"x"===a)return`[[${n}|${t} ${i}]]`}return`[[${n}]]`},metro:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},station:e=>{let{name:t,dab:i}=Pe(e,["name","x","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},bssrws:e=>{let{one:t,two:i}=Pe(e,["one","two"]),a=t;return i&&(a+=" "+i),`[[${a} railway station|${a}]]`},stnlnk:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} railway station (${i})|${t}]]`:`[[${t} railway station|${t}]]`},"station link":e=>{let{station:t,system:i}=Pe(e,["system","station"]);return t||i},"line link":e=>{let{station:t,system:i}=Pe(e,["system","station"]);return t||i},subway:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} subway station|${t}]]`},"lrt station":e=>{let{name:t}=Pe(e,["name"]);return`[[${t} LRT station|${t}]]`},"mrt station":e=>{let{name:t}=Pe(e,["name"]);return`[[${t} MRT station|${t}]]`},rht:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} railway halt|${t}]]`},ferry:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} ferry wharf|${t}]]`},tram:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} tram stop (${i})|${t}]]`:`[[${t} tram stop|${t}]]`},tstop:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} ${i} stop|${t}]]`:`[[${t} stop|${t}]]`},ship:e=>{let{prefix:t,name:i,id:a}=Pe(e,["prefix","name","id"]);return t=t||"",`[[${t.toUpperCase()} ${i}]]`},sclass:e=>{let{cl:t,type:i}=Pe(e,["cl","type","fmt"]);return`[[${t}-class ${i} |''${t}''-class]] [[${i}]]`},"center block":e=>{let{txt:t}=Pe(e,["txt"]);return t||""},align:e=>{let{txt:t}=Pe(e,["dir","txt"]);return t||""},font:e=>{let{txt:t}=Pe(e,["txt"]);return t||""},float:e=>{let{txt:t,dir:i}=Pe(e,["dir","txt"]);return t?t||"":i},lower:e=>{let{txt:t,n:i}=Pe(e,["n","txt"]);return t?t||"":i},splitspan:e=>{let{left:t,right:i}=Pe(e,["left","right"]);return(t||"")+"\n"+(i||"")},bracket:e=>{let{word:t}=Pe(e,["word"]);return t?`[${t}]`:"["},"in title":e=>{let{title:t,text:i}=Pe(e,["title","text"]);return i||(t?`All pages with titles containing ${t}`:"")},"look from":e=>{let{title:t,text:i}=Pe(e,["title","text"]);return i||(t?`All pages with titles beginning with ${t}`:"")}};let _t={};["sr-latn-cyrl","sr-cyrl-latn","sr-latn","sr-cyrl","sr-cyr","sh-latn-cyrl","sh-cyrl-latn","sh-latn","sh-cyrl","cel-1bd","cel-x-proto","en-emodeng","de-at","de-ch","gem-x-proto","gsw-fr","nds-nl","nl-be","ku-arab","ku-cyrl","pt-br","fra-frc","fra-que","roa-leo","roa-nor","ca-valencia","ast-leo","grc-gre","grc-x-doric","grc-x-proto","grc-x-medieval","cpg","gmy","grc","grk-x-proto","pnt","mga","owl","pgl","sga","wlm","xbm","xcb","xcg","xpi","aae","aln","sq-definite","bs-cyrl","hsb","ltg","orv","prg","rsk","rue","rus","sgs","sla","szl","wen","aoa","chn","cri","dlm","egl","fax","frc","frm","fro","fr-gallo","oc-gascon","gcf","gcr","ist","la-x-medieval","lij-mc","lld","lou","mfe","mol","mwl","mxi","nrf","osc","osp","pcd","pln","rcf","rgn","roa","ruo","rup","ruq","sdc","sdn","src","sro","xvo","bzj","cim","dum","enm","frk","frr","frs","gmh","gml","gmw","goh","gos","gsw","gyn","icr","jam","kri","lng","nb","non","nrn","odt","ofs","osx","pey","sli","srm","srn","stq","swg","vmf","wae","wep","wes","zea","hmd","hoc","kha","mnw","mtq","vi-chunom","vi-hantu","mvi","rys","ryu","yoi","ace","akl","ami","bew","bik","bjn","bya","cal","cbk","cjm","coa","cyo","dev","fil","gad","hil","iba","ibg","ibl","ilp","itv","ivv","jax","kne","krj","kxd","ljp","mad","mak","mdh","mrv","mrw","ms-arab","nia","niu","pau","pwn","rap","rar","sgd","su-fonts","szy","tao","tkl","tsg","tvl","uli","wls","xsb","yap","yka","ckt","itl","brh","oty","tcy","abq","ady","ddo","inh","kbd","lbe","lez","rut","tab","uby","udi","bai","bin","bsq","dag","dyu","efi","fan","fmp","fuc","fuf","gaa","ibb","kbp","kcg","kpo","ktu","lu","lua","lun","mkw","mos","oaa","sjo","ude","anm","bft","blk","brx","dng","kjp","kjz","ksw","lbj","lus","aae","aaq","abe","abq","aca","ace","acf","acm","acw","ady","ae","aeb","aec","aer","afb","aht","aii","aij","ain","aiq","akk","akl","akz","ale","aln","alq","alt","ami","anm","aoa","apj","apm","apw","ayn","arb","arh","ari","arn","arp","arq","ary","arz","asb","ath","ats","awa","axm","azb","azd","azj","bai","bal","ban","bax","bdz","bea","ber","bew","bft","bgn","bho","bik","bin","bjn","bla","blc","blk","bqi","brh","brx","bsk","bsq","bua","bvb","bya","bzj","cal","cay","cbk","ccp","chg","chm","chn","chp","cic","cim","ciw","cjm","cjs","ckb","ckt","cku","cld","clm","cmg","cmn","cms","cnu","coa","coc","coj","com","coo","cop","cpg","crg","crh","cri","crj","crk","crl","crm","cro","csw","csz","ctg","ctm","cyo","dag","dak","ddo","deh","del","den","dev","din","dlm","dng","dum","dyu","efi","egl","egy","elx","eml","ems","cmn","och","yue","mjw","mni","my-name-mlcts","nan","nwc","omp","otb","pwo","sip","xct","xsr","1ca","alt","az-arab","azb","azj","chg","cjs","crh","crh3","kaa","kjh","krc","kum","nog","ota","otk","sah","slr","sty","tt-arab","tt-cyrl","tt-latn","tyv","uniturk","chm","est-sea","fit","fkv","izh","jmy","koi","krl","liv","mdf","mhr","mrj","myv","olo","sia","sjd","sje","sjk","sjt","sju","sma","smi","smj","smn","sms","vep","vot","vro","yrk","din","luo","srr","sus","swh","umb","yao"].forEach((e=>{_t["lang-"+e]=0})),Object.keys(O).forEach((e=>{_t["lang-"+e]=0}));var zt=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","us","united states"],["🇺🇸","usa","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]];const Ot=["flag","variant"];let Et={flag:e=>{let t=Pe(e,Ot),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();let a=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${a[0]||""} [[${a[2]}|${i}]]`},flagcountry:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} [[${i[2]}]]`},flagcu:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} ${i[2]}`},flagicon:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`[[${i[2]}|${i[0]}]]`:""},flagdeco:e=>{let t=Pe(e,Ot);return t.flag=(t.flag||"").toLowerCase(),(zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[])[0]||""},fb:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${i[2]} national football team|${i[2]}]]`:""},fbicon:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?` [[${i[2]} national football team|${i[0]}]]`:""},flagathlete:e=>{let t=Pe(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${t.name||""}]] (${i[1].toUpperCase()})`:`[[${t.name||""}]]`}};zt.forEach((e=>{Et[e[1]]=()=>e[0]}));let qt={};["rh","rh2","yes","no","maybe","eliminated","lost","safe","active","site active","coming soon","good","won","nom","sho","longlisted","tba","success","operational","failure","partial","regional","maybecheck","partial success","partial failure","okay","yes-no","some","nonpartisan","pending","unofficial","unofficial2","usually","rarely","sometimes","any","varies","black","non-album single","unreleased","unknown","perhaps","depends","included","dropped","terminated","beta","table-experimental","free","proprietary","nonfree","needs","nightly","release-candidate","planned","scheduled","incorrect","no result","cmain","calso starring","crecurring","cguest","not yet","optional"].forEach((e=>{qt[e]=e=>{let t=Pe(e,["text"]);return t.text||$t(t.template)}}));[["active fire","Active"],["site active","Active"],["site inactive","Inactive"],["yes2",""],["no2",""],["ya","✅"],["na","❌"],["nom","Nominated"],["sho","Shortlisted"],["tba","TBA"],["maybecheck","✔️"],["okay","Neutral"],["n/a","N/A"],["sdash","—"],["dunno","?"],["draw",""],["cnone",""],["nocontest",""]].forEach((e=>{qt[e[0]]=t=>Pe(t,["text"]).text||e[1]}));var Nt=Object.assign({},gt,bt,ft,jt,_t,Et,qt);let St={};["goodreads author","twitter","facebook","instagram","tumblr","pinterest","espn nfl","espn nhl","espn fc","hockeydb","fifa player","worldcat","worldcat id","nfl player","ted speaker","playmate"].forEach((e=>{St[e]=["id","name"]}));let Ct={};["imdb title","imdb name","imdb episode","imdb event","afi film","allmovie title","allgame","tcmdb title","discogs artist","discogs label","discogs release","discogs master","librivox author","musicbrainz artist","musicbrainz label","musicbrainz recording","musicbrainz release","musicbrainz work","youtube","goodreads book","dmoz"].forEach((e=>{Ct[e]=["id","title","description","section"]}));var Lt={ipa:(e,t)=>{let i=Pe(e,["transcription","lang","audio"]);return i.lang=yt(i.template),i.template="ipa",t.push(i),""},ipac:(e,t)=>{let i=Pe(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=yt(i.template),i.template="ipac",t.push(i),""},quote:(e,t)=>{let i=Pe(e,["text","author"]);if(t.push(i),i.text){let e=`"${i.text}"`;return i.author&&(e+="\n\n",e+=` - ${i.author}`),e+"\n"}return""},"cite gnis":(e,t)=>{let i=Pe(e,["id","name","type"]);return i.type="gnis",i.template="citation",t.push(i),""},"spoken wikipedia":(e,t)=>{let i=Pe(e,["file","date"]);return i.template="audio",t.push(i),""},yel:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`yellow: ${i.min||""}'`:""},subon:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub on: ${i.min||""}'`:""},suboff:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub off: ${i.min||""}'`:""},sfn:(e,t,i,a)=>{let n=Pe(e,["author","year","location"]);return a&&(n.name=n.template,n.teplate=a),t.push(n),""},redirect:(e,t)=>{let i=Pe(e,["redirect"]),a=i.list||[],n=[];for(let e=0;e{let i=Pe(e),a={};Object.keys(vt).forEach((e=>{!0===i.hasOwnProperty(e)&&(a[vt[e]]=i[e])}));let n={template:"sister project links",links:a};return t.push(n),""},"subject bar":(e,t)=>{let i=Pe(e);Object.keys(i).forEach((e=>{vt.hasOwnProperty(e)&&(i[vt[e]]=i[e],delete i[e])}));let a={template:"subject bar",links:i};return t.push(a),""},gallery:(e,t)=>{let i=Pe(e),a=(i.list||[]).filter((e=>/^ *File ?:/.test(e)));return a=a.map((e=>new _({file:e}).json())),i={template:"gallery",images:a},t.push(i),""},sky:(e,t)=>{let i=Pe(e,["asc_hours","asc_minutes","asc_seconds","dec_sign","dec_degrees","dec_minutes","dec_seconds","distance"]),a={template:"sky",ascension:{hours:i.asc_hours,minutes:i.asc_minutes,seconds:i.asc_seconds},declination:{sign:i.dec_sign,degrees:i.dec_degrees,minutes:i.dec_minutes,seconds:i.dec_seconds},distance:i.distance};return t.push(a),""},"medical cases chart":(e,t)=>{let i=["date","deathsExpr","recoveriesExpr","casesExpr","4thExpr","5thExpr","col1","col1Change","col2","col2Change"],a=Pe(e);a.data=a.data||"";let n=a.data.split("\n").map((e=>{let t=e.split(";"),a={options:new Map},n=0;for(let e=0;e{let i=Pe(e);i.x&&(i.x=i.x.split(",").map((e=>e.trim()))),i.y&&(i.y=i.y.split(",").map((e=>e.trim())));let a=1;for(;i["y"+a];)i["y"+a]=i["y"+a].split(",").map((e=>e.trim())),a+=1;return t.push(i),""},"historical populations":(e,t)=>{let i=Pe(e);i.list=i.list||[];let a=[];for(let e=0;e{const i=/^jan /i,a=/^year /i;let n=Pe(e);const r=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];let o={},s=Object.keys(n).filter((e=>i.test(e)));s=s.map((e=>e.replace(i,""))),s.forEach((e=>{o[e]=[],r.forEach((t=>{let i=`${t} ${e}`;if(n.hasOwnProperty(i)){let t=wt(n[i]);delete n[i],o[e].push(t)}}))})),n.byMonth=o;let l={};return Object.keys(n).forEach((e=>{if(a.test(e)){let t=e.replace(a,"");l[t]=n[e],delete n[e]}})),n.byYear=l,t.push(n),""},"weather box/concise c":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>wt(e))),i.byMonth={"high c":i.list.slice(0,12),"low c":i.list.slice(12,24),"rain mm":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"weather box/concise f":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>wt(e))),i.byMonth={"high f":i.list.slice(0,12),"low f":i.list.slice(12,24),"rain inch":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"climate chart":(e,t)=>{let i=Pe(e).list||[],a=i[0],n=i[38];i=i.slice(1),i=i.map((e=>(e&&"−"===e[0]&&(e=e.replace(/−/,"-")),e)));let r=[];for(let e=0;e<36;e+=3)r.push({low:wt(i[e]),high:wt(i[e+1]),precip:wt(i[e+2])});let o={template:"climate chart",data:{title:a,source:n,months:r}};return t.push(o),""},medalcount:(e,t)=>{let i=Pe(e).list||[],a=[];for(let e=0;e{let i=Pe(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},legend:(e,t)=>{let i=Pe(e,["color","label"]);return t.push(i),e},isbn:(e,t)=>{let i=Pe(e,["id","id2","id3"]);return t.push(i),"ISBN "+(i.id||"")},"based on":(e,t)=>{let i=Pe(e,["title","author"]);return t.push(i),`${i.title} by ${i.author||""}`},"bbl to t":(e,t)=>{let i=Pe(e,["barrels"]);return t.push(i),"0"===i.barrels?i.barrels+" barrel":i.barrels+" barrels"},mpc:(e,t)=>{let i=Pe(e,["number","text"]);return t.push(i),`[https://minorplanetcenter.net/db_search/show_object?object_id=P/2011+NO1 ${i.text||i.number}]`},pengoal:(e,t)=>(t.push({template:"pengoal"}),"✅"),penmiss:(e,t)=>(t.push({template:"penmiss"}),"❌"),"ordered list":(e,t)=>{let i=Pe(e);return t.push(i),i.list=i.list||[],i.list.map(((e,t)=>`${t+1}. ${e}`)).join("\n\n")},"title year":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b[0-9]{4}\b/);if(e)return e[0]}return r.nomatch||""},"title century":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)(st|nd|rd|th)\b/);if(e)return e[1]||""}return r.nomatch||""},"title decade":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)s\b/);if(e)return e[1]||""}return r.nomatch||""},nihongo:(e,t)=>{let i=Pe(e,["english","kanji","romaji","extra"]);t.push(i);let a=i.english||i.romaji||"";return i.kanji&&(a+=` (${i.kanji})`),a},marriage:(e,t)=>{let i=Pe(e,["spouse","from","to","end"]);t.push(i);let a=i.spouse||"";return i.from&&(i.to?a+=` (m. ${i.from}-${i.to})`:a+=` (m. ${i.from})`),a},"sent off":(e,t)=>{let i=Pe(e,["cards"]),a={template:"sent off",cards:i.cards,minutes:i.list||[]};return t.push(a),"sent off: "+a.minutes.map((e=>e+"'")).join(", ")},transl:(e,t)=>{let i=Pe(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""},"collapsible list":(e,t)=>{let i=Pe(e);t.push(i);let a="";if(i.title&&(a+=`'''${i.title}'''\n\n`),!i.list){i.list=[];for(let e=1;e<10;e+=1)i[e]&&(i.list.push(i[e]),delete i[e])}return i.list=i.list.filter((e=>e)),a+=i.list.join("\n\n"),a},"columns-list":(e,t)=>{let i=((Pe(e).list||[])[0]||"").split(/\n/).filter((e=>e));return i=i.map((e=>e.replace(/\*/,""))),t.push({template:"columns-list",list:i}),i=i.map((e=>"• "+e)),i.join("\n\n")},height:(e,t)=>{let i=Pe(e);t.push(i);let a=[];return["m","cm","ft","in"].forEach((e=>{!0===i.hasOwnProperty(e)&&a.push(i[e]+e)})),a.join(" ")},sic:(e,t)=>{let i=Pe(e,["one","two","three"]),a=(i.one||"")+(i.two||"");return"?"===i.one&&(a=(i.two||"")+(i.three||"")),t.push({template:"sic",word:a}),"y"===i.nolink?a:`${a} [sic]`},inrconvert:(e,t)=>{let i=Pe(e,["rupee_value","currency_formatting"]);t.push(i);const a={k:1e3,m:1e6,b:1e9,t:1e12,l:1e5,c:1e7,lc:1e12};if(i.currency_formatting){let e=a[i.currency_formatting]||1;i.rupee_value=i.rupee_value*e}return`inr ${i.rupee_value||""}`},frac:(e,t)=>{let i=Pe(e,["a","b","c"]),a={template:"sfrac"};return i.c?(a.integer=i.a,a.numerator=i.b,a.denominator=i.c):i.b?(a.numerator=i.a,a.denominator=i.b):(a.numerator=1,a.denominator=i.a),t.push(a),a.integer?`${a.integer} ${a.numerator}⁄${a.denominator}`:`${a.numerator}⁄${a.denominator}`},"winning percentage":(e,t)=>{let i=Pe(e,["wins","losses","ties"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=Number(i.ties)||0,o=a+n+r;"y"===i.ignore_ties&&(r=0),r&&(a+=r/2);let s=kt({numerator:a,denominator:o,decimals:1});return null===s?"":"."+10*s},winlosspct:(e,t)=>{let i=Pe(e,["wins","losses"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=kt({numerator:a,denominator:a+n,decimals:1});return null===r?"":`${a||0} || ${n||0} || ${"."+10*r||"-"}`},"video game release":(e,t)=>{let i=["region","date","region2","date2","region3","date3","region4","date4"],a=Pe(e,i),n={template:"video game release",releases:[]};for(let e=0;e`${e.region}: ${e.date||""}`)).join("\n\n")+"\n"},uss:(e,t)=>{let i=Pe(e,["name","id"]);return t.push(i),i.id?`[[USS ${i.name} (${i.id})|USS ''${i.name}'' (${i.id})]]`:`[[USS ${i.name}|USS ''${i.name}'']]`},blockquote:(e,t)=>{let i=Pe(e,["text","author","title","source","character"]);t.push(i);let a=i.text;a||(i.list=i.list||[],a=i.list[0]||"");let n=a.replace(/"/g,"'");return n='"'+n+'"',n}};const It={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},Mt=(e,t)=>{let i=Pe(e,["amount","code"]);t.push(i);let a=i.template||"";"currency"===a?(a=i.code,a||(i.code=a="usd")):""!==a&&"monnaie"!==a&&"unité"!==a&&"nombre"!==a&&"nb"!==a||(a=i.code),a=(a||"").toLowerCase(),"us"===a?i.code=a="usd":"uk"===a&&(i.code=a="gbp");let n=`${It[a]||""}${i.amount||""}`;return i.code&&!It[i.code.toLowerCase()]&&(n+=" "+i.code),n};let Rt={currency:Mt};Object.keys(It).forEach((e=>{Rt[e]=Mt}));const Ut=864e5,Ft=30*Ut,Bt=365*Ut,Kt=function(e){return new Date(`${e.year}-${e.month||0}-${e.date||1}`).getTime()},Wt=function(e,t){e=Kt(e);let i=(t=Kt(t))-e,a={},n=Math.floor(i/Bt);n>0&&(a.years=n,i-=a.years*Bt);let r=Math.floor(i/Ft);r>0&&(a.months=r,i-=a.months*Ft);let o=Math.floor(i/Ut);return o>0&&(a.days=o),a},Ht=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Yt=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],Zt=Yt.reduce(((e,t,i)=>(0===i||(e[t.toLowerCase()]=i,e[t.substring(0,3).toLowerCase()]=i),e)),{}),Gt=function(e){let t={},i=["year","month","date","hour","minute","second"];for(let a=0;a{let i=Pe(e,["year","month","date","hour","minute","second","timezone"]),a=Gt([i.year,i.month,i.date||i.day]);return i.text=Jt(a),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=` (${i.timezone})`),i.hour&&i.minute&&(i.second?i.text=`${i.hour}:${i.minute}:${i.second}, `+i.text:i.text=`${i.hour}:${i.minute}, `+i.text),i.text&&t.push(Xt(i)),i.text},natural_date:(e,t)=>{let i=Pe(e,["text"]).text||"",a={};if(/^[0-9]{4}$/.test(i))a.year=parseInt(i,10);else{let e=i.replace(/[a-z]+\/[a-z]+/i,"");e=e.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");let t=new Date(e);!1===isNaN(t.getTime())&&(a.year=t.getFullYear(),a.month=t.getMonth()+1,a.date=t.getDate())}return t.push(Xt(a)),i.trim()},one_year:(e,t)=>{let i=Pe(e,["year"]),a=Number(i.year);return t.push(Xt({year:a})),String(a)},two_dates:(e,t)=>{let i=Pe(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){let e=Gt([i.birth_year,i.birth_month,i.birth_date]);return t.push(Xt(e)),Jt(e)}let a=Gt([i.death_year,i.death_month,i.death_date]);return t.push(Xt(a)),Jt(a)},age:e=>{let t=Qt(e);return Wt(t.from,t.to).years||0},"diff-y":e=>{let t=Qt(e),i=Wt(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),a.join(", ")},"diff-ymd":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-yd":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-d":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")}},ti=["January","February","March","April","May","June","July","August","September","October","November","December"];var ii={currentday:()=>{let e=new Date;return String(e.getDate())},currentdayname:()=>{let e=new Date;return Ht[e.getDay()]},currentmonth:()=>{let e=new Date;return ti[e.getMonth()]},currentyear:()=>{let e=new Date;return String(e.getFullYear())},monthyear:()=>{let e=new Date;return ti[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":()=>{let e=new Date;return e.setMonth(e.getMonth()-1),ti[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":()=>{let e=new Date;return e.setMonth(e.getMonth()+1),ti[e.getMonth()]+" "+e.getFullYear()},year:e=>{let t=Pe(e,["date"]).date,i=new Date(t);return t&&!1===isNaN(i.getTime())?String(i.getFullYear()):""},"time ago":e=>function(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let i=(new Date).getTime()-t.getTime(),a="ago";i<0&&(a="from now",i=Math.abs(i));let n=i/1e3/60/60/24;return n<365?Number(n)+" days "+a:Number(n/365)+" years "+a}(Pe(e,["date","fmt"]).date),"birth date and age":(e,t)=>{let i=Pe(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?ei.natural_date(e,t):(t.push(i),i=Gt([i.year,i.month,i.day]),Jt(i))},"birth year and age":(e,t)=>{let i=Pe(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return ei.natural_date(e,t);t.push(i);let a=(new Date).getFullYear()-parseInt(i.birth_year,10);i=Gt([i.birth_year,i.birth_month]);let n=Jt(i);return a&&(n+=` (age ${a})`),n},"death year and age":(e,t)=>{let i=Pe(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?ei.natural_date(e,t):(t.push(i),i=Gt([i.death_year,i.death_month]),Jt(i))},"birth date and age2":(e,t)=>{let i=Pe(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=Gt([i.birth_year,i.birth_month,i.birth_day]),Jt(i)},"birth based on age as of date":(e,t)=>{let i=Pe(e,["age","year","month","day"]);t.push(i);let a=parseInt(i.age,10),n=parseInt(i.year,10)-a;return n&&a?`${n} (age ${i.age})`:`(age ${i.age})`},"death date and given age":(e,t)=>{let i=Pe(e,["year","month","day","age"]);t.push(i),i=Gt([i.year,i.month,i.day]);let a=Jt(i);return i.age&&(a+=` (age ${i.age})`),a},dts:e=>{e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");let t=Pe(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},time:()=>{let e=new Date,t=Gt([e.getFullYear(),e.getMonth(),e.getDate()]);return Jt(t)},millennium:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/1e3)+1,t.abbr&&"y"===t.abbr?i<0?`${xt(Math.abs(i))} BC`:`${xt(i)}`:`${xt(i)} millennium`},start:ei.date,"start-date":ei.natural_date,birthdeathage:ei.two_dates,age:ei.age,"age nts":ei.age,"age in years":ei["diff-y"],"age in years and months":ei["diff-ym"],"age in years, months and days":ei["diff-ymd"],"age in years and days":ei["diff-yd"],"age in days":ei["diff-d"]};function ai(e){let t=e.pop(),i=Number(e[0]||0),a=Number(e[1]||0),n=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;let r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+a/60+n/3600)}const ni=function(e){if("number"!=typeof e)return e;let t=1e5;return Math.round(e*t)/t},ri={s:!0,w:!0},oi=function(e){let t=Pe(e);t=function(e){return e.list=e.list||[],e.list=e.list.map((t=>{let i=Number(t);if(!isNaN(i))return i;let a=t.split(/:/);return a.length>1?(e.props=e.props||{},e.props[a[0]]=a.slice(1).join(":"),null):t})),e.list=e.list.filter((e=>null!==e)),e}(t);let i=function(e){const t=e.map((e=>typeof e)).join("|");return 2===e.length&&"number|number"===t?{lat:e[0],lon:e[1]}:4===e.length&&"number|string|number|string"===t?(ri[e[1].toLowerCase()]&&(e[0]*=-1),"w"===e[3].toLowerCase()&&(e[2]*=-1),{lat:e[0],lon:e[2]}):6===e.length?{lat:ai(e.slice(0,3)),lon:ai(e.slice(3))}:8===e.length?{lat:ai(e.slice(0,4)),lon:ai(e.slice(4))}:{}}(t.list);return t.lat=ni(i.lat),t.lon=ni(i.lon),t.template="coord",delete t.list,t},si={coord:(e,t)=>{let i=oi(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":`${i.lat||""}°N, ${i.lon||""}°W`}},li=function(e,t,i,a){let n=Pe(e);return a&&(n.name=n.template,n.template=a),t.push(n),""},ci={persondata:li,taxobox:li,citation:li,portal:li,reflist:li,"cite book":li,"cite journal":li,"cite web":li,"commons cat":li,"election box candidate":li,"election box begin":li,main:li},ui={adx:"adx",aim:"aim",amex:"amex",asx:"asx",athex:"athex",b3:"b3","B3 (stock exchange)":"B3 (stock exchange)",barbadosse:"barbadosse",bbv:"bbv",bcba:"bcba",bcs:"bcs",bhse:"bhse",bist:"bist",bit:"bit","bm&f bovespa":"b3","bm&f":"b3",bmad:"bmad",bmv:"bmv","bombay stock exchange":"bombay stock exchange","botswana stock exchange":"botswana stock exchange",bpse:"bpse",bse:"bse",bsx:"bsx",bvb:"bvb",bvc:"bvc",bvl:"bvl",bvpasa:"bvpasa",bwse:"bwse","canadian securities exchange":"canadian securities exchange",cse:"cse",darse:"darse",dfm:"dfm",dse:"dse",euronext:"euronext",euronextparis:"euronextparis",fse:"fse",fwb:"fwb",gse:"gse",gtsm:"gtsm",idx:"idx",ise:"ise",iseq:"iseq",isin:"isin",jasdaq:"jasdaq",jse:"jse",kase:"kase",kn:"kn",krx:"krx",lse:"lse",luxse:"luxse","malta stock exchange":"malta stock exchange",mai:"mai",mcx:"mcx",mutf:"mutf",myx:"myx",nag:"nag","nasdaq dubai":"nasdaq dubai",nasdaq:"nasdaq",neeq:"neeq",nepse:"nepse",nex:"nex",nse:"nse",newconnect:"newconnect","nyse arca":"nyse arca",nyse:"nyse",nzx:"nzx","omx baltic":"omx baltic",omx:"omx",ose:"ose","otc expert":"otc expert","otc grey":"otc grey","otc pink":"otc pink",otcqb:"otcqb",otcqx:"otcqx","pfts ukraine stock exchange":"pfts ukraine stock exchange","philippine stock exchange":"philippine stock exchange",prse:"prse",psx:"psx",karse:"karse",qe:"qe","saudi stock exchange":"saudi stock exchange",sehk:"sehk","Stock Exchange of Thailand":"Stock Exchange of Thailand",set:"set",sgx:"sgx",sse:"sse",swx:"swx",szse:"szse",tase:"tase","tsx-v":"tsx-v",tsx:"tsx",tsxv:"tsxv",ttse:"ttse",twse:"twse",tyo:"tyo",wbag:"wbag",wse:"wse","zagreb stock exchange":"zagreb stock exchange","zimbabwe stock exchange":"zimbabwe stock exchange",zse:"zse"},mi=(e,t)=>{let i=Pe(e,["ticketnumber","code"]);t.push(i);let a=i.template||"";""===a&&(a=i.code),a=(a||"").toLowerCase();let n=ui[a]||"";return i.ticketnumber&&(n=`${n}: ${i.ticketnumber}`),i.code&&!ui[i.code.toLowerCase()]&&(n+=" "+i.code),n},pi={};Object.keys(ui).forEach((e=>{pi[e]=mi}));const di=function(e){return 1===(e=String(e)).length&&(e="0"+e),e},hi=function(e,t,i){e[`rd${t}-team${di(i)}`]&&(i=di(i));let a=e[`rd${t}-score${i}`],n=Number(a);return!1===isNaN(n)&&(a=n),{team:e[`rd${t}-team${i}`],score:a,seed:e[`rd${t}-seed${i}`]}},gi=function(e){let t=[],i=Pe(e);for(let e=1;e<7;e+=1){let a=[];for(let t=1;t<16;t+=2){let n=`rd${e}-team`;if(!i[n+t]&&!i[n+di(t)])break;{let n=hi(i,e,t),r=hi(i,e,t+1);a.push([n,r])}}a.length>0&&t.push(a)}return{template:"playoffbracket",rounds:t}};let bi={"4teambracket":function(e,t){let i=gi(e);return t.push(i),""},player:(e,t)=>{let i=Pe(e,["number","country","name","dl"]);t.push(i);let a=`[[${i.name}]]`;if(i.country){let e=(i.country||"").toLowerCase(),t=zt.find((t=>e===t[1]||e===t[2]))||[];t&&t[0]&&(a=t[0]+" "+a)}return i.number&&(a=i.number+" "+a),a},goal:(e,t)=>{let i={template:"goal",data:[]},a=Pe(e).list||[];for(let e=0;e{let t=e.note;return t&&(t=` (${t})`),e.min+"'"+t})).join(", "),n},"sports table":(e,t)=>{let i=Pe(e),a={};Object.keys(i).filter((e=>/^team[0-9]/.test(e))).map((e=>i[e].toLowerCase())).forEach((e=>{a[e]={name:i[`name_${e}`],win:Number(i[`win_${e}`])||0,loss:Number(i[`loss_${e}`])||0,tie:Number(i[`tie_${e}`])||0,otloss:Number(i[`otloss_${e}`])||0,goals_for:Number(i[`gf_${e}`])||0,goals_against:Number(i[`ga_${e}`])||0}}));let n={date:i.update,header:i.table_header,teams:a};t.push(n)},"cbb roster/header":function(){return'{| class="wikitable"\n |-\n ! POS\n ! #\n ! Name\n ! Height\n ! Weight\n ! Year\n ! Previous School\n ! Hometown\n |-\n'},"cbb roster/player":function(e,t){let i=Pe(e);return t.push(i),`|-\n| ${i.pos||""}\n| ${i.num||""}\n| ${i.first||""} ${i.last||""}\n| ${i.ft||""}${i.in||""}\n| ${i.lbs||""}\n| ${i.class||""}\n| ${i.high_school||""}\n| ${i.home||""}\n`},"cbb roster/footer":function(){return"\n|}"}};var fi=Object.assign({},Dt,Tt,Rt,ii,si,ci,pi,gi,bi);let ki=Object.assign({},Nt,Pt,fi);Object.keys(dt).forEach((e=>{ki[e]=ki[dt[e]]}));const wi=["0","1","2","3","4","5","6","7","8","9"],yi=function(e,t){let i=e.name;if(!0===ot.hasOwnProperty(i))return[""];if(!0===function(e){return!0===st.hasOwnProperty(e)||!!lt.test(e)||!(!ct.test(e)&&!ut.test(e))||!!mt.test(e)}(i)){let t=Pe(e.body,[],"raw");return["",pt(t)]}if(!0===/^cite [a-z]/.test(i)){let t=Pe(e.body);return t.type=t.template,t.template="citation",["",t]}if(!0===ki.hasOwnProperty(i)){if("number"==typeof ki[i]){return[Pe(e.body,wi)[String(ki[i])]||""]}if("string"==typeof ki[i])return[ki[i]];if(!0===o(ki[i])){return["",Pe(e.body,ki[i])]}if(!0===((a=ki[i])&&"[object Object]"===Object.prototype.toString.call(a))){let t=Pe(e.body,ki[i].props);return[t[ki[i].out],t]}if("function"==typeof ki[i]){let a=[];return[ki[i](e.body,a,Pe,null,t),a[0]]}}var a;if(t&&t._templateFallbackFn){let i=[],a=t._templateFallbackFn(e.body,i,Pe,null,t);if(null!==a)return[a,i[0]]}let n=Pe(e.body);return 0===Object.keys(n).length&&(n=null),["",n]},$i=(e="")=>(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim(),xi=function(e,t){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},vi={type:function(){return this._type},links:function(e){let t=[];if(Object.keys(this.data).forEach((e=>{this.data[e].links().forEach((e=>t.push(e)))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},image:function(){let e=this.data.image||this.data.image2||this.data.logo||this.data.image_skyline||this.data.image_flag;if(!e)return null;let t=e.json(),i=t.text;return t.file=i,t.text="",t.caption=this.data.caption,t.domain=this.domain,new _(t)},get:function(e){let t=Object.keys(this.data);if("string"==typeof e){let i=$i(e);for(let e=0;e{for(let i=0;i(e.data[i]&&(t[i]=e.data[i].json()),t)),{});return!0===t.encode&&(i=W(i)),i}(this,e=e||{})},wikitext:function(){return this.wiki||""},keyValue:function(){return Object.keys(this.data).reduce(((e,t)=>(this.data[t]&&(e[t]=this.data[t].text()),e)),{})}};Object.keys(vi).forEach((e=>{xi.prototype[e]=vi[e]})),xi.prototype.data=xi.prototype.keyValue,xi.prototype.template=xi.prototype.type,xi.prototype.images=xi.prototype.image;const ji=function(e,t){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},_i={title:function(){let e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){let t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},text:function(){return""},wikitext:function(){return this.wiki||""},json:function(e={}){let t=this.data||{};return!0===e.encode&&(t=Object.assign({},t),t=W(t)),t}};Object.keys(_i).forEach((e=>{ji.prototype[e]=_i[e]}));const zi={text:function(){return se(this._text||"").text()},json:function(){return this.data||{}},wikitext:function(){return this.wiki||""}},Oi=function(e,t="",i=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_text",{enumerable:!1,value:t}),Object.defineProperty(this,"wiki",{enumerable:!1,value:i})};Object.keys(zi).forEach((e=>{Oi.prototype[e]=zi[e]}));const Ei=/^(cite |citation)/i,qi={citation:!0,refn:!0,harvnb:!0,source:!0},Ni=function(e,t){let{list:i,wiki:a}=function(e,t){let i=[],a=rt(e);const n=function(a,r){a.parent=r,a.children&&a.children.length>0&&a.children.forEach((e=>n(e,a)));let[o,s]=yi(a,t);a.wiki=o,s&&i.push({name:a.name,wiki:a.body,nested:Boolean(a.parent),text:o,json:s});const l=function(e,t,i){e.parent&&(e.parent.body=e.parent.body.replace(t,i),l(e.parent,t,i))};l(a,a.body,a.wiki),e=e.replace(a.body,a.wiki)};return a.forEach((e=>n(e,null))),a.forEach((t=>{e=e.replace(t.body,t.wiki)})),{list:i,wiki:e}}(e._wiki,t),n=t?t._domain:null,{infoboxes:r,references:o,templates:s}=function(e,t){let i={infoboxes:[],templates:[],references:[]};return e.forEach((e=>{let a=e.json,n=a.template||a.type||a.name;if(!0!==qi[n]&&!0!==Ei.test(n))return"infobox"===a.template&&"yes"!==a.subbox?(a.domain=t,a.data=a.data||{},void i.infoboxes.push(new xi(a,e.wiki))):void i.templates.push(new Oi(a,e.text,e.wiki));i.references.push(new ji(a,e.wiki))})),i}(i,n);e._infoboxes=e._infoboxes||[],e._references=e._references||[],e._templates=e._templates||[],e._infoboxes=e._infoboxes.concat(r),e._references=e._references.concat(o),e._templates=e._templates.concat(s),e._wiki=a},Si=function(e){return/^ *\{\{ *(cite|citation)/i.test(e)&&/\}\} *$/.test(e)&&!1===/citation needed/i.test(e)},Ci=function(e){let t=Pe(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Li=function(e){return{template:"citation",type:"inline",data:{},inline:se(e)||{}}},Ai=function(e){let t=[],i=e._wiki;i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Si(a)){let n=Ci(a);n&&t.push({json:n,wiki:e}),i=i.replace(a,"")}else t.push({json:Li(a),wiki:e});return" "})),i=i.replace(/ ?]{0,200}?\/> ?/gi," "),i=i.replace(/ ?]{0,200}>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Si(a)){let e=Ci(a);e&&t.push({json:e,wiki:a}),i=i.replace(a,"")}else t.push({json:Li(a),wiki:e});return" "})),i=i.replace(/ ?<[ /]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ /]?> ?/g," "),e._references=t.map((e=>new ji(e.json,e.wiki))),e._wiki=i},Pi={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]};let Di=["res","record","opponent","method","event","date","round","time","location","notes"];const Ti=function(e,t){const i={templates:[],text:e._wiki};var a;return function(e,t){e.text=e.text.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(i=>{let a={_wiki:i,_templates:[]};Ni(a,t);let n=a._templates.map((e=>e.json())),r=n.find((e=>"election box"===e.template))||{},o=n.filter((e=>"election box candidate"===e.template)),s=n.find((e=>"election box gain"===e.template||"election box hold"===e.template))||{};return(o.length>0||s)&&e.templates.push({template:"election box",title:r.title,candidates:o,summary:s.data}),""}))}(i,t),function(e,t,i){e.text=e.text.replace(/]*)>([\s\S]+)<\/gallery>/g,((a,n,r)=>{let o=r.split(/\n/g);return o=o.filter((e=>e&&""!==e.trim())),o=o.map((e=>{let i=e.split(/\|/),a={file:i[0].trim(),lang:t.lang(),domain:t.domain()},n=new _(a).json(),r=i.slice(1).join("|");return""!==r&&(n.caption=se(r)),n})),o.length>0&&e.templates.push({template:"gallery",images:o,pos:i.title}),""}))}(i,t,e),(a=i).text=a.text.replace(/]*)>([\s\S]*?)<\/math>/g,((e,t,i)=>{let n=se(i).text();return a.templates.push({template:"math",formula:n,raw:i}),n&&n.length<12?n:""})),a.text=a.text.replace(/]*)>([\s\S]*?)<\/chem>/g,((e,t,i)=>(a.templates.push({template:"chem",data:i}),""))),function(e){e.text=e.text.replace(/\{\{mlb game log /gi,"{{game log "),e.text=e.text.replace(/\{\{game log (section|month)[\s\S]+?\{\{game log (section|month) end\}\}/gi,(t=>{let i=function(e){let t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{game log (section|month) end\}\}/i,"");let a="! "+i.join(" !! "),n=be("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mlb game log section",data:n}),""}))}(i),function(e){e.text=e.text.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(t=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");let i="! "+Di.join(" !! "),a=be("{|\n"+i+"\n"+t+"\n|}");return a=a.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mma record start",data:a}),""}))}(i),function(e){e.text=e.text.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,((t,i)=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();let a="! "+Pi[i].join(" !! "),n=be("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"NBA "+i+" statistics",data:n}),""}))}(i),i.templates=i.templates.map((e=>new Oi(e))),i},Ii={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0};class Mi{constructor(e,t){let i={doc:t,title:e.title||"",depth:e.depth,wiki:e.wiki||"",templates:[],tables:[],infoboxes:[],references:[],paragraphs:[]};Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})}));const a=Ti(this,t);this._wiki=a.text,this._templates=this._templates.concat(a.templates),Ai(this),Ni(this,t),function(e){let t=[],i=e._wiki,a=i.split("\n"),n=[];for(let e=0;e0&&(n[n.length-1]+="\n"+a[e]);else{n[n.length-1]+="\n"+a[e];let i=n.pop();t.push(i)}else n.push(a[e]);let r=[];t.forEach((e=>{if(e){i=i.replace(e+"\n",""),i=i.replace(e,"");let t=be(e);t&&t.length>0&&r.push(new we(t,e))}})),r.length>0&&(e._tables=r),e._wiki=i}(this),Xe(this,t)}title(){return this._title||""}index(){if(!this._doc)return null;let e=this._doc.sections().indexOf(this);return-1===e?null:e}depth(){return this._depth}indentation(){return this.depth()}sentences(){return this.paragraphs().reduce(((e,t)=>e.concat(t.sentences())),[])}paragraphs(){return this._paragraphs||[]}links(e){let t=[];if(this.infoboxes().forEach((e=>{t.push(e.links())})),this.sentences().forEach((e=>{t.push(e.links())})),this.tables().forEach((e=>{t.push(e.links())})),this.lists().forEach((e=>{t.push(e.links())})),t=t.reduce(((e,t)=>e.concat(t)),[]).filter((e=>void 0!==e)),"string"==typeof e){let i=t.find((t=>t.page().toLowerCase()===e.toLowerCase()));return void 0===i?[]:[i]}return t}tables(){return this._tables||[]}templates(e){let t=this._templates||[];return"string"==typeof e?(e=e.toLowerCase(),t.filter((t=>t.data.template===e||t.data.name===e))):t}infoboxes(e){let t=this._infoboxes||[];return"string"==typeof e?(e=(e=e.replace(/^infobox /i,"")).trim().toLowerCase(),t.filter((t=>t._type===e))):t}coordinates(){return[...this.templates("coord"),...this.templates("coor")].map((e=>e.json()))}lists(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.lists())})),e}interwiki(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.interwiki())})),e}images(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.images())})),e}references(){return this._references||[]}remove(){if(!this._doc)return null;let e={};e[this.title()]=!0,this.children().forEach((t=>e[t.title()]=!0));let t=this._doc.sections();return t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),this._doc._sections=t,this._doc}nextSibling(){if(!this._doc)return null;let e=this._doc.sections();for(let t=(this.index()||0)+1;tthis.depth())for(let e=i+1;ethis.depth();e+=1)a.push(t[e]);return"string"==typeof e?a.find((t=>t.title().toLowerCase()===e.toLowerCase())):a}sections(e){return this.children(e)}parent(){if(!this._doc)return null;let e=this._doc.sections();for(let t=this.index()||0;t>=0;t-=1)if(e[t]&&e[t].depth()t.text(e))).join("\n\n")}wikitext(){return this._wiki}json(e){return function(e,t){let i={};if(!0===(t=p(t,H)).headers&&(i.title=e.title()),!0===t.depth&&(i.depth=e.depth()),!0===t.paragraphs){let a=e.paragraphs().map((e=>e.json(t)));a.length>0&&(i.paragraphs=a)}if(!0===t.images){let a=e.images().map((e=>e.json(t)));a.length>0&&(i.images=a)}if(!0===t.tables){let a=e.tables().map((e=>e.json(t)));a.length>0&&(i.tables=a)}if(!0===t.templates){let a=e.templates().map((e=>e.json()));a.length>0&&(i.templates=a,!0===t.encode&&i.templates.forEach((e=>W(e))))}if(!0===t.infoboxes){let a=e.infoboxes().map((e=>e.json(t)));a.length>0&&(i.infoboxes=a)}if(!0===t.lists){let a=e.lists().map((e=>e.json(t)));a.length>0&&(i.lists=a)}if(!0===t.references||!0===t.citations){let a=e.references().map((e=>e.json(t)));a.length>0&&(i.references=a)}return!0===t.sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,Ii))}}Mi.prototype.citations=Mi.prototype.references;const Ri={sentences:"sentence",paragraphs:"paragraph",links:"link",tables:"table",templates:"template",infoboxes:"infobox",coordinates:"coordinate",lists:"list",images:"image",references:"reference",citations:"citation"};Object.keys(Ri).forEach((e=>{let t=Ri[e];Mi.prototype[t]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]||null}}));const Ui=/^(={1,6})(.{1,200}?)={1,6}$/,Fi=/\{\{.+?\}\}/,Bi=function(e,t,i){let a=t.match(Ui);if(!a)return e.title="",e.depth=0,e;let n=a[2]||"";n=se(n).text(),Fi.test(n)&&(n=function(e,t){return rt(e).forEach((i=>{let[a]=yi(i,t);e=e.replace(i.body,a)})),e}(n,i));let o={_wiki:n};Ai(o),n=o._wiki,n=r(n);let s=0;return a[1]&&(s=a[1].length-2),e.title=n,e.depth=s,e},Ki=new RegExp("^("+["references","reference","einzelnachweise","referencias","références","notes et références","脚注","referenser","bronnen","примечания"].join("|")+"):?","i"),Wi=/(?:\n|^)(={2,6}.{1,200}?={2,6})/g,Hi=function(e){let t=[],i=e._wiki.split(Wi);for(let a=0;a!0!==Ki.test(t.title())||t.paragraphs().length>0||t.templates().length>0||(e[i+1]&&e[i+1].depth()>t.depth()&&(e[i+1]._depth-=1),!1)))}(t)},Yi=new RegExp("\\[\\[("+h.join("|")+"):(.{2,178}?)]](w{0,10})","gi"),Zi=new RegExp("^\\[\\[:?("+h.join("|")+"):","gi"),Gi=function(e){const t=[];let i=e.match(Yi);i&&i.forEach((function(e){(e=(e=(e=e.replace(Zi,"")).replace(/\|?[ *]?\]\]$/,"")).replace(/\|.*/,""))&&!e.match(/[[\]]/)&&t.push(e.trim())}));const a=e.replace(Yi,"");return[t,a]},Vi={tables:!0,lists:!0,paragraphs:!0};class Ji{constructor(e,t){t=t||{},this._options=t;let i={pageID:t.pageID||t.id||null,namespace:t.namespace||t.ns||null,lang:t.lang||t.language||null,domain:t.domain||null,title:t.title||null,type:"page",redirectTo:null,wikidata:t.wikidata||null,wiki:e||"",categories:[],sections:[],coordinates:[],userAgent:t.userAgent||t["User-Agent"]||t["Api-User-Agent"]||"User of the wtf_wikipedia library",templateFallbackFn:t.templateFallbackFn||null};if(Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})})),!0===function(e){return!!e&&T.test(e)}(this._wiki)){this._type="redirect",this._redirectTo=function(e){let t=e.match(T);if(t&&t[2])return(D(t[2])||[])[0];return{}}(this._wiki);const[e,t]=Gi(this._wiki);return this._categories=e,void(this._wiki=t)}this._wiki=F(this._wiki);const[a,n]=Gi(this._wiki);this._categories=a,this._wiki=n,this._sections=Hi(this)}title(e){if(void 0!==e)return this._title=e,e;if(this._title)return this._title;let t=null,i=this.sentences()[0];return i&&(t=i.bold()),t}pageID(e){return void 0!==e&&(this._pageID=e),this._pageID||null}wikidata(e){return void 0!==e&&(this._wikidata=e),this._wikidata||null}domain(e){return void 0!==e&&(this._domain=e),this._domain||null}language(e){return void 0!==e&&(this._lang=e),this._lang||null}url(){let e=this.title();if(!e)return null;let t=this.language()||"en",i=this.domain()||"wikipedia.org";return e=e.replace(/ /g,"_"),e=encodeURIComponent(e),`https://${t}.${i}/wiki/${e}`}namespace(e){return void 0!==e&&(this._namespace=e),this._namespace||null}isRedirect(){return"redirect"===this._type}redirectTo(){return this._redirectTo}isDisambiguation(){return function(e){let t=e.templates().map((e=>e.json()));if(t.find((e=>k.hasOwnProperty(e.template)||x.hasOwnProperty(e.template))))return!0;let i=e.title();return!(!i||!0!==$.test(i))||!t.find((e=>y.hasOwnProperty(e.template)))&&(!0===v(e.sentence(0))||!0===v(e.sentence(1)))}(this)}categories(e){let t=this._categories||[];return"number"==typeof e?[t[e]]:t}sections(e){let t=this._sections||[];if(t.forEach((e=>{e._doc=this})),"string"==typeof e){let i=e.toLowerCase().trim();return t.filter((e=>e.title().toLowerCase()===i))}return"number"==typeof e?[t[e]]:t}paragraphs(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.paragraphs())})),"number"==typeof e?[t[e]]:t}sentences(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.sentences())})),"number"==typeof e?[t[e]]:t}images(e){let t=m(this,"images",null);return this.infoboxes().forEach((e=>{let i=e.image();i&&t.unshift(i)})),this.templates().forEach((e=>{"gallery"===e.data.template&&(e.data.images=e.data.images||[],e.data.images.forEach((e=>{e instanceof _||(e.language=this.language(),e.domain=this.domain(),e=new _(e)),t.push(e)})))})),"number"==typeof e?[t[e]]:t}links(e){return m(this,"links",e)}interwiki(e){return m(this,"interwiki",e)}lists(e){return m(this,"lists",e)}tables(e){return m(this,"tables",e)}templates(e){return m(this,"templates",e)}references(e){return m(this,"references",e)}citations(e){return this.references(e)}coordinates(e){return m(this,"coordinates",e)}infoboxes(e){let t=m(this,"infoboxes",e);return t=t.sort(((e,t)=>Object.keys(e.data).length>Object.keys(t.data).length?-1:1)),t}text(e){if(e=p(e,Vi),!0===this.isRedirect())return"";return this.sections().map((t=>t.text(e))).join("\n\n")}json(e){return function(e,t){let i={};return(t=p(t,d)).title&&(i.title=e.title()),t.pageID&&(i.pageID=e.pageID()),t.categories&&(i.categories=e.categories()),t.sections&&(i.sections=e.sections().map((e=>e.json(t)))),!0===e.isRedirect()&&(i.isRedirect=!0,i.redirectTo=e.redirectTo(),i.sections=[]),t.coordinates&&(i.coordinates=e.coordinates()),t.infoboxes&&(i.infoboxes=e.infoboxes().map((e=>e.json(t)))),t.images&&(i.images=e.images().map((e=>e.json(t)))),t.plaintext&&(i.plaintext=e.text(t)),(t.citations||t.references)&&(i.references=e.references()),i}(this,e=p(e,Vi))}wikitext(){return this._wiki||""}debug(){return console.log("\n"),this.sections().forEach((e=>{let t=" - ";for(let i=0;i{let t=Xi[e];Ji.prototype[t]=function(t){return this[e](t)[0]||null}})),Ji.prototype.lang=Ji.prototype.language,Ji.prototype.ns=Ji.prototype.namespace,Ji.prototype.plaintext=Ji.prototype.text,Ji.prototype.isDisambig=Ji.prototype.isDisambiguation,Ji.prototype.citations=Ji.prototype.references,Ji.prototype.redirectsTo=Ji.prototype.redirectTo,Ji.prototype.redirect=Ji.prototype.redirectTo,Ji.prototype.redirects=Ji.prototype.redirectTo;const Qi=/^https?:\/\//,ea={lang:"en",wiki:"wikipedia",domain:void 0,follow_redirects:!0,path:"api.php"},ta=function(e,t,i){"string"==typeof t&&(t={lang:t}),(t={...ea,...t}).title=e,"string"==typeof e&&Qi.test(e)&&(t={...t,...n(e)});const r=u(t),s=function(e){let t,i=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return t=e.noOrigin?"":e.origin||e.Origin||"*",{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":i,"User-Agent":i,Origin:t,"Accept-Encoding":"gzip"},redirect:"follow"}}(t);return a(r,s).then((e=>e.json())).then((a=>{let n=function(e,t={}){return Object.keys(e.query.pages).map((i=>{let a=e.query.pages[i]||{};if(a.hasOwnProperty("missing")||a.hasOwnProperty("invalid"))return null;let n=a.revisions[0]["*"];!n&&a.revisions[0].slots&&(n=a.revisions[0].slots.main["*"]),a.pageprops=a.pageprops||{};let r=t.domain;return!r&&t.wiki&&(r=`${t.wiki}.org`),{wiki:n,meta:Object.assign({},t,{title:a.title,pageID:a.pageid,namespace:a.ns,domain:r,wikidata:a.pageprops.wikibase_item,description:a.pageprops["wikibase-shortdesc"]})}}))}(a,t);return n=function(e,t){let i=(e=e.filter((e=>e))).map((e=>new Ji(e.wiki,e.meta)));return 0===i.length?null:o(t)||1!==i.length?i:i[0]}(n,e),i&&i(null,n),n})).catch((e=>(console.error(e),i&&i(e,null),null)))};const ia=function(e,t){return new Ji(e,t)},aa={Doc:Ji,Section:Mi,Paragraph:_e,Sentence:X,Image:_,Infobox:xi,Link:Z,List:Be,Reference:ji,Table:we,Template:Oi,http:function(e,t){return a(e,t).then((function(e){return e.json()})).catch((t=>(console.error("\n\n=-=- http response error =-=-=-"),console.error(e),console.error(t),{})))},wtf:ia};ia.fetch=function(e,t,i){return ta(e,t,i)},ia.plugin=ia.extend=function(e){return e(aa,ki,st),this},ia.version="10.1.4";export{ia as default}; +function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var i=function e(){if(this instanceof e){var i=[null];return i.push.apply(i,arguments),new(Function.bind.apply(t,i))}return t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})})),i}var i=t(Object.freeze({__proto__:null,default:function(e,t){return t=t||{},new Promise((function(i,a){var n=new XMLHttpRequest,r=[],o=[],s={},l=function(){return{ok:2==(n.status/100|0),statusText:n.statusText,status:n.status,url:n.responseURL,text:function(){return Promise.resolve(n.responseText)},json:function(){return Promise.resolve(n.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([n.response]))},clone:l,headers:{keys:function(){return r},entries:function(){return o},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in n.open(t.method||"get",e,!0),n.onload=function(){n.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,i){r.push(t=t.toLowerCase()),o.push([t,i]),s[t]=s[t]?s[t]+","+i:i})),i(l())},n.onerror=a,n.withCredentials="include"==t.credentials,t.headers)n.setRequestHeader(c,t.headers[c]);n.send(t.body||null)}))}})),a=e(self.fetch||(self.fetch=i.default||i));const n=function(e){let t=new URL(e),i=t.pathname.replace(/^\/(wiki\/)?/,"");return i=decodeURIComponent(i),{domain:t.host,title:i}};function r(e){return e&&"string"==typeof e?e=(e=(e=(e=e.replace(/^\s+/,"")).replace(/\s+$/,"")).replace(/ {2}/," ")).replace(/\s, /,", "):""}function o(e){return"[object Array]"===Object.prototype.toString.call(e)}const s=/(wikibooks|wikidata|wikimedia|wikinews|wikipedia|wikiquote|wikisource|wikispecies|wikiversity|wikivoyage|wiktionary|foundation|meta)\.org/,l={action:"query",prop:"revisions|pageprops",rvprop:"content",maxlag:5,rvslots:"main",origin:"*",format:"json",redirects:"true"},c=e=>e.replace(/ /g,"_").trim(),u=function(e,t=l){let i=Object.assign({},t),a="";if(e.domain){let t=s.test(e.domain)?"w/api.php":e.path;a=`https://${e.domain}/${t}?`}else{if(!e.lang||!e.wiki)return"";a=`https://${e.lang}.${e.wiki}.org/w/api.php?`}e.follow_redirects||delete i.redirects,e.origin&&(i.origin=e.origin);let n=e.title;if("number"==typeof n)i.pageids=n;else if("string"==typeof n)i.titles=c(n);else if(void 0!==n&&o(n)&&"number"==typeof n[0])i.pageids=n.filter((e=>e)).join("|");else{if(void 0===n||!0!==o(n)||"string"!=typeof n[0])return"";i.titles=n.filter((e=>e)).map(c).join("|")}return`${a}${r=i,Object.entries(r).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&")}`;var r},m=function(e,t,i){let a=[];return e.sections().forEach((e=>{let n=[];n="string"==typeof i?e[t](i):e[t](),n.forEach((e=>{a.push(e)}))})),"number"==typeof i?void 0===a[i]?[]:[a[i]]:a},p=function(e,t){return Object.assign({},t,e)},d={title:!0,sections:!0,pageID:!0,categories:!0};var h=["category","abdeeling","bólkur","catagóir","categori","categoria","categoria","categoría","categorîa","categorìa","catégorie","categorie","catègorie","category","categuria","catigurìa","class","ẹ̀ka","flocc","flocc","flokkur","grup","jamii","kaarangay","kateggoría","kategooria","kategori","kategorî","kategoria","kategória","kategorie","kategoriija","kategorija","kategorio","kategoriya","kategoriýa","kategoriye","kategory","kategorya","kateqoriya","katiguriya","klad","luokka","ñemohenda","roinn","ronney","rummad","setensele","sokajy","sumut","thể","turkum","категорија","категория","категорія","катэгорыя","төркем","קטגוריה","تصنيف","تۈر","رده","श्रेणी","श्रेणी","বিষয়শ্রেণী","หมวดหมู่","분류","분류","分类"],g=["file","image","चित्र","archivo","attēls","berkas","bestand","datei","dosiero","dosya","fájl","fasciculus","fichier","fil","fitxategi","fitxer","gambar","imagem","imej","immagine","larawan","lêer","plik","restr","slika","wêne","wobraz","выява","податотека","слика","файл","სურათი","պատկեր","קובץ","پرونده","دوتنه","ملف","وێنە","चित्र","ไฟล์","파일","ファイル"],b=["infobox","anfo","anuāmapa","bilgi kutusu","bilgi","bilgiquti","boaty","boestkelaouiñ","bosca","capsa","diehtokássa","faktamall","ficha","generalni","gwybodlen3","info","infobokis","infoboks","infochascha","infokašćik","infokast","infokutija","infolentelė","infopolje","informkesto","infoskreine","infotaula","inligtingskas","inligtingskas3","inligtingskas4","kishtey","kotak","tertcita","tietolaatikko","yerleşim bilgi kutusu","ynfoboks","πλαίσιο","акарточка","аҥа","инфобокс","инфокутија","инфокутия","інфобокс","канадский","картка","карточка","карточка2","карточкарус","картуш","қуттӣ","ინფოდაფა","տեղեկաքարտ","אינפאקעסטל","תבנית","بطاقة","ڄاڻخانو","خانہ","لغة","ज्ञानसन्दूक","তথ্যছক","ਜਾਣਕਾਰੀਡੱਬਾ","సమాచారపెట్టె","තොරතුරුකොටුව","กล่องข้อมูล","ប្រអប់ព័ត៌មាន","정보상자","明細"];let k=" disambiguation";const f=["dab","dab","disamb","disambig","geodis","hndis","setindex","ship index","split dab","sport index","wp disambig","disambiguation cleanup","airport"+k,"biology"+k,"call sign"+k,"caselaw"+k,"chinese title"+k,"genus"+k,"hospital"+k,"lake index","letter"+k,"letter-number combination"+k,"mathematical"+k,"military unit"+k,"mountainindex","number"+k,"phonetics"+k,"place name"+k,"portal"+k,"road"+k,"school"+k,"species latin name abbreviation"+k,"species latin name"+k,"station"+k,"synagogue"+k,"taxonomic authority"+k,"taxonomy"+k].reduce(((e,t)=>(e[t]=!0,e)),{}),w=/. may (also )?refer to\b/i,y={about:!0,for:!0,"for multi":!0,"other people":!0,"other uses of":!0,distinguish:!0},$=new RegExp(". \\(("+["disambiguation","homonymie","توضيح","desambiguação","Begriffsklärung","disambigua","曖昧さ回避","消歧義","搞清楚","значения","ابهام‌زدایی","د ابہام","동음이의","dubbelsinnig","այլ կիրառումներ","ujednoznacznienie"].join("|")+")\\)$","i"),x=["dab","disamb","disambig","disambiguation","letter-numbercombdisambig","letter-number combination disambiguation","dmbox","airport disambiguation","biology disambiguation","call sign disambiguation","caselaw disambiguation","chinese title disambiguation","disambiguation cleanup","genus disambiguation","hospital disambiguation","human name disambiguation","human name disambiguation cleanup","letter-number combination disambiguation","mathematical disambiguation","military unit disambiguation","music disambiguation","number disambiguation","opus number disambiguation","phonetics disambiguation","place name disambiguation","portal disambiguation","road disambiguation","school disambiguation","species latin name abbreviation disambiguation","species latin name disambiguation","station disambiguation","synagogue disambiguation","taxonomic authority disambiguation","taxonomy disambiguation","template disambiguation","disamb2","disamb3","disamb4","disambiguation lead","disambiguation lead name","disambiguation name","disamb-term","disamb-terms","aðgreining","aimai","ałtsʼáʼáztiin","anlam ayrımı","anlam ayrımı","apartigilo","argipen","begriepskloorenge","begriffsklärung","begriffsklärung","begriffsklärung","begriffsklearung","bisongidila","bkl","bokokani","caddayn","clerheans","cudakirin","čvor","db","desambig","desambigación","desambiguação","desambiguació","desambiguación","desambiguáncia","desambiguasion","desambiguassiù","desambigui","dezambiguizare","dəqiqləşdirmə","disambigua","disambigua","disambigua","disambìgua","disambigua","disambiguasi","disambiguasi","discretiva","disheñvelout","disingkek","dixanbigua","dixebra","diżambigwazzjoni","doorverwijspagina","dp","dp","dubbelsinnig","dudalipen","dv","egyért","fleiri týdningar","fleirtyding","flertydig","förgrening","gì-ngiê","giklaro","gwahaniaethu","homonimo","homónimos","homonymie","huaʻōlelo puana like","idirdhealú","khu-pia̍t","kthjellim","kujekesa","maana","maneo bin","mehrdüdig begreep","menm non","muardüüdag artiikel","neibetsjuttings","nozīmju atdalīšana","nuorodinis","nyahkekaburan","omonimeye","omonimia","page dé frouque","paglilinaw","panangilawlawag","pansayod","pejy mitovy anarana","peker","razdvojba","razločitev","razvrstavanje","reddaghey","rozcestník","rozlišovacia stránka","sclerir noziun","selvendyssivu","soilleireachadh","suzmunski","täpsustuslehekülg","täsmennyssivu","telplänov","tlahtolmelahuacatlaliztli","trang định hướng","ujednoznacznienie","verdudeliking","wěcejwóznamowosć","wjacezmyslnosć","zambiguaçon","zeimeibu škiršona","αποσαφήνιση","айрық","аҵакырацәа","вишезначна одредница","ибҳомзудоӣ","кёб магъаналы","күп мәгънәләр","күп мәғәнәлелек","мъногосъмꙑслиѥ","неадназначнасць","неадназначнасьць","неоднозначность","олон удхатай","појаснување","пояснение","са шумуд манавал","салаа утгатай","суолталар","текмаанисиздик","цо магіна гуреб","чеперушка","чолхалла","шуко ончыктымаш-влак","მრავალმნიშვნელოვანი","բազմիմաստութիւն","բազմիմաստություն","באדייטן","פירושונים","ابهام‌زدایی","توضيح","توضيح","دقیقلشدیرمه","ڕوونکردنەوە","سلجهائپ","ضد ابہام","گجگجی بیری","نامبهمېدنه","መንታ","अस्पष्टता","बहुअर्थी","बहुविकल्पी शब्द","দ্ব্যর্থতা নিরসন","ਗੁੰਝਲ-ਖੋਲ੍ਹ","સંદિગ્ધ શીર્ષક","பக்கவழி நெறிப்படுத்தல்","అయోమయ నివృత్తి","ದ್ವಂದ್ವ ನಿವಾರಣೆ","വിവക്ഷകൾ","වක්‍රෝත්ති","แก้ความกำกวม","သံတူကြောင်းကွဲ","ណែនាំ","동음이의","扤清楚","搞清楚","曖昧さ回避","消歧义","釋義","gestion dj'omònim","sut'ichana qillqa"].reduce(((e,t)=>(e[t]=!0,e)),{}),v=function(e){if(!e)return!1;let t=e.text();return!(null===t||!t[0]||!0!==w.test(t))},j={caption:!0,alt:!0,links:!0,thumb:!0,url:!0},_=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},z={file(){let e=this.data.file||"";if(e){/^(image|file):/i.test(e)||(e=`File:${e}`),e=e.trim(),e=e.charAt(0).toUpperCase()+e.substring(1),e=e.replace(/ /g,"_")}return e},alt(){let e=this.data.alt||this.data.file||"";return e=e.replace(/^(file|image):/i,""),e=e.replace(/\.(jpg|jpeg|png|gif|svg)/i,""),e.replace(/_/g," ")},caption(){return this.data.caption?this.data.caption.text():""},links(){return this.data.caption?this.data.caption.links():[]},url(){let e=function(e){let t=function(e){let t=e.replace(/^(image|file?):/i,"");return t=t.charAt(0).toUpperCase()+t.substring(1),t=t.trim().replace(/ /g,"_"),t}(e);return t=encodeURIComponent(t),t}(this.file());return`https://${this.data.domain||"wikipedia.org"}/wiki/Special:Redirect/file/${e}`},thumbnail(e){return e=e||300,this.url()+"?width="+e},format(){let e=this.file().split(".");return e[e.length-1]?e[e.length-1].toLowerCase():null},json:function(e){return function(e,t){t=p(t,j);let i={file:e.file()};return!1!==t.thumb&&(i.thumb=e.thumbnail()),!1!==t.url&&(i.url=e.url()),!1!==t.caption&&e.data.caption&&(i.caption=e.caption(),!1!==t.links&&e.data.caption.links()&&(i.links=e.links())),!1!==t.alt&&e.data.alt&&(i.alt=e.alt()),i}(this,e=e||{})},text:function(){return""},wikitext:function(){return this.data.wiki||""}};Object.keys(z).forEach((e=>{_.prototype[e]=z[e]})),_.prototype.src=_.prototype.url,_.prototype.thumb=_.prototype.thumbnail;var O={aa:"Afar",ab:"Аҧсуа",af:"Afrikaans",ak:"Akana",als:"Alemannisch",am:"አማርኛ",an:"Aragonés",ang:"Englisc",ar:"العربية",arc:"ܣܘܪܬ",as:"অসমীয়া",ast:"Asturianu",av:"Авар",ay:"Aymar",az:"Azərbaycanca",ba:"Башҡорт",bar:"Boarisch","bat-smg":"Žemaitėška",bcl:"Bikol",be:"Беларуская","be-x-old":"ltr",bg:"Български",bh:"भोजपुरी",bi:"Bislama",bm:"Bamanankan",bn:"বাংলা",bo:"བོད་ཡིག",bpy:"ltr",br:"Brezhoneg",bs:"Bosanski",bug:"ᨅᨔ",bxr:"ltr",ca:"Català",cdo:"Chinese",ce:"Нохчийн",ceb:"Sinugboanong",ch:"Chamoru",cho:"Choctaw",chr:"ᏣᎳᎩ",chy:"Tsetsêhestâhese",co:"Corsu",cr:"Nehiyaw",cs:"Česky",csb:"Kaszëbsczi",cu:"Slavonic",cv:"Чăваш",cy:"Cymraeg",da:"Dansk",de:"Deutsch",diq:"Zazaki",dsb:"ltr",dv:"ދިވެހިބަސް",dz:"ཇོང་ཁ",ee:"Ɛʋɛ",far:"فارسی",el:"Ελληνικά",en:"English",eo:"Esperanto",es:"Español",et:"Eesti",eu:"Euskara",ext:"Estremeñu",ff:"Fulfulde",fi:"Suomi","fiu-vro":"Võro",fj:"Na",fo:"Føroyskt",fr:"Français",frp:"Arpitan",fur:"Furlan",fy:"ltr",ga:"Gaeilge",gan:"ltr",gd:"ltr",gil:"Taetae",gl:"Galego",gn:"Avañe'ẽ",got:"gutisk",gu:"ગુજરાતી",gv:"Gaelg",ha:"هَوُسَ",hak:"ltr",haw:"Hawai`i",he:"עברית",hi:"हिन्दी",ho:"ltr",hr:"Hrvatski",ht:"Krèyol",hu:"Magyar",hy:"Հայերեն",hz:"Otsiherero",ia:"Interlingua",id:"Bahasa",ie:"Interlingue",ig:"Igbo",ii:"ltr",ik:"Iñupiak",ilo:"Ilokano",io:"Ido",is:"Íslenska",it:"Italiano",iu:"ᐃᓄᒃᑎᑐᑦ",ja:"日本語",jbo:"Lojban",jv:"Basa",ka:"ქართული",kg:"KiKongo",ki:"Gĩkũyũ",kj:"Kuanyama",kk:"Қазақша",kl:"Kalaallisut",km:"ភាសាខ្មែរ",kn:"ಕನ್ನಡ",khw:"کھوار",ko:"한국어",kr:"Kanuri",ks:"कश्मीरी",ksh:"Ripoarisch",ku:"Kurdî",kv:"Коми",kw:"Kernewek",ky:"Kırgızca",la:"Latina",lad:"Dzhudezmo",lan:"Leb",lb:"Lëtzebuergesch",lg:"Luganda",li:"Limburgs",lij:"Líguru",lmo:"Lumbaart",ln:"Lingála",lo:"ລາວ",lt:"Lietuvių",lv:"Latviešu","map-bms":"Basa",mg:"Malagasy",man:"官話",mh:"Kajin",mi:"Māori",min:"Minangkabau",mk:"Македонски",ml:"മലയാളം",mn:"Монгол",mo:"Moldovenească",mr:"मराठी",ms:"Bahasa",mt:"bil-Malti",mus:"Muskogee",my:"Myanmasa",na:"Dorerin",nah:"Nahuatl",nap:"Nnapulitano",nd:"ltr",nds:"Plattdüütsch","nds-nl":"Saxon",ne:"नेपाली",new:"नेपालभाषा",ng:"Oshiwambo",nl:"Nederlands",nn:"ltr",no:"Norsk",nr:"ltr",nso:"ltr",nrm:"Nouormand",nv:"Diné",ny:"Chi-Chewa",oc:"Occitan",oj:"ᐊᓂᔑᓈᐯᒧᐎᓐ",om:"Oromoo",or:"ଓଡ଼ିଆ",os:"Иронау",pa:"ਪੰਜਾਬੀ",pag:"Pangasinan",pam:"Kapampangan",pap:"Papiamentu",pdc:"ltr",pi:"Pāli",pih:"Norfuk",pl:"Polski",pms:"Piemontèis",ps:"پښتو",pt:"Português",qu:"Runa",rm:"ltr",rmy:"Romani",rn:"Kirundi",ro:"Română","roa-rup":"Armâneashti",ru:"Русский",rw:"Kinyarwandi",sa:"संस्कृतम्",sc:"Sardu",scn:"Sicilianu",sco:"Scots",sd:"सिनधि",se:"ltr",sg:"Sängö",sh:"Srpskohrvatski",si:"සිංහල",simple:"ltr",sk:"Slovenčina",sl:"Slovenščina",sm:"Gagana",sn:"chiShona",so:"Soomaaliga",sq:"Shqip",sr:"Српски",ss:"SiSwati",st:"ltr",su:"Basa",sv:"Svenska",sw:"Kiswahili",ta:"தமிழ்",te:"తెలుగు",tet:"Tetun",tg:"Тоҷикӣ",th:"ไทย",ti:"ትግርኛ",tk:"Туркмен",tl:"Tagalog",tlh:"tlhIngan-Hol",tn:"Setswana",to:"Lea",tpi:"ltr",tr:"Türkçe",ts:"Xitsonga",tt:"Tatarça",tum:"chiTumbuka",tw:"Twi",ty:"Reo",udm:"Удмурт",ug:"Uyƣurqə",uk:"Українська",ur:"اردو",uz:"Ўзбек",ve:"Tshivenḓa",vi:"Việtnam",vec:"Vèneto",vls:"ltr",vo:"Volapük",wa:"Walon",war:"Winaray",wo:"Wollof",xal:"Хальмг",xh:"isiXhosa",yi:"ייִדיש",yo:"Yorùbá",za:"Cuengh",zh:"中文","zh-classical":"ltr","zh-min-nan":"Bân-lâm-gú","zh-yue":"粵語",zu:"isiZulu"};const E=".wikipedia.org/wiki/$1",q=".wikimedia.org/wiki/$1",N="www.";var S={acronym:N+"acronymfinder.com/$1.html",advisory:"advisory"+q,advogato:N+"advogato.org/$1",aew:"wiki.arabeyes.org/$1",appropedia:N+"appropedia.org/$1",aquariumwiki:N+"theaquariumwiki.com/$1",arborwiki:"localwiki.org/ann-arbor/$1",arxiv:"arxiv.org/abs/$1",atmwiki:N+"otterstedt.de/wiki/index.php/$1",baden:N+"stadtwiki-baden-baden.de/wiki/$1/",battlestarwiki:"en.battlestarwiki.org/wiki/$1",bcnbio:"historiapolitica.bcn.cl/resenas_parlamentarias/wiki/$1",beacha:N+"beachapedia.org/$1",betawiki:"translatewiki.net/wiki/$1",bibcode:"adsabs.harvard.edu/abs/$1",bibliowiki:"wikilivres.org/wiki/$1",bluwiki:"bluwiki.com/go/$1",blw:"britainloves"+E,botwiki:"botwiki.sno.cc/wiki/$1",boxrec:N+"boxrec.com/media/index.php?$1",brickwiki:N+"brickwiki.info/wiki/$1",bugzilla:"bugzilla.wikimedia.org/show_bug.cgi?id=$1",bulba:"bulbapedia.bulbagarden.net/wiki/$1",c:"commons"+q,c2:"c2.com/cgi/wiki?$1",c2find:"c2.com/cgi/wiki?FindPage&value=$1",cache:N+"google.com/search?q=cache:$1","ĉej":"esperanto.blahus.cz/cxej/vikio/index.php/$1",cellwiki:"cell.wikia.com/wiki/$1",centralwikia:"community.wikia.com/wiki/$1",chej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",choralwiki:N+"cpdl.org/wiki/index.php/$1",citizendium:"en.citizendium.org/wiki/$1",ckwiss:N+"ck-wissen.de/ckwiki/index.php?title=$1",comixpedia:N+"comixpedia.org/index.php?title=$1",commons:"commons"+q,communityscheme:"community.schemewiki.org/?c=s&key=$1",communitywiki:"communitywiki.org/$1",comune:"rete.comuni-italiani.it/wiki/$1",creativecommons:"creativecommons.org/licenses/$1",creativecommonswiki:"wiki.creativecommons.org/$1",cxej:"esperanto.blahus.cz/cxej/vikio/index.php/$1",dcc:N+"dccwiki.com/$1",dcdatabase:"dc.wikia.com/$1",dcma:"christian-morgenstern.de/dcma/index.php?title=$1",debian:"wiki.debian.org/$1",delicious:N+"delicious.com/tag/$1",devmo:"developer.mozilla.org/en/docs/$1",dictionary:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",dict:N+"dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query=$1",disinfopedia:"sourcewatch.org/index.php/$1",distributedproofreaders:N+"pgdp.net/wiki/$1",distributedproofreadersca:N+"pgdpcanada.net/wiki/index.php/$1",dmoz:"curlie.org/$1",dmozs:"curlie.org/search?q=$1",doi:"doi.org/$1",donate:"donate"+q,doom_wiki:"doom.wikia.com/wiki/$1",download:"releases.wikimedia.org/$1",dbdump:"dumps.wikimedia.org/$1/latest/",dpd:"lema.rae.es/dpd/?key=$1",drae:"dle.rae.es/?w=$1",dreamhost:"wiki.dreamhost.com/index.php/$1",drumcorpswiki:N+"drumcorpswiki.com/index.php/$1",dwjwiki:N+"suberic.net/cgi-bin/dwj/wiki.cgi?$1","eĉei":N+"ikso.net/cgi-bin/wiki.pl?$1",ecoreality:N+"EcoReality.org/wiki/$1",ecxei:N+"ikso.net/cgi-bin/wiki.pl?$1",elibre:"enciclopedia.us.es/index.php/$1",emacswiki:N+"emacswiki.org/emacs?$1",encyc:"encyc.org/wiki/$1",energiewiki:N+"netzwerk-energieberater.de/wiki/index.php/$1",englyphwiki:"en.glyphwiki.org/wiki/$1",enkol:"enkol.pl/$1",eokulturcentro:"esperanto.toulouse.free.fr/nova/wikini/wakka.php?wiki=$1",esolang:"esolangs.org/wiki/$1",etherpad:"etherpad.wikimedia.org/$1",ethnologue:N+"ethnologue.com/language/$1",ethnologuefamily:N+"ethnologue.com/show_family.asp?subid=$1",evowiki:"wiki.cotch.net/index.php/$1",exotica:N+"exotica.org.uk/wiki/$1",fanimutationwiki:"wiki.animutationportal.com/index.php/$1",fedora:"fedoraproject.org/wiki/$1",finalfantasy:"finalfantasy.wikia.com/wiki/$1",finnix:N+"finnix.org/$1",flickruser:N+"flickr.com/people/$1",flickrphoto:N+"flickr.com/photo.gne?id=$1",floralwiki:N+"floralwiki.co.uk/wiki/$1",foldoc:"foldoc.org/$1",foundation:"foundation"+q,foundationsite:"wikimediafoundation.org/$1",foxwiki:"fox.wikis.com/wc.dll?Wiki~$1",freebio:"freebiology.org/wiki/$1",freebsdman:N+"FreeBSD.org/cgi/man.cgi?apropos=1&query=$1",freeculturewiki:"wiki.freeculture.org/index.php/$1",freedomdefined:"freedomdefined.org/$1",freefeel:"freefeel.org/wiki/$1",freekiwiki:"wiki.freegeek.org/index.php/$1",freesoft:"directory.fsf.org/wiki/$1",ganfyd:"ganfyd.org/index.php?title=$1",gardenology:N+"gardenology.org/wiki/$1",gausswiki:"gauss.ffii.org/$1",gentoo:"wiki.gentoo.org/wiki/$1",genwiki:"wiki.genealogy.net/index.php/$1",gerrit:"gerrit.wikimedia.org/r/$1",git:"gerrit.wikimedia.org/g/$1",google:N+"google.com/search?q=$1",googledefine:N+"google.com/search?q=define:$1",googlegroups:"groups.google.com/groups?q=$1",guildwarswiki:"wiki.guildwars.com/wiki/$1",guildwiki:"guildwars.wikia.com/wiki/$1",guc:"tools.wmflabs.org/guc/?user=$1",gucprefix:"tools.wmflabs.org/guc/?isPrefixPattern=1&src=rc&user=$1",gutenberg:N+"gutenberg.org/etext/$1",gutenbergwiki:N+"gutenberg.org/wiki/$1",hackerspaces:"hackerspaces.org/wiki/$1",h2wiki:"halowiki.net/p/$1",hammondwiki:N+"dairiki.org/HammondWiki/index.php3?$1",hdl:"hdl.handle.net/$1",heraldik:"heraldik-wiki.de/wiki/$1",heroeswiki:"heroeswiki.com/$1",horizonlabs:"horizon.wikimedia.org/$1",hrwiki:N+"hrwiki.org/index.php/$1",hrfwiki:"fanstuff.hrwiki.org/index.php/$1",hupwiki:"wiki.hup.hu/index.php/$1",iarchive:"archive.org/details/$1",imdbname:N+"imdb.com/name/nm$1/",imdbtitle:N+"imdb.com/title/tt$1/",imdbcompany:N+"imdb.com/company/co$1/",imdbcharacter:N+"imdb.com/character/ch$1/",incubator:"incubator"+q,infosecpedia:"infosecpedia.org/wiki/$1",infosphere:"theinfosphere.org/$1","iso639-3":"iso639-3.sil.org/code/$1",issn:N+"worldcat.org/issn/$1",iuridictum:"iuridictum.pecina.cz/w/$1",jaglyphwiki:"glyphwiki.org/wiki/$1",jefo:"esperanto-jeunes.org/wiki/$1",jerseydatabase:"jerseydatabase.com/wiki.php?id=$1",jira:"jira.toolserver.org/browse/$1",jspwiki:N+"ecyrd.com/JSPWiki/Wiki.jsp?page=$1",jstor:N+"jstor.org/journals/$1",kamelo:"kamelopedia.mormo.org/index.php/$1",karlsruhe:"ka.stadtwiki.net/$1",kinowiki:"kino.skripov.com/index.php/$1",komicawiki:"wiki.komica.org/?$1",kontuwiki:"kontu.wiki/$1",wikitech:"wikitech"+q,libreplanet:"libreplanet.org/wiki/$1",linguistlist:"linguistlist.org/forms/langs/LLDescription.cfm?code=$1",linuxwiki:N+"linuxwiki.de/$1",linuxwikide:N+"linuxwiki.de/$1",liswiki:"liswiki.org/wiki/$1",literateprograms:"en.literateprograms.org/$1",livepedia:N+"livepedia.gr/index.php?title=$1",localwiki:"localwiki.org/$1",lojban:"mw.lojban.org/papri/$1",lostpedia:"lostpedia.wikia.com/wiki/$1",lqwiki:"wiki.linuxquestions.org/wiki/$1",luxo:"tools.wmflabs.org/guc/?user=$1",mail:"lists.wikimedia.org/mailman/listinfo/$1",mailarchive:"lists.wikimedia.org/pipermail/$1",mariowiki:N+"mariowiki.com/$1",marveldatabase:N+"marveldatabase.com/wiki/index.php/$1",meatball:"meatballwiki.org/wiki/$1",mw:N+"mediawiki.org/wiki/$1",mediazilla:"bugzilla.wikimedia.org/$1",memoryalpha:"memory-alpha.fandom.com/wiki/$1",metawiki:"meta"+q,metawikimedia:"meta"+q,metawikipedia:"meta"+q,mineralienatlas:N+"mineralienatlas.de/lexikon/index.php/$1",moinmoin:"moinmo.in/$1",monstropedia:N+"monstropedia.org/?title=$1",mosapedia:"mosapedia.de/wiki/index.php/$1",mozcom:"mozilla.wikia.com/wiki/$1",mozillawiki:"wiki.mozilla.org/$1",mozillazinekb:"kb.mozillazine.org/$1",musicbrainz:"musicbrainz.org/doc/$1",mediawikiwiki:N+"mediawiki.org/wiki/$1",mwod:N+"merriam-webster.com/dictionary/$1",mwot:N+"merriam-webster.com/thesaurus/$1",nkcells:N+"nkcells.info/index.php?title=$1",nara:"catalog.archives.gov/id/$1",nosmoke:"no-smok.net/nsmk/$1",nost:"nostalgia"+E,nostalgia:"nostalgia"+E,oeis:"oeis.org/$1",oldwikisource:"wikisource.org/wiki/$1",olpc:"wiki.laptop.org/go/$1",omegawiki:N+"omegawiki.org/Expression:$1",onelook:N+"onelook.com/?ls=b&w=$1",openlibrary:"openlibrary.org/$1",openstreetmap:"wiki.openstreetmap.org/wiki/$1",openwetware:"openwetware.org/wiki/$1",opera7wiki:"operawiki.info/$1",organicdesign:N+"organicdesign.co.nz/$1",orthodoxwiki:"orthodoxwiki.org/$1",osmwiki:"wiki.openstreetmap.org/wiki/$1",otrs:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=$1",otrswiki:"otrs-wiki"+q,ourmedia:N+"socialtext.net/ourmedia/index.cgi?$1",outreach:"outreach"+q,outreachwiki:"outreach"+q,owasp:N+"owasp.org/index.php/$1",panawiki:"wiki.alairelibre.net/index.php?title=$1",patwiki:"gauss.ffii.org/$1",personaltelco:"personaltelco.net/wiki/$1",petscan:"petscan.wmflabs.org/?psid=$1",phab:"phabricator.wikimedia.org/$1",phabricator:"phabricator.wikimedia.org/$1",phwiki:N+"pocketheaven.com/ph/wiki/index.php?title=$1",phpwiki:"phpwiki.sourceforge.net/phpwiki/index.php?$1",planetmath:"planetmath.org/node/$1",pmeg:N+"bertilow.com/pmeg/$1",pmid:N+"ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract",pokewiki:"pokewiki.de/$1","pokéwiki":"pokewiki.de/$1",policy:"policy.wikimedia.org/$1",proofwiki:N+"proofwiki.org/wiki/$1",pyrev:N+"mediawiki.org/wiki/Special:Code/pywikipedia/$1",pythoninfo:"wiki.python.org/moin/$1",pythonwiki:N+"pythonwiki.de/$1",pywiki:"c2.com/cgi/wiki?$1",psycle:"psycle.sourceforge.net/wiki/$1",quality:"quality"+q,quarry:"quarry.wmflabs.org/$1",regiowiki:"regiowiki.at/wiki/$1",rev:N+"mediawiki.org/wiki/Special:Code/MediaWiki/$1",revo:"purl.org/NET/voko/revo/art/$1.html",rfc:"tools.ietf.org/html/rfc$1",rheinneckar:"rhein-neckar-wiki.de/$1",robowiki:"robowiki.net/?$1",rodovid:"en.rodovid.org/wk/$1",reuterswiki:"glossary.reuters.com/index.php/$1",rowiki:"wiki.rennkuckuck.de/index.php/$1",rt:"rt.wikimedia.org/Ticket/Display.html?id=$1",s23wiki:"s23.org/wiki/$1",scholar:"scholar.google.com/scholar?q=$1",schoolswp:"schools-"+E,scores:"imslp.org/wiki/$1",scoutwiki:"en.scoutwiki.org/$1",scramble:N+"scramble.nl/wiki/index.php?title=$1",seapig:N+"seapig.org/$1",seattlewiki:"seattle.wikia.com/wiki/$1",slwiki:"wiki.secondlife.com/wiki/$1","semantic-mw":N+"semantic-mediawiki.org/wiki/$1",senseislibrary:"senseis.xmp.net/?$1",sharemap:"sharemap.org/$1",silcode:N+"sil.org/iso639-3/documentation.asp?id=$1",slashdot:"slashdot.org/article.pl?sid=$1",sourceforge:"sourceforge.net/$1",spcom:"spcom"+q,species:"species"+q,squeak:"wiki.squeak.org/squeak/$1",stats:"stats.wikimedia.org/$1",stewardry:"tools.wmflabs.org/meta/stewardry/?wiki=$1",strategy:"strategy"+q,strategywiki:"strategywiki.org/wiki/$1",sulutil:"meta.wikimedia.org/wiki/Special:CentralAuth/$1",swtrain:"train.spottingworld.com/$1",svn:"svn.wikimedia.org/viewvc/mediawiki/$1?view=log",swinbrain:"swinbrain.ict.swin.edu.au/wiki/$1",tabwiki:N+"tabwiki.com/index.php/$1",tclerswiki:"wiki.tcl.tk/$1",technorati:N+"technorati.com/search/$1",tenwiki:"ten"+E,testwiki:"test"+E,testwikidata:"test.wikidata.org/wiki/$1",test2wiki:"test2"+E,tfwiki:"tfwiki.net/wiki/$1",thelemapedia:N+"thelemapedia.org/index.php/$1",theopedia:N+"theopedia.com/$1",thinkwiki:N+"thinkwiki.org/wiki/$1",ticket:"ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketNumber=$1",tmbw:"tmbw.net/wiki/$1",tmnet:N+"technomanifestos.net/?$1",tmwiki:N+"EasyTopicMaps.com/?page=$1",toolforge:"tools.wmflabs.org/$1",toollabs:"tools.wmflabs.org/$1",tools:"toolserver.org/$1",tswiki:N+"mediawiki.org/wiki/Toolserver:$1",translatewiki:"translatewiki.net/wiki/$1",tviv:"tviv.org/wiki/$1",tvtropes:N+"tvtropes.org/pmwiki/pmwiki.php/Main/$1",twiki:"twiki.org/cgi-bin/view/$1",tyvawiki:N+"tyvawiki.org/wiki/$1",umap:"umap.openstreetmap.fr/$1",uncyclopedia:"en.uncyclopedia.co/wiki/$1",unihan:N+"unicode.org/cgi-bin/GetUnihanData.pl?codepoint=$1",unreal:"wiki.beyondunreal.com/wiki/$1",urbandict:N+"urbandictionary.com/define.php?term=$1",usej:N+"tejo.org/usej/$1",usemod:N+"usemod.com/cgi-bin/wiki.pl?$1",usability:"usability"+q,utrs:"utrs.wmflabs.org/appeal.php?id=$1",vikidia:"fr.vikidia.org/wiki/$1",vlos:"tusach.thuvienkhoahoc.com/wiki/$1",vkol:"kol.coldfront.net/thekolwiki/index.php/$1",voipinfo:N+"voip-info.org/wiki/view/$1",votewiki:"vote"+q,werelate:N+"werelate.org/wiki/$1",wg:"wg-en"+E,wikia:N+"wikia.com/wiki/w:c:$1",wikiasite:N+"wikia.com/wiki/w:c:$1",wikiapiary:"wikiapiary.com/wiki/$1",wikibooks:"en.wikibooks.org/wiki/$1",wikichristian:N+"wikichristian.org/index.php?title=$1",wikicities:N+"wikia.com/wiki/w:$1",wikicity:N+"wikia.com/wiki/w:c:$1",wikiconference:"wikiconference.org/wiki/$1",wikidata:N+"wikidata.org/wiki/$1",wikif1:N+"wikif1.org/$1",wikifur:"en.wikifur.com/wiki/$1",wikihow:N+"wikihow.com/$1",wikiindex:"wikiindex.org/$1",wikilemon:"wiki.illemonati.com/$1",wikilivres:"wikilivres.org/wiki/$1",wikilivresru:"wikilivres.ru/$1","wikimac-de":"apfelwiki.de/wiki/Main/$1",wikimedia:"foundation"+q,wikinews:"en.wikinews.org/wiki/$1",wikinfo:"wikinfo.org/w/index.php/$1",wikinvest:"meta.wikimedia.org/wiki/Interwiki_map/discontinued#Wikinvest",wikiotics:"wikiotics.org/$1",wikipapers:"wikipapers.referata.com/wiki/$1",wikipedia:"en"+E,wikipediawikipedia:"en.wikipedia.org/wiki/Wikipedia:$1",wikiquote:"en.wikiquote.org/wiki/$1",wikisophia:"wikisophia.org/index.php?title=$1",wikisource:"en.wikisource.org/wiki/$1",wikispecies:"species"+q,wikispot:"wikispot.org/?action=gotowikipage&v=$1",wikiskripta:N+"wikiskripta.eu/index.php/$1",labsconsole:"wikitech"+q,wikiti:"wikiti.denglend.net/index.php?title=$1",wikiversity:"en.wikiversity.org/wiki/$1",wikivoyage:"en.wikivoyage.org/wiki/$1",betawikiversity:"beta.wikiversity.org/wiki/$1",wikiwikiweb:"c2.com/cgi/wiki?$1",wiktionary:"en.wiktionary.org/wiki/$1",wipipedia:"wipipedia.org/index.php/$1",wlug:N+"wlug.org.nz/$1",wmam:"am"+q,wmar:N+"wikimedia.org.ar/wiki/$1",wmat:"mitglieder.wikimedia.at/$1",wmau:"wikimedia.org.au/wiki/$1",wmbd:"bd"+q,wmbe:"be"+q,wmbr:"br"+q,wmca:"ca"+q,wmch:N+"wikimedia.ch/$1",wmcl:N+"wikimediachile.cl/index.php?title=$1",wmcn:"cn"+q,wmco:"co"+q,wmcz:N+"wikimedia.cz/web/$1",wmdc:"wikimediadc.org/wiki/$1",securewikidc:"secure.wikidc.org/$1",wmde:"wikimedia.de/wiki/$1",wmdk:"dk"+q,wmee:"ee"+q,wmec:"ec"+q,wmes:N+"wikimedia.es/wiki/$1",wmet:"ee"+q,wmfdashboard:"outreachdashboard.wmflabs.org/$1",wmfi:"fi"+q,wmfr:"wikimedia.fr/$1",wmge:"ge"+q,wmhi:"hi"+q,wmhk:"meta.wikimedia.org/wiki/Wikimedia_Hong_Kong",wmhu:"wikimedia.hu/wiki/$1",wmid:"id"+q,wmil:N+"wikimedia.org.il/$1",wmin:"wiki.wikimedia.in/$1",wmit:"wiki.wikimedia.it/wiki/$1",wmke:"meta.wikimedia.org/wiki/Wikimedia_Kenya",wmmk:"mk"+q,wmmx:"mx"+q,wmnl:"nl"+q,wmnyc:"nyc"+q,wmno:"no"+q,"wmpa-us":"pa-us"+q,wmph:"meta.wikimedia.org/wiki/Wikimedia_Philippines",wmpl:"pl"+q,wmpt:"pt"+q,wmpunjabi:"punjabi"+q,wmromd:"romd"+q,wmrs:"rs"+q,wmru:"ru"+q,wmse:"se"+q,wmsk:"wikimedia.sk/$1",wmtr:"tr"+q,wmtw:"wikimedia.tw/wiki/index.php5/$1",wmua:"ua"+q,wmuk:"wikimedia.org.uk/wiki/$1",wmve:"wikimedia.org.ve/wiki/$1",wmza:"wikimedia.org.za/wiki/$1",wm2005:"wikimania2005"+q,wm2006:"wikimania2006"+q,wm2007:"wikimania2007"+q,wm2008:"wikimania2008"+q,wm2009:"wikimania2009"+q,wm2010:"wikimania2010"+q,wm2011:"wikimania2011"+q,wm2012:"wikimania2012"+q,wm2013:"wikimania2013"+q,wm2014:"wikimania2014"+q,wm2015:"wikimania2015"+q,wm2016:"wikimania2016"+q,wm2017:"wikimania2017"+q,wm2018:"wikimania2018"+q,wmania:"wikimania"+q,wikimania:"wikimania"+q,wmteam:"wikimaniateam"+q,wmf:"foundation"+q,wmfblog:"blog.wikimedia.org/$1",wmdeblog:"blog.wikimedia.de/$1",wookieepedia:"starwars.wikia.com/wiki/$1",wowwiki:N+"wowwiki.com/$1",wqy:"wqy.sourceforge.net/cgi-bin/index.cgi?$1",wurmpedia:"wurmpedia.com/index.php/$1",viaf:"viaf.org/viaf/$1",zrhwiki:N+"zrhwiki.ch/wiki/$1",zum:"wiki.zum.de/$1",zwiki:N+"zwiki.org/$1",m:"meta"+q,meta:"meta"+q,sep11:"sep11"+E,d:N+"wikidata.org/wiki/$1",minnan:"zh-min-nan"+E,nb:"no"+E,"zh-cfr":"zh-min-nan"+E,"zh-cn":"zh"+E,"zh-tw":"zh"+E,nan:"zh-min-nan"+E,vro:"fiu-vro"+E,cmn:"zh"+E,lzh:"zh-classical"+E,rup:"roa-rup"+E,gsw:"als"+E,"be-tarask":"be-x-old"+E,sgs:"bat-smg"+E,egl:"eml"+E,w:"en"+E,wikt:"en.wiktionary.org/wiki/$1",q:"en.wikiquote.org/wiki/$1",b:"en.wikibooks.org/wiki/$1",n:"en.wikinews.org/wiki/$1",s:"en.wikisource.org/wiki/$1",chapter:"en"+q,v:"en.wikiversity.org/wiki/$1",voy:"en.wikivoyage.org/wiki/$1"};Object.keys(O).forEach((e=>{S[e]=e+".wikipedia.org/wiki/$1"}));const C=/^(category|catégorie|kategorie|categoría|categoria|categorie|kategoria|تصنيف|image|file|fichier|datei|media):/i,L=/\[(https?|news|ftp|mailto|gopher|irc)(:\/\/[^\]| ]{4,1500})([| ].*?)?\]/g,A=/\[\[(.{0,1600}?)\]\]([a-z]+)?/gi,P=function(e,t){return t.replace(A,(function(t,i,a){let n=null,r=i;if(i.match(/\|/)&&(r=(i=i.replace(/\[\[(.{2,1000}?)\]\](\w{0,10})/g,"$1$2")).replace(/(.{2,1000})\|.{0,2000}/,"$1"),n=i.replace(/.{2,1000}?\|/,""),null===n&&r.match(/\|$/)&&(r=r.replace(/\|$/,""),n=r)),r.match(C))return i;let o={page:r,raw:t};return o.page=o.page.replace(/#(.*)/,((e,t)=>(o.anchor=t,""))),o=function(e){let t=e.page||"";if(-1!==t.indexOf(":")){let i=t.match(/^(.*):(.*)/);if(null===i)return e;let a=i[1]||"";if(a=a.toLowerCase(),-1!==a.indexOf(":")){let[,t,i]=a.match(/^:?(.*):(.*)/);if(!1===S.hasOwnProperty(t)||!1===O.hasOwnProperty(i))return e;e.wiki={wiki:t,lang:i}}else{if(!1===S.hasOwnProperty(a))return e;e.wiki=a}e.page=i[2]}return e}(o),o.wiki&&(o.type="interwiki"),null!==n&&n!==o.page&&(o.text=n),a&&(o.text=o.text||o.page,o.text+=a.trim()),o.page&&!1===/^[A-Z]/.test(o.page)&&(o.text||(o.text=o.page),o.page=o.page),o.text&&o.text.startsWith(":")&&(o.text=o.text.replace(/^:/,"")),e.push(o),i})),e},D=function(e){let t=[];if(t=function(e,t){return t.replace(L,(function(t,i,a,n){return n=n||"",e.push({type:"external",site:i+a,text:n.trim(),raw:t}),n})),e}(t,e),t=P(t,e),0!==t.length)return t},T=new RegExp("^[ \n\t]*?#("+["adkas","aýdaw","doorverwijzing","ohjaus","patrz","přesměruj","redirección","redireccion","redirección","redirecionamento","redirect","redirection","redirection","rinvia","tilvísun","uudelleenohjaus","weiterleitung","weiterleitung","yönlendi̇r","yönlendirme","yönlendi̇rme","ανακατευθυνση","айдау","перанакіраваньне","перенаправлення","пренасочување","преусмери","преусмјери","تغییر_مسیر","تغییرمسیر","تغییرمسیر","เปลี่ยนทาง","ប្តូរទីតាំងទៅ","転送","重定向"].join("|")+") *?(\\[\\[.{2,180}?\\]\\])","i"),I=["table","code","score","data","categorytree","charinsert","hiero","imagemap","inputbox","references","source","syntaxhighlight","timeline"],M=`< ?(${I.join("|")}) ?[^>]{0,200}?>`,R=`< ?/ ?(${I.join("|")}) ?>`,U=new RegExp(`${M}[\\s\\S]+?${R}`,"gi");function F(e){return e=(e=(e=function(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(U," ")).replace(/ ?< ?(span|div|table|data) [a-zA-Z0-9=%.\-#:;'" ]{2,100}\/? ?> ?/g," ")).replace(/ ?< ?(ref) [a-zA-Z0-9=" ]{2,100}\/ ?> ?/g," ")).replace(/(.*?)<\/i>/g,"''$1''")).replace(/(.*?)<\/b>/g,"'''$1'''")).replace(/(.*?)<\/sub>/g,"{{sub|$1}}")).replace(/(.*?)<\/sup>/g,"{{sup|$1}}")).replace(/
(.*?)<\/blockquote>/g,"{{blockquote|text=$1}}")).replace(/ ?<[ /]?(p|sub|sup|span|nowiki|div|table|br|tr|td|th|pre|pre2|hr|u)[ /]?> ?/g," ")).replace(/ ?<[ /]?(abbr|bdi|bdo|cite|del|dfn|em|ins|kbd|mark|q|s|small)[ /]?> ?/g," ")).replace(/ ?<[ /]?h[0-9][ /]?> ?/g," ")).replace(/ ?< ?br ?\/> ?/g,"\n")).trim()}(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(//g,"")).replace(/__(NOTOC|NOEDITSECTION|FORCETOC|TOC)__/gi,"")).replace(/~{2,3}/g,"")).replace(/\r/g,"")).replace(/\u3002/g,". ")).replace(/----/g,"")).replace(/\{\{\}\}/g," – ")).replace(/\{\{\\\}\}/g," / ")).replace(/ /g," ")).replace(/–/g,"–"))).replace(/\([,;: ]+\)/g,"")).replace(/\{\{(baseball|basketball) (primary|secondary) (style|color).*?\}\}/i,"")}const B=/[\\.$]/,K=function(e){return"string"!=typeof e&&(e=""),e=(e=(e=e.replace(/\\/g,"\\\\")).replace(/^\$/,"\\u0024")).replace(/\./g,"\\u002e")},W=function(e={}){let t=Object.keys(e);for(let i=0;i{Z.prototype[e]=G[e]}));const V=/^[0-9,.]+$/,J={text:!0,links:!0,formatting:!0,numbers:!0},X=function(e={}){Object.defineProperty(this,"data",{enumerable:!1,value:e})},Q={links:function(e){let t=this.data.links||[];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page===e));return void 0===i?[]:[i]}return t},interwiki:function(){return this.links().filter((e=>void 0!==e.wiki))},bolds:function(){return this.data&&this.data.fmt&&this.data.fmt.bold&&this.data.fmt.bold||[]},italics:function(){return this.data&&this.data.fmt&&this.data.fmt.italic&&this.data.fmt.italic||[]},text:function(e){return void 0!==e&&"string"==typeof e&&(this.data.text=e),this.data.text||""},json:function(e){return function(e,t){t=p(t,J);let i={},a=e.text();if(!0===t.text&&(i.text=a),!0===t.numbers&&V.test(a)){let e=Number(a.replace(/,/g,""));!1===isNaN(e)&&(i.number=e)}return t.links&&e.links().length>0&&(i.links=e.links().map((e=>e.json()))),t.formatting&&e.data.fmt&&(i.formatting=e.data.fmt),i}(this,e)},wikitext:function(){return this.data.wiki||""},isEmpty:function(){return""===this.data.text}};Object.keys(Q).forEach((e=>{X.prototype[e]=Q[e]}));const ee={links:"link",bolds:"bold",italics:"italic"};Object.keys(ee).forEach((e=>{X.prototype[ee[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}})),X.prototype.plaintext=X.prototype.text;const te=["ad","adj","adm","adv","al","alta","approx","apr","apt","arc","ariz","assn","asst","atty","aug","ave","ba","bc","bl","bldg","blvd","brig","bros","ca","cal","calif","capt","cca","cg","cl","cm","cmdr","co","col","colo","comdr","conn","corp","cpl","cres","ct","cyn","dak","dec","def","dept","det","dg","dist","dl","dm","dr","ea","eg","eng","esp","esq","est","etc","ex","exp","feb","fem","fig","fl oz","fl","fla","fm","fr","ft","fy","ga","gal","gb","gen","gov","hg","hon","hr","hrs","hwy","hz","ia","ida","ie","inc","inf","jan","jd","jr","jul","jun","kan","kans","kb","kg","km","kmph","lat","lb","lit","llb","lm","lng","lt","ltd","lx","ma","maj","mar","masc","mb","md","messrs","mg","mi","min","minn","misc","mister","ml","mlle","mm","mme","mph","mps","mr","mrs","ms","mstr","mt","neb","nebr","nee","no","nov","oct","okla","ont","op","ord","oz","pa","pd","penn","penna","phd","pl","pp","pref","prob","prof","pron","ps","psa","pseud","pt","pvt","qt","que","rb","rd","rep","reps","res","rev","sask","sec","sen","sens","sep","sept","sfc","sgt","sir","situ","sq ft","sq","sr","ss","st","supt","surg","tb","tbl","tbsp","tce","td","tel","temp","tenn","tex","tsp","univ","usafa","ut","va","vb","ver","vet","vitro","vivo","vol","vs","vt","wis","wisc","wr","wy","wyo","yb","µg"].concat("[^]][^]]"),ie=new RegExp("(^| |')("+te.join("|")+")[.!?] ?$","i"),ae=/[ .'][A-Z].? *$/i,ne=/\.{3,} +$/,re=/ c\.\s$/,oe=/\p{Letter}/iu;function se(e){let t={wiki:e,text:e};return function(e){let t=e.text,i=D(t)||[];e.links=i.map((e=>(t=t.replace(e.raw,e.text||e.page||""),new Z(e)))),t=t.replace(/\[\[File:(.{2,80}?)\|([^\]]+)\]\](\w{0,5})/g,"$1"),e.text=t}(t),t.text=r(t.text.replace(/\([,;: ]*\)/g,"").replace(/\( *(; ?)+/g,"(")).replace(/ +\.$/,"."),t=function(e){let t=[],i=[],a=e.text||"";return a=a.replace(/'''''(.{0,2500}?)'''''/g,((e,a)=>(t.push(a),i.push(a),a))),a=a.replace(/''''(.{0,2500}?)''''/g,((e,i)=>(t.push(`'${i}'`),`'${i}'`))),a=a.replace(/'''(.{0,2500}?)'''/g,((e,i)=>(t.push(i),i))),a=a.replace(/''(.{0,2500}?)''/g,((e,t)=>(i.push(t),t))),e.text=a,t.length>0&&(e.fmt=e.fmt||{},e.fmt.bold=t),i.length>0&&(e.fmt=e.fmt||{},e.fmt.italic=i),e}(t),new X(t)}const le=function(e){let t=function(e){let t=[],i=[];if(!e||"string"!=typeof e||0===e.trim().length)return t;let a=function(e){let t=e.split(/(\n+)/);return t=t.filter((e=>e.match(/\S/))),t=t.map((function(e){return e.split(/(\S.+?[.!?]"?)(?=\s|$)/g)})),function(e){let t=[];return e.forEach((function(e){t=t.concat(e)})),t}(t)}(e);for(let e=0;ei.length)return!1;const a=e.match(/"/g);if(a&&a.length%2!=0&&e.length<900)return!1;const n=e.match(/[()]/g);return!(n&&n.length%2!=0&&e.length<900)}(n))?/^\s/.test(i[e+1])||/\s$/.test(i[e])?i[e+1]=i[e]+i[e+1]:i[e+1]=i[e]+" "+i[e+1]:i[e]&&i[e].length>0&&(t.push(i[e]),i[e]="");var n;return 0===t.length?[e]:t}(e.wiki);t=t.map(se),t[0]&&t[0].text()&&":"===t[0].text()[0]&&(t=t.slice(1)),e.sentences=t},ce=/.*rowspan *= *["']?([0-9]+)["']?[ |]*/,ue=/.*colspan *= *["']?([0-9]+)["']?[ |]*/,me=function(e){return e=function(e){return e.forEach(((t,i)=>{t.forEach(((a,n)=>{let r=a.match(ce);if(null!==r){let o=parseInt(r[1],10);a=a.replace(ce,""),t[n]=a;for(let t=i+1;t{e.forEach(((t,i)=>{let a=t.match(ue);if(null!==a){let n=parseInt(a[1],10);e[i]=t.replace(ue,"");for(let t=1;te.length>0))}(e))},pe=/^!/,de={name:!0,age:!0,born:!0,date:!0,year:!0,city:!0,country:!0,population:!0,count:!0,number:!0},he=function(e){return(e=se(e).text()).match(/\|/)&&(e=e.replace(/.*?\| ?/,"")),e=(e=(e=e.replace(/style=['"].*?["']/,"")).replace(/^!/,"")).trim()},ge=function(e){if(e.length<=3)return[];let t=e[0].slice(0);t=t.map((e=>(e=se(e=e.replace(/^! */,"")).text(),e=(e=he(e)).toLowerCase())));for(let i=0;ie&&!0!==/^\|\+/.test(e))),!0===/^\{\|/.test(e[0])&&e.shift(),!0===/^\|\}/.test(e[e.length-1])&&e.pop(),!0===/^\|-/.test(e[0])&&e.shift(),e}(e);for(let a=0;a0&&(t.push(i),i=[]);else{let e=n.charAt(0);"|"!==e&&"!"!==e||(n=n.substring(1)),n=n.split(/(?:\|\||!!)/),"!"===e&&(n[0]=e+n[0]),n.forEach((e=>{e=e.trim(),i.push(e)}))}}return i.length>0&&t.push(i),t}(e.replace(/\r/g,"").replace(/\n(\s*[^|!{\s])/g," $1").split(/\n/).map((e=>e.trim())));if(t=t.filter((e=>e)),0===t.length)return[];t=function(e){return e.filter((e=>1!==e.length||!e[0]||!pe.test(e[0])||!1!==/rowspan/i.test(e[0])))}(t),t=me(t);let i=function(e=[]){let t=[];var i;(i=(i=e[0])||[]).length-i.filter((e=>e)).length>3&&e.shift();let a=e[0];return a&&a[0]&&a[1]&&(/^!/.test(a[0])||/^!/.test(a[1]))&&(t=a.map((e=>(e=e.replace(/^! */,""),he(e)))),e.shift()),a=e[0],a&&a[0]&&a[1]&&/^!/.test(a[0])&&/^!/.test(a[1])&&(a.forEach(((e,i)=>{e=e.replace(/^! */,""),e=he(e),!0===Boolean(e)&&(t[i]=e)})),e.shift()),t}(t);if(!i||i.length<=1){i=ge(t);let e=t[t.length-1]||[];i.length<=1&&e.length>2&&(i=ge(t.slice(1)),i.length>0&&(t=t.slice(2)))}let a=t.map((e=>function(e,t){let i={};return e.forEach(((e,a)=>{let n=t[a]||"col"+(a+1),r=se(e);r.text(he(r.text())),i[n]=r})),i}(e,i)));return a},ke={},fe=function(e=""){return e=(e=(e=(e=e.toLowerCase()).replace(/[_-]/g," ")).replace(/\(.*?\)/,"")).trim()},we=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_wiki",{enumerable:!1,value:t})},ye={links(e){let t=[];if(this.data.forEach((e=>{Object.keys(e).forEach((i=>{t=t.concat(e[i].links())}))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},get(e){let t=this.data[0]||{},i=Object.keys(t).reduce(((e,t)=>(e[fe(t)]=t,e)),{});if("string"==typeof e){let t=fe(e);return t=i[t]||t,this.data.map((e=>e[t]?e[t].text():null))}return e=e.map(fe).map((e=>i[e]||e)),this.data.map((t=>e.reduce(((e,i)=>(t[i]?e[i]=t[i].text():e[i]="",e)),{})))},keyValue(e){let t=this.json(e);return t.forEach((e=>{Object.keys(e).forEach((t=>{e[t]=e[t].text}))})),t},json(e){return e=p(e,ke),function(e,t){return e.map((e=>{let i={};return Object.keys(e).forEach((t=>{i[t]=e[t].json()})),!0===t.encode&&(i=W(i)),i}))}(this.data,e)},text:()=>"",wikitext(){return this._wiki||""}};ye.keyvalue=ye.keyValue,ye.keyval=ye.keyValue,Object.keys(ye).forEach((e=>{we.prototype[e]=ye[e]}));const $e=/^\s*\{\|/,xe=/^\s*\|\}/,ve={sentences:!0},je={sentences:!0,lists:!0,images:!0},_e=function(e){Object.defineProperty(this,"data",{enumerable:!1,value:e})},ze={sentences:function(){return this.data.sentences||[]},references:function(){return this.data.references},lists:function(){return this.data.lists},images(){return this.data.images||[]},links:function(e){let t=[];if(this.sentences().forEach((i=>{t=t.concat(i.links(e))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},interwiki(){let e=[];return this.sentences().forEach((t=>{e=e.concat(t.interwiki())})),e||[]},text:function(e){e=p(e,je);let t=this.sentences().map((t=>t.text(e))).join(" ");return this.lists().forEach((e=>{t+="\n"+e.text()})),t},json:function(e){return function(e,t){let i={};return!0===(t=p(t,ve)).sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,je))},wikitext:function(){return this.data.wiki}};ze.citations=ze.references,Object.keys(ze).forEach((e=>{_e.prototype[e]=ze[e]}));const Oe={sentences:"sentence",references:"reference",citations:"citation",lists:"list",images:"image",links:"link"};Object.keys(Oe).forEach((e=>{_e.prototype[Oe[e]]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]}}));const Ee=function(e){return e=(e=e.replace(/^\{\{/,"")).replace(/\}\}$/,"")},qe=function(e){return e=(e=(e=(e||"").trim()).toLowerCase()).replace(/_/g," ")},Ne=/^[\p{Letter}0-9._/\- '()\t]+=/iu,Se={template:!0,list:!0,prototype:!0},Ce=function(e,t){let i=0;return e.reduce(((e,a="")=>{if(a=a.trim(),!0===Ne.test(a)){let t=function(e){let t=e.split("="),i=t[0]||"";i=i.toLowerCase().trim();let a=t.slice(1).join("=");return Se.hasOwnProperty(i)&&(i="_"+i),{key:i,val:a.trim()}}(a);if(t.key)return e[t.key]&&!t.val||(e[t.key]=t.val),e}if(t&&t[i]){e[t[i]]=a}else e.list=e.list||[],e.list.push(a);return i+=1,e}),{})},Le={classname:!0,style:!0,align:!0,margin:!0,left:!0,break:!0,boxsize:!0,framestyle:!0,item_style:!0,collapsible:!0,list_style_type:!0,"list-style-type":!0,colwidth:!0},Ae=function(e,t){let i=se(e);return"json"===t?i.json():"raw"===t?i:i.text()},Pe=function(e,t=[],i){let a=function(e){let t=e.split(/\n?\|/);t.forEach(((e,i)=>{null!==e&&(/\[\[[^\]]+$/.test(e)||/\{\{[^}]+$/.test(e)||e.split("{{").length!==e.split("}}").length||e.split("[[").length!==e.split("]]").length)&&(t[i+1]=t[i]+"|"+t[i+1],t[i]=null)})),t=t.filter((e=>null!==e)),t=t.map((e=>(e||"").trim()));for(let e=t.length-1;e>=0;e-=1){""===t[e]&&t.pop();break}return t}(e=Ee(e||"")),n=a.shift(),r=Ce(a,t);return r=function(e){return Object.keys(e).forEach((t=>{!0===Le[t.toLowerCase()]&&delete e[t],null!==e[t]&&""!==e[t]||delete e[t]})),e}(r),r[1]&&t[0]&&!1===r.hasOwnProperty(t[0])&&(r[t[0]]=r[1],delete r[1]),Object.keys(r).forEach((e=>{r[e]="list"!==e?Ae(r[e],i):r[e].map((e=>Ae(e,i)))})),n&&(r.template=qe(n)),r};const De=new RegExp("("+g.join("|")+"):","i");let Te=`(${g.join("|")})`;const Ie=new RegExp(Te+":(.+?)[\\||\\]]","iu"),Me=/^\[\[:/,Re={thumb:!0,thumbnail:!0,border:!0,right:!0,left:!0,center:!0,top:!0,bottom:!0,none:!0,upright:!0,baseline:!0,middle:!0,sub:!0,super:!0},Ue=function(e,t){let i=e.wiki,a=function(e){let t=[],i=[];const a=e.split("");let n=0;for(let r=0;r0){let e=0,a=0;for(let t=0;ta&&i.push("]"),t.push(i.join("")),i=[]}}return t}(i);a.forEach((function(a){if(!0===De.test(a)){e.images=e.images||[];let n=function(e,t){let i=e.match(Ie);if(null===i||!i[2])return null;if(Me.test(e))return null;let a=`${i[1]}:${i[2]||""}`;if(a){let i={file:a,lang:t._lang,domain:t._domain,wiki:e,pluginData:{}};e=(e=e.replace(/^\[\[/,"")).replace(/\]\]$/,"");let n=Pe(e),r=n.list||[];return n.alt&&(i.alt=n.alt),r=r.filter((e=>!1===Re.hasOwnProperty(e))),r[r.length-1]&&(i.caption=se(r[r.length-1])),new _(i)}return null}(a,t);n&&(e.images.push(n),i=i.replace(a,""))}})),e.wiki=i},Fe={},Be=function(e,t=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},Ke={lines(){return this.data},links(e){let t=[];if(this.lines().forEach((e=>{t=t.concat(e.links())})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},json(e){return e=p(e,Fe),this.lines().map((t=>t.json(e)))},text(){return((e,t)=>e.map((e=>" * "+e.text(t))).join("\n"))(this.data)},wikitext(){return this.wiki||""}};Object.keys(Ke).forEach((e=>{Be.prototype[e]=Ke[e]}));const We=/^[#*:;|]+/,He=/^\*+[^:,|]{4}/,Ye=/^ ?#[^:,|]{4}/,Ze=/[\p{Letter}_0-9\]}]/iu,Ge=function(e){return We.test(e)||He.test(e)||Ye.test(e)},Ve=function(e,t){let i=[];for(let a=t;ae&&Ze.test(e))),i=function(e){let t=1;e=e.filter((e=>e));for(let i=0;ie&&e.trim().length>0)),a=a.map((e=>{let i={wiki:e,lists:[],sentences:[],images:[]};return function(e){let t=e.wiki,i=t.split(/\n/g),a=[],n=[];for(let e=0;e0&&(a.push(t),e+=t.length-1)}else n.push(i[e]);e.lists=a.map((e=>new Be(e,t))),e.wiki=n.join("\n")}(i),Ue(i,t),le(i),new _e(i)})),e._wiki=i,e._paragraphs=a},Qe="{",et=function(e){let t=0,i=[],a=[];for(let n=e.indexOf(Qe);-1!==n&&n0?n++:n=e.indexOf(Qe,n+1)){let r=e[n];if(r===Qe&&(t+=1),t>0){if("}"===r&&(t-=1,0===t)){a.push(r);let e=a.join("");a=[],/\{\{/.test(e)&&/\}\}/.test(e)&&i.push(e);continue}if(1===t&&r!==Qe&&"}"!==r){t=0,a=[];continue}a.push(r)}}return i},tt=function(e){let t=null;return t=/^\{\{[^\n]+\|/.test(e)?(e.match(/^\{\{(.+?)\|/)||[])[1]:-1!==e.indexOf("\n")?(e.match(/^\{\{(.+)\n/)||[])[1]:(e.match(/^\{\{(.+?)\}\}$/)||[])[1],t&&(t=t.replace(/:.*/,""),t=qe(t)),t||null},it=/\{\{/,at=function(e){return{body:e,name:tt(e),children:[]}},nt=function(e){let t=e.body.substr(2);return t=t.replace(/\}\}$/,""),e.children=et(t),e.children=e.children.map(at),0===e.children.length||e.children.forEach((e=>{let t=e.body.substr(2);return it.test(t)?nt(e):null})),e},rt=function(e){let t=et(e);return t=t.map(at),t=t.map(nt),t},ot=["anchor","defaultsort","use list-defined references","void","pp","pp-move-indef","pp-semi-indef","pp-vandalism","r","#tag","div col","pope list end","shipwreck list end","starbox end","end box","end","s-end"].reduce(((e,t)=>(e[t]=!0,e)),{});var st={"gnf protein box":!0,"automatic taxobox":!0,"chembox ":!0,editnotice:!0,geobox:!0,hybridbox:!0,ichnobox:!0,infraspeciesbox:!0,mycomorphbox:!0,oobox:!0,"paraphyletic group":!0,speciesbox:!0,subspeciesbox:!0,"starbox short":!0,taxobox:!0,nhlteamseason:!0,"asian games bid":!0,"canadian federal election results":!0,"dc thomson comic strip":!0,"daytona 24 races":!0,edencharacter:!0,"moldova national football team results":!0,samurai:!0,protein:!0,"sheet authority":!0,"order-of-approx":!0,"bacterial labs":!0,"medical resources":!0,ordination:!0,"hockey team coach":!0,"hockey team gm":!0,"pro hockey team":!0,"hockey team player":!0,"hockey team start":!0,mlbbioret:!0};const lt=new RegExp("^(subst.)?("+b.join("|")+")(?=:| |\n|$)","i");b.forEach((e=>{st[e]=!0}));const ct=/^infobox /i,ut=/ infobox$/i,mt=/^year in [A-Z]/i,pt=function(e={}){let t=e.template.match(lt),i=e.template;t&&t[0]&&(i=i.replace(t[0],"")),i=i.trim();let a={template:"infobox",type:i,data:e};return delete a.data.template,delete a.data.list,a};let dt={imdb:"imdb name","imdb episodes":"imdb episode",localday:"currentday",localdayname:"currentdayname",localyear:"currentyear","birth date based on age at death":"birth based on age as of date","bare anchored list":"anchored list",cvt:"convert",cricon:"flagicon",sfrac:"frac",sqrt:"radic","unreferenced section":"unreferenced",redir:"redirect",sisterlinks:"sister project links","main article":"main",by:"baseball year",aldsy:"alds year",nldsy:"nlds year","str rep":"replace",ushr2:"ushr",stn:"station",metrod:"metro",fw:"ferry",rws:"stnlnk",sclass2:"sclass",under:"underline",brackets:"bracket",raise:"lower"},ht={date:["byline","dateline"],citation:["cite","source","source-pr","source-science"],"no spam":["email","@","no spam blue"],"lrt station":["lrt","lrts"],"mrt station":["mrt","mrts"],flagcountry:["cr","cr-rt"],trunc:["str left","str crop"],percentage:["pct","percentage"],rnd:["rndfrac","rndnear"],abbr:["tooltip","abbrv","define"],sfn:["sfnref","harvid","harvnb"],"birth date and age":["death date and age","bda"],currentmonth:["localmonth","currentmonthname","currentmonthabbrev"],currency:["monnaie","unité","nombre","nb","iso4217"],coord:["coor","coor title dms","coor title dec","coor dms","coor dm","coor dec"],"columns-list":["cmn","col-list","columnslist","collist"],nihongo:["nihongo2","nihongo3","nihongo-s","nihongo foot"],plainlist:["flatlist","plain list"],"winning percentage":["winpct","winperc"],"collapsible list":["nblist","nonbulleted list","ubl","ublist","ubt","unbullet","unbulleted list","unbulleted","unbulletedlist","vunblist"],"election box begin":["election box begin no change","election box begin no party","election box begin no party no change","election box inline begin","election box inline begin no change"],"election box candidate":["election box candidate for alliance","election box candidate minor party","election box candidate no party link no change","election box candidate with party link","election box candidate with party link coalition 1918","election box candidate with party link no change","election box inline candidate","election box inline candidate no change","election box inline candidate with party link","election box inline candidate with party link no change","election box inline incumbent"],"4teambracket":["2teambracket","4team2elimbracket","8teambracket","16teambracket","32teambracket","4roundbracket-byes","cwsbracket","nhlbracket","nhlbracket-reseed","4teambracket-nhl","4teambracket-ncaa","4teambracket-mma","4teambracket-mlb","16teambracket-two-reseeds","8teambracket-nhl","8teambracket-mlb","8teambracket-ncaa","8teambracket-afc","8teambracket-afl","8teambracket-tennis3","8teambracket-tennis5","16teambracket-nhl","16teambracket-nhl divisional","16teambracket-nhl-reseed","16teambracket-nba","16teambracket-swtc","16teambracket-afc","16teambracket-tennis3","16teambracket-tennis5"],start:["end","birth","death","start date","end date","birth date","death date","start date and age","end date and age","dob"],"start-date":["end-date","birth-date","death-date","birth-date and age","birth-date and given age","death-date and age","death-date and given age"],tl:["lts","t","tfd links","tiw","tltt","tetl","tsetl","ti","tic","tiw","tlt","ttl","twlh","tl2","tlu","demo","xpd","para","elc","xtag","mli","mlix","url"],done:["resolved mark large","implemented","pimplemented","resolved mark","accepted","agree","approved","checked2","verified","conditional yes","confirmed","confirmed-nc","tallyho","tick","helped","doneu|example","edited2","donetask","unprod","autp","responded","sure","merge done","marked","pass","aye","yes check","y&","yeac","yeag"],xmark:["expired","deleted","not done","not done empty request","not done unclear","not done not likely","stale-small","smallrejected","x mark","nay","no mark","not done-t","fail","n&","x mark-n","xed box","cancelled","deleted-image","already declined","opblocked","user-blocked","notabug","notfixed","won't fix","withdraw","nojoy","unrelated","off-topic talk","nayc","nayg"],checked:["already done","resolved1","check mark-n","checked box"],"station link":["amtk","cta","bts","mnrr","mtams","munis","njts","scax","wmata","rwsa"]};Object.keys(O).forEach((e=>{dt["ipa-"+e]="ipa",dt["ipac-"+e]="ipac"})),Object.keys(ht).forEach((e=>{ht[e].forEach((t=>{dt[t]=e}))}));var gt={"·":"·",dot:"·",middot:"·","•":" • ",",":",","=":"=","1/2":"1⁄2","1/3":"1⁄3","2/3":"2⁄3","1/4":"1⁄4","3/4":"3⁄4","–":"–",ndash:"–","en dash":"–","spaced ndash":" – ","—":"—",mdash:"—",spd:" – ","em dash":"—","number sign":"#","hash-tag":"#",ibeam:"I","&":"&",";":";",ampersand:"&",dagger:"†","double-dagger":"‡",snds:" – ",snd:" – ","^":" ","!":"|","'":"'","\\":" /","`":"`","[":"[","*":"*",asterisk:"*","long dash":"———",clear:"\n\n","h.":"ḥ",profit:"▲",loss:"▼",gain:"▲",ell:"ℓ","1~":"~","2~":"~~","3~":"~~~","4~":"~~~~","5~":"~~~~~",goldmedal:"🥇",silvermedal:"🥈",bronzemedal:"🥉",done:"✅",xmark:"❌",checked:"✔️","thumbs up":"👍","thumbs down":"👎",minusplus:"∓",plusminus:"±"};let bt={p1:0,p2:1,p3:2,resize:1,lang:1,"rtl-lang":1,"line-height":1,l:2,h:1,sort:1};["defn","lino","finedetail","nobold","noitalic","nocaps","vanchor","rnd","date","taste","monthname","baseball secondary style","nowrap","nobr","big","cquote","pull quote","smaller","midsize","larger","big","kbd","bigger","large","mono","strongbad","stronggood","huge","xt","xt2","!xt","xtn","xtd","dc","dcr","mxt","!mxt","mxtn","mxtd","bxt","!bxt","bxtn","bxtd","delink","pre","var","mvar","pre2","code","char","angle bracket","angbr","symb","dabsearch","key press","nowiki","nowiki2","unstrip","unstripnowiki","plain text","make code","killmarkers","longitem","longlink","strikethrough","underline","uuline","not a typo","text","var serif","double underline","nee","ne","left","right","center","centered","justify","smalldiv","bold div","monodiv","italic div","bigdiv","strikethroughdiv","strikethrough color","pbpe"].forEach((e=>{bt[e]=0}));let kt={};["mv","m/v","gts","hsc","ms","m/s","my","m/y","ps","rms","rv","r/v","sb","ss","s/s","sv","s/v","sy","s/y","tss","ans","hmas","hmbs","bns","hmcs","ccgs","arc","hdms","bae","ens","eml","rfns","fns","hs","sms","smu","gs","icgv","ins","kri","lé","jsub","jds","js","hnlms","hmnzs","nns","hnoms","hmpngs","bap","rps","brp","orp","nrp","nms","rss","sas","hmsas","roks","hswms","htms","tcg","hms","hmt","rfaux","usat","uscgc","usns","usrc","uss","usav"].forEach((e=>{kt[e]=t=>{let{name:i,id:a}=Pe(t,["name","id"]);return a?`[[${e.toUpperCase()} ${i} (${a})]]`:`[[${e.toUpperCase()} ${i}]]`}}));const ft=function(e){if(!e.numerator&&!e.denominator)return null;let t=Number(e.numerator)/Number(e.denominator);return t*=100,Number(e.decimals),parseInt(t,10)},wt=function(e=""){if("number"==typeof e)return e;e=(e=e.replace(/,/g,"")).replace(/−/g,"-");let t=Number(e);return isNaN(t)?e:t},yt=function(e){let t=e.match(/ipac?-(.+)/);return null!==t?!0===O.hasOwnProperty(t[1])?O[t[1]].english_title:t[1]:null},$t=e=>e.charAt(0).toUpperCase()+e.substring(1),xt=function(e){let t=e%10,i=e%100;return 1===t&&11!==i?e+"st":2===t&&12!==i?e+"nd":3===t&&13!==i?e+"rd":e+"th"},vt={wikt:"wiktionary",commons:"commons",c:"commons",commonscat:"commonscat",n:"wikinews",q:"wikiquote",s:"wikisource",a:"wikiauthor",b:"wikibooks",voy:"wikivoyage",v:"wikiversity",d:"wikidata",species:"wikispecies",m:"meta",mw:"mediawiki"};var jt={ra:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},deg2hms:e=>(Pe(e,["degrees"]).degrees||"")+"°",hms2deg:e=>{let t=Pe(e,["hours","minutes","seconds"]);return[t.hours||0,t.minutes||0,t.seconds||0].join(":")},decdeg:e=>{let t=Pe(e,["deg","min","sec","hem","rnd"]);return(t.deg||t.degrees)+"°"},sortname:e=>{let t=Pe(e,["first","last","target","sort"]),i=`${t.first||""} ${t.last||""}`;return i=i.trim(),t.nolink?t.target||i:(t.dab&&(i+=` (${t.dab})`,t.target&&(t.target+=` (${t.dab})`)),t.target?`[[${t.target}|${i}]]`:`[[${i}]]`)},"first word":e=>{let t=Pe(e,["text"]),i=t.text||"";return t.sep?i.split(t.sep)[0]:i.split(" ")[0]},trunc:e=>{let t=Pe(e,["str","len"]);return(t.str||"").substr(0,t.len)},"str mid":e=>{let t=Pe(e,["str","start","end"]),i=parseInt(t.start,10)-1,a=parseInt(t.end,10);return t.str.substr(i,a)},reign:e=>{let t=Pe(e,["start","end"]);return`(r. ${t.start} – ${t.end})`},circa:e=>{let{year:t}=Pe(e,["year"]);return t?`c. ${t}`:"c. "},"decade link":e=>{let{year:t}=Pe(e,["year"]);return`${t}|${t}s`},decade:e=>{let t=Pe(e,["year"]),i=Number(t.year);return i=10*Math.floor(i/10),`${i}s`},century:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/100)+1,`${i}`},radic:e=>{let t=Pe(e,["after","before"]);return`${t.before||""}√${t.after||""}`},"medical cases chart/row":e=>e,oldstyledate:e=>{let t=Pe(e,["date","year"]);return t.year?t.date+" "+t.year:t.date},braces:e=>{let t=Pe(e,["text"]),i="";return t.list&&(i="|"+t.list.join("|")),"{{"+(t.text||"")+i+"}}"},hlist:e=>{let t=Pe(e);return t.list=t.list||[],t.list.join(" · ")},pagelist:e=>(Pe(e).list||[]).join(", "),catlist:e=>(Pe(e).list||[]).join(", "),"br separated entries":e=>(Pe(e).list||[]).join("\n\n"),"comma separated entries":e=>(Pe(e).list||[]).join(", "),"anchored list":e=>{let t=Pe(e).list||[];return t=t.map(((e,t)=>`${t+1}. ${e}`)),t.join("\n\n")},"bulleted list":e=>{let t=Pe(e).list||[];return t=t.filter((e=>e)),t=t.map((e=>"• "+e)),t.join("\n\n")},plainlist:e=>{let t=(e=Ee(e)).split("|").slice(1);return t=t.join("|").split(/\n ?\* ?/),t=t.filter((e=>e)),t.join("\n\n")},term:e=>`${Pe(e,["term"]).term}:`,linum:e=>{let{num:t,text:i}=Pe(e,["num","text"]);return`${t}. ${i}`},"block indent":e=>{let t=Pe(e);return t[1]?"\n"+t[1]+"\n":""},lbs:e=>{let t=Pe(e,["text"]);return`[[${t.text} Lifeboat Station|${t.text}]]`},lbc:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}-class]]`},lbb:e=>{let t=Pe(e,["text"]);return`[[${t.text}-class lifeboat|${t.text}]]`},"#dateformat":e=>(e=e.replace(/:/,"|"),Pe(e,["date","format"]).date),lc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toLowerCase()),uc:e=>(e=e.replace(/:/,"|"),(Pe(e,["text"]).text||"").toUpperCase()),lcfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toLowerCase()+t.substr(1):""},ucfirst:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text"]).text;return t?t[0].toUpperCase()+t.substr(1):""},padleft:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padStart(t.num,t.str||"0")},padright:e=>{e=e.replace(/:/,"|");let t=Pe(e,["text","num"]);return(t.text||"").padEnd(t.num,t.str||"0")},abbrlink:e=>{let t=Pe(e,["abbr","page"]);return t.page?`[[${t.page}|${t.abbr}]]`:`[[${t.abbr}]]`},own:e=>{let t=Pe(e,["author"]),i="Own work";return t.author&&(i+=" by "+t.author),i},formatnum:e=>{e=e.replace(/:/,"|");let t=Pe(e,["number"]).number||"";return t=t.replace(/,/g,""),Number(t).toLocaleString()||""},frac:e=>{let t=Pe(e,["a","b","c"]);return t.c?`${t.a} ${t.b}/${t.c}`:t.b?`${t.a}/${t.b}`:`1/${t.b}`},convert:e=>{let t=Pe(e,["num","two","three","four"]);return"-"===t.two||"to"===t.two||"and"===t.two?t.four?`${t.num} ${t.two} ${t.three} ${t.four}`:`${t.num} ${t.two} ${t.three}`:`${t.num} ${t.two}`},tl:e=>{let t=Pe(e,["first","second"]);return t.second||t.first},won:e=>{let t=Pe(e,["text"]);return t.place||t.text||$t(t.template)},tag:e=>{let t=Pe(e,["tag","open"]);const i={span:!0,div:!0,p:!0};return t.open&&"pair"!==t.open?"":i[t.tag]?t.content||"":`<${t.tag} ${t.attribs||""}>${t.content||""}`},plural:e=>{e=e.replace(/plural:/,"plural|");let t=Pe(e,["num","word"]),i=Number(t.num),a=t.word;return 1!==i&&(/.y$/.test(a)?a=a.replace(/y$/,"ies"):a+="s"),i+" "+a},dec:e=>{let t=Pe(e,["degrees","minutes","seconds"]),i=(t.degrees||0)+"°";return t.minutes&&(i+=t.minutes+"′"),t.seconds&&(i+=t.seconds+"″"),i},val:e=>{let t=Pe(e,["number","uncertainty"]),i=t.number;i&&Number(i)&&(i=Number(i).toLocaleString());let a=i||"";return t.p&&(a=t.p+a),t.s&&(a=t.s+a),(t.u||t.ul||t.upl)&&(a=a+" "+(t.u||t.ul||t.upl)),a},percentage:e=>{let t=Pe(e,["numerator","denominator","decimals"]),i=ft(t);return null===i?"":i+"%"},small:e=>{let t=Pe(e);return t.list&&t.list[0]?t.list[0]:""},"percent-done":e=>{let t=Pe(e,["done","total","digits"]),i=ft({numerator:t.done,denominator:t.total,decimals:t.digits});return null===i?"":`${t.done} (${i}%) done`},loop:e=>{let t=Pe(e,["times","text"]),i=Number(t.times)||0,a="";for(let e=0;e{let t=Pe(e,["text"]);return String((t.text||"").trim().length)},digits:e=>(Pe(e,["text"]).text||"").replace(/[^0-9]/g,""),resize:e=>{let{n:t,text:i}=Pe(e,["n","text"]);return i?i||"":t||""},"last word":e=>{let t=(Pe(e,["text"]).text||"").split(/ /g);return t[t.length-1]||""},replace:e=>{let t=Pe(e,["text","from","to"]);return t.from&&t.to?(t.text||"").replace(t.from,t.to):t.text||""},"title case":e=>(Pe(e,["text"]).text||"").split(/ /).map(((e,t)=>t>0&&"the"===e||"of"===e?e:$t(e))).join(" "),"no spam":e=>{let t=Pe(e,["account","domain"]);return`${t.account||""}@${t.domain}`},"baseball year":e=>{let t=Pe(e,["year"]).year||"";return`[[${t} in baseball|${t}]]`},"mlb year":e=>{let t=Pe(e,["year"]).year||"";return`[[${t} Major League Baseball season|${t}]]`},"nlds year":e=>{let{year:t}=Pe(e,["year"]);return`[[${t||""} National League Division Series|${t}]]`},"alds year":e=>{let{year:t}=Pe(e,["year"]);return`[[${t||""} American League Division Series|${t}]]`},"nfl year":e=>{let{year:t,other:i}=Pe(e,["year","other"]);return i&&t?`[[${t} NFL season|${t}]]–[[${i} NFL season|${i}]]`:`[[${t||""} NFL season|${t}]]`},"nfl playoff year":e=>{let{year:t}=Pe(e,["year"]);return t=Number(t),`[[${t}–${t+1} NFL playoffs|${t}]]`},"nba year":e=>{let{year:t}=Pe(e,["year"]);t=Number(t);let i=t+1;return`[[${t}–${i} NBA season|${t}–${i}]]`},"mhl year":e=>{let t=Pe(e,["year"]),i=Number(t.year),a=i+1;return`[[${i}–${a} NHL season|${i}–${a}]]`},min:e=>{let t=Pe(e).list||[],i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t{let t=Pe(e).list,i=Number(t[0])||0;return t.forEach((e=>{let t=Number(e);!isNaN(t)&&t>i&&(i=t)})),String(i)},uspolabbr:e=>{let{party:t,state:i,house:a}=Pe(e,["party","state","house","link"]);if(!t||!i)return"";let n=`${t}‑${i}`;return a&&(n+=` ${xt(a)}`),n},ushr:e=>{let{state:t,num:i,type:a}=Pe(e,["state","num","type"]),n="";if("AL"!==i)return i=xt(Number(i)),`${t}'s ${i} congressional district`;if(n=`${t}'s at-large congressional district`,a){if(a=a.toLowerCase(),i="AL"===i?"At-large":i,"e"===a)return`[[${n}|${i}]]`;if("u"===a)return`[[${n}|${t}]]`;if("b"===a||"x"===a)return`[[${n}|${t} ${i}]]`}return`[[${n}]]`},metro:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},station:e=>{let{name:t,dab:i}=Pe(e,["name","x","dab"]);return i?`[[${t} station (${i})|${t}]]`:`[[${t} station|${t}]]`},bssrws:e=>{let{one:t,two:i}=Pe(e,["one","two"]),a=t;return i&&(a+=" "+i),`[[${a} railway station|${a}]]`},stnlnk:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} railway station (${i})|${t}]]`:`[[${t} railway station|${t}]]`},"station link":e=>{let{station:t,system:i}=Pe(e,["system","station"]);return t||i},"line link":e=>{let{station:t,system:i}=Pe(e,["system","station"]);return t||i},subway:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} subway station|${t}]]`},"lrt station":e=>{let{name:t}=Pe(e,["name"]);return`[[${t} LRT station|${t}]]`},"mrt station":e=>{let{name:t}=Pe(e,["name"]);return`[[${t} MRT station|${t}]]`},rht:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} railway halt|${t}]]`},ferry:e=>{let{name:t}=Pe(e,["name"]);return`[[${t} ferry wharf|${t}]]`},tram:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} tram stop (${i})|${t}]]`:`[[${t} tram stop|${t}]]`},tstop:e=>{let{name:t,dab:i}=Pe(e,["name","dab"]);return i?`[[${t} ${i} stop|${t}]]`:`[[${t} stop|${t}]]`},ship:e=>{let{prefix:t,name:i,id:a}=Pe(e,["prefix","name","id"]);return t=t||"",`[[${t.toUpperCase()} ${i}]]`},sclass:e=>{let{cl:t,type:i}=Pe(e,["cl","type","fmt"]);return`[[${t}-class ${i} |''${t}''-class]] [[${i}]]`},"center block":e=>{let{text:t}=Pe(e,["text"]);return t||""},align:e=>{let{text:t}=Pe(e,["dir","text"]);return t||""},font:e=>{let{text:t}=Pe(e,["text"]);return t||""},float:e=>{let{text:t,dir:i}=Pe(e,["dir","text"]);return t?t||"":i},lower:e=>{let{text:t,n:i}=Pe(e,["n","text"]);return t?t||"":i},splitspan:e=>{let t=Pe(e).list||[];return(t[0]||"")+"\n"+(t[1]||"")},bracket:e=>{let{text:t}=Pe(e,["text"]);return t?`[${t}]`:"["},"in title":e=>{let{title:t,text:i}=Pe(e,["title","text"]);return i||(t?`All pages with titles containing ${t}`:"")},"look from":e=>{let{title:t,text:i}=Pe(e,["title","text"]);return i||(t?`All pages with titles beginning with ${t}`:"")}};let _t={};["sr-latn-cyrl","sr-cyrl-latn","sr-latn","sr-cyrl","sr-cyr","sh-latn-cyrl","sh-cyrl-latn","sh-latn","sh-cyrl","cel-1bd","cel-x-proto","en-emodeng","de-at","de-ch","gem-x-proto","gsw-fr","nds-nl","nl-be","ku-arab","ku-cyrl","pt-br","fra-frc","fra-que","roa-leo","roa-nor","ca-valencia","ast-leo","grc-gre","grc-x-doric","grc-x-proto","grc-x-medieval","cpg","gmy","grc","grk-x-proto","pnt","mga","owl","pgl","sga","wlm","xbm","xcb","xcg","xpi","aae","aln","sq-definite","bs-cyrl","hsb","ltg","orv","prg","rsk","rue","rus","sgs","sla","szl","wen","aoa","chn","cri","dlm","egl","fax","frc","frm","fro","fr-gallo","oc-gascon","gcf","gcr","ist","la-x-medieval","lij-mc","lld","lou","mfe","mol","mwl","mxi","nrf","osc","osp","pcd","pln","rcf","rgn","roa","ruo","rup","ruq","sdc","sdn","src","sro","xvo","bzj","cim","dum","enm","frk","frr","frs","gmh","gml","gmw","goh","gos","gsw","gyn","icr","jam","kri","lng","nb","non","nrn","odt","ofs","osx","pey","sli","srm","srn","stq","swg","vmf","wae","wep","wes","zea","hmd","hoc","kha","mnw","mtq","vi-chunom","vi-hantu","mvi","rys","ryu","yoi","ace","akl","ami","bew","bik","bjn","bya","cal","cbk","cjm","coa","cyo","dev","fil","gad","hil","iba","ibg","ibl","ilp","itv","ivv","jax","kne","krj","kxd","ljp","mad","mak","mdh","mrv","mrw","ms-arab","nia","niu","pau","pwn","rap","rar","sgd","su-fonts","szy","tao","tkl","tsg","tvl","uli","wls","xsb","yap","yka","ckt","itl","brh","oty","tcy","abq","ady","ddo","inh","kbd","lbe","lez","rut","tab","uby","udi","bai","bin","bsq","dag","dyu","efi","fan","fmp","fuc","fuf","gaa","ibb","kbp","kcg","kpo","ktu","lu","lua","lun","mkw","mos","oaa","sjo","ude","anm","bft","blk","brx","dng","kjp","kjz","ksw","lbj","lus","aae","aaq","abe","abq","aca","ace","acf","acm","acw","ady","ae","aeb","aec","aer","afb","aht","aii","aij","ain","aiq","akk","akl","akz","ale","aln","alq","alt","ami","anm","aoa","apj","apm","apw","ayn","arb","arh","ari","arn","arp","arq","ary","arz","asb","ath","ats","awa","axm","azb","azd","azj","bai","bal","ban","bax","bdz","bea","ber","bew","bft","bgn","bho","bik","bin","bjn","bla","blc","blk","bqi","brh","brx","bsk","bsq","bua","bvb","bya","bzj","cal","cay","cbk","ccp","chg","chm","chn","chp","cic","cim","ciw","cjm","cjs","ckb","ckt","cku","cld","clm","cmg","cmn","cms","cnu","coa","coc","coj","com","coo","cop","cpg","crg","crh","cri","crj","crk","crl","crm","cro","csw","csz","ctg","ctm","cyo","dag","dak","ddo","deh","del","den","dev","din","dlm","dng","dum","dyu","efi","egl","egy","elx","eml","ems","cmn","och","yue","mjw","mni","my-name-mlcts","nan","nwc","omp","otb","pwo","sip","xct","xsr","1ca","alt","az-arab","azb","azj","chg","cjs","crh","crh3","kaa","kjh","krc","kum","nog","ota","otk","sah","slr","sty","tt-arab","tt-cyrl","tt-latn","tyv","uniturk","chm","est-sea","fit","fkv","izh","jmy","koi","krl","liv","mdf","mhr","mrj","myv","olo","sia","sjd","sje","sjk","sjt","sju","sma","smi","smj","smn","sms","vep","vot","vro","yrk","din","luo","srr","sus","swh","umb","yao"].forEach((e=>{_t["lang-"+e]=0})),Object.keys(O).forEach((e=>{_t["lang-"+e]=0}));var zt=[["🇦🇩","and","andorra"],["🇦🇪","are","united arab emirates"],["🇦🇫","afg","afghanistan"],["🇦🇬","atg","antigua and barbuda"],["🇦🇮","aia","anguilla"],["🇦🇱","alb","albania"],["🇦🇲","arm","armenia"],["🇦🇴","ago","angola"],["🇦🇶","ata","antarctica"],["🇦🇷","arg","argentina"],["🇦🇸","asm","american samoa"],["🇦🇹","aut","austria"],["🇦🇺","aus","australia"],["🇦🇼","abw","aruba"],["🇦🇽","ala","åland islands"],["🇦🇿","aze","azerbaijan"],["🇧🇦","bih","bosnia and herzegovina"],["🇧🇧","brb","barbados"],["🇧🇩","bgd","bangladesh"],["🇧🇪","bel","belgium"],["🇧🇫","bfa","burkina faso"],["🇧🇬","bgr","bulgaria"],["🇧🇬","bul","bulgaria"],["🇧🇭","bhr","bahrain"],["🇧🇮","bdi","burundi"],["🇧🇯","ben","benin"],["🇧🇱","blm","saint barthélemy"],["🇧🇲","bmu","bermuda"],["🇧🇳","brn","brunei darussalam"],["🇧🇴","bol","bolivia"],["🇧🇶","bes","bonaire, sint eustatius and saba"],["🇧🇷","bra","brazil"],["🇧🇸","bhs","bahamas"],["🇧🇹","btn","bhutan"],["🇧🇻","bvt","bouvet island"],["🇧🇼","bwa","botswana"],["🇧🇾","blr","belarus"],["🇧🇿","blz","belize"],["🇨🇦","can","canada"],["🇨🇨","cck","cocos (keeling) islands"],["🇨🇩","cod","congo"],["🇨🇫","caf","central african republic"],["🇨🇬","cog","congo"],["🇨🇭","che","switzerland"],["🇨🇮","civ","côte d'ivoire"],["🇨🇰","cok","cook islands"],["🇨🇱","chl","chile"],["🇨🇲","cmr","cameroon"],["🇨🇳","chn","china"],["🇨🇴","col","colombia"],["🇨🇷","cri","costa rica"],["🇨🇺","cub","cuba"],["🇨🇻","cpv","cape verde"],["🇨🇼","cuw","curaçao"],["🇨🇽","cxr","christmas island"],["🇨🇾","cyp","cyprus"],["🇨🇿","cze","czech republic"],["🇩🇪","deu","germany"],["🇩🇪","ger","germany"],["🇩🇯","dji","djibouti"],["🇩🇰","dnk","denmark"],["🇩🇲","dma","dominica"],["🇩🇴","dom","dominican republic"],["🇩🇿","dza","algeria"],["🇪🇨","ecu","ecuador"],["🇪🇪","est","estonia"],["🇪🇬","egy","egypt"],["🇪🇭","esh","western sahara"],["🇪🇷","eri","eritrea"],["🇪🇸","esp","spain"],["🇪🇹","eth","ethiopia"],["🇫🇮","fin","finland"],["🇫🇯","fji","fiji"],["🇫🇰","flk","falkland islands (malvinas)"],["🇫🇲","fsm","micronesia"],["🇫🇴","fro","faroe islands"],["🇫🇷","fra","france"],["🇬🇦","gab","gabon"],["🇬🇧","gbr","united kingdom"],["🇬🇩","grd","grenada"],["🇬🇫","guf","french guiana"],["🇬🇬","ggy","guernsey"],["🇬🇭","gha","ghana"],["🇬🇮","gib","gibraltar"],["🇬🇱","grl","greenland"],["🇬🇲","gmb","gambia"],["🇬🇳","gin","guinea"],["🇬🇵","glp","guadeloupe"],["🇬🇶","gnq","equatorial guinea"],["🇬🇷","grc","greece"],["🇬🇸","sgs","south georgia"],["🇬🇹","gtm","guatemala"],["🇬🇺","gum","guam"],["🇬🇼","gnb","guinea-bissau"],["🇬🇾","guy","guyana"],["🇭🇰","hkg","hong kong"],["🇭🇲","hmd","heard island and mcdonald islands"],["🇭🇳","hnd","honduras"],["🇭🇷","hrv","croatia"],["🇭🇹","hti","haiti"],["🇭🇺","hun","hungary"],["🇮🇩","idn","indonesia"],["🇮🇪","irl","ireland"],["🇮🇱","isr","israel"],["🇮🇲","imn","isle of man"],["🇮🇳","ind","india"],["🇮🇴","iot","british indian ocean territory"],["🇮🇶","irq","iraq"],["🇮🇷","irn","iran"],["🇮🇸","isl","iceland"],["🇮🇹","ita","italy"],["🇯🇪","jey","jersey"],["🇯🇲","jam","jamaica"],["🇯🇴","jor","jordan"],["🇯🇵","jpn","japan"],["🇰🇪","ken","kenya"],["🇰🇬","kgz","kyrgyzstan"],["🇰🇭","khm","cambodia"],["🇰🇮","kir","kiribati"],["🇰🇲","com","comoros"],["🇰🇳","kna","saint kitts and nevis"],["🇰🇵","prk","north korea"],["🇰🇷","kor","south korea"],["🇰🇼","kwt","kuwait"],["🇰🇾","cym","cayman islands"],["🇰🇿","kaz","kazakhstan"],["🇱🇦","lao","lao people's democratic republic"],["🇱🇧","lbn","lebanon"],["🇱🇨","lca","saint lucia"],["🇱🇮","lie","liechtenstein"],["🇱🇰","lka","sri lanka"],["🇱🇷","lbr","liberia"],["🇱🇸","lso","lesotho"],["🇱🇹","ltu","lithuania"],["🇱🇺","lux","luxembourg"],["🇱🇻","lva","latvia"],["🇱🇾","lby","libya"],["🇲🇦","mar","morocco"],["🇲🇨","mco","monaco"],["🇲🇩","mda","moldova"],["🇲🇪","mne","montenegro"],["🇲🇫","maf","saint martin (french part)"],["🇲🇬","mdg","madagascar"],["🇲🇭","mhl","marshall islands"],["🇲🇰","mkd","macedonia"],["🇲🇱","mli","mali"],["🇲🇲","mmr","myanmar"],["🇲🇳","mng","mongolia"],["🇲🇴","mac","macao"],["🇲🇵","mnp","northern mariana islands"],["🇲🇶","mtq","martinique"],["🇲🇷","mrt","mauritania"],["🇲🇸","msr","montserrat"],["🇲🇹","mlt","malta"],["🇲🇺","mus","mauritius"],["🇲🇻","mdv","maldives"],["🇲🇼","mwi","malawi"],["🇲🇽","mex","mexico"],["🇲🇾","mys","malaysia"],["🇲🇿","moz","mozambique"],["🇳🇦","nam","namibia"],["🇳🇨","ncl","new caledonia"],["🇳🇪","ner","niger"],["🇳🇫","nfk","norfolk island"],["🇳🇬","nga","nigeria"],["🇳🇮","nic","nicaragua"],["🇳🇱","nld","netherlands"],["🇳🇴","nor","norway"],["🇳🇵","npl","nepal"],["🇳🇷","nru","nauru"],["🇳🇺","niu","niue"],["🇳🇿","nzl","new zealand"],["🇴🇲","omn","oman"],["🇵🇦","pan","panama"],["🇵🇪","per","peru"],["🇵🇫","pyf","french polynesia"],["🇵🇬","png","papua new guinea"],["🇵🇭","phl","philippines"],["🇵🇰","pak","pakistan"],["🇵🇱","pol","poland"],["🇵🇲","spm","saint pierre and miquelon"],["🇵🇳","pcn","pitcairn"],["🇵🇷","pri","puerto rico"],["🇵🇸","pse","palestinian territory"],["🇵🇹","prt","portugal"],["🇵🇼","plw","palau"],["🇵🇾","pry","paraguay"],["🇶🇦","qat","qatar"],["🇷🇪","reu","réunion"],["🇷🇴","rou","romania"],["🇷🇸","srb","serbia"],["🇷🇺","rus","russia"],["🇷🇼","rwa","rwanda"],["🇸🇦","sau","saudi arabia"],["🇸🇧","slb","solomon islands"],["🇸🇨","syc","seychelles"],["🇸🇩","sdn","sudan"],["🇸🇪","swe","sweden"],["🇸🇬","sgp","singapore"],["🇸🇭","shn","saint helena, ascension and tristan da cunha"],["🇸🇮","svn","slovenia"],["🇸🇯","sjm","svalbard and jan mayen"],["🇸🇰","svk","slovakia"],["🇸🇱","sle","sierra leone"],["🇸🇲","smr","san marino"],["🇸🇳","sen","senegal"],["🇸🇴","som","somalia"],["🇸🇷","sur","suriname"],["🇸🇸","ssd","south sudan"],["🇸🇹","stp","sao tome and principe"],["🇸🇻","slv","el salvador"],["🇸🇽","sxm","sint maarten (dutch part)"],["🇸🇾","syr","syrian arab republic"],["🇸🇿","swz","swaziland"],["🇹🇨","tca","turks and caicos islands"],["🇹🇩","tcd","chad"],["🇹🇫","atf","french southern territories"],["🇹🇬","tgo","togo"],["🇹🇭","tha","thailand"],["🇹🇯","tjk","tajikistan"],["🇹🇰","tkl","tokelau"],["🇹🇱","tls","timor-leste"],["🇹🇲","tkm","turkmenistan"],["🇹🇳","tun","tunisia"],["🇹🇴","ton","tonga"],["🇹🇷","tur","turkey"],["🇹🇹","tto","trinidad and tobago"],["🇹🇻","tuv","tuvalu"],["🇹🇼","twn","taiwan"],["🇹🇿","tza","tanzania"],["🇺🇦","ukr","ukraine"],["🇺🇬","uga","uganda"],["🇺🇲","umi","united states minor outlying islands"],["🇺🇸","us","united states"],["🇺🇸","usa","united states"],["🇺🇾","ury","uruguay"],["🇺🇿","uzb","uzbekistan"],["🇻🇦","vat","vatican city"],["🇻🇨","vct","saint vincent and the grenadines"],["🇻🇪","ven","venezuela"],["🇻🇬","vgb","virgin islands, british"],["🇻🇮","vir","virgin islands, u.s."],["🇻🇳","vnm","viet nam"],["🇻🇺","vut","vanuatu"],["🇼🇫","wlf","wallis and futuna"],["🇼🇸","wsm","samoa"],["🇾🇪","yem","yemen"],["🇾🇹","myt","mayotte"],["🇿🇦","zaf","south africa"],["🇿🇲","zmb","zambia"],["🇿🇼 ","zwe","zimbabwe"],["🇺🇳","un","united nations"],["🏴󠁧󠁢󠁥󠁮󠁧󠁿󠁧󠁢󠁥󠁮󠁧󠁿","eng","england"],["🏴󠁧󠁢󠁳󠁣󠁴󠁿","sct","scotland"],["🏴󠁧󠁢󠁷󠁬󠁳󠁿","wal","wales"],["🇪🇺","eu","european union"]];const Ot=["flag","variant"];let Et={flag:e=>{let t=Pe(e,Ot),i=t.flag||"";t.flag=(t.flag||"").toLowerCase();let a=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${a[0]||""} [[${a[2]}|${i}]]`},flagcountry:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} [[${i[2]}]]`},flagcu:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[];return`${i[0]||""} ${i[2]}`},flagicon:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`[[${i[2]}|${i[0]}]]`:""},flagdeco:e=>{let t=Pe(e,Ot);return t.flag=(t.flag||"").toLowerCase(),(zt.find((e=>t.flag===e[1]||t.flag===e[2]))||[])[0]||""},fb:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${i[2]} national football team|${i[2]}]]`:""},fbicon:e=>{let t=Pe(e,Ot);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?` [[${i[2]} national football team|${i[0]}]]`:""},flagathlete:e=>{let t=Pe(e,["name","flag","variant"]);t.flag=(t.flag||"").toLowerCase();let i=zt.find((e=>t.flag===e[1]||t.flag===e[2]));return i?`${i[0]} [[${t.name||""}]] (${i[1].toUpperCase()})`:`[[${t.name||""}]]`}};zt.forEach((e=>{Et[e[1]]=()=>e[0]}));let qt={};["rh","rh2","yes","no","maybe","eliminated","lost","safe","active","site active","coming soon","good","won","nom","sho","longlisted","tba","success","operational","failure","partial","regional","maybecheck","partial success","partial failure","okay","yes-no","some","nonpartisan","pending","unofficial","unofficial2","usually","rarely","sometimes","any","varies","black","non-album single","unreleased","unknown","perhaps","depends","included","dropped","terminated","beta","table-experimental","free","proprietary","nonfree","needs","nightly","release-candidate","planned","scheduled","incorrect","no result","cmain","calso starring","crecurring","cguest","not yet","optional"].forEach((e=>{qt[e]=e=>{let t=Pe(e,["text"]);return t.text||$t(t.template)}}));[["active fire","Active"],["site active","Active"],["site inactive","Inactive"],["yes2",""],["no2",""],["ya","✅"],["na","❌"],["nom","Nominated"],["sho","Shortlisted"],["tba","TBA"],["maybecheck","✔️"],["okay","Neutral"],["n/a","N/A"],["sdash","—"],["dunno","?"],["draw",""],["cnone",""],["nocontest",""]].forEach((e=>{qt[e[0]]=t=>Pe(t,["text"]).text||e[1]}));var Nt=Object.assign({},gt,bt,kt,jt,_t,Et,qt);let St={};["goodreads author","twitter","facebook","instagram","tumblr","pinterest","espn nfl","espn nhl","espn fc","hockeydb","fifa player","worldcat","worldcat id","nfl player","ted speaker","playmate"].forEach((e=>{St[e]=["id","name"]}));let Ct={};["imdb title","imdb name","imdb episode","imdb event","afi film","allmovie title","allgame","tcmdb title","discogs artist","discogs label","discogs release","discogs master","librivox author","musicbrainz artist","musicbrainz label","musicbrainz recording","musicbrainz release","musicbrainz work","youtube","goodreads book","dmoz"].forEach((e=>{Ct[e]=["id","title","description","section"]}));var Lt={ipa:(e,t)=>{let i=Pe(e,["transcription","lang","audio"]);return i.lang=yt(i.template),i.template="ipa",t.push(i),""},ipac:(e,t)=>{let i=Pe(e);return i.transcription=(i.list||[]).join(","),delete i.list,i.lang=yt(i.template),i.template="ipac",t.push(i),""},quote:(e,t)=>{let i=Pe(e,["text","author"]);if(t.push(i),i.text){let e=`"${i.text}"`;return i.author&&(e+="\n\n",e+=` - ${i.author}`),e+"\n"}return""},"cite gnis":(e,t)=>{let i=Pe(e,["id","name","type"]);return i.type="gnis",i.template="citation",t.push(i),""},"spoken wikipedia":(e,t)=>{let i=Pe(e,["file","date"]);return i.template="audio",t.push(i),""},yel:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`yellow: ${i.min||""}'`:""},subon:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub on: ${i.min||""}'`:""},suboff:(e,t)=>{let i=Pe(e,["min"]);return t.push(i),i.min?`sub off: ${i.min||""}'`:""},sfn:(e,t,i,a)=>{let n=Pe(e,["author","year","location"]);return a&&(n.name=n.template,n.teplate=a),t.push(n),""},redirect:(e,t)=>{let i=Pe(e,["redirect"]),a=i.list||[],n=[];for(let e=0;e{let i=Pe(e),a={};Object.keys(vt).forEach((e=>{!0===i.hasOwnProperty(e)&&(a[vt[e]]=i[e])}));let n={template:"sister project links",links:a};return t.push(n),""},"subject bar":(e,t)=>{let i=Pe(e);Object.keys(i).forEach((e=>{vt.hasOwnProperty(e)&&(i[vt[e]]=i[e],delete i[e])}));let a={template:"subject bar",links:i};return t.push(a),""},gallery:(e,t)=>{let i=Pe(e),a=(i.list||[]).filter((e=>/^ *File ?:/.test(e)));return a=a.map((e=>new _({file:e}).json())),i={template:"gallery",images:a},t.push(i),""},sky:(e,t)=>{let i=Pe(e,["asc_hours","asc_minutes","asc_seconds","dec_sign","dec_degrees","dec_minutes","dec_seconds","distance"]),a={template:"sky",ascension:{hours:i.asc_hours,minutes:i.asc_minutes,seconds:i.asc_seconds},declination:{sign:i.dec_sign,degrees:i.dec_degrees,minutes:i.dec_minutes,seconds:i.dec_seconds},distance:i.distance};return t.push(a),""},"medical cases chart":(e,t)=>{let i=["date","deathsExpr","recoveriesExpr","casesExpr","4thExpr","5thExpr","col1","col1Change","col2","col2Change"],a=Pe(e);a.data=a.data||"";let n=a.data.split("\n").map((e=>{let t=e.split(";"),a={options:new Map},n=0;for(let e=0;e{let i=Pe(e);i.x&&(i.x=i.x.split(",").map((e=>e.trim()))),i.y&&(i.y=i.y.split(",").map((e=>e.trim())));let a=1;for(;i["y"+a];)i["y"+a]=i["y"+a].split(",").map((e=>e.trim())),a+=1;return t.push(i),""},"historical populations":(e,t)=>{let i=Pe(e);i.list=i.list||[];let a=[];for(let e=0;e{const i=/^jan /i,a=/^year /i;let n=Pe(e);const r=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"];let o={},s=Object.keys(n).filter((e=>i.test(e)));s=s.map((e=>e.replace(i,""))),s.forEach((e=>{o[e]=[],r.forEach((t=>{let i=`${t} ${e}`;if(n.hasOwnProperty(i)){let t=wt(n[i]);delete n[i],o[e].push(t)}}))})),n.byMonth=o;let l={};return Object.keys(n).forEach((e=>{if(a.test(e)){let t=e.replace(a,"");l[t]=n[e],delete n[e]}})),n.byYear=l,t.push(n),""},"weather box/concise c":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>wt(e))),i.byMonth={"high c":i.list.slice(0,12),"low c":i.list.slice(12,24),"rain mm":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"weather box/concise f":(e,t)=>{let i=Pe(e);return i.list=i.list.map((e=>wt(e))),i.byMonth={"high f":i.list.slice(0,12),"low f":i.list.slice(12,24),"rain inch":i.list.slice(24,36)},delete i.list,i.template="weather box",t.push(i),""},"climate chart":(e,t)=>{let i=Pe(e).list||[],a=i[0],n=i[38];i=i.slice(1),i=i.map((e=>(e&&"−"===e[0]&&(e=e.replace(/−/,"-")),e)));let r=[];for(let e=0;e<36;e+=3)r.push({low:wt(i[e]),high:wt(i[e+1]),precip:wt(i[e+2])});let o={template:"climate chart",data:{title:a,source:n,months:r}};return t.push(o),""},medalcount:(e,t)=>{let i=Pe(e).list||[],a=[];for(let e=0;e{let i=Pe(e,["formula"]);return t.push(i),"\n\n"+(i.formula||"")+"\n\n"},legend:(e,t)=>{let i=Pe(e,["color","label"]);return t.push(i),e},isbn:(e,t)=>{let i=Pe(e,["id","id2","id3"]);return t.push(i),"ISBN "+(i.id||"")},"based on":(e,t)=>{let i=Pe(e,["title","author"]);return t.push(i),`${i.title} by ${i.author||""}`},"bbl to t":(e,t)=>{let i=Pe(e,["barrels"]);return t.push(i),"0"===i.barrels?i.barrels+" barrel":i.barrels+" barrels"},mpc:(e,t)=>{let i=Pe(e,["number","text"]);return t.push(i),`[https://minorplanetcenter.net/db_search/show_object?object_id=P/2011+NO1 ${i.text||i.number}]`},pengoal:(e,t)=>(t.push({template:"pengoal"}),"✅"),penmiss:(e,t)=>(t.push({template:"penmiss"}),"❌"),"ordered list":(e,t)=>{let i=Pe(e);return t.push(i),i.list=i.list||[],i.list.map(((e,t)=>`${t+1}. ${e}`)).join("\n\n")},"title year":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b[0-9]{4}\b/);if(e)return e[0]}return r.nomatch||""},"title century":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)(st|nd|rd|th)\b/);if(e)return e[1]||""}return r.nomatch||""},"title decade":(e,t,i,a,n)=>{let r=Pe(e,["match","nomatch","page"]),o=r.page||n.title();if(o){let e=o.match(/\b([0-9]+)s\b/);if(e)return e[1]||""}return r.nomatch||""},nihongo:(e,t)=>{let i=Pe(e,["english","kanji","romaji","extra"]);t.push(i);let a=i.english||i.romaji||"";return i.kanji&&(a+=` (${i.kanji})`),a},marriage:(e,t)=>{let i=Pe(e,["spouse","from","to","end"]);t.push(i);let a=i.spouse||"";return i.from&&(i.to?a+=` (m. ${i.from}-${i.to})`:a+=` (m. ${i.from})`),a},"sent off":(e,t)=>{let i=Pe(e,["cards"]),a={template:"sent off",cards:i.cards,minutes:i.list||[]};return t.push(a),"sent off: "+a.minutes.map((e=>e+"'")).join(", ")},transl:(e,t)=>{let i=Pe(e,["lang","text","text2"]);return i.text2&&(i.iso=i.text,i.text=i.text2,delete i.text2),t.push(i),i.text||""},"collapsible list":(e,t)=>{let i=Pe(e);t.push(i);let a="";if(i.title&&(a+=`'''${i.title}'''\n\n`),!i.list){i.list=[];for(let e=1;e<10;e+=1)i[e]&&(i.list.push(i[e]),delete i[e])}return i.list=i.list.filter((e=>e)),a+=i.list.join("\n\n"),a},"columns-list":(e,t)=>{let i=((Pe(e).list||[])[0]||"").split(/\n/).filter((e=>e));return i=i.map((e=>e.replace(/\*/,""))),t.push({template:"columns-list",list:i}),i=i.map((e=>"• "+e)),i.join("\n\n")},height:(e,t)=>{let i=Pe(e);t.push(i);let a=[];return["m","cm","ft","in"].forEach((e=>{!0===i.hasOwnProperty(e)&&a.push(i[e]+e)})),a.join(" ")},sic:(e,t)=>{let i=Pe(e,["one","two","three"]),a=(i.one||"")+(i.two||"");return"?"===i.one&&(a=(i.two||"")+(i.three||"")),t.push({template:"sic",word:a}),"y"===i.nolink?a:`${a} [sic]`},inrconvert:(e,t)=>{let i=Pe(e,["rupee_value","currency_formatting"]);t.push(i);const a={k:1e3,m:1e6,b:1e9,t:1e12,l:1e5,c:1e7,lc:1e12};if(i.currency_formatting){let e=a[i.currency_formatting]||1;i.rupee_value=i.rupee_value*e}return`inr ${i.rupee_value||""}`},frac:(e,t)=>{let i=Pe(e,["a","b","c"]),a={template:"sfrac"};return i.c?(a.integer=i.a,a.numerator=i.b,a.denominator=i.c):i.b?(a.numerator=i.a,a.denominator=i.b):(a.numerator=1,a.denominator=i.a),t.push(a),a.integer?`${a.integer} ${a.numerator}⁄${a.denominator}`:`${a.numerator}⁄${a.denominator}`},"winning percentage":(e,t)=>{let i=Pe(e,["wins","losses","ties"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=Number(i.ties)||0,o=a+n+r;"y"===i.ignore_ties&&(r=0),r&&(a+=r/2);let s=ft({numerator:a,denominator:o,decimals:1});return null===s?"":"."+10*s},winlosspct:(e,t)=>{let i=Pe(e,["wins","losses"]);t.push(i);let a=Number(i.wins),n=Number(i.losses),r=ft({numerator:a,denominator:a+n,decimals:1});return null===r?"":`${a||0} || ${n||0} || ${"."+10*r||"-"}`},"video game release":(e,t)=>{let i=["region","date","region2","date2","region3","date3","region4","date4"],a=Pe(e,i),n={template:"video game release",releases:[]};for(let e=0;e`${e.region}: ${e.date||""}`)).join("\n\n")+"\n"},uss:(e,t)=>{let i=Pe(e,["name","id"]);return t.push(i),i.id?`[[USS ${i.name} (${i.id})|USS ''${i.name}'' (${i.id})]]`:`[[USS ${i.name}|USS ''${i.name}'']]`},blockquote:(e,t)=>{let i=Pe(e,["text","author","title","source","character"]);t.push(i);let a=i.text;a||(i.list=i.list||[],a=i.list[0]||"");let n=a.replace(/"/g,"'");return n='"'+n+'"',n}};const It={"£":"GB£","¥":"¥","৳":"৳","₩":"₩","€":"€","₱":"₱","₹":"₹","₽":"₽","cn¥":"CN¥","gb£":"GB£","india rs":"₹","indian rupee symbol":"₹","indian rupee":"₹","indian rupees":"₹","philippine peso":"₱","russian ruble":"₽","SK won":"₩","turkish lira":"TRY",a$:"A$",au$:"A$",aud:"A$",bdt:"BDT",brl:"BRL",ca$:"CA$",cad:"CA$",chf:"CHF",cny:"CN¥",czk:"czk",dkk:"dkk",dkk2:"dkk",euro:"€",gbp:"GB£",hk$:"HK$",hkd:"HK$",ils:"ILS",inr:"₹",jpy:"¥",myr:"MYR",nis:"ILS",nok:"NOK",nok2:"NOK",nz$:"NZ$",nzd:"NZ$",peso:"peso",pkr:"₨",r$:"BRL",rmb:"CN¥",rub:"₽",ruble:"₽",rupee:"₹",s$:"sgd",sek:"SEK",sek2:"SEK",sfr:"CHF",sgd:"sgd",shekel:"ILS",sheqel:"ILS",ttd:"TTD",us$:"US$",usd:"US$",yen:"¥",zar:"R"},Mt=(e,t)=>{let i=Pe(e,["amount","code"]);t.push(i);let a=i.template||"";"currency"===a?(a=i.code,a||(i.code=a="usd")):""!==a&&"monnaie"!==a&&"unité"!==a&&"nombre"!==a&&"nb"!==a||(a=i.code),a=(a||"").toLowerCase(),"us"===a?i.code=a="usd":"uk"===a&&(i.code=a="gbp");let n=`${It[a]||""}${i.amount||""}`;return i.code&&!It[i.code.toLowerCase()]&&(n+=" "+i.code),n};let Rt={currency:Mt};Object.keys(It).forEach((e=>{Rt[e]=Mt}));const Ut=864e5,Ft=30*Ut,Bt=365*Ut,Kt=function(e){return new Date(`${e.year}-${e.month||0}-${e.date||1}`).getTime()},Wt=function(e,t){e=Kt(e);let i=(t=Kt(t))-e,a={},n=Math.floor(i/Bt);n>0&&(a.years=n,i-=a.years*Bt);let r=Math.floor(i/Ft);r>0&&(a.months=r,i-=a.months*Ft);let o=Math.floor(i/Ut);return o>0&&(a.days=o),a},Ht=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Yt=[void 0,"January","February","March","April","May","June","July","August","September","October","November","December"],Zt=Yt.reduce(((e,t,i)=>(0===i||(e[t.toLowerCase()]=i,e[t.substring(0,3).toLowerCase()]=i),e)),{}),Gt=function(e){let t={},i=["year","month","date","hour","minute","second"];for(let a=0;a{let i=Pe(e,["year","month","date","hour","minute","second","timezone"]),a=Gt([i.year,i.month,i.date||i.day]);return i.text=Jt(a),i.timezone&&("Z"===i.timezone&&(i.timezone="UTC"),i.text+=` (${i.timezone})`),i.hour&&i.minute&&(i.second?i.text=`${i.hour}:${i.minute}:${i.second}, `+i.text:i.text=`${i.hour}:${i.minute}, `+i.text),i.text&&t.push(Xt(i)),i.text},natural_date:(e,t)=>{let i=Pe(e,["text"]).text||"",a={};if(/^[0-9]{4}$/.test(i))a.year=parseInt(i,10);else{let e=i.replace(/[a-z]+\/[a-z]+/i,"");e=e.replace(/[0-9]+:[0-9]+(am|pm)?/i,"");let t=new Date(e);!1===isNaN(t.getTime())&&(a.year=t.getFullYear(),a.month=t.getMonth()+1,a.date=t.getDate())}return t.push(Xt(a)),i.trim()},one_year:(e,t)=>{let i=Pe(e,["year"]),a=Number(i.year);return t.push(Xt({year:a})),String(a)},two_dates:(e,t)=>{let i=Pe(e,["b","birth_year","birth_month","birth_date","death_year","death_month","death_date"]);if(i.b&&"b"===i.b.toLowerCase()){let e=Gt([i.birth_year,i.birth_month,i.birth_date]);return t.push(Xt(e)),Jt(e)}let a=Gt([i.death_year,i.death_month,i.death_date]);return t.push(Xt(a)),Jt(a)},age:e=>{let t=Qt(e);return Wt(t.from,t.to).years||0},"diff-y":e=>{let t=Qt(e),i=Wt(t.from,t.to);return 1===i.years?i.years+" year":(i.years||0)+" years"},"diff-ym":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),a.join(", ")},"diff-ymd":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),1===i.months?a.push("1 month"):i.months&&0!==i.months&&a.push(i.months+" months"),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-yd":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return 1===i.years?a.push(i.years+" year"):i.years&&0!==i.years&&a.push(i.years+" years"),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")},"diff-d":e=>{let t=Qt(e),i=Wt(t.from,t.to),a=[];return i.days+=365*(i.years||0),i.days+=30*(i.months||0),1===i.days?a.push("1 day"):i.days&&0!==i.days&&a.push(i.days+" days"),a.join(", ")}},ti=["January","February","March","April","May","June","July","August","September","October","November","December"];var ii={currentday:()=>{let e=new Date;return String(e.getDate())},currentdayname:()=>{let e=new Date;return Ht[e.getDay()]},currentmonth:()=>{let e=new Date;return ti[e.getMonth()]},currentyear:()=>{let e=new Date;return String(e.getFullYear())},monthyear:()=>{let e=new Date;return ti[e.getMonth()]+" "+e.getFullYear()},"monthyear-1":()=>{let e=new Date;return e.setMonth(e.getMonth()-1),ti[e.getMonth()]+" "+e.getFullYear()},"monthyear+1":()=>{let e=new Date;return e.setMonth(e.getMonth()+1),ti[e.getMonth()]+" "+e.getFullYear()},year:e=>{let t=Pe(e,["date"]).date,i=new Date(t);return t&&!1===isNaN(i.getTime())?String(i.getFullYear()):""},"time ago":e=>function(e){let t=new Date(e);if(isNaN(t.getTime()))return"";let i=(new Date).getTime()-t.getTime(),a="ago";i<0&&(a="from now",i=Math.abs(i));let n=i/1e3/60/60/24;return n<365?Number(n)+" days "+a:Number(n/365)+" years "+a}(Pe(e,["date","fmt"]).date),"birth date and age":(e,t)=>{let i=Pe(e,["year","month","day"]);return i.year&&/[a-z]/i.test(i.year)?ei.natural_date(e,t):(t.push(i),i=Gt([i.year,i.month,i.day]),Jt(i))},"birth year and age":(e,t)=>{let i=Pe(e,["birth_year","birth_month"]);if(i.death_year&&/[a-z]/i.test(i.death_year))return ei.natural_date(e,t);t.push(i);let a=(new Date).getFullYear()-parseInt(i.birth_year,10);i=Gt([i.birth_year,i.birth_month]);let n=Jt(i);return a&&(n+=` (age ${a})`),n},"death year and age":(e,t)=>{let i=Pe(e,["death_year","birth_year","death_month"]);return i.death_year&&/[a-z]/i.test(i.death_year)?ei.natural_date(e,t):(t.push(i),i=Gt([i.death_year,i.death_month]),Jt(i))},"birth date and age2":(e,t)=>{let i=Pe(e,["at_year","at_month","at_day","birth_year","birth_month","birth_day"]);return t.push(i),i=Gt([i.birth_year,i.birth_month,i.birth_day]),Jt(i)},"birth based on age as of date":(e,t)=>{let i=Pe(e,["age","year","month","day"]);t.push(i);let a=parseInt(i.age,10),n=parseInt(i.year,10)-a;return n&&a?`${n} (age ${i.age})`:`(age ${i.age})`},"death date and given age":(e,t)=>{let i=Pe(e,["year","month","day","age"]);t.push(i),i=Gt([i.year,i.month,i.day]);let a=Jt(i);return i.age&&(a+=` (age ${i.age})`),a},dts:e=>{e=(e=e.replace(/\|format=[ymd]+/i,"")).replace(/\|abbr=(on|off)/i,"");let t=Pe(e,["year","month","date","bc"]);return t.date&&t.month&&t.year?!0===/[a-z]/.test(t.month)?[t.month,t.date,t.year].join(" "):[t.year,t.month,t.date].join("-"):t.month&&t.year?[t.year,t.month].join("-"):t.year?(t.year<0&&(t.year=Math.abs(t.year)+" BC"),t.year):""},time:()=>{let e=new Date,t=Gt([e.getFullYear(),e.getMonth(),e.getDate()]);return Jt(t)},millennium:e=>{let t=Pe(e,["year"]),i=parseInt(t.year,10);return i=Math.floor(i/1e3)+1,t.abbr&&"y"===t.abbr?i<0?`${xt(Math.abs(i))} BC`:`${xt(i)}`:`${xt(i)} millennium`},start:ei.date,"start-date":ei.natural_date,birthdeathage:ei.two_dates,age:ei.age,"age nts":ei.age,"age in years":ei["diff-y"],"age in years and months":ei["diff-ym"],"age in years, months and days":ei["diff-ymd"],"age in years and days":ei["diff-yd"],"age in days":ei["diff-d"]};function ai(e){let t=e.pop(),i=Number(e[0]||0),a=Number(e[1]||0),n=Number(e[2]||0);if("string"!=typeof t||isNaN(i))return null;let r=1;return/[SW]/i.test(t)&&(r=-1),r*(i+a/60+n/3600)}const ni=function(e){if("number"!=typeof e)return e;let t=1e5;return Math.round(e*t)/t},ri={s:!0,w:!0},oi=function(e){let t=Pe(e);t=function(e){return e.list=e.list||[],e.list=e.list.map((t=>{let i=Number(t);if(!isNaN(i))return i;let a=t.split(/:/);return a.length>1?(e.props=e.props||{},e.props[a[0]]=a.slice(1).join(":"),null):t})),e.list=e.list.filter((e=>null!==e)),e}(t);let i=function(e){const t=e.map((e=>typeof e)).join("|");return 2===e.length&&"number|number"===t?{lat:e[0],lon:e[1]}:4===e.length&&"number|string|number|string"===t?(ri[e[1].toLowerCase()]&&(e[0]*=-1),"w"===e[3].toLowerCase()&&(e[2]*=-1),{lat:e[0],lon:e[2]}):6===e.length?{lat:ai(e.slice(0,3)),lon:ai(e.slice(3))}:8===e.length?{lat:ai(e.slice(0,4)),lon:ai(e.slice(4))}:{}}(t.list);return t.lat=ni(i.lat),t.lon=ni(i.lon),t.template="coord",delete t.list,t},si={coord:(e,t)=>{let i=oi(e);return t.push(i),i.display&&-1===i.display.indexOf("inline")?"":`${i.lat||""}°N, ${i.lon||""}°W`}},li=function(e,t,i,a){let n=Pe(e);return a&&(n.name=n.template,n.template=a),t.push(n),""},ci={persondata:li,taxobox:li,citation:li,portal:li,reflist:li,"cite book":li,"cite journal":li,"cite web":li,"commons cat":li,"election box candidate":li,"election box begin":li,main:li},ui={adx:"adx",aim:"aim",amex:"amex",asx:"asx",athex:"athex",b3:"b3","B3 (stock exchange)":"B3 (stock exchange)",barbadosse:"barbadosse",bbv:"bbv",bcba:"bcba",bcs:"bcs",bhse:"bhse",bist:"bist",bit:"bit","bm&f bovespa":"b3","bm&f":"b3",bmad:"bmad",bmv:"bmv","bombay stock exchange":"bombay stock exchange","botswana stock exchange":"botswana stock exchange",bpse:"bpse",bse:"bse",bsx:"bsx",bvb:"bvb",bvc:"bvc",bvl:"bvl",bvpasa:"bvpasa",bwse:"bwse","canadian securities exchange":"canadian securities exchange",cse:"cse",darse:"darse",dfm:"dfm",dse:"dse",euronext:"euronext",euronextparis:"euronextparis",fse:"fse",fwb:"fwb",gse:"gse",gtsm:"gtsm",idx:"idx",ise:"ise",iseq:"iseq",isin:"isin",jasdaq:"jasdaq",jse:"jse",kase:"kase",kn:"kn",krx:"krx",lse:"lse",luxse:"luxse","malta stock exchange":"malta stock exchange",mai:"mai",mcx:"mcx",mutf:"mutf",myx:"myx",nag:"nag","nasdaq dubai":"nasdaq dubai",nasdaq:"nasdaq",neeq:"neeq",nepse:"nepse",nex:"nex",nse:"nse",newconnect:"newconnect","nyse arca":"nyse arca",nyse:"nyse",nzx:"nzx","omx baltic":"omx baltic",omx:"omx",ose:"ose","otc expert":"otc expert","otc grey":"otc grey","otc pink":"otc pink",otcqb:"otcqb",otcqx:"otcqx","pfts ukraine stock exchange":"pfts ukraine stock exchange","philippine stock exchange":"philippine stock exchange",prse:"prse",psx:"psx",karse:"karse",qe:"qe","saudi stock exchange":"saudi stock exchange",sehk:"sehk","Stock Exchange of Thailand":"Stock Exchange of Thailand",set:"set",sgx:"sgx",sse:"sse",swx:"swx",szse:"szse",tase:"tase","tsx-v":"tsx-v",tsx:"tsx",tsxv:"tsxv",ttse:"ttse",twse:"twse",tyo:"tyo",wbag:"wbag",wse:"wse","zagreb stock exchange":"zagreb stock exchange","zimbabwe stock exchange":"zimbabwe stock exchange",zse:"zse"},mi=(e,t)=>{let i=Pe(e,["ticketnumber","code"]);t.push(i);let a=i.template||"";""===a&&(a=i.code),a=(a||"").toLowerCase();let n=ui[a]||"";return i.ticketnumber&&(n=`${n}: ${i.ticketnumber}`),i.code&&!ui[i.code.toLowerCase()]&&(n+=" "+i.code),n},pi={};Object.keys(ui).forEach((e=>{pi[e]=mi}));const di=function(e){return 1===(e=String(e)).length&&(e="0"+e),e},hi=function(e,t,i){e[`rd${t}-team${di(i)}`]&&(i=di(i));let a=e[`rd${t}-score${i}`],n=Number(a);return!1===isNaN(n)&&(a=n),{team:e[`rd${t}-team${i}`],score:a,seed:e[`rd${t}-seed${i}`]}},gi=function(e){let t=[],i=Pe(e);for(let e=1;e<7;e+=1){let a=[];for(let t=1;t<16;t+=2){let n=`rd${e}-team`;if(!i[n+t]&&!i[n+di(t)])break;{let n=hi(i,e,t),r=hi(i,e,t+1);a.push([n,r])}}a.length>0&&t.push(a)}return{template:"playoffbracket",rounds:t}};let bi={"4teambracket":function(e,t){let i=gi(e);return t.push(i),""},player:(e,t)=>{let i=Pe(e,["number","country","name","dl"]);t.push(i);let a=`[[${i.name}]]`;if(i.country){let e=(i.country||"").toLowerCase(),t=zt.find((t=>e===t[1]||e===t[2]))||[];t&&t[0]&&(a=t[0]+" "+a)}return i.number&&(a=i.number+" "+a),a},goal:(e,t)=>{let i={template:"goal",data:[]},a=Pe(e).list||[];for(let e=0;e{let t=e.note;return t&&(t=` (${t})`),e.min+"'"+t})).join(", "),n},"sports table":(e,t)=>{let i=Pe(e),a={};Object.keys(i).filter((e=>/^team[0-9]/.test(e))).map((e=>i[e].toLowerCase())).forEach((e=>{a[e]={name:i[`name_${e}`],win:Number(i[`win_${e}`])||0,loss:Number(i[`loss_${e}`])||0,tie:Number(i[`tie_${e}`])||0,otloss:Number(i[`otloss_${e}`])||0,goals_for:Number(i[`gf_${e}`])||0,goals_against:Number(i[`ga_${e}`])||0}}));let n={date:i.update,header:i.table_header,teams:a};t.push(n)},"cbb roster/header":function(){return'{| class="wikitable"\n |-\n ! POS\n ! #\n ! Name\n ! Height\n ! Weight\n ! Year\n ! Previous School\n ! Hometown\n |-\n'},"cbb roster/player":function(e,t){let i=Pe(e);return t.push(i),`|-\n| ${i.pos||""}\n| ${i.num||""}\n| ${i.first||""} ${i.last||""}\n| ${i.ft||""}${i.in||""}\n| ${i.lbs||""}\n| ${i.class||""}\n| ${i.high_school||""}\n| ${i.home||""}\n`},"cbb roster/footer":function(){return"\n|}"}};var ki=Object.assign({},Dt,Tt,Rt,ii,si,ci,pi,gi,bi);let fi=Object.assign({},Nt,Pt,ki);Object.keys(dt).forEach((e=>{fi[e]=fi[dt[e]]}));const wi=["0","1","2","3","4","5","6","7","8","9"],yi=function(e,t){let i=e.name;if(!0===ot.hasOwnProperty(i))return[""];if(!0===function(e){return!0===st.hasOwnProperty(e)||!!lt.test(e)||!(!ct.test(e)&&!ut.test(e))||!!mt.test(e)}(i)){let t=Pe(e.body,[],"raw");return["",pt(t)]}if(!0===/^cite [a-z]/.test(i)){let t=Pe(e.body);return t.type=t.template,t.template="citation",["",t]}if(!0===fi.hasOwnProperty(i)){if("number"==typeof fi[i]){return[Pe(e.body,wi)[String(fi[i])]||""]}if("string"==typeof fi[i])return[fi[i]];if(!0===o(fi[i])){return["",Pe(e.body,fi[i])]}if(!0===((a=fi[i])&&"[object Object]"===Object.prototype.toString.call(a))){let t=Pe(e.body,fi[i].props);return[t[fi[i].out],t]}if("function"==typeof fi[i]){let a=[];return[fi[i](e.body,a,Pe,null,t),a[0]]}}var a;if(t&&t._templateFallbackFn){let i=[],a=t._templateFallbackFn(e.body,i,Pe,null,t);if(null!==a)return[a,i[0]]}let n=Pe(e.body);return 0===Object.keys(n).length&&(n=null),["",n]},$i=(e="")=>(e=(e=e.toLowerCase()).replace(/[-_]/g," ")).trim(),xi=function(e,t){this._type=e.type,this.domain=e.domain,Object.defineProperty(this,"data",{enumerable:!1,value:e.data}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},vi={type:function(){return this._type},links:function(e){let t=[];if(Object.keys(this.data).forEach((e=>{this.data[e].links().forEach((e=>t.push(e)))})),"string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t},image:function(){let e=this.data.image||this.data.image2||this.data.logo||this.data.image_skyline||this.data.image_flag;if(!e)return null;let t=e.json(),i=t.text;return t.file=i,t.text="",t.caption=this.data.caption,t.domain=this.domain,new _(t)},get:function(e){let t=Object.keys(this.data);if("string"==typeof e){let i=$i(e);for(let e=0;e{for(let i=0;i(e.data[i]&&(t[i]=e.data[i].json()),t)),{});return!0===t.encode&&(i=W(i)),i}(this,e=e||{})},wikitext:function(){return this.wiki||""},keyValue:function(){return Object.keys(this.data).reduce(((e,t)=>(this.data[t]&&(e[t]=this.data[t].text()),e)),{})}};Object.keys(vi).forEach((e=>{xi.prototype[e]=vi[e]})),xi.prototype.data=xi.prototype.keyValue,xi.prototype.template=xi.prototype.type,xi.prototype.images=xi.prototype.image;const ji=function(e,t){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"wiki",{enumerable:!1,value:t})},_i={title:function(){let e=this.data;return e.title||e.encyclopedia||e.author||""},links:function(e){let t=[];if("number"==typeof e)return t[e];if("number"==typeof e)return t[e];if("string"==typeof e){e=e.charAt(0).toUpperCase()+e.substring(1);let i=t.find((t=>t.page()===e));return void 0===i?[]:[i]}return t||[]},text:function(){return""},wikitext:function(){return this.wiki||""},json:function(e={}){let t=this.data||{};return!0===e.encode&&(t=Object.assign({},t),t=W(t)),t}};Object.keys(_i).forEach((e=>{ji.prototype[e]=_i[e]}));const zi={text:function(){return se(this._text||"").text()},json:function(){return this.data||{}},wikitext:function(){return this.wiki||""}},Oi=function(e,t="",i=""){Object.defineProperty(this,"data",{enumerable:!1,value:e}),Object.defineProperty(this,"_text",{enumerable:!1,value:t}),Object.defineProperty(this,"wiki",{enumerable:!1,value:i})};Object.keys(zi).forEach((e=>{Oi.prototype[e]=zi[e]}));const Ei=/^(cite |citation)/i,qi={citation:!0,refn:!0,harvnb:!0,source:!0},Ni=function(e,t){let{list:i,wiki:a}=function(e,t){let i=[],a=rt(e);const n=function(a,r){a.parent=r,a.children&&a.children.length>0&&a.children.forEach((e=>n(e,a)));let[o,s]=yi(a,t);a.wiki=o,s&&i.push({name:a.name,wiki:a.body,nested:Boolean(a.parent),text:o,json:s});const l=function(e,t,i){e.parent&&(e.parent.body=e.parent.body.replace(t,i),l(e.parent,t,i))};l(a,a.body,a.wiki),e=e.replace(a.body,a.wiki)};return a.forEach((e=>n(e,null))),a.forEach((t=>{e=e.replace(t.body,t.wiki)})),{list:i,wiki:e}}(e._wiki,t),n=t?t._domain:null,{infoboxes:r,references:o,templates:s}=function(e,t){let i={infoboxes:[],templates:[],references:[]};return e.forEach((e=>{let a=e.json,n=a.template||a.type||a.name;if(!0!==qi[n]&&!0!==Ei.test(n))return"infobox"===a.template&&"yes"!==a.subbox?(a.domain=t,a.data=a.data||{},void i.infoboxes.push(new xi(a,e.wiki))):void i.templates.push(new Oi(a,e.text,e.wiki));i.references.push(new ji(a,e.wiki))})),i}(i,n);e._infoboxes=e._infoboxes||[],e._references=e._references||[],e._templates=e._templates||[],e._infoboxes=e._infoboxes.concat(r),e._references=e._references.concat(o),e._templates=e._templates.concat(s),e._wiki=a},Si=function(e){return/^ *\{\{ *(cite|citation)/i.test(e)&&/\}\} *$/.test(e)&&!1===/citation needed/i.test(e)},Ci=function(e){let t=Pe(e);return t.type=t.template.replace(/cite /,""),t.template="citation",t},Li=function(e){return{template:"citation",type:"inline",data:{},inline:se(e)||{}}},Ai=function(e){let t=[],i=e._wiki;i=i.replace(/ ?([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Si(a)){let n=Ci(a);n&&t.push({json:n,wiki:e}),i=i.replace(a,"")}else t.push({json:Li(a),wiki:e});return" "})),i=i.replace(/ ?]{0,200}?\/> ?/gi," "),i=i.replace(/ ?]{0,200}>([\s\S]{0,1800}?)<\/ref> ?/gi,(function(e,a){if(Si(a)){let e=Ci(a);e&&t.push({json:e,wiki:a}),i=i.replace(a,"")}else t.push({json:Li(a),wiki:e});return" "})),i=i.replace(/ ?<[ /]?[a-z0-9]{1,8}[a-z0-9=" ]{2,20}[ /]?> ?/g," "),e._references=t.map((e=>new ji(e.json,e.wiki))),e._wiki=i},Pi={coach:["team","year","g","w","l","w-l%","finish","pg","pw","pl","pw-l%"],player:["year","team","gp","gs","mpg","fg%","3p%","ft%","rpg","apg","spg","bpg","ppg"],roster:["player","gp","gs","mpg","fg%","3fg%","ft%","rpg","apg","spg","bpg","ppg"]};let Di=["res","record","opponent","method","event","date","round","time","location","notes"];const Ti=function(e,t){const i={templates:[],text:e._wiki};var a;return function(e,t){e.text=e.text.replace(/\{\{election box begin([\s\S]+?)\{\{election box end\}\}/gi,(i=>{let a={_wiki:i,_templates:[]};Ni(a,t);let n=a._templates.map((e=>e.json())),r=n.find((e=>"election box"===e.template))||{},o=n.filter((e=>"election box candidate"===e.template)),s=n.find((e=>"election box gain"===e.template||"election box hold"===e.template))||{};return(o.length>0||s)&&e.templates.push({template:"election box",title:r.title,candidates:o,summary:s.data}),""}))}(i,t),function(e,t,i){e.text=e.text.replace(/]*)>([\s\S]+)<\/gallery>/g,((a,n,r)=>{let o=r.split(/\n/g);return o=o.filter((e=>e&&""!==e.trim())),o=o.map((e=>{let i=e.split(/\|/),a={file:i[0].trim(),lang:t.lang(),domain:t.domain()},n=new _(a).json(),r=i.slice(1).join("|");return""!==r&&(n.caption=se(r)),n})),o.length>0&&e.templates.push({template:"gallery",images:o,pos:i.title}),""}))}(i,t,e),(a=i).text=a.text.replace(/]*)>([\s\S]*?)<\/math>/g,((e,t,i)=>{let n=se(i).text();return a.templates.push({template:"math",formula:n,raw:i}),n&&n.length<12?n:""})),a.text=a.text.replace(/]*)>([\s\S]*?)<\/chem>/g,((e,t,i)=>(a.templates.push({template:"chem",data:i}),""))),function(e){e.text=e.text.replace(/\{\{mlb game log /gi,"{{game log "),e.text=e.text.replace(/\{\{game log (section|month)[\s\S]+?\{\{game log (section|month) end\}\}/gi,(t=>{let i=function(e){let t=["#","date","opponent","score","win","loss","save","attendance","record"];return!0===/\|stadium=y/i.test(e)&&t.splice(7,0,"stadium"),!0===/\|time=y/i.test(e)&&t.splice(7,0,"time"),!0===/\|box=y/i.test(e)&&t.push("box"),t}(t);t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{game log (section|month) end\}\}/i,"");let a="! "+i.join(" !! "),n=be("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mlb game log section",data:n}),""}))}(i),function(e){e.text=e.text.replace(/\{\{mma record start[\s\S]+?\{\{end\}\}/gi,(t=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{end\}\}/i,"");let i="! "+Di.join(" !! "),a=be("{|\n"+i+"\n"+t+"\n|}");return a=a.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"mma record start",data:a}),""}))}(i),function(e){e.text=e.text.replace(/\{\{nba (coach|player|roster) statistics start([\s\S]+?)\{\{s-end\}\}/gi,((t,i)=>{t=(t=t.replace(/^\{\{.*?\}\}/,"")).replace(/\{\{s-end\}\}/,""),i=i.toLowerCase().trim();let a="! "+Pi[i].join(" !! "),n=be("{|\n"+a+"\n"+t+"\n|}");return n=n.map((e=>(Object.keys(e).forEach((t=>{e[t]=e[t].text()})),e))),e.templates.push({template:"NBA "+i+" statistics",data:n}),""}))}(i),i.templates=i.templates.map((e=>new Oi(e))),i},Ii={tables:!0,references:!0,paragraphs:!0,templates:!0,infoboxes:!0};class Mi{constructor(e,t){let i={doc:t,title:e.title||"",depth:e.depth,wiki:e.wiki||"",templates:[],tables:[],infoboxes:[],references:[],paragraphs:[]};Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})}));const a=Ti(this,t);this._wiki=a.text,this._templates=this._templates.concat(a.templates),Ai(this),Ni(this,t),function(e){let t=[],i=e._wiki,a=i.split("\n"),n=[];for(let e=0;e0&&(n[n.length-1]+="\n"+a[e]);else{n[n.length-1]+="\n"+a[e];let i=n.pop();t.push(i)}else n.push(a[e]);let r=[];t.forEach((e=>{if(e){i=i.replace(e+"\n",""),i=i.replace(e,"");let t=be(e);t&&t.length>0&&r.push(new we(t,e))}})),r.length>0&&(e._tables=r),e._wiki=i}(this),Xe(this,t)}title(){return this._title||""}index(){if(!this._doc)return null;let e=this._doc.sections().indexOf(this);return-1===e?null:e}depth(){return this._depth}indentation(){return this.depth()}sentences(){return this.paragraphs().reduce(((e,t)=>e.concat(t.sentences())),[])}paragraphs(){return this._paragraphs||[]}links(e){let t=[];if(this.infoboxes().forEach((e=>{t.push(e.links())})),this.sentences().forEach((e=>{t.push(e.links())})),this.tables().forEach((e=>{t.push(e.links())})),this.lists().forEach((e=>{t.push(e.links())})),t=t.reduce(((e,t)=>e.concat(t)),[]).filter((e=>void 0!==e)),"string"==typeof e){let i=t.find((t=>t.page().toLowerCase()===e.toLowerCase()));return void 0===i?[]:[i]}return t}tables(){return this._tables||[]}templates(e){let t=this._templates||[];return"string"==typeof e?(e=e.toLowerCase(),t.filter((t=>t.data.template===e||t.data.name===e))):t}infoboxes(e){let t=this._infoboxes||[];return"string"==typeof e?(e=(e=e.replace(/^infobox /i,"")).trim().toLowerCase(),t.filter((t=>t._type===e))):t}coordinates(){return[...this.templates("coord"),...this.templates("coor")].map((e=>e.json()))}lists(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.lists())})),e}interwiki(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.interwiki())})),e}images(){let e=[];return this.paragraphs().forEach((t=>{e=e.concat(t.images())})),e}references(){return this._references||[]}remove(){if(!this._doc)return null;let e={};e[this.title()]=!0,this.children().forEach((t=>e[t.title()]=!0));let t=this._doc.sections();return t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),t=t.filter((t=>!0!==e.hasOwnProperty(t.title()))),this._doc._sections=t,this._doc}nextSibling(){if(!this._doc)return null;let e=this._doc.sections();for(let t=(this.index()||0)+1;tthis.depth())for(let e=i+1;ethis.depth();e+=1)a.push(t[e]);return"string"==typeof e?a.find((t=>t.title().toLowerCase()===e.toLowerCase())):a}sections(e){return this.children(e)}parent(){if(!this._doc)return null;let e=this._doc.sections();for(let t=this.index()||0;t>=0;t-=1)if(e[t]&&e[t].depth()t.text(e))).join("\n\n")}wikitext(){return this._wiki}json(e){return function(e,t){let i={};if(!0===(t=p(t,H)).headers&&(i.title=e.title()),!0===t.depth&&(i.depth=e.depth()),!0===t.paragraphs){let a=e.paragraphs().map((e=>e.json(t)));a.length>0&&(i.paragraphs=a)}if(!0===t.images){let a=e.images().map((e=>e.json(t)));a.length>0&&(i.images=a)}if(!0===t.tables){let a=e.tables().map((e=>e.json(t)));a.length>0&&(i.tables=a)}if(!0===t.templates){let a=e.templates().map((e=>e.json()));a.length>0&&(i.templates=a,!0===t.encode&&i.templates.forEach((e=>W(e))))}if(!0===t.infoboxes){let a=e.infoboxes().map((e=>e.json(t)));a.length>0&&(i.infoboxes=a)}if(!0===t.lists){let a=e.lists().map((e=>e.json(t)));a.length>0&&(i.lists=a)}if(!0===t.references||!0===t.citations){let a=e.references().map((e=>e.json(t)));a.length>0&&(i.references=a)}return!0===t.sentences&&(i.sentences=e.sentences().map((e=>e.json(t)))),i}(this,e=p(e,Ii))}}Mi.prototype.citations=Mi.prototype.references;const Ri={sentences:"sentence",paragraphs:"paragraph",links:"link",tables:"table",templates:"template",infoboxes:"infobox",coordinates:"coordinate",lists:"list",images:"image",references:"reference",citations:"citation"};Object.keys(Ri).forEach((e=>{let t=Ri[e];Mi.prototype[t]=function(t){let i=this[e](t);return"number"==typeof t?i[t]:i[0]||null}}));const Ui=/^(={1,6})(.{1,200}?)={1,6}$/,Fi=/\{\{.+?\}\}/,Bi=function(e,t,i){let a=t.match(Ui);if(!a)return e.title="",e.depth=0,e;let n=a[2]||"";n=se(n).text(),Fi.test(n)&&(n=function(e,t){return rt(e).forEach((i=>{let[a]=yi(i,t);e=e.replace(i.body,a)})),e}(n,i));let o={_wiki:n};Ai(o),n=o._wiki,n=r(n);let s=0;return a[1]&&(s=a[1].length-2),e.title=n,e.depth=s,e},Ki=new RegExp("^("+["references","reference","einzelnachweise","referencias","références","notes et références","脚注","referenser","bronnen","примечания"].join("|")+"):?","i"),Wi=/(?:\n|^)(={2,6}.{1,200}?={2,6})/g,Hi=function(e){let t=[],i=e._wiki.split(Wi);for(let a=0;a!0!==Ki.test(t.title())||t.paragraphs().length>0||t.templates().length>0||(e[i+1]&&e[i+1].depth()>t.depth()&&(e[i+1]._depth-=1),!1)))}(t)},Yi=new RegExp("\\[\\[("+h.join("|")+"):(.{2,178}?)]](w{0,10})","gi"),Zi=new RegExp("^\\[\\[:?("+h.join("|")+"):","gi"),Gi=function(e){const t=[];let i=e.match(Yi);i&&i.forEach((function(e){(e=(e=(e=e.replace(Zi,"")).replace(/\|?[ *]?\]\]$/,"")).replace(/\|.*/,""))&&!e.match(/[[\]]/)&&t.push(e.trim())}));const a=e.replace(Yi,"");return[t,a]},Vi={tables:!0,lists:!0,paragraphs:!0};class Ji{constructor(e,t){t=t||{},this._options=t;let i={pageID:t.pageID||t.id||null,namespace:t.namespace||t.ns||null,lang:t.lang||t.language||null,domain:t.domain||null,title:t.title||null,type:"page",redirectTo:null,wikidata:t.wikidata||null,wiki:e||"",categories:[],sections:[],coordinates:[],userAgent:t.userAgent||t["User-Agent"]||t["Api-User-Agent"]||"User of the wtf_wikipedia library",templateFallbackFn:t.templateFallbackFn||null};if(Object.keys(i).forEach((e=>{Object.defineProperty(this,"_"+e,{enumerable:!1,writable:!0,value:i[e]})})),!0===function(e){return!!e&&T.test(e)}(this._wiki)){this._type="redirect",this._redirectTo=function(e){let t=e.match(T);if(t&&t[2])return(D(t[2])||[])[0];return{}}(this._wiki);const[e,t]=Gi(this._wiki);return this._categories=e,void(this._wiki=t)}this._wiki=F(this._wiki);const[a,n]=Gi(this._wiki);this._categories=a,this._wiki=n,this._sections=Hi(this)}title(e){if(void 0!==e)return this._title=e,e;if(this._title)return this._title;let t=null,i=this.sentences()[0];return i&&(t=i.bold()),t}pageID(e){return void 0!==e&&(this._pageID=e),this._pageID||null}wikidata(e){return void 0!==e&&(this._wikidata=e),this._wikidata||null}domain(e){return void 0!==e&&(this._domain=e),this._domain||null}language(e){return void 0!==e&&(this._lang=e),this._lang||null}url(){let e=this.title();if(!e)return null;let t=this.language()||"en",i=this.domain()||"wikipedia.org";return e=e.replace(/ /g,"_"),e=encodeURIComponent(e),`https://${t}.${i}/wiki/${e}`}namespace(e){return void 0!==e&&(this._namespace=e),this._namespace||null}isRedirect(){return"redirect"===this._type}redirectTo(){return this._redirectTo}isDisambiguation(){return function(e){let t=e.templates().map((e=>e.json()));if(t.find((e=>f.hasOwnProperty(e.template)||x.hasOwnProperty(e.template))))return!0;let i=e.title();return!(!i||!0!==$.test(i))||!t.find((e=>y.hasOwnProperty(e.template)))&&(!0===v(e.sentence(0))||!0===v(e.sentence(1)))}(this)}categories(e){let t=this._categories||[];return"number"==typeof e?[t[e]]:t}sections(e){let t=this._sections||[];if(t.forEach((e=>{e._doc=this})),"string"==typeof e){let i=e.toLowerCase().trim();return t.filter((e=>e.title().toLowerCase()===i))}return"number"==typeof e?[t[e]]:t}paragraphs(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.paragraphs())})),"number"==typeof e?[t[e]]:t}sentences(e){let t=[];return this.sections().forEach((e=>{t=t.concat(e.sentences())})),"number"==typeof e?[t[e]]:t}images(e){let t=m(this,"images",null);return this.infoboxes().forEach((e=>{let i=e.image();i&&t.unshift(i)})),this.templates().forEach((e=>{"gallery"===e.data.template&&(e.data.images=e.data.images||[],e.data.images.forEach((e=>{e instanceof _||(e.language=this.language(),e.domain=this.domain(),e=new _(e)),t.push(e)})))})),"number"==typeof e?[t[e]]:t}links(e){return m(this,"links",e)}interwiki(e){return m(this,"interwiki",e)}lists(e){return m(this,"lists",e)}tables(e){return m(this,"tables",e)}templates(e){return m(this,"templates",e)}references(e){return m(this,"references",e)}citations(e){return this.references(e)}coordinates(e){return m(this,"coordinates",e)}infoboxes(e){let t=m(this,"infoboxes",e);return t=t.sort(((e,t)=>Object.keys(e.data).length>Object.keys(t.data).length?-1:1)),t}text(e){if(e=p(e,Vi),!0===this.isRedirect())return"";return this.sections().map((t=>t.text(e))).join("\n\n")}json(e){return function(e,t){let i={};return(t=p(t,d)).title&&(i.title=e.title()),t.pageID&&(i.pageID=e.pageID()),t.categories&&(i.categories=e.categories()),t.sections&&(i.sections=e.sections().map((e=>e.json(t)))),!0===e.isRedirect()&&(i.isRedirect=!0,i.redirectTo=e.redirectTo(),i.sections=[]),t.coordinates&&(i.coordinates=e.coordinates()),t.infoboxes&&(i.infoboxes=e.infoboxes().map((e=>e.json(t)))),t.images&&(i.images=e.images().map((e=>e.json(t)))),t.plaintext&&(i.plaintext=e.text(t)),(t.citations||t.references)&&(i.references=e.references()),i}(this,e=p(e,Vi))}wikitext(){return this._wiki||""}debug(){return console.log("\n"),this.sections().forEach((e=>{let t=" - ";for(let i=0;i{let t=Xi[e];Ji.prototype[t]=function(t){return this[e](t)[0]||null}})),Ji.prototype.lang=Ji.prototype.language,Ji.prototype.ns=Ji.prototype.namespace,Ji.prototype.plaintext=Ji.prototype.text,Ji.prototype.isDisambig=Ji.prototype.isDisambiguation,Ji.prototype.citations=Ji.prototype.references,Ji.prototype.redirectsTo=Ji.prototype.redirectTo,Ji.prototype.redirect=Ji.prototype.redirectTo,Ji.prototype.redirects=Ji.prototype.redirectTo;const Qi=/^https?:\/\//,ea={lang:"en",wiki:"wikipedia",domain:void 0,follow_redirects:!0,path:"api.php"},ta=function(e,t,i){"string"==typeof t&&(t={lang:t}),(t={...ea,...t}).title=e,"string"==typeof e&&Qi.test(e)&&(t={...t,...n(e)});const r=u(t),s=function(e){let t,i=e.userAgent||e["User-Agent"]||e["Api-User-Agent"]||"User of the wtf_wikipedia library";return t=e.noOrigin?"":e.origin||e.Origin||"*",{method:"GET",headers:{"Content-Type":"application/json","Api-User-Agent":i,"User-Agent":i,Origin:t,"Accept-Encoding":"gzip"},redirect:"follow"}}(t);return a(r,s).then((e=>e.json())).then((a=>{let n=function(e,t={}){return Object.keys(e.query.pages).map((i=>{let a=e.query.pages[i]||{};if(a.hasOwnProperty("missing")||a.hasOwnProperty("invalid"))return null;let n=a.revisions[0]["*"];!n&&a.revisions[0].slots&&(n=a.revisions[0].slots.main["*"]),a.pageprops=a.pageprops||{};let r=t.domain;return!r&&t.wiki&&(r=`${t.wiki}.org`),{wiki:n,meta:Object.assign({},t,{title:a.title,pageID:a.pageid,namespace:a.ns,domain:r,wikidata:a.pageprops.wikibase_item,description:a.pageprops["wikibase-shortdesc"]})}}))}(a,t);return n=function(e,t){let i=(e=e.filter((e=>e))).map((e=>new Ji(e.wiki,e.meta)));return 0===i.length?null:o(t)||1!==i.length?i:i[0]}(n,e),i&&i(null,n),n})).catch((e=>(console.error(e),i&&i(e,null),null)))};const ia=function(e,t){return new Ji(e,t)},aa={Doc:Ji,Section:Mi,Paragraph:_e,Sentence:X,Image:_,Infobox:xi,Link:Z,List:Be,Reference:ji,Table:we,Template:Oi,http:function(e,t){return a(e,t).then((function(e){return e.json()})).catch((t=>(console.error("\n\n=-=- http response error =-=-=-"),console.error(e),console.error(t),{})))},wtf:ia};ia.fetch=function(e,t,i){return ta(e,t,i)},ia.plugin=ia.extend=function(e){return e(aa,fi,st),this},ia.version="10.1.5";export{ia as default}; diff --git a/builds/wtf_wikipedia.cjs b/builds/wtf_wikipedia.cjs index 5924690c..fe77c9de 100644 --- a/builds/wtf_wikipedia.cjs +++ b/builds/wtf_wikipedia.cjs @@ -4498,6 +4498,7 @@ resize: 1, //https://en.wikipedia.org/wiki/'Resize', lang: 1, 'rtl-lang': 1, + 'line-height': 1, l: 2, h: 1, //https://en.wikipedia.org/wiki/'Hover_title', sort: 1, //https://en.wikipedia.org/wiki/'Sort', @@ -4575,7 +4576,6 @@ 'uuline', 'not a typo', 'text', - 'resize', 'var serif', 'double underline', 'nee', @@ -4598,14 +4598,6 @@ templates$b[k] = 0; }); - // templates we simply grab the 2nd param of - let ones = [ - 'line-height' - ]; - ones.forEach((k) => { - templates$b[k] = 1; - }); - let templates$a = {}; // these templates all have a predictable pattern // {{HSC|Ship Name|ID}} -> [[HSC Name (id)]] @@ -5216,6 +5208,13 @@ let data = parser(tmpl, ['text']); return (data.text || '').replace(/[^0-9]/g, '') }, + 'resize': (tmpl) => { + let { n, text } = parser(tmpl, ['n', 'text']); + if (!text) { + return n || '' + } + return text || '' + }, 'last word': (tmpl) => { let data = parser(tmpl, ['text']); let arr = (data.text || '').split(/ /g); @@ -5429,39 +5428,39 @@ return `[[${cl}-class ${type} |''${cl}''-class]] [[${type}]]` }, 'center block': (tmpl) => { - let { txt } = parser(tmpl, ['txt']); - return txt || '' + let { text } = parser(tmpl, ['text']); + return text || '' }, 'align': (tmpl) => { - let { txt } = parser(tmpl, ['dir', 'txt']); - return txt || '' + let { text } = parser(tmpl, ['dir', 'text']); + return text || '' }, 'font': (tmpl) => { - let { txt } = parser(tmpl, ['txt']); - return txt || '' + let { text } = parser(tmpl, ['text']); + return text || '' }, 'float': (tmpl) => { - let { txt, dir } = parser(tmpl, ['dir', 'txt']); - if (!txt) { + let { text, dir } = parser(tmpl, ['dir', 'text']); + if (!text) { return dir } - return txt || '' + return text || '' }, 'lower': (tmpl) => { - let { txt, n } = parser(tmpl, ['n', 'txt']); - if (!txt) { + let { text, n } = parser(tmpl, ['n', 'text']); + if (!text) { return n } - return txt || '' + return text || '' }, 'splitspan': (tmpl) => { - let { left, right } = parser(tmpl, ['left', 'right']); - return (left || '') + '\n' + (right || '') + let list = parser(tmpl).list || []; + return (list[0] || '') + '\n' + (list[1] || '') }, 'bracket': (tmpl) => { - let { word } = parser(tmpl, ['word']); - if (word) { - return `[${word}]` + let { text } = parser(tmpl, ['text']); + if (text) { + return `[${text}]` } return '[' }, @@ -10499,7 +10498,7 @@ }) }; - var version = '10.1.4'; + var version = '10.1.5'; /** * use the native client-side fetch function diff --git a/builds/wtf_wikipedia.mjs b/builds/wtf_wikipedia.mjs index 29fb54b2..03dcead5 100644 --- a/builds/wtf_wikipedia.mjs +++ b/builds/wtf_wikipedia.mjs @@ -4494,6 +4494,7 @@ let templates$b = { resize: 1, //https://en.wikipedia.org/wiki/'Resize', lang: 1, 'rtl-lang': 1, + 'line-height': 1, l: 2, h: 1, //https://en.wikipedia.org/wiki/'Hover_title', sort: 1, //https://en.wikipedia.org/wiki/'Sort', @@ -4571,7 +4572,6 @@ let zeros = [ 'uuline', 'not a typo', 'text', - 'resize', 'var serif', 'double underline', 'nee', @@ -4594,14 +4594,6 @@ zeros.forEach((k) => { templates$b[k] = 0; }); -// templates we simply grab the 2nd param of -let ones = [ - 'line-height' -]; -ones.forEach((k) => { - templates$b[k] = 1; -}); - let templates$a = {}; // these templates all have a predictable pattern // {{HSC|Ship Name|ID}} -> [[HSC Name (id)]] @@ -5212,6 +5204,13 @@ var functions = { let data = parser(tmpl, ['text']); return (data.text || '').replace(/[^0-9]/g, '') }, + 'resize': (tmpl) => { + let { n, text } = parser(tmpl, ['n', 'text']); + if (!text) { + return n || '' + } + return text || '' + }, 'last word': (tmpl) => { let data = parser(tmpl, ['text']); let arr = (data.text || '').split(/ /g); @@ -5425,39 +5424,39 @@ var functions = { return `[[${cl}-class ${type} |''${cl}''-class]] [[${type}]]` }, 'center block': (tmpl) => { - let { txt } = parser(tmpl, ['txt']); - return txt || '' + let { text } = parser(tmpl, ['text']); + return text || '' }, 'align': (tmpl) => { - let { txt } = parser(tmpl, ['dir', 'txt']); - return txt || '' + let { text } = parser(tmpl, ['dir', 'text']); + return text || '' }, 'font': (tmpl) => { - let { txt } = parser(tmpl, ['txt']); - return txt || '' + let { text } = parser(tmpl, ['text']); + return text || '' }, 'float': (tmpl) => { - let { txt, dir } = parser(tmpl, ['dir', 'txt']); - if (!txt) { + let { text, dir } = parser(tmpl, ['dir', 'text']); + if (!text) { return dir } - return txt || '' + return text || '' }, 'lower': (tmpl) => { - let { txt, n } = parser(tmpl, ['n', 'txt']); - if (!txt) { + let { text, n } = parser(tmpl, ['n', 'text']); + if (!text) { return n } - return txt || '' + return text || '' }, 'splitspan': (tmpl) => { - let { left, right } = parser(tmpl, ['left', 'right']); - return (left || '') + '\n' + (right || '') + let list = parser(tmpl).list || []; + return (list[0] || '') + '\n' + (list[1] || '') }, 'bracket': (tmpl) => { - let { word } = parser(tmpl, ['word']); - if (word) { - return `[${word}]` + let { text } = parser(tmpl, ['text']); + if (text) { + return `[${text}]` } return '[' }, @@ -10495,7 +10494,7 @@ const fetch = function (title, options, callback) { }) }; -var version = '10.1.4'; +var version = '10.1.5'; /** * use the native client-side fetch function diff --git a/changelog.md b/changelog.md index 51b2c7f9..d2e5740e 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,11 @@ - **[new]** - fallbackTemplateFn handler #509 --> +#### 10.1.5 [May 2023] +- **[fix]** - support inline templates +- **[change]** - dont overwrite duplicate props in infobox #530 +- **[update]** - deps + #### 10.1.4 [Apr 2023] - **[fix]** - #528 template runtime errors - **[fix]** - remove stray console.log (thank you @mxunknown) diff --git a/src/_version.js b/src/_version.js index ae935685..078d5ced 100644 --- a/src/_version.js +++ b/src/_version.js @@ -1 +1 @@ -export default '10.1.4' \ No newline at end of file +export default '10.1.5' \ No newline at end of file