quarchpy 2.2.8__py2.py3-none-any.whl → 2.2.9.dev1__py2.py3-none-any.whl

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.
Files changed (195) hide show
  1. quarchpy/__pycache__/__init__.cpython-311.pyc +0 -0
  2. quarchpy/__pycache__/__init__.cpython-313.pyc +0 -0
  3. quarchpy/__pycache__/_version.cpython-311.pyc +0 -0
  4. quarchpy/__pycache__/_version.cpython-313.pyc +0 -0
  5. quarchpy/__pycache__/connection.cpython-311.pyc +0 -0
  6. quarchpy/__pycache__/connection.cpython-313.pyc +0 -0
  7. quarchpy/_version.py +1 -1
  8. quarchpy/config_files/__pycache__/__init__.cpython-311.pyc +0 -0
  9. quarchpy/config_files/__pycache__/__init__.cpython-313.pyc +0 -0
  10. quarchpy/config_files/__pycache__/quarch_config_parser.cpython-311.pyc +0 -0
  11. quarchpy/config_files/__pycache__/quarch_config_parser.cpython-313.pyc +0 -0
  12. quarchpy/connection_specific/QPS/win-amd64/License/Netty-license.txt +143 -0
  13. quarchpy/connection_specific/QPS/win-amd64/{3rdPartyLicenses/argparse4j-LICENSE.txt → License/argparse4j-license.txt} +25 -23
  14. quarchpy/connection_specific/QPS/win-amd64/License/controlsfx-license.txt +26 -0
  15. quarchpy/connection_specific/QPS/win-amd64/License/usb4java-license.txt +167 -0
  16. quarchpy/connection_specific/QPS/win-amd64/app.jar +0 -0
  17. quarchpy/connection_specific/QPS/win-amd64/launchQPSJ21.bat +4 -0
  18. quarchpy/connection_specific/QPS/win-amd64/launchQPSJ21.sh +4 -0
  19. quarchpy/connection_specific/QPS/win-amd64/qis/qis.jar +0 -0
  20. quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/CInterface-2.3.jar +0 -0
  21. quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/CInterface-2.5.jar +0 -0
  22. quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/QuarchCommon-2.0.jar +0 -0
  23. quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/{TorridonCommon-1.1.jar → TorridonCommon-1.0.jar} +0 -0
  24. quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/TorridonCommon-1.3.jar +0 -0
  25. quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/usb4java-1.3.1.jar +0 -0
  26. quarchpy/connection_specific/QPS/win-amd64/qps-command-reference.html +104 -104
  27. quarchpy/connection_specific/QPS/win-amd64/qps.jar +0 -0
  28. quarchpy/connection_specific/QPS/win-amd64/qps_lib/JFXUtilities-1.0.jar +0 -0
  29. quarchpy/connection_specific/QPS/win-amd64/qps_lib/QuarchCommon-2.0.jar +0 -0
  30. quarchpy/connection_specific/QPS/win-amd64/qps_lib/lin-x64/{javafx-base-21.0.6-linux.jar → javafx-base-21.0.5-linux.jar} +0 -0
  31. quarchpy/connection_specific/QPS/win-amd64/qps_lib/lin-x64/{javafx-controls-21.0.6-linux.jar → javafx-controls-21.0.5-linux.jar} +0 -0
  32. quarchpy/connection_specific/QPS/win-amd64/qps_lib/lin-x64/{javafx-fxml-21.0.6-linux.jar → javafx-fxml-21.0.5-linux.jar} +0 -0
  33. quarchpy/connection_specific/QPS/win-amd64/qps_lib/lin-x64/{javafx-graphics-21.0.6-linux.jar → javafx-graphics-21.0.5-linux.jar} +0 -0
  34. quarchpy/connection_specific/QPS/win-amd64/qps_lib/lin-x64/{javafx-swing-21.0.6-linux.jar → javafx-swing-21.0.5-linux.jar} +0 -0
  35. quarchpy/connection_specific/QPS/win-amd64/qps_lib/{mac-x64/javafx-base-21.0.6-mac.jar → mac-arm64/javafx-base-21.0.5-mac-aarch64.jar} +0 -0
  36. quarchpy/connection_specific/QPS/win-amd64/qps_lib/mac-arm64/{javafx-controls-21.0.6-mac-aarch64.jar → javafx-controls-21.0.5-mac-aarch64.jar} +0 -0
  37. quarchpy/connection_specific/QPS/win-amd64/qps_lib/{mac-x64/javafx-fxml-21.0.6-mac.jar → mac-arm64/javafx-fxml-21.0.5-mac-aarch64.jar} +0 -0
  38. quarchpy/connection_specific/QPS/win-amd64/qps_lib/mac-arm64/{javafx-graphics-21.0.6-mac-aarch64.jar → javafx-graphics-21.0.5-mac-aarch64.jar} +0 -0
  39. quarchpy/connection_specific/QPS/win-amd64/qps_lib/{mac-x64/javafx-swing-21.0.6-mac.jar → mac-arm64/javafx-swing-21.0.5-mac-aarch64.jar} +0 -0
  40. quarchpy/connection_specific/QPS/win-amd64/qps_lib/{mac-arm64/javafx-base-21.0.6-mac-aarch64.jar → mac-x64/javafx-base-21.0.5-mac.jar} +0 -0
  41. quarchpy/connection_specific/QPS/win-amd64/qps_lib/mac-x64/{javafx-controls-21.0.6-mac.jar → javafx-controls-21.0.5-mac.jar} +0 -0
  42. quarchpy/connection_specific/QPS/win-amd64/qps_lib/{mac-arm64/javafx-fxml-21.0.6-mac-aarch64.jar → mac-x64/javafx-fxml-21.0.5-mac.jar} +0 -0
  43. quarchpy/connection_specific/QPS/win-amd64/qps_lib/mac-x64/{javafx-graphics-21.0.6-mac.jar → javafx-graphics-21.0.5-mac.jar} +0 -0
  44. quarchpy/connection_specific/QPS/win-amd64/qps_lib/{mac-arm64/javafx-swing-21.0.6-mac-aarch64.jar → mac-x64/javafx-swing-21.0.5-mac.jar} +0 -0
  45. quarchpy/connection_specific/QPS/win-amd64/qps_lib/win-x64/{javafx-base-21.0.6-win.jar → javafx-base-21.0.5-win.jar} +0 -0
  46. quarchpy/connection_specific/QPS/win-amd64/qps_lib/win-x64/{javafx-controls-21.0.6-win.jar → javafx-controls-21.0.5-win.jar} +0 -0
  47. quarchpy/connection_specific/QPS/win-amd64/qps_lib/win-x64/{javafx-fxml-21.0.6-win.jar → javafx-fxml-21.0.5-win.jar} +0 -0
  48. quarchpy/connection_specific/QPS/win-amd64/qps_lib/win-x64/{javafx-graphics-21.0.6-win.jar → javafx-graphics-21.0.5-win.jar} +0 -0
  49. quarchpy/connection_specific/QPS/win-amd64/qps_lib/win-x64/{javafx-swing-21.0.6-win.jar → javafx-swing-21.0.5-win.jar} +0 -0
  50. quarchpy/connection_specific/QPS/win-amd64/scriptCommands.txt +4 -4
  51. quarchpy/connection_specific/QPS/win-amd64/whats-new.txt +12 -20
  52. quarchpy/connection_specific/__pycache__/StreamChannels.cpython-311.pyc +0 -0
  53. quarchpy/connection_specific/__pycache__/StreamChannels.cpython-313.pyc +0 -0
  54. quarchpy/connection_specific/__pycache__/__init__.cpython-311.pyc +0 -0
  55. quarchpy/connection_specific/__pycache__/__init__.cpython-313.pyc +0 -0
  56. quarchpy/connection_specific/__pycache__/connection_QIS.cpython-311.pyc +0 -0
  57. quarchpy/connection_specific/__pycache__/connection_QIS.cpython-313.pyc +0 -0
  58. quarchpy/connection_specific/__pycache__/connection_QPS.cpython-311.pyc +0 -0
  59. quarchpy/connection_specific/__pycache__/connection_QPS.cpython-313.pyc +0 -0
  60. quarchpy/connection_specific/__pycache__/connection_ReST.cpython-311.pyc +0 -0
  61. quarchpy/connection_specific/__pycache__/connection_ReST.cpython-313.pyc +0 -0
  62. quarchpy/connection_specific/__pycache__/connection_Serial.cpython-311.pyc +0 -0
  63. quarchpy/connection_specific/__pycache__/connection_Serial.cpython-313.pyc +0 -0
  64. quarchpy/connection_specific/__pycache__/connection_TCP.cpython-311.pyc +0 -0
  65. quarchpy/connection_specific/__pycache__/connection_TCP.cpython-313.pyc +0 -0
  66. quarchpy/connection_specific/__pycache__/connection_USB.cpython-311.pyc +0 -0
  67. quarchpy/connection_specific/__pycache__/connection_USB.cpython-313.pyc +0 -0
  68. quarchpy/connection_specific/__pycache__/mDNS.cpython-311.pyc +0 -0
  69. quarchpy/connection_specific/__pycache__/mDNS.cpython-313.pyc +0 -0
  70. quarchpy/connection_specific/jdk_j21_jres/__pycache__/__init__.cpython-311.pyc +0 -0
  71. quarchpy/connection_specific/jdk_j21_jres/__pycache__/__init__.cpython-313.pyc +0 -0
  72. quarchpy/connection_specific/jdk_j21_jres/__pycache__/fix_permissions.cpython-311.pyc +0 -0
  73. quarchpy/connection_specific/jdk_j21_jres/__pycache__/fix_permissions.cpython-313.pyc +0 -0
  74. quarchpy/connection_specific/serial/__pycache__/__init__.cpython-311.pyc +0 -0
  75. quarchpy/connection_specific/serial/__pycache__/__init__.cpython-313.pyc +0 -0
  76. quarchpy/connection_specific/serial/__pycache__/serialutil.cpython-311.pyc +0 -0
  77. quarchpy/connection_specific/serial/__pycache__/serialutil.cpython-313.pyc +0 -0
  78. quarchpy/connection_specific/serial/__pycache__/serialwin32.cpython-311.pyc +0 -0
  79. quarchpy/connection_specific/serial/__pycache__/serialwin32.cpython-313.pyc +0 -0
  80. quarchpy/connection_specific/serial/__pycache__/win32.cpython-311.pyc +0 -0
  81. quarchpy/connection_specific/serial/__pycache__/win32.cpython-313.pyc +0 -0
  82. quarchpy/connection_specific/serial/tools/__pycache__/__init__.cpython-311.pyc +0 -0
  83. quarchpy/connection_specific/serial/tools/__pycache__/__init__.cpython-313.pyc +0 -0
  84. quarchpy/connection_specific/serial/tools/__pycache__/list_ports.cpython-311.pyc +0 -0
  85. quarchpy/connection_specific/serial/tools/__pycache__/list_ports.cpython-313.pyc +0 -0
  86. quarchpy/connection_specific/serial/tools/__pycache__/list_ports_common.cpython-311.pyc +0 -0
  87. quarchpy/connection_specific/serial/tools/__pycache__/list_ports_common.cpython-313.pyc +0 -0
  88. quarchpy/connection_specific/serial/tools/__pycache__/list_ports_windows.cpython-311.pyc +0 -0
  89. quarchpy/connection_specific/serial/tools/__pycache__/list_ports_windows.cpython-313.pyc +0 -0
  90. quarchpy/connection_specific/usb_libs/__pycache__/libusb1.cpython-311.pyc +0 -0
  91. quarchpy/connection_specific/usb_libs/__pycache__/usb1.cpython-311.pyc +0 -0
  92. quarchpy/connection_specific/usb_libs/usb1.py +2360 -2360
  93. quarchpy/debug/SystemTest.py +8 -1
  94. quarchpy/debug/__pycache__/SystemTest.cpython-311.pyc +0 -0
  95. quarchpy/debug/__pycache__/SystemTest.cpython-313.pyc +0 -0
  96. quarchpy/debug/__pycache__/__init__.cpython-311.pyc +0 -0
  97. quarchpy/debug/__pycache__/__init__.cpython-313.pyc +0 -0
  98. quarchpy/debug/__pycache__/module_debug.cpython-313.pyc +0 -0
  99. quarchpy/debug/__pycache__/simple_terminal.cpython-313.pyc +0 -0
  100. quarchpy/debug/__pycache__/upgrade_quarchpy.cpython-313.pyc +0 -0
  101. quarchpy/debug/__pycache__/versionCompare.cpython-311.pyc +0 -0
  102. quarchpy/debug/__pycache__/versionCompare.cpython-313.pyc +0 -0
  103. quarchpy/device/__pycache__/__init__.cpython-311.pyc +0 -0
  104. quarchpy/device/__pycache__/__init__.cpython-313.pyc +0 -0
  105. quarchpy/device/__pycache__/device.cpython-311.pyc +0 -0
  106. quarchpy/device/__pycache__/device.cpython-313.pyc +0 -0
  107. quarchpy/device/__pycache__/quarchArray.cpython-311.pyc +0 -0
  108. quarchpy/device/__pycache__/quarchArray.cpython-313.pyc +0 -0
  109. quarchpy/device/__pycache__/quarchPPM.cpython-311.pyc +0 -0
  110. quarchpy/device/__pycache__/quarchPPM.cpython-313.pyc +0 -0
  111. quarchpy/device/__pycache__/quarchQPS.cpython-311.pyc +0 -0
  112. quarchpy/device/__pycache__/quarchQPS.cpython-313.pyc +0 -0
  113. quarchpy/device/__pycache__/scanDevices.cpython-311.pyc +0 -0
  114. quarchpy/device/__pycache__/scanDevices.cpython-313.pyc +0 -0
  115. quarchpy/device/quarchQPS.py +20 -17
  116. quarchpy/disk_test/__pycache__/AbsDiskFinder.cpython-311.pyc +0 -0
  117. quarchpy/disk_test/__pycache__/AbsDiskFinder.cpython-313.pyc +0 -0
  118. quarchpy/disk_test/__pycache__/DiskTargetSelection.cpython-311.pyc +0 -0
  119. quarchpy/disk_test/__pycache__/DiskTargetSelection.cpython-313.pyc +0 -0
  120. quarchpy/disk_test/__pycache__/__init__.cpython-311.pyc +0 -0
  121. quarchpy/disk_test/__pycache__/__init__.cpython-313.pyc +0 -0
  122. quarchpy/disk_test/__pycache__/iometerDiskFinder.cpython-311.pyc +0 -0
  123. quarchpy/disk_test/__pycache__/iometerDiskFinder.cpython-313.pyc +0 -0
  124. quarchpy/docs/Makefile +20 -20
  125. quarchpy/docs/_build/html/_static/custom.css +1 -1
  126. quarchpy/docs/_build/html/_static/doctools.js +149 -149
  127. quarchpy/docs/_build/html/_static/jquery-3.4.1.js +10598 -10598
  128. quarchpy/docs/_build/html/_static/jquery.js +2 -2
  129. quarchpy/docs/_build/html/_static/searchtools.js +632 -632
  130. quarchpy/docs/_build/html/_static/sphinx_highlight.js +154 -154
  131. quarchpy/docs/_build/html/_static/underscore-1.3.1.js +999 -999
  132. quarchpy/docs/_build/html/_static/underscore.js +5 -5
  133. quarchpy/fio/HIDEtest_performance_class.py +1 -1
  134. quarchpy/fio/__pycache__/FIO_interface.cpython-311.pyc +0 -0
  135. quarchpy/fio/__pycache__/FIO_interface.cpython-313.pyc +0 -0
  136. quarchpy/fio/__pycache__/__init__.cpython-311.pyc +0 -0
  137. quarchpy/fio/__pycache__/__init__.cpython-313.pyc +0 -0
  138. quarchpy/iometer/__pycache__/__init__.cpython-311.pyc +0 -0
  139. quarchpy/iometer/__pycache__/__init__.cpython-313.pyc +0 -0
  140. quarchpy/iometer/__pycache__/gen_iometer_template.cpython-311.pyc +0 -0
  141. quarchpy/iometer/__pycache__/gen_iometer_template.cpython-313.pyc +0 -0
  142. quarchpy/iometer/__pycache__/iometerFuncs.cpython-311.pyc +0 -0
  143. quarchpy/iometer/__pycache__/iometerFuncs.cpython-313.pyc +0 -0
  144. quarchpy/qis/__pycache__/StreamHeaderInfo.cpython-311.pyc +0 -0
  145. quarchpy/qis/__pycache__/StreamHeaderInfo.cpython-313.pyc +0 -0
  146. quarchpy/qis/__pycache__/__init__.cpython-311.pyc +0 -0
  147. quarchpy/qis/__pycache__/__init__.cpython-313.pyc +0 -0
  148. quarchpy/qis/__pycache__/qisFuncs.cpython-311.pyc +0 -0
  149. quarchpy/qis/__pycache__/qisFuncs.cpython-313.pyc +0 -0
  150. quarchpy/qis/qisFuncs.py +2 -0
  151. quarchpy/qps/__pycache__/__init__.cpython-311.pyc +0 -0
  152. quarchpy/qps/__pycache__/__init__.cpython-313.pyc +0 -0
  153. quarchpy/qps/__pycache__/qpsFuncs.cpython-311.pyc +0 -0
  154. quarchpy/qps/__pycache__/qpsFuncs.cpython-313.pyc +0 -0
  155. quarchpy/user_interface/__pycache__/__init__.cpython-311.pyc +0 -0
  156. quarchpy/user_interface/__pycache__/__init__.cpython-313.pyc +0 -0
  157. quarchpy/user_interface/__pycache__/user_interface.cpython-311.pyc +0 -0
  158. quarchpy/user_interface/__pycache__/user_interface.cpython-313.pyc +0 -0
  159. quarchpy/utilities/__pycache__/TestCenter.cpython-311.pyc +0 -0
  160. quarchpy/utilities/__pycache__/TestCenter.cpython-313.pyc +0 -0
  161. quarchpy/utilities/__pycache__/TimeValue.cpython-311.pyc +0 -0
  162. quarchpy/utilities/__pycache__/TimeValue.cpython-313.pyc +0 -0
  163. quarchpy/utilities/__pycache__/Version.cpython-311.pyc +0 -0
  164. quarchpy/utilities/__pycache__/Version.cpython-313.pyc +0 -0
  165. quarchpy/utilities/__pycache__/__init__.cpython-311.pyc +0 -0
  166. quarchpy/utilities/__pycache__/__init__.cpython-313.pyc +0 -0
  167. {quarchpy-2.2.8.dist-info → quarchpy-2.2.9.dev1.dist-info}/METADATA +3 -12
  168. {quarchpy-2.2.8.dist-info → quarchpy-2.2.9.dev1.dist-info}/RECORD +174 -77
  169. {quarchpy-2.2.8.dist-info → quarchpy-2.2.9.dev1.dist-info}/WHEEL +1 -1
  170. quarchpy/connection_specific/QPS/win-amd64/3rdPartyLicenses/com.sun.istack-license.html +0 -59
  171. quarchpy/connection_specific/QPS/win-amd64/3rdPartyLicenses/commons-io-LICENSE-2.0.txt +0 -202
  172. quarchpy/connection_specific/QPS/win-amd64/3rdPartyLicenses/controlsfx-license.txt +0 -29
  173. quarchpy/connection_specific/QPS/win-amd64/3rdPartyLicenses/jakarta.activation-license.html +0 -59
  174. quarchpy/connection_specific/QPS/win-amd64/3rdPartyLicenses/jakarta.xml.bind-api-license.html +0 -59
  175. quarchpy/connection_specific/QPS/win-amd64/3rdPartyLicenses/netty-LICENSE.txt +0 -202
  176. quarchpy/connection_specific/QPS/win-amd64/3rdPartyLicenses/netty-NOTICE.txt +0 -239
  177. quarchpy/connection_specific/QPS/win-amd64/InstallType.dat +0 -1
  178. quarchpy/connection_specific/QPS/win-amd64/app.properties +0 -6
  179. quarchpy/connection_specific/QPS/win-amd64/license.txt +0 -1
  180. quarchpy/connection_specific/QPS/win-amd64/qis/qis_lib/jmdns-3.5.9.jar +0 -0
  181. quarchpy/connection_specific/QPS/win-amd64/qps_lib/commons-io-2.18.0.jar +0 -0
  182. quarchpy/connection_specific/QPS/win-amd64/qps_lib/lin-arm64/javafx-base-21.0.6-linux-aarch64.jar +0 -0
  183. quarchpy/connection_specific/QPS/win-amd64/qps_lib/lin-arm64/javafx-controls-21.0.6-linux-aarch64.jar +0 -0
  184. quarchpy/connection_specific/QPS/win-amd64/qps_lib/lin-arm64/javafx-fxml-21.0.6-linux-aarch64.jar +0 -0
  185. quarchpy/connection_specific/QPS/win-amd64/qps_lib/lin-arm64/javafx-graphics-21.0.6-linux-aarch64.jar +0 -0
  186. quarchpy/connection_specific/QPS/win-amd64/qps_lib/lin-arm64/javafx-swing-21.0.6-linux-aarch64.jar +0 -0
  187. quarchpy/connection_specific/QPS/win-amd64/qps_lib/qutils-1.0.jar +0 -0
  188. quarchpy/fio_tests_file.fio +0 -1
  189. quarchpy/tests/test_device/test_scanDevices.py +0 -21
  190. quarchpy/utilities/utils.py +0 -64
  191. /quarchpy/connection_specific/QPS/win-amd64/DeviceConfig/{QTL1995-02.xml → QTL1995-02.XML} +0 -0
  192. /quarchpy/connection_specific/QPS/win-amd64/DeviceConfig/{QTL1999-02.xml → QTL1999-02.XML} +0 -0
  193. /quarchpy/connection_specific/QPS/win-amd64/DeviceConfig/{QTL2312-01.xml → QTL2312-01.XML} +0 -0
  194. /quarchpy/connection_specific/QPS/win-amd64/{3rdPartyLicenses → License}/Material-Icons-license.txt +0 -0
  195. {quarchpy-2.2.8.dist-info → quarchpy-2.2.9.dev1.dist-info}/top_level.txt +0 -0
@@ -1,154 +1,154 @@
1
- /* Highlighting utilities for Sphinx HTML documentation. */
2
- "use strict";
3
-
4
- const SPHINX_HIGHLIGHT_ENABLED = true
5
-
6
- /**
7
- * highlight a given string on a node by wrapping it in
8
- * span elements with the given class name.
9
- */
10
- const _highlight = (node, addItems, text, className) => {
11
- if (node.nodeType === Node.TEXT_NODE) {
12
- const val = node.nodeValue;
13
- const parent = node.parentNode;
14
- const pos = val.toLowerCase().indexOf(text);
15
- if (
16
- pos >= 0 &&
17
- !parent.classList.contains(className) &&
18
- !parent.classList.contains("nohighlight")
19
- ) {
20
- let span;
21
-
22
- const closestNode = parent.closest("body, svg, foreignObject");
23
- const isInSVG = closestNode && closestNode.matches("svg");
24
- if (isInSVG) {
25
- span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
26
- } else {
27
- span = document.createElement("span");
28
- span.classList.add(className);
29
- }
30
-
31
- span.appendChild(document.createTextNode(val.substr(pos, text.length)));
32
- const rest = document.createTextNode(val.substr(pos + text.length));
33
- parent.insertBefore(
34
- span,
35
- parent.insertBefore(
36
- rest,
37
- node.nextSibling
38
- )
39
- );
40
- node.nodeValue = val.substr(0, pos);
41
- /* There may be more occurrences of search term in this node. So call this
42
- * function recursively on the remaining fragment.
43
- */
44
- _highlight(rest, addItems, text, className);
45
-
46
- if (isInSVG) {
47
- const rect = document.createElementNS(
48
- "http://www.w3.org/2000/svg",
49
- "rect"
50
- );
51
- const bbox = parent.getBBox();
52
- rect.x.baseVal.value = bbox.x;
53
- rect.y.baseVal.value = bbox.y;
54
- rect.width.baseVal.value = bbox.width;
55
- rect.height.baseVal.value = bbox.height;
56
- rect.setAttribute("class", className);
57
- addItems.push({ parent: parent, target: rect });
58
- }
59
- }
60
- } else if (node.matches && !node.matches("button, select, textarea")) {
61
- node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
62
- }
63
- };
64
- const _highlightText = (thisNode, text, className) => {
65
- let addItems = [];
66
- _highlight(thisNode, addItems, text, className);
67
- addItems.forEach((obj) =>
68
- obj.parent.insertAdjacentElement("beforebegin", obj.target)
69
- );
70
- };
71
-
72
- /**
73
- * Small JavaScript module for the documentation.
74
- */
75
- const SphinxHighlight = {
76
-
77
- /**
78
- * highlight the search words provided in localstorage in the text
79
- */
80
- highlightSearchWords: () => {
81
- if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
82
-
83
- // get and clear terms from localstorage
84
- const url = new URL(window.location);
85
- const highlight =
86
- localStorage.getItem("sphinx_highlight_terms")
87
- || url.searchParams.get("highlight")
88
- || "";
89
- localStorage.removeItem("sphinx_highlight_terms")
90
- url.searchParams.delete("highlight");
91
- window.history.replaceState({}, "", url);
92
-
93
- // get individual terms from highlight string
94
- const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
95
- if (terms.length === 0) return; // nothing to do
96
-
97
- // There should never be more than one element matching "div.body"
98
- const divBody = document.querySelectorAll("div.body");
99
- const body = divBody.length ? divBody[0] : document.querySelector("body");
100
- window.setTimeout(() => {
101
- terms.forEach((term) => _highlightText(body, term, "highlighted"));
102
- }, 10);
103
-
104
- const searchBox = document.getElementById("searchbox");
105
- if (searchBox === null) return;
106
- searchBox.appendChild(
107
- document
108
- .createRange()
109
- .createContextualFragment(
110
- '<p class="highlight-link">' +
111
- '<a href="javascript:SphinxHighlight.hideSearchWords()">' +
112
- _("Hide Search Matches") +
113
- "</a></p>"
114
- )
115
- );
116
- },
117
-
118
- /**
119
- * helper function to hide the search marks again
120
- */
121
- hideSearchWords: () => {
122
- document
123
- .querySelectorAll("#searchbox .highlight-link")
124
- .forEach((el) => el.remove());
125
- document
126
- .querySelectorAll("span.highlighted")
127
- .forEach((el) => el.classList.remove("highlighted"));
128
- localStorage.removeItem("sphinx_highlight_terms")
129
- },
130
-
131
- initEscapeListener: () => {
132
- // only install a listener if it is really needed
133
- if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
134
-
135
- document.addEventListener("keydown", (event) => {
136
- // bail for input elements
137
- if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
138
- // bail with special keys
139
- if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
140
- if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
141
- SphinxHighlight.hideSearchWords();
142
- event.preventDefault();
143
- }
144
- });
145
- },
146
- };
147
-
148
- _ready(() => {
149
- /* Do not call highlightSearchWords() when we are on the search page.
150
- * It will highlight words from the *previous* search query.
151
- */
152
- if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
153
- SphinxHighlight.initEscapeListener();
154
- });
1
+ /* Highlighting utilities for Sphinx HTML documentation. */
2
+ "use strict";
3
+
4
+ const SPHINX_HIGHLIGHT_ENABLED = true
5
+
6
+ /**
7
+ * highlight a given string on a node by wrapping it in
8
+ * span elements with the given class name.
9
+ */
10
+ const _highlight = (node, addItems, text, className) => {
11
+ if (node.nodeType === Node.TEXT_NODE) {
12
+ const val = node.nodeValue;
13
+ const parent = node.parentNode;
14
+ const pos = val.toLowerCase().indexOf(text);
15
+ if (
16
+ pos >= 0 &&
17
+ !parent.classList.contains(className) &&
18
+ !parent.classList.contains("nohighlight")
19
+ ) {
20
+ let span;
21
+
22
+ const closestNode = parent.closest("body, svg, foreignObject");
23
+ const isInSVG = closestNode && closestNode.matches("svg");
24
+ if (isInSVG) {
25
+ span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
26
+ } else {
27
+ span = document.createElement("span");
28
+ span.classList.add(className);
29
+ }
30
+
31
+ span.appendChild(document.createTextNode(val.substr(pos, text.length)));
32
+ const rest = document.createTextNode(val.substr(pos + text.length));
33
+ parent.insertBefore(
34
+ span,
35
+ parent.insertBefore(
36
+ rest,
37
+ node.nextSibling
38
+ )
39
+ );
40
+ node.nodeValue = val.substr(0, pos);
41
+ /* There may be more occurrences of search term in this node. So call this
42
+ * function recursively on the remaining fragment.
43
+ */
44
+ _highlight(rest, addItems, text, className);
45
+
46
+ if (isInSVG) {
47
+ const rect = document.createElementNS(
48
+ "http://www.w3.org/2000/svg",
49
+ "rect"
50
+ );
51
+ const bbox = parent.getBBox();
52
+ rect.x.baseVal.value = bbox.x;
53
+ rect.y.baseVal.value = bbox.y;
54
+ rect.width.baseVal.value = bbox.width;
55
+ rect.height.baseVal.value = bbox.height;
56
+ rect.setAttribute("class", className);
57
+ addItems.push({ parent: parent, target: rect });
58
+ }
59
+ }
60
+ } else if (node.matches && !node.matches("button, select, textarea")) {
61
+ node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
62
+ }
63
+ };
64
+ const _highlightText = (thisNode, text, className) => {
65
+ let addItems = [];
66
+ _highlight(thisNode, addItems, text, className);
67
+ addItems.forEach((obj) =>
68
+ obj.parent.insertAdjacentElement("beforebegin", obj.target)
69
+ );
70
+ };
71
+
72
+ /**
73
+ * Small JavaScript module for the documentation.
74
+ */
75
+ const SphinxHighlight = {
76
+
77
+ /**
78
+ * highlight the search words provided in localstorage in the text
79
+ */
80
+ highlightSearchWords: () => {
81
+ if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
82
+
83
+ // get and clear terms from localstorage
84
+ const url = new URL(window.location);
85
+ const highlight =
86
+ localStorage.getItem("sphinx_highlight_terms")
87
+ || url.searchParams.get("highlight")
88
+ || "";
89
+ localStorage.removeItem("sphinx_highlight_terms")
90
+ url.searchParams.delete("highlight");
91
+ window.history.replaceState({}, "", url);
92
+
93
+ // get individual terms from highlight string
94
+ const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
95
+ if (terms.length === 0) return; // nothing to do
96
+
97
+ // There should never be more than one element matching "div.body"
98
+ const divBody = document.querySelectorAll("div.body");
99
+ const body = divBody.length ? divBody[0] : document.querySelector("body");
100
+ window.setTimeout(() => {
101
+ terms.forEach((term) => _highlightText(body, term, "highlighted"));
102
+ }, 10);
103
+
104
+ const searchBox = document.getElementById("searchbox");
105
+ if (searchBox === null) return;
106
+ searchBox.appendChild(
107
+ document
108
+ .createRange()
109
+ .createContextualFragment(
110
+ '<p class="highlight-link">' +
111
+ '<a href="javascript:SphinxHighlight.hideSearchWords()">' +
112
+ _("Hide Search Matches") +
113
+ "</a></p>"
114
+ )
115
+ );
116
+ },
117
+
118
+ /**
119
+ * helper function to hide the search marks again
120
+ */
121
+ hideSearchWords: () => {
122
+ document
123
+ .querySelectorAll("#searchbox .highlight-link")
124
+ .forEach((el) => el.remove());
125
+ document
126
+ .querySelectorAll("span.highlighted")
127
+ .forEach((el) => el.classList.remove("highlighted"));
128
+ localStorage.removeItem("sphinx_highlight_terms")
129
+ },
130
+
131
+ initEscapeListener: () => {
132
+ // only install a listener if it is really needed
133
+ if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
134
+
135
+ document.addEventListener("keydown", (event) => {
136
+ // bail for input elements
137
+ if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
138
+ // bail with special keys
139
+ if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
140
+ if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
141
+ SphinxHighlight.hideSearchWords();
142
+ event.preventDefault();
143
+ }
144
+ });
145
+ },
146
+ };
147
+
148
+ _ready(() => {
149
+ /* Do not call highlightSearchWords() when we are on the search page.
150
+ * It will highlight words from the *previous* search query.
151
+ */
152
+ if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
153
+ SphinxHighlight.initEscapeListener();
154
+ });