@afixt/test-utils 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/CLAUDE.md +1 -1
- package/README.md +40 -1
- package/docs/arrayUtils.js.html +8 -13
- package/docs/colorConversions.js.html +238 -0
- package/docs/constants.js.html +671 -0
- package/docs/cssUtils.js.html +80 -0
- package/docs/data/search.json +1 -1
- package/docs/domUtils.js.html +252 -32
- package/docs/formUtils.js.html +161 -0
- package/docs/getAccessibleName.js.html +215 -120
- package/docs/getAccessibleText.js.html +103 -48
- package/docs/getAriaAttributesByElement.js.html +4 -4
- package/docs/getCSSGeneratedContent.js.html +50 -41
- package/docs/getComputedRole.js.html +8 -3
- package/docs/getFocusableElements.js.html +25 -21
- package/docs/getGeneratedContent.js.html +24 -13
- package/docs/getImageText.js.html +31 -9
- package/docs/getStyleObject.js.html +7 -3
- package/docs/global.html +1 -1
- package/docs/hasAccessibleName.js.html +2 -10
- package/docs/hasAttribute.js.html +7 -3
- package/docs/hasCSSGeneratedContent.js.html +18 -14
- package/docs/hasHiddenParent.js.html +4 -4
- package/docs/hasParent.js.html +7 -3
- package/docs/hasValidAriaAttributes.js.html +7 -3
- package/docs/index.html +1 -1
- package/docs/index.js.html +98 -32
- package/docs/isA11yVisible.js.html +98 -0
- package/docs/isAriaAttributesValid.js.html +10 -64
- package/docs/isComplexTable.js.html +13 -6
- package/docs/isDataTable.js.html +11 -6
- package/docs/isFocusable.js.html +36 -12
- package/docs/isHidden.js.html +47 -11
- package/docs/isOffScreen.js.html +7 -3
- package/docs/isValidUrl.js.html +7 -3
- package/docs/listEventListeners.js.html +203 -0
- package/docs/module-QueryCache.html +3 -0
- package/docs/module-afixt-test-utils.html +1 -1
- package/docs/module-colorConversions.html +3 -0
- package/docs/module-constants.html +3 -0
- package/docs/module-cssUtils.html +3 -0
- package/docs/module-formUtils.html +3 -0
- package/docs/module-suggestContrast.html +3 -0
- package/docs/module-tableUtils.html +3 -0
- package/docs/queryCache.js.html +360 -0
- package/docs/scripts/core.js +726 -726
- package/docs/scripts/core.min.js +22 -22
- package/docs/scripts/resize.js +90 -90
- package/docs/scripts/search.js +265 -265
- package/docs/scripts/third-party/Apache-License-2.0.txt +202 -202
- package/docs/scripts/third-party/fuse.js +8 -8
- package/docs/scripts/third-party/hljs-line-num-original.js +369 -369
- package/docs/scripts/third-party/hljs-original.js +5171 -5171
- package/docs/scripts/third-party/popper.js +5 -5
- package/docs/scripts/third-party/tippy.js +1 -1
- package/docs/scripts/third-party/tocbot.js +671 -671
- package/docs/styles/clean-jsdoc-theme-base.css +1159 -1159
- package/docs/styles/clean-jsdoc-theme-dark.css +412 -412
- package/docs/styles/clean-jsdoc-theme-light.css +482 -482
- package/docs/styles/clean-jsdoc-theme-scrollbar.css +29 -29
- package/docs/suggestContrast.js.html +389 -0
- package/docs/tableUtils.js.html +151 -0
- package/docs/testContrast.js.html +201 -24
- package/docs/testLang.js.html +533 -451
- package/docs/testOrder.js.html +9 -4
- package/package.json +1 -1
- package/src/colorConversions.js +235 -0
- package/src/index.js +6 -0
- package/src/stringUtils.js +35 -0
- package/src/suggestContrast.js +386 -0
- package/test/colorConversions.test.js +223 -0
- package/test/stringUtils.test.js +60 -0
- package/test/suggestContrast.test.js +394 -0
package/docs/testLang.js.html
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<!DOCTYPE html><html lang="en" style="font-size:16px"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Source: testLang.js</title><!--[if lt IE 9]>
|
|
2
2
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
3
|
-
<![endif]--><script src="scripts/third-party/hljs.js" defer="defer"></script><script src="scripts/third-party/hljs-line-num.js" defer="defer"></script><script src="scripts/third-party/popper.js" defer="defer"></script><script src="scripts/third-party/tippy.js" defer="defer"></script><script src="scripts/third-party/tocbot.min.js"></script><script>var baseURL="/",locationPathname="";baseURL=(locationPathname=document.location.pathname).substr(0,locationPathname.lastIndexOf("/")+1)</script><link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css"><svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><defs><symbol id="copy-icon" viewbox="0 0 488.3 488.3"><g><path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z"/><path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z"/></g></symbol><symbol id="search-icon" viewBox="0 0 512 512"><g><g><path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z"/></g></g><g><g><path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"/></g></g></symbol><symbol id="font-size-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></symbol><symbol id="add-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"/></symbol><symbol id="minus-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11h14v2H5z"/></symbol><symbol id="dark-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol><symbol id="light-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol><symbol id="reset-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/></symbol><symbol id="down-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></symbol><symbol id="codepen-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/></symbol><symbol id="close-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></symbol><symbol id="menu-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></symbol></defs></svg></head><body data-theme="dark"><div class="sidebar-container"><div class="sidebar" id="sidebar"><div class="sidebar-items-container"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="module-afixt-test-utils.html">afixt-test-utils</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#arrayCount">arrayCount</a></div><div class="sidebar-section-children"><a href="global.html#arrayRemoveByValue">arrayRemoveByValue</a></div><div class="sidebar-section-children"><a href="global.html#arrayUnique">arrayUnique</a></div><div class="sidebar-section-children"><a href="global.html#cellColorDiffs">cellColorDiffs</a></div><div class="sidebar-section-children"><a href="global.html#cellCount">cellCount</a></div><div class="sidebar-section-children"><a href="global.html#checkInconsistent">checkInconsistent</a></div><div class="sidebar-section-children"><a href="global.html#checkMultiRowsInHeader">checkMultiRowsInHeader</a></div><div class="sidebar-section-children"><a href="global.html#checkMultiRowsWithColspan">checkMultiRowsWithColspan</a></div><div class="sidebar-section-children"><a href="global.html#cleanBlank">cleanBlank</a></div><div class="sidebar-section-children"><a href="global.html#colCount">colCount</a></div><div class="sidebar-section-children"><a href="global.html#countBordersPct">countBordersPct</a></div><div class="sidebar-section-children"><a href="global.html#getAccessibleName">getAccessibleName</a></div><div class="sidebar-section-children"><a href="global.html#getAccessibleText">getAccessibleText</a></div><div class="sidebar-section-children"><a href="global.html#getAriaAttributes">getAriaAttributes</a></div><div class="sidebar-section-children"><a href="global.html#getCSSGeneratedContent">getCSSGeneratedContent</a></div><div class="sidebar-section-children"><a href="global.html#getColorContrast">getColorContrast</a></div><div class="sidebar-section-children"><a href="global.html#getComputedBackgroundColor">getComputedBackgroundColor</a></div><div class="sidebar-section-children"><a href="global.html#getComputedRole">getComputedRole</a></div><div class="sidebar-section-children"><a href="global.html#getFocusableElements">getFocusableElements</a></div><div class="sidebar-section-children"><a href="global.html#getGeneratedContent">getGeneratedContent</a></div><div class="sidebar-section-children"><a href="global.html#getImageText">getImageText</a></div><div class="sidebar-section-children"><a href="global.html#getStyleObject">getStyleObject</a></div><div class="sidebar-section-children"><a href="global.html#getTwoLetterCode">getTwoLetterCode</a></div><div class="sidebar-section-children"><a href="global.html#hasAccessibleName">hasAccessibleName</a></div><div class="sidebar-section-children"><a href="global.html#hasAttribute">hasAttribute</a></div><div class="sidebar-section-children"><a href="global.html#hasCSSGeneratedContent">hasCSSGeneratedContent</a></div><div class="sidebar-section-children"><a href="global.html#hasHiddenParent">hasHiddenParent</a></div><div class="sidebar-section-children"><a href="global.html#hasParent">hasParent</a></div><div class="sidebar-section-children"><a href="global.html#hasValidAriaAttributes">hasValidAriaAttributes</a></div><div class="sidebar-section-children"><a href="global.html#hasValidAriaRole">hasValidAriaRole</a></div><div class="sidebar-section-children"><a href="global.html#isAriaAttributeValid">isAriaAttributeValid</a></div><div class="sidebar-section-children"><a href="global.html#isComplexTable">isComplexTable</a></div><div class="sidebar-section-children"><a href="global.html#isDataTable">isDataTable</a></div><div class="sidebar-section-children"><a href="global.html#isFocusable">isFocusable</a></div><div class="sidebar-section-children"><a href="global.html#isHidden">isHidden</a></div><div class="sidebar-section-children"><a href="global.html#isNotVisible">isNotVisible</a></div><div class="sidebar-section-children"><a href="global.html#isOffScreen">isOffScreen</a></div><div class="sidebar-section-children"><a href="global.html#isValidUrl">isValidUrl</a></div><div class="sidebar-section-children"><a href="global.html#isVisible">isVisible</a></div><div class="sidebar-section-children"><a href="global.html#langCodes">langCodes</a></div><div class="sidebar-section-children"><a href="global.html#luminance">luminance</a></div><div class="sidebar-section-children"><a href="global.html#matchesSelector">matchesSelector</a></div><div class="sidebar-section-children"><a href="global.html#parseRGB">parseRGB</a></div><div class="sidebar-section-children"><a href="global.html#rowCount">rowCount</a></div><div class="sidebar-section-children"><a href="global.html#rtls">rtls</a></div><div class="sidebar-section-children"><a href="global.html#sortByVisualOrder">sortByVisualOrder</a></div><div class="sidebar-section-children"><a href="global.html#strlen">strlen</a></div><div class="sidebar-section-children"><a href="global.html#testContrast">testContrast</a></div><div class="sidebar-section-children"><a href="global.html#testLang">testLang</a></div><div class="sidebar-section-children"><a href="global.html#testOrder">testOrder</a></div><div class="sidebar-section-children"><a href="global.html#validAriaAttributes">validAriaAttributes</a></div><div class="sidebar-section-children"><a href="global.html#validLangCodes">validLangCodes</a></div></div></div></div></div><div class="navbar-container" id="VuAckcnZhf"><nav class="navbar"><div class="navbar-left-items"></div><div class="navbar-right-items"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div><nav></nav></nav></div><div class="toc-container"><div class="toc-content"><span class="bold">On this page</span><div id="eed4d2a0bfd64539bb9df78095dec881"></div></div></div><div class="body-wrapper"><div class="main-content"><div class="main-wrapper"><section id="source-page" class="source-page"><header><h1 id="title" class="has-anchor">testLang.js</h1></header><article><pre class="prettyprint source lang-js"><code>/**
|
|
3
|
+
<![endif]--><script src="scripts/third-party/hljs.js" defer="defer"></script><script src="scripts/third-party/hljs-line-num.js" defer="defer"></script><script src="scripts/third-party/popper.js" defer="defer"></script><script src="scripts/third-party/tippy.js" defer="defer"></script><script src="scripts/third-party/tocbot.min.js"></script><script>var baseURL="/",locationPathname="";baseURL=(locationPathname=document.location.pathname).substr(0,locationPathname.lastIndexOf("/")+1)</script><link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css"><svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><defs><symbol id="copy-icon" viewbox="0 0 488.3 488.3"><g><path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z"/><path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z"/></g></symbol><symbol id="search-icon" viewBox="0 0 512 512"><g><g><path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z"/></g></g><g><g><path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"/></g></g></symbol><symbol id="font-size-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></symbol><symbol id="add-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"/></symbol><symbol id="minus-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11h14v2H5z"/></symbol><symbol id="dark-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol><symbol id="light-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol><symbol id="reset-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/></symbol><symbol id="down-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></symbol><symbol id="codepen-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/></symbol><symbol id="close-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></symbol><symbol id="menu-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></symbol></defs></svg></head><body data-theme="dark"><div class="sidebar-container"><div class="sidebar" id="sidebar"><div class="sidebar-items-container"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="module-QueryCache.html">QueryCache</a></div><div class="sidebar-section-children"><a href="module-afixt-test-utils.html">afixt-test-utils</a></div><div class="sidebar-section-children"><a href="module-colorConversions.html">colorConversions</a></div><div class="sidebar-section-children"><a href="module-constants.html">constants</a></div><div class="sidebar-section-children"><a href="module-cssUtils.html">cssUtils</a></div><div class="sidebar-section-children"><a href="module-formUtils.html">formUtils</a></div><div class="sidebar-section-children"><a href="module-suggestContrast.html">suggestContrast</a></div><div class="sidebar-section-children"><a href="module-tableUtils.html">tableUtils</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#RTL_LANGUAGES">RTL_LANGUAGES</a></div><div class="sidebar-section-children"><a href="global.html#_internal">_internal</a></div><div class="sidebar-section-children"><a href="global.html#arrayCount">arrayCount</a></div><div class="sidebar-section-children"><a href="global.html#arrayRemoveByValue">arrayRemoveByValue</a></div><div class="sidebar-section-children"><a href="global.html#arrayUnique">arrayUnique</a></div><div class="sidebar-section-children"><a href="global.html#cellColorDiffs">cellColorDiffs</a></div><div class="sidebar-section-children"><a href="global.html#cellCount">cellCount</a></div><div class="sidebar-section-children"><a href="global.html#checkInconsistent">checkInconsistent</a></div><div class="sidebar-section-children"><a href="global.html#checkMultiRowsInHeader">checkMultiRowsInHeader</a></div><div class="sidebar-section-children"><a href="global.html#checkMultiRowsWithColspan">checkMultiRowsWithColspan</a></div><div class="sidebar-section-children"><a href="global.html#cleanBlank">cleanBlank</a></div><div class="sidebar-section-children"><a href="global.html#colCount">colCount</a></div><div class="sidebar-section-children"><a href="global.html#collectSubtreeText">collectSubtreeText</a></div><div class="sidebar-section-children"><a href="global.html#countBordersPct">countBordersPct</a></div><div class="sidebar-section-children"><a href="global.html#extractMeaningfulContent">extractMeaningfulContent</a></div><div class="sidebar-section-children"><a href="global.html#getAccessibleName">getAccessibleName</a></div><div class="sidebar-section-children"><a href="global.html#getAccessibleText">getAccessibleText</a></div><div class="sidebar-section-children"><a href="global.html#getAriaAttributesByElement">getAriaAttributesByElement</a></div><div class="sidebar-section-children"><a href="global.html#getAttributeHandlers">getAttributeHandlers</a></div><div class="sidebar-section-children"><a href="global.html#getCSSGeneratedContent">getCSSGeneratedContent</a></div><div class="sidebar-section-children"><a href="global.html#getColorContrast">getColorContrast</a></div><div class="sidebar-section-children"><a href="global.html#getComputedBackgroundColor">getComputedBackgroundColor</a></div><div class="sidebar-section-children"><a href="global.html#getComputedRole">getComputedRole</a></div><div class="sidebar-section-children"><a href="global.html#getContrastRatio">getContrastRatio</a></div><div class="sidebar-section-children"><a href="global.html#getEffectiveDir">getEffectiveDir</a></div><div class="sidebar-section-children"><a href="global.html#getEventListeners">getEventListeners</a></div><div class="sidebar-section-children"><a href="global.html#getFocusableElements">getFocusableElements</a></div><div class="sidebar-section-children"><a href="global.html#getGeneratedContent">getGeneratedContent</a></div><div class="sidebar-section-children"><a href="global.html#getImageText">getImageText</a></div><div class="sidebar-section-children"><a href="global.html#getPropertyHandlers">getPropertyHandlers</a></div><div class="sidebar-section-children"><a href="global.html#getRelativeLuminance">getRelativeLuminance</a></div><div class="sidebar-section-children"><a href="global.html#getStyleObject">getStyleObject</a></div><div class="sidebar-section-children"><a href="global.html#getTwoLetterCode">getTwoLetterCode</a></div><div class="sidebar-section-children"><a href="global.html#hasAccessibleName">hasAccessibleName</a></div><div class="sidebar-section-children"><a href="global.html#hasAttribute">hasAttribute</a></div><div class="sidebar-section-children"><a href="global.html#hasBackgroundImage">hasBackgroundImage</a></div><div class="sidebar-section-children"><a href="global.html#hasCSSGeneratedContent">hasCSSGeneratedContent</a></div><div class="sidebar-section-children"><a href="global.html#hasHiddenParent">hasHiddenParent</a></div><div class="sidebar-section-children"><a href="global.html#hasParent">hasParent</a></div><div class="sidebar-section-children"><a href="global.html#hasValidAriaAttributes">hasValidAriaAttributes</a></div><div class="sidebar-section-children"><a href="global.html#isA11yVisible">isA11yVisible</a></div><div class="sidebar-section-children"><a href="global.html#isAriaAttributeValid">isAriaAttributeValid</a></div><div class="sidebar-section-children"><a href="global.html#isComplexTable">isComplexTable</a></div><div class="sidebar-section-children"><a href="global.html#isDataTable">isDataTable</a></div><div class="sidebar-section-children"><a href="global.html#isFocusable">isFocusable</a></div><div class="sidebar-section-children"><a href="global.html#isHidden">isHidden</a></div><div class="sidebar-section-children"><a href="global.html#isNotVisible">isNotVisible</a></div><div class="sidebar-section-children"><a href="global.html#isOffScreen">isOffScreen</a></div><div class="sidebar-section-children"><a href="global.html#isRTLLanguage">isRTLLanguage</a></div><div class="sidebar-section-children"><a href="global.html#isValidLanguageCode">isValidLanguageCode</a></div><div class="sidebar-section-children"><a href="global.html#isValidUrl">isValidUrl</a></div><div class="sidebar-section-children"><a href="global.html#langCodes">langCodes</a></div><div class="sidebar-section-children"><a href="global.html#listEventListeners">listEventListeners</a></div><div class="sidebar-section-children"><a href="global.html#luminance">luminance</a></div><div class="sidebar-section-children"><a href="global.html#matchesSelector">matchesSelector</a></div><div class="sidebar-section-children"><a href="global.html#parseColor">parseColor</a></div><div class="sidebar-section-children"><a href="global.html#parseRGB">parseRGB</a></div><div class="sidebar-section-children"><a href="global.html#rowCount">rowCount</a></div><div class="sidebar-section-children"><a href="global.html#rtls">rtls</a></div><div class="sidebar-section-children"><a href="global.html#sortByVisualOrder">sortByVisualOrder</a></div><div class="sidebar-section-children"><a href="global.html#strlen">strlen</a></div><div class="sidebar-section-children"><a href="global.html#testContrast">testContrast</a></div><div class="sidebar-section-children"><a href="global.html#testLang">testLang</a></div><div class="sidebar-section-children"><a href="global.html#testOrder">testOrder</a></div><div class="sidebar-section-children"><a href="global.html#validLangCodes">validLangCodes</a></div></div></div></div></div><div class="navbar-container" id="VuAckcnZhf"><nav class="navbar"><div class="navbar-left-items"></div><div class="navbar-right-items"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div><nav></nav></nav></div><div class="toc-container"><div class="toc-content"><span class="bold">On this page</span><div id="eed4d2a0bfd64539bb9df78095dec881"></div></div></div><div class="body-wrapper"><div class="main-content"><div class="main-wrapper"><section id="source-page" class="source-page"><header><h1 id="title" class="has-anchor">testLang.js</h1></header><article><pre class="prettyprint source lang-js"><code>const { franc } = require('franc');
|
|
4
|
+
|
|
5
|
+
/**
|
|
4
6
|
* An array of language codes and their corresponding details.
|
|
5
7
|
* Each object in the array represents a language and contains the following properties:
|
|
6
8
|
*
|
|
@@ -9,275 +11,274 @@
|
|
|
9
11
|
* @property {string} English - The English name of the language.
|
|
10
12
|
* @property {string|null} [franc3] - The three-letter code used by the franc library, if available.
|
|
11
13
|
*/
|
|
12
|
-
|
|
13
|
-
{ alpha3:
|
|
14
|
-
{ alpha3:
|
|
15
|
-
{ alpha3:
|
|
16
|
-
{ alpha3:
|
|
17
|
-
{ alpha3:
|
|
18
|
-
{ alpha3:
|
|
19
|
-
{ alpha3:
|
|
20
|
-
{ alpha3:
|
|
21
|
-
{ alpha3:
|
|
22
|
-
{ alpha3:
|
|
23
|
-
{ alpha3:
|
|
24
|
-
{ alpha3:
|
|
25
|
-
{ alpha3:
|
|
26
|
-
{ alpha3:
|
|
27
|
-
{ alpha3:
|
|
28
|
-
{ alpha3:
|
|
29
|
-
{ alpha3:
|
|
30
|
-
{ alpha3:
|
|
31
|
-
{ alpha3:
|
|
32
|
-
{ alpha3:
|
|
33
|
-
{ alpha3:
|
|
34
|
-
{ alpha3:
|
|
35
|
-
{ alpha3:
|
|
36
|
-
{ alpha3:
|
|
37
|
-
{ alpha3:
|
|
38
|
-
{ alpha3:
|
|
39
|
-
{ alpha3:
|
|
40
|
-
{ alpha3:
|
|
41
|
-
{ alpha3:
|
|
14
|
+
const langCodes = [
|
|
15
|
+
{ alpha3: 'aar', alpha2: 'aa', English: 'Afar', franc3: null },
|
|
16
|
+
{ alpha3: 'abk', alpha2: 'ab', English: 'Abkhazian', franc3: null },
|
|
17
|
+
{ alpha3: 'afr', alpha2: 'af', English: 'Afrikaans' },
|
|
18
|
+
{ alpha3: 'aka', alpha2: 'ak', English: 'Akan' },
|
|
19
|
+
{ alpha3: 'alb', alpha2: 'sq', English: 'Albanian', franc3: 'als' },
|
|
20
|
+
{ alpha3: 'amh', alpha2: 'am', English: 'Amharic' },
|
|
21
|
+
{ alpha3: 'ara', alpha2: 'ar', English: 'Arabic', franc3: 'arb' },
|
|
22
|
+
{ alpha3: 'arg', alpha2: 'an', English: 'Aragonese', franc3: null },
|
|
23
|
+
{ alpha3: 'arm', alpha2: 'hy', English: 'Armenian', franc3: 'hye' },
|
|
24
|
+
{ alpha3: 'asm', alpha2: 'as', English: 'Assamese', franc3: null },
|
|
25
|
+
{ alpha3: 'ava', alpha2: 'av', English: 'Avaric', franc3: null },
|
|
26
|
+
{ alpha3: 'ave', alpha2: 'ae', English: 'Avestan', franc3: null },
|
|
27
|
+
{ alpha3: 'aym', alpha2: 'ay', English: 'Aymara', franc3: 'ayr' },
|
|
28
|
+
{ alpha3: 'aze', alpha2: 'az', English: 'Azerbaijani', franc3: 'azj' },
|
|
29
|
+
{ alpha3: 'bak', alpha2: 'ba', English: 'Bashkir', franc3: null },
|
|
30
|
+
{ alpha3: 'bam', alpha2: 'bm', English: 'Bambara' },
|
|
31
|
+
{ alpha3: 'baq', alpha2: 'eu', English: 'Basque', franc3: null },
|
|
32
|
+
{ alpha3: 'bel', alpha2: 'be', English: 'Belarusian' },
|
|
33
|
+
{ alpha3: 'ben', alpha2: 'bn', English: 'Bengali' },
|
|
34
|
+
{ alpha3: 'bih', alpha2: 'bh', English: 'Bihari languages', franc3: null },
|
|
35
|
+
{ alpha3: 'bis', alpha2: 'bi', English: 'Bislama', franc3: null },
|
|
36
|
+
{ alpha3: 'bos', alpha2: 'bs', English: 'Bosnian' },
|
|
37
|
+
{ alpha3: 'bre', alpha2: 'br', English: 'Breton', franc3: null },
|
|
38
|
+
{ alpha3: 'bul', alpha2: 'bg', English: 'Bulgarian' },
|
|
39
|
+
{ alpha3: 'bur', alpha2: 'my', English: 'Burmese', franc3: 'mya' },
|
|
40
|
+
{ alpha3: 'cat', alpha2: 'ca', English: 'Catalan; Valencian' },
|
|
41
|
+
{ alpha3: 'cha', alpha2: 'ch', English: 'Chamorro', franc3: null },
|
|
42
|
+
{ alpha3: 'che', alpha2: 'ce', English: 'Chechen', franc3: null },
|
|
43
|
+
{ alpha3: 'chi', alpha2: 'zh', English: 'Chinese', franc3: 'cmn' },
|
|
42
44
|
{
|
|
43
|
-
alpha3:
|
|
44
|
-
alpha2:
|
|
45
|
-
English:
|
|
46
|
-
"Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic",
|
|
45
|
+
alpha3: 'chu',
|
|
46
|
+
alpha2: 'cu',
|
|
47
|
+
English: 'Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic',
|
|
47
48
|
franc3: null,
|
|
48
49
|
},
|
|
49
|
-
{ alpha3:
|
|
50
|
-
{ alpha3:
|
|
51
|
-
{ alpha3:
|
|
52
|
-
{ alpha3:
|
|
53
|
-
{ alpha3:
|
|
54
|
-
{ alpha3:
|
|
50
|
+
{ alpha3: 'chv', alpha2: 'cv', English: 'Chuvash', franc3: null },
|
|
51
|
+
{ alpha3: 'cor', alpha2: 'kw', English: 'Cornish', franc3: null },
|
|
52
|
+
{ alpha3: 'cos', alpha2: 'co', English: 'Corsican', franc3: null },
|
|
53
|
+
{ alpha3: 'cre', alpha2: 'cr', English: 'Cree', franc3: null },
|
|
54
|
+
{ alpha3: 'cze', alpha2: 'cs', English: 'Czech', franc3: 'ces' },
|
|
55
|
+
{ alpha3: 'dan', alpha2: 'da', English: 'Danish' },
|
|
55
56
|
{
|
|
56
|
-
alpha3:
|
|
57
|
-
alpha2:
|
|
58
|
-
English:
|
|
57
|
+
alpha3: 'div',
|
|
58
|
+
alpha2: 'dv',
|
|
59
|
+
English: 'Divehi; Dhivehi; Maldivian',
|
|
59
60
|
franc3: null,
|
|
60
61
|
},
|
|
61
|
-
{ alpha3:
|
|
62
|
-
{ alpha3:
|
|
63
|
-
{ alpha3:
|
|
64
|
-
{ alpha3:
|
|
65
|
-
{ alpha3:
|
|
66
|
-
{ alpha3:
|
|
67
|
-
{ alpha3:
|
|
68
|
-
{ alpha3:
|
|
69
|
-
{ alpha3:
|
|
70
|
-
{ alpha3:
|
|
71
|
-
{ alpha3:
|
|
72
|
-
{ alpha3:
|
|
73
|
-
{ alpha3:
|
|
74
|
-
{ alpha3:
|
|
62
|
+
{ alpha3: 'dut', alpha2: 'nl', English: 'Dutch; Flemish', franc3: 'nld' },
|
|
63
|
+
{ alpha3: 'dzo', alpha2: 'dz', English: 'Dzongkha', franc3: null },
|
|
64
|
+
{ alpha3: 'eng', alpha2: 'en', English: 'English' },
|
|
65
|
+
{ alpha3: 'epo', alpha2: 'eo', English: 'Esperanto' },
|
|
66
|
+
{ alpha3: 'est', alpha2: 'et', English: 'Estonian' },
|
|
67
|
+
{ alpha3: 'ewe', alpha2: 'ee', English: 'Ewe' },
|
|
68
|
+
{ alpha3: 'fao', alpha2: 'fo', English: 'Faroese', franc3: null },
|
|
69
|
+
{ alpha3: 'fij', alpha2: 'fj', English: 'Fijian', franc3: null },
|
|
70
|
+
{ alpha3: 'fin', alpha2: 'fi', English: 'Finnish' },
|
|
71
|
+
{ alpha3: 'fre', alpha2: 'fr', English: 'French', franc3: 'fra' },
|
|
72
|
+
{ alpha3: 'fry', alpha2: 'fy', English: 'Western Frisian', franc3: null },
|
|
73
|
+
{ alpha3: 'ful', alpha2: 'ff', English: 'Fulah', franc3: null },
|
|
74
|
+
{ alpha3: 'geo', alpha2: 'ka', English: 'Georgian', franc3: 'kat' },
|
|
75
|
+
{ alpha3: 'ger', alpha2: 'de', English: 'German', franc3: 'deu' },
|
|
75
76
|
{
|
|
76
|
-
alpha3:
|
|
77
|
-
alpha2:
|
|
78
|
-
English:
|
|
77
|
+
alpha3: 'gla',
|
|
78
|
+
alpha2: 'gd',
|
|
79
|
+
English: 'Gaelic; Scottish Gaelic',
|
|
79
80
|
franc3: null,
|
|
80
81
|
},
|
|
81
|
-
{ alpha3:
|
|
82
|
-
{ alpha3:
|
|
83
|
-
{ alpha3:
|
|
82
|
+
{ alpha3: 'gle', alpha2: 'ga', English: 'Irish', franc3: null },
|
|
83
|
+
{ alpha3: 'glg', alpha2: 'gl', English: 'Galician' },
|
|
84
|
+
{ alpha3: 'glv', alpha2: 'gv', English: 'Manx', franc3: null },
|
|
84
85
|
{
|
|
85
|
-
alpha3:
|
|
86
|
-
alpha2:
|
|
87
|
-
English:
|
|
88
|
-
franc3:
|
|
86
|
+
alpha3: 'gre',
|
|
87
|
+
alpha2: 'el',
|
|
88
|
+
English: 'Greek, Modern (1453-)',
|
|
89
|
+
franc3: 'ell',
|
|
89
90
|
},
|
|
90
|
-
{ alpha3:
|
|
91
|
-
{ alpha3:
|
|
92
|
-
{ alpha3:
|
|
93
|
-
{ alpha3:
|
|
94
|
-
{ alpha3:
|
|
95
|
-
{ alpha3:
|
|
96
|
-
{ alpha3:
|
|
97
|
-
{ alpha3:
|
|
98
|
-
{ alpha3:
|
|
99
|
-
{ alpha3:
|
|
100
|
-
{ alpha3:
|
|
101
|
-
{ alpha3:
|
|
102
|
-
{ alpha3:
|
|
103
|
-
{ alpha3:
|
|
104
|
-
{ alpha3:
|
|
91
|
+
{ alpha3: 'grn', alpha2: 'gn', English: 'Guarani', franc3: null },
|
|
92
|
+
{ alpha3: 'guj', alpha2: 'gu', English: 'Gujarati' },
|
|
93
|
+
{ alpha3: 'hat', alpha2: 'ht', English: 'Haitian; Haitian Creole' },
|
|
94
|
+
{ alpha3: 'hau', alpha2: 'ha', English: 'Hausa' },
|
|
95
|
+
{ alpha3: 'heb', alpha2: 'he', English: 'Hebrew' },
|
|
96
|
+
{ alpha3: 'her', alpha2: 'hz', English: 'Herero', franc3: null },
|
|
97
|
+
{ alpha3: 'hin', alpha2: 'hi', English: 'Hindi' },
|
|
98
|
+
{ alpha3: 'hmo', alpha2: 'ho', English: 'Hiri Motu', franc3: null },
|
|
99
|
+
{ alpha3: 'hrv', alpha2: 'hr', English: 'Croatian' },
|
|
100
|
+
{ alpha3: 'hun', alpha2: 'hu', English: 'Hungarian' },
|
|
101
|
+
{ alpha3: 'ibo', alpha2: 'ig', English: 'Igbo' },
|
|
102
|
+
{ alpha3: 'ice', alpha2: 'is', English: 'Icelandic', franc3: null },
|
|
103
|
+
{ alpha3: 'ido', alpha2: 'io', English: 'Ido', franc3: null },
|
|
104
|
+
{ alpha3: 'iii', alpha2: 'ii', English: 'Sichuan Yi; Nuosu' },
|
|
105
|
+
{ alpha3: 'iku', alpha2: 'iu', English: 'Inuktitut', franc3: null },
|
|
105
106
|
{
|
|
106
|
-
alpha3:
|
|
107
|
-
alpha2:
|
|
108
|
-
English:
|
|
107
|
+
alpha3: 'ile',
|
|
108
|
+
alpha2: 'ie',
|
|
109
|
+
English: 'Interlingue; Occidental',
|
|
109
110
|
franc3: null,
|
|
110
111
|
},
|
|
111
112
|
{
|
|
112
|
-
alpha3:
|
|
113
|
-
alpha2:
|
|
114
|
-
English:
|
|
113
|
+
alpha3: 'ina',
|
|
114
|
+
alpha2: 'ia',
|
|
115
|
+
English: 'Interlingua (International Auxiliary Language Association)',
|
|
115
116
|
franc3: null,
|
|
116
117
|
},
|
|
117
|
-
{ alpha3:
|
|
118
|
-
{ alpha3:
|
|
119
|
-
{ alpha3:
|
|
120
|
-
{ alpha3:
|
|
121
|
-
{ alpha3:
|
|
118
|
+
{ alpha3: 'ind', alpha2: 'id', English: 'Indonesian' },
|
|
119
|
+
{ alpha3: 'ipk', alpha2: 'ik', English: 'Inupiaq', franc3: null },
|
|
120
|
+
{ alpha3: 'ita', alpha2: 'it', English: 'Italian' },
|
|
121
|
+
{ alpha3: 'jav', alpha2: 'jv', English: 'Javanese' },
|
|
122
|
+
{ alpha3: 'jpn', alpha2: 'ja', English: 'Japanese' },
|
|
122
123
|
{
|
|
123
|
-
alpha3:
|
|
124
|
-
alpha2:
|
|
125
|
-
English:
|
|
124
|
+
alpha3: 'kal',
|
|
125
|
+
alpha2: 'kl',
|
|
126
|
+
English: 'Kalaallisut; Greenlandic',
|
|
126
127
|
franc3: null,
|
|
127
128
|
},
|
|
128
|
-
{ alpha3:
|
|
129
|
-
{ alpha3:
|
|
130
|
-
{ alpha3:
|
|
131
|
-
{ alpha3:
|
|
132
|
-
{ alpha3:
|
|
133
|
-
{ alpha3:
|
|
134
|
-
{ alpha3:
|
|
135
|
-
{ alpha3:
|
|
136
|
-
{ alpha3:
|
|
137
|
-
{ alpha3:
|
|
138
|
-
{ alpha3:
|
|
129
|
+
{ alpha3: 'kan', alpha2: 'kn', English: 'Kannada' },
|
|
130
|
+
{ alpha3: 'kas', alpha2: 'ks', English: 'Kashmiri', franc3: null },
|
|
131
|
+
{ alpha3: 'kau', alpha2: 'kr', English: 'Kanuri', franc3: 'knc' },
|
|
132
|
+
{ alpha3: 'kaz', alpha2: 'kk', English: 'Kazakh' },
|
|
133
|
+
{ alpha3: 'khm', alpha2: 'km', English: 'Central Khmer' },
|
|
134
|
+
{ alpha3: 'kik', alpha2: 'ki', English: 'Kikuyu; Gikuyu', franc3: null },
|
|
135
|
+
{ alpha3: 'kin', alpha2: 'rw', English: 'Kinyarwanda' },
|
|
136
|
+
{ alpha3: 'kir', alpha2: 'ky', English: 'Kirghiz; Kyrgyz' },
|
|
137
|
+
{ alpha3: 'kom', alpha2: 'kv', English: 'Komi', franc3: 'koi' },
|
|
138
|
+
{ alpha3: 'kon', alpha2: 'kg', English: 'Kongo', franc3: null },
|
|
139
|
+
{ alpha3: 'kor', alpha2: 'ko', English: 'Korean' },
|
|
139
140
|
{
|
|
140
|
-
alpha3:
|
|
141
|
-
alpha2:
|
|
142
|
-
English:
|
|
141
|
+
alpha3: 'kua',
|
|
142
|
+
alpha2: 'kj',
|
|
143
|
+
English: 'Kuanyama; Kwanyama',
|
|
143
144
|
franc3: null,
|
|
144
145
|
},
|
|
145
|
-
{ alpha3:
|
|
146
|
-
{ alpha3:
|
|
147
|
-
{ alpha3:
|
|
148
|
-
{ alpha3:
|
|
146
|
+
{ alpha3: 'kur', alpha2: 'ku', English: 'Kurdish', franc3: 'ckb' },
|
|
147
|
+
{ alpha3: 'lao', alpha2: 'lo', English: 'Lao' },
|
|
148
|
+
{ alpha3: 'lat', alpha2: 'la', English: 'Latin', franc3: null },
|
|
149
|
+
{ alpha3: 'lav', alpha2: 'lv', English: 'Latvian' },
|
|
149
150
|
{
|
|
150
|
-
alpha3:
|
|
151
|
-
alpha2:
|
|
152
|
-
English:
|
|
151
|
+
alpha3: 'lim',
|
|
152
|
+
alpha2: 'li',
|
|
153
|
+
English: 'Limburgan; Limburger; Limburgish',
|
|
153
154
|
franc3: null,
|
|
154
155
|
},
|
|
155
|
-
{ alpha3:
|
|
156
|
-
{ alpha3:
|
|
156
|
+
{ alpha3: 'lin', alpha2: 'ln', English: 'Lingala' },
|
|
157
|
+
{ alpha3: 'lit', alpha2: 'lt', English: 'Lithuanian' },
|
|
157
158
|
{
|
|
158
|
-
alpha3:
|
|
159
|
-
alpha2:
|
|
160
|
-
English:
|
|
159
|
+
alpha3: 'ltz',
|
|
160
|
+
alpha2: 'lb',
|
|
161
|
+
English: 'Luxembourgish; Letzeburgesch',
|
|
161
162
|
franc3: null,
|
|
162
163
|
},
|
|
163
|
-
{ alpha3:
|
|
164
|
-
{ alpha3:
|
|
165
|
-
{ alpha3:
|
|
166
|
-
{ alpha3:
|
|
167
|
-
{ alpha3:
|
|
168
|
-
{ alpha3:
|
|
169
|
-
{ alpha3:
|
|
170
|
-
{ alpha3:
|
|
171
|
-
{ alpha3:
|
|
172
|
-
{ alpha3:
|
|
173
|
-
{ alpha3:
|
|
174
|
-
{ alpha3:
|
|
175
|
-
{ alpha3:
|
|
164
|
+
{ alpha3: 'lub', alpha2: 'lu', English: 'Luba-Katanga', franc3: null },
|
|
165
|
+
{ alpha3: 'lug', alpha2: 'lg', English: 'Ganda' },
|
|
166
|
+
{ alpha3: 'mac', alpha2: 'mk', English: 'Macedonian', franc3: 'mkd' },
|
|
167
|
+
{ alpha3: 'mah', alpha2: 'mh', English: 'Marshallese', franc3: null },
|
|
168
|
+
{ alpha3: 'mal', alpha2: 'ml', English: 'Malayalam' },
|
|
169
|
+
{ alpha3: 'mao', alpha2: 'mi', English: 'Maori', franc3: null },
|
|
170
|
+
{ alpha3: 'mar', alpha2: 'mr', English: 'Marathi' },
|
|
171
|
+
{ alpha3: 'may', alpha2: 'ms', English: 'Malay', franc3: null },
|
|
172
|
+
{ alpha3: 'mlg', alpha2: 'mg', English: 'Malagasy', franc3: 'plt' },
|
|
173
|
+
{ alpha3: 'mlt', alpha2: 'mt', English: 'Maltese', franc3: null },
|
|
174
|
+
{ alpha3: 'mon', alpha2: 'mn', English: 'Mongolian', franc3: 'khk' },
|
|
175
|
+
{ alpha3: 'nau', alpha2: 'na', English: 'Nauru', franc3: null },
|
|
176
|
+
{ alpha3: 'nav', alpha2: 'nv', English: 'Navajo; Navaho', franc3: null },
|
|
176
177
|
{
|
|
177
|
-
alpha3:
|
|
178
|
-
alpha2:
|
|
179
|
-
English:
|
|
178
|
+
alpha3: 'nbl',
|
|
179
|
+
alpha2: 'nr',
|
|
180
|
+
English: 'Ndebele, South; South Ndebele',
|
|
180
181
|
franc3: null,
|
|
181
182
|
},
|
|
182
183
|
{
|
|
183
|
-
alpha3:
|
|
184
|
-
alpha2:
|
|
185
|
-
English:
|
|
184
|
+
alpha3: 'nde',
|
|
185
|
+
alpha2: 'nd',
|
|
186
|
+
English: 'Ndebele, North; North Ndebele',
|
|
186
187
|
franc3: null,
|
|
187
188
|
},
|
|
188
|
-
{ alpha3:
|
|
189
|
-
{ alpha3:
|
|
189
|
+
{ alpha3: 'ndo', alpha2: 'ng', English: 'Ndonga' },
|
|
190
|
+
{ alpha3: 'nep', alpha2: 'ne', English: 'Nepali' },
|
|
190
191
|
{
|
|
191
|
-
alpha3:
|
|
192
|
-
alpha2:
|
|
193
|
-
English:
|
|
192
|
+
alpha3: 'nno',
|
|
193
|
+
alpha2: 'nn',
|
|
194
|
+
English: 'Norwegian Nynorsk; Nynorsk, Norwegian',
|
|
194
195
|
},
|
|
195
196
|
{
|
|
196
|
-
alpha3:
|
|
197
|
-
alpha2:
|
|
198
|
-
English:
|
|
197
|
+
alpha3: 'nob',
|
|
198
|
+
alpha2: 'nb',
|
|
199
|
+
English: 'Bokmål, Norwegian; Norwegian Bokmål',
|
|
199
200
|
},
|
|
200
|
-
{ alpha3:
|
|
201
|
-
{ alpha3:
|
|
201
|
+
{ alpha3: 'nor', alpha2: 'no', English: 'Norwegian', franc3: 'nob' },
|
|
202
|
+
{ alpha3: 'nya', alpha2: 'ny', English: 'Chichewa; Chewa; Nyanja' },
|
|
202
203
|
{
|
|
203
|
-
alpha3:
|
|
204
|
-
alpha2:
|
|
205
|
-
English:
|
|
204
|
+
alpha3: 'oci',
|
|
205
|
+
alpha2: 'oc',
|
|
206
|
+
English: 'Occitan (post 1500); Provençal',
|
|
206
207
|
franc3: null,
|
|
207
208
|
},
|
|
208
|
-
{ alpha3:
|
|
209
|
-
{ alpha3:
|
|
210
|
-
{ alpha3:
|
|
211
|
-
{ alpha3:
|
|
212
|
-
{ alpha3:
|
|
213
|
-
{ alpha3:
|
|
214
|
-
{ alpha3:
|
|
215
|
-
{ alpha3:
|
|
216
|
-
{ alpha3:
|
|
217
|
-
{ alpha3:
|
|
218
|
-
{ alpha3:
|
|
219
|
-
{ alpha3:
|
|
209
|
+
{ alpha3: 'oji', alpha2: 'oj', English: 'Ojibwa', franc3: null },
|
|
210
|
+
{ alpha3: 'ori', alpha2: 'or', English: 'Oriya' },
|
|
211
|
+
{ alpha3: 'orm', alpha2: 'om', English: 'Oromo', franc3: 'gax' },
|
|
212
|
+
{ alpha3: 'oss', alpha2: 'os', English: 'Ossetian; Ossetic', franc3: null },
|
|
213
|
+
{ alpha3: 'pan', alpha2: 'pa', English: 'Panjabi; Punjabi' },
|
|
214
|
+
{ alpha3: 'per', alpha2: 'fa', English: 'Persian', franc3: 'fas' },
|
|
215
|
+
{ alpha3: 'pli', alpha2: 'pi', English: 'Pali', franc3: null },
|
|
216
|
+
{ alpha3: 'pol', alpha2: 'pl', English: 'Polish' },
|
|
217
|
+
{ alpha3: 'por', alpha2: 'pt', English: 'Portuguese' },
|
|
218
|
+
{ alpha3: 'pus', alpha2: 'ps', English: 'Pushto; Pashto', franc3: null },
|
|
219
|
+
{ alpha3: 'que', alpha2: 'qu', English: 'Quechua', franc3: 'quz' },
|
|
220
|
+
{ alpha3: 'roh', alpha2: 'rm', English: 'Romansh', franc3: null },
|
|
220
221
|
{
|
|
221
|
-
alpha3:
|
|
222
|
-
alpha2:
|
|
223
|
-
English:
|
|
224
|
-
franc3:
|
|
222
|
+
alpha3: 'rum',
|
|
223
|
+
alpha2: 'ro',
|
|
224
|
+
English: 'Romanian; Moldavian; Moldovan',
|
|
225
|
+
franc3: 'ron',
|
|
225
226
|
},
|
|
226
|
-
{ alpha3:
|
|
227
|
-
{ alpha3:
|
|
228
|
-
{ alpha3:
|
|
229
|
-
{ alpha3:
|
|
230
|
-
{ alpha3:
|
|
231
|
-
{ alpha3:
|
|
232
|
-
{ alpha3:
|
|
233
|
-
{ alpha3:
|
|
234
|
-
{ alpha3:
|
|
235
|
-
{ alpha3:
|
|
236
|
-
{ alpha3:
|
|
237
|
-
{ alpha3:
|
|
238
|
-
{ alpha3:
|
|
239
|
-
{ alpha3:
|
|
240
|
-
{ alpha3:
|
|
241
|
-
{ alpha3:
|
|
242
|
-
{ alpha3:
|
|
243
|
-
{ alpha3:
|
|
244
|
-
{ alpha3:
|
|
245
|
-
{ alpha3:
|
|
246
|
-
{ alpha3:
|
|
247
|
-
{ alpha3:
|
|
248
|
-
{ alpha3:
|
|
249
|
-
{ alpha3:
|
|
250
|
-
{ alpha3:
|
|
251
|
-
{ alpha3:
|
|
252
|
-
{ alpha3:
|
|
253
|
-
{ alpha3:
|
|
254
|
-
{ alpha3:
|
|
227
|
+
{ alpha3: 'run', alpha2: 'rn', English: 'Rundi' },
|
|
228
|
+
{ alpha3: 'rus', alpha2: 'ru', English: 'Russian' },
|
|
229
|
+
{ alpha3: 'sag', alpha2: 'sg', English: 'Sango' },
|
|
230
|
+
{ alpha3: 'san', alpha2: 'sa', English: 'Sanskrit', franc3: null },
|
|
231
|
+
{ alpha3: 'sin', alpha2: 'si', English: 'Sinhala; Sinhalese' },
|
|
232
|
+
{ alpha3: 'slo', alpha2: 'sk', English: 'Slovak', franc3: 'slk' },
|
|
233
|
+
{ alpha3: 'slv', alpha2: 'sl', English: 'Slovenian' },
|
|
234
|
+
{ alpha3: 'sme', alpha2: 'se', English: 'Northern Sami', franc3: null },
|
|
235
|
+
{ alpha3: 'smo', alpha2: 'sm', English: 'Samoan', franc3: null },
|
|
236
|
+
{ alpha3: 'sna', alpha2: 'sn', English: 'Shona' },
|
|
237
|
+
{ alpha3: 'snd', alpha2: 'sd', English: 'Sindhi', franc3: null },
|
|
238
|
+
{ alpha3: 'som', alpha2: 'so', English: 'Somali' },
|
|
239
|
+
{ alpha3: 'sot', alpha2: 'st', English: 'Sotho, Southern' },
|
|
240
|
+
{ alpha3: 'spa', alpha2: 'es', English: 'Spanish; Castilian' },
|
|
241
|
+
{ alpha3: 'srd', alpha2: 'sc', English: 'Sardinian', franc3: 'src' },
|
|
242
|
+
{ alpha3: 'srp', alpha2: 'sr', English: 'Serbian' },
|
|
243
|
+
{ alpha3: 'ssw', alpha2: 'ss', English: 'Swati' },
|
|
244
|
+
{ alpha3: 'sun', alpha2: 'su', English: 'Sundanese' },
|
|
245
|
+
{ alpha3: 'swa', alpha2: 'sw', English: 'Swahili', franc3: 'swh' },
|
|
246
|
+
{ alpha3: 'swe', alpha2: 'sv', English: 'Swedish' },
|
|
247
|
+
{ alpha3: 'tah', alpha2: 'ty', English: 'Tahitian', franc3: null },
|
|
248
|
+
{ alpha3: 'tam', alpha2: 'ta', English: 'Tamil' },
|
|
249
|
+
{ alpha3: 'tat', alpha2: 'tt', English: 'Tatar' },
|
|
250
|
+
{ alpha3: 'tel', alpha2: 'te', English: 'Telugu' },
|
|
251
|
+
{ alpha3: 'tgk', alpha2: 'tg', English: 'Tajik' },
|
|
252
|
+
{ alpha3: 'tgl', alpha2: 'tl', English: 'Tagalog' },
|
|
253
|
+
{ alpha3: 'tha', alpha2: 'th', English: 'Thai' },
|
|
254
|
+
{ alpha3: 'tib', alpha2: 'bo', English: 'Tibetan', franc3: 'bod' },
|
|
255
|
+
{ alpha3: 'tir', alpha2: 'ti', English: 'Tigrinya' },
|
|
255
256
|
{
|
|
256
|
-
alpha3:
|
|
257
|
-
alpha2:
|
|
258
|
-
English:
|
|
259
|
-
franc3:
|
|
257
|
+
alpha3: 'ton',
|
|
258
|
+
alpha2: 'to',
|
|
259
|
+
English: 'Tonga (Tonga Islands)',
|
|
260
|
+
franc3: 'toi',
|
|
260
261
|
},
|
|
261
|
-
{ alpha3:
|
|
262
|
-
{ alpha3:
|
|
263
|
-
{ alpha3:
|
|
264
|
-
{ alpha3:
|
|
265
|
-
{ alpha3:
|
|
266
|
-
{ alpha3:
|
|
267
|
-
{ alpha3:
|
|
268
|
-
{ alpha3:
|
|
269
|
-
{ alpha3:
|
|
270
|
-
{ alpha3:
|
|
271
|
-
{ alpha3:
|
|
272
|
-
{ alpha3:
|
|
273
|
-
{ alpha3:
|
|
274
|
-
{ alpha3:
|
|
275
|
-
{ alpha3:
|
|
276
|
-
{ alpha3:
|
|
277
|
-
{ alpha3:
|
|
278
|
-
{ alpha3:
|
|
279
|
-
{ alpha3:
|
|
280
|
-
{ alpha3:
|
|
262
|
+
{ alpha3: 'tsn', alpha2: 'tn', English: 'Tswana' },
|
|
263
|
+
{ alpha3: 'tso', alpha2: 'ts', English: 'Tsonga' },
|
|
264
|
+
{ alpha3: 'tuk', alpha2: 'tk', English: 'Turkmen' },
|
|
265
|
+
{ alpha3: 'tur', alpha2: 'tr', English: 'Turkish' },
|
|
266
|
+
{ alpha3: 'twi', alpha2: 'tw', English: 'Twi', franc3: null },
|
|
267
|
+
{ alpha3: 'uig', alpha2: 'ug', English: 'Uighur; Uyghur' },
|
|
268
|
+
{ alpha3: 'ukr', alpha2: 'uk', English: 'Ukrainian' },
|
|
269
|
+
{ alpha3: 'urd', alpha2: 'ur', English: 'Urdu' },
|
|
270
|
+
{ alpha3: 'uzb', alpha2: 'uz', English: 'Uzbek', franc3: 'uzn' },
|
|
271
|
+
{ alpha3: 'ven', alpha2: 've', English: 'Venda' },
|
|
272
|
+
{ alpha3: 'vie', alpha2: 'vi', English: 'Vietnamese' },
|
|
273
|
+
{ alpha3: 'vol', alpha2: 'vo', English: 'Volapük', franc3: null },
|
|
274
|
+
{ alpha3: 'wel', alpha2: 'cy', English: 'Welsh', franc3: null },
|
|
275
|
+
{ alpha3: 'wln', alpha2: 'wa', English: 'Walloon', franc3: null },
|
|
276
|
+
{ alpha3: 'wol', alpha2: 'wo', English: 'Wolof' },
|
|
277
|
+
{ alpha3: 'xho', alpha2: 'xh', English: 'Xhosa' },
|
|
278
|
+
{ alpha3: 'yid', alpha2: 'yi', English: 'Yiddish', franc3: 'ydd' },
|
|
279
|
+
{ alpha3: 'yor', alpha2: 'yo', English: 'Yoruba' },
|
|
280
|
+
{ alpha3: 'zha', alpha2: 'za', English: 'Zhuang; Chuang', franc3: 'zyb' },
|
|
281
|
+
{ alpha3: 'zul', alpha2: 'zu', English: 'Zulu' },
|
|
281
282
|
];
|
|
282
283
|
|
|
283
284
|
/**
|
|
@@ -287,203 +288,203 @@ export const langCodes = [
|
|
|
287
288
|
*
|
|
288
289
|
* @constant {string[]}
|
|
289
290
|
*/
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
291
|
+
const validLangCodes = [
|
|
292
|
+
'af',
|
|
293
|
+
'agq',
|
|
294
|
+
'ak',
|
|
295
|
+
'am',
|
|
296
|
+
'ar',
|
|
297
|
+
'as',
|
|
298
|
+
'asa',
|
|
299
|
+
'ast',
|
|
300
|
+
'az',
|
|
301
|
+
'bas',
|
|
302
|
+
'be',
|
|
303
|
+
'bem',
|
|
304
|
+
'bez',
|
|
305
|
+
'bg',
|
|
306
|
+
'bm',
|
|
307
|
+
'bn',
|
|
308
|
+
'bo',
|
|
309
|
+
'br',
|
|
310
|
+
'brx',
|
|
311
|
+
'bs',
|
|
312
|
+
'ca',
|
|
313
|
+
'ce',
|
|
314
|
+
'cgg',
|
|
315
|
+
'chr',
|
|
316
|
+
'ckb',
|
|
317
|
+
'cs',
|
|
318
|
+
'cu',
|
|
319
|
+
'cy',
|
|
320
|
+
'da',
|
|
321
|
+
'dav',
|
|
322
|
+
'de',
|
|
323
|
+
'dje',
|
|
324
|
+
'dsb',
|
|
325
|
+
'dua',
|
|
326
|
+
'dyo',
|
|
327
|
+
'dz',
|
|
328
|
+
'ebu',
|
|
329
|
+
'ee',
|
|
330
|
+
'el',
|
|
331
|
+
'en',
|
|
332
|
+
'eo',
|
|
333
|
+
'es',
|
|
334
|
+
'et',
|
|
335
|
+
'eu',
|
|
336
|
+
'ewo',
|
|
337
|
+
'fa',
|
|
338
|
+
'ff',
|
|
339
|
+
'fi',
|
|
340
|
+
'fil',
|
|
341
|
+
'fo',
|
|
342
|
+
'fr',
|
|
343
|
+
'fur',
|
|
344
|
+
'fy',
|
|
345
|
+
'ga',
|
|
346
|
+
'gd',
|
|
347
|
+
'gl',
|
|
348
|
+
'gsw',
|
|
349
|
+
'gu',
|
|
350
|
+
'guz',
|
|
351
|
+
'gv',
|
|
352
|
+
'ha',
|
|
353
|
+
'haw',
|
|
354
|
+
'he',
|
|
355
|
+
'hi',
|
|
356
|
+
'hr',
|
|
357
|
+
'hsb',
|
|
358
|
+
'hu',
|
|
359
|
+
'hy',
|
|
360
|
+
'id',
|
|
361
|
+
'ig',
|
|
362
|
+
'ii',
|
|
363
|
+
'is',
|
|
364
|
+
'it',
|
|
365
|
+
'ja',
|
|
366
|
+
'jgo',
|
|
367
|
+
'jmc',
|
|
368
|
+
'ka',
|
|
369
|
+
'kab',
|
|
370
|
+
'kam',
|
|
371
|
+
'kde',
|
|
372
|
+
'kea',
|
|
373
|
+
'khq',
|
|
374
|
+
'ki',
|
|
375
|
+
'kk',
|
|
376
|
+
'kkj',
|
|
377
|
+
'kl',
|
|
378
|
+
'kln',
|
|
379
|
+
'km',
|
|
380
|
+
'kn',
|
|
381
|
+
'ko',
|
|
382
|
+
'kok',
|
|
383
|
+
'ks',
|
|
384
|
+
'ksb',
|
|
385
|
+
'ksf',
|
|
386
|
+
'ksh',
|
|
387
|
+
'kw',
|
|
388
|
+
'ky',
|
|
389
|
+
'lag',
|
|
390
|
+
'lb',
|
|
391
|
+
'lg',
|
|
392
|
+
'lkt',
|
|
393
|
+
'ln',
|
|
394
|
+
'lo',
|
|
395
|
+
'lrc',
|
|
396
|
+
'lt',
|
|
397
|
+
'lu',
|
|
398
|
+
'luo',
|
|
399
|
+
'luy',
|
|
400
|
+
'lv',
|
|
401
|
+
'mas',
|
|
402
|
+
'mer',
|
|
403
|
+
'mfe',
|
|
404
|
+
'mg',
|
|
405
|
+
'mgh',
|
|
406
|
+
'mgo',
|
|
407
|
+
'mk',
|
|
408
|
+
'ml',
|
|
409
|
+
'mn',
|
|
410
|
+
'mr',
|
|
411
|
+
'ms',
|
|
412
|
+
'mt',
|
|
413
|
+
'mua',
|
|
414
|
+
'my',
|
|
415
|
+
'mzn',
|
|
416
|
+
'naq',
|
|
417
|
+
'nb',
|
|
418
|
+
'nd',
|
|
419
|
+
'nds',
|
|
420
|
+
'ne',
|
|
421
|
+
'nl',
|
|
422
|
+
'nmg',
|
|
423
|
+
'nn',
|
|
424
|
+
'nnh',
|
|
425
|
+
'nus',
|
|
426
|
+
'nyn',
|
|
427
|
+
'om',
|
|
428
|
+
'or',
|
|
429
|
+
'os',
|
|
430
|
+
'pa',
|
|
431
|
+
'pl',
|
|
432
|
+
'prg',
|
|
433
|
+
'ps',
|
|
434
|
+
'pt',
|
|
435
|
+
'qu',
|
|
436
|
+
'rm',
|
|
437
|
+
'rn',
|
|
438
|
+
'ro',
|
|
439
|
+
'rof',
|
|
440
|
+
'ru',
|
|
441
|
+
'rw',
|
|
442
|
+
'rwk',
|
|
443
|
+
'sah',
|
|
444
|
+
'saq',
|
|
445
|
+
'sbp',
|
|
446
|
+
'se',
|
|
447
|
+
'seh',
|
|
448
|
+
'ses',
|
|
449
|
+
'sg',
|
|
450
|
+
'shi',
|
|
451
|
+
'si',
|
|
452
|
+
'sk',
|
|
453
|
+
'sl',
|
|
454
|
+
'smn',
|
|
455
|
+
'sn',
|
|
456
|
+
'so',
|
|
457
|
+
'sq',
|
|
458
|
+
'sr',
|
|
459
|
+
'sv',
|
|
460
|
+
'sw',
|
|
461
|
+
'ta',
|
|
462
|
+
'te',
|
|
463
|
+
'teo',
|
|
464
|
+
'th',
|
|
465
|
+
'ti',
|
|
466
|
+
'tk',
|
|
467
|
+
'to',
|
|
468
|
+
'tr',
|
|
469
|
+
'twq',
|
|
470
|
+
'tzm',
|
|
471
|
+
'ug',
|
|
472
|
+
'uk',
|
|
473
|
+
'ur',
|
|
474
|
+
'uz',
|
|
475
|
+
'vai',
|
|
476
|
+
'vi',
|
|
477
|
+
'vo',
|
|
478
|
+
'vun',
|
|
479
|
+
'wae',
|
|
480
|
+
'xog',
|
|
481
|
+
'yav',
|
|
482
|
+
'yi',
|
|
483
|
+
'yo',
|
|
484
|
+
'yue',
|
|
485
|
+
'zgh',
|
|
486
|
+
'zh',
|
|
487
|
+
'zu',
|
|
487
488
|
];
|
|
488
489
|
|
|
489
490
|
/**
|
|
@@ -491,8 +492,7 @@ export const validLangCodes = [
|
|
|
491
492
|
*
|
|
492
493
|
* @constant {string[]}
|
|
493
494
|
*/
|
|
494
|
-
|
|
495
|
-
|
|
495
|
+
const rtls = ['ar', 'az', 'dv', 'he', 'ku', 'fa', 'ur'];
|
|
496
496
|
|
|
497
497
|
/**
|
|
498
498
|
* Converts a three-letter language code to a two-letter language code.
|
|
@@ -500,13 +500,12 @@ export const rtls = ["ar", "az", "dv", "he", "ku", "fa", "ur"];
|
|
|
500
500
|
* @param {string} threeLetterCode - The three-letter language code to convert.
|
|
501
501
|
* @returns {string|boolean} The corresponding two-letter language code, or false if not found.
|
|
502
502
|
*/
|
|
503
|
-
|
|
504
|
-
if (threeLetterCode ===
|
|
505
|
-
threeLetterCode =
|
|
503
|
+
function getTwoLetterCode(threeLetterCode) {
|
|
504
|
+
if (threeLetterCode === 'cmn') {
|
|
505
|
+
threeLetterCode = 'chi';
|
|
506
506
|
}
|
|
507
507
|
const result = langCodes.find(
|
|
508
|
-
|
|
509
|
-
value.alpha3 === threeLetterCode || value.franc3 === threeLetterCode
|
|
508
|
+
value => value.alpha3 === threeLetterCode || value.franc3 === threeLetterCode
|
|
510
509
|
);
|
|
511
510
|
return result ? result.alpha2 : false;
|
|
512
511
|
}
|
|
@@ -524,40 +523,40 @@ export function getTwoLetterCode(threeLetterCode) {
|
|
|
524
523
|
* language attribute or if the detected language is
|
|
525
524
|
* undefined ("und"). Otherwise, returns `false`.
|
|
526
525
|
*/
|
|
527
|
-
|
|
528
|
-
let selfLang =
|
|
529
|
-
element.getAttribute("lang") || element.getAttribute("xml:lang");
|
|
526
|
+
function testLang(element) {
|
|
527
|
+
let selfLang = element.getAttribute('lang') || element.getAttribute('xml:lang');
|
|
530
528
|
if (!selfLang) {
|
|
531
529
|
let parent = element.parentElement;
|
|
532
530
|
while (parent && !selfLang) {
|
|
533
|
-
selfLang =
|
|
534
|
-
parent.getAttribute("lang") || parent.getAttribute("xml:lang");
|
|
531
|
+
selfLang = parent.getAttribute('lang') || parent.getAttribute('xml:lang');
|
|
535
532
|
parent = parent.parentElement;
|
|
536
533
|
}
|
|
537
534
|
}
|
|
538
|
-
if (!selfLang || selfLang.length < 2)
|
|
539
|
-
|
|
535
|
+
if (!selfLang || selfLang.length < 2) {
|
|
536
|
+
return false;
|
|
537
|
+
}
|
|
538
|
+
selfLang = selfLang.split('-')[0].toLowerCase();
|
|
540
539
|
const threeLetterCode = franc(element.textContent.trim());
|
|
541
|
-
if (threeLetterCode ===
|
|
540
|
+
if (threeLetterCode === 'und') {
|
|
541
|
+
return true;
|
|
542
|
+
}
|
|
542
543
|
return getTwoLetterCode(threeLetterCode) === selfLang;
|
|
543
544
|
}
|
|
544
545
|
|
|
545
|
-
|
|
546
|
-
let selfLang =
|
|
547
|
-
element.getAttribute("lang") || element.getAttribute("xml:lang");
|
|
546
|
+
function getLang(element) {
|
|
547
|
+
let selfLang = element.getAttribute('lang') || element.getAttribute('xml:lang');
|
|
548
548
|
if (!selfLang) {
|
|
549
549
|
let parent = element.parentElement;
|
|
550
550
|
while (parent && !selfLang) {
|
|
551
|
-
selfLang =
|
|
552
|
-
parent.getAttribute("lang") || parent.getAttribute("xml:lang");
|
|
551
|
+
selfLang = parent.getAttribute('lang') || parent.getAttribute('xml:lang');
|
|
553
552
|
parent = parent.parentElement;
|
|
554
553
|
}
|
|
555
554
|
}
|
|
556
|
-
if (!selfLang || selfLang.length < 2)
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
);
|
|
555
|
+
if (!selfLang || selfLang.length < 2) {
|
|
556
|
+
return false;
|
|
557
|
+
}
|
|
558
|
+
selfLang = selfLang.split('-')[0].toLowerCase();
|
|
559
|
+
const result = langCodes.find(value => value.alpha2 === selfLang || value.alpha3 === selfLang);
|
|
561
560
|
if (result) {
|
|
562
561
|
return result.alpha2;
|
|
563
562
|
} else if (validLangCodes.includes(selfLang)) {
|
|
@@ -567,12 +566,95 @@ export function getLang(element) {
|
|
|
567
566
|
}
|
|
568
567
|
}
|
|
569
568
|
|
|
570
|
-
|
|
569
|
+
function isDirValid(element) {
|
|
571
570
|
const lang = getLang(element);
|
|
572
|
-
if (element.hasAttribute(
|
|
573
|
-
const dir = element.getAttribute(
|
|
574
|
-
return rtls.includes(lang) ? dir ===
|
|
571
|
+
if (element.hasAttribute('dir')) {
|
|
572
|
+
const dir = element.getAttribute('dir');
|
|
573
|
+
return rtls.includes(lang) ? dir === 'rtl' : dir !== 'rtl';
|
|
575
574
|
}
|
|
576
575
|
return !rtls.includes(lang);
|
|
577
576
|
}
|
|
578
|
-
|
|
577
|
+
|
|
578
|
+
/**
|
|
579
|
+
* ISO 639-1 codes for right-to-left languages (comprehensive list).
|
|
580
|
+
* @type {string[]}
|
|
581
|
+
*/
|
|
582
|
+
const RTL_LANGUAGES = ['ar', 'he', 'fa', 'ur', 'sd', 'yi', 'ps', 'ku', 'ug', 'dv'];
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Checks if a language code represents an RTL language.
|
|
586
|
+
* @param {string} lang - The language code (e.g., "ar", "ar-SA", "he-IL")
|
|
587
|
+
* @returns {boolean} True if the language is RTL
|
|
588
|
+
*/
|
|
589
|
+
function isRTLLanguage(lang) {
|
|
590
|
+
if (!lang) {
|
|
591
|
+
return false;
|
|
592
|
+
}
|
|
593
|
+
const primaryLang = lang.toLowerCase().split('-')[0];
|
|
594
|
+
return RTL_LANGUAGES.includes(primaryLang);
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* Gets the effective dir attribute value for an element (including inherited).
|
|
599
|
+
* @param {HTMLElement} element - The element to check
|
|
600
|
+
* @returns {string|null} The effective direction ('ltr', 'rtl', 'auto') or null
|
|
601
|
+
*/
|
|
602
|
+
function getEffectiveDir(element) {
|
|
603
|
+
let el = element;
|
|
604
|
+
while (el && el.nodeType === Node.ELEMENT_NODE) {
|
|
605
|
+
const dir = el.getAttribute('dir');
|
|
606
|
+
if (dir) {
|
|
607
|
+
return dir.toLowerCase();
|
|
608
|
+
}
|
|
609
|
+
el = el.parentElement;
|
|
610
|
+
}
|
|
611
|
+
return null;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Validates if a language code is a valid ISO 639 language code.
|
|
616
|
+
* Uses pre-defined lists of valid language codes from ISO 639-1 and ISO 639-2.
|
|
617
|
+
* @param {string} langCode - The language code to validate
|
|
618
|
+
* @returns {boolean} True if valid language code
|
|
619
|
+
*/
|
|
620
|
+
function isValidLanguageCode(langCode) {
|
|
621
|
+
if (!langCode || typeof langCode !== 'string') {
|
|
622
|
+
return false;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
const cleaned = langCode.trim().toLowerCase();
|
|
626
|
+
if (cleaned.length < 2) {
|
|
627
|
+
return false;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
const primaryLang = cleaned.split('-')[0];
|
|
631
|
+
|
|
632
|
+
const isInLangCodes = langCodes.some(function (lang) {
|
|
633
|
+
return lang.alpha2 === primaryLang || lang.alpha3 === primaryLang;
|
|
634
|
+
});
|
|
635
|
+
|
|
636
|
+
if (isInLangCodes) {
|
|
637
|
+
return true;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
if (validLangCodes.includes(primaryLang)) {
|
|
641
|
+
return true;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
return false;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
module.exports = {
|
|
648
|
+
langCodes,
|
|
649
|
+
validLangCodes,
|
|
650
|
+
rtls,
|
|
651
|
+
RTL_LANGUAGES,
|
|
652
|
+
getTwoLetterCode,
|
|
653
|
+
testLang,
|
|
654
|
+
getLang,
|
|
655
|
+
isDirValid,
|
|
656
|
+
isRTLLanguage,
|
|
657
|
+
getEffectiveDir,
|
|
658
|
+
isValidLanguageCode,
|
|
659
|
+
};
|
|
660
|
+
</code></pre></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="close search"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="Search..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">Type anything to view search result</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><div class="mobile-nav-links"></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="module-QueryCache.html">QueryCache</a></div><div class="sidebar-section-children"><a href="module-afixt-test-utils.html">afixt-test-utils</a></div><div class="sidebar-section-children"><a href="module-colorConversions.html">colorConversions</a></div><div class="sidebar-section-children"><a href="module-constants.html">constants</a></div><div class="sidebar-section-children"><a href="module-cssUtils.html">cssUtils</a></div><div class="sidebar-section-children"><a href="module-formUtils.html">formUtils</a></div><div class="sidebar-section-children"><a href="module-suggestContrast.html">suggestContrast</a></div><div class="sidebar-section-children"><a href="module-tableUtils.html">tableUtils</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#RTL_LANGUAGES">RTL_LANGUAGES</a></div><div class="sidebar-section-children"><a href="global.html#_internal">_internal</a></div><div class="sidebar-section-children"><a href="global.html#arrayCount">arrayCount</a></div><div class="sidebar-section-children"><a href="global.html#arrayRemoveByValue">arrayRemoveByValue</a></div><div class="sidebar-section-children"><a href="global.html#arrayUnique">arrayUnique</a></div><div class="sidebar-section-children"><a href="global.html#cellColorDiffs">cellColorDiffs</a></div><div class="sidebar-section-children"><a href="global.html#cellCount">cellCount</a></div><div class="sidebar-section-children"><a href="global.html#checkInconsistent">checkInconsistent</a></div><div class="sidebar-section-children"><a href="global.html#checkMultiRowsInHeader">checkMultiRowsInHeader</a></div><div class="sidebar-section-children"><a href="global.html#checkMultiRowsWithColspan">checkMultiRowsWithColspan</a></div><div class="sidebar-section-children"><a href="global.html#cleanBlank">cleanBlank</a></div><div class="sidebar-section-children"><a href="global.html#colCount">colCount</a></div><div class="sidebar-section-children"><a href="global.html#collectSubtreeText">collectSubtreeText</a></div><div class="sidebar-section-children"><a href="global.html#countBordersPct">countBordersPct</a></div><div class="sidebar-section-children"><a href="global.html#extractMeaningfulContent">extractMeaningfulContent</a></div><div class="sidebar-section-children"><a href="global.html#getAccessibleName">getAccessibleName</a></div><div class="sidebar-section-children"><a href="global.html#getAccessibleText">getAccessibleText</a></div><div class="sidebar-section-children"><a href="global.html#getAriaAttributesByElement">getAriaAttributesByElement</a></div><div class="sidebar-section-children"><a href="global.html#getAttributeHandlers">getAttributeHandlers</a></div><div class="sidebar-section-children"><a href="global.html#getCSSGeneratedContent">getCSSGeneratedContent</a></div><div class="sidebar-section-children"><a href="global.html#getColorContrast">getColorContrast</a></div><div class="sidebar-section-children"><a href="global.html#getComputedBackgroundColor">getComputedBackgroundColor</a></div><div class="sidebar-section-children"><a href="global.html#getComputedRole">getComputedRole</a></div><div class="sidebar-section-children"><a href="global.html#getContrastRatio">getContrastRatio</a></div><div class="sidebar-section-children"><a href="global.html#getEffectiveDir">getEffectiveDir</a></div><div class="sidebar-section-children"><a href="global.html#getEventListeners">getEventListeners</a></div><div class="sidebar-section-children"><a href="global.html#getFocusableElements">getFocusableElements</a></div><div class="sidebar-section-children"><a href="global.html#getGeneratedContent">getGeneratedContent</a></div><div class="sidebar-section-children"><a href="global.html#getImageText">getImageText</a></div><div class="sidebar-section-children"><a href="global.html#getPropertyHandlers">getPropertyHandlers</a></div><div class="sidebar-section-children"><a href="global.html#getRelativeLuminance">getRelativeLuminance</a></div><div class="sidebar-section-children"><a href="global.html#getStyleObject">getStyleObject</a></div><div class="sidebar-section-children"><a href="global.html#getTwoLetterCode">getTwoLetterCode</a></div><div class="sidebar-section-children"><a href="global.html#hasAccessibleName">hasAccessibleName</a></div><div class="sidebar-section-children"><a href="global.html#hasAttribute">hasAttribute</a></div><div class="sidebar-section-children"><a href="global.html#hasBackgroundImage">hasBackgroundImage</a></div><div class="sidebar-section-children"><a href="global.html#hasCSSGeneratedContent">hasCSSGeneratedContent</a></div><div class="sidebar-section-children"><a href="global.html#hasHiddenParent">hasHiddenParent</a></div><div class="sidebar-section-children"><a href="global.html#hasParent">hasParent</a></div><div class="sidebar-section-children"><a href="global.html#hasValidAriaAttributes">hasValidAriaAttributes</a></div><div class="sidebar-section-children"><a href="global.html#isA11yVisible">isA11yVisible</a></div><div class="sidebar-section-children"><a href="global.html#isAriaAttributeValid">isAriaAttributeValid</a></div><div class="sidebar-section-children"><a href="global.html#isComplexTable">isComplexTable</a></div><div class="sidebar-section-children"><a href="global.html#isDataTable">isDataTable</a></div><div class="sidebar-section-children"><a href="global.html#isFocusable">isFocusable</a></div><div class="sidebar-section-children"><a href="global.html#isHidden">isHidden</a></div><div class="sidebar-section-children"><a href="global.html#isNotVisible">isNotVisible</a></div><div class="sidebar-section-children"><a href="global.html#isOffScreen">isOffScreen</a></div><div class="sidebar-section-children"><a href="global.html#isRTLLanguage">isRTLLanguage</a></div><div class="sidebar-section-children"><a href="global.html#isValidLanguageCode">isValidLanguageCode</a></div><div class="sidebar-section-children"><a href="global.html#isValidUrl">isValidUrl</a></div><div class="sidebar-section-children"><a href="global.html#langCodes">langCodes</a></div><div class="sidebar-section-children"><a href="global.html#listEventListeners">listEventListeners</a></div><div class="sidebar-section-children"><a href="global.html#luminance">luminance</a></div><div class="sidebar-section-children"><a href="global.html#matchesSelector">matchesSelector</a></div><div class="sidebar-section-children"><a href="global.html#parseColor">parseColor</a></div><div class="sidebar-section-children"><a href="global.html#parseRGB">parseRGB</a></div><div class="sidebar-section-children"><a href="global.html#rowCount">rowCount</a></div><div class="sidebar-section-children"><a href="global.html#rtls">rtls</a></div><div class="sidebar-section-children"><a href="global.html#sortByVisualOrder">sortByVisualOrder</a></div><div class="sidebar-section-children"><a href="global.html#strlen">strlen</a></div><div class="sidebar-section-children"><a href="global.html#testContrast">testContrast</a></div><div class="sidebar-section-children"><a href="global.html#testLang">testLang</a></div><div class="sidebar-section-children"><a href="global.html#testOrder">testOrder</a></div><div class="sidebar-section-children"><a href="global.html#validLangCodes">validLangCodes</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#light-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script></body></html>
|