diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/ElementSoup.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/ElementSoup.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6a701fe73c4e0734a9455b1c31f831f7a5caa289
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/ElementSoup.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ef2c54778d5bb124d8e430bdfebc1b23172ba2ea
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_diffcommand.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_diffcommand.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3442bd729655b8ee3eb06a8e4d4a9779c44033c5
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_diffcommand.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_difflib.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_difflib.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d43b01da50b0a37ffb5797af24130304c6399586
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_difflib.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_html5builder.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_html5builder.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..293c45cf69069038c43748d07c37cf2dad47bee2
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_html5builder.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_setmixin.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_setmixin.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..fe55dec77d7cbf9a98f85344d40470b546f6ca76
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/_setmixin.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/builder.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/builder.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a5a3789609b13453aa925209e135a5d9aab7c246
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/builder.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/clean.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/clean.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9e18e7cbee12a2cbf0b191a2f22f2e5cea0eae75
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/clean.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/defs.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/defs.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..dd0339d876036ef8950fa4eb45899841057974e2
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/defs.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/diff.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/diff.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9aa0c820f284b62dcda1240aeeb938172be9dccc
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/diff.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/formfill.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/formfill.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ba17dac2f4fb5681bf79a5ee7e1ea2bf67b517b4
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/formfill.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/html5parser.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/html5parser.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..bfe1c14633e2c2b4d3810eb6d9fef61955b9e021
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/html5parser.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/soupparser.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/soupparser.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1a568e7811fd0d047bbed59e9806b09fa3359235
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/soupparser.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/usedoctest.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/usedoctest.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..804e21b4ddfc55aad202287dfadfe565b43a6be9
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/__pycache__/usedoctest.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2b50f8991825381ba89ffe185ad83e66782e00d8
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/config.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/config.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..9c04438f737374901d92acc497e4175ebc216891
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/config.pxd
@@ -0,0 +1,3 @@
+cdef extern from "etree_defs.h":
+ cdef bint ENABLE_THREADING
+ cdef bint ENABLE_SCHEMATRON
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/dtdvalid.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/dtdvalid.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..2ad49db11b20e4e710f4f55cf5590ef3928f1058
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/dtdvalid.pxd
@@ -0,0 +1,18 @@
+from lxml.includes cimport tree
+from lxml.includes.tree cimport xmlDoc, xmlDtd
+
+cdef extern from "libxml/valid.h" nogil:
+ ctypedef void (*xmlValidityErrorFunc)(void * ctx, const char * msg, ...) noexcept
+ ctypedef void (*xmlValidityWarningFunc)(void * ctx, const char * msg, ...) noexcept
+
+ ctypedef struct xmlValidCtxt:
+ void *userData
+ xmlValidityErrorFunc error
+ xmlValidityWarningFunc warning
+
+ cdef xmlValidCtxt* xmlNewValidCtxt()
+ cdef void xmlFreeValidCtxt(xmlValidCtxt* cur)
+
+ cdef int xmlValidateDtd(xmlValidCtxt* ctxt, xmlDoc* doc, xmlDtd* dtd)
+ cdef tree.xmlElement* xmlGetDtdElementDesc(
+ xmlDtd* dtd, tree.const_xmlChar* name)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/libcharset.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/libcharset.h
new file mode 100644
index 0000000000000000000000000000000000000000..fcf22748101279e454fd2fefe01908fd8545bce2
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/libcharset.h
@@ -0,0 +1,45 @@
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+ This file is part of the GNU CHARSET Library.
+
+ The GNU CHARSET Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU CHARSET Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with the GNU CHARSET Library; see the file COPYING.LIB. If not,
+ see . */
+
+#ifndef _LIBCHARSET_H
+#define _LIBCHARSET_H
+
+#include
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Support for relocatable packages. */
+
+/* Sets the original and the current installation prefix of the package.
+ Relocation simply replaces a pathname starting with the original prefix
+ by the corresponding pathname with the current prefix instead. Both
+ prefixes should be directory names without trailing slash (i.e. use ""
+ instead of "/"). */
+extern void libcharset_set_relocation_prefix (const char *orig_prefix,
+ const char *curr_prefix);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _LIBCHARSET_H */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/localcharset.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/localcharset.h
new file mode 100644
index 0000000000000000000000000000000000000000..34ce0adde9bb793f1c1cd5f81b5cc3d2eff08ab1
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/localcharset.h
@@ -0,0 +1,137 @@
+/* Determine a canonical name for the current locale's character encoding.
+ Copyright (C) 2000-2003, 2009-2019 Free Software Foundation, Inc.
+ This file is part of the GNU CHARSET Library.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, see . */
+
+#ifndef _LOCALCHARSET_H
+#define _LOCALCHARSET_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Determine the current locale's character encoding, and canonicalize it
+ into one of the canonical names listed below.
+ The result must not be freed; it is statically allocated. The result
+ becomes invalid when setlocale() is used to change the global locale, or
+ when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
+ is changed; threads in multithreaded programs should not do this.
+ If the canonical name cannot be determined, the result is a non-canonical
+ name. */
+extern const char * locale_charset (void);
+
+/* About GNU canonical names for character encodings:
+
+ Every canonical name must be supported by GNU libiconv. Support by GNU libc
+ is also desirable.
+
+ The name is case insensitive. Usually an upper case MIME charset name is
+ preferred.
+
+ The current list of these GNU canonical names is:
+
+ name MIME? used by which systems
+ (darwin = Mac OS X, windows = native Windows)
+
+ ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin
+ ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
+ ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
+ ISO-8859-3 Y glibc solaris cygwin
+ ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin
+ ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
+ ISO-8859-6 Y glibc aix hpux solaris cygwin
+ ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
+ ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos
+ ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos
+ ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin
+ ISO-8859-14 glibc cygwin
+ ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin
+ KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin
+ KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
+ KOI8-T glibc
+ CP437 dos
+ CP775 dos
+ CP850 aix osf dos
+ CP852 dos
+ CP855 dos
+ CP856 aix
+ CP857 dos
+ CP861 dos
+ CP862 dos
+ CP864 dos
+ CP865 dos
+ CP866 freebsd netbsd openbsd darwin dos
+ CP869 dos
+ CP874 windows dos
+ CP922 aix
+ CP932 aix cygwin windows dos
+ CP943 aix zos
+ CP949 osf darwin windows dos
+ CP950 windows dos
+ CP1046 aix
+ CP1124 aix
+ CP1125 dos
+ CP1129 aix
+ CP1131 freebsd darwin
+ CP1250 windows
+ CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows
+ CP1252 aix windows
+ CP1253 windows
+ CP1254 windows
+ CP1255 glibc windows
+ CP1256 windows
+ CP1257 windows
+ GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos
+ EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
+ EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos
+ EUC-TW glibc aix hpux irix osf solaris netbsd
+ BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos
+ BIG5-HKSCS glibc hpux solaris netbsd darwin
+ GBK glibc aix osf solaris freebsd darwin cygwin windows dos
+ GB18030 glibc hpux solaris freebsd netbsd darwin
+ SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
+ JOHAB glibc solaris windows
+ TIS-620 glibc aix hpux osf solaris cygwin zos
+ VISCII Y glibc
+ TCVN5712-1 glibc
+ ARMSCII-8 glibc freebsd netbsd darwin
+ GEORGIAN-PS glibc cygwin
+ PT154 glibc netbsd cygwin
+ HP-ROMAN8 hpux
+ HP-ARABIC8 hpux
+ HP-GREEK8 hpux
+ HP-HEBREW8 hpux
+ HP-TURKISH8 hpux
+ HP-KANA8 hpux
+ DEC-KANJI osf
+ DEC-HANYU osf
+ UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos
+
+ Note: Names which are not marked as being a MIME name should not be used in
+ Internet protocols for information interchange (mail, news, etc.).
+
+ Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
+ must understand both names and treat them as equivalent.
+ */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _LOCALCHARSET_H */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/zconf.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/zconf.h
new file mode 100644
index 0000000000000000000000000000000000000000..ede3c82e3eb129528194a2045c808b418fb20296
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/zconf.h
@@ -0,0 +1,543 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
+ */
+#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
+# define Z_PREFIX_SET
+
+/* all linked symbols and init macros */
+# define _dist_code z__dist_code
+# define _length_code z__length_code
+# define _tr_align z__tr_align
+# define _tr_flush_bits z__tr_flush_bits
+# define _tr_flush_block z__tr_flush_block
+# define _tr_init z__tr_init
+# define _tr_stored_block z__tr_stored_block
+# define _tr_tally z__tr_tally
+# define adler32 z_adler32
+# define adler32_combine z_adler32_combine
+# define adler32_combine64 z_adler32_combine64
+# define adler32_z z_adler32_z
+# ifndef Z_SOLO
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# endif
+# define crc32 z_crc32
+# define crc32_combine z_crc32_combine
+# define crc32_combine64 z_crc32_combine64
+# define crc32_combine_gen z_crc32_combine_gen
+# define crc32_combine_gen64 z_crc32_combine_gen64
+# define crc32_combine_op z_crc32_combine_op
+# define crc32_z z_crc32_z
+# define deflate z_deflate
+# define deflateBound z_deflateBound
+# define deflateCopy z_deflateCopy
+# define deflateEnd z_deflateEnd
+# define deflateGetDictionary z_deflateGetDictionary
+# define deflateInit z_deflateInit
+# define deflateInit2 z_deflateInit2
+# define deflateInit2_ z_deflateInit2_
+# define deflateInit_ z_deflateInit_
+# define deflateParams z_deflateParams
+# define deflatePending z_deflatePending
+# define deflatePrime z_deflatePrime
+# define deflateReset z_deflateReset
+# define deflateResetKeep z_deflateResetKeep
+# define deflateSetDictionary z_deflateSetDictionary
+# define deflateSetHeader z_deflateSetHeader
+# define deflateTune z_deflateTune
+# define deflate_copyright z_deflate_copyright
+# define get_crc_table z_get_crc_table
+# ifndef Z_SOLO
+# define gz_error z_gz_error
+# define gz_intmax z_gz_intmax
+# define gz_strwinerror z_gz_strwinerror
+# define gzbuffer z_gzbuffer
+# define gzclearerr z_gzclearerr
+# define gzclose z_gzclose
+# define gzclose_r z_gzclose_r
+# define gzclose_w z_gzclose_w
+# define gzdirect z_gzdirect
+# define gzdopen z_gzdopen
+# define gzeof z_gzeof
+# define gzerror z_gzerror
+# define gzflush z_gzflush
+# define gzfread z_gzfread
+# define gzfwrite z_gzfwrite
+# define gzgetc z_gzgetc
+# define gzgetc_ z_gzgetc_
+# define gzgets z_gzgets
+# define gzoffset z_gzoffset
+# define gzoffset64 z_gzoffset64
+# define gzopen z_gzopen
+# define gzopen64 z_gzopen64
+# ifdef _WIN32
+# define gzopen_w z_gzopen_w
+# endif
+# define gzprintf z_gzprintf
+# define gzputc z_gzputc
+# define gzputs z_gzputs
+# define gzread z_gzread
+# define gzrewind z_gzrewind
+# define gzseek z_gzseek
+# define gzseek64 z_gzseek64
+# define gzsetparams z_gzsetparams
+# define gztell z_gztell
+# define gztell64 z_gztell64
+# define gzungetc z_gzungetc
+# define gzvprintf z_gzvprintf
+# define gzwrite z_gzwrite
+# endif
+# define inflate z_inflate
+# define inflateBack z_inflateBack
+# define inflateBackEnd z_inflateBackEnd
+# define inflateBackInit z_inflateBackInit
+# define inflateBackInit_ z_inflateBackInit_
+# define inflateCodesUsed z_inflateCodesUsed
+# define inflateCopy z_inflateCopy
+# define inflateEnd z_inflateEnd
+# define inflateGetDictionary z_inflateGetDictionary
+# define inflateGetHeader z_inflateGetHeader
+# define inflateInit z_inflateInit
+# define inflateInit2 z_inflateInit2
+# define inflateInit2_ z_inflateInit2_
+# define inflateInit_ z_inflateInit_
+# define inflateMark z_inflateMark
+# define inflatePrime z_inflatePrime
+# define inflateReset z_inflateReset
+# define inflateReset2 z_inflateReset2
+# define inflateResetKeep z_inflateResetKeep
+# define inflateSetDictionary z_inflateSetDictionary
+# define inflateSync z_inflateSync
+# define inflateSyncPoint z_inflateSyncPoint
+# define inflateUndermine z_inflateUndermine
+# define inflateValidate z_inflateValidate
+# define inflate_copyright z_inflate_copyright
+# define inflate_fast z_inflate_fast
+# define inflate_table z_inflate_table
+# ifndef Z_SOLO
+# define uncompress z_uncompress
+# define uncompress2 z_uncompress2
+# endif
+# define zError z_zError
+# ifndef Z_SOLO
+# define zcalloc z_zcalloc
+# define zcfree z_zcfree
+# endif
+# define zlibCompileFlags z_zlibCompileFlags
+# define zlibVersion z_zlibVersion
+
+/* all zlib typedefs in zlib.h and zconf.h */
+# define Byte z_Byte
+# define Bytef z_Bytef
+# define alloc_func z_alloc_func
+# define charf z_charf
+# define free_func z_free_func
+# ifndef Z_SOLO
+# define gzFile z_gzFile
+# endif
+# define gz_header z_gz_header
+# define gz_headerp z_gz_headerp
+# define in_func z_in_func
+# define intf z_intf
+# define out_func z_out_func
+# define uInt z_uInt
+# define uIntf z_uIntf
+# define uLong z_uLong
+# define uLongf z_uLongf
+# define voidp z_voidp
+# define voidpc z_voidpc
+# define voidpf z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+# define gz_header_s z_gz_header_s
+# define internal_state z_internal_state
+
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+# define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+# define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+# define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+# ifndef WIN32
+# define WIN32
+# endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+# ifndef SYS16BIT
+# define SYS16BIT
+# endif
+# endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+# define MAXSEG_64K
+#endif
+#ifdef MSDOS
+# define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+# ifndef STDC
+# define STDC
+# endif
+# if __STDC_VERSION__ >= 199901L
+# ifndef STDC99
+# define STDC99
+# endif
+# endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+# define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
+# define STDC
+#endif
+
+#ifndef STDC
+# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+# define const /* note: need a more gentle solution here */
+# endif
+#endif
+
+#if defined(ZLIB_CONST) && !defined(z_const)
+# define z_const const
+#else
+# define z_const
+#endif
+
+#ifdef Z_SOLO
+# ifdef _WIN64
+ typedef unsigned long long z_size_t;
+# else
+ typedef unsigned long z_size_t;
+# endif
+#else
+# define z_longlong long long
+# if defined(NO_SIZE_T)
+ typedef unsigned NO_SIZE_T z_size_t;
+# elif defined(STDC)
+# include
+ typedef size_t z_size_t;
+# else
+ typedef unsigned long z_size_t;
+# endif
+# undef z_longlong
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+# ifdef MAXSEG_64K
+# define MAX_MEM_LEVEL 8
+# else
+# define MAX_MEM_LEVEL 9
+# endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+# define MAX_WBITS 15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+ (1 << (windowBits+2)) + (1 << (memLevel+9))
+ that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+ make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+ The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
+ for small objects.
+*/
+
+ /* Type declarations */
+
+#ifndef OF /* function prototypes */
+# ifdef STDC
+# define OF(args) args
+# else
+# define OF(args) ()
+# endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+# if defined(M_I86SM) || defined(M_I86MM)
+ /* MSC small or medium model */
+# define SMALL_MEDIUM
+# ifdef _MSC_VER
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+# if (defined(__SMALL__) || defined(__MEDIUM__))
+ /* Turbo C small or medium model */
+# define SMALL_MEDIUM
+# ifdef __BORLANDC__
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+ /* If building or using zlib as a DLL, define ZLIB_DLL.
+ * This is not mandatory, but it offers a little performance increase.
+ */
+# ifdef ZLIB_DLL
+# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+# ifdef ZLIB_INTERNAL
+# define ZEXTERN extern __declspec(dllexport)
+# else
+# define ZEXTERN extern __declspec(dllimport)
+# endif
+# endif
+# endif /* ZLIB_DLL */
+ /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+ * define ZLIB_WINAPI.
+ * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+ */
+# ifdef ZLIB_WINAPI
+# ifdef FAR
+# undef FAR
+# endif
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+# include
+ /* No need for _export, use ZLIB.DEF instead. */
+ /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+# define ZEXPORT WINAPI
+# ifdef WIN32
+# define ZEXPORTVA WINAPIV
+# else
+# define ZEXPORTVA FAR CDECL
+# endif
+# endif
+#endif
+
+#if defined (__BEOS__)
+# ifdef ZLIB_DLL
+# ifdef ZLIB_INTERNAL
+# define ZEXPORT __declspec(dllexport)
+# define ZEXPORTVA __declspec(dllexport)
+# else
+# define ZEXPORT __declspec(dllimport)
+# define ZEXPORTVA __declspec(dllimport)
+# endif
+# endif
+#endif
+
+#ifndef ZEXTERN
+# define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+# define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+# define ZEXPORTVA
+#endif
+
+#ifndef FAR
+# define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char Byte; /* 8 bits */
+#endif
+typedef unsigned int uInt; /* 16 bits or more */
+typedef unsigned long uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+ /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+# define Bytef Byte FAR
+#else
+ typedef Byte FAR Bytef;
+#endif
+typedef char FAR charf;
+typedef int FAR intf;
+typedef uInt FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+ typedef void const *voidpc;
+ typedef void FAR *voidpf;
+ typedef void *voidp;
+#else
+ typedef Byte const *voidpc;
+ typedef Byte FAR *voidpf;
+ typedef Byte *voidp;
+#endif
+
+#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
+# include
+# if (UINT_MAX == 0xffffffffUL)
+# define Z_U4 unsigned
+# elif (ULONG_MAX == 0xffffffffUL)
+# define Z_U4 unsigned long
+# elif (USHRT_MAX == 0xffffffffUL)
+# define Z_U4 unsigned short
+# endif
+#endif
+
+#ifdef Z_U4
+ typedef Z_U4 z_crc_t;
+#else
+ typedef unsigned long z_crc_t;
+#endif
+
+#if 1 /* was set to #if 1 by ./configure */
+# define Z_HAVE_UNISTD_H
+#endif
+
+#if 1 /* was set to #if 1 by ./configure */
+# define Z_HAVE_STDARG_H
+#endif
+
+#ifdef STDC
+# ifndef Z_SOLO
+# include /* for off_t */
+# endif
+#endif
+
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# ifndef Z_SOLO
+# include /* for va_list */
+# endif
+#endif
+
+#ifdef _WIN32
+# ifndef Z_SOLO
+# include /* for wchar_t */
+# endif
+#endif
+
+/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
+ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
+ * though the former does not conform to the LFS document), but considering
+ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
+ * equivalently requesting no 64-bit operations
+ */
+#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
+# undef _LARGEFILE64_SOURCE
+#endif
+
+#ifndef Z_HAVE_UNISTD_H
+# ifdef __WATCOMC__
+# define Z_HAVE_UNISTD_H
+# endif
+#endif
+#ifndef Z_HAVE_UNISTD_H
+# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)
+# define Z_HAVE_UNISTD_H
+# endif
+#endif
+#ifndef Z_SOLO
+# if defined(Z_HAVE_UNISTD_H)
+# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
+# ifdef VMS
+# include /* for off_t */
+# endif
+# ifndef z_off_t
+# define z_off_t off_t
+# endif
+# endif
+#endif
+
+#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
+# define Z_LFS64
+#endif
+
+#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
+# define Z_LARGE64
+#endif
+
+#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
+# define Z_WANT64
+#endif
+
+#if !defined(SEEK_SET) && !defined(Z_SOLO)
+# define SEEK_SET 0 /* Seek from beginning of file. */
+# define SEEK_CUR 1 /* Seek from current position. */
+# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
+#endif
+
+#ifndef z_off_t
+# define z_off_t long
+#endif
+
+#if !defined(_WIN32) && defined(Z_LARGE64)
+# define z_off64_t off64_t
+#else
+# if defined(_WIN32) && !defined(__GNUC__)
+# define z_off64_t __int64
+# else
+# define z_off64_t z_off_t
+# endif
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+ #pragma map(deflateInit_,"DEIN")
+ #pragma map(deflateInit2_,"DEIN2")
+ #pragma map(deflateEnd,"DEEND")
+ #pragma map(deflateBound,"DEBND")
+ #pragma map(inflateInit_,"ININ")
+ #pragma map(inflateInit2_,"ININ2")
+ #pragma map(inflateEnd,"INEND")
+ #pragma map(inflateSync,"INSY")
+ #pragma map(inflateSetDictionary,"INSEDI")
+ #pragma map(compressBound,"CMBND")
+ #pragma map(inflate_table,"INTABL")
+ #pragma map(inflate_fast,"INFA")
+ #pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/zlib.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/zlib.h
new file mode 100644
index 0000000000000000000000000000000000000000..8d4b932eaf6a0fbb8133b3ab49ba5ef587059fa0
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/zlib.h
@@ -0,0 +1,1938 @@
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+ version 1.3.1, January 22nd, 2024
+
+ Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jean-loup Gailly Mark Adler
+ jloup@gzip.org madler@alumni.caltech.edu
+
+
+ The data format used by the zlib library is described by RFCs (Request for
+ Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
+ (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
+*/
+
+#ifndef ZLIB_H
+#define ZLIB_H
+
+#include "zconf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ZLIB_VERSION "1.3.1"
+#define ZLIB_VERNUM 0x1310
+#define ZLIB_VER_MAJOR 1
+#define ZLIB_VER_MINOR 3
+#define ZLIB_VER_REVISION 1
+#define ZLIB_VER_SUBREVISION 0
+
+/*
+ The 'zlib' compression library provides in-memory compression and
+ decompression functions, including integrity checks of the uncompressed data.
+ This version of the library supports only one compression method (deflation)
+ but other algorithms will be added later and will have the same stream
+ interface.
+
+ Compression can be done in a single step if the buffers are large enough,
+ or can be done by repeated calls of the compression function. In the latter
+ case, the application must provide more input and/or consume the output
+ (providing more output space) before each call.
+
+ The compressed data format used by default by the in-memory functions is
+ the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
+ around a deflate stream, which is itself documented in RFC 1951.
+
+ The library also supports reading and writing files in gzip (.gz) format
+ with an interface similar to that of stdio using the functions that start
+ with "gz". The gzip format is different from the zlib format. gzip is a
+ gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
+
+ This library can optionally read and write gzip and raw deflate streams in
+ memory as well.
+
+ The zlib format was designed to be compact and fast for use in memory
+ and on communications channels. The gzip format was designed for single-
+ file compression on file systems, has a larger header than zlib to maintain
+ directory information, and uses a different, slower check method than zlib.
+
+ The library does not install any signal handler. The decoder checks
+ the consistency of the compressed data, so the library should never crash
+ even in the case of corrupted input.
+*/
+
+typedef voidpf (*alloc_func)(voidpf opaque, uInt items, uInt size);
+typedef void (*free_func)(voidpf opaque, voidpf address);
+
+struct internal_state;
+
+typedef struct z_stream_s {
+ z_const Bytef *next_in; /* next input byte */
+ uInt avail_in; /* number of bytes available at next_in */
+ uLong total_in; /* total number of input bytes read so far */
+
+ Bytef *next_out; /* next output byte will go here */
+ uInt avail_out; /* remaining free space at next_out */
+ uLong total_out; /* total number of bytes output so far */
+
+ z_const char *msg; /* last error message, NULL if no error */
+ struct internal_state FAR *state; /* not visible by applications */
+
+ alloc_func zalloc; /* used to allocate the internal state */
+ free_func zfree; /* used to free the internal state */
+ voidpf opaque; /* private data object passed to zalloc and zfree */
+
+ int data_type; /* best guess about the data type: binary or text
+ for deflate, or the decoding state for inflate */
+ uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */
+ uLong reserved; /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+ gzip header information passed to and from zlib routines. See RFC 1952
+ for more details on the meanings of these fields.
+*/
+typedef struct gz_header_s {
+ int text; /* true if compressed data believed to be text */
+ uLong time; /* modification time */
+ int xflags; /* extra flags (not used when writing a gzip file) */
+ int os; /* operating system */
+ Bytef *extra; /* pointer to extra field or Z_NULL if none */
+ uInt extra_len; /* extra field length (valid if extra != Z_NULL) */
+ uInt extra_max; /* space at extra (only when reading header) */
+ Bytef *name; /* pointer to zero-terminated file name or Z_NULL */
+ uInt name_max; /* space at name (only when reading header) */
+ Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */
+ uInt comm_max; /* space at comment (only when reading header) */
+ int hcrc; /* true if there was or will be a header crc */
+ int done; /* true when done reading gzip header (not used
+ when writing a gzip file) */
+} gz_header;
+
+typedef gz_header FAR *gz_headerp;
+
+/*
+ The application must update next_in and avail_in when avail_in has dropped
+ to zero. It must update next_out and avail_out when avail_out has dropped
+ to zero. The application must initialize zalloc, zfree and opaque before
+ calling the init function. All other fields are set by the compression
+ library and must not be updated by the application.
+
+ The opaque value provided by the application will be passed as the first
+ parameter for calls of zalloc and zfree. This can be useful for custom
+ memory management. The compression library attaches no meaning to the
+ opaque value.
+
+ zalloc must return Z_NULL if there is not enough memory for the object.
+ If zlib is used in a multi-threaded application, zalloc and zfree must be
+ thread safe. In that case, zlib is thread-safe. When zalloc and zfree are
+ Z_NULL on entry to the initialization function, they are set to internal
+ routines that use the standard library functions malloc() and free().
+
+ On 16-bit systems, the functions zalloc and zfree must be able to allocate
+ exactly 65536 bytes, but will not be required to allocate more than this if
+ the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers
+ returned by zalloc for objects of exactly 65536 bytes *must* have their
+ offset normalized to zero. The default allocation function provided by this
+ library ensures this (see zutil.c). To reduce memory requirements and avoid
+ any allocation of 64K objects, at the expense of compression ratio, compile
+ the library with -DMAX_WBITS=14 (see zconf.h).
+
+ The fields total_in and total_out can be used for statistics or progress
+ reports. After compression, total_in holds the total size of the
+ uncompressed data and may be saved for use by the decompressor (particularly
+ if the decompressor wants to decompress everything in a single step).
+*/
+
+ /* constants */
+
+#define Z_NO_FLUSH 0
+#define Z_PARTIAL_FLUSH 1
+#define Z_SYNC_FLUSH 2
+#define Z_FULL_FLUSH 3
+#define Z_FINISH 4
+#define Z_BLOCK 5
+#define Z_TREES 6
+/* Allowed flush values; see deflate() and inflate() below for details */
+
+#define Z_OK 0
+#define Z_STREAM_END 1
+#define Z_NEED_DICT 2
+#define Z_ERRNO (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR (-3)
+#define Z_MEM_ERROR (-4)
+#define Z_BUF_ERROR (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION 0
+#define Z_BEST_SPEED 1
+#define Z_BEST_COMPRESSION 9
+#define Z_DEFAULT_COMPRESSION (-1)
+/* compression levels */
+
+#define Z_FILTERED 1
+#define Z_HUFFMAN_ONLY 2
+#define Z_RLE 3
+#define Z_FIXED 4
+#define Z_DEFAULT_STRATEGY 0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY 0
+#define Z_TEXT 1
+#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
+#define Z_UNKNOWN 2
+/* Possible values of the data_type field for deflate() */
+
+#define Z_DEFLATED 8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
+
+#define zlib_version zlibVersion()
+/* for compatibility with versions < 1.0.2 */
+
+
+ /* basic functions */
+
+ZEXTERN const char * ZEXPORT zlibVersion(void);
+/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
+ If the first character differs, the library code actually used is not
+ compatible with the zlib.h header file used by the application. This check
+ is automatically made by deflateInit and inflateInit.
+ */
+
+/*
+ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level);
+
+ Initializes the internal stream state for compression. The fields
+ zalloc, zfree and opaque must be initialized before by the caller. If
+ zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
+ allocation functions. total_in, total_out, adler, and msg are initialized.
+
+ The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
+ 1 gives best speed, 9 gives best compression, 0 gives no compression at all
+ (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION
+ requests a default compromise between speed and compression (currently
+ equivalent to level 6).
+
+ deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if level is not a valid compression level, or
+ Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
+ with the version assumed by the caller (ZLIB_VERSION). msg is set to null
+ if there is no error message. deflateInit does not perform any compression:
+ this will be done by deflate().
+*/
+
+
+ZEXTERN int ZEXPORT deflate(z_streamp strm, int flush);
+/*
+ deflate compresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce
+ some output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. deflate performs one or both of the
+ following actions:
+
+ - Compress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in and avail_in are updated and
+ processing will resume at this point for the next call of deflate().
+
+ - Generate more output starting at next_out and update next_out and avail_out
+ accordingly. This action is forced if the parameter flush is non zero.
+ Forcing flush frequently degrades the compression ratio, so this parameter
+ should be set only when necessary. Some output may be provided even if
+ flush is zero.
+
+ Before the call of deflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming more
+ output, and updating avail_in or avail_out accordingly; avail_out should
+ never be zero before the call. The application can consume the compressed
+ output when it wants, for example when the output buffer is full (avail_out
+ == 0), or after each call of deflate(). If deflate returns Z_OK and with
+ zero avail_out, it must be called again after making room in the output
+ buffer because there might be more output pending. See deflatePending(),
+ which can be used if desired to determine whether or not there is more output
+ in that case.
+
+ Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
+ decide how much data to accumulate before producing output, in order to
+ maximize compression.
+
+ If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
+ flushed to the output buffer and the output is aligned on a byte boundary, so
+ that the decompressor can get all input data available so far. (In
+ particular avail_in is zero after the call if enough output space has been
+ provided before the call.) Flushing may degrade compression for some
+ compression algorithms and so it should be used only when necessary. This
+ completes the current deflate block and follows it with an empty stored block
+ that is three bits plus filler bits to the next byte, followed by four bytes
+ (00 00 ff ff).
+
+ If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
+ output buffer, but the output is not aligned to a byte boundary. All of the
+ input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
+ This completes the current deflate block and follows it with an empty fixed
+ codes block that is 10 bits long. This assures that enough bytes are output
+ in order for the decompressor to finish the block before the empty fixed
+ codes block.
+
+ If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
+ for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
+ seven bits of the current block are held to be written as the next byte after
+ the next deflate block is completed. In this case, the decompressor may not
+ be provided enough bits at this point in order to complete decompression of
+ the data provided so far to the compressor. It may need to wait for the next
+ block to be emitted. This is for advanced applications that need to control
+ the emission of deflate blocks.
+
+ If flush is set to Z_FULL_FLUSH, all output is flushed as with
+ Z_SYNC_FLUSH, and the compression state is reset so that decompression can
+ restart from this point if previous compressed data has been damaged or if
+ random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
+ compression.
+
+ If deflate returns with avail_out == 0, this function must be called again
+ with the same value of the flush parameter and more output space (updated
+ avail_out), until the flush is complete (deflate returns with non-zero
+ avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+ avail_out is greater than six when the flush marker begins, in order to avoid
+ repeated flush markers upon calling deflate() again when avail_out == 0.
+
+ If the parameter flush is set to Z_FINISH, pending input is processed,
+ pending output is flushed and deflate returns with Z_STREAM_END if there was
+ enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this
+ function must be called again with Z_FINISH and more output space (updated
+ avail_out) but no more input data, until it returns with Z_STREAM_END or an
+ error. After deflate has returned Z_STREAM_END, the only possible operations
+ on the stream are deflateReset or deflateEnd.
+
+ Z_FINISH can be used in the first deflate call after deflateInit if all the
+ compression is to be done in a single step. In order to complete in one
+ call, avail_out must be at least the value returned by deflateBound (see
+ below). Then deflate is guaranteed to return Z_STREAM_END. If not enough
+ output space is provided, deflate will not return Z_STREAM_END, and it must
+ be called again as described above.
+
+ deflate() sets strm->adler to the Adler-32 checksum of all input read
+ so far (that is, total_in bytes). If a gzip stream is being generated, then
+ strm->adler will be the CRC-32 checksum of the input read so far. (See
+ deflateInit2 below.)
+
+ deflate() may update strm->data_type if it can make a good guess about
+ the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is
+ considered binary. This field is only for information purposes and does not
+ affect the compression algorithm in any manner.
+
+ deflate() returns Z_OK if some progress has been made (more input
+ processed or more output produced), Z_STREAM_END if all input has been
+ consumed and all output has been produced (only when flush is set to
+ Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
+ if next_in or next_out was Z_NULL or the state was inadvertently written over
+ by the application), or Z_BUF_ERROR if no progress is possible (for example
+ avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and
+ deflate() can be called again with more input and more output space to
+ continue compressing.
+*/
+
+
+ZEXTERN int ZEXPORT deflateEnd(z_streamp strm);
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any pending
+ output.
+
+ deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
+ stream state was inconsistent, Z_DATA_ERROR if the stream was freed
+ prematurely (some input or output was discarded). In the error case, msg
+ may be set but then points to a static string (which must not be
+ deallocated).
+*/
+
+
+/*
+ZEXTERN int ZEXPORT inflateInit(z_streamp strm);
+
+ Initializes the internal stream state for decompression. The fields
+ next_in, avail_in, zalloc, zfree and opaque must be initialized before by
+ the caller. In the current version of inflate, the provided input is not
+ read or consumed. The allocation of a sliding window will be deferred to
+ the first call of inflate (if the decompression does not complete on the
+ first call). If zalloc and zfree are set to Z_NULL, inflateInit updates
+ them to use default allocation functions. total_in, total_out, adler, and
+ msg are initialized.
+
+ inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+ version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+ invalid, such as a null pointer to the structure. msg is set to null if
+ there is no error message. inflateInit does not perform any decompression.
+ Actual decompression will be done by inflate(). So next_in, and avail_in,
+ next_out, and avail_out are unused and unchanged. The current
+ implementation of inflateInit() does not process any header information --
+ that is deferred until inflate() is called.
+*/
+
+
+ZEXTERN int ZEXPORT inflate(z_streamp strm, int flush);
+/*
+ inflate decompresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce
+ some output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. inflate performs one or both of the
+ following actions:
+
+ - Decompress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), then next_in and avail_in are updated
+ accordingly, and processing will resume at this point for the next call of
+ inflate().
+
+ - Generate more output starting at next_out and update next_out and avail_out
+ accordingly. inflate() provides as much output as possible, until there is
+ no more input data or no more space in the output buffer (see below about
+ the flush parameter).
+
+ Before the call of inflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming more
+ output, and updating the next_* and avail_* values accordingly. If the
+ caller of inflate() does not provide both available input and available
+ output space, it is possible that there will be no progress made. The
+ application can consume the uncompressed output when it wants, for example
+ when the output buffer is full (avail_out == 0), or after each call of
+ inflate(). If inflate returns Z_OK and with zero avail_out, it must be
+ called again after making room in the output buffer because there might be
+ more output pending.
+
+ The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
+ Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much
+ output as possible to the output buffer. Z_BLOCK requests that inflate()
+ stop if and when it gets to the next deflate block boundary. When decoding
+ the zlib or gzip format, this will cause inflate() to return immediately
+ after the header and before the first block. When doing a raw inflate,
+ inflate() will go ahead and process the first block, and will return when it
+ gets to the end of that block, or when it runs out of data.
+
+ The Z_BLOCK option assists in appending to or combining deflate streams.
+ To assist in this, on return inflate() always sets strm->data_type to the
+ number of unused bits in the last byte taken from strm->next_in, plus 64 if
+ inflate() is currently decoding the last block in the deflate stream, plus
+ 128 if inflate() returned immediately after decoding an end-of-block code or
+ decoding the complete header up to just before the first byte of the deflate
+ stream. The end-of-block will not be indicated until all of the uncompressed
+ data from that block has been written to strm->next_out. The number of
+ unused bits may in general be greater than seven, except when bit 7 of
+ data_type is set, in which case the number of unused bits will be less than
+ eight. data_type is set as noted here every time inflate() returns for all
+ flush options, and so can be used to determine the amount of currently
+ consumed input in bits.
+
+ The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
+ end of each deflate block header is reached, before any actual data in that
+ block is decoded. This allows the caller to determine the length of the
+ deflate block header for later use in random access within a deflate block.
+ 256 is added to the value of strm->data_type when inflate() returns
+ immediately after reaching the end of the deflate block header.
+
+ inflate() should normally be called until it returns Z_STREAM_END or an
+ error. However if all decompression is to be performed in a single step (a
+ single call of inflate), the parameter flush should be set to Z_FINISH. In
+ this case all pending input is processed and all pending output is flushed;
+ avail_out must be large enough to hold all of the uncompressed data for the
+ operation to complete. (The size of the uncompressed data may have been
+ saved by the compressor for this purpose.) The use of Z_FINISH is not
+ required to perform an inflation in one step. However it may be used to
+ inform inflate that a faster approach can be used for the single inflate()
+ call. Z_FINISH also informs inflate to not maintain a sliding window if the
+ stream completes, which reduces inflate's memory footprint. If the stream
+ does not complete, either because not all of the stream is provided or not
+ enough output space is provided, then a sliding window will be allocated and
+ inflate() can be called again to continue the operation as if Z_NO_FLUSH had
+ been used.
+
+ In this implementation, inflate() always flushes as much output as
+ possible to the output buffer, and always uses the faster approach on the
+ first call. So the effects of the flush parameter in this implementation are
+ on the return value of inflate() as noted below, when inflate() returns early
+ when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of
+ memory for a sliding window when Z_FINISH is used.
+
+ If a preset dictionary is needed after this call (see inflateSetDictionary
+ below), inflate sets strm->adler to the Adler-32 checksum of the dictionary
+ chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
+ strm->adler to the Adler-32 checksum of all output produced so far (that is,
+ total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
+ below. At the end of the stream, inflate() checks that its computed Adler-32
+ checksum is equal to that saved by the compressor and returns Z_STREAM_END
+ only if the checksum is correct.
+
+ inflate() can decompress and check either zlib-wrapped or gzip-wrapped
+ deflate data. The header type is detected automatically, if requested when
+ initializing with inflateInit2(). Any information contained in the gzip
+ header is not retained unless inflateGetHeader() is used. When processing
+ gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
+ produced so far. The CRC-32 is checked against the gzip trailer, as is the
+ uncompressed length, modulo 2^32.
+
+ inflate() returns Z_OK if some progress has been made (more input processed
+ or more output produced), Z_STREAM_END if the end of the compressed data has
+ been reached and all uncompressed output has been produced, Z_NEED_DICT if a
+ preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
+ corrupted (input stream not conforming to the zlib format or incorrect check
+ value, in which case strm->msg points to a string with a more specific
+ error), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+ next_in or next_out was Z_NULL, or the state was inadvertently written over
+ by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR
+ if no progress was possible or if there was not enough room in the output
+ buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
+ inflate() can be called again with more input and more output space to
+ continue decompressing. If Z_DATA_ERROR is returned, the application may
+ then call inflateSync() to look for a good compression block if a partial
+ recovery of the data is to be attempted.
+*/
+
+
+ZEXTERN int ZEXPORT inflateEnd(z_streamp strm);
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any pending
+ output.
+
+ inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state
+ was inconsistent.
+*/
+
+
+ /* Advanced functions */
+
+/*
+ The following functions are needed only in some special applications.
+*/
+
+/*
+ZEXTERN int ZEXPORT deflateInit2(z_streamp strm,
+ int level,
+ int method,
+ int windowBits,
+ int memLevel,
+ int strategy);
+
+ This is another version of deflateInit with more compression options. The
+ fields zalloc, zfree and opaque must be initialized before by the caller.
+
+ The method parameter is the compression method. It must be Z_DEFLATED in
+ this version of the library.
+
+ The windowBits parameter is the base two logarithm of the window size
+ (the size of the history buffer). It should be in the range 8..15 for this
+ version of the library. Larger values of this parameter result in better
+ compression at the expense of memory usage. The default value is 15 if
+ deflateInit is used instead.
+
+ For the current implementation of deflate(), a windowBits value of 8 (a
+ window size of 256 bytes) is not supported. As a result, a request for 8
+ will result in 9 (a 512-byte window). In that case, providing 8 to
+ inflateInit2() will result in an error when the zlib header with 9 is
+ checked against the initialization of inflate(). The remedy is to not use 8
+ with deflateInit2() with this initialization, or at least in that case use 9
+ with inflateInit2().
+
+ windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
+ determines the window size. deflate() will then generate raw deflate data
+ with no zlib header or trailer, and will not compute a check value.
+
+ windowBits can also be greater than 15 for optional gzip encoding. Add
+ 16 to windowBits to write a simple gzip header and trailer around the
+ compressed data instead of a zlib wrapper. The gzip header will have no
+ file name, no extra data, no comment, no modification time (set to zero), no
+ header crc, and the operating system will be set to the appropriate value,
+ if the operating system was determined at compile time. If a gzip stream is
+ being written, strm->adler is a CRC-32 instead of an Adler-32.
+
+ For raw deflate or gzip encoding, a request for a 256-byte window is
+ rejected as invalid, since only the zlib header provides a means of
+ transmitting the window size to the decompressor.
+
+ The memLevel parameter specifies how much memory should be allocated
+ for the internal compression state. memLevel=1 uses minimum memory but is
+ slow and reduces compression ratio; memLevel=9 uses maximum memory for
+ optimal speed. The default value is 8. See zconf.h for total memory usage
+ as a function of windowBits and memLevel.
+
+ The strategy parameter is used to tune the compression algorithm. Use the
+ value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
+ filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
+ string match), or Z_RLE to limit match distances to one (run-length
+ encoding). Filtered data consists mostly of small values with a somewhat
+ random distribution. In this case, the compression algorithm is tuned to
+ compress them better. The effect of Z_FILTERED is to force more Huffman
+ coding and less string matching; it is somewhat intermediate between
+ Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as
+ fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The
+ strategy parameter only affects the compression ratio but not the
+ correctness of the compressed output even if it is not set appropriately.
+ Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
+ decoder for special applications.
+
+ deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
+ method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
+ incompatible with the version assumed by the caller (ZLIB_VERSION). msg is
+ set to null if there is no error message. deflateInit2 does not perform any
+ compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateSetDictionary(z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength);
+/*
+ Initializes the compression dictionary from the given byte sequence
+ without producing any compressed output. When using the zlib format, this
+ function must be called immediately after deflateInit, deflateInit2 or
+ deflateReset, and before any call of deflate. When doing raw deflate, this
+ function must be called either before any call of deflate, or immediately
+ after the completion of a deflate block, i.e. after all input has been
+ consumed and all output has been delivered when using any of the flush
+ options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The
+ compressor and decompressor must use exactly the same dictionary (see
+ inflateSetDictionary).
+
+ The dictionary should consist of strings (byte sequences) that are likely
+ to be encountered later in the data to be compressed, with the most commonly
+ used strings preferably put towards the end of the dictionary. Using a
+ dictionary is most useful when the data to be compressed is short and can be
+ predicted with good accuracy; the data can then be compressed better than
+ with the default empty dictionary.
+
+ Depending on the size of the compression data structures selected by
+ deflateInit or deflateInit2, a part of the dictionary may in effect be
+ discarded, for example if the dictionary is larger than the window size
+ provided in deflateInit or deflateInit2. Thus the strings most likely to be
+ useful should be put at the end of the dictionary, not at the front. In
+ addition, the current implementation of deflate will use at most the window
+ size minus 262 bytes of the provided dictionary.
+
+ Upon return of this function, strm->adler is set to the Adler-32 value
+ of the dictionary; the decompressor may later use this value to determine
+ which dictionary has been used by the compressor. (The Adler-32 value
+ applies to the whole dictionary even if only a subset of the dictionary is
+ actually used by the compressor.) If a raw deflate was requested, then the
+ Adler-32 value is not computed and strm->adler is not set.
+
+ deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
+ parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
+ inconsistent (for example if deflate has already been called for this stream
+ or if not at a block boundary for raw deflate). deflateSetDictionary does
+ not perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateGetDictionary(z_streamp strm,
+ Bytef *dictionary,
+ uInt *dictLength);
+/*
+ Returns the sliding dictionary being maintained by deflate. dictLength is
+ set to the number of bytes in the dictionary, and that many bytes are copied
+ to dictionary. dictionary must have enough space, where 32768 bytes is
+ always enough. If deflateGetDictionary() is called with dictionary equal to
+ Z_NULL, then only the dictionary length is returned, and nothing is copied.
+ Similarly, if dictLength is Z_NULL, then it is not set.
+
+ deflateGetDictionary() may return a length less than the window size, even
+ when more than the window size in input has been provided. It may return up
+ to 258 bytes less in that case, due to how zlib's implementation of deflate
+ manages the sliding window and lookahead for matches, where matches can be
+ up to 258 bytes long. If the application needs the last window-size bytes of
+ input, then that would need to be saved by the application outside of zlib.
+
+ deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
+ stream state is inconsistent.
+*/
+
+ZEXTERN int ZEXPORT deflateCopy(z_streamp dest,
+ z_streamp source);
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when several compression strategies will be
+ tried, for example when there are several ways of pre-processing the input
+ data with a filter. The streams that will be discarded should then be freed
+ by calling deflateEnd. Note that deflateCopy duplicates the internal
+ compression state which can be quite large, so this strategy is slow and can
+ consume lots of memory.
+
+ deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being Z_NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT deflateReset(z_streamp strm);
+/*
+ This function is equivalent to deflateEnd followed by deflateInit, but
+ does not free and reallocate the internal compression state. The stream
+ will leave the compression level and any other attributes that may have been
+ set unchanged. total_in, total_out, adler, and msg are initialized.
+
+ deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT deflateParams(z_streamp strm,
+ int level,
+ int strategy);
+/*
+ Dynamically update the compression level and compression strategy. The
+ interpretation of level and strategy is as in deflateInit2(). This can be
+ used to switch between compression and straight copy of the input data, or
+ to switch to a different kind of input data requiring a different strategy.
+ If the compression approach (which is a function of the level) or the
+ strategy is changed, and if there have been any deflate() calls since the
+ state was initialized or reset, then the input available so far is
+ compressed with the old level and strategy using deflate(strm, Z_BLOCK).
+ There are three approaches for the compression levels 0, 1..3, and 4..9
+ respectively. The new level and strategy will take effect at the next call
+ of deflate().
+
+ If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
+ not have enough output space to complete, then the parameter change will not
+ take effect. In this case, deflateParams() can be called again with the
+ same parameters and more output space to try again.
+
+ In order to assure a change in the parameters on the first try, the
+ deflate stream should be flushed using deflate() with Z_BLOCK or other flush
+ request until strm.avail_out is not zero, before calling deflateParams().
+ Then no more input data should be provided before the deflateParams() call.
+ If this is done, the old level and strategy will be applied to the data
+ compressed before deflateParams(), and the new level and strategy will be
+ applied to the data compressed after deflateParams().
+
+ deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
+ state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
+ there was not enough output space to complete the compression of the
+ available input data before a change in the strategy or approach. Note that
+ in the case of a Z_BUF_ERROR, the parameters are not changed. A return
+ value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be
+ retried with more output space.
+*/
+
+ZEXTERN int ZEXPORT deflateTune(z_streamp strm,
+ int good_length,
+ int max_lazy,
+ int nice_length,
+ int max_chain);
+/*
+ Fine tune deflate's internal compression parameters. This should only be
+ used by someone who understands the algorithm used by zlib's deflate for
+ searching for the best matching string, and even then only by the most
+ fanatic optimizer trying to squeeze out the last compressed bit for their
+ specific input data. Read the deflate.c source code for the meaning of the
+ max_lazy, good_length, nice_length, and max_chain parameters.
+
+ deflateTune() can be called after deflateInit() or deflateInit2(), and
+ returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
+ */
+
+ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm,
+ uLong sourceLen);
+/*
+ deflateBound() returns an upper bound on the compressed size after
+ deflation of sourceLen bytes. It must be called after deflateInit() or
+ deflateInit2(), and after deflateSetHeader(), if used. This would be used
+ to allocate an output buffer for deflation in a single pass, and so would be
+ called before deflate(). If that first deflate() call is provided the
+ sourceLen input bytes, an output buffer allocated to the size returned by
+ deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed
+ to return Z_STREAM_END. Note that it is possible for the compressed size to
+ be larger than the value returned by deflateBound() if flush options other
+ than Z_FINISH or Z_NO_FLUSH are used.
+*/
+
+ZEXTERN int ZEXPORT deflatePending(z_streamp strm,
+ unsigned *pending,
+ int *bits);
+/*
+ deflatePending() returns the number of bytes and bits of output that have
+ been generated, but not yet provided in the available output. The bytes not
+ provided would be due to the available output space having being consumed.
+ The number of bits of output not provided are between 0 and 7, where they
+ await more bits to join them in order to fill out a full byte. If pending
+ or bits are Z_NULL, then those values are not set.
+
+ deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+ */
+
+ZEXTERN int ZEXPORT deflatePrime(z_streamp strm,
+ int bits,
+ int value);
+/*
+ deflatePrime() inserts bits in the deflate output stream. The intent
+ is that this function is used to start off the deflate output with the bits
+ leftover from a previous deflate stream when appending to it. As such, this
+ function can only be used for raw deflate, and must be used before the first
+ deflate() call after a deflateInit2() or deflateReset(). bits must be less
+ than or equal to 16, and that many of the least significant bits of value
+ will be inserted in the output.
+
+ deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
+ room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
+ source stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm,
+ gz_headerp head);
+/*
+ deflateSetHeader() provides gzip header information for when a gzip
+ stream is requested by deflateInit2(). deflateSetHeader() may be called
+ after deflateInit2() or deflateReset() and before the first call of
+ deflate(). The text, time, os, extra field, name, and comment information
+ in the provided gz_header structure are written to the gzip header (xflag is
+ ignored -- the extra flags are set according to the compression level). The
+ caller must assure that, if not Z_NULL, name and comment are terminated with
+ a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
+ available there. If hcrc is true, a gzip header crc is included. Note that
+ the current versions of the command-line version of gzip (up through version
+ 1.3.x) do not support header crc's, and will report that it is a "multi-part
+ gzip file" and give up.
+
+ If deflateSetHeader is not used, the default gzip header has text false,
+ the time set to zero, and os set to the current operating system, with no
+ extra, name, or comment fields. The gzip header is returned to the default
+ state by deflateReset().
+
+ deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateInit2(z_streamp strm,
+ int windowBits);
+
+ This is another version of inflateInit with an extra parameter. The
+ fields next_in, avail_in, zalloc, zfree and opaque must be initialized
+ before by the caller.
+
+ The windowBits parameter is the base two logarithm of the maximum window
+ size (the size of the history buffer). It should be in the range 8..15 for
+ this version of the library. The default value is 15 if inflateInit is used
+ instead. windowBits must be greater than or equal to the windowBits value
+ provided to deflateInit2() while compressing, or it must be equal to 15 if
+ deflateInit2() was not used. If a compressed stream with a larger window
+ size is given as input, inflate() will return with the error code
+ Z_DATA_ERROR instead of trying to allocate a larger window.
+
+ windowBits can also be zero to request that inflate use the window size in
+ the zlib header of the compressed stream.
+
+ windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
+ determines the window size. inflate() will then process raw deflate data,
+ not looking for a zlib or gzip header, not generating a check value, and not
+ looking for any check values for comparison at the end of the stream. This
+ is for use with other formats that use the deflate compressed data format
+ such as zip. Those formats provide their own check values. If a custom
+ format is developed using the raw deflate format for compressed data, it is
+ recommended that a check value such as an Adler-32 or a CRC-32 be applied to
+ the uncompressed data as is done in the zlib, gzip, and zip formats. For
+ most applications, the zlib format should be used as is. Note that comments
+ above on the use in deflateInit2() applies to the magnitude of windowBits.
+
+ windowBits can also be greater than 15 for optional gzip decoding. Add
+ 32 to windowBits to enable zlib and gzip decoding with automatic header
+ detection, or add 16 to decode only the gzip format (the zlib format will
+ return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a
+ CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see
+ below), inflate() will *not* automatically decode concatenated gzip members.
+ inflate() will return Z_STREAM_END at the end of the gzip member. The state
+ would need to be reset to continue decoding a subsequent gzip member. This
+ *must* be done if there is more data after a gzip member, in order for the
+ decompression to be compliant with the gzip standard (RFC 1952).
+
+ inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+ version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+ invalid, such as a null pointer to the structure. msg is set to null if
+ there is no error message. inflateInit2 does not perform any decompression
+ apart from possibly reading the zlib header if present: actual decompression
+ will be done by inflate(). (So next_in and avail_in may be modified, but
+ next_out and avail_out are unused and unchanged.) The current implementation
+ of inflateInit2() does not process any header information -- that is
+ deferred until inflate() is called.
+*/
+
+ZEXTERN int ZEXPORT inflateSetDictionary(z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength);
+/*
+ Initializes the decompression dictionary from the given uncompressed byte
+ sequence. This function must be called immediately after a call of inflate,
+ if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
+ can be determined from the Adler-32 value returned by that call of inflate.
+ The compressor and decompressor must use exactly the same dictionary (see
+ deflateSetDictionary). For raw inflate, this function can be called at any
+ time to set the dictionary. If the provided dictionary is smaller than the
+ window and there is already data in the window, then the provided dictionary
+ will amend what's there. The application must insure that the dictionary
+ that was used for compression is provided.
+
+ inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
+ parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
+ inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
+ expected one (incorrect Adler-32 value). inflateSetDictionary does not
+ perform any decompression: this will be done by subsequent calls of
+ inflate().
+*/
+
+ZEXTERN int ZEXPORT inflateGetDictionary(z_streamp strm,
+ Bytef *dictionary,
+ uInt *dictLength);
+/*
+ Returns the sliding dictionary being maintained by inflate. dictLength is
+ set to the number of bytes in the dictionary, and that many bytes are copied
+ to dictionary. dictionary must have enough space, where 32768 bytes is
+ always enough. If inflateGetDictionary() is called with dictionary equal to
+ Z_NULL, then only the dictionary length is returned, and nothing is copied.
+ Similarly, if dictLength is Z_NULL, then it is not set.
+
+ inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
+ stream state is inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateSync(z_streamp strm);
+/*
+ Skips invalid compressed data until a possible full flush point (see above
+ for the description of deflate with Z_FULL_FLUSH) can be found, or until all
+ available input is skipped. No output is provided.
+
+ inflateSync searches for a 00 00 FF FF pattern in the compressed data.
+ All full flush points have this pattern, but not all occurrences of this
+ pattern are full flush points.
+
+ inflateSync returns Z_OK if a possible full flush point has been found,
+ Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
+ has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
+ In the success case, the application may save the current value of total_in
+ which indicates where valid compressed data was found. In the error case,
+ the application may repeatedly call inflateSync, providing more input each
+ time, until success or end of the input data.
+*/
+
+ZEXTERN int ZEXPORT inflateCopy(z_streamp dest,
+ z_streamp source);
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when randomly accessing a large stream. The
+ first pass through the stream can periodically record the inflate state,
+ allowing restarting inflate at those points when randomly accessing the
+ stream.
+
+ inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being Z_NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT inflateReset(z_streamp strm);
+/*
+ This function is equivalent to inflateEnd followed by inflateInit,
+ but does not free and reallocate the internal decompression state. The
+ stream will keep attributes that may have been set by inflateInit2.
+ total_in, total_out, adler, and msg are initialized.
+
+ inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT inflateReset2(z_streamp strm,
+ int windowBits);
+/*
+ This function is the same as inflateReset, but it also permits changing
+ the wrap and window size requests. The windowBits parameter is interpreted
+ the same as it is for inflateInit2. If the window size is changed, then the
+ memory allocated for the window is freed, and the window will be reallocated
+ by inflate() if needed.
+
+ inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL), or if
+ the windowBits parameter is invalid.
+*/
+
+ZEXTERN int ZEXPORT inflatePrime(z_streamp strm,
+ int bits,
+ int value);
+/*
+ This function inserts bits in the inflate input stream. The intent is
+ that this function is used to start inflating at a bit position in the
+ middle of a byte. The provided bits will be used before any bytes are used
+ from next_in. This function should only be used with raw inflate, and
+ should be used before the first inflate() call after inflateInit2() or
+ inflateReset(). bits must be less than or equal to 16, and that many of the
+ least significant bits of value will be inserted in the input.
+
+ If bits is negative, then the input stream bit buffer is emptied. Then
+ inflatePrime() can be called again to put bits in the buffer. This is used
+ to clear out bits leftover after feeding inflate a block description prior
+ to feeding inflate codes.
+
+ inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+ZEXTERN long ZEXPORT inflateMark(z_streamp strm);
+/*
+ This function returns two values, one in the lower 16 bits of the return
+ value, and the other in the remaining upper bits, obtained by shifting the
+ return value down 16 bits. If the upper value is -1 and the lower value is
+ zero, then inflate() is currently decoding information outside of a block.
+ If the upper value is -1 and the lower value is non-zero, then inflate is in
+ the middle of a stored block, with the lower value equaling the number of
+ bytes from the input remaining to copy. If the upper value is not -1, then
+ it is the number of bits back from the current bit position in the input of
+ the code (literal or length/distance pair) currently being processed. In
+ that case the lower value is the number of bytes already emitted for that
+ code.
+
+ A code is being processed if inflate is waiting for more input to complete
+ decoding of the code, or if it has completed decoding but is waiting for
+ more output space to write the literal or match data.
+
+ inflateMark() is used to mark locations in the input data for random
+ access, which may be at bit positions, and to note those cases where the
+ output of a code may span boundaries of random access blocks. The current
+ location in the input stream can be determined from avail_in and data_type
+ as noted in the description for the Z_BLOCK flush parameter for inflate.
+
+ inflateMark returns the value noted above, or -65536 if the provided
+ source stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm,
+ gz_headerp head);
+/*
+ inflateGetHeader() requests that gzip header information be stored in the
+ provided gz_header structure. inflateGetHeader() may be called after
+ inflateInit2() or inflateReset(), and before the first call of inflate().
+ As inflate() processes the gzip stream, head->done is zero until the header
+ is completed, at which time head->done is set to one. If a zlib stream is
+ being decoded, then head->done is set to -1 to indicate that there will be
+ no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be
+ used to force inflate() to return immediately after header processing is
+ complete and before any actual data is decompressed.
+
+ The text, time, xflags, and os fields are filled in with the gzip header
+ contents. hcrc is set to true if there is a header CRC. (The header CRC
+ was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+ contains the maximum number of bytes to write to extra. Once done is true,
+ extra_len contains the actual extra field length, and extra contains the
+ extra field, or that field truncated if extra_max is less than extra_len.
+ If name is not Z_NULL, then up to name_max characters are written there,
+ terminated with a zero unless the length is greater than name_max. If
+ comment is not Z_NULL, then up to comm_max characters are written there,
+ terminated with a zero unless the length is greater than comm_max. When any
+ of extra, name, or comment are not Z_NULL and the respective field is not
+ present in the header, then that field is set to Z_NULL to signal its
+ absence. This allows the use of deflateSetHeader() with the returned
+ structure to duplicate the header. However if those fields are set to
+ allocated memory, then the application will need to save those pointers
+ elsewhere so that they can be eventually freed.
+
+ If inflateGetHeader is not used, then the header information is simply
+ discarded. The header is always checked for validity, including the header
+ CRC if present. inflateReset() will reset the process to discard the header
+ information. The application would need to call inflateGetHeader() again to
+ retrieve the header from the next gzip stream.
+
+ inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateBackInit(z_streamp strm, int windowBits,
+ unsigned char FAR *window);
+
+ Initialize the internal stream state for decompression using inflateBack()
+ calls. The fields zalloc, zfree and opaque in strm must be initialized
+ before the call. If zalloc and zfree are Z_NULL, then the default library-
+ derived memory allocation routines are used. windowBits is the base two
+ logarithm of the window size, in the range 8..15. window is a caller
+ supplied buffer of that size. Except for special applications where it is
+ assured that deflate was used with small window sizes, windowBits must be 15
+ and a 32K byte window must be supplied to be able to decompress general
+ deflate streams.
+
+ See inflateBack() for the usage of these routines.
+
+ inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
+ the parameters are invalid, Z_MEM_ERROR if the internal state could not be
+ allocated, or Z_VERSION_ERROR if the version of the library does not match
+ the version of the header file.
+*/
+
+typedef unsigned (*in_func)(void FAR *,
+ z_const unsigned char FAR * FAR *);
+typedef int (*out_func)(void FAR *, unsigned char FAR *, unsigned);
+
+ZEXTERN int ZEXPORT inflateBack(z_streamp strm,
+ in_func in, void FAR *in_desc,
+ out_func out, void FAR *out_desc);
+/*
+ inflateBack() does a raw inflate with a single call using a call-back
+ interface for input and output. This is potentially more efficient than
+ inflate() for file i/o applications, in that it avoids copying between the
+ output and the sliding window by simply making the window itself the output
+ buffer. inflate() can be faster on modern CPUs when used with large
+ buffers. inflateBack() trusts the application to not change the output
+ buffer passed by the output function, at least until inflateBack() returns.
+
+ inflateBackInit() must be called first to allocate the internal state
+ and to initialize the state with the user-provided window buffer.
+ inflateBack() may then be used multiple times to inflate a complete, raw
+ deflate stream with each call. inflateBackEnd() is then called to free the
+ allocated state.
+
+ A raw deflate stream is one with no zlib or gzip header or trailer.
+ This routine would normally be used in a utility that reads zip or gzip
+ files and writes out uncompressed files. The utility would decode the
+ header and process the trailer on its own, hence this routine expects only
+ the raw deflate stream to decompress. This is different from the default
+ behavior of inflate(), which expects a zlib header and trailer around the
+ deflate stream.
+
+ inflateBack() uses two subroutines supplied by the caller that are then
+ called by inflateBack() for input and output. inflateBack() calls those
+ routines until it reads a complete deflate stream and writes out all of the
+ uncompressed data, or until it encounters an error. The function's
+ parameters and return types are defined above in the in_func and out_func
+ typedefs. inflateBack() will call in(in_desc, &buf) which should return the
+ number of bytes of provided input, and a pointer to that input in buf. If
+ there is no input available, in() must return zero -- buf is ignored in that
+ case -- and inflateBack() will return a buffer error. inflateBack() will
+ call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].
+ out() should return zero on success, or non-zero on failure. If out()
+ returns non-zero, inflateBack() will return with an error. Neither in() nor
+ out() are permitted to change the contents of the window provided to
+ inflateBackInit(), which is also the buffer that out() uses to write from.
+ The length written by out() will be at most the window size. Any non-zero
+ amount of input may be provided by in().
+
+ For convenience, inflateBack() can be provided input on the first call by
+ setting strm->next_in and strm->avail_in. If that input is exhausted, then
+ in() will be called. Therefore strm->next_in must be initialized before
+ calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
+ immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
+ must also be initialized, and then if strm->avail_in is not zero, input will
+ initially be taken from strm->next_in[0 .. strm->avail_in - 1].
+
+ The in_desc and out_desc parameters of inflateBack() is passed as the
+ first parameter of in() and out() respectively when they are called. These
+ descriptors can be optionally used to pass any information that the caller-
+ supplied in() and out() functions need to do their job.
+
+ On return, inflateBack() will set strm->next_in and strm->avail_in to
+ pass back any unused input that was provided by the last in() call. The
+ return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
+ if in() or out() returned an error, Z_DATA_ERROR if there was a format error
+ in the deflate stream (in which case strm->msg is set to indicate the nature
+ of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
+ In the case of Z_BUF_ERROR, an input or output error can be distinguished
+ using strm->next_in which will be Z_NULL only if in() returned an error. If
+ strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
+ non-zero. (in() will always be called before out(), so strm->next_in is
+ assured to be defined if out() returns non-zero.) Note that inflateBack()
+ cannot return Z_OK.
+*/
+
+ZEXTERN int ZEXPORT inflateBackEnd(z_streamp strm);
+/*
+ All memory allocated by inflateBackInit() is freed.
+
+ inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
+ state was inconsistent.
+*/
+
+ZEXTERN uLong ZEXPORT zlibCompileFlags(void);
+/* Return flags indicating compile-time options.
+
+ Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
+ 1.0: size of uInt
+ 3.2: size of uLong
+ 5.4: size of voidpf (pointer)
+ 7.6: size of z_off_t
+
+ Compiler, assembler, and debug options:
+ 8: ZLIB_DEBUG
+ 9: ASMV or ASMINF -- use ASM code
+ 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
+ 11: 0 (reserved)
+
+ One-time table building (smaller code, but not thread-safe if true):
+ 12: BUILDFIXED -- build static block decoding tables when needed
+ 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
+ 14,15: 0 (reserved)
+
+ Library content (indicates missing functionality):
+ 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
+ deflate code when not needed)
+ 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
+ and decode gzip streams (to avoid linking crc code)
+ 18-19: 0 (reserved)
+
+ Operation variations (changes in library functionality):
+ 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
+ 21: FASTEST -- deflate algorithm with only one, lowest compression level
+ 22,23: 0 (reserved)
+
+ The sprintf variant used by gzprintf (zero is best):
+ 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
+ 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
+ 26: 0 = returns value, 1 = void -- 1 means inferred string length returned
+
+ Remainder:
+ 27-31: 0 (reserved)
+ */
+
+#ifndef Z_SOLO
+
+ /* utility functions */
+
+/*
+ The following utility functions are implemented on top of the basic
+ stream-oriented functions. To simplify the interface, some default options
+ are assumed (compression level and memory usage, standard memory allocation
+ functions). The source code of these utility functions can be modified if
+ you need special options.
+*/
+
+ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen);
+/*
+ Compresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total size
+ of the destination buffer, which must be at least the value returned by
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed data. compress() is equivalent to compress2() with a level
+ parameter of Z_DEFAULT_COMPRESSION.
+
+ compress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer.
+*/
+
+ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen,
+ int level);
+/*
+ Compresses the source buffer into the destination buffer. The level
+ parameter has the same meaning as in deflateInit. sourceLen is the byte
+ length of the source buffer. Upon entry, destLen is the total size of the
+ destination buffer, which must be at least the value returned by
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed data.
+
+ compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+ Z_STREAM_ERROR if the level parameter is invalid.
+*/
+
+ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen);
+/*
+ compressBound() returns an upper bound on the compressed size after
+ compress() or compress2() on sourceLen bytes. It would be used before a
+ compress() or compress2() call to allocate the destination buffer.
+*/
+
+ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen);
+/*
+ Decompresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total size
+ of the destination buffer, which must be large enough to hold the entire
+ uncompressed data. (The size of the uncompressed data must have been saved
+ previously by the compressor and transmitted to the decompressor by some
+ mechanism outside the scope of this compression library.) Upon exit, destLen
+ is the actual size of the uncompressed data.
+
+ uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In
+ the case where there is not enough room, uncompress() will fill the output
+ buffer with the uncompressed data up to that point.
+*/
+
+ZEXTERN int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong *sourceLen);
+/*
+ Same as uncompress, except that sourceLen is a pointer, where the
+ length of the source is *sourceLen. On return, *sourceLen is the number of
+ source bytes consumed.
+*/
+
+ /* gzip file access functions */
+
+/*
+ This library supports reading and writing files in gzip (.gz) format with
+ an interface similar to that of stdio, using the functions that start with
+ "gz". The gzip format is different from the zlib format. gzip is a gzip
+ wrapper, documented in RFC 1952, wrapped around a deflate stream.
+*/
+
+typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
+
+/*
+ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode);
+
+ Open the gzip (.gz) file at path for reading and decompressing, or
+ compressing and writing. The mode parameter is as in fopen ("rb" or "wb")
+ but can also include a compression level ("wb9") or a strategy: 'f' for
+ filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h",
+ 'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression
+ as in "wb9F". (See the description of deflateInit2 for more information
+ about the strategy parameter.) 'T' will request transparent writing or
+ appending with no compression and not using the gzip format.
+
+ "a" can be used instead of "w" to request that the gzip stream that will
+ be written be appended to the file. "+" will result in an error, since
+ reading and writing to the same gzip file is not supported. The addition of
+ "x" when writing will create the file exclusively, which fails if the file
+ already exists. On systems that support it, the addition of "e" when
+ reading or writing will set the flag to close the file on an execve() call.
+
+ These functions, as well as gzip, will read and decode a sequence of gzip
+ streams in a file. The append function of gzopen() can be used to create
+ such a file. (Also see gzflush() for another way to do this.) When
+ appending, gzopen does not test whether the file begins with a gzip stream,
+ nor does it look for the end of the gzip streams to begin appending. gzopen
+ will simply append a gzip stream to the existing file.
+
+ gzopen can be used to read a file which is not in gzip format; in this
+ case gzread will directly read from the file without decompression. When
+ reading, this will be detected automatically by looking for the magic two-
+ byte gzip header.
+
+ gzopen returns NULL if the file could not be opened, if there was
+ insufficient memory to allocate the gzFile state, or if an invalid mode was
+ specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
+ errno can be checked to determine if the reason gzopen failed was that the
+ file could not be opened.
+*/
+
+ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode);
+/*
+ Associate a gzFile with the file descriptor fd. File descriptors are
+ obtained from calls like open, dup, creat, pipe or fileno (if the file has
+ been previously opened with fopen). The mode parameter is as in gzopen.
+
+ The next call of gzclose on the returned gzFile will also close the file
+ descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
+ fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
+ mode);. The duplicated descriptor should be saved to avoid a leak, since
+ gzdopen does not close fd if it fails. If you are using fileno() to get the
+ file descriptor from a FILE *, then you will have to use dup() to avoid
+ double-close()ing the file descriptor. Both gzclose() and fclose() will
+ close the associated file descriptor, so they need to have different file
+ descriptors.
+
+ gzdopen returns NULL if there was insufficient memory to allocate the
+ gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
+ provided, or '+' was provided), or if fd is -1. The file descriptor is not
+ used until the next gz* read, write, seek, or close operation, so gzdopen
+ will not detect if fd is invalid (unless fd is -1).
+*/
+
+ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size);
+/*
+ Set the internal buffer size used by this library's functions for file to
+ size. The default buffer size is 8192 bytes. This function must be called
+ after gzopen() or gzdopen(), and before any other calls that read or write
+ the file. The buffer memory allocation is always deferred to the first read
+ or write. Three times that size in buffer space is allocated. A larger
+ buffer size of, for example, 64K or 128K bytes will noticeably increase the
+ speed of decompression (reading).
+
+ The new buffer size also affects the maximum length for gzprintf().
+
+ gzbuffer() returns 0 on success, or -1 on failure, such as being called
+ too late.
+*/
+
+ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy);
+/*
+ Dynamically update the compression level and strategy for file. See the
+ description of deflateInit2 for the meaning of these parameters. Previously
+ provided data is flushed before applying the parameter changes.
+
+ gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not
+ opened for writing, Z_ERRNO if there is an error writing the flushed data,
+ or Z_MEM_ERROR if there is a memory allocation error.
+*/
+
+ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len);
+/*
+ Read and decompress up to len uncompressed bytes from file into buf. If
+ the input file is not in gzip format, gzread copies the given number of
+ bytes into the buffer directly from the file.
+
+ After reaching the end of a gzip stream in the input, gzread will continue
+ to read, looking for another gzip stream. Any number of gzip streams may be
+ concatenated in the input file, and will all be decompressed by gzread().
+ If something other than a gzip stream is encountered after a gzip stream,
+ that remaining trailing garbage is ignored (and no error is returned).
+
+ gzread can be used to read a gzip file that is being concurrently written.
+ Upon reaching the end of the input, gzread will return with the available
+ data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then
+ gzclearerr can be used to clear the end of file indicator in order to permit
+ gzread to be tried again. Z_OK indicates that a gzip stream was completed
+ on the last gzread. Z_BUF_ERROR indicates that the input file ended in the
+ middle of a gzip stream. Note that gzread does not return -1 in the event
+ of an incomplete gzip stream. This error is deferred until gzclose(), which
+ will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip
+ stream. Alternatively, gzerror can be used before gzclose to detect this
+ case.
+
+ gzread returns the number of uncompressed bytes actually read, less than
+ len for end of file, or -1 for error. If len is too large to fit in an int,
+ then nothing is read, -1 is returned, and the error state is set to
+ Z_STREAM_ERROR.
+*/
+
+ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems,
+ gzFile file);
+/*
+ Read and decompress up to nitems items of size size from file into buf,
+ otherwise operating as gzread() does. This duplicates the interface of
+ stdio's fread(), with size_t request and return types. If the library
+ defines size_t, then z_size_t is identical to size_t. If not, then z_size_t
+ is an unsigned integer type that can contain a pointer.
+
+ gzfread() returns the number of full items read of size size, or zero if
+ the end of the file was reached and a full item could not be read, or if
+ there was an error. gzerror() must be consulted if zero is returned in
+ order to determine if there was an error. If the multiplication of size and
+ nitems overflows, i.e. the product does not fit in a z_size_t, then nothing
+ is read, zero is returned, and the error state is set to Z_STREAM_ERROR.
+
+ In the event that the end of file is reached and only a partial item is
+ available at the end, i.e. the remaining uncompressed data length is not a
+ multiple of size, then the final partial item is nevertheless read into buf
+ and the end-of-file flag is set. The length of the partial item read is not
+ provided, but could be inferred from the result of gztell(). This behavior
+ is the same as the behavior of fread() implementations in common libraries,
+ but it prevents the direct use of gzfread() to read a concurrently written
+ file, resetting and retrying on end-of-file, when size is not 1.
+*/
+
+ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len);
+/*
+ Compress and write the len uncompressed bytes at buf to file. gzwrite
+ returns the number of uncompressed bytes written or 0 in case of error.
+*/
+
+ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size,
+ z_size_t nitems, gzFile file);
+/*
+ Compress and write nitems items of size size from buf to file, duplicating
+ the interface of stdio's fwrite(), with size_t request and return types. If
+ the library defines size_t, then z_size_t is identical to size_t. If not,
+ then z_size_t is an unsigned integer type that can contain a pointer.
+
+ gzfwrite() returns the number of full items written of size size, or zero
+ if there was an error. If the multiplication of size and nitems overflows,
+ i.e. the product does not fit in a z_size_t, then nothing is written, zero
+ is returned, and the error state is set to Z_STREAM_ERROR.
+*/
+
+ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...);
+/*
+ Convert, format, compress, and write the arguments (...) to file under
+ control of the string format, as in fprintf. gzprintf returns the number of
+ uncompressed bytes actually written, or a negative zlib error code in case
+ of error. The number of uncompressed bytes written is limited to 8191, or
+ one less than the buffer size given to gzbuffer(). The caller should assure
+ that this limit is not exceeded. If it is exceeded, then gzprintf() will
+ return an error (0) with nothing written. In this case, there may also be a
+ buffer overflow with unpredictable consequences, which is possible only if
+ zlib was compiled with the insecure functions sprintf() or vsprintf(),
+ because the secure snprintf() or vsnprintf() functions were not available.
+ This can be determined using zlibCompileFlags().
+*/
+
+ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s);
+/*
+ Compress and write the given null-terminated string s to file, excluding
+ the terminating null character.
+
+ gzputs returns the number of characters written, or -1 in case of error.
+*/
+
+ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len);
+/*
+ Read and decompress bytes from file into buf, until len-1 characters are
+ read, or until a newline character is read and transferred to buf, or an
+ end-of-file condition is encountered. If any characters are read or if len
+ is one, the string is terminated with a null character. If no characters
+ are read due to an end-of-file or len is less than one, then the buffer is
+ left untouched.
+
+ gzgets returns buf which is a null-terminated string, or it returns NULL
+ for end-of-file or in case of error. If there was an error, the contents at
+ buf are indeterminate.
+*/
+
+ZEXTERN int ZEXPORT gzputc(gzFile file, int c);
+/*
+ Compress and write c, converted to an unsigned char, into file. gzputc
+ returns the value that was written, or -1 in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzgetc(gzFile file);
+/*
+ Read and decompress one byte from file. gzgetc returns this byte or -1
+ in case of end of file or error. This is implemented as a macro for speed.
+ As such, it does not do all of the checking the other functions do. I.e.
+ it does not check to see if file is NULL, nor whether the structure file
+ points to has been clobbered or not.
+*/
+
+ZEXTERN int ZEXPORT gzungetc(int c, gzFile file);
+/*
+ Push c back onto the stream for file to be read as the first character on
+ the next read. At least one character of push-back is always allowed.
+ gzungetc() returns the character pushed, or -1 on failure. gzungetc() will
+ fail if c is -1, and may fail if a character has been pushed but not read
+ yet. If gzungetc is used immediately after gzopen or gzdopen, at least the
+ output buffer size of pushed characters is allowed. (See gzbuffer above.)
+ The pushed character will be discarded if the stream is repositioned with
+ gzseek() or gzrewind().
+*/
+
+ZEXTERN int ZEXPORT gzflush(gzFile file, int flush);
+/*
+ Flush all pending output to file. The parameter flush is as in the
+ deflate() function. The return value is the zlib error number (see function
+ gzerror below). gzflush is only permitted when writing.
+
+ If the flush parameter is Z_FINISH, the remaining data is written and the
+ gzip stream is completed in the output. If gzwrite() is called again, a new
+ gzip stream will be started in the output. gzread() is able to read such
+ concatenated gzip streams.
+
+ gzflush should be called only when strictly necessary because it will
+ degrade compression if called too often.
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzseek(gzFile file,
+ z_off_t offset, int whence);
+
+ Set the starting position to offset relative to whence for the next gzread
+ or gzwrite on file. The offset represents a number of bytes in the
+ uncompressed data stream. The whence parameter is defined as in lseek(2);
+ the value SEEK_END is not supported.
+
+ If the file is opened for reading, this function is emulated but can be
+ extremely slow. If the file is opened for writing, only forward seeks are
+ supported; gzseek then compresses a sequence of zeroes up to the new
+ starting position.
+
+ gzseek returns the resulting offset location as measured in bytes from
+ the beginning of the uncompressed stream, or -1 in case of error, in
+ particular if the file is opened for writing and the new starting position
+ would be before the current position.
+*/
+
+ZEXTERN int ZEXPORT gzrewind(gzFile file);
+/*
+ Rewind file. This function is supported only for reading.
+
+ gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET).
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gztell(gzFile file);
+
+ Return the starting position for the next gzread or gzwrite on file.
+ This position represents a number of bytes in the uncompressed data stream,
+ and is zero when starting, even if appending or reading a gzip stream from
+ the middle of a file using gzdopen().
+
+ gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file);
+
+ Return the current compressed (actual) read or write offset of file. This
+ offset includes the count of bytes that precede the gzip stream, for example
+ when appending or when using gzdopen() for reading. When reading, the
+ offset does not include as yet unused buffered input. This information can
+ be used for a progress indicator. On error, gzoffset() returns -1.
+*/
+
+ZEXTERN int ZEXPORT gzeof(gzFile file);
+/*
+ Return true (1) if the end-of-file indicator for file has been set while
+ reading, false (0) otherwise. Note that the end-of-file indicator is set
+ only if the read tried to go past the end of the input, but came up short.
+ Therefore, just like feof(), gzeof() may return false even if there is no
+ more data to read, in the event that the last read request was for the exact
+ number of bytes remaining in the input file. This will happen if the input
+ file size is an exact multiple of the buffer size.
+
+ If gzeof() returns true, then the read functions will return no more data,
+ unless the end-of-file indicator is reset by gzclearerr() and the input file
+ has grown since the previous end of file was detected.
+*/
+
+ZEXTERN int ZEXPORT gzdirect(gzFile file);
+/*
+ Return true (1) if file is being copied directly while reading, or false
+ (0) if file is a gzip stream being decompressed.
+
+ If the input file is empty, gzdirect() will return true, since the input
+ does not contain a gzip stream.
+
+ If gzdirect() is used immediately after gzopen() or gzdopen() it will
+ cause buffers to be allocated to allow reading the file to determine if it
+ is a gzip file. Therefore if gzbuffer() is used, it should be called before
+ gzdirect().
+
+ When writing, gzdirect() returns true (1) if transparent writing was
+ requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note:
+ gzdirect() is not needed when writing. Transparent writing must be
+ explicitly requested, so the application already knows the answer. When
+ linking statically, using gzdirect() will include all of the zlib code for
+ gzip file reading and decompression, which may not be desired.)
+*/
+
+ZEXTERN int ZEXPORT gzclose(gzFile file);
+/*
+ Flush all pending output for file, if necessary, close file and
+ deallocate the (de)compression state. Note that once file is closed, you
+ cannot call gzerror with file, since its structures have been deallocated.
+ gzclose must not be called more than once on the same file, just as free
+ must not be called more than once on the same allocation.
+
+ gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
+ file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
+ last read ended in the middle of a gzip stream, or Z_OK on success.
+*/
+
+ZEXTERN int ZEXPORT gzclose_r(gzFile file);
+ZEXTERN int ZEXPORT gzclose_w(gzFile file);
+/*
+ Same as gzclose(), but gzclose_r() is only for use when reading, and
+ gzclose_w() is only for use when writing or appending. The advantage to
+ using these instead of gzclose() is that they avoid linking in zlib
+ compression or decompression code that is not used when only reading or only
+ writing respectively. If gzclose() is used, then both compression and
+ decompression code will be included the application when linking to a static
+ zlib library.
+*/
+
+ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum);
+/*
+ Return the error message for the last error which occurred on file.
+ errnum is set to zlib error number. If an error occurred in the file system
+ and not in the compression library, errnum is set to Z_ERRNO and the
+ application may consult errno to get the exact error code.
+
+ The application must not modify the returned string. Future calls to
+ this function may invalidate the previously returned string. If file is
+ closed, then the string previously returned by gzerror will no longer be
+ available.
+
+ gzerror() should be used to distinguish errors from end-of-file for those
+ functions above that do not distinguish those cases in their return values.
+*/
+
+ZEXTERN void ZEXPORT gzclearerr(gzFile file);
+/*
+ Clear the error and end-of-file flags for file. This is analogous to the
+ clearerr() function in stdio. This is useful for continuing to read a gzip
+ file that is being written concurrently.
+*/
+
+#endif /* !Z_SOLO */
+
+ /* checksum functions */
+
+/*
+ These functions are not related to compression but are exported
+ anyway because they might be useful in applications using the compression
+ library.
+*/
+
+ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len);
+/*
+ Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+ return the updated checksum. An Adler-32 value is in the range of a 32-bit
+ unsigned integer. If buf is Z_NULL, this function returns the required
+ initial value for the checksum.
+
+ An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed
+ much faster.
+
+ Usage example:
+
+ uLong adler = adler32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ adler = adler32(adler, buffer, length);
+ }
+ if (adler != original_adler) error();
+*/
+
+ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf,
+ z_size_t len);
+/*
+ Same as adler32(), but with a size_t length.
+*/
+
+/*
+ZEXTERN uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2,
+ z_off_t len2);
+
+ Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
+ and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
+ each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
+ seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note
+ that the z_off_t type (like off_t) is a signed integer. If len2 is
+ negative, the result has no meaning or utility.
+*/
+
+ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len);
+/*
+ Update a running CRC-32 with the bytes buf[0..len-1] and return the
+ updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer.
+ If buf is Z_NULL, this function returns the required initial value for the
+ crc. Pre- and post-conditioning (one's complement) is performed within this
+ function so it shouldn't be done by the application.
+
+ Usage example:
+
+ uLong crc = crc32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ crc = crc32(crc, buffer, length);
+ }
+ if (crc != original_crc) error();
+*/
+
+ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf,
+ z_size_t len);
+/*
+ Same as crc32(), but with a size_t length.
+*/
+
+/*
+ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2);
+
+ Combine two CRC-32 check values into one. For two sequences of bytes,
+ seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
+ calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
+ check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
+ len2. len2 must be non-negative.
+*/
+
+/*
+ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2);
+
+ Return the operator corresponding to length len2, to be used with
+ crc32_combine_op(). len2 must be non-negative.
+*/
+
+ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op);
+/*
+ Give the same result as crc32_combine(), using op in place of len2. op is
+ is generated from len2 by crc32_combine_gen(). This will be faster than
+ crc32_combine() if the generated op is used more than once.
+*/
+
+
+ /* various hacks, don't look :) */
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+ZEXTERN int ZEXPORT deflateInit_(z_streamp strm, int level,
+ const char *version, int stream_size);
+ZEXTERN int ZEXPORT inflateInit_(z_streamp strm,
+ const char *version, int stream_size);
+ZEXTERN int ZEXPORT deflateInit2_(z_streamp strm, int level, int method,
+ int windowBits, int memLevel,
+ int strategy, const char *version,
+ int stream_size);
+ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int windowBits,
+ const char *version, int stream_size);
+ZEXTERN int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits,
+ unsigned char FAR *window,
+ const char *version,
+ int stream_size);
+#ifdef Z_PREFIX_SET
+# define z_deflateInit(strm, level) \
+ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
+# define z_inflateInit(strm) \
+ inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
+# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+ deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+ (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
+# define z_inflateInit2(strm, windowBits) \
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
+ (int)sizeof(z_stream))
+# define z_inflateBackInit(strm, windowBits, window) \
+ inflateBackInit_((strm), (windowBits), (window), \
+ ZLIB_VERSION, (int)sizeof(z_stream))
+#else
+# define deflateInit(strm, level) \
+ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
+# define inflateInit(strm) \
+ inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
+# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+ deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+ (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
+# define inflateInit2(strm, windowBits) \
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
+ (int)sizeof(z_stream))
+# define inflateBackInit(strm, windowBits, window) \
+ inflateBackInit_((strm), (windowBits), (window), \
+ ZLIB_VERSION, (int)sizeof(z_stream))
+#endif
+
+#ifndef Z_SOLO
+
+/* gzgetc() macro and its supporting function and exposed data structure. Note
+ * that the real internal state is much larger than the exposed structure.
+ * This abbreviated structure exposes just enough for the gzgetc() macro. The
+ * user should not mess with these exposed elements, since their names or
+ * behavior could change in the future, perhaps even capriciously. They can
+ * only be used by the gzgetc() macro. You have been warned.
+ */
+struct gzFile_s {
+ unsigned have;
+ unsigned char *next;
+ z_off64_t pos;
+};
+ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */
+#ifdef Z_PREFIX_SET
+# undef z_gzgetc
+# define z_gzgetc(g) \
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
+#else
+# define gzgetc(g) \
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
+#endif
+
+/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
+ * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
+ * both are true, the application gets the *64 functions, and the regular
+ * functions are changed to 64 bits) -- in case these are set on systems
+ * without large file support, _LFS64_LARGEFILE must also be true
+ */
+#ifdef Z_LARGE64
+ ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
+ ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int);
+ ZEXTERN z_off64_t ZEXPORT gztell64(gzFile);
+ ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile);
+ ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t);
+ ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t);
+ ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t);
+#endif
+
+#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
+# ifdef Z_PREFIX_SET
+# define z_gzopen z_gzopen64
+# define z_gzseek z_gzseek64
+# define z_gztell z_gztell64
+# define z_gzoffset z_gzoffset64
+# define z_adler32_combine z_adler32_combine64
+# define z_crc32_combine z_crc32_combine64
+# define z_crc32_combine_gen z_crc32_combine_gen64
+# else
+# define gzopen gzopen64
+# define gzseek gzseek64
+# define gztell gztell64
+# define gzoffset gzoffset64
+# define adler32_combine adler32_combine64
+# define crc32_combine crc32_combine64
+# define crc32_combine_gen crc32_combine_gen64
+# endif
+# ifndef Z_LARGE64
+ ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
+ ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int);
+ ZEXTERN z_off_t ZEXPORT gztell64(gzFile);
+ ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile);
+ ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t);
+ ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t);
+ ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t);
+# endif
+#else
+ ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *);
+ ZEXTERN z_off_t ZEXPORT gzseek(gzFile, z_off_t, int);
+ ZEXTERN z_off_t ZEXPORT gztell(gzFile);
+ ZEXTERN z_off_t ZEXPORT gzoffset(gzFile);
+ ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
+ ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
+ ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
+#endif
+
+#else /* Z_SOLO */
+
+ ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t);
+ ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t);
+ ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t);
+
+#endif /* !Z_SOLO */
+
+/* undocumented functions */
+ZEXTERN const char * ZEXPORT zError(int);
+ZEXTERN int ZEXPORT inflateSyncPoint(z_streamp);
+ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table(void);
+ZEXTERN int ZEXPORT inflateUndermine(z_streamp, int);
+ZEXTERN int ZEXPORT inflateValidate(z_streamp, int);
+ZEXTERN unsigned long ZEXPORT inflateCodesUsed(z_streamp);
+ZEXTERN int ZEXPORT inflateResetKeep(z_streamp);
+ZEXTERN int ZEXPORT deflateResetKeep(z_streamp);
+#if defined(_WIN32) && !defined(Z_SOLO)
+ZEXTERN gzFile ZEXPORT gzopen_w(const wchar_t *path,
+ const char *mode);
+#endif
+#if defined(STDC) || defined(Z_HAVE_STDARG_H)
+# ifndef Z_SOLO
+ZEXTERN int ZEXPORTVA gzvprintf(gzFile file,
+ const char *format,
+ va_list va);
+# endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ZLIB_H */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exslt.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exslt.h
new file mode 100644
index 0000000000000000000000000000000000000000..dfbd09befae13448fae876f297f3ab32b7e27954
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exslt.h
@@ -0,0 +1,108 @@
+/*
+ * Summary: main header file
+ *
+ * Copy: See Copyright for the status of this software.
+ */
+
+
+#ifndef __EXSLT_H__
+#define __EXSLT_H__
+
+#include
+#include
+#include "exsltexports.h"
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EXSLTPUBVAR const char *exsltLibraryVersion;
+EXSLTPUBVAR const int exsltLibexsltVersion;
+EXSLTPUBVAR const int exsltLibxsltVersion;
+EXSLTPUBVAR const int exsltLibxmlVersion;
+
+/**
+ * EXSLT_COMMON_NAMESPACE:
+ *
+ * Namespace for EXSLT common functions
+ */
+#define EXSLT_COMMON_NAMESPACE ((const xmlChar *) "http://exslt.org/common")
+/**
+ * EXSLT_CRYPTO_NAMESPACE:
+ *
+ * Namespace for EXSLT crypto functions
+ */
+#define EXSLT_CRYPTO_NAMESPACE ((const xmlChar *) "http://exslt.org/crypto")
+/**
+ * EXSLT_MATH_NAMESPACE:
+ *
+ * Namespace for EXSLT math functions
+ */
+#define EXSLT_MATH_NAMESPACE ((const xmlChar *) "http://exslt.org/math")
+/**
+ * EXSLT_SETS_NAMESPACE:
+ *
+ * Namespace for EXSLT set functions
+ */
+#define EXSLT_SETS_NAMESPACE ((const xmlChar *) "http://exslt.org/sets")
+/**
+ * EXSLT_FUNCTIONS_NAMESPACE:
+ *
+ * Namespace for EXSLT functions extension functions
+ */
+#define EXSLT_FUNCTIONS_NAMESPACE ((const xmlChar *) "http://exslt.org/functions")
+/**
+ * EXSLT_STRINGS_NAMESPACE:
+ *
+ * Namespace for EXSLT strings functions
+ */
+#define EXSLT_STRINGS_NAMESPACE ((const xmlChar *) "http://exslt.org/strings")
+/**
+ * EXSLT_DATE_NAMESPACE:
+ *
+ * Namespace for EXSLT date functions
+ */
+#define EXSLT_DATE_NAMESPACE ((const xmlChar *) "http://exslt.org/dates-and-times")
+/**
+ * EXSLT_DYNAMIC_NAMESPACE:
+ *
+ * Namespace for EXSLT dynamic functions
+ */
+#define EXSLT_DYNAMIC_NAMESPACE ((const xmlChar *) "http://exslt.org/dynamic")
+
+/**
+ * SAXON_NAMESPACE:
+ *
+ * Namespace for SAXON extensions functions
+ */
+#define SAXON_NAMESPACE ((const xmlChar *) "http://icl.com/saxon")
+
+EXSLTPUBFUN void EXSLTCALL exsltCommonRegister (void);
+#ifdef EXSLT_CRYPTO_ENABLED
+EXSLTPUBFUN void EXSLTCALL exsltCryptoRegister (void);
+#endif
+EXSLTPUBFUN void EXSLTCALL exsltMathRegister (void);
+EXSLTPUBFUN void EXSLTCALL exsltSetsRegister (void);
+EXSLTPUBFUN void EXSLTCALL exsltFuncRegister (void);
+EXSLTPUBFUN void EXSLTCALL exsltStrRegister (void);
+EXSLTPUBFUN void EXSLTCALL exsltDateRegister (void);
+EXSLTPUBFUN void EXSLTCALL exsltSaxonRegister (void);
+EXSLTPUBFUN void EXSLTCALL exsltDynRegister(void);
+
+EXSLTPUBFUN void EXSLTCALL exsltRegisterAll (void);
+
+EXSLTPUBFUN int EXSLTCALL exsltDateXpathCtxtRegister (xmlXPathContextPtr ctxt,
+ const xmlChar *prefix);
+EXSLTPUBFUN int EXSLTCALL exsltMathXpathCtxtRegister (xmlXPathContextPtr ctxt,
+ const xmlChar *prefix);
+EXSLTPUBFUN int EXSLTCALL exsltSetsXpathCtxtRegister (xmlXPathContextPtr ctxt,
+ const xmlChar *prefix);
+EXSLTPUBFUN int EXSLTCALL exsltStrXpathCtxtRegister (xmlXPathContextPtr ctxt,
+ const xmlChar *prefix);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __EXSLT_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exsltconfig.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exsltconfig.h
new file mode 100644
index 0000000000000000000000000000000000000000..10e43b0f5dcc517999fea0265ea71724eaa5a60a
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exsltconfig.h
@@ -0,0 +1,70 @@
+/*
+ * exsltconfig.h: compile-time version information for the EXSLT library
+ *
+ * See Copyright for the status of this software.
+ *
+ * daniel@veillard.com
+ */
+
+#ifndef __XML_EXSLTCONFIG_H__
+#define __XML_EXSLTCONFIG_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * LIBEXSLT_DOTTED_VERSION:
+ *
+ * the version string like "1.2.3"
+ */
+#define LIBEXSLT_DOTTED_VERSION "0.8.24"
+
+/**
+ * LIBEXSLT_VERSION:
+ *
+ * the version number: 1.2.3 value is 10203
+ */
+#define LIBEXSLT_VERSION 824
+
+/**
+ * LIBEXSLT_VERSION_STRING:
+ *
+ * the version number string, 1.2.3 value is "10203"
+ */
+#define LIBEXSLT_VERSION_STRING "824"
+
+/**
+ * LIBEXSLT_VERSION_EXTRA:
+ *
+ * extra version information, used to show a Git commit description
+ */
+#define LIBEXSLT_VERSION_EXTRA ""
+
+/**
+ * WITH_CRYPTO:
+ *
+ * Whether crypto support is configured into exslt
+ */
+#if 0
+#define EXSLT_CRYPTO_ENABLED
+#endif
+
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * This macro is used to flag unused function parameters to GCC
+ */
+#ifdef __GNUC__
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__((unused))
+#endif
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_EXSLTCONFIG_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exsltexports.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exsltexports.h
new file mode 100644
index 0000000000000000000000000000000000000000..ee79ec7aea0feff6988cbfa08b716498760f409e
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/exsltexports.h
@@ -0,0 +1,63 @@
+/*
+ * Summary: macros for marking symbols as exportable/importable.
+ *
+ * Copy: See Copyright for the status of this software.
+ */
+
+#ifndef __EXSLT_EXPORTS_H__
+#define __EXSLT_EXPORTS_H__
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+/** DOC_DISABLE */
+
+#ifdef LIBEXSLT_STATIC
+ #define EXSLTPUBLIC
+#elif defined(IN_LIBEXSLT)
+ #define EXSLTPUBLIC __declspec(dllexport)
+#else
+ #define EXSLTPUBLIC __declspec(dllimport)
+#endif
+
+#define EXSLTCALL __cdecl
+
+/** DOC_ENABLE */
+#else /* not Windows */
+
+/**
+ * EXSLTPUBLIC:
+ *
+ * Macro which declares a public symbol
+ */
+#define EXSLTPUBLIC
+
+/**
+ * EXSLTCALL:
+ *
+ * Macro which declares the calling convention for exported functions
+ */
+#define EXSLTCALL
+
+#endif /* platform switch */
+
+/*
+ * EXSLTPUBFUN:
+ *
+ * Macro which declares an exportable function
+ */
+#define EXSLTPUBFUN EXSLTPUBLIC
+
+/**
+ * EXSLTPUBVAR:
+ *
+ * Macro which declares an exportable variable
+ */
+#define EXSLTPUBVAR EXSLTPUBLIC extern
+
+/* Compatibility */
+#if !defined(LIBEXSLT_PUBLIC)
+#define LIBEXSLT_PUBLIC EXSLTPUBVAR
+#endif
+
+#endif /* __EXSLT_EXPORTS_H__ */
+
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/HTMLparser.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/HTMLparser.h
new file mode 100644
index 0000000000000000000000000000000000000000..cfe378a7d6b6b7f63b1e24f3a08094d23e873d61
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/HTMLparser.h
@@ -0,0 +1,339 @@
+/*
+ * Summary: interface for an HTML 4.0 non-verifying parser
+ * Description: this module implements an HTML 4.0 non-verifying parser
+ * with API compatible with the XML parser ones. It should
+ * be able to parse "real world" HTML, even if severely
+ * broken from a specification point of view.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __HTML_PARSER_H__
+#define __HTML_PARSER_H__
+#include
+#include
+
+#ifdef LIBXML_HTML_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Backward compatibility
+ */
+#define UTF8ToHtml htmlUTF8ToHtml
+
+/*
+ * Most of the back-end structures from XML and HTML are shared.
+ */
+typedef xmlParserCtxt htmlParserCtxt;
+typedef xmlParserCtxtPtr htmlParserCtxtPtr;
+typedef xmlParserNodeInfo htmlParserNodeInfo;
+typedef xmlSAXHandler htmlSAXHandler;
+typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
+typedef xmlParserInput htmlParserInput;
+typedef xmlParserInputPtr htmlParserInputPtr;
+typedef xmlDocPtr htmlDocPtr;
+typedef xmlNodePtr htmlNodePtr;
+
+/*
+ * Internal description of an HTML element, representing HTML 4.01
+ * and XHTML 1.0 (which share the same structure).
+ */
+typedef struct _htmlElemDesc htmlElemDesc;
+typedef htmlElemDesc *htmlElemDescPtr;
+struct _htmlElemDesc {
+ const char *name; /* The tag name */
+ char startTag; /* unused */
+ char endTag; /* Whether the end tag can be implied */
+ char saveEndTag; /* Whether the end tag should be saved */
+ char empty; /* Is this an empty element ? */
+ char depr; /* unused */
+ char dtd; /* unused */
+ char isinline; /* is this a block 0 or inline 1 element */
+ const char *desc; /* the description */
+
+ const char** subelts XML_DEPRECATED_MEMBER;
+ const char* defaultsubelt XML_DEPRECATED_MEMBER;
+ const char** attrs_opt XML_DEPRECATED_MEMBER;
+ const char** attrs_depr XML_DEPRECATED_MEMBER;
+ const char** attrs_req XML_DEPRECATED_MEMBER;
+
+ int dataMode;
+};
+
+/*
+ * Internal description of an HTML entity.
+ */
+typedef struct _htmlEntityDesc htmlEntityDesc;
+typedef htmlEntityDesc *htmlEntityDescPtr;
+struct _htmlEntityDesc {
+ unsigned int value; /* the UNICODE value for the character */
+ const char *name; /* The entity name */
+ const char *desc; /* the description */
+};
+
+#ifdef LIBXML_SAX1_ENABLED
+
+XML_DEPRECATED
+XMLPUBVAR const xmlSAXHandlerV1 htmlDefaultSAXHandler;
+
+#endif /* LIBXML_SAX1_ENABLED */
+
+/*
+ * There is only few public functions.
+ */
+XML_DEPRECATED
+XMLPUBFUN void
+ htmlInitAutoClose (void);
+XMLPUBFUN const htmlElemDesc *
+ htmlTagLookup (const xmlChar *tag);
+XMLPUBFUN const htmlEntityDesc *
+ htmlEntityLookup(const xmlChar *name);
+XMLPUBFUN const htmlEntityDesc *
+ htmlEntityValueLookup(unsigned int value);
+
+XML_DEPRECATED
+XMLPUBFUN int
+ htmlIsAutoClosed(htmlDocPtr doc,
+ htmlNodePtr elem);
+XML_DEPRECATED
+XMLPUBFUN int
+ htmlAutoCloseTag(htmlDocPtr doc,
+ const xmlChar *name,
+ htmlNodePtr elem);
+XML_DEPRECATED
+XMLPUBFUN const htmlEntityDesc *
+ htmlParseEntityRef(htmlParserCtxtPtr ctxt,
+ const xmlChar **str);
+XML_DEPRECATED
+XMLPUBFUN int
+ htmlParseCharRef(htmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ htmlParseElement(htmlParserCtxtPtr ctxt);
+
+XMLPUBFUN htmlParserCtxtPtr
+ htmlNewParserCtxt(void);
+XMLPUBFUN htmlParserCtxtPtr
+ htmlNewSAXParserCtxt(const htmlSAXHandler *sax,
+ void *userData);
+
+XMLPUBFUN htmlParserCtxtPtr
+ htmlCreateMemoryParserCtxt(const char *buffer,
+ int size);
+
+XMLPUBFUN int
+ htmlParseDocument(htmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN htmlDocPtr
+ htmlSAXParseDoc (const xmlChar *cur,
+ const char *encoding,
+ htmlSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN htmlDocPtr
+ htmlParseDoc (const xmlChar *cur,
+ const char *encoding);
+XMLPUBFUN htmlParserCtxtPtr
+ htmlCreateFileParserCtxt(const char *filename,
+ const char *encoding);
+XML_DEPRECATED
+XMLPUBFUN htmlDocPtr
+ htmlSAXParseFile(const char *filename,
+ const char *encoding,
+ htmlSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN htmlDocPtr
+ htmlParseFile (const char *filename,
+ const char *encoding);
+XMLPUBFUN int
+ htmlUTF8ToHtml (unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen);
+XMLPUBFUN int
+ htmlEncodeEntities(unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen, int quoteChar);
+XMLPUBFUN int
+ htmlIsScriptAttribute(const xmlChar *name);
+XML_DEPRECATED
+XMLPUBFUN int
+ htmlHandleOmittedElem(int val);
+
+#ifdef LIBXML_PUSH_ENABLED
+/**
+ * Interfaces for the Push mode.
+ */
+XMLPUBFUN htmlParserCtxtPtr
+ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *chunk,
+ int size,
+ const char *filename,
+ xmlCharEncoding enc);
+XMLPUBFUN int
+ htmlParseChunk (htmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ int terminate);
+#endif /* LIBXML_PUSH_ENABLED */
+
+XMLPUBFUN void
+ htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
+
+/*
+ * New set of simpler/more flexible APIs
+ */
+/**
+ * xmlParserOption:
+ *
+ * This is the set of XML parser options that can be passed down
+ * to the xmlReadDoc() and similar calls.
+ */
+typedef enum {
+ HTML_PARSE_RECOVER = 1<<0, /* No effect */
+ HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */
+ HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
+ HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
+ HTML_PARSE_PEDANTIC = 1<<7, /* No effect */
+ HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
+ HTML_PARSE_NONET = 1<<11,/* No effect */
+ HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
+ HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */
+ HTML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
+ HTML_PARSE_IGNORE_ENC=1<<21,/* ignore internal document encoding hint */
+ HTML_PARSE_BIG_LINES= 1<<22,/* Store big lines numbers in text PSVI field */
+ HTML_PARSE_HTML5 = 1<<26 /* HTML5 support */
+} htmlParserOption;
+
+XMLPUBFUN void
+ htmlCtxtReset (htmlParserCtxtPtr ctxt);
+XMLPUBFUN int
+ htmlCtxtSetOptions (htmlParserCtxtPtr ctxt,
+ int options);
+XMLPUBFUN int
+ htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
+ int options);
+XMLPUBFUN htmlDocPtr
+ htmlReadDoc (const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr
+ htmlReadFile (const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr
+ htmlReadMemory (const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr
+ htmlReadFd (int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr
+ htmlReadIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr
+ htmlCtxtParseDocument (htmlParserCtxtPtr ctxt,
+ xmlParserInputPtr input);
+XMLPUBFUN htmlDocPtr
+ htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
+ const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr
+ htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
+ const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr
+ htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
+ const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr
+ htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
+ int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr
+ htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+
+/* deprecated content model
+ */
+typedef enum {
+ HTML_NA = 0 , /* something we don't check at all */
+ HTML_INVALID = 0x1 ,
+ HTML_DEPRECATED = 0x2 ,
+ HTML_VALID = 0x4 ,
+ HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */
+} htmlStatus ;
+
+/* Using htmlElemDesc rather than name here, to emphasise the fact
+ that otherwise there's a lookup overhead
+*/
+XML_DEPRECATED
+XMLPUBFUN htmlStatus htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
+XML_DEPRECATED
+XMLPUBFUN int htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
+XML_DEPRECATED
+XMLPUBFUN htmlStatus htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
+XML_DEPRECATED
+XMLPUBFUN htmlStatus htmlNodeStatus(htmlNodePtr, int) ;
+/**
+ * htmlDefaultSubelement:
+ * @elt: HTML element
+ *
+ * Returns the default subelement for this element
+ */
+#define htmlDefaultSubelement(elt) elt->defaultsubelt
+/**
+ * htmlElementAllowedHereDesc:
+ * @parent: HTML parent element
+ * @elt: HTML element
+ *
+ * Checks whether an HTML element description may be a
+ * direct child of the specified element.
+ *
+ * Returns 1 if allowed; 0 otherwise.
+ */
+#define htmlElementAllowedHereDesc(parent,elt) \
+ htmlElementAllowedHere((parent), (elt)->name)
+/**
+ * htmlRequiredAttrs:
+ * @elt: HTML element
+ *
+ * Returns the attributes required for the specified element.
+ */
+#define htmlRequiredAttrs(elt) (elt)->attrs_req
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_HTML_ENABLED */
+#endif /* __HTML_PARSER_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/HTMLtree.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/HTMLtree.h
new file mode 100644
index 0000000000000000000000000000000000000000..065254f4dd339b95807a63f9af3daf157ad32262
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/HTMLtree.h
@@ -0,0 +1,148 @@
+/*
+ * Summary: specific APIs to process HTML tree, especially serialization
+ * Description: this module implements a few function needed to process
+ * tree in an HTML specific way.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __HTML_TREE_H__
+#define __HTML_TREE_H__
+
+#include
+#include
+#include
+#include
+
+#ifdef LIBXML_HTML_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * HTML_TEXT_NODE:
+ *
+ * Macro. A text node in a HTML document is really implemented
+ * the same way as a text node in an XML document.
+ */
+#define HTML_TEXT_NODE XML_TEXT_NODE
+/**
+ * HTML_ENTITY_REF_NODE:
+ *
+ * Macro. An entity reference in a HTML document is really implemented
+ * the same way as an entity reference in an XML document.
+ */
+#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
+/**
+ * HTML_COMMENT_NODE:
+ *
+ * Macro. A comment in a HTML document is really implemented
+ * the same way as a comment in an XML document.
+ */
+#define HTML_COMMENT_NODE XML_COMMENT_NODE
+/**
+ * HTML_PRESERVE_NODE:
+ *
+ * Macro. A preserved node in a HTML document is really implemented
+ * the same way as a CDATA section in an XML document.
+ */
+#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
+/**
+ * HTML_PI_NODE:
+ *
+ * Macro. A processing instruction in a HTML document is really implemented
+ * the same way as a processing instruction in an XML document.
+ */
+#define HTML_PI_NODE XML_PI_NODE
+
+XMLPUBFUN htmlDocPtr
+ htmlNewDoc (const xmlChar *URI,
+ const xmlChar *ExternalID);
+XMLPUBFUN htmlDocPtr
+ htmlNewDocNoDtD (const xmlChar *URI,
+ const xmlChar *ExternalID);
+XMLPUBFUN const xmlChar *
+ htmlGetMetaEncoding (htmlDocPtr doc);
+XMLPUBFUN int
+ htmlSetMetaEncoding (htmlDocPtr doc,
+ const xmlChar *encoding);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void
+ htmlDocDumpMemory (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size);
+XMLPUBFUN void
+ htmlDocDumpMemoryFormat (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size,
+ int format);
+XMLPUBFUN int
+ htmlDocDump (FILE *f,
+ xmlDocPtr cur);
+XMLPUBFUN int
+ htmlSaveFile (const char *filename,
+ xmlDocPtr cur);
+XMLPUBFUN int
+ htmlNodeDump (xmlBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur);
+XMLPUBFUN void
+ htmlNodeDumpFile (FILE *out,
+ xmlDocPtr doc,
+ xmlNodePtr cur);
+XMLPUBFUN int
+ htmlNodeDumpFileFormat (FILE *out,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN int
+ htmlSaveFileEnc (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding);
+XMLPUBFUN int
+ htmlSaveFileFormat (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+
+XMLPUBFUN void
+ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN void
+ htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding);
+XMLPUBFUN void
+ htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN void
+ htmlNodeDumpOutput (xmlOutputBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ const char *encoding);
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+XML_DEPRECATED
+XMLPUBFUN int
+ htmlIsBooleanAttr (const xmlChar *name);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_HTML_ENABLED */
+
+#endif /* __HTML_TREE_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/SAX.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/SAX.h
new file mode 100644
index 0000000000000000000000000000000000000000..c1ab58d74a18d8c1856927a81fda7f0e80af9f65
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/SAX.h
@@ -0,0 +1,18 @@
+/*
+ * Summary: Old SAX version 1 handler, deprecated
+ * Description: DEPRECATED set of SAX version 1 interfaces used to
+ * build the DOM tree.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_SAX_H__
+#define __XML_SAX_H__
+
+#ifdef __GNUC__
+ #warning "libxml/SAX.h is deprecated"
+#endif
+
+#endif /* __XML_SAX_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/SAX2.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/SAX2.h
new file mode 100644
index 0000000000000000000000000000000000000000..657acb023ee7a0eeca9ce97ff9e3a75146a16181
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/SAX2.h
@@ -0,0 +1,170 @@
+/*
+ * Summary: SAX2 parser interface used to build the DOM tree
+ * Description: those are the default SAX2 interfaces used by
+ * the library when building DOM tree.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SAX2_H__
+#define __XML_SAX2_H__
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+XMLPUBFUN const xmlChar *
+ xmlSAX2GetPublicId (void *ctx);
+XMLPUBFUN const xmlChar *
+ xmlSAX2GetSystemId (void *ctx);
+XMLPUBFUN void
+ xmlSAX2SetDocumentLocator (void *ctx,
+ xmlSAXLocatorPtr loc);
+
+XMLPUBFUN int
+ xmlSAX2GetLineNumber (void *ctx);
+XMLPUBFUN int
+ xmlSAX2GetColumnNumber (void *ctx);
+
+XMLPUBFUN int
+ xmlSAX2IsStandalone (void *ctx);
+XMLPUBFUN int
+ xmlSAX2HasInternalSubset (void *ctx);
+XMLPUBFUN int
+ xmlSAX2HasExternalSubset (void *ctx);
+
+XMLPUBFUN void
+ xmlSAX2InternalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN void
+ xmlSAX2ExternalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlEntityPtr
+ xmlSAX2GetEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr
+ xmlSAX2GetParameterEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlParserInputPtr
+ xmlSAX2ResolveEntity (void *ctx,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+
+XMLPUBFUN void
+ xmlSAX2EntityDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ xmlChar *content);
+XMLPUBFUN void
+ xmlSAX2AttributeDecl (void *ctx,
+ const xmlChar *elem,
+ const xmlChar *fullname,
+ int type,
+ int def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+XMLPUBFUN void
+ xmlSAX2ElementDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ xmlElementContentPtr content);
+XMLPUBFUN void
+ xmlSAX2NotationDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+XMLPUBFUN void
+ xmlSAX2UnparsedEntityDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ const xmlChar *notationName);
+
+XMLPUBFUN void
+ xmlSAX2StartDocument (void *ctx);
+XMLPUBFUN void
+ xmlSAX2EndDocument (void *ctx);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlSAX2StartElement (void *ctx,
+ const xmlChar *fullname,
+ const xmlChar **atts);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlSAX2EndElement (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN void
+ xmlSAX2StartElementNs (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI,
+ int nb_namespaces,
+ const xmlChar **namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const xmlChar **attributes);
+XMLPUBFUN void
+ xmlSAX2EndElementNs (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI);
+XMLPUBFUN void
+ xmlSAX2Reference (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN void
+ xmlSAX2Characters (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void
+ xmlSAX2IgnorableWhitespace (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void
+ xmlSAX2ProcessingInstruction (void *ctx,
+ const xmlChar *target,
+ const xmlChar *data);
+XMLPUBFUN void
+ xmlSAX2Comment (void *ctx,
+ const xmlChar *value);
+XMLPUBFUN void
+ xmlSAX2CDataBlock (void *ctx,
+ const xmlChar *value,
+ int len);
+
+#ifdef LIBXML_SAX1_ENABLED
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlSAXDefaultVersion (int version);
+#endif /* LIBXML_SAX1_ENABLED */
+
+XMLPUBFUN int
+ xmlSAXVersion (xmlSAXHandler *hdlr,
+ int version);
+XMLPUBFUN void
+ xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
+ int warning);
+#ifdef LIBXML_HTML_ENABLED
+XMLPUBFUN void
+ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
+XML_DEPRECATED
+XMLPUBFUN void
+ htmlDefaultSAXHandlerInit (void);
+#endif
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlDefaultSAXHandlerInit (void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_SAX2_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/c14n.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/c14n.h
new file mode 100644
index 0000000000000000000000000000000000000000..8ccd1cef632e920751aefa6a8b112e2be660bc2d
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/c14n.h
@@ -0,0 +1,115 @@
+/*
+ * Summary: Provide Canonical XML and Exclusive XML Canonicalization
+ * Description: the c14n modules provides a
+ *
+ * "Canonical XML" implementation
+ * http://www.w3.org/TR/xml-c14n
+ *
+ * and an
+ *
+ * "Exclusive XML Canonicalization" implementation
+ * http://www.w3.org/TR/xml-exc-c14n
+
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Aleksey Sanin
+ */
+#ifndef __XML_C14N_H__
+#define __XML_C14N_H__
+
+#include
+
+#ifdef LIBXML_C14N_ENABLED
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*
+ * XML Canonicalization
+ * http://www.w3.org/TR/xml-c14n
+ *
+ * Exclusive XML Canonicalization
+ * http://www.w3.org/TR/xml-exc-c14n
+ *
+ * Canonical form of an XML document could be created if and only if
+ * a) default attributes (if any) are added to all nodes
+ * b) all character and parsed entity references are resolved
+ * In order to achieve this in libxml2 the document MUST be loaded with
+ * following options: XML_PARSE_DTDATTR | XML_PARSE_NOENT
+ */
+
+/*
+ * xmlC14NMode:
+ *
+ * Predefined values for C14N modes
+ *
+ */
+typedef enum {
+ XML_C14N_1_0 = 0, /* Original C14N 1.0 spec */
+ XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
+ XML_C14N_1_1 = 2 /* C14N 1.1 spec */
+} xmlC14NMode;
+
+XMLPUBFUN int
+ xmlC14NDocSaveTo (xmlDocPtr doc,
+ xmlNodeSetPtr nodes,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ xmlOutputBufferPtr buf);
+
+XMLPUBFUN int
+ xmlC14NDocDumpMemory (xmlDocPtr doc,
+ xmlNodeSetPtr nodes,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ xmlChar **doc_txt_ptr);
+
+XMLPUBFUN int
+ xmlC14NDocSave (xmlDocPtr doc,
+ xmlNodeSetPtr nodes,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ const char* filename,
+ int compression);
+
+
+/**
+ * This is the core C14N function
+ */
+/**
+ * xmlC14NIsVisibleCallback:
+ * @user_data: user data
+ * @node: the current node
+ * @parent: the parent node
+ *
+ * Signature for a C14N callback on visible nodes
+ *
+ * Returns 1 if the node should be included
+ */
+typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
+ xmlNodePtr node,
+ xmlNodePtr parent);
+
+XMLPUBFUN int
+ xmlC14NExecute (xmlDocPtr doc,
+ xmlC14NIsVisibleCallback is_visible_callback,
+ void* user_data,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ xmlOutputBufferPtr buf);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* LIBXML_C14N_ENABLED */
+#endif /* __XML_C14N_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/catalog.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/catalog.h
new file mode 100644
index 0000000000000000000000000000000000000000..442092a4ba30eabb0b108de5815cca1ecbe8342e
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/catalog.h
@@ -0,0 +1,183 @@
+/**
+ * Summary: interfaces to the Catalog handling system
+ * Description: the catalog module implements the support for
+ * XML Catalogs and SGML catalogs
+ *
+ * SGML Open Technical Resolution TR9401:1997.
+ * http://www.jclark.com/sp/catalog.htm
+ *
+ * XML Catalogs Working Draft 06 August 2001
+ * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_CATALOG_H__
+#define __XML_CATALOG_H__
+
+#include
+
+#include
+#include
+#include
+
+#ifdef LIBXML_CATALOG_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XML_CATALOGS_NAMESPACE:
+ *
+ * The namespace for the XML Catalogs elements.
+ */
+#define XML_CATALOGS_NAMESPACE \
+ (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
+/**
+ * XML_CATALOG_PI:
+ *
+ * The specific XML Catalog Processing Instruction name.
+ */
+#define XML_CATALOG_PI \
+ (const xmlChar *) "oasis-xml-catalog"
+
+/*
+ * The API is voluntarily limited to general cataloging.
+ */
+typedef enum {
+ XML_CATA_PREFER_NONE = 0,
+ XML_CATA_PREFER_PUBLIC = 1,
+ XML_CATA_PREFER_SYSTEM
+} xmlCatalogPrefer;
+
+typedef enum {
+ XML_CATA_ALLOW_NONE = 0,
+ XML_CATA_ALLOW_GLOBAL = 1,
+ XML_CATA_ALLOW_DOCUMENT = 2,
+ XML_CATA_ALLOW_ALL = 3
+} xmlCatalogAllow;
+
+typedef struct _xmlCatalog xmlCatalog;
+typedef xmlCatalog *xmlCatalogPtr;
+
+/*
+ * Operations on a given catalog.
+ */
+XMLPUBFUN xmlCatalogPtr
+ xmlNewCatalog (int sgml);
+XMLPUBFUN xmlCatalogPtr
+ xmlLoadACatalog (const char *filename);
+XMLPUBFUN xmlCatalogPtr
+ xmlLoadSGMLSuperCatalog (const char *filename);
+XMLPUBFUN int
+ xmlConvertSGMLCatalog (xmlCatalogPtr catal);
+XMLPUBFUN int
+ xmlACatalogAdd (xmlCatalogPtr catal,
+ const xmlChar *type,
+ const xmlChar *orig,
+ const xmlChar *replace);
+XMLPUBFUN int
+ xmlACatalogRemove (xmlCatalogPtr catal,
+ const xmlChar *value);
+XMLPUBFUN xmlChar *
+ xmlACatalogResolve (xmlCatalogPtr catal,
+ const xmlChar *pubID,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar *
+ xmlACatalogResolveSystem(xmlCatalogPtr catal,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar *
+ xmlACatalogResolvePublic(xmlCatalogPtr catal,
+ const xmlChar *pubID);
+XMLPUBFUN xmlChar *
+ xmlACatalogResolveURI (xmlCatalogPtr catal,
+ const xmlChar *URI);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void
+ xmlACatalogDump (xmlCatalogPtr catal,
+ FILE *out);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN void
+ xmlFreeCatalog (xmlCatalogPtr catal);
+XMLPUBFUN int
+ xmlCatalogIsEmpty (xmlCatalogPtr catal);
+
+/*
+ * Global operations.
+ */
+XMLPUBFUN void
+ xmlInitializeCatalog (void);
+XMLPUBFUN int
+ xmlLoadCatalog (const char *filename);
+XMLPUBFUN void
+ xmlLoadCatalogs (const char *paths);
+XMLPUBFUN void
+ xmlCatalogCleanup (void);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void
+ xmlCatalogDump (FILE *out);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN xmlChar *
+ xmlCatalogResolve (const xmlChar *pubID,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar *
+ xmlCatalogResolveSystem (const xmlChar *sysID);
+XMLPUBFUN xmlChar *
+ xmlCatalogResolvePublic (const xmlChar *pubID);
+XMLPUBFUN xmlChar *
+ xmlCatalogResolveURI (const xmlChar *URI);
+XMLPUBFUN int
+ xmlCatalogAdd (const xmlChar *type,
+ const xmlChar *orig,
+ const xmlChar *replace);
+XMLPUBFUN int
+ xmlCatalogRemove (const xmlChar *value);
+XMLPUBFUN xmlDocPtr
+ xmlParseCatalogFile (const char *filename);
+XMLPUBFUN int
+ xmlCatalogConvert (void);
+
+/*
+ * Strictly minimal interfaces for per-document catalogs used
+ * by the parser.
+ */
+XMLPUBFUN void
+ xmlCatalogFreeLocal (void *catalogs);
+XMLPUBFUN void *
+ xmlCatalogAddLocal (void *catalogs,
+ const xmlChar *URL);
+XMLPUBFUN xmlChar *
+ xmlCatalogLocalResolve (void *catalogs,
+ const xmlChar *pubID,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar *
+ xmlCatalogLocalResolveURI(void *catalogs,
+ const xmlChar *URI);
+/*
+ * Preference settings.
+ */
+XMLPUBFUN int
+ xmlCatalogSetDebug (int level);
+XML_DEPRECATED
+XMLPUBFUN xmlCatalogPrefer
+ xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
+XMLPUBFUN void
+ xmlCatalogSetDefaults (xmlCatalogAllow allow);
+XMLPUBFUN xmlCatalogAllow
+ xmlCatalogGetDefaults (void);
+
+
+/* DEPRECATED interfaces */
+XMLPUBFUN const xmlChar *
+ xmlCatalogGetSystem (const xmlChar *sysID);
+XMLPUBFUN const xmlChar *
+ xmlCatalogGetPublic (const xmlChar *pubID);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* LIBXML_CATALOG_ENABLED */
+#endif /* __XML_CATALOG_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/chvalid.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/chvalid.h
new file mode 100644
index 0000000000000000000000000000000000000000..8225c95ee865f9639f46bd22db54932f257df52c
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/chvalid.h
@@ -0,0 +1,230 @@
+/*
+ * Summary: Unicode character range checking
+ * Description: this module exports interfaces for the character
+ * range validation APIs
+ *
+ * This file is automatically generated from the cvs source
+ * definition files using the genChRanges.py Python script
+ *
+ * Generation date: Mon Mar 27 11:09:48 2006
+ * Sources: chvalid.def
+ * Author: William Brack
+ */
+
+#ifndef __XML_CHVALID_H__
+#define __XML_CHVALID_H__
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Define our typedefs and structures
+ *
+ */
+typedef struct _xmlChSRange xmlChSRange;
+typedef xmlChSRange *xmlChSRangePtr;
+struct _xmlChSRange {
+ unsigned short low;
+ unsigned short high;
+};
+
+typedef struct _xmlChLRange xmlChLRange;
+typedef xmlChLRange *xmlChLRangePtr;
+struct _xmlChLRange {
+ unsigned int low;
+ unsigned int high;
+};
+
+typedef struct _xmlChRangeGroup xmlChRangeGroup;
+typedef xmlChRangeGroup *xmlChRangeGroupPtr;
+struct _xmlChRangeGroup {
+ int nbShortRange;
+ int nbLongRange;
+ const xmlChSRange *shortRange; /* points to an array of ranges */
+ const xmlChLRange *longRange;
+};
+
+/**
+ * Range checking routine
+ */
+XMLPUBFUN int
+ xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
+
+
+/**
+ * xmlIsBaseChar_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
+ ((0x61 <= (c)) && ((c) <= 0x7a)) || \
+ ((0xc0 <= (c)) && ((c) <= 0xd6)) || \
+ ((0xd8 <= (c)) && ((c) <= 0xf6)) || \
+ (0xf8 <= (c)))
+
+/**
+ * xmlIsBaseCharQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBaseCharQ(c) (((c) < 0x100) ? \
+ xmlIsBaseChar_ch((c)) : \
+ xmlCharInRange((c), &xmlIsBaseCharGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
+
+/**
+ * xmlIsBlank_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBlank_ch(c) (((c) == 0x20) || \
+ ((0x9 <= (c)) && ((c) <= 0xa)) || \
+ ((c) == 0xd))
+
+/**
+ * xmlIsBlankQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBlankQ(c) (((c) < 0x100) ? \
+ xmlIsBlank_ch((c)) : 0)
+
+
+/**
+ * xmlIsChar_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \
+ ((c) == 0xd) || \
+ (0x20 <= (c)))
+
+/**
+ * xmlIsCharQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsCharQ(c) (((c) < 0x100) ? \
+ xmlIsChar_ch((c)) :\
+ (((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
+ ((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
+ ((0x10000 <= (c)) && ((c) <= 0x10ffff))))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
+
+/**
+ * xmlIsCombiningQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsCombiningQ(c) (((c) < 0x100) ? \
+ 0 : \
+ xmlCharInRange((c), &xmlIsCombiningGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
+
+/**
+ * xmlIsDigit_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39)))
+
+/**
+ * xmlIsDigitQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsDigitQ(c) (((c) < 0x100) ? \
+ xmlIsDigit_ch((c)) : \
+ xmlCharInRange((c), &xmlIsDigitGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
+
+/**
+ * xmlIsExtender_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsExtender_ch(c) (((c) == 0xb7))
+
+/**
+ * xmlIsExtenderQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsExtenderQ(c) (((c) < 0x100) ? \
+ xmlIsExtender_ch((c)) : \
+ xmlCharInRange((c), &xmlIsExtenderGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
+
+/**
+ * xmlIsIdeographicQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsIdeographicQ(c) (((c) < 0x100) ? \
+ 0 :\
+ (((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
+ ((c) == 0x3007) || \
+ ((0x3021 <= (c)) && ((c) <= 0x3029))))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
+XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
+
+/**
+ * xmlIsPubidChar_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)])
+
+/**
+ * xmlIsPubidCharQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
+ xmlIsPubidChar_ch((c)) : 0)
+
+XMLPUBFUN int
+ xmlIsBaseChar(unsigned int ch);
+XMLPUBFUN int
+ xmlIsBlank(unsigned int ch);
+XMLPUBFUN int
+ xmlIsChar(unsigned int ch);
+XMLPUBFUN int
+ xmlIsCombining(unsigned int ch);
+XMLPUBFUN int
+ xmlIsDigit(unsigned int ch);
+XMLPUBFUN int
+ xmlIsExtender(unsigned int ch);
+XMLPUBFUN int
+ xmlIsIdeographic(unsigned int ch);
+XMLPUBFUN int
+ xmlIsPubidChar(unsigned int ch);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_CHVALID_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/debugXML.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/debugXML.h
new file mode 100644
index 0000000000000000000000000000000000000000..55148d9d86e03681356f807470beed6c7726b5b6
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/debugXML.h
@@ -0,0 +1,79 @@
+/*
+ * Summary: Tree debugging APIs
+ * Description: Interfaces to a set of routines used for debugging the tree
+ * produced by the XML parser.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __DEBUG_XML__
+#define __DEBUG_XML__
+#include
+#include
+#include
+
+#ifdef LIBXML_DEBUG_ENABLED
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The standard Dump routines.
+ */
+XMLPUBFUN void
+ xmlDebugDumpString (FILE *output,
+ const xmlChar *str);
+XMLPUBFUN void
+ xmlDebugDumpAttr (FILE *output,
+ xmlAttrPtr attr,
+ int depth);
+XMLPUBFUN void
+ xmlDebugDumpAttrList (FILE *output,
+ xmlAttrPtr attr,
+ int depth);
+XMLPUBFUN void
+ xmlDebugDumpOneNode (FILE *output,
+ xmlNodePtr node,
+ int depth);
+XMLPUBFUN void
+ xmlDebugDumpNode (FILE *output,
+ xmlNodePtr node,
+ int depth);
+XMLPUBFUN void
+ xmlDebugDumpNodeList (FILE *output,
+ xmlNodePtr node,
+ int depth);
+XMLPUBFUN void
+ xmlDebugDumpDocumentHead(FILE *output,
+ xmlDocPtr doc);
+XMLPUBFUN void
+ xmlDebugDumpDocument (FILE *output,
+ xmlDocPtr doc);
+XMLPUBFUN void
+ xmlDebugDumpDTD (FILE *output,
+ xmlDtdPtr dtd);
+XMLPUBFUN void
+ xmlDebugDumpEntities (FILE *output,
+ xmlDocPtr doc);
+
+/****************************************************************
+ * *
+ * Checking routines *
+ * *
+ ****************************************************************/
+
+XMLPUBFUN int
+ xmlDebugCheckDocument (FILE * output,
+ xmlDocPtr doc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_DEBUG_ENABLED */
+#endif /* __DEBUG_XML__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/dict.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/dict.h
new file mode 100644
index 0000000000000000000000000000000000000000..22aa3d9db8b56b252b28c3ef17b814f6c6df44c0
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/dict.h
@@ -0,0 +1,82 @@
+/*
+ * Summary: string dictionary
+ * Description: dictionary of reusable strings, just used to avoid allocation
+ * and freeing operations.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_DICT_H__
+#define __XML_DICT_H__
+
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The dictionary.
+ */
+typedef struct _xmlDict xmlDict;
+typedef xmlDict *xmlDictPtr;
+
+/*
+ * Initializer
+ */
+XML_DEPRECATED
+XMLPUBFUN int xmlInitializeDict(void);
+
+/*
+ * Constructor and destructor.
+ */
+XMLPUBFUN xmlDictPtr
+ xmlDictCreate (void);
+XMLPUBFUN size_t
+ xmlDictSetLimit (xmlDictPtr dict,
+ size_t limit);
+XMLPUBFUN size_t
+ xmlDictGetUsage (xmlDictPtr dict);
+XMLPUBFUN xmlDictPtr
+ xmlDictCreateSub(xmlDictPtr sub);
+XMLPUBFUN int
+ xmlDictReference(xmlDictPtr dict);
+XMLPUBFUN void
+ xmlDictFree (xmlDictPtr dict);
+
+/*
+ * Lookup of entry in the dictionary.
+ */
+XMLPUBFUN const xmlChar *
+ xmlDictLookup (xmlDictPtr dict,
+ const xmlChar *name,
+ int len);
+XMLPUBFUN const xmlChar *
+ xmlDictExists (xmlDictPtr dict,
+ const xmlChar *name,
+ int len);
+XMLPUBFUN const xmlChar *
+ xmlDictQLookup (xmlDictPtr dict,
+ const xmlChar *prefix,
+ const xmlChar *name);
+XMLPUBFUN int
+ xmlDictOwns (xmlDictPtr dict,
+ const xmlChar *str);
+XMLPUBFUN int
+ xmlDictSize (xmlDictPtr dict);
+
+/*
+ * Cleanup function
+ */
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlDictCleanup (void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ! __XML_DICT_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/encoding.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/encoding.h
new file mode 100644
index 0000000000000000000000000000000000000000..9a358dbb22478993500d33315ec19aa7b39098b3
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/encoding.h
@@ -0,0 +1,307 @@
+/*
+ * Summary: interface for the encoding conversion functions
+ * Description: interface for the encoding conversion functions needed for
+ * XML basic encoding and iconv() support.
+ *
+ * Related specs are
+ * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies
+ * [ISO-10646] UTF-8 and UTF-16 in Annexes
+ * [ISO-8859-1] ISO Latin-1 characters codes.
+ * [UNICODE] The Unicode Consortium, "The Unicode Standard --
+ * Worldwide Character Encoding -- Version 1.0", Addison-
+ * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is
+ * described in Unicode Technical Report #4.
+ * [US-ASCII] Coded Character Set--7-bit American Standard Code for
+ * Information Interchange, ANSI X3.4-1986.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_CHAR_ENCODING_H__
+#define __XML_CHAR_ENCODING_H__
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Backward compatibility
+ */
+#define UTF8Toisolat1 xmlUTF8ToIsolat1
+#define isolat1ToUTF8 xmlIsolat1ToUTF8
+
+typedef enum {
+ XML_ENC_ERR_SUCCESS = 0,
+ XML_ENC_ERR_INTERNAL = -1,
+ XML_ENC_ERR_INPUT = -2,
+ XML_ENC_ERR_SPACE = -3,
+ XML_ENC_ERR_MEMORY = -4
+} xmlCharEncError;
+
+/*
+ * xmlCharEncoding:
+ *
+ * Predefined values for some standard encodings.
+ */
+typedef enum {
+ XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
+ XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
+ XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
+ XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
+ XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
+ XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
+ XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
+ XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
+ XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
+ XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
+ XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
+ XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
+ XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
+ XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
+ XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
+ XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
+ XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
+ XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
+ XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
+ XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
+ XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
+ XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
+ XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
+ XML_CHAR_ENCODING_ASCII= 22,/* pure ASCII */
+ /* Available since 2.14.0 */
+ XML_CHAR_ENCODING_UTF16= 23,/* UTF-16 native */
+ XML_CHAR_ENCODING_HTML= 24,/* HTML (output only) */
+ XML_CHAR_ENCODING_8859_10= 25,/* ISO-8859-10 */
+ XML_CHAR_ENCODING_8859_11= 26,/* ISO-8859-11 */
+ XML_CHAR_ENCODING_8859_13= 27,/* ISO-8859-13 */
+ XML_CHAR_ENCODING_8859_14= 28,/* ISO-8859-14 */
+ XML_CHAR_ENCODING_8859_15= 29,/* ISO-8859-15 */
+ XML_CHAR_ENCODING_8859_16= 30 /* ISO-8859-16 */
+} xmlCharEncoding;
+
+typedef enum {
+ XML_ENC_INPUT = (1 << 0),
+ XML_ENC_OUTPUT = (1 << 1)
+} xmlCharEncFlags;
+
+/**
+ * xmlCharEncodingInputFunc:
+ * @out: a pointer to an array of bytes to store the UTF-8 result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of chars in the original encoding
+ * @inlen: the length of @in
+ *
+ * Convert characters to UTF-8.
+ *
+ * On success, the value of @inlen after return is the number of
+ * bytes consumed and @outlen is the number of bytes produced.
+ *
+ * Returns the number of bytes written or an XML_ENC_ERR code.
+ */
+typedef int (*xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
+ const unsigned char *in, int *inlen);
+
+
+/**
+ * xmlCharEncodingOutputFunc:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ *
+ * Convert characters from UTF-8.
+ *
+ * On success, the value of @inlen after return is the number of
+ * bytes consumed and @outlen is the number of bytes produced.
+ *
+ * Returns the number of bytes written or an XML_ENC_ERR code.
+ */
+typedef int (*xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
+ const unsigned char *in, int *inlen);
+
+
+/**
+ * xmlCharEncConvFunc:
+ * @vctxt: conversion context
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of input bytes
+ * @inlen: the length of @in
+ * @flush: end of input
+ *
+ * Convert between character encodings.
+ *
+ * The value of @inlen after return is the number of bytes consumed
+ * and @outlen is the number of bytes produced.
+ *
+ * If the converter can consume partial multi-byte sequences, the
+ * @flush flag can be used to detect truncated sequences at EOF.
+ * Otherwise, the flag can be ignored.
+ *
+ * Returns an XML_ENC_ERR code.
+ */
+typedef xmlCharEncError
+(*xmlCharEncConvFunc)(void *vctxt, unsigned char *out, int *outlen,
+ const unsigned char *in, int *inlen, int flush);
+
+/**
+ * xmlCharEncConvCtxtDtor:
+ * @vctxt: conversion context
+ *
+ * Free a conversion context.
+ */
+typedef void
+(*xmlCharEncConvCtxtDtor)(void *vctxt);
+
+/*
+ * Block defining the handlers for non UTF-8 encodings.
+ *
+ * This structure will be made private.
+ */
+typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
+typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
+struct _xmlCharEncodingHandler {
+ char *name XML_DEPRECATED_MEMBER;
+ union {
+ xmlCharEncConvFunc func;
+ xmlCharEncodingInputFunc legacyFunc;
+ } input XML_DEPRECATED_MEMBER;
+ union {
+ xmlCharEncConvFunc func;
+ xmlCharEncodingOutputFunc legacyFunc;
+ } output XML_DEPRECATED_MEMBER;
+ void *inputCtxt XML_DEPRECATED_MEMBER;
+ void *outputCtxt XML_DEPRECATED_MEMBER;
+ xmlCharEncConvCtxtDtor ctxtDtor XML_DEPRECATED_MEMBER;
+ int flags XML_DEPRECATED_MEMBER;
+};
+
+/**
+ * xmlCharEncConvImpl:
+ * @vctxt: user data
+ * @name: encoding name
+ * @flags: bit mask of flags
+ * @out: pointer to resulting handler
+ *
+ * If this function returns XML_ERR_OK, it must fill the @out
+ * pointer with an encoding handler. The handler can be obtained
+ * from xmlCharEncNewCustomHandler.
+ *
+ * @flags can contain XML_ENC_INPUT, XML_ENC_OUTPUT or both.
+ *
+ * Returns an xmlParserErrors code.
+ */
+typedef xmlParserErrors
+(*xmlCharEncConvImpl)(void *vctxt, const char *name, xmlCharEncFlags flags,
+ xmlCharEncodingHandler **out);
+
+/*
+ * Interfaces for encoding handlers.
+ */
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlInitCharEncodingHandlers (void);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlCleanupCharEncodingHandlers (void);
+XMLPUBFUN void
+ xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
+XMLPUBFUN xmlParserErrors
+ xmlLookupCharEncodingHandler (xmlCharEncoding enc,
+ xmlCharEncodingHandlerPtr *out);
+XMLPUBFUN xmlParserErrors
+ xmlOpenCharEncodingHandler (const char *name,
+ int output,
+ xmlCharEncodingHandlerPtr *out);
+XMLPUBFUN xmlParserErrors
+ xmlCreateCharEncodingHandler (const char *name,
+ xmlCharEncFlags flags,
+ xmlCharEncConvImpl impl,
+ void *implCtxt,
+ xmlCharEncodingHandlerPtr *out);
+XMLPUBFUN xmlCharEncodingHandlerPtr
+ xmlGetCharEncodingHandler (xmlCharEncoding enc);
+XMLPUBFUN xmlCharEncodingHandlerPtr
+ xmlFindCharEncodingHandler (const char *name);
+XMLPUBFUN xmlCharEncodingHandlerPtr
+ xmlNewCharEncodingHandler (const char *name,
+ xmlCharEncodingInputFunc input,
+ xmlCharEncodingOutputFunc output);
+XMLPUBFUN xmlParserErrors
+ xmlCharEncNewCustomHandler (const char *name,
+ xmlCharEncConvFunc input,
+ xmlCharEncConvFunc output,
+ xmlCharEncConvCtxtDtor ctxtDtor,
+ void *inputCtxt,
+ void *outputCtxt,
+ xmlCharEncodingHandler **out);
+
+/*
+ * Interfaces for encoding names and aliases.
+ */
+XMLPUBFUN int
+ xmlAddEncodingAlias (const char *name,
+ const char *alias);
+XMLPUBFUN int
+ xmlDelEncodingAlias (const char *alias);
+XMLPUBFUN const char *
+ xmlGetEncodingAlias (const char *alias);
+XMLPUBFUN void
+ xmlCleanupEncodingAliases (void);
+XMLPUBFUN xmlCharEncoding
+ xmlParseCharEncoding (const char *name);
+XMLPUBFUN const char *
+ xmlGetCharEncodingName (xmlCharEncoding enc);
+
+/*
+ * Interfaces directly used by the parsers.
+ */
+XMLPUBFUN xmlCharEncoding
+ xmlDetectCharEncoding (const unsigned char *in,
+ int len);
+
+/** DOC_DISABLE */
+struct _xmlBuffer;
+/** DOC_ENABLE */
+XMLPUBFUN int
+ xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
+ struct _xmlBuffer *out,
+ struct _xmlBuffer *in);
+
+XMLPUBFUN int
+ xmlCharEncInFunc (xmlCharEncodingHandler *handler,
+ struct _xmlBuffer *out,
+ struct _xmlBuffer *in);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
+ struct _xmlBuffer *out,
+ struct _xmlBuffer *in);
+XMLPUBFUN int
+ xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
+
+/*
+ * Export a few useful functions
+ */
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN int
+ xmlUTF8ToIsolat1 (unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN int
+ xmlIsolat1ToUTF8 (unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_CHAR_ENCODING_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/entities.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/entities.h
new file mode 100644
index 0000000000000000000000000000000000000000..d17c36bebcb6c3b022bf52cb5b0a2946141cbba0
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/entities.h
@@ -0,0 +1,147 @@
+/*
+ * Summary: interface for the XML entities handling
+ * Description: this module provides some of the entity API needed
+ * for the parser and applications.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_ENTITIES_H__
+#define __XML_ENTITIES_H__
+
+/** DOC_DISABLE */
+#include
+#define XML_TREE_INTERNALS
+#include
+#undef XML_TREE_INTERNALS
+/** DOC_ENABLE */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The different valid entity types.
+ */
+typedef enum {
+ XML_INTERNAL_GENERAL_ENTITY = 1,
+ XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
+ XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
+ XML_INTERNAL_PARAMETER_ENTITY = 4,
+ XML_EXTERNAL_PARAMETER_ENTITY = 5,
+ XML_INTERNAL_PREDEFINED_ENTITY = 6
+} xmlEntityType;
+
+/*
+ * An unit of storage for an entity, contains the string, the value
+ * and the linkind data needed for the linking in the hash table.
+ */
+
+struct _xmlEntity {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
+ const xmlChar *name; /* Entity name */
+ struct _xmlNode *children; /* First child link */
+ struct _xmlNode *last; /* Last child link */
+ struct _xmlDtd *parent; /* -> DTD */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ xmlChar *orig; /* content without ref substitution */
+ xmlChar *content; /* content or ndata if unparsed */
+ int length; /* the content length */
+ xmlEntityType etype; /* The entity type */
+ const xmlChar *ExternalID; /* External identifier for PUBLIC */
+ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
+
+ struct _xmlEntity *nexte; /* unused */
+ const xmlChar *URI; /* the full URI as computed */
+ int owner; /* unused */
+ int flags; /* various flags */
+ unsigned long expandedSize; /* expanded size */
+};
+
+/*
+ * All entities are stored in an hash table.
+ * There is 2 separate hash tables for global and parameter entities.
+ */
+
+typedef struct _xmlHashTable xmlEntitiesTable;
+typedef xmlEntitiesTable *xmlEntitiesTablePtr;
+
+/*
+ * External functions:
+ */
+
+XMLPUBFUN xmlEntityPtr
+ xmlNewEntity (xmlDocPtr doc,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content);
+XMLPUBFUN void
+ xmlFreeEntity (xmlEntityPtr entity);
+XMLPUBFUN int
+ xmlAddEntity (xmlDocPtr doc,
+ int extSubset,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content,
+ xmlEntityPtr *out);
+XMLPUBFUN xmlEntityPtr
+ xmlAddDocEntity (xmlDocPtr doc,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content);
+XMLPUBFUN xmlEntityPtr
+ xmlAddDtdEntity (xmlDocPtr doc,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content);
+XMLPUBFUN xmlEntityPtr
+ xmlGetPredefinedEntity (const xmlChar *name);
+XMLPUBFUN xmlEntityPtr
+ xmlGetDocEntity (const xmlDoc *doc,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr
+ xmlGetDtdEntity (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr
+ xmlGetParameterEntity (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlChar *
+ xmlEncodeEntitiesReentrant(xmlDocPtr doc,
+ const xmlChar *input);
+XMLPUBFUN xmlChar *
+ xmlEncodeSpecialChars (const xmlDoc *doc,
+ const xmlChar *input);
+XMLPUBFUN xmlEntitiesTablePtr
+ xmlCreateEntitiesTable (void);
+XMLPUBFUN xmlEntitiesTablePtr
+ xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
+XMLPUBFUN void
+ xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void
+ xmlDumpEntitiesTable (xmlBufferPtr buf,
+ xmlEntitiesTablePtr table);
+XMLPUBFUN void
+ xmlDumpEntityDecl (xmlBufferPtr buf,
+ xmlEntityPtr ent);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+# endif /* __XML_ENTITIES_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/globals.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/globals.h
new file mode 100644
index 0000000000000000000000000000000000000000..a5db8026f511c94845a91ca86ddb8d59a2d271bd
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/globals.h
@@ -0,0 +1,25 @@
+/*
+ * Summary: interface for all global variables of the library
+ * Description: Deprecated, don't use
+ *
+ * Copy: See Copyright for the status of this software.
+ */
+
+#ifndef __XML_GLOBALS_H
+#define __XML_GLOBALS_H
+
+#include
+
+/*
+ * This file was required to access global variables until version v2.12.0.
+ *
+ * These includes are for backward compatibility.
+ */
+#include
+#include
+#include
+#include
+#include
+#include
+
+#endif /* __XML_GLOBALS_H */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/hash.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/hash.h
new file mode 100644
index 0000000000000000000000000000000000000000..135b69669b38b65abc7ef51476ad532f2923042e
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/hash.h
@@ -0,0 +1,251 @@
+/*
+ * Summary: Chained hash tables
+ * Description: This module implements the hash table support used in
+ * various places in the library.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Bjorn Reese
+ */
+
+#ifndef __XML_HASH_H__
+#define __XML_HASH_H__
+
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The hash table.
+ */
+typedef struct _xmlHashTable xmlHashTable;
+typedef xmlHashTable *xmlHashTablePtr;
+
+/*
+ * Recent version of gcc produce a warning when a function pointer is assigned
+ * to an object pointer, or vice versa. The following macro is a dirty hack
+ * to allow suppression of the warning. If your architecture has function
+ * pointers which are a different size than a void pointer, there may be some
+ * serious trouble within the library.
+ */
+/**
+ * XML_CAST_FPTR:
+ * @fptr: pointer to a function
+ *
+ * Macro to do a casting from an object pointer to a
+ * function pointer without encountering a warning from
+ * gcc
+ *
+ * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
+ * This macro violated ISO C aliasing rules (gcc4 on s390 broke)
+ * so it is disabled now
+ */
+
+#define XML_CAST_FPTR(fptr) fptr
+
+/*
+ * function types:
+ */
+/**
+ * xmlHashDeallocator:
+ * @payload: the data in the hash
+ * @name: the name associated
+ *
+ * Callback to free data from a hash.
+ */
+typedef void (*xmlHashDeallocator)(void *payload, const xmlChar *name);
+/**
+ * xmlHashCopier:
+ * @payload: the data in the hash
+ * @name: the name associated
+ *
+ * Callback to copy data from a hash.
+ *
+ * Returns a copy of the data or NULL in case of error.
+ */
+typedef void *(*xmlHashCopier)(void *payload, const xmlChar *name);
+/**
+ * xmlHashScanner:
+ * @payload: the data in the hash
+ * @data: extra scanner data
+ * @name: the name associated
+ *
+ * Callback when scanning data in a hash with the simple scanner.
+ */
+typedef void (*xmlHashScanner)(void *payload, void *data, const xmlChar *name);
+/**
+ * xmlHashScannerFull:
+ * @payload: the data in the hash
+ * @data: extra scanner data
+ * @name: the name associated
+ * @name2: the second name associated
+ * @name3: the third name associated
+ *
+ * Callback when scanning data in a hash with the full scanner.
+ */
+typedef void (*xmlHashScannerFull)(void *payload, void *data,
+ const xmlChar *name, const xmlChar *name2,
+ const xmlChar *name3);
+
+/*
+ * Constructor and destructor.
+ */
+XMLPUBFUN xmlHashTablePtr
+ xmlHashCreate (int size);
+XMLPUBFUN xmlHashTablePtr
+ xmlHashCreateDict (int size,
+ xmlDictPtr dict);
+XMLPUBFUN void
+ xmlHashFree (xmlHashTablePtr hash,
+ xmlHashDeallocator dealloc);
+XMLPUBFUN void
+ xmlHashDefaultDeallocator(void *entry,
+ const xmlChar *name);
+
+/*
+ * Add a new entry to the hash table.
+ */
+XMLPUBFUN int
+ xmlHashAdd (xmlHashTablePtr hash,
+ const xmlChar *name,
+ void *userdata);
+XMLPUBFUN int
+ xmlHashAddEntry (xmlHashTablePtr hash,
+ const xmlChar *name,
+ void *userdata);
+XMLPUBFUN int
+ xmlHashUpdateEntry (xmlHashTablePtr hash,
+ const xmlChar *name,
+ void *userdata,
+ xmlHashDeallocator dealloc);
+XMLPUBFUN int
+ xmlHashAdd2 (xmlHashTablePtr hash,
+ const xmlChar *name,
+ const xmlChar *name2,
+ void *userdata);
+XMLPUBFUN int
+ xmlHashAddEntry2 (xmlHashTablePtr hash,
+ const xmlChar *name,
+ const xmlChar *name2,
+ void *userdata);
+XMLPUBFUN int
+ xmlHashUpdateEntry2 (xmlHashTablePtr hash,
+ const xmlChar *name,
+ const xmlChar *name2,
+ void *userdata,
+ xmlHashDeallocator dealloc);
+XMLPUBFUN int
+ xmlHashAdd3 (xmlHashTablePtr hash,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ void *userdata);
+XMLPUBFUN int
+ xmlHashAddEntry3 (xmlHashTablePtr hash,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ void *userdata);
+XMLPUBFUN int
+ xmlHashUpdateEntry3 (xmlHashTablePtr hash,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ void *userdata,
+ xmlHashDeallocator dealloc);
+
+/*
+ * Remove an entry from the hash table.
+ */
+XMLPUBFUN int
+ xmlHashRemoveEntry (xmlHashTablePtr hash,
+ const xmlChar *name,
+ xmlHashDeallocator dealloc);
+XMLPUBFUN int
+ xmlHashRemoveEntry2 (xmlHashTablePtr hash,
+ const xmlChar *name,
+ const xmlChar *name2,
+ xmlHashDeallocator dealloc);
+XMLPUBFUN int
+ xmlHashRemoveEntry3 (xmlHashTablePtr hash,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ xmlHashDeallocator dealloc);
+
+/*
+ * Retrieve the payload.
+ */
+XMLPUBFUN void *
+ xmlHashLookup (xmlHashTablePtr hash,
+ const xmlChar *name);
+XMLPUBFUN void *
+ xmlHashLookup2 (xmlHashTablePtr hash,
+ const xmlChar *name,
+ const xmlChar *name2);
+XMLPUBFUN void *
+ xmlHashLookup3 (xmlHashTablePtr hash,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3);
+XMLPUBFUN void *
+ xmlHashQLookup (xmlHashTablePtr hash,
+ const xmlChar *prefix,
+ const xmlChar *name);
+XMLPUBFUN void *
+ xmlHashQLookup2 (xmlHashTablePtr hash,
+ const xmlChar *prefix,
+ const xmlChar *name,
+ const xmlChar *prefix2,
+ const xmlChar *name2);
+XMLPUBFUN void *
+ xmlHashQLookup3 (xmlHashTablePtr hash,
+ const xmlChar *prefix,
+ const xmlChar *name,
+ const xmlChar *prefix2,
+ const xmlChar *name2,
+ const xmlChar *prefix3,
+ const xmlChar *name3);
+
+/*
+ * Helpers.
+ */
+XMLPUBFUN xmlHashTablePtr
+ xmlHashCopySafe (xmlHashTablePtr hash,
+ xmlHashCopier copy,
+ xmlHashDeallocator dealloc);
+XMLPUBFUN xmlHashTablePtr
+ xmlHashCopy (xmlHashTablePtr hash,
+ xmlHashCopier copy);
+XMLPUBFUN int
+ xmlHashSize (xmlHashTablePtr hash);
+XMLPUBFUN void
+ xmlHashScan (xmlHashTablePtr hash,
+ xmlHashScanner scan,
+ void *data);
+XMLPUBFUN void
+ xmlHashScan3 (xmlHashTablePtr hash,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ xmlHashScanner scan,
+ void *data);
+XMLPUBFUN void
+ xmlHashScanFull (xmlHashTablePtr hash,
+ xmlHashScannerFull scan,
+ void *data);
+XMLPUBFUN void
+ xmlHashScanFull3 (xmlHashTablePtr hash,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ xmlHashScannerFull scan,
+ void *data);
+#ifdef __cplusplus
+}
+#endif
+#endif /* ! __XML_HASH_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/list.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/list.h
new file mode 100644
index 0000000000000000000000000000000000000000..1fa76aff0847fd3de18c942f5037bf6f12bbbb56
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/list.h
@@ -0,0 +1,137 @@
+/*
+ * Summary: lists interfaces
+ * Description: this module implement the list support used in
+ * various place in the library.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Gary Pennington
+ */
+
+#ifndef __XML_LINK_INCLUDE__
+#define __XML_LINK_INCLUDE__
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _xmlLink xmlLink;
+typedef xmlLink *xmlLinkPtr;
+
+typedef struct _xmlList xmlList;
+typedef xmlList *xmlListPtr;
+
+/**
+ * xmlListDeallocator:
+ * @lk: the data to deallocate
+ *
+ * Callback function used to free data from a list.
+ */
+typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
+/**
+ * xmlListDataCompare:
+ * @data0: the first data
+ * @data1: the second data
+ *
+ * Callback function used to compare 2 data.
+ *
+ * Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
+ */
+typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
+/**
+ * xmlListWalker:
+ * @data: the data found in the list
+ * @user: extra user provided data to the walker
+ *
+ * Callback function used when walking a list with xmlListWalk().
+ *
+ * Returns 0 to stop walking the list, 1 otherwise.
+ */
+typedef int (*xmlListWalker) (const void *data, void *user);
+
+/* Creation/Deletion */
+XMLPUBFUN xmlListPtr
+ xmlListCreate (xmlListDeallocator deallocator,
+ xmlListDataCompare compare);
+XMLPUBFUN void
+ xmlListDelete (xmlListPtr l);
+
+/* Basic Operators */
+XMLPUBFUN void *
+ xmlListSearch (xmlListPtr l,
+ void *data);
+XMLPUBFUN void *
+ xmlListReverseSearch (xmlListPtr l,
+ void *data);
+XMLPUBFUN int
+ xmlListInsert (xmlListPtr l,
+ void *data) ;
+XMLPUBFUN int
+ xmlListAppend (xmlListPtr l,
+ void *data) ;
+XMLPUBFUN int
+ xmlListRemoveFirst (xmlListPtr l,
+ void *data);
+XMLPUBFUN int
+ xmlListRemoveLast (xmlListPtr l,
+ void *data);
+XMLPUBFUN int
+ xmlListRemoveAll (xmlListPtr l,
+ void *data);
+XMLPUBFUN void
+ xmlListClear (xmlListPtr l);
+XMLPUBFUN int
+ xmlListEmpty (xmlListPtr l);
+XMLPUBFUN xmlLinkPtr
+ xmlListFront (xmlListPtr l);
+XMLPUBFUN xmlLinkPtr
+ xmlListEnd (xmlListPtr l);
+XMLPUBFUN int
+ xmlListSize (xmlListPtr l);
+
+XMLPUBFUN void
+ xmlListPopFront (xmlListPtr l);
+XMLPUBFUN void
+ xmlListPopBack (xmlListPtr l);
+XMLPUBFUN int
+ xmlListPushFront (xmlListPtr l,
+ void *data);
+XMLPUBFUN int
+ xmlListPushBack (xmlListPtr l,
+ void *data);
+
+/* Advanced Operators */
+XMLPUBFUN void
+ xmlListReverse (xmlListPtr l);
+XMLPUBFUN void
+ xmlListSort (xmlListPtr l);
+XMLPUBFUN void
+ xmlListWalk (xmlListPtr l,
+ xmlListWalker walker,
+ void *user);
+XMLPUBFUN void
+ xmlListReverseWalk (xmlListPtr l,
+ xmlListWalker walker,
+ void *user);
+XMLPUBFUN void
+ xmlListMerge (xmlListPtr l1,
+ xmlListPtr l2);
+XMLPUBFUN xmlListPtr
+ xmlListDup (xmlListPtr old);
+XMLPUBFUN int
+ xmlListCopy (xmlListPtr cur,
+ xmlListPtr old);
+/* Link operators */
+XMLPUBFUN void *
+ xmlLinkGetData (xmlLinkPtr lk);
+
+/* xmlListUnique() */
+/* xmlListSwap */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_LINK_INCLUDE__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/nanoftp.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/nanoftp.h
new file mode 100644
index 0000000000000000000000000000000000000000..5dda6349404f699a2fa9a00c495d81c5a3174c01
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/nanoftp.h
@@ -0,0 +1,16 @@
+/*
+ * Summary: Removed legacy symbols for an outdated FTP client
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __NANO_FTP_H__
+#define __NANO_FTP_H__
+
+#ifdef __GNUC__
+ #warning "libxml/nanoftp.h is deprecated"
+#endif
+
+#endif /* __NANO_FTP_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/nanohttp.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/nanohttp.h
new file mode 100644
index 0000000000000000000000000000000000000000..c70d1c26bb880ccdfcee16d2c79f69d1d3472518
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/nanohttp.h
@@ -0,0 +1,98 @@
+/*
+ * Summary: minimal HTTP implementation
+ * Description: minimal HTTP implementation allowing to fetch resources
+ * like external subset.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __NANO_HTTP_H__
+#define __NANO_HTTP_H__
+
+#include
+
+#ifdef LIBXML_HTTP_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlNanoHTTPInit (void);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlNanoHTTPCleanup (void);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlNanoHTTPScanProxy (const char *URL);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlNanoHTTPFetch (const char *URL,
+ const char *filename,
+ char **contentType);
+XML_DEPRECATED
+XMLPUBFUN void *
+ xmlNanoHTTPMethod (const char *URL,
+ const char *method,
+ const char *input,
+ char **contentType,
+ const char *headers,
+ int ilen);
+XML_DEPRECATED
+XMLPUBFUN void *
+ xmlNanoHTTPMethodRedir (const char *URL,
+ const char *method,
+ const char *input,
+ char **contentType,
+ char **redir,
+ const char *headers,
+ int ilen);
+XML_DEPRECATED
+XMLPUBFUN void *
+ xmlNanoHTTPOpen (const char *URL,
+ char **contentType);
+XML_DEPRECATED
+XMLPUBFUN void *
+ xmlNanoHTTPOpenRedir (const char *URL,
+ char **contentType,
+ char **redir);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlNanoHTTPReturnCode (void *ctx);
+XML_DEPRECATED
+XMLPUBFUN const char *
+ xmlNanoHTTPAuthHeader (void *ctx);
+XML_DEPRECATED
+XMLPUBFUN const char *
+ xmlNanoHTTPRedir (void *ctx);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlNanoHTTPContentLength( void * ctx );
+XML_DEPRECATED
+XMLPUBFUN const char *
+ xmlNanoHTTPEncoding (void *ctx);
+XML_DEPRECATED
+XMLPUBFUN const char *
+ xmlNanoHTTPMimeType (void *ctx);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlNanoHTTPRead (void *ctx,
+ void *dest,
+ int len);
+#ifdef LIBXML_OUTPUT_ENABLED
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlNanoHTTPSave (void *ctxt,
+ const char *filename);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlNanoHTTPClose (void *ctx);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_HTTP_ENABLED */
+#endif /* __NANO_HTTP_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/parser.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/parser.h
new file mode 100644
index 0000000000000000000000000000000000000000..338cab87b38c4f11092464bcf36e6d138d43f2cc
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/parser.h
@@ -0,0 +1,1633 @@
+/*
+ * Summary: the core parser module
+ * Description: Interfaces, constants and types related to the XML parser
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_PARSER_H__
+#define __XML_PARSER_H__
+
+/** DOC_DISABLE */
+#include
+#define XML_TREE_INTERNALS
+#include
+#undef XML_TREE_INTERNALS
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+/* for compatibility */
+#include
+#include
+/** DOC_ENABLE */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XML_DEFAULT_VERSION:
+ *
+ * The default version of XML used: 1.0
+ */
+#define XML_DEFAULT_VERSION "1.0"
+
+typedef enum {
+ XML_STATUS_NOT_WELL_FORMED = (1 << 0),
+ XML_STATUS_NOT_NS_WELL_FORMED = (1 << 1),
+ XML_STATUS_DTD_VALIDATION_FAILED = (1 << 2),
+ XML_STATUS_CATASTROPHIC_ERROR = (1 << 3)
+} xmlParserStatus;
+
+typedef enum {
+ XML_RESOURCE_UNKNOWN = 0,
+ XML_RESOURCE_MAIN_DOCUMENT,
+ XML_RESOURCE_DTD,
+ XML_RESOURCE_GENERAL_ENTITY,
+ XML_RESOURCE_PARAMETER_ENTITY,
+ XML_RESOURCE_XINCLUDE,
+ XML_RESOURCE_XINCLUDE_TEXT
+} xmlResourceType;
+
+typedef enum {
+ XML_INPUT_BUF_STATIC = (1 << 1),
+ XML_INPUT_BUF_ZERO_TERMINATED = (1 << 2),
+ XML_INPUT_UNZIP = (1 << 3),
+ XML_INPUT_NETWORK = (1 << 4)
+} xmlParserInputFlags;
+
+/**
+ * xmlParserInput:
+ *
+ * An xmlParserInput is an input flow for the XML processor.
+ * Each entity parsed is associated an xmlParserInput (except the
+ * few predefined ones). This is the case both for internal entities
+ * - in which case the flow is already completely in memory - or
+ * external entities - in which case we use the buf structure for
+ * progressive reading and I18N conversions to the internal UTF-8 format.
+ */
+
+/**
+ * xmlParserInputDeallocate:
+ * @str: the string to deallocate
+ *
+ * Callback for freeing some parser input allocations.
+ */
+typedef void (* xmlParserInputDeallocate)(xmlChar *str);
+
+struct _xmlParserInput {
+ /* Input buffer */
+ xmlParserInputBufferPtr buf;
+ /* The file analyzed, if any */
+ const char *filename;
+ /* unused */
+ const char *directory XML_DEPRECATED_MEMBER;
+ /* Base of the array to parse */
+ const xmlChar *base;
+ /* Current char being parsed */
+ const xmlChar *cur;
+ /* end of the array to parse */
+ const xmlChar *end;
+ /* unused */
+ int length XML_DEPRECATED_MEMBER;
+ /* Current line */
+ int line;
+ /* Current column */
+ int col;
+ /* How many xmlChars already consumed */
+ unsigned long consumed;
+ /* function to deallocate the base */
+ xmlParserInputDeallocate free XML_DEPRECATED_MEMBER;
+ /* unused */
+ const xmlChar *encoding XML_DEPRECATED_MEMBER;
+ /* the version string for entity */
+ const xmlChar *version XML_DEPRECATED_MEMBER;
+ /* Flags */
+ int flags XML_DEPRECATED_MEMBER;
+ /* an unique identifier for the entity */
+ int id XML_DEPRECATED_MEMBER;
+ /* unused */
+ unsigned long parentConsumed XML_DEPRECATED_MEMBER;
+ /* entity, if any */
+ xmlEntityPtr entity XML_DEPRECATED_MEMBER;
+};
+
+/**
+ * xmlParserNodeInfo:
+ *
+ * The parser can be asked to collect Node information, i.e. at what
+ * place in the file they were detected.
+ * NOTE: This is off by default and not very well tested.
+ */
+typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
+typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
+
+struct _xmlParserNodeInfo {
+ const struct _xmlNode* node;
+ /* Position & line # that text that created the node begins & ends on */
+ unsigned long begin_pos;
+ unsigned long begin_line;
+ unsigned long end_pos;
+ unsigned long end_line;
+};
+
+typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
+typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
+struct _xmlParserNodeInfoSeq {
+ unsigned long maximum;
+ unsigned long length;
+ xmlParserNodeInfo* buffer;
+};
+
+/**
+ * xmlParserInputState:
+ *
+ * The parser is now working also as a state based parser.
+ * The recursive one use the state info for entities processing.
+ */
+typedef enum {
+ XML_PARSER_EOF = -1, /* nothing is to be parsed */
+ XML_PARSER_START = 0, /* nothing has been parsed */
+ XML_PARSER_MISC, /* Misc* before int subset */
+ XML_PARSER_PI, /* Within a processing instruction */
+ XML_PARSER_DTD, /* within some DTD content */
+ XML_PARSER_PROLOG, /* Misc* after internal subset */
+ XML_PARSER_COMMENT, /* within a comment */
+ XML_PARSER_START_TAG, /* within a start tag */
+ XML_PARSER_CONTENT, /* within the content */
+ XML_PARSER_CDATA_SECTION, /* within a CDATA section */
+ XML_PARSER_END_TAG, /* within a closing tag */
+ XML_PARSER_ENTITY_DECL, /* within an entity declaration */
+ XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
+ XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
+ XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
+ XML_PARSER_EPILOG, /* the Misc* after the last end tag */
+ XML_PARSER_IGNORE, /* within an IGNORED section */
+ XML_PARSER_PUBLIC_LITERAL, /* within a PUBLIC value */
+ XML_PARSER_XML_DECL /* before XML decl (but after BOM) */
+} xmlParserInputState;
+
+/** DOC_DISABLE */
+/*
+ * Internal bits in the 'loadsubset' context member
+ */
+#define XML_DETECT_IDS 2
+#define XML_COMPLETE_ATTRS 4
+#define XML_SKIP_IDS 8
+/** DOC_ENABLE */
+
+/**
+ * xmlParserMode:
+ *
+ * A parser can operate in various modes
+ */
+typedef enum {
+ XML_PARSE_UNKNOWN = 0,
+ XML_PARSE_DOM = 1,
+ XML_PARSE_SAX = 2,
+ XML_PARSE_PUSH_DOM = 3,
+ XML_PARSE_PUSH_SAX = 4,
+ XML_PARSE_READER = 5
+} xmlParserMode;
+
+typedef struct _xmlStartTag xmlStartTag;
+typedef struct _xmlParserNsData xmlParserNsData;
+typedef struct _xmlAttrHashBucket xmlAttrHashBucket;
+
+/**
+ * xmlResourceLoader:
+ * @ctxt: parser context
+ * @url: URL to load
+ * @publicId: publid ID from DTD (optional)
+ * @type: resource type
+ * @flags: flags
+ * @out: result pointer
+ *
+ * Callback for custom resource loaders.
+ *
+ * @flags can contain XML_INPUT_UNZIP and XML_INPUT_NETWORK.
+ *
+ * On success, @out should be set to a new parser input object and
+ * XML_ERR_OK should be returned.
+ *
+ * Returns an xmlParserErrors code.
+ */
+typedef xmlParserErrors
+(*xmlResourceLoader)(void *ctxt, const char *url, const char *publicId,
+ xmlResourceType type, xmlParserInputFlags flags,
+ xmlParserInputPtr *out);
+
+/**
+ * xmlParserCtxt:
+ *
+ * The parser context.
+ * NOTE This doesn't completely define the parser state, the (current ?)
+ * design of the parser uses recursive function calls since this allow
+ * and easy mapping from the production rules of the specification
+ * to the actual code. The drawback is that the actual function call
+ * also reflect the parser state. However most of the parsing routines
+ * takes as the only argument the parser context pointer, so migrating
+ * to a state based parser for progressive parsing shouldn't be too hard.
+ */
+struct _xmlParserCtxt {
+ /* The SAX handler */
+ struct _xmlSAXHandler *sax;
+ /* For SAX interface only, used by DOM build */
+ void *userData;
+ /* the document being built */
+ xmlDocPtr myDoc;
+ /* is the document well formed */
+ int wellFormed;
+ /* shall we replace entities ? */
+ int replaceEntities XML_DEPRECATED_MEMBER;
+ /* the XML version string */
+ const xmlChar *version;
+ /* the declared encoding, if any */
+ const xmlChar *encoding;
+ /* standalone document */
+ int standalone;
+
+ /* an HTML(1) document
+ * 3 is HTML after
+ * 10 is HTML after
+ */
+ int html;
+
+ /* Input stream stack */
+
+ /* Current input stream */
+ xmlParserInputPtr input;
+ /* Number of current input streams */
+ int inputNr;
+ /* Max number of input streams */
+ int inputMax XML_DEPRECATED_MEMBER;
+ /* stack of inputs */
+ xmlParserInputPtr *inputTab;
+
+ /* Node analysis stack only used for DOM building */
+
+ /* Current parsed Node */
+ xmlNodePtr node;
+ /* Depth of the parsing stack */
+ int nodeNr XML_DEPRECATED_MEMBER;
+ /* Max depth of the parsing stack */
+ int nodeMax XML_DEPRECATED_MEMBER;
+ /* array of nodes */
+ xmlNodePtr *nodeTab XML_DEPRECATED_MEMBER;
+
+ /* Whether node info should be kept */
+ int record_info;
+ /* info about each node parsed */
+ xmlParserNodeInfoSeq node_seq XML_DEPRECATED_MEMBER;
+
+ /* error code */
+ int errNo;
+
+ /* reference and external subset */
+ int hasExternalSubset XML_DEPRECATED_MEMBER;
+ /* the internal subset has PE refs */
+ int hasPErefs XML_DEPRECATED_MEMBER;
+ /* unused */
+ int external XML_DEPRECATED_MEMBER;
+
+ /* is the document valid */
+ int valid;
+ /* shall we try to validate ? */
+ int validate XML_DEPRECATED_MEMBER;
+ /* The validity context */
+ xmlValidCtxt vctxt;
+
+ /* push parser state */
+ xmlParserInputState instate XML_DEPRECATED_MEMBER;
+ /* unused */
+ int token XML_DEPRECATED_MEMBER;
+
+ /* unused internally, still used downstream */
+ char *directory;
+
+ /* Node name stack */
+
+ /* Current parsed Node */
+ const xmlChar *name XML_DEPRECATED_MEMBER;
+ /* Depth of the parsing stack */
+ int nameNr XML_DEPRECATED_MEMBER;
+ /* Max depth of the parsing stack */
+ int nameMax XML_DEPRECATED_MEMBER;
+ /* array of nodes */
+ const xmlChar **nameTab XML_DEPRECATED_MEMBER;
+
+ /* unused */
+ long nbChars XML_DEPRECATED_MEMBER;
+ /* used by progressive parsing lookup */
+ long checkIndex XML_DEPRECATED_MEMBER;
+ /* ugly but ... */
+ int keepBlanks XML_DEPRECATED_MEMBER;
+ /* SAX callbacks are disabled */
+ int disableSAX;
+ /* Parsing is in int 1/ext 2 subset */
+ int inSubset;
+ /* name of subset */
+ const xmlChar *intSubName;
+ /* URI of external subset */
+ xmlChar *extSubURI;
+ /* SYSTEM ID of external subset */
+ xmlChar *extSubSystem;
+
+ /* xml:space values */
+
+ /* Should the parser preserve spaces */
+ int *space XML_DEPRECATED_MEMBER;
+ /* Depth of the parsing stack */
+ int spaceNr XML_DEPRECATED_MEMBER;
+ /* Max depth of the parsing stack */
+ int spaceMax XML_DEPRECATED_MEMBER;
+ /* array of space infos */
+ int *spaceTab XML_DEPRECATED_MEMBER;
+
+ /* to prevent entity substitution loops */
+ int depth XML_DEPRECATED_MEMBER;
+ /* unused */
+ xmlParserInputPtr entity XML_DEPRECATED_MEMBER;
+ /* unused */
+ int charset XML_DEPRECATED_MEMBER;
+ /* Those two fields are there to */
+ int nodelen XML_DEPRECATED_MEMBER;
+ /* Speed up large node parsing */
+ int nodemem XML_DEPRECATED_MEMBER;
+ /* signal pedantic warnings */
+ int pedantic XML_DEPRECATED_MEMBER;
+ /* For user data, libxml won't touch it */
+ void *_private;
+
+ /* should the external subset be loaded */
+ int loadsubset;
+ /* set line number in element content */
+ int linenumbers XML_DEPRECATED_MEMBER;
+ /* document's own catalog */
+ void *catalogs XML_DEPRECATED_MEMBER;
+ /* run in recovery mode */
+ int recovery XML_DEPRECATED_MEMBER;
+ /* unused */
+ int progressive XML_DEPRECATED_MEMBER;
+ /* dictionary for the parser */
+ xmlDictPtr dict;
+ /* array for the attributes callbacks */
+ const xmlChar **atts XML_DEPRECATED_MEMBER;
+ /* the size of the array */
+ int maxatts XML_DEPRECATED_MEMBER;
+ /* unused */
+ int docdict XML_DEPRECATED_MEMBER;
+
+ /*
+ * pre-interned strings
+ */
+ const xmlChar *str_xml XML_DEPRECATED_MEMBER;
+ const xmlChar *str_xmlns XML_DEPRECATED_MEMBER;
+ const xmlChar *str_xml_ns XML_DEPRECATED_MEMBER;
+
+ /*
+ * Everything below is used only by the new SAX mode
+ */
+
+ /* operating in the new SAX mode */
+ int sax2 XML_DEPRECATED_MEMBER;
+ /* the number of inherited namespaces */
+ int nsNr XML_DEPRECATED_MEMBER;
+ /* the size of the arrays */
+ int nsMax XML_DEPRECATED_MEMBER;
+ /* the array of prefix/namespace name */
+ const xmlChar **nsTab XML_DEPRECATED_MEMBER;
+ /* which attribute were allocated */
+ unsigned *attallocs XML_DEPRECATED_MEMBER;
+ /* array of data for push */
+ xmlStartTag *pushTab XML_DEPRECATED_MEMBER;
+ /* defaulted attributes if any */
+ xmlHashTablePtr attsDefault XML_DEPRECATED_MEMBER;
+ /* non-CDATA attributes if any */
+ xmlHashTablePtr attsSpecial XML_DEPRECATED_MEMBER;
+ /* is the document XML Namespace okay */
+ int nsWellFormed;
+ /* Extra options */
+ int options;
+
+ /*
+ * Those fields are needed only for streaming parsing so far
+ */
+
+ /* Use dictionary names for the tree */
+ int dictNames XML_DEPRECATED_MEMBER;
+ /* number of freed element nodes */
+ int freeElemsNr XML_DEPRECATED_MEMBER;
+ /* List of freed element nodes */
+ xmlNodePtr freeElems XML_DEPRECATED_MEMBER;
+ /* number of freed attributes nodes */
+ int freeAttrsNr XML_DEPRECATED_MEMBER;
+ /* List of freed attributes nodes */
+ xmlAttrPtr freeAttrs XML_DEPRECATED_MEMBER;
+
+ /*
+ * the complete error information for the last error.
+ */
+ xmlError lastError XML_DEPRECATED_MEMBER;
+ /* the parser mode */
+ xmlParserMode parseMode XML_DEPRECATED_MEMBER;
+ /* unused */
+ unsigned long nbentities XML_DEPRECATED_MEMBER;
+ /* size of external entities */
+ unsigned long sizeentities XML_DEPRECATED_MEMBER;
+
+ /* for use by HTML non-recursive parser */
+ /* Current NodeInfo */
+ xmlParserNodeInfo *nodeInfo XML_DEPRECATED_MEMBER;
+ /* Depth of the parsing stack */
+ int nodeInfoNr XML_DEPRECATED_MEMBER;
+ /* Max depth of the parsing stack */
+ int nodeInfoMax XML_DEPRECATED_MEMBER;
+ /* array of nodeInfos */
+ xmlParserNodeInfo *nodeInfoTab XML_DEPRECATED_MEMBER;
+
+ /* we need to label inputs */
+ int input_id XML_DEPRECATED_MEMBER;
+ /* volume of entity copy */
+ unsigned long sizeentcopy XML_DEPRECATED_MEMBER;
+
+ /* quote state for push parser */
+ int endCheckState XML_DEPRECATED_MEMBER;
+ /* number of errors */
+ unsigned short nbErrors XML_DEPRECATED_MEMBER;
+ /* number of warnings */
+ unsigned short nbWarnings XML_DEPRECATED_MEMBER;
+ /* maximum amplification factor */
+ unsigned maxAmpl XML_DEPRECATED_MEMBER;
+
+ /* namespace database */
+ xmlParserNsData *nsdb XML_DEPRECATED_MEMBER;
+ /* allocated size */
+ unsigned attrHashMax XML_DEPRECATED_MEMBER;
+ /* atttribute hash table */
+ xmlAttrHashBucket *attrHash XML_DEPRECATED_MEMBER;
+
+ xmlStructuredErrorFunc errorHandler XML_DEPRECATED_MEMBER;
+ void *errorCtxt XML_DEPRECATED_MEMBER;
+
+ xmlResourceLoader resourceLoader XML_DEPRECATED_MEMBER;
+ void *resourceCtxt XML_DEPRECATED_MEMBER;
+
+ xmlCharEncConvImpl convImpl XML_DEPRECATED_MEMBER;
+ void *convCtxt XML_DEPRECATED_MEMBER;
+};
+
+/**
+ * xmlSAXLocator:
+ *
+ * A SAX Locator.
+ */
+struct _xmlSAXLocator {
+ const xmlChar *(*getPublicId)(void *ctx);
+ const xmlChar *(*getSystemId)(void *ctx);
+ int (*getLineNumber)(void *ctx);
+ int (*getColumnNumber)(void *ctx);
+};
+
+/**
+ * xmlSAXHandler:
+ *
+ * A SAX handler is bunch of callbacks called by the parser when processing
+ * of the input generate data or structure information.
+ */
+
+/**
+ * resolveEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * Callback:
+ * The entity loader, to control the loading of external entities,
+ * the application can either:
+ * - override this resolveEntity() callback in the SAX block
+ * - or better use the xmlSetExternalEntityLoader() function to
+ * set up it's own entity resolution routine
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+/**
+ * internalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on internal subset declaration.
+ */
+typedef void (*internalSubsetSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+/**
+ * externalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on external subset declaration.
+ */
+typedef void (*externalSubsetSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+/**
+ * getEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get an entity by name.
+ *
+ * Returns the xmlEntityPtr if found.
+ */
+typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * getParameterEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get a parameter entity by name.
+ *
+ * Returns the xmlEntityPtr if found.
+ */
+typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * entityDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the entity name
+ * @type: the entity type
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @content: the entity value (without processing).
+ *
+ * An entity definition has been parsed.
+ */
+typedef void (*entityDeclSAXFunc) (void *ctx,
+ const xmlChar *name,
+ int type,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ xmlChar *content);
+/**
+ * notationDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the notation
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * What to do when a notation declaration has been parsed.
+ */
+typedef void (*notationDeclSAXFunc)(void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+/**
+ * attributeDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @elem: the name of the element
+ * @fullname: the attribute name
+ * @type: the attribute type
+ * @def: the type of default value
+ * @defaultValue: the attribute default value
+ * @tree: the tree of enumerated value set
+ *
+ * An attribute definition has been parsed.
+ */
+typedef void (*attributeDeclSAXFunc)(void *ctx,
+ const xmlChar *elem,
+ const xmlChar *fullname,
+ int type,
+ int def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+/**
+ * elementDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the element name
+ * @type: the element type
+ * @content: the element value tree
+ *
+ * An element definition has been parsed.
+ */
+typedef void (*elementDeclSAXFunc)(void *ctx,
+ const xmlChar *name,
+ int type,
+ xmlElementContentPtr content);
+/**
+ * unparsedEntityDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the entity
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @notationName: the name of the notation
+ *
+ * What to do when an unparsed entity declaration is parsed.
+ */
+typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ const xmlChar *notationName);
+/**
+ * setDocumentLocatorSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @loc: A SAX Locator
+ *
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator.
+ * Everything is available on the context, so this is useless in our case.
+ */
+typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
+ xmlSAXLocatorPtr loc);
+/**
+ * startDocumentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Called when the document start being processed.
+ */
+typedef void (*startDocumentSAXFunc) (void *ctx);
+/**
+ * endDocumentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Called when the document end has been detected.
+ */
+typedef void (*endDocumentSAXFunc) (void *ctx);
+/**
+ * startElementSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The element name, including namespace prefix
+ * @atts: An array of name/value attributes pairs, NULL terminated
+ *
+ * Called when an opening tag has been processed.
+ */
+typedef void (*startElementSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar **atts);
+/**
+ * endElementSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The element name
+ *
+ * Called when the end of an element has been detected.
+ */
+typedef void (*endElementSAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * attributeSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The attribute name, including namespace prefix
+ * @value: The attribute value
+ *
+ * Handle an attribute that has been read by the parser.
+ * The default handling is to convert the attribute into an
+ * DOM subtree and past it in a new xmlAttr element added to
+ * the element.
+ */
+typedef void (*attributeSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar *value);
+/**
+ * referenceSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Called when an entity reference is detected.
+ */
+typedef void (*referenceSAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * charactersSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * Receiving some chars from the parser.
+ */
+typedef void (*charactersSAXFunc) (void *ctx,
+ const xmlChar *ch,
+ int len);
+/**
+ * ignorableWhitespaceSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * Receiving some ignorable whitespaces from the parser.
+ * UNUSED: by default the DOM building will use characters.
+ */
+typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
+ const xmlChar *ch,
+ int len);
+/**
+ * processingInstructionSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @target: the target name
+ * @data: the PI data's
+ *
+ * A processing instruction has been parsed.
+ */
+typedef void (*processingInstructionSAXFunc) (void *ctx,
+ const xmlChar *target,
+ const xmlChar *data);
+/**
+ * commentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @value: the comment content
+ *
+ * A comment has been parsed.
+ */
+typedef void (*commentSAXFunc) (void *ctx,
+ const xmlChar *value);
+/**
+ * cdataBlockSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @value: The pcdata content
+ * @len: the block length
+ *
+ * Called when a pcdata block has been parsed.
+ */
+typedef void (*cdataBlockSAXFunc) (
+ void *ctx,
+ const xmlChar *value,
+ int len);
+/**
+ * warningSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a warning messages, callback.
+ */
+typedef void (*warningSAXFunc) (void *ctx,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * errorSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format an error messages, callback.
+ */
+typedef void (*errorSAXFunc) (void *ctx,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * fatalErrorSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format fatal error messages, callback.
+ * Note: so far fatalError() SAX callbacks are not used, error()
+ * get all the callbacks for errors.
+ */
+typedef void (*fatalErrorSAXFunc) (void *ctx,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * isStandaloneSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Is this document tagged standalone?
+ *
+ * Returns 1 if true
+ */
+typedef int (*isStandaloneSAXFunc) (void *ctx);
+/**
+ * hasInternalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an internal subset.
+ *
+ * Returns 1 if true
+ */
+typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
+
+/**
+ * hasExternalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an external subset?
+ *
+ * Returns 1 if true
+ */
+typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
+
+/************************************************************************
+ * *
+ * The SAX version 2 API extensions *
+ * *
+ ************************************************************************/
+/**
+ * XML_SAX2_MAGIC:
+ *
+ * Special constant found in SAX2 blocks initialized fields
+ */
+#define XML_SAX2_MAGIC 0xDEEDBEAF
+
+/**
+ * startElementNsSAX2Func:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ * @nb_namespaces: number of namespace definitions on that node
+ * @namespaces: pointer to the array of prefix/URI pairs namespace definitions
+ * @nb_attributes: the number of attributes on that node
+ * @nb_defaulted: the number of defaulted attributes. The defaulted
+ * ones are at the end of the array
+ * @attributes: pointer to the array of (localname/prefix/URI/value/end)
+ * attribute values.
+ *
+ * SAX2 callback when an element start has been detected by the parser.
+ * It provides the namespace information for the element, as well as
+ * the new namespace declarations on the element.
+ */
+
+typedef void (*startElementNsSAX2Func) (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI,
+ int nb_namespaces,
+ const xmlChar **namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const xmlChar **attributes);
+
+/**
+ * endElementNsSAX2Func:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ *
+ * SAX2 callback when an element end has been detected by the parser.
+ * It provides the namespace information for the element.
+ */
+
+typedef void (*endElementNsSAX2Func) (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI);
+
+
+struct _xmlSAXHandler {
+ /*
+ * For DTD-related handlers, it's recommended to either use the
+ * original libxml2 handler or set them to NULL if DTDs can be
+ * ignored.
+ */
+ internalSubsetSAXFunc internalSubset; /* DTD */
+ isStandaloneSAXFunc isStandalone; /* unused */
+ hasInternalSubsetSAXFunc hasInternalSubset; /* DTD */
+ hasExternalSubsetSAXFunc hasExternalSubset; /* DTD */
+ resolveEntitySAXFunc resolveEntity; /* DTD */
+ getEntitySAXFunc getEntity; /* DTD */
+ entityDeclSAXFunc entityDecl; /* DTD */
+ notationDeclSAXFunc notationDecl; /* DTD */
+ attributeDeclSAXFunc attributeDecl; /* DTD */
+ elementDeclSAXFunc elementDecl; /* DTD */
+ unparsedEntityDeclSAXFunc unparsedEntityDecl; /* DTD */
+ setDocumentLocatorSAXFunc setDocumentLocator; /* deprecated */
+ startDocumentSAXFunc startDocument;
+ endDocumentSAXFunc endDocument;
+ /*
+ * `startElement` and `endElement` are only used by the legacy SAX1
+ * interface and should not be used in new software. If you really
+ * have to enable SAX1, the preferred way is set the `initialized`
+ * member to 1 instead of XML_SAX2_MAGIC.
+ *
+ * For backward compatibility, it's also possible to set the
+ * `startElementNs` and `endElementNs` handlers to NULL.
+ *
+ * You can also set the XML_PARSE_SAX1 parser option, but versions
+ * older than 2.12.0 will probably crash if this option is provided
+ * together with custom SAX callbacks.
+ */
+ startElementSAXFunc startElement;
+ endElementSAXFunc endElement;
+ referenceSAXFunc reference;
+ charactersSAXFunc characters;
+ /*
+ * `ignorableWhitespace` should always be set to the same value
+ * as `characters`. Otherwise, the parser will try to detect
+ * whitespace which is unreliable.
+ */
+ ignorableWhitespaceSAXFunc ignorableWhitespace;
+ processingInstructionSAXFunc processingInstruction;
+ commentSAXFunc comment;
+ warningSAXFunc warning;
+ errorSAXFunc error;
+ fatalErrorSAXFunc fatalError; /* unused, `error` gets all the errors */
+ getParameterEntitySAXFunc getParameterEntity; /* DTD */
+ cdataBlockSAXFunc cdataBlock;
+ externalSubsetSAXFunc externalSubset; /* DTD */
+ /*
+ * `initialized` should always be set to XML_SAX2_MAGIC to enable the
+ * modern SAX2 interface.
+ */
+ unsigned int initialized;
+ /*
+ * The following members are only used by the SAX2 interface.
+ */
+ void *_private;
+ startElementNsSAX2Func startElementNs;
+ endElementNsSAX2Func endElementNs;
+ /*
+ * Takes precedence over `error` or `warning`, but modern code
+ * should use xmlCtxtSetErrorHandler.
+ */
+ xmlStructuredErrorFunc serror;
+};
+
+/*
+ * SAX Version 1
+ */
+typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
+typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
+struct _xmlSAXHandlerV1 {
+ internalSubsetSAXFunc internalSubset;
+ isStandaloneSAXFunc isStandalone;
+ hasInternalSubsetSAXFunc hasInternalSubset;
+ hasExternalSubsetSAXFunc hasExternalSubset;
+ resolveEntitySAXFunc resolveEntity;
+ getEntitySAXFunc getEntity;
+ entityDeclSAXFunc entityDecl;
+ notationDeclSAXFunc notationDecl;
+ attributeDeclSAXFunc attributeDecl;
+ elementDeclSAXFunc elementDecl;
+ unparsedEntityDeclSAXFunc unparsedEntityDecl;
+ setDocumentLocatorSAXFunc setDocumentLocator;
+ startDocumentSAXFunc startDocument;
+ endDocumentSAXFunc endDocument;
+ startElementSAXFunc startElement;
+ endElementSAXFunc endElement;
+ referenceSAXFunc reference;
+ charactersSAXFunc characters;
+ ignorableWhitespaceSAXFunc ignorableWhitespace;
+ processingInstructionSAXFunc processingInstruction;
+ commentSAXFunc comment;
+ warningSAXFunc warning;
+ errorSAXFunc error;
+ fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
+ getParameterEntitySAXFunc getParameterEntity;
+ cdataBlockSAXFunc cdataBlock;
+ externalSubsetSAXFunc externalSubset;
+ unsigned int initialized;
+};
+
+
+/**
+ * xmlExternalEntityLoader:
+ * @URL: The System ID of the resource requested
+ * @ID: The Public ID of the resource requested
+ * @context: the XML parser context
+ *
+ * External entity loaders types.
+ *
+ * Returns the entity input parser.
+ */
+typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
+ const char *ID,
+ xmlParserCtxtPtr context);
+
+/*
+ * Variables
+ */
+
+XMLPUBVAR const char *const xmlParserVersion;
+
+/** DOC_DISABLE */
+XML_DEPRECATED
+XMLPUBVAR const xmlSAXLocator xmlDefaultSAXLocator;
+#ifdef LIBXML_SAX1_ENABLED
+XML_DEPRECATED
+XMLPUBVAR const xmlSAXHandlerV1 xmlDefaultSAXHandler;
+#endif
+
+XML_DEPRECATED
+XMLPUBFUN int *__xmlDoValidityCheckingDefaultValue(void);
+XML_DEPRECATED
+XMLPUBFUN int *__xmlGetWarningsDefaultValue(void);
+XML_DEPRECATED
+XMLPUBFUN int *__xmlKeepBlanksDefaultValue(void);
+XML_DEPRECATED
+XMLPUBFUN int *__xmlLineNumbersDefaultValue(void);
+XML_DEPRECATED
+XMLPUBFUN int *__xmlLoadExtDtdDefaultValue(void);
+XML_DEPRECATED
+XMLPUBFUN int *__xmlPedanticParserDefaultValue(void);
+XML_DEPRECATED
+XMLPUBFUN int *__xmlSubstituteEntitiesDefaultValue(void);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN int *__xmlIndentTreeOutput(void);
+XMLPUBFUN const char **__xmlTreeIndentString(void);
+XMLPUBFUN int *__xmlSaveNoEmptyTags(void);
+#endif
+
+#ifndef XML_GLOBALS_NO_REDEFINITION
+ #define xmlDoValidityCheckingDefaultValue \
+ (*__xmlDoValidityCheckingDefaultValue())
+ #define xmlGetWarningsDefaultValue \
+ (*__xmlGetWarningsDefaultValue())
+ #define xmlKeepBlanksDefaultValue (*__xmlKeepBlanksDefaultValue())
+ #define xmlLineNumbersDefaultValue \
+ (*__xmlLineNumbersDefaultValue())
+ #define xmlLoadExtDtdDefaultValue (*__xmlLoadExtDtdDefaultValue())
+ #define xmlPedanticParserDefaultValue \
+ (*__xmlPedanticParserDefaultValue())
+ #define xmlSubstituteEntitiesDefaultValue \
+ (*__xmlSubstituteEntitiesDefaultValue())
+ #ifdef LIBXML_OUTPUT_ENABLED
+ #define xmlIndentTreeOutput (*__xmlIndentTreeOutput())
+ #define xmlTreeIndentString (*__xmlTreeIndentString())
+ #define xmlSaveNoEmptyTags (*__xmlSaveNoEmptyTags())
+ #endif
+#endif
+/** DOC_ENABLE */
+
+/*
+ * Init/Cleanup
+ */
+XMLPUBFUN void
+ xmlInitParser (void);
+XMLPUBFUN void
+ xmlCleanupParser (void);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlInitGlobals (void);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlCleanupGlobals (void);
+
+/*
+ * Input functions
+ */
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlParserInputRead (xmlParserInputPtr in,
+ int len);
+XMLPUBFUN int
+ xmlParserInputGrow (xmlParserInputPtr in,
+ int len);
+
+/*
+ * Basic parsing Interfaces
+ */
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN xmlDocPtr
+ xmlParseDoc (const xmlChar *cur);
+XMLPUBFUN xmlDocPtr
+ xmlParseFile (const char *filename);
+XMLPUBFUN xmlDocPtr
+ xmlParseMemory (const char *buffer,
+ int size);
+#endif /* LIBXML_SAX1_ENABLED */
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlSubstituteEntitiesDefault(int val);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlThrDefSubstituteEntitiesDefaultValue(int v);
+XMLPUBFUN int
+ xmlKeepBlanksDefault (int val);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlThrDefKeepBlanksDefaultValue(int v);
+XMLPUBFUN void
+ xmlStopParser (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlPedanticParserDefault(int val);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlThrDefPedanticParserDefaultValue(int v);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlLineNumbersDefault (int val);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlThrDefLineNumbersDefaultValue(int v);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlThrDefDoValidityCheckingDefaultValue(int v);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlThrDefGetWarningsDefaultValue(int v);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlThrDefLoadExtDtdDefaultValue(int v);
+
+#ifdef LIBXML_SAX1_ENABLED
+/*
+ * Recovery mode
+ */
+XML_DEPRECATED
+XMLPUBFUN xmlDocPtr
+ xmlRecoverDoc (const xmlChar *cur);
+XML_DEPRECATED
+XMLPUBFUN xmlDocPtr
+ xmlRecoverMemory (const char *buffer,
+ int size);
+XML_DEPRECATED
+XMLPUBFUN xmlDocPtr
+ xmlRecoverFile (const char *filename);
+#endif /* LIBXML_SAX1_ENABLED */
+
+/*
+ * Less common routines and SAX interfaces
+ */
+XMLPUBFUN int
+ xmlParseDocument (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
+#ifdef LIBXML_SAX1_ENABLED
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *filename);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *buffer,
+ int size);
+XML_DEPRECATED
+XMLPUBFUN xmlDocPtr
+ xmlSAXParseDoc (xmlSAXHandlerPtr sax,
+ const xmlChar *cur,
+ int recovery);
+XML_DEPRECATED
+XMLPUBFUN xmlDocPtr
+ xmlSAXParseMemory (xmlSAXHandlerPtr sax,
+ const char *buffer,
+ int size,
+ int recovery);
+XML_DEPRECATED
+XMLPUBFUN xmlDocPtr
+ xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
+ const char *buffer,
+ int size,
+ int recovery,
+ void *data);
+XML_DEPRECATED
+XMLPUBFUN xmlDocPtr
+ xmlSAXParseFile (xmlSAXHandlerPtr sax,
+ const char *filename,
+ int recovery);
+XML_DEPRECATED
+XMLPUBFUN xmlDocPtr
+ xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
+ const char *filename,
+ int recovery,
+ void *data);
+XML_DEPRECATED
+XMLPUBFUN xmlDocPtr
+ xmlSAXParseEntity (xmlSAXHandlerPtr sax,
+ const char *filename);
+XML_DEPRECATED
+XMLPUBFUN xmlDocPtr
+ xmlParseEntity (const char *filename);
+#endif /* LIBXML_SAX1_ENABLED */
+
+#ifdef LIBXML_VALID_ENABLED
+XMLPUBFUN xmlDtdPtr
+ xmlCtxtParseDtd (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr input,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN int
+ xmlCtxtValidateDocument (xmlParserCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN int
+ xmlCtxtValidateDtd (xmlParserCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlDtdPtr dtd);
+XML_DEPRECATED
+XMLPUBFUN xmlDtdPtr
+ xmlSAXParseDTD (xmlSAXHandlerPtr sax,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr
+ xmlParseDTD (const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr
+ xmlIOParseDTD (xmlSAXHandlerPtr sax,
+ xmlParserInputBufferPtr input,
+ xmlCharEncoding enc);
+#endif /* LIBXML_VALID_ENABLE */
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int
+ xmlParseBalancedChunkMemory(xmlDocPtr doc,
+ xmlSAXHandlerPtr sax,
+ void *user_data,
+ int depth,
+ const xmlChar *string,
+ xmlNodePtr *lst);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN xmlParserErrors
+ xmlParseInNodeContext (xmlNodePtr node,
+ const char *data,
+ int datalen,
+ int options,
+ xmlNodePtr *lst);
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int
+ xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
+ xmlSAXHandlerPtr sax,
+ void *user_data,
+ int depth,
+ const xmlChar *string,
+ xmlNodePtr *lst,
+ int recover);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlParseExternalEntity (xmlDocPtr doc,
+ xmlSAXHandlerPtr sax,
+ void *user_data,
+ int depth,
+ const xmlChar *URL,
+ const xmlChar *ID,
+ xmlNodePtr *lst);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN int
+ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
+ const xmlChar *URL,
+ const xmlChar *ID,
+ xmlNodePtr *lst);
+
+/*
+ * Parser contexts handling.
+ */
+XMLPUBFUN xmlParserCtxtPtr
+ xmlNewParserCtxt (void);
+XMLPUBFUN xmlParserCtxtPtr
+ xmlNewSAXParserCtxt (const xmlSAXHandler *sax,
+ void *userData);
+XMLPUBFUN int
+ xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
+#ifdef LIBXML_SAX1_ENABLED
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
+ const xmlChar* buffer,
+ const char *filename);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN xmlParserCtxtPtr
+ xmlCreateDocParserCtxt (const xmlChar *cur);
+
+#ifdef LIBXML_PUSH_ENABLED
+/*
+ * Interfaces for the Push mode.
+ */
+XMLPUBFUN xmlParserCtxtPtr
+ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *chunk,
+ int size,
+ const char *filename);
+XMLPUBFUN int
+ xmlParseChunk (xmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ int terminate);
+#endif /* LIBXML_PUSH_ENABLED */
+
+/*
+ * Special I/O mode.
+ */
+
+XMLPUBFUN xmlParserCtxtPtr
+ xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
+ void *user_data,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ xmlCharEncoding enc);
+
+XMLPUBFUN xmlParserInputPtr
+ xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
+ xmlParserInputBufferPtr input,
+ xmlCharEncoding enc);
+
+/*
+ * Node infos.
+ */
+XML_DEPRECATED
+XMLPUBFUN const xmlParserNodeInfo*
+ xmlParserFindNodeInfo (xmlParserCtxtPtr ctxt,
+ xmlNodePtr node);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
+XML_DEPRECATED
+XMLPUBFUN unsigned long
+ xmlParserFindNodeInfoIndex(xmlParserNodeInfoSeqPtr seq,
+ xmlNodePtr node);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
+ xmlParserNodeInfoPtr info);
+
+/*
+ * External entities handling actually implemented in xmlIO.
+ */
+
+XMLPUBFUN void
+ xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
+XMLPUBFUN xmlExternalEntityLoader
+ xmlGetExternalEntityLoader(void);
+XMLPUBFUN xmlParserInputPtr
+ xmlLoadExternalEntity (const char *URL,
+ const char *ID,
+ xmlParserCtxtPtr ctxt);
+
+XML_DEPRECATED
+XMLPUBFUN long
+ xmlByteConsumed (xmlParserCtxtPtr ctxt);
+
+/*
+ * New set of simpler/more flexible APIs
+ */
+/**
+ * xmlParserOption:
+ *
+ * This is the set of XML parser options that can be passed down
+ * to the xmlReadDoc() and similar calls.
+ */
+typedef enum {
+ XML_PARSE_RECOVER = 1<<0, /* recover on errors */
+ XML_PARSE_NOENT = 1<<1, /* substitute entities */
+ XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */
+ XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */
+ XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */
+ XML_PARSE_NOERROR = 1<<5, /* suppress error reports */
+ XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */
+ XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
+ XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
+ XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */
+ XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitution */
+ XML_PARSE_NONET = 1<<11,/* Forbid network access */
+ XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionary */
+ XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
+ XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */
+ XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
+ XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of
+ the tree allowed afterwards (will possibly
+ crash if you try to modify the tree) */
+ XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */
+ XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
+ XML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */
+ XML_PARSE_OLDSAX = 1<<20,/* parse using SAX2 interface before 2.7.0 */
+ XML_PARSE_IGNORE_ENC= 1<<21,/* ignore internal document encoding hint */
+ XML_PARSE_BIG_LINES = 1<<22,/* Store big lines numbers in text PSVI field */
+ /* since 2.13.0 */
+ XML_PARSE_NO_XXE = 1<<23,/* disable loading of external content */
+ /* since 2.14.0 */
+ XML_PARSE_UNZIP = 1<<24,/* allow compressed content */
+ XML_PARSE_NO_SYS_CATALOG = 1<<25,/* disable global system catalog */
+ XML_PARSE_CATALOG_PI = 1<<26 /* allow catalog PIs */
+} xmlParserOption;
+
+XMLPUBFUN void
+ xmlCtxtReset (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ const char *filename,
+ const char *encoding);
+XMLPUBFUN int
+ xmlCtxtGetOptions (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlCtxtSetOptions (xmlParserCtxtPtr ctxt,
+ int options);
+XMLPUBFUN int
+ xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
+ int options);
+XMLPUBFUN void *
+ xmlCtxtGetPrivate (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlCtxtSetPrivate (xmlParserCtxtPtr ctxt,
+ void *priv);
+XMLPUBFUN void *
+ xmlCtxtGetCatalogs (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlCtxtSetCatalogs (xmlParserCtxtPtr ctxt,
+ void *catalogs);
+XMLPUBFUN xmlDictPtr
+ xmlCtxtGetDict (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlCtxtSetDict (xmlParserCtxtPtr ctxt,
+ xmlDictPtr);
+XMLPUBFUN xmlSAXHandler *
+ xmlCtxtGetSaxHandler (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlCtxtSetSaxHandler (xmlParserCtxtPtr ctxt,
+ const xmlSAXHandler *sax);
+XMLPUBFUN xmlDocPtr
+ xmlCtxtGetDocument (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlCtxtIsHtml (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlCtxtIsStopped (xmlParserCtxtPtr ctxt);
+#ifdef LIBXML_VALID_ENABLED
+XMLPUBFUN xmlValidCtxtPtr
+ xmlCtxtGetValidCtxt (xmlParserCtxtPtr ctxt);
+#endif
+XMLPUBFUN const xmlChar *
+ xmlCtxtGetVersion (xmlParserCtxtPtr ctxt);
+XMLPUBFUN const xmlChar *
+ xmlCtxtGetDeclaredEncoding(xmlParserCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlCtxtGetStandalone (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlParserStatus
+ xmlCtxtGetStatus (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlCtxtSetErrorHandler (xmlParserCtxtPtr ctxt,
+ xmlStructuredErrorFunc handler,
+ void *data);
+XMLPUBFUN void
+ xmlCtxtSetResourceLoader(xmlParserCtxtPtr ctxt,
+ xmlResourceLoader loader,
+ void *vctxt);
+XMLPUBFUN void
+ xmlCtxtSetCharEncConvImpl(xmlParserCtxtPtr ctxt,
+ xmlCharEncConvImpl impl,
+ void *vctxt);
+XMLPUBFUN void
+ xmlCtxtSetMaxAmplification(xmlParserCtxtPtr ctxt,
+ unsigned maxAmpl);
+XMLPUBFUN xmlDocPtr
+ xmlReadDoc (const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr
+ xmlReadFile (const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr
+ xmlReadMemory (const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr
+ xmlReadFd (int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr
+ xmlReadIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr
+ xmlCtxtParseDocument (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr input);
+XMLPUBFUN xmlNodePtr
+ xmlCtxtParseContent (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr input,
+ xmlNodePtr node,
+ int hasTextDecl);
+XMLPUBFUN xmlDocPtr
+ xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
+ const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr
+ xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
+ const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr
+ xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
+ const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr
+ xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
+ int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr
+ xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+
+/**
+ * New input API
+ */
+
+XMLPUBFUN xmlParserErrors
+xmlNewInputFromUrl(const char *url, xmlParserInputFlags flags,
+ xmlParserInputPtr *out);
+XMLPUBFUN xmlParserInputPtr
+xmlNewInputFromMemory(const char *url, const void *mem, size_t size,
+ xmlParserInputFlags flags);
+XMLPUBFUN xmlParserInputPtr
+xmlNewInputFromString(const char *url, const char *str,
+ xmlParserInputFlags flags);
+XMLPUBFUN xmlParserInputPtr
+xmlNewInputFromFd(const char *url, int fd, xmlParserInputFlags flags);
+XMLPUBFUN xmlParserInputPtr
+xmlNewInputFromIO(const char *url, xmlInputReadCallback ioRead,
+ xmlInputCloseCallback ioClose, void *ioCtxt,
+ xmlParserInputFlags flags);
+XMLPUBFUN xmlParserErrors
+xmlInputSetEncodingHandler(xmlParserInputPtr input,
+ xmlCharEncodingHandlerPtr handler);
+
+/*
+ * Library wide options
+ */
+/**
+ * xmlFeature:
+ *
+ * Used to examine the existence of features that can be enabled
+ * or disabled at compile-time.
+ * They used to be called XML_FEATURE_xxx but this clashed with Expat
+ */
+typedef enum {
+ XML_WITH_THREAD = 1,
+ XML_WITH_TREE = 2,
+ XML_WITH_OUTPUT = 3,
+ XML_WITH_PUSH = 4,
+ XML_WITH_READER = 5,
+ XML_WITH_PATTERN = 6,
+ XML_WITH_WRITER = 7,
+ XML_WITH_SAX1 = 8,
+ XML_WITH_FTP = 9,
+ XML_WITH_HTTP = 10,
+ XML_WITH_VALID = 11,
+ XML_WITH_HTML = 12,
+ XML_WITH_LEGACY = 13,
+ XML_WITH_C14N = 14,
+ XML_WITH_CATALOG = 15,
+ XML_WITH_XPATH = 16,
+ XML_WITH_XPTR = 17,
+ XML_WITH_XINCLUDE = 18,
+ XML_WITH_ICONV = 19,
+ XML_WITH_ISO8859X = 20,
+ XML_WITH_UNICODE = 21,
+ XML_WITH_REGEXP = 22,
+ XML_WITH_AUTOMATA = 23,
+ XML_WITH_EXPR = 24,
+ XML_WITH_SCHEMAS = 25,
+ XML_WITH_SCHEMATRON = 26,
+ XML_WITH_MODULES = 27,
+ XML_WITH_DEBUG = 28,
+ XML_WITH_DEBUG_MEM = 29,
+ XML_WITH_DEBUG_RUN = 30, /* unused */
+ XML_WITH_ZLIB = 31,
+ XML_WITH_ICU = 32,
+ XML_WITH_LZMA = 33,
+ XML_WITH_RELAXNG = 34, /* since 2.14.0 */
+ XML_WITH_NONE = 99999 /* just to be sure of allocation size */
+} xmlFeature;
+
+XMLPUBFUN int
+ xmlHasFeature (xmlFeature feature);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_PARSER_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/parserInternals.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/parserInternals.h
new file mode 100644
index 0000000000000000000000000000000000000000..3d259fc17895a20dd9e845842a4bb67c9005ec70
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/parserInternals.h
@@ -0,0 +1,591 @@
+/*
+ * Summary: internals routines and limits exported by the parser.
+ * Description: this module exports a number of internal parsing routines
+ * they are not really all intended for applications but
+ * can prove useful doing low level processing.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_PARSER_INTERNALS_H__
+#define __XML_PARSER_INTERNALS_H__
+
+#include
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Backward compatibility
+ */
+#define inputPush xmlCtxtPushInput
+#define inputPop xmlCtxtPopInput
+#define xmlParserMaxDepth 256
+
+/**
+ * XML_MAX_TEXT_LENGTH:
+ *
+ * Maximum size allowed for a single text node when building a tree.
+ * This is not a limitation of the parser but a safety boundary feature,
+ * use XML_PARSE_HUGE option to override it.
+ * Introduced in 2.9.0
+ */
+#define XML_MAX_TEXT_LENGTH 10000000
+
+/**
+ * XML_MAX_HUGE_LENGTH:
+ *
+ * Maximum size allowed when XML_PARSE_HUGE is set.
+ */
+#define XML_MAX_HUGE_LENGTH 1000000000
+
+/**
+ * XML_MAX_NAME_LENGTH:
+ *
+ * Maximum size allowed for a markup identifier.
+ * This is not a limitation of the parser but a safety boundary feature,
+ * use XML_PARSE_HUGE option to override it.
+ * Note that with the use of parsing dictionaries overriding the limit
+ * may result in more runtime memory usage in face of "unfriendly' content
+ * Introduced in 2.9.0
+ */
+#define XML_MAX_NAME_LENGTH 50000
+
+/**
+ * XML_MAX_DICTIONARY_LIMIT:
+ *
+ * Maximum size allowed by the parser for a dictionary by default
+ * This is not a limitation of the parser but a safety boundary feature,
+ * use XML_PARSE_HUGE option to override it.
+ * Introduced in 2.9.0
+ */
+#define XML_MAX_DICTIONARY_LIMIT 100000000
+
+/**
+ * XML_MAX_LOOKUP_LIMIT:
+ *
+ * Maximum size allowed by the parser for ahead lookup
+ * This is an upper boundary enforced by the parser to avoid bad
+ * behaviour on "unfriendly' content
+ * Introduced in 2.9.0
+ */
+#define XML_MAX_LOOKUP_LIMIT 10000000
+
+/**
+ * XML_MAX_NAMELEN:
+ *
+ * Identifiers can be longer, but this will be more costly
+ * at runtime.
+ */
+#define XML_MAX_NAMELEN 100
+
+/************************************************************************
+ * *
+ * UNICODE version of the macros. *
+ * *
+ ************************************************************************/
+/**
+ * IS_BYTE_CHAR:
+ * @c: an byte value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [2] Char ::= #x9 | #xA | #xD | [#x20...]
+ * any byte character in the accepted range
+ */
+#define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
+
+/**
+ * IS_CHAR:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
+ * | [#x10000-#x10FFFF]
+ * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ */
+#define IS_CHAR(c) xmlIsCharQ(c)
+
+/**
+ * IS_CHAR_CH:
+ * @c: an xmlChar (usually an unsigned char)
+ *
+ * Behaves like IS_CHAR on single-byte value
+ */
+#define IS_CHAR_CH(c) xmlIsChar_ch(c)
+
+/**
+ * IS_BLANK:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [3] S ::= (#x20 | #x9 | #xD | #xA)+
+ */
+#define IS_BLANK(c) xmlIsBlankQ(c)
+
+/**
+ * IS_BLANK_CH:
+ * @c: an xmlChar value (normally unsigned char)
+ *
+ * Behaviour same as IS_BLANK
+ */
+#define IS_BLANK_CH(c) xmlIsBlank_ch(c)
+
+/**
+ * IS_BASECHAR:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [85] BaseChar ::= ... long list see REC ...
+ */
+#define IS_BASECHAR(c) xmlIsBaseCharQ(c)
+
+/**
+ * IS_DIGIT:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [88] Digit ::= ... long list see REC ...
+ */
+#define IS_DIGIT(c) xmlIsDigitQ(c)
+
+/**
+ * IS_DIGIT_CH:
+ * @c: an xmlChar value (usually an unsigned char)
+ *
+ * Behaves like IS_DIGIT but with a single byte argument
+ */
+#define IS_DIGIT_CH(c) xmlIsDigit_ch(c)
+
+/**
+ * IS_COMBINING:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [87] CombiningChar ::= ... long list see REC ...
+ */
+#define IS_COMBINING(c) xmlIsCombiningQ(c)
+
+/**
+ * IS_COMBINING_CH:
+ * @c: an xmlChar (usually an unsigned char)
+ *
+ * Always false (all combining chars > 0xff)
+ */
+#define IS_COMBINING_CH(c) 0
+
+/**
+ * IS_EXTENDER:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
+ * #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
+ * [#x309D-#x309E] | [#x30FC-#x30FE]
+ */
+#define IS_EXTENDER(c) xmlIsExtenderQ(c)
+
+/**
+ * IS_EXTENDER_CH:
+ * @c: an xmlChar value (usually an unsigned char)
+ *
+ * Behaves like IS_EXTENDER but with a single-byte argument
+ */
+#define IS_EXTENDER_CH(c) xmlIsExtender_ch(c)
+
+/**
+ * IS_IDEOGRAPHIC:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
+ */
+#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
+
+/**
+ * IS_LETTER:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [84] Letter ::= BaseChar | Ideographic
+ */
+#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
+
+/**
+ * IS_LETTER_CH:
+ * @c: an xmlChar value (normally unsigned char)
+ *
+ * Macro behaves like IS_LETTER, but only check base chars
+ *
+ */
+#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
+
+/**
+ * IS_ASCII_LETTER:
+ * @c: an xmlChar value
+ *
+ * Macro to check [a-zA-Z]
+ *
+ */
+#define IS_ASCII_LETTER(c) ((0x61 <= ((c) | 0x20)) && \
+ (((c) | 0x20) <= 0x7a))
+
+/**
+ * IS_ASCII_DIGIT:
+ * @c: an xmlChar value
+ *
+ * Macro to check [0-9]
+ *
+ */
+#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
+
+/**
+ * IS_PUBIDCHAR:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
+ */
+#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
+
+/**
+ * IS_PUBIDCHAR_CH:
+ * @c: an xmlChar value (normally unsigned char)
+ *
+ * Same as IS_PUBIDCHAR but for single-byte value
+ */
+#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
+
+/**
+ * Global variables used for predefined strings.
+ */
+XMLPUBVAR const xmlChar xmlStringText[];
+XMLPUBVAR const xmlChar xmlStringTextNoenc[];
+XML_DEPRECATED
+XMLPUBVAR const xmlChar xmlStringComment[];
+
+XML_DEPRECATED
+XMLPUBFUN int xmlIsLetter (int c);
+
+/**
+ * Parser context.
+ */
+XMLPUBFUN xmlParserCtxtPtr
+ xmlCreateFileParserCtxt (const char *filename);
+XMLPUBFUN xmlParserCtxtPtr
+ xmlCreateURLParserCtxt (const char *filename,
+ int options);
+XMLPUBFUN xmlParserCtxtPtr
+ xmlCreateMemoryParserCtxt(const char *buffer,
+ int size);
+XML_DEPRECATED
+XMLPUBFUN xmlParserCtxtPtr
+ xmlCreateEntityParserCtxt(const xmlChar *URL,
+ const xmlChar *ID,
+ const xmlChar *base);
+XMLPUBFUN void
+ xmlCtxtErrMemory (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
+ xmlCharEncoding enc);
+XMLPUBFUN int
+ xmlSwitchEncodingName (xmlParserCtxtPtr ctxt,
+ const char *encoding);
+XMLPUBFUN int
+ xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
+ xmlCharEncodingHandlerPtr handler);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr input,
+ xmlCharEncodingHandlerPtr handler);
+
+/**
+ * Input Streams.
+ */
+XMLPUBFUN xmlParserInputPtr
+ xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
+ const xmlChar *buffer);
+XML_DEPRECATED
+XMLPUBFUN xmlParserInputPtr
+ xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
+ xmlEntityPtr entity);
+XMLPUBFUN int
+ xmlCtxtPushInput (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr input);
+XMLPUBFUN xmlParserInputPtr
+ xmlCtxtPopInput (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlPushInput (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr input);
+XML_DEPRECATED
+XMLPUBFUN xmlChar
+ xmlPopInput (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlFreeInputStream (xmlParserInputPtr input);
+XMLPUBFUN xmlParserInputPtr
+ xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
+ const char *filename);
+XMLPUBFUN xmlParserInputPtr
+ xmlNewInputStream (xmlParserCtxtPtr ctxt);
+
+/**
+ * Namespaces.
+ */
+XMLPUBFUN xmlChar *
+ xmlSplitQName (xmlParserCtxtPtr ctxt,
+ const xmlChar *name,
+ xmlChar **prefix);
+
+/**
+ * Generic production rules.
+ */
+XML_DEPRECATED
+XMLPUBFUN const xmlChar *
+ xmlParseName (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlParseNmtoken (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlParseEntityValue (xmlParserCtxtPtr ctxt,
+ xmlChar **orig);
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlParseAttValue (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseCharData (xmlParserCtxtPtr ctxt,
+ int cdata);
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlParseExternalID (xmlParserCtxtPtr ctxt,
+ xmlChar **publicID,
+ int strict);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseComment (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN const xmlChar *
+ xmlParsePITarget (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParsePI (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
+ xmlChar **value);
+XML_DEPRECATED
+XMLPUBFUN xmlEnumerationPtr
+ xmlParseNotationType (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN xmlEnumerationPtr
+ xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
+ xmlEnumerationPtr *tree);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlParseAttributeType (xmlParserCtxtPtr ctxt,
+ xmlEnumerationPtr *tree);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN xmlElementContentPtr
+ xmlParseElementMixedContentDecl
+ (xmlParserCtxtPtr ctxt,
+ int inputchk);
+XML_DEPRECATED
+XMLPUBFUN xmlElementContentPtr
+ xmlParseElementChildrenContentDecl
+ (xmlParserCtxtPtr ctxt,
+ int inputchk);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
+ const xmlChar *name,
+ xmlElementContentPtr *result);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlParseElementDecl (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlParseCharRef (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN xmlEntityPtr
+ xmlParseEntityRef (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseReference (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParsePEReference (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
+#ifdef LIBXML_SAX1_ENABLED
+XML_DEPRECATED
+XMLPUBFUN const xmlChar *
+ xmlParseAttribute (xmlParserCtxtPtr ctxt,
+ xmlChar **value);
+XML_DEPRECATED
+XMLPUBFUN const xmlChar *
+ xmlParseStartTag (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseEndTag (xmlParserCtxtPtr ctxt);
+#endif /* LIBXML_SAX1_ENABLED */
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseCDSect (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlParseContent (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseElement (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlParseVersionNum (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlParseEncName (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN const xmlChar *
+ xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlParseSDDecl (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseTextDecl (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseMisc (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+/**
+ * XML_SUBSTITUTE_NONE:
+ *
+ * If no entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_NONE 0
+/**
+ * XML_SUBSTITUTE_REF:
+ *
+ * Whether general entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_REF 1
+/**
+ * XML_SUBSTITUTE_PEREF:
+ *
+ * Whether parameter entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_PEREF 2
+/**
+ * XML_SUBSTITUTE_BOTH:
+ *
+ * Both general and parameter entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_BOTH 3
+
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
+ const xmlChar *str,
+ int what,
+ xmlChar end,
+ xmlChar end2,
+ xmlChar end3);
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
+ const xmlChar *str,
+ int len,
+ int what,
+ xmlChar end,
+ xmlChar end2,
+ xmlChar end3);
+
+/*
+ * other commodities shared between parser.c and parserInternals.
+ */
+XML_DEPRECATED
+XMLPUBFUN int xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN int xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
+ const xmlChar *cur,
+ int *len);
+XML_DEPRECATED
+XMLPUBFUN void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN int xmlCheckLanguageID (const xmlChar *lang);
+
+/*
+ * Really core function shared with HTML parser.
+ */
+XML_DEPRECATED
+XMLPUBFUN int xmlCurrentChar (xmlParserCtxtPtr ctxt,
+ int *len);
+XML_DEPRECATED
+XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out,
+ int val);
+XML_DEPRECATED
+XMLPUBFUN int xmlCopyChar (int len,
+ xmlChar *out,
+ int val);
+XML_DEPRECATED
+XMLPUBFUN void xmlNextChar (xmlParserCtxtPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void xmlParserInputShrink (xmlParserInputPtr in);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_PARSER_INTERNALS_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/relaxng.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/relaxng.h
new file mode 100644
index 0000000000000000000000000000000000000000..e9cb1ec95b7245348b809277244b3c53fb4b95a9
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/relaxng.h
@@ -0,0 +1,224 @@
+/*
+ * Summary: implementation of the Relax-NG validation
+ * Description: implementation of the Relax-NG validation
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_RELAX_NG__
+#define __XML_RELAX_NG__
+
+#include
+#include
+#include
+#include
+#include
+
+#ifdef LIBXML_RELAXNG_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _xmlRelaxNG xmlRelaxNG;
+typedef xmlRelaxNG *xmlRelaxNGPtr;
+
+
+/**
+ * xmlRelaxNGValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from a Relax-NG validation
+ */
+typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * xmlRelaxNGValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from a Relax-NG validation
+ */
+typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * A schemas validation context
+ */
+typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
+typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
+
+typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
+typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
+
+/*
+ * xmlRelaxNGValidErr:
+ *
+ * List of possible Relax NG validation errors
+ */
+typedef enum {
+ XML_RELAXNG_OK = 0,
+ XML_RELAXNG_ERR_MEMORY,
+ XML_RELAXNG_ERR_TYPE,
+ XML_RELAXNG_ERR_TYPEVAL,
+ XML_RELAXNG_ERR_DUPID,
+ XML_RELAXNG_ERR_TYPECMP,
+ XML_RELAXNG_ERR_NOSTATE,
+ XML_RELAXNG_ERR_NODEFINE,
+ XML_RELAXNG_ERR_LISTEXTRA,
+ XML_RELAXNG_ERR_LISTEMPTY,
+ XML_RELAXNG_ERR_INTERNODATA,
+ XML_RELAXNG_ERR_INTERSEQ,
+ XML_RELAXNG_ERR_INTEREXTRA,
+ XML_RELAXNG_ERR_ELEMNAME,
+ XML_RELAXNG_ERR_ATTRNAME,
+ XML_RELAXNG_ERR_ELEMNONS,
+ XML_RELAXNG_ERR_ATTRNONS,
+ XML_RELAXNG_ERR_ELEMWRONGNS,
+ XML_RELAXNG_ERR_ATTRWRONGNS,
+ XML_RELAXNG_ERR_ELEMEXTRANS,
+ XML_RELAXNG_ERR_ATTREXTRANS,
+ XML_RELAXNG_ERR_ELEMNOTEMPTY,
+ XML_RELAXNG_ERR_NOELEM,
+ XML_RELAXNG_ERR_NOTELEM,
+ XML_RELAXNG_ERR_ATTRVALID,
+ XML_RELAXNG_ERR_CONTENTVALID,
+ XML_RELAXNG_ERR_EXTRACONTENT,
+ XML_RELAXNG_ERR_INVALIDATTR,
+ XML_RELAXNG_ERR_DATAELEM,
+ XML_RELAXNG_ERR_VALELEM,
+ XML_RELAXNG_ERR_LISTELEM,
+ XML_RELAXNG_ERR_DATATYPE,
+ XML_RELAXNG_ERR_VALUE,
+ XML_RELAXNG_ERR_LIST,
+ XML_RELAXNG_ERR_NOGRAMMAR,
+ XML_RELAXNG_ERR_EXTRADATA,
+ XML_RELAXNG_ERR_LACKDATA,
+ XML_RELAXNG_ERR_INTERNAL,
+ XML_RELAXNG_ERR_ELEMWRONG,
+ XML_RELAXNG_ERR_TEXTWRONG
+} xmlRelaxNGValidErr;
+
+/*
+ * xmlRelaxNGParserFlags:
+ *
+ * List of possible Relax NG Parser flags
+ */
+typedef enum {
+ XML_RELAXNGP_NONE = 0,
+ XML_RELAXNGP_FREE_DOC = 1,
+ XML_RELAXNGP_CRNG = 2
+} xmlRelaxNGParserFlag;
+
+XMLPUBFUN int
+ xmlRelaxNGInitTypes (void);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlRelaxNGCleanupTypes (void);
+
+/*
+ * Interfaces for parsing.
+ */
+XMLPUBFUN xmlRelaxNGParserCtxtPtr
+ xmlRelaxNGNewParserCtxt (const char *URL);
+XMLPUBFUN xmlRelaxNGParserCtxtPtr
+ xmlRelaxNGNewMemParserCtxt (const char *buffer,
+ int size);
+XMLPUBFUN xmlRelaxNGParserCtxtPtr
+ xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
+
+XMLPUBFUN int
+ xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
+ int flag);
+
+XMLPUBFUN void
+ xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc err,
+ xmlRelaxNGValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int
+ xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc *err,
+ xmlRelaxNGValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN void
+ xmlRelaxNGSetParserStructuredErrors(
+ xmlRelaxNGParserCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+XMLPUBFUN void
+ xmlRelaxNGSetResourceLoader (xmlRelaxNGParserCtxtPtr ctxt,
+ xmlResourceLoader loader,
+ void *vctxt);
+XMLPUBFUN xmlRelaxNGPtr
+ xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlRelaxNGFree (xmlRelaxNGPtr schema);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void
+ xmlRelaxNGDump (FILE *output,
+ xmlRelaxNGPtr schema);
+XMLPUBFUN void
+ xmlRelaxNGDumpTree (FILE * output,
+ xmlRelaxNGPtr schema);
+#endif /* LIBXML_OUTPUT_ENABLED */
+/*
+ * Interfaces for validating
+ */
+XMLPUBFUN void
+ xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc err,
+ xmlRelaxNGValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int
+ xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc *err,
+ xmlRelaxNGValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN void
+ xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror, void *ctx);
+XMLPUBFUN xmlRelaxNGValidCtxtPtr
+ xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
+XMLPUBFUN void
+ xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+/*
+ * Interfaces for progressive validation when possible
+ */
+XMLPUBFUN int
+ xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int
+ xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
+ const xmlChar *data,
+ int len);
+XMLPUBFUN int
+ xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int
+ xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_RELAXNG_ENABLED */
+
+#endif /* __XML_RELAX_NG__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/schemasInternals.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/schemasInternals.h
new file mode 100644
index 0000000000000000000000000000000000000000..e9d3b3c7abb1e5b6fa1b1f25fb9bc2ee5e46d56f
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/schemasInternals.h
@@ -0,0 +1,959 @@
+/*
+ * Summary: internal interfaces for XML Schemas
+ * Description: internal interfaces for the XML Schemas handling
+ * and schema validity checking
+ * The Schemas development is a Work In Progress.
+ * Some of those interfaces are not guaranteed to be API or ABI stable !
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMA_INTERNALS_H__
+#define __XML_SCHEMA_INTERNALS_H__
+
+#include
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ XML_SCHEMAS_UNKNOWN = 0,
+ XML_SCHEMAS_STRING = 1,
+ XML_SCHEMAS_NORMSTRING = 2,
+ XML_SCHEMAS_DECIMAL = 3,
+ XML_SCHEMAS_TIME = 4,
+ XML_SCHEMAS_GDAY = 5,
+ XML_SCHEMAS_GMONTH = 6,
+ XML_SCHEMAS_GMONTHDAY = 7,
+ XML_SCHEMAS_GYEAR = 8,
+ XML_SCHEMAS_GYEARMONTH = 9,
+ XML_SCHEMAS_DATE = 10,
+ XML_SCHEMAS_DATETIME = 11,
+ XML_SCHEMAS_DURATION = 12,
+ XML_SCHEMAS_FLOAT = 13,
+ XML_SCHEMAS_DOUBLE = 14,
+ XML_SCHEMAS_BOOLEAN = 15,
+ XML_SCHEMAS_TOKEN = 16,
+ XML_SCHEMAS_LANGUAGE = 17,
+ XML_SCHEMAS_NMTOKEN = 18,
+ XML_SCHEMAS_NMTOKENS = 19,
+ XML_SCHEMAS_NAME = 20,
+ XML_SCHEMAS_QNAME = 21,
+ XML_SCHEMAS_NCNAME = 22,
+ XML_SCHEMAS_ID = 23,
+ XML_SCHEMAS_IDREF = 24,
+ XML_SCHEMAS_IDREFS = 25,
+ XML_SCHEMAS_ENTITY = 26,
+ XML_SCHEMAS_ENTITIES = 27,
+ XML_SCHEMAS_NOTATION = 28,
+ XML_SCHEMAS_ANYURI = 29,
+ XML_SCHEMAS_INTEGER = 30,
+ XML_SCHEMAS_NPINTEGER = 31,
+ XML_SCHEMAS_NINTEGER = 32,
+ XML_SCHEMAS_NNINTEGER = 33,
+ XML_SCHEMAS_PINTEGER = 34,
+ XML_SCHEMAS_INT = 35,
+ XML_SCHEMAS_UINT = 36,
+ XML_SCHEMAS_LONG = 37,
+ XML_SCHEMAS_ULONG = 38,
+ XML_SCHEMAS_SHORT = 39,
+ XML_SCHEMAS_USHORT = 40,
+ XML_SCHEMAS_BYTE = 41,
+ XML_SCHEMAS_UBYTE = 42,
+ XML_SCHEMAS_HEXBINARY = 43,
+ XML_SCHEMAS_BASE64BINARY = 44,
+ XML_SCHEMAS_ANYTYPE = 45,
+ XML_SCHEMAS_ANYSIMPLETYPE = 46
+} xmlSchemaValType;
+
+/*
+ * XML Schemas defines multiple type of types.
+ */
+typedef enum {
+ XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */
+ XML_SCHEMA_TYPE_ANY,
+ XML_SCHEMA_TYPE_FACET,
+ XML_SCHEMA_TYPE_SIMPLE,
+ XML_SCHEMA_TYPE_COMPLEX,
+ XML_SCHEMA_TYPE_SEQUENCE = 6,
+ XML_SCHEMA_TYPE_CHOICE,
+ XML_SCHEMA_TYPE_ALL,
+ XML_SCHEMA_TYPE_SIMPLE_CONTENT,
+ XML_SCHEMA_TYPE_COMPLEX_CONTENT,
+ XML_SCHEMA_TYPE_UR,
+ XML_SCHEMA_TYPE_RESTRICTION,
+ XML_SCHEMA_TYPE_EXTENSION,
+ XML_SCHEMA_TYPE_ELEMENT,
+ XML_SCHEMA_TYPE_ATTRIBUTE,
+ XML_SCHEMA_TYPE_ATTRIBUTEGROUP,
+ XML_SCHEMA_TYPE_GROUP,
+ XML_SCHEMA_TYPE_NOTATION,
+ XML_SCHEMA_TYPE_LIST,
+ XML_SCHEMA_TYPE_UNION,
+ XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
+ XML_SCHEMA_TYPE_IDC_UNIQUE,
+ XML_SCHEMA_TYPE_IDC_KEY,
+ XML_SCHEMA_TYPE_IDC_KEYREF,
+ XML_SCHEMA_TYPE_PARTICLE = 25,
+ XML_SCHEMA_TYPE_ATTRIBUTE_USE,
+ XML_SCHEMA_FACET_MININCLUSIVE = 1000,
+ XML_SCHEMA_FACET_MINEXCLUSIVE,
+ XML_SCHEMA_FACET_MAXINCLUSIVE,
+ XML_SCHEMA_FACET_MAXEXCLUSIVE,
+ XML_SCHEMA_FACET_TOTALDIGITS,
+ XML_SCHEMA_FACET_FRACTIONDIGITS,
+ XML_SCHEMA_FACET_PATTERN,
+ XML_SCHEMA_FACET_ENUMERATION,
+ XML_SCHEMA_FACET_WHITESPACE,
+ XML_SCHEMA_FACET_LENGTH,
+ XML_SCHEMA_FACET_MAXLENGTH,
+ XML_SCHEMA_FACET_MINLENGTH,
+ XML_SCHEMA_EXTRA_QNAMEREF = 2000,
+ XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
+} xmlSchemaTypeType;
+
+typedef enum {
+ XML_SCHEMA_CONTENT_UNKNOWN = 0,
+ XML_SCHEMA_CONTENT_EMPTY = 1,
+ XML_SCHEMA_CONTENT_ELEMENTS,
+ XML_SCHEMA_CONTENT_MIXED,
+ XML_SCHEMA_CONTENT_SIMPLE,
+ XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */
+ XML_SCHEMA_CONTENT_BASIC,
+ XML_SCHEMA_CONTENT_ANY
+} xmlSchemaContentType;
+
+typedef struct _xmlSchemaVal xmlSchemaVal;
+typedef xmlSchemaVal *xmlSchemaValPtr;
+
+typedef struct _xmlSchemaType xmlSchemaType;
+typedef xmlSchemaType *xmlSchemaTypePtr;
+
+typedef struct _xmlSchemaFacet xmlSchemaFacet;
+typedef xmlSchemaFacet *xmlSchemaFacetPtr;
+
+/**
+ * Annotation
+ */
+typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
+typedef xmlSchemaAnnot *xmlSchemaAnnotPtr;
+struct _xmlSchemaAnnot {
+ struct _xmlSchemaAnnot *next;
+ xmlNodePtr content; /* the annotation */
+};
+
+/**
+ * XML_SCHEMAS_ANYATTR_SKIP:
+ *
+ * Skip unknown attribute from validation
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ANYATTR_SKIP 1
+/**
+ * XML_SCHEMAS_ANYATTR_LAX:
+ *
+ * Ignore validation non definition on attributes
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ANYATTR_LAX 2
+/**
+ * XML_SCHEMAS_ANYATTR_STRICT:
+ *
+ * Apply strict validation rules on attributes
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ANYATTR_STRICT 3
+/**
+ * XML_SCHEMAS_ANY_SKIP:
+ *
+ * Skip unknown attribute from validation
+ */
+#define XML_SCHEMAS_ANY_SKIP 1
+/**
+ * XML_SCHEMAS_ANY_LAX:
+ *
+ * Used by wildcards.
+ * Validate if type found, don't worry if not found
+ */
+#define XML_SCHEMAS_ANY_LAX 2
+/**
+ * XML_SCHEMAS_ANY_STRICT:
+ *
+ * Used by wildcards.
+ * Apply strict validation rules
+ */
+#define XML_SCHEMAS_ANY_STRICT 3
+/**
+ * XML_SCHEMAS_ATTR_USE_PROHIBITED:
+ *
+ * Used by wildcards.
+ * The attribute is prohibited.
+ */
+#define XML_SCHEMAS_ATTR_USE_PROHIBITED 0
+/**
+ * XML_SCHEMAS_ATTR_USE_REQUIRED:
+ *
+ * The attribute is required.
+ */
+#define XML_SCHEMAS_ATTR_USE_REQUIRED 1
+/**
+ * XML_SCHEMAS_ATTR_USE_OPTIONAL:
+ *
+ * The attribute is optional.
+ */
+#define XML_SCHEMAS_ATTR_USE_OPTIONAL 2
+/**
+ * XML_SCHEMAS_ATTR_GLOBAL:
+ *
+ * allow elements in no namespace
+ */
+#define XML_SCHEMAS_ATTR_GLOBAL 1 << 0
+/**
+ * XML_SCHEMAS_ATTR_NSDEFAULT:
+ *
+ * allow elements in no namespace
+ */
+#define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7
+/**
+ * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
+ *
+ * this is set when the "type" and "ref" references
+ * have been resolved.
+ */
+#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8
+/**
+ * XML_SCHEMAS_ATTR_FIXED:
+ *
+ * the attribute has a fixed value
+ */
+#define XML_SCHEMAS_ATTR_FIXED 1 << 9
+
+/**
+ * xmlSchemaAttribute:
+ * An attribute definition.
+ */
+
+typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
+typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
+struct _xmlSchemaAttribute {
+ xmlSchemaTypeType type;
+ struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */
+ const xmlChar *name; /* the name of the declaration */
+ const xmlChar *id; /* Deprecated; not used */
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ const xmlChar *typeName; /* the local name of the type definition */
+ const xmlChar *typeNs; /* the ns URI of the type definition */
+ xmlSchemaAnnotPtr annot;
+
+ xmlSchemaTypePtr base; /* Deprecated; not used */
+ int occurs; /* Deprecated; not used */
+ const xmlChar *defValue; /* The initial value of the value constraint */
+ xmlSchemaTypePtr subtypes; /* the type definition */
+ xmlNodePtr node;
+ const xmlChar *targetNamespace;
+ int flags;
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaValPtr defVal; /* The compiled value constraint */
+ xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
+};
+
+/**
+ * xmlSchemaAttributeLink:
+ * Used to build a list of attribute uses on complexType definitions.
+ * WARNING: Deprecated; not used.
+ */
+typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
+typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr;
+struct _xmlSchemaAttributeLink {
+ struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */
+ struct _xmlSchemaAttribute *attr;/* the linked attribute */
+};
+
+/**
+ * XML_SCHEMAS_WILDCARD_COMPLETE:
+ *
+ * If the wildcard is complete.
+ */
+#define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0
+
+/**
+ * xmlSchemaCharValueLink:
+ * Used to build a list of namespaces on wildcards.
+ */
+typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs;
+typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr;
+struct _xmlSchemaWildcardNs {
+ struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */
+ const xmlChar *value;/* the value */
+};
+
+/**
+ * xmlSchemaWildcard.
+ * A wildcard.
+ */
+typedef struct _xmlSchemaWildcard xmlSchemaWildcard;
+typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
+struct _xmlSchemaWildcard {
+ xmlSchemaTypeType type; /* The kind of type */
+ const xmlChar *id; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+ xmlNodePtr node;
+ int minOccurs; /* Deprecated; not used */
+ int maxOccurs; /* Deprecated; not used */
+ int processContents;
+ int any; /* Indicates if the ns constraint is of ##any */
+ xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */
+ xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */
+ int flags;
+};
+
+/**
+ * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
+ *
+ * The attribute wildcard has been built.
+ */
+#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0
+/**
+ * XML_SCHEMAS_ATTRGROUP_GLOBAL:
+ *
+ * The attribute group has been defined.
+ */
+#define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1
+/**
+ * XML_SCHEMAS_ATTRGROUP_MARKED:
+ *
+ * Marks the attr group as marked; used for circular checks.
+ */
+#define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2
+
+/**
+ * XML_SCHEMAS_ATTRGROUP_REDEFINED:
+ *
+ * The attr group was redefined.
+ */
+#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3
+/**
+ * XML_SCHEMAS_ATTRGROUP_HAS_REFS:
+ *
+ * Whether this attr. group contains attr. group references.
+ */
+#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4
+
+/**
+ * An attribute group definition.
+ *
+ * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
+ * must be kept similar
+ */
+typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup;
+typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr;
+struct _xmlSchemaAttributeGroup {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
+ const xmlChar *name;
+ const xmlChar *id;
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+
+ xmlSchemaAttributePtr attributes; /* Deprecated; not used */
+ xmlNodePtr node;
+ int flags;
+ xmlSchemaWildcardPtr attributeWildcard;
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */
+ const xmlChar *targetNamespace;
+ void *attrUses;
+};
+
+/**
+ * xmlSchemaTypeLink:
+ * Used to build a list of types (e.g. member types of
+ * simpleType with variety "union").
+ */
+typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink;
+typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
+struct _xmlSchemaTypeLink {
+ struct _xmlSchemaTypeLink *next;/* the next type link ... */
+ xmlSchemaTypePtr type;/* the linked type */
+};
+
+/**
+ * xmlSchemaFacetLink:
+ * Used to build a list of facets.
+ */
+typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink;
+typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr;
+struct _xmlSchemaFacetLink {
+ struct _xmlSchemaFacetLink *next;/* the next facet link ... */
+ xmlSchemaFacetPtr facet;/* the linked facet */
+};
+
+/**
+ * XML_SCHEMAS_TYPE_MIXED:
+ *
+ * the element content type is mixed
+ */
+#define XML_SCHEMAS_TYPE_MIXED 1 << 0
+/**
+ * XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION:
+ *
+ * the simple or complex type has a derivation method of "extension".
+ */
+#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1
+/**
+ * XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION:
+ *
+ * the simple or complex type has a derivation method of "restriction".
+ */
+#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2
+/**
+ * XML_SCHEMAS_TYPE_GLOBAL:
+ *
+ * the type is global
+ */
+#define XML_SCHEMAS_TYPE_GLOBAL 1 << 3
+/**
+ * XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD:
+ *
+ * the complexType owns an attribute wildcard, i.e.
+ * it can be freed by the complexType
+ */
+#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_ABSENT:
+ *
+ * the simpleType has a variety of "absent".
+ * TODO: Actually not necessary :-/, since if
+ * none of the variety flags occur then it's
+ * automatically absent.
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_LIST:
+ *
+ * the simpleType has a variety of "list".
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_UNION:
+ *
+ * the simpleType has a variety of "union".
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_ATOMIC:
+ *
+ * the simpleType has a variety of "union".
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8
+/**
+ * XML_SCHEMAS_TYPE_FINAL_EXTENSION:
+ *
+ * the complexType has a final of "extension".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9
+/**
+ * XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
+ *
+ * the simpleType/complexType has a final of "restriction".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10
+/**
+ * XML_SCHEMAS_TYPE_FINAL_LIST:
+ *
+ * the simpleType has a final of "list".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11
+/**
+ * XML_SCHEMAS_TYPE_FINAL_UNION:
+ *
+ * the simpleType has a final of "union".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12
+/**
+ * XML_SCHEMAS_TYPE_FINAL_DEFAULT:
+ *
+ * the simpleType has a final of "default".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13
+/**
+ * XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE:
+ *
+ * Marks the item as a builtin primitive.
+ */
+#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14
+/**
+ * XML_SCHEMAS_TYPE_MARKED:
+ *
+ * Marks the item as marked; used for circular checks.
+ */
+#define XML_SCHEMAS_TYPE_MARKED 1 << 16
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
+ *
+ * the complexType did not specify 'block' so use the default of the
+ * item.
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
+ *
+ * the complexType has a 'block' of "extension".
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_RESTRICTION:
+ *
+ * the complexType has a 'block' of "restriction".
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19
+/**
+ * XML_SCHEMAS_TYPE_ABSTRACT:
+ *
+ * the simple/complexType is abstract.
+ */
+#define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20
+/**
+ * XML_SCHEMAS_TYPE_FACETSNEEDVALUE:
+ *
+ * indicates if the facets need a computed value
+ */
+#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21
+/**
+ * XML_SCHEMAS_TYPE_INTERNAL_RESOLVED:
+ *
+ * indicates that the type was typefixed
+ */
+#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22
+/**
+ * XML_SCHEMAS_TYPE_INTERNAL_INVALID:
+ *
+ * indicates that the type is invalid
+ */
+#define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23
+/**
+ * XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE:
+ *
+ * a whitespace-facet value of "preserve"
+ */
+#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24
+/**
+ * XML_SCHEMAS_TYPE_WHITESPACE_REPLACE:
+ *
+ * a whitespace-facet value of "replace"
+ */
+#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25
+/**
+ * XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE:
+ *
+ * a whitespace-facet value of "collapse"
+ */
+#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26
+/**
+ * XML_SCHEMAS_TYPE_HAS_FACETS:
+ *
+ * has facets
+ */
+#define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27
+/**
+ * XML_SCHEMAS_TYPE_NORMVALUENEEDED:
+ *
+ * indicates if the facets (pattern) need a normalized value
+ */
+#define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28
+
+/**
+ * XML_SCHEMAS_TYPE_FIXUP_1:
+ *
+ * First stage of fixup was done.
+ */
+#define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29
+
+/**
+ * XML_SCHEMAS_TYPE_REDEFINED:
+ *
+ * The type was redefined.
+ */
+#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30
+/**
+ * XML_SCHEMAS_TYPE_REDEFINING:
+ *
+ * The type redefines an other type.
+ */
+/* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */
+
+/**
+ * _xmlSchemaType:
+ *
+ * Schemas type definition.
+ */
+struct _xmlSchemaType {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaType *next; /* the next type if in a sequence ... */
+ const xmlChar *name;
+ const xmlChar *id ; /* Deprecated; not used */
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTypePtr subtypes;
+ xmlSchemaAttributePtr attributes; /* Deprecated; not used */
+ xmlNodePtr node;
+ int minOccurs; /* Deprecated; not used */
+ int maxOccurs; /* Deprecated; not used */
+
+ int flags;
+ xmlSchemaContentType contentType;
+ const xmlChar *base; /* Base type's local name */
+ const xmlChar *baseNs; /* Base type's target namespace */
+ xmlSchemaTypePtr baseType; /* The base type component */
+ xmlSchemaFacetPtr facets; /* Local facets */
+ struct _xmlSchemaType *redef; /* Deprecated; not used */
+ int recurse; /* Obsolete */
+ xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */
+ xmlSchemaWildcardPtr attributeWildcard;
+ int builtInType; /* Type of built-in types. */
+ xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */
+ xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types.
+ Could we use @subtypes for this? */
+ xmlRegexpPtr contModel; /* Holds the automaton of the content model */
+ const xmlChar *targetNamespace;
+ void *attrUses;
+};
+
+/*
+ * xmlSchemaElement:
+ * An element definition.
+ *
+ * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
+ * structures must be kept similar
+ */
+/**
+ * XML_SCHEMAS_ELEM_NILLABLE:
+ *
+ * the element is nillable
+ */
+#define XML_SCHEMAS_ELEM_NILLABLE 1 << 0
+/**
+ * XML_SCHEMAS_ELEM_GLOBAL:
+ *
+ * the element is global
+ */
+#define XML_SCHEMAS_ELEM_GLOBAL 1 << 1
+/**
+ * XML_SCHEMAS_ELEM_DEFAULT:
+ *
+ * the element has a default value
+ */
+#define XML_SCHEMAS_ELEM_DEFAULT 1 << 2
+/**
+ * XML_SCHEMAS_ELEM_FIXED:
+ *
+ * the element has a fixed value
+ */
+#define XML_SCHEMAS_ELEM_FIXED 1 << 3
+/**
+ * XML_SCHEMAS_ELEM_ABSTRACT:
+ *
+ * the element is abstract
+ */
+#define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4
+/**
+ * XML_SCHEMAS_ELEM_TOPLEVEL:
+ *
+ * the element is top level
+ * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead
+ */
+#define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5
+/**
+ * XML_SCHEMAS_ELEM_REF:
+ *
+ * the element is a reference to a type
+ */
+#define XML_SCHEMAS_ELEM_REF 1 << 6
+/**
+ * XML_SCHEMAS_ELEM_NSDEFAULT:
+ *
+ * allow elements in no namespace
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7
+/**
+ * XML_SCHEMAS_ELEM_INTERNAL_RESOLVED:
+ *
+ * this is set when "type", "ref", "substitutionGroup"
+ * references have been resolved.
+ */
+#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8
+ /**
+ * XML_SCHEMAS_ELEM_CIRCULAR:
+ *
+ * a helper flag for the search of circular references.
+ */
+#define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_ABSENT:
+ *
+ * the "block" attribute is absent
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_EXTENSION:
+ *
+ * disallowed substitutions are absent
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_RESTRICTION:
+ *
+ * disallowed substitutions: "restriction"
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
+ *
+ * disallowed substitutions: "substitution"
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13
+/**
+ * XML_SCHEMAS_ELEM_FINAL_ABSENT:
+ *
+ * substitution group exclusions are absent
+ */
+#define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14
+/**
+ * XML_SCHEMAS_ELEM_FINAL_EXTENSION:
+ *
+ * substitution group exclusions: "extension"
+ */
+#define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15
+/**
+ * XML_SCHEMAS_ELEM_FINAL_RESTRICTION:
+ *
+ * substitution group exclusions: "restriction"
+ */
+#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16
+/**
+ * XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD:
+ *
+ * the declaration is a substitution group head
+ */
+#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17
+/**
+ * XML_SCHEMAS_ELEM_INTERNAL_CHECKED:
+ *
+ * this is set when the elem decl has been checked against
+ * all constraints
+ */
+#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18
+
+typedef struct _xmlSchemaElement xmlSchemaElement;
+typedef xmlSchemaElement *xmlSchemaElementPtr;
+struct _xmlSchemaElement {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaType *next; /* Not used? */
+ const xmlChar *name;
+ const xmlChar *id; /* Deprecated; not used */
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTypePtr subtypes; /* the type definition */
+ xmlSchemaAttributePtr attributes;
+ xmlNodePtr node;
+ int minOccurs; /* Deprecated; not used */
+ int maxOccurs; /* Deprecated; not used */
+
+ int flags;
+ const xmlChar *targetNamespace;
+ const xmlChar *namedType;
+ const xmlChar *namedTypeNs;
+ const xmlChar *substGroup;
+ const xmlChar *substGroupNs;
+ const xmlChar *scope;
+ const xmlChar *value; /* The original value of the value constraint. */
+ struct _xmlSchemaElement *refDecl; /* This will now be used for the
+ substitution group affiliation */
+ xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */
+ xmlSchemaContentType contentType;
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaValPtr defVal; /* The compiled value constraint. */
+ void *idcs; /* The identity-constraint defs */
+};
+
+/*
+ * XML_SCHEMAS_FACET_UNKNOWN:
+ *
+ * unknown facet handling
+ */
+#define XML_SCHEMAS_FACET_UNKNOWN 0
+/*
+ * XML_SCHEMAS_FACET_PRESERVE:
+ *
+ * preserve the type of the facet
+ */
+#define XML_SCHEMAS_FACET_PRESERVE 1
+/*
+ * XML_SCHEMAS_FACET_REPLACE:
+ *
+ * replace the type of the facet
+ */
+#define XML_SCHEMAS_FACET_REPLACE 2
+/*
+ * XML_SCHEMAS_FACET_COLLAPSE:
+ *
+ * collapse the types of the facet
+ */
+#define XML_SCHEMAS_FACET_COLLAPSE 3
+/**
+ * A facet definition.
+ */
+struct _xmlSchemaFacet {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
+ const xmlChar *value; /* The original value */
+ const xmlChar *id; /* Obsolete */
+ xmlSchemaAnnotPtr annot;
+ xmlNodePtr node;
+ int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */
+ int whitespace;
+ xmlSchemaValPtr val; /* The compiled value */
+ xmlRegexpPtr regexp; /* The regex for patterns */
+};
+
+/**
+ * A notation definition.
+ */
+typedef struct _xmlSchemaNotation xmlSchemaNotation;
+typedef xmlSchemaNotation *xmlSchemaNotationPtr;
+struct _xmlSchemaNotation {
+ xmlSchemaTypeType type; /* The kind of type */
+ const xmlChar *name;
+ xmlSchemaAnnotPtr annot;
+ const xmlChar *identifier;
+ const xmlChar *targetNamespace;
+};
+
+/*
+* TODO: Actually all those flags used for the schema should sit
+* on the schema parser context, since they are used only
+* during parsing an XML schema document, and not available
+* on the component level as per spec.
+*/
+/**
+ * XML_SCHEMAS_QUALIF_ELEM:
+ *
+ * Reflects elementFormDefault == qualified in
+ * an XML schema document.
+ */
+#define XML_SCHEMAS_QUALIF_ELEM 1 << 0
+/**
+ * XML_SCHEMAS_QUALIF_ATTR:
+ *
+ * Reflects attributeFormDefault == qualified in
+ * an XML schema document.
+ */
+#define XML_SCHEMAS_QUALIF_ATTR 1 << 1
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_EXTENSION:
+ *
+ * the schema has "extension" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION:
+ *
+ * the schema has "restriction" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_LIST:
+ *
+ * the schema has "list" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_UNION:
+ *
+ * the schema has "union" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5
+/**
+ * XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION:
+ *
+ * the schema has "extension" in the set of blockDefault.
+ */
+#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6
+/**
+ * XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION:
+ *
+ * the schema has "restriction" in the set of blockDefault.
+ */
+#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7
+/**
+ * XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION:
+ *
+ * the schema has "substitution" in the set of blockDefault.
+ */
+#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8
+/**
+ * XML_SCHEMAS_INCLUDING_CONVERT_NS:
+ *
+ * the schema is currently including an other schema with
+ * no target namespace.
+ */
+#define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9
+/**
+ * _xmlSchema:
+ *
+ * A Schemas definition
+ */
+struct _xmlSchema {
+ const xmlChar *name; /* schema name */
+ const xmlChar *targetNamespace; /* the target namespace */
+ const xmlChar *version;
+ const xmlChar *id; /* Obsolete */
+ xmlDocPtr doc;
+ xmlSchemaAnnotPtr annot;
+ int flags;
+
+ xmlHashTablePtr typeDecl;
+ xmlHashTablePtr attrDecl;
+ xmlHashTablePtr attrgrpDecl;
+ xmlHashTablePtr elemDecl;
+ xmlHashTablePtr notaDecl;
+
+ xmlHashTablePtr schemasImports;
+
+ void *_private; /* unused by the library for users or bindings */
+ xmlHashTablePtr groupDecl;
+ xmlDictPtr dict;
+ void *includes; /* the includes, this is opaque for now */
+ int preserve; /* whether to free the document */
+ int counter; /* used to give anonymous components unique names */
+ xmlHashTablePtr idcDef; /* All identity-constraint defs. */
+ void *volatiles; /* Obsolete */
+};
+
+XMLPUBFUN void xmlSchemaFreeType (xmlSchemaTypePtr type);
+XMLPUBFUN void xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+#endif /* __XML_SCHEMA_INTERNALS_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/schematron.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/schematron.h
new file mode 100644
index 0000000000000000000000000000000000000000..8dd8d25c451c3ee2fb988cc32f6d7f24492eb589
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/schematron.h
@@ -0,0 +1,143 @@
+/*
+ * Summary: XML Schematron implementation
+ * Description: interface to the XML Schematron validity checking.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMATRON_H__
+#define __XML_SCHEMATRON_H__
+
+#include
+
+#ifdef LIBXML_SCHEMATRON_ENABLED
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */
+ XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */
+ XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */
+ XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */
+ XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */
+ XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */
+ XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */
+} xmlSchematronValidOptions;
+
+/**
+ * The schemas related types are kept internal
+ */
+typedef struct _xmlSchematron xmlSchematron;
+typedef xmlSchematron *xmlSchematronPtr;
+
+/**
+ * xmlSchematronValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from a Schematron validation
+ */
+typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
+
+/**
+ * xmlSchematronValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from a Schematron validation
+ */
+typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
+
+/**
+ * A schemas validation context
+ */
+typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
+typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
+
+typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
+typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
+
+/*
+ * Interfaces for parsing.
+ */
+XMLPUBFUN xmlSchematronParserCtxtPtr
+ xmlSchematronNewParserCtxt (const char *URL);
+XMLPUBFUN xmlSchematronParserCtxtPtr
+ xmlSchematronNewMemParserCtxt(const char *buffer,
+ int size);
+XMLPUBFUN xmlSchematronParserCtxtPtr
+ xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
+XMLPUBFUN void
+ xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
+/*****
+XMLPUBFUN void
+ xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc err,
+ xmlSchematronValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int
+ xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc * err,
+ xmlSchematronValidityWarningFunc * warn,
+ void **ctx);
+XMLPUBFUN int
+ xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
+ *****/
+XMLPUBFUN xmlSchematronPtr
+ xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlSchematronFree (xmlSchematronPtr schema);
+/*
+ * Interfaces for validating
+ */
+XMLPUBFUN void
+ xmlSchematronSetValidStructuredErrors(
+ xmlSchematronValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+/******
+XMLPUBFUN void
+ xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc err,
+ xmlSchematronValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int
+ xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc *err,
+ xmlSchematronValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN int
+ xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
+ int options);
+XMLPUBFUN int
+ xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
+ xmlNodePtr elem);
+ *******/
+
+XMLPUBFUN xmlSchematronValidCtxtPtr
+ xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
+ int options);
+XMLPUBFUN void
+ xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
+ xmlDocPtr instance);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMATRON_ENABLED */
+#endif /* __XML_SCHEMATRON_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/threads.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/threads.h
new file mode 100644
index 0000000000000000000000000000000000000000..ec2b16b17c2f09d216cbe90df031bebbc5161745
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/threads.h
@@ -0,0 +1,81 @@
+/**
+ * Summary: interfaces for thread handling
+ * Description: set of generic threading related routines
+ * should work with pthreads, Windows native or TLS threads
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_THREADS_H__
+#define __XML_THREADS_H__
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * xmlMutex are a simple mutual exception locks.
+ */
+typedef struct _xmlMutex xmlMutex;
+typedef xmlMutex *xmlMutexPtr;
+
+/*
+ * xmlRMutex are reentrant mutual exception locks.
+ */
+typedef struct _xmlRMutex xmlRMutex;
+typedef xmlRMutex *xmlRMutexPtr;
+
+XMLPUBFUN int
+ xmlCheckThreadLocalStorage(void);
+
+XMLPUBFUN xmlMutexPtr
+ xmlNewMutex (void);
+XMLPUBFUN void
+ xmlMutexLock (xmlMutexPtr tok);
+XMLPUBFUN void
+ xmlMutexUnlock (xmlMutexPtr tok);
+XMLPUBFUN void
+ xmlFreeMutex (xmlMutexPtr tok);
+
+XMLPUBFUN xmlRMutexPtr
+ xmlNewRMutex (void);
+XMLPUBFUN void
+ xmlRMutexLock (xmlRMutexPtr tok);
+XMLPUBFUN void
+ xmlRMutexUnlock (xmlRMutexPtr tok);
+XMLPUBFUN void
+ xmlFreeRMutex (xmlRMutexPtr tok);
+
+/*
+ * Library wide APIs.
+ */
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlInitThreads (void);
+XMLPUBFUN void
+ xmlLockLibrary (void);
+XMLPUBFUN void
+ xmlUnlockLibrary(void);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlCleanupThreads(void);
+
+/** DOC_DISABLE */
+#if defined(LIBXML_THREAD_ENABLED) && defined(_WIN32) && \
+ defined(LIBXML_STATIC_FOR_DLL)
+int
+xmlDllMain(void *hinstDLL, unsigned long fdwReason,
+ void *lpvReserved);
+#endif
+/** DOC_ENABLE */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __XML_THREADS_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/tree.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/tree.h
new file mode 100644
index 0000000000000000000000000000000000000000..e5a8fb709471f410e372b362ac147e16797125ed
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/tree.h
@@ -0,0 +1,1326 @@
+/*
+ * Summary: interfaces for tree manipulation
+ * Description: this module describes the structures found in an tree resulting
+ * from an XML or HTML parsing, as well as the API provided for
+ * various processing on that tree
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef XML_TREE_INTERNALS
+
+/*
+ * Emulate circular dependency for backward compatibility
+ */
+#include
+
+#else /* XML_TREE_INTERNALS */
+
+#ifndef __XML_TREE_H__
+#define __XML_TREE_H__
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Backward compatibility
+ */
+#define xmlBufferAllocScheme XML_BUFFER_ALLOC_EXACT
+#define xmlDefaultBufferSize 4096
+
+/*
+ * Some of the basic types pointer to structures:
+ */
+/* xmlIO.h */
+typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
+typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
+
+typedef struct _xmlOutputBuffer xmlOutputBuffer;
+typedef xmlOutputBuffer *xmlOutputBufferPtr;
+
+/* parser.h */
+typedef struct _xmlParserInput xmlParserInput;
+typedef xmlParserInput *xmlParserInputPtr;
+
+typedef struct _xmlParserCtxt xmlParserCtxt;
+typedef xmlParserCtxt *xmlParserCtxtPtr;
+
+typedef struct _xmlSAXLocator xmlSAXLocator;
+typedef xmlSAXLocator *xmlSAXLocatorPtr;
+
+typedef struct _xmlSAXHandler xmlSAXHandler;
+typedef xmlSAXHandler *xmlSAXHandlerPtr;
+
+/* entities.h */
+typedef struct _xmlEntity xmlEntity;
+typedef xmlEntity *xmlEntityPtr;
+
+/**
+ * LIBXML_NAMESPACE_DICT:
+ *
+ * Defines experimental behaviour:
+ * 1) xmlNs gets an additional field @context (a xmlDoc)
+ * 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc.
+ */
+/* #define LIBXML_NAMESPACE_DICT */
+
+/**
+ * xmlBufferAllocationScheme:
+ *
+ * A buffer allocation scheme can be defined to either match exactly the
+ * need or double it's allocated size each time it is found too small.
+ */
+
+typedef enum {
+ XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
+ XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
+ XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer, deprecated */
+ XML_BUFFER_ALLOC_IO, /* special allocation scheme used for I/O */
+ XML_BUFFER_ALLOC_HYBRID, /* exact up to a threshold, and doubleit thereafter */
+ XML_BUFFER_ALLOC_BOUNDED /* limit the upper size of the buffer */
+} xmlBufferAllocationScheme;
+
+/**
+ * xmlBuffer:
+ *
+ * A buffer structure, this old construct is limited to 2GB and
+ * is being deprecated, use API with xmlBuf instead
+ */
+typedef struct _xmlBuffer xmlBuffer;
+typedef xmlBuffer *xmlBufferPtr;
+struct _xmlBuffer {
+ /* The buffer content UTF8 */
+ xmlChar *content XML_DEPRECATED_MEMBER;
+ /* The buffer size used */
+ unsigned int use XML_DEPRECATED_MEMBER;
+ /* The buffer size */
+ unsigned int size XML_DEPRECATED_MEMBER;
+ /* The realloc method */
+ xmlBufferAllocationScheme alloc XML_DEPRECATED_MEMBER;
+ /* in IO mode we may have a different base */
+ xmlChar *contentIO XML_DEPRECATED_MEMBER;
+};
+
+/**
+ * xmlBuf:
+ *
+ * A buffer structure, new one, the actual structure internals are not public
+ */
+
+typedef struct _xmlBuf xmlBuf;
+
+/**
+ * xmlBufPtr:
+ *
+ * A pointer to a buffer structure, the actual structure internals are not
+ * public
+ */
+
+typedef xmlBuf *xmlBufPtr;
+
+/*
+ * A few public routines for xmlBuf. As those are expected to be used
+ * mostly internally the bulk of the routines are internal in buf.h
+ */
+XMLPUBFUN xmlChar* xmlBufContent (const xmlBuf* buf);
+XMLPUBFUN xmlChar* xmlBufEnd (xmlBufPtr buf);
+XMLPUBFUN size_t xmlBufUse (const xmlBufPtr buf);
+XMLPUBFUN size_t xmlBufShrink (xmlBufPtr buf, size_t len);
+
+/*
+ * LIBXML2_NEW_BUFFER:
+ *
+ * Macro used to express that the API use the new buffers for
+ * xmlParserInputBuffer and xmlOutputBuffer. The change was
+ * introduced in 2.9.0.
+ */
+#define LIBXML2_NEW_BUFFER
+
+/**
+ * XML_XML_NAMESPACE:
+ *
+ * This is the namespace for the special xml: prefix predefined in the
+ * XML Namespace specification.
+ */
+#define XML_XML_NAMESPACE \
+ (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
+
+/**
+ * XML_XML_ID:
+ *
+ * This is the name for the special xml:id attribute
+ */
+#define XML_XML_ID (const xmlChar *) "xml:id"
+
+/*
+ * The different element types carried by an XML tree.
+ *
+ * NOTE: This is synchronized with DOM Level1 values
+ * See http://www.w3.org/TR/REC-DOM-Level-1/
+ *
+ * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
+ * be deprecated to use an XML_DTD_NODE.
+ */
+typedef enum {
+ XML_ELEMENT_NODE= 1,
+ XML_ATTRIBUTE_NODE= 2,
+ XML_TEXT_NODE= 3,
+ XML_CDATA_SECTION_NODE= 4,
+ XML_ENTITY_REF_NODE= 5,
+ XML_ENTITY_NODE= 6, /* unused */
+ XML_PI_NODE= 7,
+ XML_COMMENT_NODE= 8,
+ XML_DOCUMENT_NODE= 9,
+ XML_DOCUMENT_TYPE_NODE= 10, /* unused */
+ XML_DOCUMENT_FRAG_NODE= 11,
+ XML_NOTATION_NODE= 12, /* unused */
+ XML_HTML_DOCUMENT_NODE= 13,
+ XML_DTD_NODE= 14,
+ XML_ELEMENT_DECL= 15,
+ XML_ATTRIBUTE_DECL= 16,
+ XML_ENTITY_DECL= 17,
+ XML_NAMESPACE_DECL= 18,
+ XML_XINCLUDE_START= 19,
+ XML_XINCLUDE_END= 20
+ /* XML_DOCB_DOCUMENT_NODE= 21 */ /* removed */
+} xmlElementType;
+
+/** DOC_DISABLE */
+/* For backward compatibility */
+#define XML_DOCB_DOCUMENT_NODE 21
+/** DOC_ENABLE */
+
+/**
+ * xmlNotation:
+ *
+ * A DTD Notation definition.
+ */
+
+typedef struct _xmlNotation xmlNotation;
+typedef xmlNotation *xmlNotationPtr;
+struct _xmlNotation {
+ const xmlChar *name; /* Notation name */
+ const xmlChar *PublicID; /* Public identifier, if any */
+ const xmlChar *SystemID; /* System identifier, if any */
+};
+
+/**
+ * xmlAttributeType:
+ *
+ * A DTD Attribute type definition.
+ */
+
+typedef enum {
+ XML_ATTRIBUTE_CDATA = 1,
+ XML_ATTRIBUTE_ID,
+ XML_ATTRIBUTE_IDREF ,
+ XML_ATTRIBUTE_IDREFS,
+ XML_ATTRIBUTE_ENTITY,
+ XML_ATTRIBUTE_ENTITIES,
+ XML_ATTRIBUTE_NMTOKEN,
+ XML_ATTRIBUTE_NMTOKENS,
+ XML_ATTRIBUTE_ENUMERATION,
+ XML_ATTRIBUTE_NOTATION
+} xmlAttributeType;
+
+/**
+ * xmlAttributeDefault:
+ *
+ * A DTD Attribute default definition.
+ */
+
+typedef enum {
+ XML_ATTRIBUTE_NONE = 1,
+ XML_ATTRIBUTE_REQUIRED,
+ XML_ATTRIBUTE_IMPLIED,
+ XML_ATTRIBUTE_FIXED
+} xmlAttributeDefault;
+
+/**
+ * xmlEnumeration:
+ *
+ * List structure used when there is an enumeration in DTDs.
+ */
+
+typedef struct _xmlEnumeration xmlEnumeration;
+typedef xmlEnumeration *xmlEnumerationPtr;
+struct _xmlEnumeration {
+ struct _xmlEnumeration *next; /* next one */
+ const xmlChar *name; /* Enumeration name */
+};
+
+/**
+ * xmlAttribute:
+ *
+ * An Attribute declaration in a DTD.
+ */
+
+typedef struct _xmlAttribute xmlAttribute;
+typedef xmlAttribute *xmlAttributePtr;
+struct _xmlAttribute {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */
+ const xmlChar *name; /* Attribute name */
+ struct _xmlNode *children; /* NULL */
+ struct _xmlNode *last; /* NULL */
+ struct _xmlDtd *parent; /* -> DTD */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ struct _xmlAttribute *nexth; /* next in hash table */
+ xmlAttributeType atype; /* The attribute type */
+ xmlAttributeDefault def; /* the default */
+ const xmlChar *defaultValue; /* or the default value */
+ xmlEnumerationPtr tree; /* or the enumeration tree if any */
+ const xmlChar *prefix; /* the namespace prefix if any */
+ const xmlChar *elem; /* Element holding the attribute */
+};
+
+/**
+ * xmlElementContentType:
+ *
+ * Possible definitions of element content types.
+ */
+typedef enum {
+ XML_ELEMENT_CONTENT_PCDATA = 1,
+ XML_ELEMENT_CONTENT_ELEMENT,
+ XML_ELEMENT_CONTENT_SEQ,
+ XML_ELEMENT_CONTENT_OR
+} xmlElementContentType;
+
+/**
+ * xmlElementContentOccur:
+ *
+ * Possible definitions of element content occurrences.
+ */
+typedef enum {
+ XML_ELEMENT_CONTENT_ONCE = 1,
+ XML_ELEMENT_CONTENT_OPT,
+ XML_ELEMENT_CONTENT_MULT,
+ XML_ELEMENT_CONTENT_PLUS
+} xmlElementContentOccur;
+
+/**
+ * xmlElementContent:
+ *
+ * An XML Element content as stored after parsing an element definition
+ * in a DTD.
+ */
+
+typedef struct _xmlElementContent xmlElementContent;
+typedef xmlElementContent *xmlElementContentPtr;
+struct _xmlElementContent {
+ xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
+ xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
+ const xmlChar *name; /* Element name */
+ struct _xmlElementContent *c1; /* first child */
+ struct _xmlElementContent *c2; /* second child */
+ struct _xmlElementContent *parent; /* parent */
+ const xmlChar *prefix; /* Namespace prefix */
+};
+
+/**
+ * xmlElementTypeVal:
+ *
+ * The different possibilities for an element content type.
+ */
+
+typedef enum {
+ XML_ELEMENT_TYPE_UNDEFINED = 0,
+ XML_ELEMENT_TYPE_EMPTY = 1,
+ XML_ELEMENT_TYPE_ANY,
+ XML_ELEMENT_TYPE_MIXED,
+ XML_ELEMENT_TYPE_ELEMENT
+} xmlElementTypeVal;
+
+/**
+ * xmlElement:
+ *
+ * An XML Element declaration from a DTD.
+ */
+
+typedef struct _xmlElement xmlElement;
+typedef xmlElement *xmlElementPtr;
+struct _xmlElement {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */
+ const xmlChar *name; /* Element name */
+ struct _xmlNode *children; /* NULL */
+ struct _xmlNode *last; /* NULL */
+ struct _xmlDtd *parent; /* -> DTD */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ xmlElementTypeVal etype; /* The type */
+ xmlElementContentPtr content; /* the allowed element content */
+ xmlAttributePtr attributes; /* List of the declared attributes */
+ const xmlChar *prefix; /* the namespace prefix if any */
+#ifdef LIBXML_REGEXP_ENABLED
+ xmlRegexpPtr contModel; /* the validating regexp */
+#else
+ void *contModel;
+#endif
+};
+
+
+/**
+ * XML_LOCAL_NAMESPACE:
+ *
+ * A namespace declaration node.
+ */
+#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
+typedef xmlElementType xmlNsType;
+
+/**
+ * xmlNs:
+ *
+ * An XML namespace.
+ * Note that prefix == NULL is valid, it defines the default namespace
+ * within the subtree (until overridden).
+ *
+ * xmlNsType is unified with xmlElementType.
+ */
+
+typedef struct _xmlNs xmlNs;
+typedef xmlNs *xmlNsPtr;
+struct _xmlNs {
+ struct _xmlNs *next; /* next Ns link for this node */
+ xmlNsType type; /* global or local */
+ const xmlChar *href; /* URL for the namespace */
+ const xmlChar *prefix; /* prefix for the namespace */
+ void *_private; /* application data */
+ struct _xmlDoc *context; /* normally an xmlDoc */
+};
+
+/**
+ * xmlDtd:
+ *
+ * An XML DTD, as defined by parent link */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ /* End of common part */
+ void *notations; /* Hash table for notations if any */
+ void *elements; /* Hash table for elements if any */
+ void *attributes; /* Hash table for attributes if any */
+ void *entities; /* Hash table for entities if any */
+ const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
+ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
+ void *pentities; /* Hash table for param entities if any */
+};
+
+/**
+ * xmlAttr:
+ *
+ * An attribute on an XML node.
+ */
+typedef struct _xmlAttr xmlAttr;
+typedef xmlAttr *xmlAttrPtr;
+struct _xmlAttr {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */
+ const xmlChar *name; /* the name of the property */
+ struct _xmlNode *children; /* the value of the property */
+ struct _xmlNode *last; /* NULL */
+ struct _xmlNode *parent; /* child->parent link */
+ struct _xmlAttr *next; /* next sibling link */
+ struct _xmlAttr *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+ xmlNs *ns; /* pointer to the associated namespace */
+ xmlAttributeType atype; /* the attribute type if validating */
+ void *psvi; /* for type/PSVI information */
+ struct _xmlID *id; /* the ID struct */
+};
+
+/**
+ * xmlID:
+ *
+ * An XML ID instance.
+ */
+
+typedef struct _xmlID xmlID;
+typedef xmlID *xmlIDPtr;
+struct _xmlID {
+ struct _xmlID *next; /* next ID */
+ const xmlChar *value; /* The ID name */
+ xmlAttrPtr attr; /* The attribute holding it */
+ const xmlChar *name; /* The attribute if attr is not available */
+ int lineno; /* The line number if attr is not available */
+ struct _xmlDoc *doc; /* The document holding the ID */
+};
+
+/**
+ * xmlRef:
+ *
+ * An XML IDREF instance.
+ */
+
+typedef struct _xmlRef xmlRef;
+typedef xmlRef *xmlRefPtr;
+struct _xmlRef {
+ struct _xmlRef *next; /* next Ref */
+ const xmlChar *value; /* The Ref name */
+ xmlAttrPtr attr; /* The attribute holding it */
+ const xmlChar *name; /* The attribute if attr is not available */
+ int lineno; /* The line number if attr is not available */
+};
+
+/**
+ * xmlNode:
+ *
+ * A node in an XML tree.
+ */
+typedef struct _xmlNode xmlNode;
+typedef xmlNode *xmlNodePtr;
+struct _xmlNode {
+ void *_private; /* application data */
+ xmlElementType type; /* type number, must be second ! */
+ const xmlChar *name; /* the name of the node, or the entity */
+ struct _xmlNode *children; /* parent->childs link */
+ struct _xmlNode *last; /* last child link */
+ struct _xmlNode *parent; /* child->parent link */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ /* End of common part */
+ xmlNs *ns; /* pointer to the associated namespace */
+ xmlChar *content; /* the content */
+ struct _xmlAttr *properties;/* properties list */
+ xmlNs *nsDef; /* namespace definitions on this node */
+ void *psvi; /* for type/PSVI information */
+ unsigned short line; /* line number */
+ unsigned short extra; /* extra data for XPath/XSLT */
+};
+
+/**
+ * XML_GET_CONTENT:
+ *
+ * Macro to extract the content pointer of a node.
+ */
+#define XML_GET_CONTENT(n) \
+ ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
+
+/**
+ * XML_GET_LINE:
+ *
+ * Macro to extract the line number of an element node.
+ */
+#define XML_GET_LINE(n) \
+ (xmlGetLineNo(n))
+
+/**
+ * xmlDocProperty
+ *
+ * Set of properties of the document as found by the parser
+ * Some of them are linked to similarly named xmlParserOption
+ */
+typedef enum {
+ XML_DOC_WELLFORMED = 1<<0, /* document is XML well formed */
+ XML_DOC_NSVALID = 1<<1, /* document is Namespace valid */
+ XML_DOC_OLD10 = 1<<2, /* parsed with old XML-1.0 parser */
+ XML_DOC_DTDVALID = 1<<3, /* DTD validation was successful */
+ XML_DOC_XINCLUDE = 1<<4, /* XInclude substitution was done */
+ XML_DOC_USERBUILT = 1<<5, /* Document was built using the API
+ and not by parsing an instance */
+ XML_DOC_INTERNAL = 1<<6, /* built for internal processing */
+ XML_DOC_HTML = 1<<7 /* parsed or built HTML document */
+} xmlDocProperties;
+
+/**
+ * xmlDoc:
+ *
+ * An XML document.
+ */
+typedef struct _xmlDoc xmlDoc;
+typedef xmlDoc *xmlDocPtr;
+struct _xmlDoc {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
+ char *name; /* name/filename/URI of the document */
+ struct _xmlNode *children; /* the document tree */
+ struct _xmlNode *last; /* last child link */
+ struct _xmlNode *parent; /* child->parent link */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* autoreference to itself */
+
+ /* End of common part */
+ int compression;/* level of zlib compression */
+ int standalone; /* standalone document (no external refs)
+ 1 if standalone="yes"
+ 0 if standalone="no"
+ -1 if there is no XML declaration
+ -2 if there is an XML declaration, but no
+ standalone attribute was specified */
+ struct _xmlDtd *intSubset; /* the document internal subset */
+ struct _xmlDtd *extSubset; /* the document external subset */
+ struct _xmlNs *oldNs; /* Global namespace, the old way */
+ const xmlChar *version; /* the XML version string */
+ const xmlChar *encoding; /* actual encoding, if any */
+ void *ids; /* Hash table for ID attributes if any */
+ void *refs; /* Hash table for IDREFs attributes if any */
+ const xmlChar *URL; /* The URI for that document */
+ int charset; /* unused */
+ struct _xmlDict *dict; /* dict used to allocate names or NULL */
+ void *psvi; /* for type/PSVI information */
+ int parseFlags; /* set of xmlParserOption used to parse the
+ document */
+ int properties; /* set of xmlDocProperties for this document
+ set at the end of parsing */
+};
+
+
+typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
+typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
+
+/**
+ * xmlDOMWrapAcquireNsFunction:
+ * @ctxt: a DOM wrapper context
+ * @node: the context node (element or attribute)
+ * @nsName: the requested namespace name
+ * @nsPrefix: the requested namespace prefix
+ *
+ * A function called to acquire namespaces (xmlNs) from the wrapper.
+ *
+ * Returns an xmlNsPtr or NULL in case of an error.
+ */
+typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt,
+ xmlNodePtr node,
+ const xmlChar *nsName,
+ const xmlChar *nsPrefix);
+
+/**
+ * xmlDOMWrapCtxt:
+ *
+ * Context for DOM wrapper-operations.
+ */
+struct _xmlDOMWrapCtxt {
+ void * _private;
+ /*
+ * The type of this context, just in case we need specialized
+ * contexts in the future.
+ */
+ int type;
+ /*
+ * Internal namespace map used for various operations.
+ */
+ void * namespaceMap;
+ /*
+ * Use this one to acquire an xmlNsPtr intended for node->ns.
+ * (Note that this is not intended for elem->nsDef).
+ */
+ xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
+};
+
+/**
+ * xmlRegisterNodeFunc:
+ * @node: the current node
+ *
+ * Signature for the registration callback of a created node
+ */
+typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
+
+/**
+ * xmlDeregisterNodeFunc:
+ * @node: the current node
+ *
+ * Signature for the deregistration callback of a discarded node
+ */
+typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
+
+/**
+ * xmlChildrenNode:
+ *
+ * Macro for compatibility naming layer with libxml1. Maps
+ * to "children."
+ */
+#ifndef xmlChildrenNode
+#define xmlChildrenNode children
+#endif
+
+/**
+ * xmlRootNode:
+ *
+ * Macro for compatibility naming layer with libxml1. Maps
+ * to "children".
+ */
+#ifndef xmlRootNode
+#define xmlRootNode children
+#endif
+
+/*
+ * Variables.
+ */
+
+/** DOC_DISABLE */
+XML_DEPRECATED
+XMLPUBFUN xmlRegisterNodeFunc *__xmlRegisterNodeDefaultValue(void);
+XML_DEPRECATED
+XMLPUBFUN xmlDeregisterNodeFunc *__xmlDeregisterNodeDefaultValue(void);
+
+#ifndef XML_GLOBALS_NO_REDEFINITION
+ #define xmlRegisterNodeDefaultValue \
+ (*__xmlRegisterNodeDefaultValue())
+ #define xmlDeregisterNodeDefaultValue \
+ (*__xmlDeregisterNodeDefaultValue())
+#endif
+/** DOC_ENABLE */
+
+/*
+ * Some helper functions
+ */
+XMLPUBFUN int
+ xmlValidateNCName (const xmlChar *value,
+ int space);
+
+XMLPUBFUN int
+ xmlValidateQName (const xmlChar *value,
+ int space);
+XMLPUBFUN int
+ xmlValidateName (const xmlChar *value,
+ int space);
+XMLPUBFUN int
+ xmlValidateNMToken (const xmlChar *value,
+ int space);
+
+XMLPUBFUN xmlChar *
+ xmlBuildQName (const xmlChar *ncname,
+ const xmlChar *prefix,
+ xmlChar *memory,
+ int len);
+XMLPUBFUN xmlChar *
+ xmlSplitQName2 (const xmlChar *name,
+ xmlChar **prefix);
+XMLPUBFUN const xmlChar *
+ xmlSplitQName3 (const xmlChar *name,
+ int *len);
+
+/*
+ * Handling Buffers, the old ones see @xmlBuf for the new ones.
+ */
+
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
+XML_DEPRECATED
+XMLPUBFUN xmlBufferAllocationScheme
+ xmlGetBufferAllocationScheme(void);
+
+XMLPUBFUN xmlBufferPtr
+ xmlBufferCreate (void);
+XMLPUBFUN xmlBufferPtr
+ xmlBufferCreateSize (size_t size);
+XMLPUBFUN xmlBufferPtr
+ xmlBufferCreateStatic (void *mem,
+ size_t size);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlBufferResize (xmlBufferPtr buf,
+ unsigned int size);
+XMLPUBFUN void
+ xmlBufferFree (xmlBufferPtr buf);
+XMLPUBFUN int
+ xmlBufferDump (FILE *file,
+ xmlBufferPtr buf);
+XMLPUBFUN int
+ xmlBufferAdd (xmlBufferPtr buf,
+ const xmlChar *str,
+ int len);
+XMLPUBFUN int
+ xmlBufferAddHead (xmlBufferPtr buf,
+ const xmlChar *str,
+ int len);
+XMLPUBFUN int
+ xmlBufferCat (xmlBufferPtr buf,
+ const xmlChar *str);
+XMLPUBFUN int
+ xmlBufferCCat (xmlBufferPtr buf,
+ const char *str);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlBufferShrink (xmlBufferPtr buf,
+ unsigned int len);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlBufferGrow (xmlBufferPtr buf,
+ unsigned int len);
+XMLPUBFUN void
+ xmlBufferEmpty (xmlBufferPtr buf);
+XMLPUBFUN const xmlChar*
+ xmlBufferContent (const xmlBuffer *buf);
+XMLPUBFUN xmlChar*
+ xmlBufferDetach (xmlBufferPtr buf);
+XMLPUBFUN void
+ xmlBufferSetAllocationScheme(xmlBufferPtr buf,
+ xmlBufferAllocationScheme scheme);
+XMLPUBFUN int
+ xmlBufferLength (const xmlBuffer *buf);
+
+/*
+ * Creating/freeing new structures.
+ */
+XMLPUBFUN xmlDtdPtr
+ xmlCreateIntSubset (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr
+ xmlNewDtd (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr
+ xmlGetIntSubset (const xmlDoc *doc);
+XMLPUBFUN void
+ xmlFreeDtd (xmlDtdPtr cur);
+XMLPUBFUN xmlNsPtr
+ xmlNewNs (xmlNodePtr node,
+ const xmlChar *href,
+ const xmlChar *prefix);
+XMLPUBFUN void
+ xmlFreeNs (xmlNsPtr cur);
+XMLPUBFUN void
+ xmlFreeNsList (xmlNsPtr cur);
+XMLPUBFUN xmlDocPtr
+ xmlNewDoc (const xmlChar *version);
+XMLPUBFUN void
+ xmlFreeDoc (xmlDocPtr cur);
+XMLPUBFUN xmlAttrPtr
+ xmlNewDocProp (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN xmlAttrPtr
+ xmlNewProp (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN xmlAttrPtr
+ xmlNewNsProp (xmlNodePtr node,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN xmlAttrPtr
+ xmlNewNsPropEatName (xmlNodePtr node,
+ xmlNsPtr ns,
+ xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN void
+ xmlFreePropList (xmlAttrPtr cur);
+XMLPUBFUN void
+ xmlFreeProp (xmlAttrPtr cur);
+XMLPUBFUN xmlAttrPtr
+ xmlCopyProp (xmlNodePtr target,
+ xmlAttrPtr cur);
+XMLPUBFUN xmlAttrPtr
+ xmlCopyPropList (xmlNodePtr target,
+ xmlAttrPtr cur);
+XMLPUBFUN xmlDtdPtr
+ xmlCopyDtd (xmlDtdPtr dtd);
+XMLPUBFUN xmlDocPtr
+ xmlCopyDoc (xmlDocPtr doc,
+ int recursive);
+/*
+ * Creating new nodes.
+ */
+XMLPUBFUN xmlNodePtr
+ xmlNewDocNode (xmlDocPtr doc,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr
+ xmlNewDocNodeEatName (xmlDocPtr doc,
+ xmlNsPtr ns,
+ xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr
+ xmlNewNode (xmlNsPtr ns,
+ const xmlChar *name);
+XMLPUBFUN xmlNodePtr
+ xmlNewNodeEatName (xmlNsPtr ns,
+ xmlChar *name);
+XMLPUBFUN xmlNodePtr
+ xmlNewChild (xmlNodePtr parent,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr
+ xmlNewDocText (const xmlDoc *doc,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr
+ xmlNewText (const xmlChar *content);
+XMLPUBFUN xmlNodePtr
+ xmlNewDocPI (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr
+ xmlNewPI (const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr
+ xmlNewDocTextLen (xmlDocPtr doc,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN xmlNodePtr
+ xmlNewTextLen (const xmlChar *content,
+ int len);
+XMLPUBFUN xmlNodePtr
+ xmlNewDocComment (xmlDocPtr doc,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr
+ xmlNewComment (const xmlChar *content);
+XMLPUBFUN xmlNodePtr
+ xmlNewCDataBlock (xmlDocPtr doc,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN xmlNodePtr
+ xmlNewCharRef (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlNodePtr
+ xmlNewReference (const xmlDoc *doc,
+ const xmlChar *name);
+XMLPUBFUN xmlNodePtr
+ xmlCopyNode (xmlNodePtr node,
+ int recursive);
+XMLPUBFUN xmlNodePtr
+ xmlDocCopyNode (xmlNodePtr node,
+ xmlDocPtr doc,
+ int recursive);
+XMLPUBFUN xmlNodePtr
+ xmlDocCopyNodeList (xmlDocPtr doc,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodePtr
+ xmlCopyNodeList (xmlNodePtr node);
+XMLPUBFUN xmlNodePtr
+ xmlNewTextChild (xmlNodePtr parent,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr
+ xmlNewDocRawNode (xmlDocPtr doc,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr
+ xmlNewDocFragment (xmlDocPtr doc);
+
+/*
+ * Navigating.
+ */
+XMLPUBFUN long
+ xmlGetLineNo (const xmlNode *node);
+XMLPUBFUN xmlChar *
+ xmlGetNodePath (const xmlNode *node);
+XMLPUBFUN xmlNodePtr
+ xmlDocGetRootElement (const xmlDoc *doc);
+XMLPUBFUN xmlNodePtr
+ xmlGetLastChild (const xmlNode *parent);
+XMLPUBFUN int
+ xmlNodeIsText (const xmlNode *node);
+XMLPUBFUN int
+ xmlIsBlankNode (const xmlNode *node);
+
+/*
+ * Changing the structure.
+ */
+XMLPUBFUN xmlNodePtr
+ xmlDocSetRootElement (xmlDocPtr doc,
+ xmlNodePtr root);
+XMLPUBFUN void
+ xmlNodeSetName (xmlNodePtr cur,
+ const xmlChar *name);
+XMLPUBFUN xmlNodePtr
+ xmlAddChild (xmlNodePtr parent,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr
+ xmlAddChildList (xmlNodePtr parent,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr
+ xmlReplaceNode (xmlNodePtr old,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr
+ xmlAddPrevSibling (xmlNodePtr cur,
+ xmlNodePtr elem);
+XMLPUBFUN xmlNodePtr
+ xmlAddSibling (xmlNodePtr cur,
+ xmlNodePtr elem);
+XMLPUBFUN xmlNodePtr
+ xmlAddNextSibling (xmlNodePtr cur,
+ xmlNodePtr elem);
+XMLPUBFUN void
+ xmlUnlinkNode (xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr
+ xmlTextMerge (xmlNodePtr first,
+ xmlNodePtr second);
+XMLPUBFUN int
+ xmlTextConcat (xmlNodePtr node,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN void
+ xmlFreeNodeList (xmlNodePtr cur);
+XMLPUBFUN void
+ xmlFreeNode (xmlNodePtr cur);
+XMLPUBFUN int
+ xmlSetTreeDoc (xmlNodePtr tree,
+ xmlDocPtr doc);
+XMLPUBFUN int
+ xmlSetListDoc (xmlNodePtr list,
+ xmlDocPtr doc);
+/*
+ * Namespaces.
+ */
+XMLPUBFUN xmlNsPtr
+ xmlSearchNs (xmlDocPtr doc,
+ xmlNodePtr node,
+ const xmlChar *nameSpace);
+XMLPUBFUN xmlNsPtr
+ xmlSearchNsByHref (xmlDocPtr doc,
+ xmlNodePtr node,
+ const xmlChar *href);
+XMLPUBFUN int
+ xmlGetNsListSafe (const xmlDoc *doc,
+ const xmlNode *node,
+ xmlNsPtr **out);
+XMLPUBFUN xmlNsPtr *
+ xmlGetNsList (const xmlDoc *doc,
+ const xmlNode *node);
+
+XMLPUBFUN void
+ xmlSetNs (xmlNodePtr node,
+ xmlNsPtr ns);
+XMLPUBFUN xmlNsPtr
+ xmlCopyNamespace (xmlNsPtr cur);
+XMLPUBFUN xmlNsPtr
+ xmlCopyNamespaceList (xmlNsPtr cur);
+
+/*
+ * Changing the content.
+ */
+XMLPUBFUN xmlAttrPtr
+ xmlSetProp (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN xmlAttrPtr
+ xmlSetNsProp (xmlNodePtr node,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN int
+ xmlNodeGetAttrValue (const xmlNode *node,
+ const xmlChar *name,
+ const xmlChar *nsUri,
+ xmlChar **out);
+XMLPUBFUN xmlChar *
+ xmlGetNoNsProp (const xmlNode *node,
+ const xmlChar *name);
+XMLPUBFUN xmlChar *
+ xmlGetProp (const xmlNode *node,
+ const xmlChar *name);
+XMLPUBFUN xmlAttrPtr
+ xmlHasProp (const xmlNode *node,
+ const xmlChar *name);
+XMLPUBFUN xmlAttrPtr
+ xmlHasNsProp (const xmlNode *node,
+ const xmlChar *name,
+ const xmlChar *nameSpace);
+XMLPUBFUN xmlChar *
+ xmlGetNsProp (const xmlNode *node,
+ const xmlChar *name,
+ const xmlChar *nameSpace);
+XMLPUBFUN xmlNodePtr
+ xmlStringGetNodeList (const xmlDoc *doc,
+ const xmlChar *value);
+XMLPUBFUN xmlNodePtr
+ xmlStringLenGetNodeList (const xmlDoc *doc,
+ const xmlChar *value,
+ int len);
+XMLPUBFUN xmlChar *
+ xmlNodeListGetString (xmlDocPtr doc,
+ const xmlNode *list,
+ int inLine);
+XMLPUBFUN xmlChar *
+ xmlNodeListGetRawString (const xmlDoc *doc,
+ const xmlNode *list,
+ int inLine);
+XMLPUBFUN int
+ xmlNodeSetContent (xmlNodePtr cur,
+ const xmlChar *content);
+XMLPUBFUN int
+ xmlNodeSetContentLen (xmlNodePtr cur,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN int
+ xmlNodeAddContent (xmlNodePtr cur,
+ const xmlChar *content);
+XMLPUBFUN int
+ xmlNodeAddContentLen (xmlNodePtr cur,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN xmlChar *
+ xmlNodeGetContent (const xmlNode *cur);
+
+XMLPUBFUN int
+ xmlNodeBufGetContent (xmlBufferPtr buffer,
+ const xmlNode *cur);
+XMLPUBFUN int
+ xmlBufGetNodeContent (xmlBufPtr buf,
+ const xmlNode *cur);
+
+XMLPUBFUN xmlChar *
+ xmlNodeGetLang (const xmlNode *cur);
+XMLPUBFUN int
+ xmlNodeGetSpacePreserve (const xmlNode *cur);
+XMLPUBFUN int
+ xmlNodeSetLang (xmlNodePtr cur,
+ const xmlChar *lang);
+XMLPUBFUN int
+ xmlNodeSetSpacePreserve (xmlNodePtr cur,
+ int val);
+XMLPUBFUN int
+ xmlNodeGetBaseSafe (const xmlDoc *doc,
+ const xmlNode *cur,
+ xmlChar **baseOut);
+XMLPUBFUN xmlChar *
+ xmlNodeGetBase (const xmlDoc *doc,
+ const xmlNode *cur);
+XMLPUBFUN int
+ xmlNodeSetBase (xmlNodePtr cur,
+ const xmlChar *uri);
+
+/*
+ * Removing content.
+ */
+XMLPUBFUN int
+ xmlRemoveProp (xmlAttrPtr cur);
+XMLPUBFUN int
+ xmlUnsetNsProp (xmlNodePtr node,
+ xmlNsPtr ns,
+ const xmlChar *name);
+XMLPUBFUN int
+ xmlUnsetProp (xmlNodePtr node,
+ const xmlChar *name);
+
+/*
+ * Internal, don't use.
+ */
+XMLPUBFUN void
+ xmlBufferWriteCHAR (xmlBufferPtr buf,
+ const xmlChar *string);
+XMLPUBFUN void
+ xmlBufferWriteChar (xmlBufferPtr buf,
+ const char *string);
+XMLPUBFUN void
+ xmlBufferWriteQuotedString(xmlBufferPtr buf,
+ const xmlChar *string);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
+ xmlDocPtr doc,
+ xmlAttrPtr attr,
+ const xmlChar *string);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/*
+ * Namespace handling.
+ */
+XMLPUBFUN int
+ xmlReconciliateNs (xmlDocPtr doc,
+ xmlNodePtr tree);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * Saving.
+ */
+XMLPUBFUN void
+ xmlDocDumpFormatMemory (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size,
+ int format);
+XMLPUBFUN void
+ xmlDocDumpMemory (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size);
+XMLPUBFUN void
+ xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
+ xmlChar **doc_txt_ptr,
+ int * doc_txt_len,
+ const char *txt_encoding);
+XMLPUBFUN void
+ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
+ xmlChar **doc_txt_ptr,
+ int * doc_txt_len,
+ const char *txt_encoding,
+ int format);
+XMLPUBFUN int
+ xmlDocFormatDump (FILE *f,
+ xmlDocPtr cur,
+ int format);
+XMLPUBFUN int
+ xmlDocDump (FILE *f,
+ xmlDocPtr cur);
+XMLPUBFUN void
+ xmlElemDump (FILE *f,
+ xmlDocPtr doc,
+ xmlNodePtr cur);
+XMLPUBFUN int
+ xmlSaveFile (const char *filename,
+ xmlDocPtr cur);
+XMLPUBFUN int
+ xmlSaveFormatFile (const char *filename,
+ xmlDocPtr cur,
+ int format);
+XMLPUBFUN size_t
+ xmlBufNodeDump (xmlBufPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ int level,
+ int format);
+XMLPUBFUN int
+ xmlNodeDump (xmlBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ int level,
+ int format);
+
+XMLPUBFUN int
+ xmlSaveFileTo (xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding);
+XMLPUBFUN int
+ xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN void
+ xmlNodeDumpOutput (xmlOutputBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ int level,
+ int format,
+ const char *encoding);
+
+XMLPUBFUN int
+ xmlSaveFormatFileEnc (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+
+XMLPUBFUN int
+ xmlSaveFileEnc (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding);
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+/*
+ * XHTML
+ */
+XMLPUBFUN int
+ xmlIsXHTML (const xmlChar *systemID,
+ const xmlChar *publicID);
+
+/*
+ * Compression.
+ */
+XMLPUBFUN int
+ xmlGetDocCompressMode (const xmlDoc *doc);
+XMLPUBFUN void
+ xmlSetDocCompressMode (xmlDocPtr doc,
+ int mode);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlGetCompressMode (void);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlSetCompressMode (int mode);
+
+/*
+* DOM-wrapper helper functions.
+*/
+XMLPUBFUN xmlDOMWrapCtxtPtr
+ xmlDOMWrapNewCtxt (void);
+XMLPUBFUN void
+ xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
+ xmlNodePtr elem,
+ int options);
+XMLPUBFUN int
+ xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr sourceDoc,
+ xmlNodePtr node,
+ xmlDocPtr destDoc,
+ xmlNodePtr destParent,
+ int options);
+XMLPUBFUN int
+ xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr node,
+ int options);
+XMLPUBFUN int
+ xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr sourceDoc,
+ xmlNodePtr node,
+ xmlNodePtr *clonedNode,
+ xmlDocPtr destDoc,
+ xmlNodePtr destParent,
+ int deep,
+ int options);
+
+/*
+ * 5 interfaces from DOM ElementTraversal, but different in entities
+ * traversal.
+ */
+XMLPUBFUN unsigned long
+ xmlChildElementCount (xmlNodePtr parent);
+XMLPUBFUN xmlNodePtr
+ xmlNextElementSibling (xmlNodePtr node);
+XMLPUBFUN xmlNodePtr
+ xmlFirstElementChild (xmlNodePtr parent);
+XMLPUBFUN xmlNodePtr
+ xmlLastElementChild (xmlNodePtr parent);
+XMLPUBFUN xmlNodePtr
+ xmlPreviousElementSibling (xmlNodePtr node);
+
+XML_DEPRECATED
+XMLPUBFUN xmlRegisterNodeFunc
+ xmlRegisterNodeDefault (xmlRegisterNodeFunc func);
+XML_DEPRECATED
+XMLPUBFUN xmlDeregisterNodeFunc
+ xmlDeregisterNodeDefault (xmlDeregisterNodeFunc func);
+XML_DEPRECATED
+XMLPUBFUN xmlRegisterNodeFunc
+ xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
+XML_DEPRECATED
+XMLPUBFUN xmlDeregisterNodeFunc
+ xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_TREE_H__ */
+
+#endif /* XML_TREE_INTERNALS */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/uri.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/uri.h
new file mode 100644
index 0000000000000000000000000000000000000000..19980b711c56ef9c4b56c1f9f58e1c599d874008
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/uri.h
@@ -0,0 +1,106 @@
+/**
+ * Summary: library of generic URI related routines
+ * Description: library of generic URI related routines
+ * Implements RFC 2396
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_URI_H__
+#define __XML_URI_H__
+
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlURI:
+ *
+ * A parsed URI reference. This is a struct containing the various fields
+ * as described in RFC 2396 but separated for further processing.
+ *
+ * Note: query is a deprecated field which is incorrectly unescaped.
+ * query_raw takes precedence over query if the former is set.
+ * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
+ */
+typedef struct _xmlURI xmlURI;
+typedef xmlURI *xmlURIPtr;
+struct _xmlURI {
+ char *scheme; /* the URI scheme */
+ char *opaque; /* opaque part */
+ char *authority; /* the authority part */
+ char *server; /* the server part */
+ char *user; /* the user part */
+ int port; /* the port number */
+ char *path; /* the path string */
+ char *query; /* the query string (deprecated - use with caution) */
+ char *fragment; /* the fragment identifier */
+ int cleanup; /* parsing potentially unclean URI */
+ char *query_raw; /* the query string (as it appears in the URI) */
+};
+
+/*
+ * This function is in tree.h:
+ * xmlChar * xmlNodeGetBase (xmlDocPtr doc,
+ * xmlNodePtr cur);
+ */
+XMLPUBFUN xmlURIPtr
+ xmlCreateURI (void);
+XMLPUBFUN int
+ xmlBuildURISafe (const xmlChar *URI,
+ const xmlChar *base,
+ xmlChar **out);
+XMLPUBFUN xmlChar *
+ xmlBuildURI (const xmlChar *URI,
+ const xmlChar *base);
+XMLPUBFUN int
+ xmlBuildRelativeURISafe (const xmlChar *URI,
+ const xmlChar *base,
+ xmlChar **out);
+XMLPUBFUN xmlChar *
+ xmlBuildRelativeURI (const xmlChar *URI,
+ const xmlChar *base);
+XMLPUBFUN xmlURIPtr
+ xmlParseURI (const char *str);
+XMLPUBFUN int
+ xmlParseURISafe (const char *str,
+ xmlURIPtr *uri);
+XMLPUBFUN xmlURIPtr
+ xmlParseURIRaw (const char *str,
+ int raw);
+XMLPUBFUN int
+ xmlParseURIReference (xmlURIPtr uri,
+ const char *str);
+XMLPUBFUN xmlChar *
+ xmlSaveUri (xmlURIPtr uri);
+XMLPUBFUN void
+ xmlPrintURI (FILE *stream,
+ xmlURIPtr uri);
+XMLPUBFUN xmlChar *
+ xmlURIEscapeStr (const xmlChar *str,
+ const xmlChar *list);
+XMLPUBFUN char *
+ xmlURIUnescapeString (const char *str,
+ int len,
+ char *target);
+XMLPUBFUN int
+ xmlNormalizeURIPath (char *path);
+XMLPUBFUN xmlChar *
+ xmlURIEscape (const xmlChar *str);
+XMLPUBFUN void
+ xmlFreeURI (xmlURIPtr uri);
+XMLPUBFUN xmlChar*
+ xmlCanonicPath (const xmlChar *path);
+XMLPUBFUN xmlChar*
+ xmlPathToURI (const xmlChar *path);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_URI_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/valid.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/valid.h
new file mode 100644
index 0000000000000000000000000000000000000000..00446bc5716c99890515f7107f9a043f5d4e7151
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/valid.h
@@ -0,0 +1,485 @@
+/*
+ * Summary: The DTD validation
+ * Description: API for the DTD handling and the validity checking
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_VALID_H__
+#define __XML_VALID_H__
+
+/** DOC_DISABLE */
+#include
+#include
+#define XML_TREE_INTERNALS
+#include
+#undef XML_TREE_INTERNALS
+#include
+#include
+#include
+/** DOC_ENABLE */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Validation state added for non-determinist content model.
+ */
+typedef struct _xmlValidState xmlValidState;
+typedef xmlValidState *xmlValidStatePtr;
+
+/**
+ * xmlValidityErrorFunc:
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
+ * but comes from ctxt->userData (which normally contains such
+ * a pointer); ctxt->userData can be changed by the user.
+ * @msg: the string to format *printf like vararg
+ * @...: remaining arguments to the format
+ *
+ * Callback called when a validity error is found. This is a message
+ * oriented function similar to an *printf function.
+ */
+typedef void (*xmlValidityErrorFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * xmlValidityWarningFunc:
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
+ * but comes from ctxt->userData (which normally contains such
+ * a pointer); ctxt->userData can be changed by the user.
+ * @msg: the string to format *printf like vararg
+ * @...: remaining arguments to the format
+ *
+ * Callback called when a validity warning is found. This is a message
+ * oriented function similar to an *printf function.
+ */
+typedef void (*xmlValidityWarningFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+
+/*
+ * xmlValidCtxt:
+ * An xmlValidCtxt is used for error reporting when validating.
+ */
+typedef struct _xmlValidCtxt xmlValidCtxt;
+typedef xmlValidCtxt *xmlValidCtxtPtr;
+struct _xmlValidCtxt {
+ void *userData; /* user specific data block */
+ xmlValidityErrorFunc error; /* the callback in case of errors */
+ xmlValidityWarningFunc warning; /* the callback in case of warning */
+
+ /* Node analysis stack used when validating within entities */
+ xmlNodePtr node; /* Current parsed Node */
+ int nodeNr; /* Depth of the parsing stack */
+ int nodeMax; /* Max depth of the parsing stack */
+ xmlNodePtr *nodeTab; /* array of nodes */
+
+ unsigned int flags; /* internal flags */
+ xmlDocPtr doc; /* the document */
+ int valid; /* temporary validity check result */
+
+ /* state state used for non-determinist content validation */
+ xmlValidState *vstate; /* current state */
+ int vstateNr; /* Depth of the validation stack */
+ int vstateMax; /* Max depth of the validation stack */
+ xmlValidState *vstateTab; /* array of validation states */
+
+#ifdef LIBXML_REGEXP_ENABLED
+ xmlAutomataPtr am; /* the automata */
+ xmlAutomataStatePtr state; /* used to build the automata */
+#else
+ void *am;
+ void *state;
+#endif
+};
+
+/*
+ * ALL notation declarations are stored in a table.
+ * There is one table per DTD.
+ */
+
+typedef struct _xmlHashTable xmlNotationTable;
+typedef xmlNotationTable *xmlNotationTablePtr;
+
+/*
+ * ALL element declarations are stored in a table.
+ * There is one table per DTD.
+ */
+
+typedef struct _xmlHashTable xmlElementTable;
+typedef xmlElementTable *xmlElementTablePtr;
+
+/*
+ * ALL attribute declarations are stored in a table.
+ * There is one table per DTD.
+ */
+
+typedef struct _xmlHashTable xmlAttributeTable;
+typedef xmlAttributeTable *xmlAttributeTablePtr;
+
+/*
+ * ALL IDs attributes are stored in a table.
+ * There is one table per document.
+ */
+
+typedef struct _xmlHashTable xmlIDTable;
+typedef xmlIDTable *xmlIDTablePtr;
+
+/*
+ * ALL Refs attributes are stored in a table.
+ * There is one table per document.
+ */
+
+typedef struct _xmlHashTable xmlRefTable;
+typedef xmlRefTable *xmlRefTablePtr;
+
+/* Notation */
+XML_DEPRECATED
+XMLPUBFUN xmlNotationPtr
+ xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd,
+ const xmlChar *name,
+ const xmlChar *PublicID,
+ const xmlChar *SystemID);
+XML_DEPRECATED
+XMLPUBFUN xmlNotationTablePtr
+ xmlCopyNotationTable (xmlNotationTablePtr table);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlFreeNotationTable (xmlNotationTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlDumpNotationDecl (xmlBufferPtr buf,
+ xmlNotationPtr nota);
+/* XML_DEPRECATED, still used in lxml */
+XMLPUBFUN void
+ xmlDumpNotationTable (xmlBufferPtr buf,
+ xmlNotationTablePtr table);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/* Element Content */
+/* the non Doc version are being deprecated */
+XML_DEPRECATED
+XMLPUBFUN xmlElementContentPtr
+ xmlNewElementContent (const xmlChar *name,
+ xmlElementContentType type);
+XML_DEPRECATED
+XMLPUBFUN xmlElementContentPtr
+ xmlCopyElementContent (xmlElementContentPtr content);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlFreeElementContent (xmlElementContentPtr cur);
+/* the new versions with doc argument */
+XML_DEPRECATED
+XMLPUBFUN xmlElementContentPtr
+ xmlNewDocElementContent (xmlDocPtr doc,
+ const xmlChar *name,
+ xmlElementContentType type);
+XML_DEPRECATED
+XMLPUBFUN xmlElementContentPtr
+ xmlCopyDocElementContent(xmlDocPtr doc,
+ xmlElementContentPtr content);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlFreeDocElementContent(xmlDocPtr doc,
+ xmlElementContentPtr cur);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlSnprintfElementContent(char *buf,
+ int size,
+ xmlElementContentPtr content,
+ int englob);
+#ifdef LIBXML_OUTPUT_ENABLED
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlSprintfElementContent(char *buf,
+ xmlElementContentPtr content,
+ int englob);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/* Element */
+XML_DEPRECATED
+XMLPUBFUN xmlElementPtr
+ xmlAddElementDecl (xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd,
+ const xmlChar *name,
+ xmlElementTypeVal type,
+ xmlElementContentPtr content);
+XML_DEPRECATED
+XMLPUBFUN xmlElementTablePtr
+ xmlCopyElementTable (xmlElementTablePtr table);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlFreeElementTable (xmlElementTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlDumpElementTable (xmlBufferPtr buf,
+ xmlElementTablePtr table);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlDumpElementDecl (xmlBufferPtr buf,
+ xmlElementPtr elem);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/* Enumeration */
+XML_DEPRECATED
+XMLPUBFUN xmlEnumerationPtr
+ xmlCreateEnumeration (const xmlChar *name);
+/* XML_DEPRECATED, needed for custom attributeDecl SAX handler */
+XMLPUBFUN void
+ xmlFreeEnumeration (xmlEnumerationPtr cur);
+XML_DEPRECATED
+XMLPUBFUN xmlEnumerationPtr
+ xmlCopyEnumeration (xmlEnumerationPtr cur);
+
+/* Attribute */
+XML_DEPRECATED
+XMLPUBFUN xmlAttributePtr
+ xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd,
+ const xmlChar *elem,
+ const xmlChar *name,
+ const xmlChar *ns,
+ xmlAttributeType type,
+ xmlAttributeDefault def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+XML_DEPRECATED
+XMLPUBFUN xmlAttributeTablePtr
+ xmlCopyAttributeTable (xmlAttributeTablePtr table);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlFreeAttributeTable (xmlAttributeTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlDumpAttributeTable (xmlBufferPtr buf,
+ xmlAttributeTablePtr table);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlDumpAttributeDecl (xmlBufferPtr buf,
+ xmlAttributePtr attr);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/* IDs */
+XMLPUBFUN int
+ xmlAddIDSafe (xmlAttrPtr attr,
+ const xmlChar *value);
+XMLPUBFUN xmlIDPtr
+ xmlAddID (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ const xmlChar *value,
+ xmlAttrPtr attr);
+XMLPUBFUN void
+ xmlFreeIDTable (xmlIDTablePtr table);
+XMLPUBFUN xmlAttrPtr
+ xmlGetID (xmlDocPtr doc,
+ const xmlChar *ID);
+XMLPUBFUN int
+ xmlIsID (xmlDocPtr doc,
+ xmlNodePtr elem,
+ xmlAttrPtr attr);
+XMLPUBFUN int
+ xmlRemoveID (xmlDocPtr doc,
+ xmlAttrPtr attr);
+
+/* IDREFs */
+XML_DEPRECATED
+XMLPUBFUN xmlRefPtr
+ xmlAddRef (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ const xmlChar *value,
+ xmlAttrPtr attr);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlFreeRefTable (xmlRefTablePtr table);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlIsRef (xmlDocPtr doc,
+ xmlNodePtr elem,
+ xmlAttrPtr attr);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlRemoveRef (xmlDocPtr doc,
+ xmlAttrPtr attr);
+XML_DEPRECATED
+XMLPUBFUN xmlListPtr
+ xmlGetRefs (xmlDocPtr doc,
+ const xmlChar *ID);
+
+/**
+ * The public function calls related to validity checking.
+ */
+#ifdef LIBXML_VALID_ENABLED
+/* Allocate/Release Validation Contexts */
+XMLPUBFUN xmlValidCtxtPtr
+ xmlNewValidCtxt(void);
+XMLPUBFUN void
+ xmlFreeValidCtxt(xmlValidCtxtPtr);
+
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidateRoot (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlElementPtr elem);
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlValidNormalizeAttributeValue(xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *name,
+ const xmlChar *value);
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *name,
+ const xmlChar *value);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlAttributePtr attr);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidateAttributeValue(xmlAttributeType type,
+ const xmlChar *value);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNotationPtr nota);
+XMLPUBFUN int
+ xmlValidateDtd (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlDtdPtr dtd);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN int
+ xmlValidateDocument (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN int
+ xmlValidateElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidateOneElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ xmlAttrPtr attr,
+ const xmlChar *value);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *prefix,
+ xmlNsPtr ns,
+ const xmlChar *value);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ const xmlChar *notationName);
+#endif /* LIBXML_VALID_ENABLED */
+
+XMLPUBFUN int
+ xmlIsMixedElement (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlAttributePtr
+ xmlGetDtdAttrDesc (xmlDtdPtr dtd,
+ const xmlChar *elem,
+ const xmlChar *name);
+XMLPUBFUN xmlAttributePtr
+ xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
+ const xmlChar *elem,
+ const xmlChar *name,
+ const xmlChar *prefix);
+XMLPUBFUN xmlNotationPtr
+ xmlGetDtdNotationDesc (xmlDtdPtr dtd,
+ const xmlChar *name);
+XMLPUBFUN xmlElementPtr
+ xmlGetDtdQElementDesc (xmlDtdPtr dtd,
+ const xmlChar *name,
+ const xmlChar *prefix);
+XMLPUBFUN xmlElementPtr
+ xmlGetDtdElementDesc (xmlDtdPtr dtd,
+ const xmlChar *name);
+
+#ifdef LIBXML_VALID_ENABLED
+
+XMLPUBFUN int
+ xmlValidGetPotentialChildren(xmlElementContent *ctree,
+ const xmlChar **names,
+ int *len,
+ int max);
+
+XMLPUBFUN int
+ xmlValidGetValidElements(xmlNode *prev,
+ xmlNode *next,
+ const xmlChar **names,
+ int max);
+XMLPUBFUN int
+ xmlValidateNameValue (const xmlChar *value);
+XMLPUBFUN int
+ xmlValidateNamesValue (const xmlChar *value);
+XMLPUBFUN int
+ xmlValidateNmtokenValue (const xmlChar *value);
+XMLPUBFUN int
+ xmlValidateNmtokensValue(const xmlChar *value);
+
+#ifdef LIBXML_REGEXP_ENABLED
+/*
+ * Validation based on the regexp support
+ */
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
+ xmlElementPtr elem);
+
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidatePushElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *qname);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidatePushCData (xmlValidCtxtPtr ctxt,
+ const xmlChar *data,
+ int len);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlValidatePopElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *qname);
+#endif /* LIBXML_REGEXP_ENABLED */
+#endif /* LIBXML_VALID_ENABLED */
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_VALID_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xinclude.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xinclude.h
new file mode 100644
index 0000000000000000000000000000000000000000..e1cb39fe2b466b739c48a2eb43456ff1e73d5fda
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xinclude.h
@@ -0,0 +1,141 @@
+/*
+ * Summary: implementation of XInclude
+ * Description: API to handle XInclude processing,
+ * implements the
+ * World Wide Web Consortium Last Call Working Draft 10 November 2003
+ * http://www.w3.org/TR/2003/WD-xinclude-20031110
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XINCLUDE_H__
+#define __XML_XINCLUDE_H__
+
+#include
+#include
+#include
+#include
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XINCLUDE_NS:
+ *
+ * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
+ */
+#define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
+/**
+ * XINCLUDE_OLD_NS:
+ *
+ * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
+ */
+#define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
+/**
+ * XINCLUDE_NODE:
+ *
+ * Macro defining "include"
+ */
+#define XINCLUDE_NODE (const xmlChar *) "include"
+/**
+ * XINCLUDE_FALLBACK:
+ *
+ * Macro defining "fallback"
+ */
+#define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
+/**
+ * XINCLUDE_HREF:
+ *
+ * Macro defining "href"
+ */
+#define XINCLUDE_HREF (const xmlChar *) "href"
+/**
+ * XINCLUDE_PARSE:
+ *
+ * Macro defining "parse"
+ */
+#define XINCLUDE_PARSE (const xmlChar *) "parse"
+/**
+ * XINCLUDE_PARSE_XML:
+ *
+ * Macro defining "xml"
+ */
+#define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
+/**
+ * XINCLUDE_PARSE_TEXT:
+ *
+ * Macro defining "text"
+ */
+#define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
+/**
+ * XINCLUDE_PARSE_ENCODING:
+ *
+ * Macro defining "encoding"
+ */
+#define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
+/**
+ * XINCLUDE_PARSE_XPOINTER:
+ *
+ * Macro defining "xpointer"
+ */
+#define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
+
+typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
+typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
+
+/*
+ * standalone processing
+ */
+XMLPUBFUN int
+ xmlXIncludeProcess (xmlDocPtr doc);
+XMLPUBFUN int
+ xmlXIncludeProcessFlags (xmlDocPtr doc,
+ int flags);
+XMLPUBFUN int
+ xmlXIncludeProcessFlagsData(xmlDocPtr doc,
+ int flags,
+ void *data);
+XMLPUBFUN int
+ xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
+ int flags,
+ void *data);
+XMLPUBFUN int
+ xmlXIncludeProcessTree (xmlNodePtr tree);
+XMLPUBFUN int
+ xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
+ int flags);
+/*
+ * contextual processing
+ */
+XMLPUBFUN xmlXIncludeCtxtPtr
+ xmlXIncludeNewContext (xmlDocPtr doc);
+XMLPUBFUN int
+ xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
+ int flags);
+XMLPUBFUN void
+ xmlXIncludeSetErrorHandler(xmlXIncludeCtxtPtr ctxt,
+ xmlStructuredErrorFunc handler,
+ void *data);
+XMLPUBFUN void
+ xmlXIncludeSetResourceLoader(xmlXIncludeCtxtPtr ctxt,
+ xmlResourceLoader loader,
+ void *data);
+XMLPUBFUN int
+ xmlXIncludeGetLastError (xmlXIncludeCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
+ xmlNodePtr tree);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XINCLUDE_ENABLED */
+
+#endif /* __XML_XINCLUDE_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xlink.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xlink.h
new file mode 100644
index 0000000000000000000000000000000000000000..3ec83e42f642c98bdea645fc3d6f1d40df679aea
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xlink.h
@@ -0,0 +1,193 @@
+/*
+ * Summary: unfinished XLink detection module
+ * Description: unfinished XLink detection module
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XLINK_H__
+#define __XML_XLINK_H__
+
+#include
+#include
+
+#ifdef LIBXML_XPTR_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Various defines for the various Link properties.
+ *
+ * NOTE: the link detection layer will try to resolve QName expansion
+ * of namespaces. If "foo" is the prefix for "http://foo.com/"
+ * then the link detection layer will expand role="foo:myrole"
+ * to "http://foo.com/:myrole".
+ * NOTE: the link detection layer will expand URI-References found on
+ * href attributes by using the base mechanism if found.
+ */
+typedef xmlChar *xlinkHRef;
+typedef xmlChar *xlinkRole;
+typedef xmlChar *xlinkTitle;
+
+typedef enum {
+ XLINK_TYPE_NONE = 0,
+ XLINK_TYPE_SIMPLE,
+ XLINK_TYPE_EXTENDED,
+ XLINK_TYPE_EXTENDED_SET
+} xlinkType;
+
+typedef enum {
+ XLINK_SHOW_NONE = 0,
+ XLINK_SHOW_NEW,
+ XLINK_SHOW_EMBED,
+ XLINK_SHOW_REPLACE
+} xlinkShow;
+
+typedef enum {
+ XLINK_ACTUATE_NONE = 0,
+ XLINK_ACTUATE_AUTO,
+ XLINK_ACTUATE_ONREQUEST
+} xlinkActuate;
+
+/**
+ * xlinkNodeDetectFunc:
+ * @ctx: user data pointer
+ * @node: the node to check
+ *
+ * This is the prototype for the link detection routine.
+ * It calls the default link detection callbacks upon link detection.
+ */
+typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
+
+/*
+ * The link detection module interact with the upper layers using
+ * a set of callback registered at parsing time.
+ */
+
+/**
+ * xlinkSimpleLinkFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @href: the target of the link
+ * @role: the role string
+ * @title: the link title
+ *
+ * This is the prototype for a simple link detection callback.
+ */
+typedef void
+(*xlinkSimpleLinkFunk) (void *ctx,
+ xmlNodePtr node,
+ const xlinkHRef href,
+ const xlinkRole role,
+ const xlinkTitle title);
+
+/**
+ * xlinkExtendedLinkFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @nbLocators: the number of locators detected on the link
+ * @hrefs: pointer to the array of locator hrefs
+ * @roles: pointer to the array of locator roles
+ * @nbArcs: the number of arcs detected on the link
+ * @from: pointer to the array of source roles found on the arcs
+ * @to: pointer to the array of target roles found on the arcs
+ * @show: array of values for the show attributes found on the arcs
+ * @actuate: array of values for the actuate attributes found on the arcs
+ * @nbTitles: the number of titles detected on the link
+ * @title: array of titles detected on the link
+ * @langs: array of xml:lang values for the titles
+ *
+ * This is the prototype for a extended link detection callback.
+ */
+typedef void
+(*xlinkExtendedLinkFunk)(void *ctx,
+ xmlNodePtr node,
+ int nbLocators,
+ const xlinkHRef *hrefs,
+ const xlinkRole *roles,
+ int nbArcs,
+ const xlinkRole *from,
+ const xlinkRole *to,
+ xlinkShow *show,
+ xlinkActuate *actuate,
+ int nbTitles,
+ const xlinkTitle *titles,
+ const xmlChar **langs);
+
+/**
+ * xlinkExtendedLinkSetFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @nbLocators: the number of locators detected on the link
+ * @hrefs: pointer to the array of locator hrefs
+ * @roles: pointer to the array of locator roles
+ * @nbTitles: the number of titles detected on the link
+ * @title: array of titles detected on the link
+ * @langs: array of xml:lang values for the titles
+ *
+ * This is the prototype for a extended link set detection callback.
+ */
+typedef void
+(*xlinkExtendedLinkSetFunk) (void *ctx,
+ xmlNodePtr node,
+ int nbLocators,
+ const xlinkHRef *hrefs,
+ const xlinkRole *roles,
+ int nbTitles,
+ const xlinkTitle *titles,
+ const xmlChar **langs);
+
+/**
+ * This is the structure containing a set of Links detection callbacks.
+ *
+ * There is no default xlink callbacks, if one want to get link
+ * recognition activated, those call backs must be provided before parsing.
+ */
+typedef struct _xlinkHandler xlinkHandler;
+typedef xlinkHandler *xlinkHandlerPtr;
+struct _xlinkHandler {
+ xlinkSimpleLinkFunk simple;
+ xlinkExtendedLinkFunk extended;
+ xlinkExtendedLinkSetFunk set;
+};
+
+/*
+ * The default detection routine, can be overridden, they call the default
+ * detection callbacks.
+ */
+
+XML_DEPRECATED
+XMLPUBFUN xlinkNodeDetectFunc
+ xlinkGetDefaultDetect (void);
+XML_DEPRECATED
+XMLPUBFUN void
+ xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
+
+/*
+ * Routines to set/get the default handlers.
+ */
+XML_DEPRECATED
+XMLPUBFUN xlinkHandlerPtr
+ xlinkGetDefaultHandler (void);
+XML_DEPRECATED
+XMLPUBFUN void
+ xlinkSetDefaultHandler (xlinkHandlerPtr handler);
+
+/*
+ * Link detection module itself.
+ */
+XMLPUBFUN xlinkType
+ xlinkIsLink (xmlDocPtr doc,
+ xmlNodePtr node);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPTR_ENABLED */
+
+#endif /* __XML_XLINK_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlIO.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlIO.h
new file mode 100644
index 0000000000000000000000000000000000000000..c46ccd9374892d492ec8ce2a7cf91ae617b0337d
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlIO.h
@@ -0,0 +1,419 @@
+/*
+ * Summary: interface for the I/O interfaces used by the parser
+ * Description: interface for the I/O interfaces used by the parser
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_IO_H__
+#define __XML_IO_H__
+
+/** DOC_DISABLE */
+#include
+#include
+#include
+#define XML_TREE_INTERNALS
+#include
+#undef XML_TREE_INTERNALS
+/** DOC_ENABLE */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Those are the functions and datatypes for the parser input
+ * I/O structures.
+ */
+
+/**
+ * xmlInputMatchCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Input API to detect if the current handler
+ * can provide input functionality for this resource.
+ *
+ * Returns 1 if yes and 0 if another Input module should be used
+ */
+typedef int (*xmlInputMatchCallback) (char const *filename);
+/**
+ * xmlInputOpenCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Input API to open the resource
+ *
+ * Returns an Input context or NULL in case or error
+ */
+typedef void * (*xmlInputOpenCallback) (char const *filename);
+/**
+ * xmlInputReadCallback:
+ * @context: an Input context
+ * @buffer: the buffer to store data read
+ * @len: the length of the buffer in bytes
+ *
+ * Callback used in the I/O Input API to read the resource
+ *
+ * Returns the number of bytes read or -1 in case of error
+ */
+typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len);
+/**
+ * xmlInputCloseCallback:
+ * @context: an Input context
+ *
+ * Callback used in the I/O Input API to close the resource
+ *
+ * Returns 0 or -1 in case of error
+ */
+typedef int (*xmlInputCloseCallback) (void * context);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * Those are the functions and datatypes for the library output
+ * I/O structures.
+ */
+
+/**
+ * xmlOutputMatchCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Output API to detect if the current handler
+ * can provide output functionality for this resource.
+ *
+ * Returns 1 if yes and 0 if another Output module should be used
+ */
+typedef int (*xmlOutputMatchCallback) (char const *filename);
+/**
+ * xmlOutputOpenCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Output API to open the resource
+ *
+ * Returns an Output context or NULL in case or error
+ */
+typedef void * (*xmlOutputOpenCallback) (char const *filename);
+/**
+ * xmlOutputWriteCallback:
+ * @context: an Output context
+ * @buffer: the buffer of data to write
+ * @len: the length of the buffer in bytes
+ *
+ * Callback used in the I/O Output API to write to the resource
+ *
+ * Returns the number of bytes written or -1 in case of error
+ */
+typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer,
+ int len);
+/**
+ * xmlOutputCloseCallback:
+ * @context: an Output context
+ *
+ * Callback used in the I/O Output API to close the resource
+ *
+ * Returns 0 or -1 in case of error
+ */
+typedef int (*xmlOutputCloseCallback) (void * context);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/**
+ * xmlParserInputBufferCreateFilenameFunc:
+ * @URI: the URI to read from
+ * @enc: the requested source encoding
+ *
+ * Signature for the function doing the lookup for a suitable input method
+ * corresponding to an URI.
+ *
+ * Returns the new xmlParserInputBufferPtr in case of success or NULL if no
+ * method was found.
+ */
+typedef xmlParserInputBufferPtr
+(*xmlParserInputBufferCreateFilenameFunc)(const char *URI, xmlCharEncoding enc);
+
+/**
+ * xmlOutputBufferCreateFilenameFunc:
+ * @URI: the URI to write to
+ * @enc: the requested target encoding
+ *
+ * Signature for the function doing the lookup for a suitable output method
+ * corresponding to an URI.
+ *
+ * Returns the new xmlOutputBufferPtr in case of success or NULL if no
+ * method was found.
+ */
+typedef xmlOutputBufferPtr
+(*xmlOutputBufferCreateFilenameFunc)(const char *URI,
+ xmlCharEncodingHandlerPtr encoder, int compression);
+
+struct _xmlParserInputBuffer {
+ void* context;
+ xmlInputReadCallback readcallback;
+ xmlInputCloseCallback closecallback;
+
+ xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
+
+ xmlBufPtr buffer; /* Local buffer encoded in UTF-8 */
+ xmlBufPtr raw; /* if encoder != NULL buffer for raw input */
+ int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
+ int error;
+ unsigned long rawconsumed;/* amount consumed from raw */
+};
+
+
+#ifdef LIBXML_OUTPUT_ENABLED
+struct _xmlOutputBuffer {
+ void* context;
+ xmlOutputWriteCallback writecallback;
+ xmlOutputCloseCallback closecallback;
+
+ xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
+
+ xmlBufPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
+ xmlBufPtr conv; /* if encoder != NULL buffer for output */
+ int written; /* total number of byte written */
+ int error;
+};
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/** DOC_DISABLE */
+XML_DEPRECATED
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc *
+__xmlParserInputBufferCreateFilenameValue(void);
+XML_DEPRECATED
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc *
+__xmlOutputBufferCreateFilenameValue(void);
+
+#ifndef XML_GLOBALS_NO_REDEFINITION
+ #define xmlParserInputBufferCreateFilenameValue \
+ (*__xmlParserInputBufferCreateFilenameValue())
+ #define xmlOutputBufferCreateFilenameValue \
+ (*__xmlOutputBufferCreateFilenameValue())
+#endif
+/** DOC_ENABLE */
+
+/*
+ * Interfaces for input
+ */
+XMLPUBFUN void
+ xmlCleanupInputCallbacks (void);
+
+XMLPUBFUN int
+ xmlPopInputCallbacks (void);
+
+XMLPUBFUN void
+ xmlRegisterDefaultInputCallbacks (void);
+XMLPUBFUN xmlParserInputBufferPtr
+ xmlAllocParserInputBuffer (xmlCharEncoding enc);
+
+XMLPUBFUN xmlParserInputBufferPtr
+ xmlParserInputBufferCreateFilename (const char *URI,
+ xmlCharEncoding enc);
+XML_DEPRECATED
+XMLPUBFUN xmlParserInputBufferPtr
+ xmlParserInputBufferCreateFile (FILE *file,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr
+ xmlParserInputBufferCreateFd (int fd,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr
+ xmlParserInputBufferCreateMem (const char *mem, int size,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr
+ xmlParserInputBufferCreateStatic (const char *mem, int size,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr
+ xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ xmlCharEncoding enc);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlParserInputBufferRead (xmlParserInputBufferPtr in,
+ int len);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
+ int len);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlParserInputBufferPush (xmlParserInputBufferPtr in,
+ int len,
+ const char *buf);
+XMLPUBFUN void
+ xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
+XMLPUBFUN char *
+ xmlParserGetDirectory (const char *filename);
+
+XMLPUBFUN int
+ xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
+ xmlInputOpenCallback openFunc,
+ xmlInputReadCallback readFunc,
+ xmlInputCloseCallback closeFunc);
+
+XMLPUBFUN xmlParserInputBufferPtr
+ __xmlParserInputBufferCreateFilename(const char *URI,
+ xmlCharEncoding enc);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * Interfaces for output
+ */
+XMLPUBFUN void
+ xmlCleanupOutputCallbacks (void);
+XMLPUBFUN int
+ xmlPopOutputCallbacks (void);
+XMLPUBFUN void
+ xmlRegisterDefaultOutputCallbacks(void);
+XMLPUBFUN xmlOutputBufferPtr
+ xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr
+ xmlOutputBufferCreateFilename (const char *URI,
+ xmlCharEncodingHandlerPtr encoder,
+ int compression);
+
+XMLPUBFUN xmlOutputBufferPtr
+ xmlOutputBufferCreateFile (FILE *file,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr
+ xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr
+ xmlOutputBufferCreateFd (int fd,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr
+ xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
+ xmlOutputCloseCallback ioclose,
+ void *ioctx,
+ xmlCharEncodingHandlerPtr encoder);
+
+/* Couple of APIs to get the output without digging into the buffers */
+XMLPUBFUN const xmlChar *
+ xmlOutputBufferGetContent (xmlOutputBufferPtr out);
+XMLPUBFUN size_t
+ xmlOutputBufferGetSize (xmlOutputBufferPtr out);
+
+XMLPUBFUN int
+ xmlOutputBufferWrite (xmlOutputBufferPtr out,
+ int len,
+ const char *buf);
+XMLPUBFUN int
+ xmlOutputBufferWriteString (xmlOutputBufferPtr out,
+ const char *str);
+XMLPUBFUN int
+ xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
+ const xmlChar *str,
+ xmlCharEncodingOutputFunc escaping);
+
+XMLPUBFUN int
+ xmlOutputBufferFlush (xmlOutputBufferPtr out);
+XMLPUBFUN int
+ xmlOutputBufferClose (xmlOutputBufferPtr out);
+
+XMLPUBFUN int
+ xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
+ xmlOutputOpenCallback openFunc,
+ xmlOutputWriteCallback writeFunc,
+ xmlOutputCloseCallback closeFunc);
+
+XMLPUBFUN xmlOutputBufferPtr
+ __xmlOutputBufferCreateFilename(const char *URI,
+ xmlCharEncodingHandlerPtr encoder,
+ int compression);
+
+#ifdef LIBXML_HTTP_ENABLED
+/* This function only exists if HTTP support built into the library */
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlRegisterHTTPPostCallbacks (void );
+#endif /* LIBXML_HTTP_ENABLED */
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+XML_DEPRECATED
+XMLPUBFUN xmlParserInputPtr
+ xmlCheckHTTPInput (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr ret);
+
+/*
+ * A predefined entity loader disabling network accesses
+ */
+XMLPUBFUN xmlParserInputPtr
+ xmlNoNetExternalEntityLoader (const char *URL,
+ const char *ID,
+ xmlParserCtxtPtr ctxt);
+
+XML_DEPRECATED
+XMLPUBFUN xmlChar *
+ xmlNormalizeWindowsPath (const xmlChar *path);
+
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlCheckFilename (const char *path);
+/**
+ * Default 'file://' protocol callbacks
+ */
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlFileMatch (const char *filename);
+XML_DEPRECATED
+XMLPUBFUN void *
+ xmlFileOpen (const char *filename);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlFileRead (void * context,
+ char * buffer,
+ int len);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlFileClose (void * context);
+
+/**
+ * Default 'http://' protocol callbacks
+ */
+#ifdef LIBXML_HTTP_ENABLED
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlIOHTTPMatch (const char *filename);
+XML_DEPRECATED
+XMLPUBFUN void *
+ xmlIOHTTPOpen (const char *filename);
+#ifdef LIBXML_OUTPUT_ENABLED
+XML_DEPRECATED
+XMLPUBFUN void *
+ xmlIOHTTPOpenW (const char * post_uri,
+ int compression );
+#endif /* LIBXML_OUTPUT_ENABLED */
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlIOHTTPRead (void * context,
+ char * buffer,
+ int len);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlIOHTTPClose (void * context);
+#endif /* LIBXML_HTTP_ENABLED */
+
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
+ xmlParserInputBufferCreateFilenameDefault(
+ xmlParserInputBufferCreateFilenameFunc func);
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc
+ xmlOutputBufferCreateFilenameDefault(
+ xmlOutputBufferCreateFilenameFunc func);
+XML_DEPRECATED
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc
+ xmlThrDefOutputBufferCreateFilenameDefault(
+ xmlOutputBufferCreateFilenameFunc func);
+XML_DEPRECATED
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
+ xmlThrDefParserInputBufferCreateFilenameDefault(
+ xmlParserInputBufferCreateFilenameFunc func);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_IO_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlautomata.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlautomata.h
new file mode 100644
index 0000000000000000000000000000000000000000..97d0abf9783e037229bde3d280ca2653b0fbd8f7
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlautomata.h
@@ -0,0 +1,163 @@
+/*
+ * Summary: API to build regexp automata
+ * Description: the API to build regexp automata
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_AUTOMATA_H__
+#define __XML_AUTOMATA_H__
+
+#include
+
+#ifdef LIBXML_REGEXP_ENABLED
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlAutomataPtr:
+ *
+ * A libxml automata description, It can be compiled into a regexp
+ */
+typedef struct _xmlAutomata xmlAutomata;
+typedef xmlAutomata *xmlAutomataPtr;
+
+/**
+ * xmlAutomataStatePtr:
+ *
+ * A state int the automata description,
+ */
+typedef struct _xmlAutomataState xmlAutomataState;
+typedef xmlAutomataState *xmlAutomataStatePtr;
+
+/*
+ * Building API
+ */
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataPtr
+ xmlNewAutomata (void);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlFreeAutomata (xmlAutomataPtr am);
+
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataStatePtr
+ xmlAutomataGetInitState (xmlAutomataPtr am);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlAutomataSetFinalState (xmlAutomataPtr am,
+ xmlAutomataStatePtr state);
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataStatePtr
+ xmlAutomataNewState (xmlAutomataPtr am);
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataStatePtr
+ xmlAutomataNewTransition (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ void *data);
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataStatePtr
+ xmlAutomataNewTransition2 (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ void *data);
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataStatePtr
+ xmlAutomataNewNegTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ void *data);
+
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataStatePtr
+ xmlAutomataNewCountTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ int min,
+ int max,
+ void *data);
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataStatePtr
+ xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ int min,
+ int max,
+ void *data);
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataStatePtr
+ xmlAutomataNewOnceTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ int min,
+ int max,
+ void *data);
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataStatePtr
+ xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ int min,
+ int max,
+ void *data);
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataStatePtr
+ xmlAutomataNewAllTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ int lax);
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataStatePtr
+ xmlAutomataNewEpsilon (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to);
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataStatePtr
+ xmlAutomataNewCountedTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ int counter);
+XML_DEPRECATED
+XMLPUBFUN xmlAutomataStatePtr
+ xmlAutomataNewCounterTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ int counter);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlAutomataNewCounter (xmlAutomataPtr am,
+ int min,
+ int max);
+
+XML_DEPRECATED
+XMLPUBFUN struct _xmlRegexp *
+ xmlAutomataCompile (xmlAutomataPtr am);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlAutomataIsDeterminist (xmlAutomataPtr am);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_REGEXP_ENABLED */
+
+#endif /* __XML_AUTOMATA_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlerror.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlerror.h
new file mode 100644
index 0000000000000000000000000000000000000000..743d8213064dcd6bc16f92058d357a4b0c4d08ac
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlerror.h
@@ -0,0 +1,962 @@
+/*
+ * Summary: error handling
+ * Description: the API used to report errors
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_ERROR_H__
+#define __XML_ERROR_H__
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Backward compatibility
+ */
+#define initGenericErrorDefaultFunc(h) \
+ xmlSetGenericErrorFunc(NULL, (h) ? *(h) : NULL)
+
+/**
+ * xmlErrorLevel:
+ *
+ * Indicates the level of an error
+ */
+typedef enum {
+ XML_ERR_NONE = 0,
+ XML_ERR_WARNING = 1, /* A simple warning */
+ XML_ERR_ERROR = 2, /* A recoverable error */
+ XML_ERR_FATAL = 3 /* A fatal error */
+} xmlErrorLevel;
+
+/**
+ * xmlErrorDomain:
+ *
+ * Indicates where an error may have come from
+ */
+typedef enum {
+ XML_FROM_NONE = 0,
+ XML_FROM_PARSER, /* The XML parser */
+ XML_FROM_TREE, /* The tree module */
+ XML_FROM_NAMESPACE, /* The XML Namespace module */
+ XML_FROM_DTD, /* The XML DTD validation with parser context*/
+ XML_FROM_HTML, /* The HTML parser */
+ XML_FROM_MEMORY, /* The memory allocator */
+ XML_FROM_OUTPUT, /* The serialization code */
+ XML_FROM_IO, /* The Input/Output stack */
+ XML_FROM_FTP, /* The FTP module */
+ XML_FROM_HTTP, /* The HTTP module */
+ XML_FROM_XINCLUDE, /* The XInclude processing */
+ XML_FROM_XPATH, /* The XPath module */
+ XML_FROM_XPOINTER, /* The XPointer module */
+ XML_FROM_REGEXP, /* The regular expressions module */
+ XML_FROM_DATATYPE, /* The W3C XML Schemas Datatype module */
+ XML_FROM_SCHEMASP, /* The W3C XML Schemas parser module */
+ XML_FROM_SCHEMASV, /* The W3C XML Schemas validation module */
+ XML_FROM_RELAXNGP, /* The Relax-NG parser module */
+ XML_FROM_RELAXNGV, /* The Relax-NG validator module */
+ XML_FROM_CATALOG, /* The Catalog module */
+ XML_FROM_C14N, /* The Canonicalization module */
+ XML_FROM_XSLT, /* The XSLT engine from libxslt */
+ XML_FROM_VALID, /* The XML DTD validation with valid context */
+ XML_FROM_CHECK, /* The error checking module */
+ XML_FROM_WRITER, /* The xmlwriter module */
+ XML_FROM_MODULE, /* The dynamically loaded module module*/
+ XML_FROM_I18N, /* The module handling character conversion */
+ XML_FROM_SCHEMATRONV,/* The Schematron validator module */
+ XML_FROM_BUFFER, /* The buffers module */
+ XML_FROM_URI /* The URI module */
+} xmlErrorDomain;
+
+/**
+ * xmlError:
+ *
+ * An XML Error instance.
+ */
+
+typedef struct _xmlError xmlError;
+typedef xmlError *xmlErrorPtr;
+struct _xmlError {
+ int domain; /* What part of the library raised this error */
+ int code; /* The error code, e.g. an xmlParserError */
+ char *message;/* human-readable informative error message */
+ xmlErrorLevel level;/* how consequent is the error */
+ char *file; /* the filename */
+ int line; /* the line number if available */
+ char *str1; /* extra string information */
+ char *str2; /* extra string information */
+ char *str3; /* extra string information */
+ int int1; /* extra number information */
+ int int2; /* error column # or 0 if N/A (todo: rename field when we would brk ABI) */
+ void *ctxt; /* the parser context if available */
+ void *node; /* the node in the tree */
+};
+
+/**
+ * xmlParserError:
+ *
+ * This is an error that the XML (or HTML) parser can generate
+ */
+typedef enum {
+ XML_ERR_OK = 0,
+ XML_ERR_INTERNAL_ERROR, /* 1 */
+ XML_ERR_NO_MEMORY, /* 2 */
+ XML_ERR_DOCUMENT_START, /* 3 */
+ XML_ERR_DOCUMENT_EMPTY, /* 4 */
+ XML_ERR_DOCUMENT_END, /* 5 */
+ XML_ERR_INVALID_HEX_CHARREF, /* 6 */
+ XML_ERR_INVALID_DEC_CHARREF, /* 7 */
+ XML_ERR_INVALID_CHARREF, /* 8 */
+ XML_ERR_INVALID_CHAR, /* 9 */
+ XML_ERR_CHARREF_AT_EOF, /* 10 */
+ XML_ERR_CHARREF_IN_PROLOG, /* 11 */
+ XML_ERR_CHARREF_IN_EPILOG, /* 12 */
+ XML_ERR_CHARREF_IN_DTD, /* 13 */
+ XML_ERR_ENTITYREF_AT_EOF, /* 14 */
+ XML_ERR_ENTITYREF_IN_PROLOG, /* 15 */
+ XML_ERR_ENTITYREF_IN_EPILOG, /* 16 */
+ XML_ERR_ENTITYREF_IN_DTD, /* 17 */
+ XML_ERR_PEREF_AT_EOF, /* 18 */
+ XML_ERR_PEREF_IN_PROLOG, /* 19 */
+ XML_ERR_PEREF_IN_EPILOG, /* 20 */
+ XML_ERR_PEREF_IN_INT_SUBSET, /* 21 */
+ XML_ERR_ENTITYREF_NO_NAME, /* 22 */
+ XML_ERR_ENTITYREF_SEMICOL_MISSING, /* 23 */
+ XML_ERR_PEREF_NO_NAME, /* 24 */
+ XML_ERR_PEREF_SEMICOL_MISSING, /* 25 */
+ XML_ERR_UNDECLARED_ENTITY, /* 26 */
+ XML_WAR_UNDECLARED_ENTITY, /* 27 */
+ XML_ERR_UNPARSED_ENTITY, /* 28 */
+ XML_ERR_ENTITY_IS_EXTERNAL, /* 29 */
+ XML_ERR_ENTITY_IS_PARAMETER, /* 30 */
+ XML_ERR_UNKNOWN_ENCODING, /* 31 */
+ XML_ERR_UNSUPPORTED_ENCODING, /* 32 */
+ XML_ERR_STRING_NOT_STARTED, /* 33 */
+ XML_ERR_STRING_NOT_CLOSED, /* 34 */
+ XML_ERR_NS_DECL_ERROR, /* 35 */
+ XML_ERR_ENTITY_NOT_STARTED, /* 36 */
+ XML_ERR_ENTITY_NOT_FINISHED, /* 37 */
+ XML_ERR_LT_IN_ATTRIBUTE, /* 38 */
+ XML_ERR_ATTRIBUTE_NOT_STARTED, /* 39 */
+ XML_ERR_ATTRIBUTE_NOT_FINISHED, /* 40 */
+ XML_ERR_ATTRIBUTE_WITHOUT_VALUE, /* 41 */
+ XML_ERR_ATTRIBUTE_REDEFINED, /* 42 */
+ XML_ERR_LITERAL_NOT_STARTED, /* 43 */
+ XML_ERR_LITERAL_NOT_FINISHED, /* 44 */
+ XML_ERR_COMMENT_NOT_FINISHED, /* 45 */
+ XML_ERR_PI_NOT_STARTED, /* 46 */
+ XML_ERR_PI_NOT_FINISHED, /* 47 */
+ XML_ERR_NOTATION_NOT_STARTED, /* 48 */
+ XML_ERR_NOTATION_NOT_FINISHED, /* 49 */
+ XML_ERR_ATTLIST_NOT_STARTED, /* 50 */
+ XML_ERR_ATTLIST_NOT_FINISHED, /* 51 */
+ XML_ERR_MIXED_NOT_STARTED, /* 52 */
+ XML_ERR_MIXED_NOT_FINISHED, /* 53 */
+ XML_ERR_ELEMCONTENT_NOT_STARTED, /* 54 */
+ XML_ERR_ELEMCONTENT_NOT_FINISHED, /* 55 */
+ XML_ERR_XMLDECL_NOT_STARTED, /* 56 */
+ XML_ERR_XMLDECL_NOT_FINISHED, /* 57 */
+ XML_ERR_CONDSEC_NOT_STARTED, /* 58 */
+ XML_ERR_CONDSEC_NOT_FINISHED, /* 59 */
+ XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 60 */
+ XML_ERR_DOCTYPE_NOT_FINISHED, /* 61 */
+ XML_ERR_MISPLACED_CDATA_END, /* 62 */
+ XML_ERR_CDATA_NOT_FINISHED, /* 63 */
+ XML_ERR_RESERVED_XML_NAME, /* 64 */
+ XML_ERR_SPACE_REQUIRED, /* 65 */
+ XML_ERR_SEPARATOR_REQUIRED, /* 66 */
+ XML_ERR_NMTOKEN_REQUIRED, /* 67 */
+ XML_ERR_NAME_REQUIRED, /* 68 */
+ XML_ERR_PCDATA_REQUIRED, /* 69 */
+ XML_ERR_URI_REQUIRED, /* 70 */
+ XML_ERR_PUBID_REQUIRED, /* 71 */
+ XML_ERR_LT_REQUIRED, /* 72 */
+ XML_ERR_GT_REQUIRED, /* 73 */
+ XML_ERR_LTSLASH_REQUIRED, /* 74 */
+ XML_ERR_EQUAL_REQUIRED, /* 75 */
+ XML_ERR_TAG_NAME_MISMATCH, /* 76 */
+ XML_ERR_TAG_NOT_FINISHED, /* 77 */
+ XML_ERR_STANDALONE_VALUE, /* 78 */
+ XML_ERR_ENCODING_NAME, /* 79 */
+ XML_ERR_HYPHEN_IN_COMMENT, /* 80 */
+ XML_ERR_INVALID_ENCODING, /* 81 */
+ XML_ERR_EXT_ENTITY_STANDALONE, /* 82 */
+ XML_ERR_CONDSEC_INVALID, /* 83 */
+ XML_ERR_VALUE_REQUIRED, /* 84 */
+ XML_ERR_NOT_WELL_BALANCED, /* 85 */
+ XML_ERR_EXTRA_CONTENT, /* 86 */
+ XML_ERR_ENTITY_CHAR_ERROR, /* 87 */
+ XML_ERR_ENTITY_PE_INTERNAL, /* 88 */
+ XML_ERR_ENTITY_LOOP, /* 89 */
+ XML_ERR_ENTITY_BOUNDARY, /* 90 */
+ XML_ERR_INVALID_URI, /* 91 */
+ XML_ERR_URI_FRAGMENT, /* 92 */
+ XML_WAR_CATALOG_PI, /* 93 */
+ XML_ERR_NO_DTD, /* 94 */
+ XML_ERR_CONDSEC_INVALID_KEYWORD, /* 95 */
+ XML_ERR_VERSION_MISSING, /* 96 */
+ XML_WAR_UNKNOWN_VERSION, /* 97 */
+ XML_WAR_LANG_VALUE, /* 98 */
+ XML_WAR_NS_URI, /* 99 */
+ XML_WAR_NS_URI_RELATIVE, /* 100 */
+ XML_ERR_MISSING_ENCODING, /* 101 */
+ XML_WAR_SPACE_VALUE, /* 102 */
+ XML_ERR_NOT_STANDALONE, /* 103 */
+ XML_ERR_ENTITY_PROCESSING, /* 104 */
+ XML_ERR_NOTATION_PROCESSING, /* 105 */
+ XML_WAR_NS_COLUMN, /* 106 */
+ XML_WAR_ENTITY_REDEFINED, /* 107 */
+ XML_ERR_UNKNOWN_VERSION, /* 108 */
+ XML_ERR_VERSION_MISMATCH, /* 109 */
+ XML_ERR_NAME_TOO_LONG, /* 110 */
+ XML_ERR_USER_STOP, /* 111 */
+ XML_ERR_COMMENT_ABRUPTLY_ENDED, /* 112 */
+ XML_WAR_ENCODING_MISMATCH, /* 113 */
+ XML_ERR_RESOURCE_LIMIT, /* 114 */
+ XML_ERR_ARGUMENT, /* 115 */
+ XML_ERR_SYSTEM, /* 116 */
+ XML_ERR_REDECL_PREDEF_ENTITY, /* 117 */
+ XML_ERR_INT_SUBSET_NOT_FINISHED, /* 118 */
+ XML_NS_ERR_XML_NAMESPACE = 200,
+ XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
+ XML_NS_ERR_QNAME, /* 202 */
+ XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */
+ XML_NS_ERR_EMPTY, /* 204 */
+ XML_NS_ERR_COLON, /* 205 */
+ XML_DTD_ATTRIBUTE_DEFAULT = 500,
+ XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */
+ XML_DTD_ATTRIBUTE_VALUE, /* 502 */
+ XML_DTD_CONTENT_ERROR, /* 503 */
+ XML_DTD_CONTENT_MODEL, /* 504 */
+ XML_DTD_CONTENT_NOT_DETERMINIST, /* 505 */
+ XML_DTD_DIFFERENT_PREFIX, /* 506 */
+ XML_DTD_ELEM_DEFAULT_NAMESPACE, /* 507 */
+ XML_DTD_ELEM_NAMESPACE, /* 508 */
+ XML_DTD_ELEM_REDEFINED, /* 509 */
+ XML_DTD_EMPTY_NOTATION, /* 510 */
+ XML_DTD_ENTITY_TYPE, /* 511 */
+ XML_DTD_ID_FIXED, /* 512 */
+ XML_DTD_ID_REDEFINED, /* 513 */
+ XML_DTD_ID_SUBSET, /* 514 */
+ XML_DTD_INVALID_CHILD, /* 515 */
+ XML_DTD_INVALID_DEFAULT, /* 516 */
+ XML_DTD_LOAD_ERROR, /* 517 */
+ XML_DTD_MISSING_ATTRIBUTE, /* 518 */
+ XML_DTD_MIXED_CORRUPT, /* 519 */
+ XML_DTD_MULTIPLE_ID, /* 520 */
+ XML_DTD_NO_DOC, /* 521 */
+ XML_DTD_NO_DTD, /* 522 */
+ XML_DTD_NO_ELEM_NAME, /* 523 */
+ XML_DTD_NO_PREFIX, /* 524 */
+ XML_DTD_NO_ROOT, /* 525 */
+ XML_DTD_NOTATION_REDEFINED, /* 526 */
+ XML_DTD_NOTATION_VALUE, /* 527 */
+ XML_DTD_NOT_EMPTY, /* 528 */
+ XML_DTD_NOT_PCDATA, /* 529 */
+ XML_DTD_NOT_STANDALONE, /* 530 */
+ XML_DTD_ROOT_NAME, /* 531 */
+ XML_DTD_STANDALONE_WHITE_SPACE, /* 532 */
+ XML_DTD_UNKNOWN_ATTRIBUTE, /* 533 */
+ XML_DTD_UNKNOWN_ELEM, /* 534 */
+ XML_DTD_UNKNOWN_ENTITY, /* 535 */
+ XML_DTD_UNKNOWN_ID, /* 536 */
+ XML_DTD_UNKNOWN_NOTATION, /* 537 */
+ XML_DTD_STANDALONE_DEFAULTED, /* 538 */
+ XML_DTD_XMLID_VALUE, /* 539 */
+ XML_DTD_XMLID_TYPE, /* 540 */
+ XML_DTD_DUP_TOKEN, /* 541 */
+ XML_HTML_STRUCURE_ERROR = 800,
+ XML_HTML_UNKNOWN_TAG, /* 801 */
+ XML_HTML_INCORRECTLY_OPENED_COMMENT, /* 802 */
+ XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000,
+ XML_RNGP_ATTR_CONFLICT, /* 1001 */
+ XML_RNGP_ATTRIBUTE_CHILDREN, /* 1002 */
+ XML_RNGP_ATTRIBUTE_CONTENT, /* 1003 */
+ XML_RNGP_ATTRIBUTE_EMPTY, /* 1004 */
+ XML_RNGP_ATTRIBUTE_NOOP, /* 1005 */
+ XML_RNGP_CHOICE_CONTENT, /* 1006 */
+ XML_RNGP_CHOICE_EMPTY, /* 1007 */
+ XML_RNGP_CREATE_FAILURE, /* 1008 */
+ XML_RNGP_DATA_CONTENT, /* 1009 */
+ XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, /* 1010 */
+ XML_RNGP_DEFINE_CREATE_FAILED, /* 1011 */
+ XML_RNGP_DEFINE_EMPTY, /* 1012 */
+ XML_RNGP_DEFINE_MISSING, /* 1013 */
+ XML_RNGP_DEFINE_NAME_MISSING, /* 1014 */
+ XML_RNGP_ELEM_CONTENT_EMPTY, /* 1015 */
+ XML_RNGP_ELEM_CONTENT_ERROR, /* 1016 */
+ XML_RNGP_ELEMENT_EMPTY, /* 1017 */
+ XML_RNGP_ELEMENT_CONTENT, /* 1018 */
+ XML_RNGP_ELEMENT_NAME, /* 1019 */
+ XML_RNGP_ELEMENT_NO_CONTENT, /* 1020 */
+ XML_RNGP_ELEM_TEXT_CONFLICT, /* 1021 */
+ XML_RNGP_EMPTY, /* 1022 */
+ XML_RNGP_EMPTY_CONSTRUCT, /* 1023 */
+ XML_RNGP_EMPTY_CONTENT, /* 1024 */
+ XML_RNGP_EMPTY_NOT_EMPTY, /* 1025 */
+ XML_RNGP_ERROR_TYPE_LIB, /* 1026 */
+ XML_RNGP_EXCEPT_EMPTY, /* 1027 */
+ XML_RNGP_EXCEPT_MISSING, /* 1028 */
+ XML_RNGP_EXCEPT_MULTIPLE, /* 1029 */
+ XML_RNGP_EXCEPT_NO_CONTENT, /* 1030 */
+ XML_RNGP_EXTERNALREF_EMTPY, /* 1031 */
+ XML_RNGP_EXTERNAL_REF_FAILURE, /* 1032 */
+ XML_RNGP_EXTERNALREF_RECURSE, /* 1033 */
+ XML_RNGP_FORBIDDEN_ATTRIBUTE, /* 1034 */
+ XML_RNGP_FOREIGN_ELEMENT, /* 1035 */
+ XML_RNGP_GRAMMAR_CONTENT, /* 1036 */
+ XML_RNGP_GRAMMAR_EMPTY, /* 1037 */
+ XML_RNGP_GRAMMAR_MISSING, /* 1038 */
+ XML_RNGP_GRAMMAR_NO_START, /* 1039 */
+ XML_RNGP_GROUP_ATTR_CONFLICT, /* 1040 */
+ XML_RNGP_HREF_ERROR, /* 1041 */
+ XML_RNGP_INCLUDE_EMPTY, /* 1042 */
+ XML_RNGP_INCLUDE_FAILURE, /* 1043 */
+ XML_RNGP_INCLUDE_RECURSE, /* 1044 */
+ XML_RNGP_INTERLEAVE_ADD, /* 1045 */
+ XML_RNGP_INTERLEAVE_CREATE_FAILED, /* 1046 */
+ XML_RNGP_INTERLEAVE_EMPTY, /* 1047 */
+ XML_RNGP_INTERLEAVE_NO_CONTENT, /* 1048 */
+ XML_RNGP_INVALID_DEFINE_NAME, /* 1049 */
+ XML_RNGP_INVALID_URI, /* 1050 */
+ XML_RNGP_INVALID_VALUE, /* 1051 */
+ XML_RNGP_MISSING_HREF, /* 1052 */
+ XML_RNGP_NAME_MISSING, /* 1053 */
+ XML_RNGP_NEED_COMBINE, /* 1054 */
+ XML_RNGP_NOTALLOWED_NOT_EMPTY, /* 1055 */
+ XML_RNGP_NSNAME_ATTR_ANCESTOR, /* 1056 */
+ XML_RNGP_NSNAME_NO_NS, /* 1057 */
+ XML_RNGP_PARAM_FORBIDDEN, /* 1058 */
+ XML_RNGP_PARAM_NAME_MISSING, /* 1059 */
+ XML_RNGP_PARENTREF_CREATE_FAILED, /* 1060 */
+ XML_RNGP_PARENTREF_NAME_INVALID, /* 1061 */
+ XML_RNGP_PARENTREF_NO_NAME, /* 1062 */
+ XML_RNGP_PARENTREF_NO_PARENT, /* 1063 */
+ XML_RNGP_PARENTREF_NOT_EMPTY, /* 1064 */
+ XML_RNGP_PARSE_ERROR, /* 1065 */
+ XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, /* 1066 */
+ XML_RNGP_PAT_ATTR_ATTR, /* 1067 */
+ XML_RNGP_PAT_ATTR_ELEM, /* 1068 */
+ XML_RNGP_PAT_DATA_EXCEPT_ATTR, /* 1069 */
+ XML_RNGP_PAT_DATA_EXCEPT_ELEM, /* 1070 */
+ XML_RNGP_PAT_DATA_EXCEPT_EMPTY, /* 1071 */
+ XML_RNGP_PAT_DATA_EXCEPT_GROUP, /* 1072 */
+ XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, /* 1073 */
+ XML_RNGP_PAT_DATA_EXCEPT_LIST, /* 1074 */
+ XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, /* 1075 */
+ XML_RNGP_PAT_DATA_EXCEPT_REF, /* 1076 */
+ XML_RNGP_PAT_DATA_EXCEPT_TEXT, /* 1077 */
+ XML_RNGP_PAT_LIST_ATTR, /* 1078 */
+ XML_RNGP_PAT_LIST_ELEM, /* 1079 */
+ XML_RNGP_PAT_LIST_INTERLEAVE, /* 1080 */
+ XML_RNGP_PAT_LIST_LIST, /* 1081 */
+ XML_RNGP_PAT_LIST_REF, /* 1082 */
+ XML_RNGP_PAT_LIST_TEXT, /* 1083 */
+ XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, /* 1084 */
+ XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, /* 1085 */
+ XML_RNGP_PAT_ONEMORE_GROUP_ATTR, /* 1086 */
+ XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, /* 1087 */
+ XML_RNGP_PAT_START_ATTR, /* 1088 */
+ XML_RNGP_PAT_START_DATA, /* 1089 */
+ XML_RNGP_PAT_START_EMPTY, /* 1090 */
+ XML_RNGP_PAT_START_GROUP, /* 1091 */
+ XML_RNGP_PAT_START_INTERLEAVE, /* 1092 */
+ XML_RNGP_PAT_START_LIST, /* 1093 */
+ XML_RNGP_PAT_START_ONEMORE, /* 1094 */
+ XML_RNGP_PAT_START_TEXT, /* 1095 */
+ XML_RNGP_PAT_START_VALUE, /* 1096 */
+ XML_RNGP_PREFIX_UNDEFINED, /* 1097 */
+ XML_RNGP_REF_CREATE_FAILED, /* 1098 */
+ XML_RNGP_REF_CYCLE, /* 1099 */
+ XML_RNGP_REF_NAME_INVALID, /* 1100 */
+ XML_RNGP_REF_NO_DEF, /* 1101 */
+ XML_RNGP_REF_NO_NAME, /* 1102 */
+ XML_RNGP_REF_NOT_EMPTY, /* 1103 */
+ XML_RNGP_START_CHOICE_AND_INTERLEAVE, /* 1104 */
+ XML_RNGP_START_CONTENT, /* 1105 */
+ XML_RNGP_START_EMPTY, /* 1106 */
+ XML_RNGP_START_MISSING, /* 1107 */
+ XML_RNGP_TEXT_EXPECTED, /* 1108 */
+ XML_RNGP_TEXT_HAS_CHILD, /* 1109 */
+ XML_RNGP_TYPE_MISSING, /* 1110 */
+ XML_RNGP_TYPE_NOT_FOUND, /* 1111 */
+ XML_RNGP_TYPE_VALUE, /* 1112 */
+ XML_RNGP_UNKNOWN_ATTRIBUTE, /* 1113 */
+ XML_RNGP_UNKNOWN_COMBINE, /* 1114 */
+ XML_RNGP_UNKNOWN_CONSTRUCT, /* 1115 */
+ XML_RNGP_UNKNOWN_TYPE_LIB, /* 1116 */
+ XML_RNGP_URI_FRAGMENT, /* 1117 */
+ XML_RNGP_URI_NOT_ABSOLUTE, /* 1118 */
+ XML_RNGP_VALUE_EMPTY, /* 1119 */
+ XML_RNGP_VALUE_NO_CONTENT, /* 1120 */
+ XML_RNGP_XMLNS_NAME, /* 1121 */
+ XML_RNGP_XML_NS, /* 1122 */
+ XML_XPATH_EXPRESSION_OK = 1200,
+ XML_XPATH_NUMBER_ERROR, /* 1201 */
+ XML_XPATH_UNFINISHED_LITERAL_ERROR, /* 1202 */
+ XML_XPATH_START_LITERAL_ERROR, /* 1203 */
+ XML_XPATH_VARIABLE_REF_ERROR, /* 1204 */
+ XML_XPATH_UNDEF_VARIABLE_ERROR, /* 1205 */
+ XML_XPATH_INVALID_PREDICATE_ERROR, /* 1206 */
+ XML_XPATH_EXPR_ERROR, /* 1207 */
+ XML_XPATH_UNCLOSED_ERROR, /* 1208 */
+ XML_XPATH_UNKNOWN_FUNC_ERROR, /* 1209 */
+ XML_XPATH_INVALID_OPERAND, /* 1210 */
+ XML_XPATH_INVALID_TYPE, /* 1211 */
+ XML_XPATH_INVALID_ARITY, /* 1212 */
+ XML_XPATH_INVALID_CTXT_SIZE, /* 1213 */
+ XML_XPATH_INVALID_CTXT_POSITION, /* 1214 */
+ XML_XPATH_MEMORY_ERROR, /* 1215 */
+ XML_XPTR_SYNTAX_ERROR, /* 1216 */
+ XML_XPTR_RESOURCE_ERROR, /* 1217 */
+ XML_XPTR_SUB_RESOURCE_ERROR, /* 1218 */
+ XML_XPATH_UNDEF_PREFIX_ERROR, /* 1219 */
+ XML_XPATH_ENCODING_ERROR, /* 1220 */
+ XML_XPATH_INVALID_CHAR_ERROR, /* 1221 */
+ XML_TREE_INVALID_HEX = 1300,
+ XML_TREE_INVALID_DEC, /* 1301 */
+ XML_TREE_UNTERMINATED_ENTITY, /* 1302 */
+ XML_TREE_NOT_UTF8, /* 1303 */
+ XML_SAVE_NOT_UTF8 = 1400,
+ XML_SAVE_CHAR_INVALID, /* 1401 */
+ XML_SAVE_NO_DOCTYPE, /* 1402 */
+ XML_SAVE_UNKNOWN_ENCODING, /* 1403 */
+ XML_REGEXP_COMPILE_ERROR = 1450,
+ XML_IO_UNKNOWN = 1500,
+ XML_IO_EACCES, /* 1501 */
+ XML_IO_EAGAIN, /* 1502 */
+ XML_IO_EBADF, /* 1503 */
+ XML_IO_EBADMSG, /* 1504 */
+ XML_IO_EBUSY, /* 1505 */
+ XML_IO_ECANCELED, /* 1506 */
+ XML_IO_ECHILD, /* 1507 */
+ XML_IO_EDEADLK, /* 1508 */
+ XML_IO_EDOM, /* 1509 */
+ XML_IO_EEXIST, /* 1510 */
+ XML_IO_EFAULT, /* 1511 */
+ XML_IO_EFBIG, /* 1512 */
+ XML_IO_EINPROGRESS, /* 1513 */
+ XML_IO_EINTR, /* 1514 */
+ XML_IO_EINVAL, /* 1515 */
+ XML_IO_EIO, /* 1516 */
+ XML_IO_EISDIR, /* 1517 */
+ XML_IO_EMFILE, /* 1518 */
+ XML_IO_EMLINK, /* 1519 */
+ XML_IO_EMSGSIZE, /* 1520 */
+ XML_IO_ENAMETOOLONG, /* 1521 */
+ XML_IO_ENFILE, /* 1522 */
+ XML_IO_ENODEV, /* 1523 */
+ XML_IO_ENOENT, /* 1524 */
+ XML_IO_ENOEXEC, /* 1525 */
+ XML_IO_ENOLCK, /* 1526 */
+ XML_IO_ENOMEM, /* 1527 */
+ XML_IO_ENOSPC, /* 1528 */
+ XML_IO_ENOSYS, /* 1529 */
+ XML_IO_ENOTDIR, /* 1530 */
+ XML_IO_ENOTEMPTY, /* 1531 */
+ XML_IO_ENOTSUP, /* 1532 */
+ XML_IO_ENOTTY, /* 1533 */
+ XML_IO_ENXIO, /* 1534 */
+ XML_IO_EPERM, /* 1535 */
+ XML_IO_EPIPE, /* 1536 */
+ XML_IO_ERANGE, /* 1537 */
+ XML_IO_EROFS, /* 1538 */
+ XML_IO_ESPIPE, /* 1539 */
+ XML_IO_ESRCH, /* 1540 */
+ XML_IO_ETIMEDOUT, /* 1541 */
+ XML_IO_EXDEV, /* 1542 */
+ XML_IO_NETWORK_ATTEMPT, /* 1543 */
+ XML_IO_ENCODER, /* 1544 */
+ XML_IO_FLUSH, /* 1545 */
+ XML_IO_WRITE, /* 1546 */
+ XML_IO_NO_INPUT, /* 1547 */
+ XML_IO_BUFFER_FULL, /* 1548 */
+ XML_IO_LOAD_ERROR, /* 1549 */
+ XML_IO_ENOTSOCK, /* 1550 */
+ XML_IO_EISCONN, /* 1551 */
+ XML_IO_ECONNREFUSED, /* 1552 */
+ XML_IO_ENETUNREACH, /* 1553 */
+ XML_IO_EADDRINUSE, /* 1554 */
+ XML_IO_EALREADY, /* 1555 */
+ XML_IO_EAFNOSUPPORT, /* 1556 */
+ XML_IO_UNSUPPORTED_PROTOCOL, /* 1557 */
+ XML_XINCLUDE_RECURSION=1600,
+ XML_XINCLUDE_PARSE_VALUE, /* 1601 */
+ XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */
+ XML_XINCLUDE_NO_HREF, /* 1603 */
+ XML_XINCLUDE_NO_FALLBACK, /* 1604 */
+ XML_XINCLUDE_HREF_URI, /* 1605 */
+ XML_XINCLUDE_TEXT_FRAGMENT, /* 1606 */
+ XML_XINCLUDE_TEXT_DOCUMENT, /* 1607 */
+ XML_XINCLUDE_INVALID_CHAR, /* 1608 */
+ XML_XINCLUDE_BUILD_FAILED, /* 1609 */
+ XML_XINCLUDE_UNKNOWN_ENCODING, /* 1610 */
+ XML_XINCLUDE_MULTIPLE_ROOT, /* 1611 */
+ XML_XINCLUDE_XPTR_FAILED, /* 1612 */
+ XML_XINCLUDE_XPTR_RESULT, /* 1613 */
+ XML_XINCLUDE_INCLUDE_IN_INCLUDE, /* 1614 */
+ XML_XINCLUDE_FALLBACKS_IN_INCLUDE, /* 1615 */
+ XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, /* 1616 */
+ XML_XINCLUDE_DEPRECATED_NS, /* 1617 */
+ XML_XINCLUDE_FRAGMENT_ID, /* 1618 */
+ XML_CATALOG_MISSING_ATTR = 1650,
+ XML_CATALOG_ENTRY_BROKEN, /* 1651 */
+ XML_CATALOG_PREFER_VALUE, /* 1652 */
+ XML_CATALOG_NOT_CATALOG, /* 1653 */
+ XML_CATALOG_RECURSION, /* 1654 */
+ XML_SCHEMAP_PREFIX_UNDEFINED = 1700,
+ XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, /* 1701 */
+ XML_SCHEMAP_ATTRGRP_NONAME_NOREF, /* 1702 */
+ XML_SCHEMAP_ATTR_NONAME_NOREF, /* 1703 */
+ XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, /* 1704 */
+ XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, /* 1705 */
+ XML_SCHEMAP_ELEM_NONAME_NOREF, /* 1706 */
+ XML_SCHEMAP_EXTENSION_NO_BASE, /* 1707 */
+ XML_SCHEMAP_FACET_NO_VALUE, /* 1708 */
+ XML_SCHEMAP_FAILED_BUILD_IMPORT, /* 1709 */
+ XML_SCHEMAP_GROUP_NONAME_NOREF, /* 1710 */
+ XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, /* 1711 */
+ XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, /* 1712 */
+ XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, /* 1713 */
+ XML_SCHEMAP_INVALID_BOOLEAN, /* 1714 */
+ XML_SCHEMAP_INVALID_ENUM, /* 1715 */
+ XML_SCHEMAP_INVALID_FACET, /* 1716 */
+ XML_SCHEMAP_INVALID_FACET_VALUE, /* 1717 */
+ XML_SCHEMAP_INVALID_MAXOCCURS, /* 1718 */
+ XML_SCHEMAP_INVALID_MINOCCURS, /* 1719 */
+ XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, /* 1720 */
+ XML_SCHEMAP_INVALID_WHITE_SPACE, /* 1721 */
+ XML_SCHEMAP_NOATTR_NOREF, /* 1722 */
+ XML_SCHEMAP_NOTATION_NO_NAME, /* 1723 */
+ XML_SCHEMAP_NOTYPE_NOREF, /* 1724 */
+ XML_SCHEMAP_REF_AND_SUBTYPE, /* 1725 */
+ XML_SCHEMAP_RESTRICTION_NONAME_NOREF, /* 1726 */
+ XML_SCHEMAP_SIMPLETYPE_NONAME, /* 1727 */
+ XML_SCHEMAP_TYPE_AND_SUBTYPE, /* 1728 */
+ XML_SCHEMAP_UNKNOWN_ALL_CHILD, /* 1729 */
+ XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, /* 1730 */
+ XML_SCHEMAP_UNKNOWN_ATTR_CHILD, /* 1731 */
+ XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, /* 1732 */
+ XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, /* 1733 */
+ XML_SCHEMAP_UNKNOWN_BASE_TYPE, /* 1734 */
+ XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, /* 1735 */
+ XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, /* 1736 */
+ XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, /* 1737 */
+ XML_SCHEMAP_UNKNOWN_ELEM_CHILD, /* 1738 */
+ XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, /* 1739 */
+ XML_SCHEMAP_UNKNOWN_FACET_CHILD, /* 1740 */
+ XML_SCHEMAP_UNKNOWN_FACET_TYPE, /* 1741 */
+ XML_SCHEMAP_UNKNOWN_GROUP_CHILD, /* 1742 */
+ XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, /* 1743 */
+ XML_SCHEMAP_UNKNOWN_LIST_CHILD, /* 1744 */
+ XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, /* 1745 */
+ XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, /* 1746 */
+ XML_SCHEMAP_UNKNOWN_REF, /* 1747 */
+ XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, /* 1748 */
+ XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, /* 1749 */
+ XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, /* 1750 */
+ XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, /* 1751 */
+ XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, /* 1752 */
+ XML_SCHEMAP_UNKNOWN_TYPE, /* 1753 */
+ XML_SCHEMAP_UNKNOWN_UNION_CHILD, /* 1754 */
+ XML_SCHEMAP_ELEM_DEFAULT_FIXED, /* 1755 */
+ XML_SCHEMAP_REGEXP_INVALID, /* 1756 */
+ XML_SCHEMAP_FAILED_LOAD, /* 1757 */
+ XML_SCHEMAP_NOTHING_TO_PARSE, /* 1758 */
+ XML_SCHEMAP_NOROOT, /* 1759 */
+ XML_SCHEMAP_REDEFINED_GROUP, /* 1760 */
+ XML_SCHEMAP_REDEFINED_TYPE, /* 1761 */
+ XML_SCHEMAP_REDEFINED_ELEMENT, /* 1762 */
+ XML_SCHEMAP_REDEFINED_ATTRGROUP, /* 1763 */
+ XML_SCHEMAP_REDEFINED_ATTR, /* 1764 */
+ XML_SCHEMAP_REDEFINED_NOTATION, /* 1765 */
+ XML_SCHEMAP_FAILED_PARSE, /* 1766 */
+ XML_SCHEMAP_UNKNOWN_PREFIX, /* 1767 */
+ XML_SCHEMAP_DEF_AND_PREFIX, /* 1768 */
+ XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, /* 1769 */
+ XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, /* 1770 */
+ XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, /* 1771 */
+ XML_SCHEMAP_NOT_SCHEMA, /* 1772 */
+ XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1773 */
+ XML_SCHEMAP_INVALID_ATTR_USE, /* 1774 */
+ XML_SCHEMAP_RECURSIVE, /* 1775 */
+ XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, /* 1776 */
+ XML_SCHEMAP_INVALID_ATTR_COMBINATION, /* 1777 */
+ XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, /* 1778 */
+ XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, /* 1779 */
+ XML_SCHEMAP_INVALID_ATTR_NAME, /* 1780 */
+ XML_SCHEMAP_REF_AND_CONTENT, /* 1781 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_1, /* 1782 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_2, /* 1783 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_3, /* 1784 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_4, /* 1785 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_5, /* 1786 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, /* 1787 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, /* 1788 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, /* 1789 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, /* 1790 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, /* 1791 */
+ XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1792 */
+ XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1793 */
+ XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1794 */
+ XML_SCHEMAP_SRC_IMPORT_3_1, /* 1795 */
+ XML_SCHEMAP_SRC_IMPORT_3_2, /* 1796 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, /* 1797 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, /* 1798 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, /* 1799 */
+ XML_SCHEMAP_COS_CT_EXTENDS_1_3, /* 1800 */
+ XML_SCHEMAV_NOROOT = 1801,
+ XML_SCHEMAV_UNDECLAREDELEM, /* 1802 */
+ XML_SCHEMAV_NOTTOPLEVEL, /* 1803 */
+ XML_SCHEMAV_MISSING, /* 1804 */
+ XML_SCHEMAV_WRONGELEM, /* 1805 */
+ XML_SCHEMAV_NOTYPE, /* 1806 */
+ XML_SCHEMAV_NOROLLBACK, /* 1807 */
+ XML_SCHEMAV_ISABSTRACT, /* 1808 */
+ XML_SCHEMAV_NOTEMPTY, /* 1809 */
+ XML_SCHEMAV_ELEMCONT, /* 1810 */
+ XML_SCHEMAV_HAVEDEFAULT, /* 1811 */
+ XML_SCHEMAV_NOTNILLABLE, /* 1812 */
+ XML_SCHEMAV_EXTRACONTENT, /* 1813 */
+ XML_SCHEMAV_INVALIDATTR, /* 1814 */
+ XML_SCHEMAV_INVALIDELEM, /* 1815 */
+ XML_SCHEMAV_NOTDETERMINIST, /* 1816 */
+ XML_SCHEMAV_CONSTRUCT, /* 1817 */
+ XML_SCHEMAV_INTERNAL, /* 1818 */
+ XML_SCHEMAV_NOTSIMPLE, /* 1819 */
+ XML_SCHEMAV_ATTRUNKNOWN, /* 1820 */
+ XML_SCHEMAV_ATTRINVALID, /* 1821 */
+ XML_SCHEMAV_VALUE, /* 1822 */
+ XML_SCHEMAV_FACET, /* 1823 */
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, /* 1824 */
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, /* 1825 */
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, /* 1826 */
+ XML_SCHEMAV_CVC_TYPE_3_1_1, /* 1827 */
+ XML_SCHEMAV_CVC_TYPE_3_1_2, /* 1828 */
+ XML_SCHEMAV_CVC_FACET_VALID, /* 1829 */
+ XML_SCHEMAV_CVC_LENGTH_VALID, /* 1830 */
+ XML_SCHEMAV_CVC_MINLENGTH_VALID, /* 1831 */
+ XML_SCHEMAV_CVC_MAXLENGTH_VALID, /* 1832 */
+ XML_SCHEMAV_CVC_MININCLUSIVE_VALID, /* 1833 */
+ XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, /* 1834 */
+ XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, /* 1835 */
+ XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, /* 1836 */
+ XML_SCHEMAV_CVC_TOTALDIGITS_VALID, /* 1837 */
+ XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, /* 1838 */
+ XML_SCHEMAV_CVC_PATTERN_VALID, /* 1839 */
+ XML_SCHEMAV_CVC_ENUMERATION_VALID, /* 1840 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, /* 1841 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, /* 1842 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, /* 1843 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, /* 1844 */
+ XML_SCHEMAV_CVC_ELT_1, /* 1845 */
+ XML_SCHEMAV_CVC_ELT_2, /* 1846 */
+ XML_SCHEMAV_CVC_ELT_3_1, /* 1847 */
+ XML_SCHEMAV_CVC_ELT_3_2_1, /* 1848 */
+ XML_SCHEMAV_CVC_ELT_3_2_2, /* 1849 */
+ XML_SCHEMAV_CVC_ELT_4_1, /* 1850 */
+ XML_SCHEMAV_CVC_ELT_4_2, /* 1851 */
+ XML_SCHEMAV_CVC_ELT_4_3, /* 1852 */
+ XML_SCHEMAV_CVC_ELT_5_1_1, /* 1853 */
+ XML_SCHEMAV_CVC_ELT_5_1_2, /* 1854 */
+ XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */
+ XML_SCHEMAV_CVC_ELT_5_2_2_1, /* 1856 */
+ XML_SCHEMAV_CVC_ELT_5_2_2_2_1, /* 1857 */
+ XML_SCHEMAV_CVC_ELT_5_2_2_2_2, /* 1858 */
+ XML_SCHEMAV_CVC_ELT_6, /* 1859 */
+ XML_SCHEMAV_CVC_ELT_7, /* 1860 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_1, /* 1861 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_2, /* 1862 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_3, /* 1863 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_4, /* 1864 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, /* 1865 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, /* 1866 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, /* 1867 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_4, /* 1868 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, /* 1869 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, /* 1870 */
+ XML_SCHEMAV_ELEMENT_CONTENT, /* 1871 */
+ XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, /* 1872 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_1, /* 1873 */
+ XML_SCHEMAV_CVC_AU, /* 1874 */
+ XML_SCHEMAV_CVC_TYPE_1, /* 1875 */
+ XML_SCHEMAV_CVC_TYPE_2, /* 1876 */
+ XML_SCHEMAV_CVC_IDC, /* 1877 */
+ XML_SCHEMAV_CVC_WILDCARD, /* 1878 */
+ XML_SCHEMAV_MISC, /* 1879 */
+ XML_XPTR_UNKNOWN_SCHEME = 1900,
+ XML_XPTR_CHILDSEQ_START, /* 1901 */
+ XML_XPTR_EVAL_FAILED, /* 1902 */
+ XML_XPTR_EXTRA_OBJECTS, /* 1903 */
+ XML_C14N_CREATE_CTXT = 1950,
+ XML_C14N_REQUIRES_UTF8, /* 1951 */
+ XML_C14N_CREATE_STACK, /* 1952 */
+ XML_C14N_INVALID_NODE, /* 1953 */
+ XML_C14N_UNKNOW_NODE, /* 1954 */
+ XML_C14N_RELATIVE_NAMESPACE, /* 1955 */
+ XML_FTP_PASV_ANSWER = 2000,
+ XML_FTP_EPSV_ANSWER, /* 2001 */
+ XML_FTP_ACCNT, /* 2002 */
+ XML_FTP_URL_SYNTAX, /* 2003 */
+ XML_HTTP_URL_SYNTAX = 2020,
+ XML_HTTP_USE_IP, /* 2021 */
+ XML_HTTP_UNKNOWN_HOST, /* 2022 */
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000,
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_2, /* 3001 */
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_3, /* 3002 */
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_4, /* 3003 */
+ XML_SCHEMAP_SRC_RESOLVE, /* 3004 */
+ XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, /* 3005 */
+ XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, /* 3006 */
+ XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, /* 3007 */
+ XML_SCHEMAP_ST_PROPS_CORRECT_1, /* 3008 */
+ XML_SCHEMAP_ST_PROPS_CORRECT_2, /* 3009 */
+ XML_SCHEMAP_ST_PROPS_CORRECT_3, /* 3010 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_1, /* 3011 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_2, /* 3012 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, /* 3013 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, /* 3014 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_1, /* 3015 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, /* 3016 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, /* 3017 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, /* 3018 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, /* 3019 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, /* 3020 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, /* 3021 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5, /* 3022 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_1, /* 3023 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, /* 3024 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, /* 3025 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, /* 3026 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, /* 3027 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, /* 3028 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, /* 3029 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, /* 3030 */
+ XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, /* 3031 */
+ XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, /* 3032 */
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, /* 3033 */
+ XML_SCHEMAP_S4S_ELEM_MISSING, /* 3034 */
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, /* 3035 */
+ XML_SCHEMAP_S4S_ATTR_MISSING, /* 3036 */
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, /* 3037 */
+ XML_SCHEMAP_SRC_ELEMENT_1, /* 3038 */
+ XML_SCHEMAP_SRC_ELEMENT_2_1, /* 3039 */
+ XML_SCHEMAP_SRC_ELEMENT_2_2, /* 3040 */
+ XML_SCHEMAP_SRC_ELEMENT_3, /* 3041 */
+ XML_SCHEMAP_P_PROPS_CORRECT_1, /* 3042 */
+ XML_SCHEMAP_P_PROPS_CORRECT_2_1, /* 3043 */
+ XML_SCHEMAP_P_PROPS_CORRECT_2_2, /* 3044 */
+ XML_SCHEMAP_E_PROPS_CORRECT_2, /* 3045 */
+ XML_SCHEMAP_E_PROPS_CORRECT_3, /* 3046 */
+ XML_SCHEMAP_E_PROPS_CORRECT_4, /* 3047 */
+ XML_SCHEMAP_E_PROPS_CORRECT_5, /* 3048 */
+ XML_SCHEMAP_E_PROPS_CORRECT_6, /* 3049 */
+ XML_SCHEMAP_SRC_INCLUDE, /* 3050 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_1, /* 3051 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_2, /* 3052 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_3_1, /* 3053 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_3_2, /* 3054 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_4, /* 3055 */
+ XML_SCHEMAP_NO_XMLNS, /* 3056 */
+ XML_SCHEMAP_NO_XSI, /* 3057 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_1, /* 3058 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_1, /* 3059 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, /* 3060 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2, /* 3061 */
+ XML_SCHEMAP_CVC_SIMPLE_TYPE, /* 3062 */
+ XML_SCHEMAP_COS_CT_EXTENDS_1_1, /* 3063 */
+ XML_SCHEMAP_SRC_IMPORT_1_1, /* 3064 */
+ XML_SCHEMAP_SRC_IMPORT_1_2, /* 3065 */
+ XML_SCHEMAP_SRC_IMPORT_2, /* 3066 */
+ XML_SCHEMAP_SRC_IMPORT_2_1, /* 3067 */
+ XML_SCHEMAP_SRC_IMPORT_2_2, /* 3068 */
+ XML_SCHEMAP_INTERNAL, /* 3069 non-W3C */
+ XML_SCHEMAP_NOT_DETERMINISTIC, /* 3070 non-W3C */
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1, /* 3071 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2, /* 3072 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, /* 3073 */
+ XML_SCHEMAP_MG_PROPS_CORRECT_1, /* 3074 */
+ XML_SCHEMAP_MG_PROPS_CORRECT_2, /* 3075 */
+ XML_SCHEMAP_SRC_CT_1, /* 3076 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */
+ XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */
+ XML_SCHEMAP_A_PROPS_CORRECT_2, /* 3079 */
+ XML_SCHEMAP_C_PROPS_CORRECT, /* 3080 */
+ XML_SCHEMAP_SRC_REDEFINE, /* 3081 */
+ XML_SCHEMAP_SRC_IMPORT, /* 3082 */
+ XML_SCHEMAP_WARN_SKIP_SCHEMA, /* 3083 */
+ XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */
+ XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */
+ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */
+ XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */
+ XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */
+ XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */
+ XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */
+ XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */
+ XML_SCHEMATRONV_ASSERT = 4000, /* 4000 */
+ XML_SCHEMATRONV_REPORT,
+ XML_MODULE_OPEN = 4900, /* 4900 */
+ XML_MODULE_CLOSE, /* 4901 */
+ XML_CHECK_FOUND_ELEMENT = 5000,
+ XML_CHECK_FOUND_ATTRIBUTE, /* 5001 */
+ XML_CHECK_FOUND_TEXT, /* 5002 */
+ XML_CHECK_FOUND_CDATA, /* 5003 */
+ XML_CHECK_FOUND_ENTITYREF, /* 5004 */
+ XML_CHECK_FOUND_ENTITY, /* 5005 */
+ XML_CHECK_FOUND_PI, /* 5006 */
+ XML_CHECK_FOUND_COMMENT, /* 5007 */
+ XML_CHECK_FOUND_DOCTYPE, /* 5008 */
+ XML_CHECK_FOUND_FRAGMENT, /* 5009 */
+ XML_CHECK_FOUND_NOTATION, /* 5010 */
+ XML_CHECK_UNKNOWN_NODE, /* 5011 */
+ XML_CHECK_ENTITY_TYPE, /* 5012 */
+ XML_CHECK_NO_PARENT, /* 5013 */
+ XML_CHECK_NO_DOC, /* 5014 */
+ XML_CHECK_NO_NAME, /* 5015 */
+ XML_CHECK_NO_ELEM, /* 5016 */
+ XML_CHECK_WRONG_DOC, /* 5017 */
+ XML_CHECK_NO_PREV, /* 5018 */
+ XML_CHECK_WRONG_PREV, /* 5019 */
+ XML_CHECK_NO_NEXT, /* 5020 */
+ XML_CHECK_WRONG_NEXT, /* 5021 */
+ XML_CHECK_NOT_DTD, /* 5022 */
+ XML_CHECK_NOT_ATTR, /* 5023 */
+ XML_CHECK_NOT_ATTR_DECL, /* 5024 */
+ XML_CHECK_NOT_ELEM_DECL, /* 5025 */
+ XML_CHECK_NOT_ENTITY_DECL, /* 5026 */
+ XML_CHECK_NOT_NS_DECL, /* 5027 */
+ XML_CHECK_NO_HREF, /* 5028 */
+ XML_CHECK_WRONG_PARENT,/* 5029 */
+ XML_CHECK_NS_SCOPE, /* 5030 */
+ XML_CHECK_NS_ANCESTOR, /* 5031 */
+ XML_CHECK_NOT_UTF8, /* 5032 */
+ XML_CHECK_NO_DICT, /* 5033 */
+ XML_CHECK_NOT_NCNAME, /* 5034 */
+ XML_CHECK_OUTSIDE_DICT, /* 5035 */
+ XML_CHECK_WRONG_NAME, /* 5036 */
+ XML_CHECK_NAME_NOT_NULL, /* 5037 */
+ XML_I18N_NO_NAME = 6000,
+ XML_I18N_NO_HANDLER, /* 6001 */
+ XML_I18N_EXCESS_HANDLER, /* 6002 */
+ XML_I18N_CONV_FAILED, /* 6003 */
+ XML_I18N_NO_OUTPUT, /* 6004 */
+ XML_BUF_OVERFLOW = 7000
+} xmlParserErrors;
+
+/**
+ * xmlGenericErrorFunc:
+ * @ctx: a parsing context
+ * @msg: the message
+ * @...: the extra arguments of the varargs to format the message
+ *
+ * Signature of the function to use when there is an error and
+ * no parsing or validity context available .
+ */
+typedef void (*xmlGenericErrorFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * xmlStructuredErrorFunc:
+ * @userData: user provided data for the error callback
+ * @error: the error being raised.
+ *
+ * Signature of the function to use when there is an error and
+ * the module handles the new error reporting mechanism.
+ */
+typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error);
+
+/** DOC_DISABLE */
+XML_DEPRECATED
+XMLPUBFUN const xmlError *__xmlLastError(void);
+
+XMLPUBFUN xmlGenericErrorFunc *__xmlGenericError(void);
+XMLPUBFUN void **__xmlGenericErrorContext(void);
+XMLPUBFUN xmlStructuredErrorFunc *__xmlStructuredError(void);
+XMLPUBFUN void **__xmlStructuredErrorContext(void);
+
+#ifndef XML_GLOBALS_NO_REDEFINITION
+ #define xmlLastError (*__xmlLastError())
+ #define xmlGenericError (*__xmlGenericError())
+ #define xmlGenericErrorContext (*__xmlGenericErrorContext())
+ #define xmlStructuredError (*__xmlStructuredError())
+ #define xmlStructuredErrorContext (*__xmlStructuredErrorContext())
+#endif
+/** DOC_ENABLE */
+
+/*
+ * Use the following function to reset the two global variables
+ * xmlGenericError and xmlGenericErrorContext.
+ */
+XMLPUBFUN void
+ xmlSetGenericErrorFunc (void *ctx,
+ xmlGenericErrorFunc handler);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlThrDefSetGenericErrorFunc(void *ctx,
+ xmlGenericErrorFunc handler);
+
+XMLPUBFUN void
+ xmlSetStructuredErrorFunc (void *ctx,
+ xmlStructuredErrorFunc handler);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlThrDefSetStructuredErrorFunc(void *ctx,
+ xmlStructuredErrorFunc handler);
+/*
+ * Default message routines used by SAX and Valid context for error
+ * and warning reporting.
+ */
+XMLPUBFUN void
+ xmlParserError (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void
+ xmlParserWarning (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void
+ xmlParserValidityError (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void
+ xmlParserValidityWarning (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+/** DOC_DISABLE */
+struct _xmlParserInput;
+/** DOC_ENABLE */
+XMLPUBFUN void
+ xmlParserPrintFileInfo (struct _xmlParserInput *input);
+XMLPUBFUN void
+ xmlParserPrintFileContext (struct _xmlParserInput *input);
+XMLPUBFUN void
+xmlFormatError (const xmlError *err,
+ xmlGenericErrorFunc channel,
+ void *data);
+
+/*
+ * Extended error information routines
+ */
+XMLPUBFUN const xmlError *
+ xmlGetLastError (void);
+XMLPUBFUN void
+ xmlResetLastError (void);
+XMLPUBFUN const xmlError *
+ xmlCtxtGetLastError (void *ctx);
+XMLPUBFUN void
+ xmlCtxtResetLastError (void *ctx);
+XMLPUBFUN void
+ xmlResetError (xmlErrorPtr err);
+XMLPUBFUN int
+ xmlCopyError (const xmlError *from,
+ xmlErrorPtr to);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_ERROR_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlexports.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlexports.h
new file mode 100644
index 0000000000000000000000000000000000000000..c4b74810a909bc86e484171fadf5926464cbff54
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlexports.h
@@ -0,0 +1,96 @@
+/*
+ * Summary: macros for marking symbols as exportable/importable.
+ * Description: macros for marking symbols as exportable/importable.
+ *
+ * Copy: See Copyright for the status of this software.
+ */
+
+#ifndef __XML_EXPORTS_H__
+#define __XML_EXPORTS_H__
+
+/** DOC_DISABLE */
+
+/*
+ * Symbol visibility
+ */
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+ #ifdef LIBXML_STATIC
+ #define XMLPUBLIC
+ #elif defined(IN_LIBXML)
+ #define XMLPUBLIC __declspec(dllexport)
+ #else
+ #define XMLPUBLIC __declspec(dllimport)
+ #endif
+#else /* not Windows */
+ #define XMLPUBLIC
+#endif /* platform switch */
+
+#define XMLPUBFUN XMLPUBLIC
+
+#define XMLPUBVAR XMLPUBLIC extern
+
+/* Compatibility */
+#define XMLCALL
+#define XMLCDECL
+#ifndef LIBXML_DLL_IMPORT
+ #define LIBXML_DLL_IMPORT XMLPUBVAR
+#endif
+
+/*
+ * Attributes
+ */
+
+#if !defined(__clang__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 403)
+ #define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
+#else
+ #define LIBXML_ATTR_ALLOC_SIZE(x)
+#endif
+
+#if __GNUC__ * 100 + __GNUC_MINOR__ >= 303
+ #define LIBXML_ATTR_FORMAT(fmt,args) \
+ __attribute__((__format__(__printf__,fmt,args)))
+#else
+ #define LIBXML_ATTR_FORMAT(fmt,args)
+#endif
+
+#ifndef XML_DEPRECATED
+ #if defined(IN_LIBXML)
+ #define XML_DEPRECATED
+ #elif __GNUC__ * 100 + __GNUC_MINOR__ >= 301
+ #define XML_DEPRECATED __attribute__((deprecated))
+ #elif defined(_MSC_VER) && _MSC_VER >= 1400
+ /* Available since Visual Studio 2005 */
+ #define XML_DEPRECATED __declspec(deprecated)
+ #else
+ #define XML_DEPRECATED
+ #endif
+#endif
+
+#ifndef XML_DEPRECATED_MEMBER
+ #if defined(IN_LIBXML)
+ #define XML_DEPRECATED_MEMBER
+ #elif __GNUC__ * 100 + __GNUC_MINOR__ >= 301
+ #define XML_DEPRECATED_MEMBER __attribute__((deprecated))
+ #else
+ #define XML_DEPRECATED_MEMBER
+ #endif
+#endif
+
+/*
+ * Originally declared in xmlversion.h which is generated
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XMLPUBFUN void xmlCheckVersion(int version);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_EXPORTS_H__ */
+
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlmemory.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlmemory.h
new file mode 100644
index 0000000000000000000000000000000000000000..2b8c3aa839ed99bedc6ee263be93012bd5f6859c
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlmemory.h
@@ -0,0 +1,188 @@
+/*
+ * Summary: interface for the memory allocator
+ * Description: provides interfaces for the memory allocator,
+ * including debugging capabilities.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __DEBUG_MEMORY_ALLOC__
+#define __DEBUG_MEMORY_ALLOC__
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The XML memory wrapper support 4 basic overloadable functions.
+ */
+/**
+ * xmlFreeFunc:
+ * @mem: an already allocated block of memory
+ *
+ * Signature for a free() implementation.
+ */
+typedef void (*xmlFreeFunc)(void *mem);
+/**
+ * xmlMallocFunc:
+ * @size: the size requested in bytes
+ *
+ * Signature for a malloc() implementation.
+ *
+ * Returns a pointer to the newly allocated block or NULL in case of error.
+ */
+typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) *xmlMallocFunc)(size_t size);
+
+/**
+ * xmlReallocFunc:
+ * @mem: an already allocated block of memory
+ * @size: the new size requested in bytes
+ *
+ * Signature for a realloc() implementation.
+ *
+ * Returns a pointer to the newly reallocated block or NULL in case of error.
+ */
+typedef void *(*xmlReallocFunc)(void *mem, size_t size);
+
+/**
+ * xmlStrdupFunc:
+ * @str: a zero terminated string
+ *
+ * Signature for an strdup() implementation.
+ *
+ * Returns the copy of the string or NULL in case of error.
+ */
+typedef char *(*xmlStrdupFunc)(const char *str);
+
+/*
+ * In general the memory allocation entry points are not kept
+ * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
+ * - xmlMalloc
+ * - xmlMallocAtomic
+ * - xmlRealloc
+ * - xmlMemStrdup
+ * - xmlFree
+ */
+#ifdef LIBXML_THREAD_ALLOC_ENABLED
+
+/** DOC_DISABLE */
+XMLPUBFUN xmlMallocFunc *__xmlMalloc(void);
+XMLPUBFUN xmlMallocFunc *__xmlMallocAtomic(void);
+XMLPUBFUN xmlReallocFunc *__xmlRealloc(void);
+XMLPUBFUN xmlFreeFunc *__xmlFree(void);
+XMLPUBFUN xmlStrdupFunc *__xmlMemStrdup(void);
+
+#ifndef XML_GLOBALS_NO_REDEFINITION
+ #define xmlMalloc (*__xmlMalloc())
+ #define xmlMallocAtomic (*__xmlMallocAtomic())
+ #define xmlRealloc (*__xmlRealloc())
+ #define xmlFree (*__xmlFree())
+ #define xmlMemStrdup (*__xmlMemStrdup())
+#endif
+/** DOC_ENABLE */
+
+#else
+ XMLPUBVAR xmlMallocFunc xmlMalloc;
+ XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
+ XMLPUBVAR xmlReallocFunc xmlRealloc;
+ XMLPUBVAR xmlFreeFunc xmlFree;
+ XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
+#endif
+
+/*
+ * The way to overload the existing functions.
+ * The xmlGc function have an extra entry for atomic block
+ * allocations useful for garbage collected memory allocators
+ */
+XMLPUBFUN int
+ xmlMemSetup (xmlFreeFunc freeFunc,
+ xmlMallocFunc mallocFunc,
+ xmlReallocFunc reallocFunc,
+ xmlStrdupFunc strdupFunc);
+XMLPUBFUN int
+ xmlMemGet (xmlFreeFunc *freeFunc,
+ xmlMallocFunc *mallocFunc,
+ xmlReallocFunc *reallocFunc,
+ xmlStrdupFunc *strdupFunc);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlGcMemSetup (xmlFreeFunc freeFunc,
+ xmlMallocFunc mallocFunc,
+ xmlMallocFunc mallocAtomicFunc,
+ xmlReallocFunc reallocFunc,
+ xmlStrdupFunc strdupFunc);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlGcMemGet (xmlFreeFunc *freeFunc,
+ xmlMallocFunc *mallocFunc,
+ xmlMallocFunc *mallocAtomicFunc,
+ xmlReallocFunc *reallocFunc,
+ xmlStrdupFunc *strdupFunc);
+
+/*
+ * Initialization of the memory layer.
+ */
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlInitMemory (void);
+
+/*
+ * Cleanup of the memory layer.
+ */
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlCleanupMemory (void);
+/*
+ * These are specific to the XML debug memory wrapper.
+ */
+XMLPUBFUN size_t
+ xmlMemSize (void *ptr);
+XMLPUBFUN int
+ xmlMemUsed (void);
+XMLPUBFUN int
+ xmlMemBlocks (void);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlMemDisplay (FILE *fp);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlMemDisplayLast(FILE *fp, long nbBytes);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlMemShow (FILE *fp, int nr);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlMemoryDump (void);
+XMLPUBFUN void *
+ xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1);
+XMLPUBFUN void *
+ xmlMemRealloc (void *ptr,size_t size);
+XMLPUBFUN void
+ xmlMemFree (void *ptr);
+XMLPUBFUN char *
+ xmlMemoryStrdup (const char *str);
+XML_DEPRECATED
+XMLPUBFUN void *
+ xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
+XML_DEPRECATED
+XMLPUBFUN void *
+ xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
+XML_DEPRECATED
+XMLPUBFUN void *
+ xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
+XML_DEPRECATED
+XMLPUBFUN char *
+ xmlMemStrdupLoc (const char *str, const char *file, int line);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __DEBUG_MEMORY_ALLOC__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlmodule.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlmodule.h
new file mode 100644
index 0000000000000000000000000000000000000000..5db558568f421f1c820d70242937f10fe101583e
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlmodule.h
@@ -0,0 +1,61 @@
+/*
+ * Summary: dynamic module loading
+ * Description: basic API for dynamic module loading, used by
+ * libexslt added in 2.6.17
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Joel W. Reed
+ */
+
+#ifndef __XML_MODULE_H__
+#define __XML_MODULE_H__
+
+#include
+
+#ifdef LIBXML_MODULES_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlModulePtr:
+ *
+ * A handle to a dynamically loaded module
+ */
+typedef struct _xmlModule xmlModule;
+typedef xmlModule *xmlModulePtr;
+
+/**
+ * xmlModuleOption:
+ *
+ * enumeration of options that can be passed down to xmlModuleOpen()
+ */
+typedef enum {
+ XML_MODULE_LAZY = 1, /* lazy binding */
+ XML_MODULE_LOCAL= 2 /* local binding */
+} xmlModuleOption;
+
+XML_DEPRECATED
+XMLPUBFUN xmlModulePtr xmlModuleOpen (const char *filename,
+ int options);
+
+XML_DEPRECATED
+XMLPUBFUN int xmlModuleSymbol (xmlModulePtr module,
+ const char* name,
+ void **result);
+
+XML_DEPRECATED
+XMLPUBFUN int xmlModuleClose (xmlModulePtr module);
+
+XML_DEPRECATED
+XMLPUBFUN int xmlModuleFree (xmlModulePtr module);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_MODULES_ENABLED */
+
+#endif /*__XML_MODULE_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlreader.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlreader.h
new file mode 100644
index 0000000000000000000000000000000000000000..2344901d875327c03c92a07d0ba27ffba86dc821
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlreader.h
@@ -0,0 +1,444 @@
+/*
+ * Summary: the XMLReader implementation
+ * Description: API of the XML streaming API based on C# interfaces.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XMLREADER_H__
+#define __XML_XMLREADER_H__
+
+#include
+#include
+#include
+#include
+#ifdef LIBXML_RELAXNG_ENABLED
+#include
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+#include
+#endif
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlParserSeverities:
+ *
+ * How severe an error callback is when the per-reader error callback API
+ * is used.
+ */
+typedef enum {
+ XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
+ XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
+ XML_PARSER_SEVERITY_WARNING = 3,
+ XML_PARSER_SEVERITY_ERROR = 4
+} xmlParserSeverities;
+
+#ifdef LIBXML_READER_ENABLED
+
+/**
+ * xmlTextReaderMode:
+ *
+ * Internal state values for the reader.
+ */
+typedef enum {
+ XML_TEXTREADER_MODE_INITIAL = 0,
+ XML_TEXTREADER_MODE_INTERACTIVE = 1,
+ XML_TEXTREADER_MODE_ERROR = 2,
+ XML_TEXTREADER_MODE_EOF =3,
+ XML_TEXTREADER_MODE_CLOSED = 4,
+ XML_TEXTREADER_MODE_READING = 5
+} xmlTextReaderMode;
+
+/**
+ * xmlParserProperties:
+ *
+ * Some common options to use with xmlTextReaderSetParserProp, but it
+ * is better to use xmlParserOption and the xmlReaderNewxxx and
+ * xmlReaderForxxx APIs now.
+ */
+typedef enum {
+ XML_PARSER_LOADDTD = 1,
+ XML_PARSER_DEFAULTATTRS = 2,
+ XML_PARSER_VALIDATE = 3,
+ XML_PARSER_SUBST_ENTITIES = 4
+} xmlParserProperties;
+
+/**
+ * xmlReaderTypes:
+ *
+ * Predefined constants for the different types of nodes.
+ */
+typedef enum {
+ XML_READER_TYPE_NONE = 0,
+ XML_READER_TYPE_ELEMENT = 1,
+ XML_READER_TYPE_ATTRIBUTE = 2,
+ XML_READER_TYPE_TEXT = 3,
+ XML_READER_TYPE_CDATA = 4,
+ XML_READER_TYPE_ENTITY_REFERENCE = 5,
+ XML_READER_TYPE_ENTITY = 6,
+ XML_READER_TYPE_PROCESSING_INSTRUCTION = 7,
+ XML_READER_TYPE_COMMENT = 8,
+ XML_READER_TYPE_DOCUMENT = 9,
+ XML_READER_TYPE_DOCUMENT_TYPE = 10,
+ XML_READER_TYPE_DOCUMENT_FRAGMENT = 11,
+ XML_READER_TYPE_NOTATION = 12,
+ XML_READER_TYPE_WHITESPACE = 13,
+ XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14,
+ XML_READER_TYPE_END_ELEMENT = 15,
+ XML_READER_TYPE_END_ENTITY = 16,
+ XML_READER_TYPE_XML_DECLARATION = 17
+} xmlReaderTypes;
+
+/**
+ * xmlTextReader:
+ *
+ * Structure for an xmlReader context.
+ */
+typedef struct _xmlTextReader xmlTextReader;
+
+/**
+ * xmlTextReaderPtr:
+ *
+ * Pointer to an xmlReader context.
+ */
+typedef xmlTextReader *xmlTextReaderPtr;
+
+/*
+ * Constructors & Destructor
+ */
+XMLPUBFUN xmlTextReaderPtr
+ xmlNewTextReader (xmlParserInputBufferPtr input,
+ const char *URI);
+XMLPUBFUN xmlTextReaderPtr
+ xmlNewTextReaderFilename(const char *URI);
+
+XMLPUBFUN void
+ xmlFreeTextReader (xmlTextReaderPtr reader);
+
+XMLPUBFUN int
+ xmlTextReaderSetup(xmlTextReaderPtr reader,
+ xmlParserInputBufferPtr input, const char *URL,
+ const char *encoding, int options);
+XMLPUBFUN void
+ xmlTextReaderSetMaxAmplification(xmlTextReaderPtr reader,
+ unsigned maxAmpl);
+XMLPUBFUN const xmlError *
+ xmlTextReaderGetLastError(xmlTextReaderPtr reader);
+
+/*
+ * Iterators
+ */
+XMLPUBFUN int
+ xmlTextReaderRead (xmlTextReaderPtr reader);
+
+#ifdef LIBXML_WRITER_ENABLED
+XMLPUBFUN xmlChar *
+ xmlTextReaderReadInnerXml(xmlTextReaderPtr reader);
+
+XMLPUBFUN xmlChar *
+ xmlTextReaderReadOuterXml(xmlTextReaderPtr reader);
+#endif
+
+XMLPUBFUN xmlChar *
+ xmlTextReaderReadString (xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader);
+
+/*
+ * Attributes of the node
+ */
+XMLPUBFUN int
+ xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderDepth (xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderHasValue(xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderIsDefault (xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderNodeType (xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderReadState (xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
+
+XMLPUBFUN const xmlChar *
+ xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar *
+ xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar *
+ xmlTextReaderConstName (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar *
+ xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar *
+ xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar *
+ xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar *
+ xmlTextReaderConstString (xmlTextReaderPtr reader,
+ const xmlChar *str);
+XMLPUBFUN const xmlChar *
+ xmlTextReaderConstValue (xmlTextReaderPtr reader);
+
+/*
+ * use the Const version of the routine for
+ * better performance and simpler code
+ */
+XMLPUBFUN xmlChar *
+ xmlTextReaderBaseUri (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar *
+ xmlTextReaderLocalName (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar *
+ xmlTextReaderName (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar *
+ xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar *
+ xmlTextReaderPrefix (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar *
+ xmlTextReaderXmlLang (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar *
+ xmlTextReaderValue (xmlTextReaderPtr reader);
+
+/*
+ * Methods of the XmlTextReader
+ */
+XMLPUBFUN int
+ xmlTextReaderClose (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar *
+ xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
+ int no);
+XMLPUBFUN xmlChar *
+ xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
+ const xmlChar *name);
+XMLPUBFUN xmlChar *
+ xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
+ const xmlChar *localName,
+ const xmlChar *namespaceURI);
+XMLPUBFUN xmlParserInputBufferPtr
+ xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar *
+ xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
+ const xmlChar *prefix);
+XMLPUBFUN int
+ xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
+ int no);
+XMLPUBFUN int
+ xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
+ const xmlChar *name);
+XMLPUBFUN int
+ xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
+ const xmlChar *localName,
+ const xmlChar *namespaceURI);
+XMLPUBFUN int
+ xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderNormalization (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar *
+ xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
+
+/*
+ * Extensions
+ */
+XMLPUBFUN int
+ xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
+ int prop,
+ int value);
+XMLPUBFUN int
+ xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
+ int prop);
+XMLPUBFUN xmlNodePtr
+ xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
+
+XMLPUBFUN int
+ xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
+
+XMLPUBFUN int
+ xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
+
+XMLPUBFUN xmlNodePtr
+ xmlTextReaderPreserve (xmlTextReaderPtr reader);
+#ifdef LIBXML_PATTERN_ENABLED
+XMLPUBFUN int
+ xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
+ const xmlChar *pattern,
+ const xmlChar **namespaces);
+#endif /* LIBXML_PATTERN_ENABLED */
+XMLPUBFUN xmlDocPtr
+ xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
+XMLPUBFUN xmlNodePtr
+ xmlTextReaderExpand (xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderNext (xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderNextSibling (xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderIsValid (xmlTextReaderPtr reader);
+#ifdef LIBXML_RELAXNG_ENABLED
+XMLPUBFUN int
+ xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
+ const char *rng);
+XMLPUBFUN int
+ xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader,
+ xmlRelaxNGValidCtxtPtr ctxt,
+ int options);
+
+XMLPUBFUN int
+ xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
+ xmlRelaxNGPtr schema);
+#endif
+#ifdef LIBXML_SCHEMAS_ENABLED
+XMLPUBFUN int
+ xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
+ const char *xsd);
+XMLPUBFUN int
+ xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
+ xmlSchemaValidCtxtPtr ctxt,
+ int options);
+XMLPUBFUN int
+ xmlTextReaderSetSchema (xmlTextReaderPtr reader,
+ xmlSchemaPtr schema);
+#endif
+XMLPUBFUN const xmlChar *
+ xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
+XMLPUBFUN int
+ xmlTextReaderStandalone (xmlTextReaderPtr reader);
+
+
+/*
+ * Index lookup
+ */
+XMLPUBFUN long
+ xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
+
+/*
+ * New more complete APIs for simpler creation and reuse of readers
+ */
+XMLPUBFUN xmlTextReaderPtr
+ xmlReaderWalker (xmlDocPtr doc);
+XMLPUBFUN xmlTextReaderPtr
+ xmlReaderForDoc (const xmlChar * cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr
+ xmlReaderForFile (const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr
+ xmlReaderForMemory (const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr
+ xmlReaderForFd (int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr
+ xmlReaderForIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN int
+ xmlReaderNewWalker (xmlTextReaderPtr reader,
+ xmlDocPtr doc);
+XMLPUBFUN int
+ xmlReaderNewDoc (xmlTextReaderPtr reader,
+ const xmlChar * cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN int
+ xmlReaderNewFile (xmlTextReaderPtr reader,
+ const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN int
+ xmlReaderNewMemory (xmlTextReaderPtr reader,
+ const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN int
+ xmlReaderNewFd (xmlTextReaderPtr reader,
+ int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN int
+ xmlReaderNewIO (xmlTextReaderPtr reader,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+/*
+ * Error handling extensions
+ */
+typedef void * xmlTextReaderLocatorPtr;
+
+/**
+ * xmlTextReaderErrorFunc:
+ * @arg: the user argument
+ * @msg: the message
+ * @severity: the severity of the error
+ * @locator: a locator indicating where the error occurred
+ *
+ * Signature of an error callback from a reader parser
+ */
+typedef void (*xmlTextReaderErrorFunc)(void *arg,
+ const char *msg,
+ xmlParserSeverities severity,
+ xmlTextReaderLocatorPtr locator);
+XMLPUBFUN int
+ xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
+XMLPUBFUN xmlChar *
+ xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
+XMLPUBFUN void
+ xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
+ xmlTextReaderErrorFunc f,
+ void *arg);
+XMLPUBFUN void
+ xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
+ xmlStructuredErrorFunc f,
+ void *arg);
+XMLPUBFUN void
+ xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
+ xmlTextReaderErrorFunc *f,
+ void **arg);
+
+XMLPUBFUN void
+ xmlTextReaderSetResourceLoader(xmlTextReaderPtr reader,
+ xmlResourceLoader loader,
+ void *data);
+
+#endif /* LIBXML_READER_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XMLREADER_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlregexp.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlregexp.h
new file mode 100644
index 0000000000000000000000000000000000000000..f7e10c32912a2c98967467cf90f535231535a37b
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlregexp.h
@@ -0,0 +1,116 @@
+/*
+ * Summary: regular expressions handling
+ * Description: basic API for libxml regular expressions handling used
+ * for XML Schemas and validation.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_REGEXP_H__
+#define __XML_REGEXP_H__
+
+#include
+#include
+#include
+
+#ifdef LIBXML_REGEXP_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlRegexpPtr:
+ *
+ * A libxml regular expression, they can actually be far more complex
+ * thank the POSIX regex expressions.
+ */
+typedef struct _xmlRegexp xmlRegexp;
+typedef xmlRegexp *xmlRegexpPtr;
+
+/**
+ * xmlRegExecCtxtPtr:
+ *
+ * A libxml progressive regular expression evaluation context
+ */
+typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
+typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
+
+/*
+ * The POSIX like API
+ */
+XMLPUBFUN xmlRegexpPtr
+ xmlRegexpCompile (const xmlChar *regexp);
+XMLPUBFUN void xmlRegFreeRegexp(xmlRegexpPtr regexp);
+XMLPUBFUN int
+ xmlRegexpExec (xmlRegexpPtr comp,
+ const xmlChar *value);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlRegexpPrint (FILE *output,
+ xmlRegexpPtr regexp);
+XMLPUBFUN int
+ xmlRegexpIsDeterminist(xmlRegexpPtr comp);
+
+/**
+ * xmlRegExecCallbacks:
+ * @exec: the regular expression context
+ * @token: the current token string
+ * @transdata: transition data
+ * @inputdata: input data
+ *
+ * Callback function when doing a transition in the automata
+ */
+typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
+ const xmlChar *token,
+ void *transdata,
+ void *inputdata);
+
+/*
+ * The progressive API
+ */
+XML_DEPRECATED
+XMLPUBFUN xmlRegExecCtxtPtr
+ xmlRegNewExecCtxt (xmlRegexpPtr comp,
+ xmlRegExecCallbacks callback,
+ void *data);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlRegExecPushString(xmlRegExecCtxtPtr exec,
+ const xmlChar *value,
+ void *data);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
+ const xmlChar *value,
+ const xmlChar *value2,
+ void *data);
+
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
+ int *nbval,
+ int *nbneg,
+ xmlChar **values,
+ int *terminal);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
+ const xmlChar **string,
+ int *nbval,
+ int *nbneg,
+ xmlChar **values,
+ int *terminal);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_REGEXP_ENABLED */
+
+#endif /*__XML_REGEXP_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlsave.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlsave.h
new file mode 100644
index 0000000000000000000000000000000000000000..91d6ef9f2a0e5c1816b72810fb94cc474f789d40
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlsave.h
@@ -0,0 +1,111 @@
+/*
+ * Summary: the XML document serializer
+ * Description: API to save document or subtree of document
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XMLSAVE_H__
+#define __XML_XMLSAVE_H__
+
+#include
+#include
+#include
+#include
+
+#ifdef LIBXML_OUTPUT_ENABLED
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlSaveOption:
+ *
+ * This is the set of XML save options that can be passed down
+ * to the xmlSaveToFd() and similar calls.
+ */
+typedef enum {
+ XML_SAVE_FORMAT = 1<<0, /* format save output */
+ XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */
+ XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */
+ XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */
+ XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */
+ XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */
+ XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */
+ XML_SAVE_WSNONSIG = 1<<7, /* format with non-significant whitespace */
+ /* Available since 2.14.0 */
+ XML_SAVE_EMPTY = 1<<8, /* force empty tags, overriding global */
+ XML_SAVE_NO_INDENT = 1<<9, /* disable indenting */
+ XML_SAVE_INDENT = 1<<10 /* force indenting, overriding global */
+} xmlSaveOption;
+
+
+typedef struct _xmlSaveCtxt xmlSaveCtxt;
+typedef xmlSaveCtxt *xmlSaveCtxtPtr;
+
+XMLPUBFUN xmlSaveCtxtPtr
+ xmlSaveToFd (int fd,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlSaveCtxtPtr
+ xmlSaveToFilename (const char *filename,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN xmlSaveCtxtPtr
+ xmlSaveToBuffer (xmlBufferPtr buffer,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN xmlSaveCtxtPtr
+ xmlSaveToIO (xmlOutputWriteCallback iowrite,
+ xmlOutputCloseCallback ioclose,
+ void *ioctx,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN long
+ xmlSaveDoc (xmlSaveCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN long
+ xmlSaveTree (xmlSaveCtxtPtr ctxt,
+ xmlNodePtr node);
+
+XMLPUBFUN int
+ xmlSaveFlush (xmlSaveCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlSaveClose (xmlSaveCtxtPtr ctxt);
+XMLPUBFUN xmlParserErrors
+ xmlSaveFinish (xmlSaveCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlSaveSetIndentString (xmlSaveCtxtPtr ctxt,
+ const char *indent);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
+ xmlCharEncodingOutputFunc escape);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
+ xmlCharEncodingOutputFunc escape);
+
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlThrDefIndentTreeOutput(int v);
+XML_DEPRECATED
+XMLPUBFUN const char *
+ xmlThrDefTreeIndentString(const char * v);
+XML_DEPRECATED
+XMLPUBFUN int
+ xmlThrDefSaveNoEmptyTags(int v);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+#endif /* __XML_XMLSAVE_H__ */
+
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlschemas.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlschemas.h
new file mode 100644
index 0000000000000000000000000000000000000000..78073cd28cf2ce3247403d6bc696b5041adf2ca1
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlschemas.h
@@ -0,0 +1,254 @@
+/*
+ * Summary: incomplete XML Schemas structure implementation
+ * Description: interface to the XML Schemas handling and schema validity
+ * checking, it is incomplete right now.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMA_H__
+#define __XML_SCHEMA_H__
+
+#include
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * This error codes are obsolete; not used any more.
+ */
+typedef enum {
+ XML_SCHEMAS_ERR_OK = 0,
+ XML_SCHEMAS_ERR_NOROOT = 1,
+ XML_SCHEMAS_ERR_UNDECLAREDELEM,
+ XML_SCHEMAS_ERR_NOTTOPLEVEL,
+ XML_SCHEMAS_ERR_MISSING,
+ XML_SCHEMAS_ERR_WRONGELEM,
+ XML_SCHEMAS_ERR_NOTYPE,
+ XML_SCHEMAS_ERR_NOROLLBACK,
+ XML_SCHEMAS_ERR_ISABSTRACT,
+ XML_SCHEMAS_ERR_NOTEMPTY,
+ XML_SCHEMAS_ERR_ELEMCONT,
+ XML_SCHEMAS_ERR_HAVEDEFAULT,
+ XML_SCHEMAS_ERR_NOTNILLABLE,
+ XML_SCHEMAS_ERR_EXTRACONTENT,
+ XML_SCHEMAS_ERR_INVALIDATTR,
+ XML_SCHEMAS_ERR_INVALIDELEM,
+ XML_SCHEMAS_ERR_NOTDETERMINIST,
+ XML_SCHEMAS_ERR_CONSTRUCT,
+ XML_SCHEMAS_ERR_INTERNAL,
+ XML_SCHEMAS_ERR_NOTSIMPLE,
+ XML_SCHEMAS_ERR_ATTRUNKNOWN,
+ XML_SCHEMAS_ERR_ATTRINVALID,
+ XML_SCHEMAS_ERR_VALUE,
+ XML_SCHEMAS_ERR_FACET,
+ XML_SCHEMAS_ERR_,
+ XML_SCHEMAS_ERR_XXX
+} xmlSchemaValidError;
+
+/*
+* ATTENTION: Change xmlSchemaSetValidOptions's check
+* for invalid values, if adding to the validation
+* options below.
+*/
+/**
+ * xmlSchemaValidOption:
+ *
+ * This is the set of XML Schema validation options.
+ */
+typedef enum {
+ XML_SCHEMA_VAL_VC_I_CREATE = 1<<0
+ /* Default/fixed: create an attribute node
+ * or an element's text node on the instance.
+ */
+} xmlSchemaValidOption;
+
+/*
+ XML_SCHEMA_VAL_XSI_ASSEMBLE = 1<<1,
+ * assemble schemata using
+ * xsi:schemaLocation and
+ * xsi:noNamespaceSchemaLocation
+*/
+
+/**
+ * The schemas related types are kept internal
+ */
+typedef struct _xmlSchema xmlSchema;
+typedef xmlSchema *xmlSchemaPtr;
+
+/**
+ * xmlSchemaValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from an XSD validation
+ */
+typedef void (*xmlSchemaValidityErrorFunc)
+ (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * xmlSchemaValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from an XSD validation
+ */
+typedef void (*xmlSchemaValidityWarningFunc)
+ (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * A schemas validation context
+ */
+typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
+typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
+
+typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
+typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
+
+/**
+ * xmlSchemaValidityLocatorFunc:
+ * @ctx: user provided context
+ * @file: returned file information
+ * @line: returned line information
+ *
+ * A schemas validation locator, a callback called by the validator.
+ * This is used when file or node information are not available
+ * to find out what file and line number are affected
+ *
+ * Returns: 0 in case of success and -1 in case of error
+ */
+
+typedef int (*xmlSchemaValidityLocatorFunc) (void *ctx,
+ const char **file, unsigned long *line);
+
+/*
+ * Interfaces for parsing.
+ */
+XMLPUBFUN xmlSchemaParserCtxtPtr
+ xmlSchemaNewParserCtxt (const char *URL);
+XMLPUBFUN xmlSchemaParserCtxtPtr
+ xmlSchemaNewMemParserCtxt (const char *buffer,
+ int size);
+XMLPUBFUN xmlSchemaParserCtxtPtr
+ xmlSchemaNewDocParserCtxt (xmlDocPtr doc);
+XMLPUBFUN void
+ xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc err,
+ xmlSchemaValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN void
+ xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+XMLPUBFUN int
+ xmlSchemaGetParserErrors (xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc * err,
+ xmlSchemaValidityWarningFunc * warn,
+ void **ctx);
+XMLPUBFUN void
+ xmlSchemaSetResourceLoader (xmlSchemaParserCtxtPtr ctxt,
+ xmlResourceLoader loader,
+ void *data);
+XMLPUBFUN int
+ xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
+
+XMLPUBFUN xmlSchemaPtr
+ xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
+XMLPUBFUN void
+ xmlSchemaFree (xmlSchemaPtr schema);
+#ifdef LIBXML_DEBUG_ENABLED
+XMLPUBFUN void
+ xmlSchemaDump (FILE *output,
+ xmlSchemaPtr schema);
+#endif /* LIBXML_DEBUG_ENABLED */
+/*
+ * Interfaces for validating
+ */
+XMLPUBFUN void
+ xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc err,
+ xmlSchemaValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN void
+ xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+XMLPUBFUN int
+ xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc *err,
+ xmlSchemaValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN int
+ xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
+ int options);
+XMLPUBFUN void
+ xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt,
+ const char *filename);
+XMLPUBFUN int
+ xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
+
+XMLPUBFUN xmlSchemaValidCtxtPtr
+ xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
+XMLPUBFUN void
+ xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);
+XMLPUBFUN int
+ xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
+ xmlDocPtr instance);
+XMLPUBFUN int
+ xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
+ xmlNodePtr elem);
+XMLPUBFUN int
+ xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
+ xmlParserInputBufferPtr input,
+ xmlCharEncoding enc,
+ const xmlSAXHandler *sax,
+ void *user_data);
+XMLPUBFUN int
+ xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
+ const char * filename,
+ int options);
+
+XMLPUBFUN xmlParserCtxtPtr
+ xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
+
+/*
+ * Interface to insert Schemas SAX validation in a SAX stream
+ */
+typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
+typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
+
+XMLPUBFUN xmlSchemaSAXPlugPtr
+ xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
+ xmlSAXHandlerPtr *sax,
+ void **user_data);
+XMLPUBFUN int
+ xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug);
+
+
+XMLPUBFUN void
+ xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt,
+ xmlSchemaValidityLocatorFunc f,
+ void *ctxt);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+#endif /* __XML_SCHEMA_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlschemastypes.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlschemastypes.h
new file mode 100644
index 0000000000000000000000000000000000000000..e2cde35707c5d14f4bdab4d0a6750719d52edda6
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlschemastypes.h
@@ -0,0 +1,152 @@
+/*
+ * Summary: implementation of XML Schema Datatypes
+ * Description: module providing the XML Schema Datatypes implementation
+ * both definition and validity checking
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMA_TYPES_H__
+#define __XML_SCHEMA_TYPES_H__
+
+#include
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ XML_SCHEMA_WHITESPACE_UNKNOWN = 0,
+ XML_SCHEMA_WHITESPACE_PRESERVE = 1,
+ XML_SCHEMA_WHITESPACE_REPLACE = 2,
+ XML_SCHEMA_WHITESPACE_COLLAPSE = 3
+} xmlSchemaWhitespaceValueType;
+
+XMLPUBFUN int
+ xmlSchemaInitTypes (void);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlSchemaCleanupTypes (void);
+XMLPUBFUN xmlSchemaTypePtr
+ xmlSchemaGetPredefinedType (const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN int
+ xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *val);
+XMLPUBFUN int
+ xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *val,
+ xmlNodePtr node);
+XMLPUBFUN int
+ xmlSchemaValidateFacet (xmlSchemaTypePtr base,
+ xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ xmlSchemaValPtr val);
+XMLPUBFUN int
+ xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
+ xmlSchemaWhitespaceValueType fws,
+ xmlSchemaValType valType,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ xmlSchemaWhitespaceValueType ws);
+XMLPUBFUN void
+ xmlSchemaFreeValue (xmlSchemaValPtr val);
+XMLPUBFUN xmlSchemaFacetPtr
+ xmlSchemaNewFacet (void);
+XMLPUBFUN int
+ xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
+ xmlSchemaTypePtr typeDecl,
+ xmlSchemaParserCtxtPtr ctxt,
+ const xmlChar *name);
+XMLPUBFUN void
+ xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
+XMLPUBFUN int
+ xmlSchemaCompareValues (xmlSchemaValPtr x,
+ xmlSchemaValPtr y);
+XMLPUBFUN xmlSchemaTypePtr
+ xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
+XMLPUBFUN int
+ xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ unsigned long actualLen,
+ unsigned long *expectedLen);
+XMLPUBFUN xmlSchemaTypePtr
+ xmlSchemaGetBuiltInType (xmlSchemaValType type);
+XMLPUBFUN int
+ xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
+ int facetType);
+XMLPUBFUN xmlChar *
+ xmlSchemaCollapseString (const xmlChar *value);
+XMLPUBFUN xmlChar *
+ xmlSchemaWhiteSpaceReplace (const xmlChar *value);
+XMLPUBFUN unsigned long
+ xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
+XMLPUBFUN int
+ xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
+ xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ unsigned long *length);
+XMLPUBFUN int
+ xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
+ xmlSchemaValType valType,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ unsigned long *length,
+ xmlSchemaWhitespaceValueType ws);
+XMLPUBFUN int
+ xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *val,
+ xmlNodePtr node);
+XMLPUBFUN int
+ xmlSchemaGetCanonValue (xmlSchemaValPtr val,
+ const xmlChar **retValue);
+XMLPUBFUN int
+ xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
+ const xmlChar **retValue,
+ xmlSchemaWhitespaceValueType ws);
+XMLPUBFUN int
+ xmlSchemaValueAppend (xmlSchemaValPtr prev,
+ xmlSchemaValPtr cur);
+XMLPUBFUN xmlSchemaValPtr
+ xmlSchemaValueGetNext (xmlSchemaValPtr cur);
+XMLPUBFUN const xmlChar *
+ xmlSchemaValueGetAsString (xmlSchemaValPtr val);
+XMLPUBFUN int
+ xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
+XMLPUBFUN xmlSchemaValPtr
+ xmlSchemaNewStringValue (xmlSchemaValType type,
+ const xmlChar *value);
+XMLPUBFUN xmlSchemaValPtr
+ xmlSchemaNewNOTATIONValue (const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN xmlSchemaValPtr
+ xmlSchemaNewQNameValue (const xmlChar *namespaceName,
+ const xmlChar *localName);
+XMLPUBFUN int
+ xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
+ xmlSchemaWhitespaceValueType xws,
+ xmlSchemaValPtr y,
+ xmlSchemaWhitespaceValueType yws);
+XMLPUBFUN xmlSchemaValPtr
+ xmlSchemaCopyValue (xmlSchemaValPtr val);
+XMLPUBFUN xmlSchemaValType
+ xmlSchemaGetValType (xmlSchemaValPtr val);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+#endif /* __XML_SCHEMA_TYPES_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlstring.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlstring.h
new file mode 100644
index 0000000000000000000000000000000000000000..db11a0b0e50482acf67efd6b9c7ca03879648d45
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlstring.h
@@ -0,0 +1,140 @@
+/*
+ * Summary: set of routines to process strings
+ * Description: type and interfaces needed for the internal string handling
+ * of the library, especially UTF8 processing.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_STRING_H__
+#define __XML_STRING_H__
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlChar:
+ *
+ * This is a basic byte in an UTF-8 encoded string.
+ * It's unsigned allowing to pinpoint case where char * are assigned
+ * to xmlChar * (possibly making serialization back impossible).
+ */
+typedef unsigned char xmlChar;
+
+/**
+ * BAD_CAST:
+ *
+ * Macro to cast a string to an xmlChar * when one know its safe.
+ */
+#define BAD_CAST (xmlChar *)
+
+/*
+ * xmlChar handling
+ */
+XMLPUBFUN xmlChar *
+ xmlStrdup (const xmlChar *cur);
+XMLPUBFUN xmlChar *
+ xmlStrndup (const xmlChar *cur,
+ int len);
+XMLPUBFUN xmlChar *
+ xmlCharStrndup (const char *cur,
+ int len);
+XMLPUBFUN xmlChar *
+ xmlCharStrdup (const char *cur);
+XMLPUBFUN xmlChar *
+ xmlStrsub (const xmlChar *str,
+ int start,
+ int len);
+XMLPUBFUN const xmlChar *
+ xmlStrchr (const xmlChar *str,
+ xmlChar val);
+XMLPUBFUN const xmlChar *
+ xmlStrstr (const xmlChar *str,
+ const xmlChar *val);
+XMLPUBFUN const xmlChar *
+ xmlStrcasestr (const xmlChar *str,
+ const xmlChar *val);
+XMLPUBFUN int
+ xmlStrcmp (const xmlChar *str1,
+ const xmlChar *str2);
+XMLPUBFUN int
+ xmlStrncmp (const xmlChar *str1,
+ const xmlChar *str2,
+ int len);
+XMLPUBFUN int
+ xmlStrcasecmp (const xmlChar *str1,
+ const xmlChar *str2);
+XMLPUBFUN int
+ xmlStrncasecmp (const xmlChar *str1,
+ const xmlChar *str2,
+ int len);
+XMLPUBFUN int
+ xmlStrEqual (const xmlChar *str1,
+ const xmlChar *str2);
+XMLPUBFUN int
+ xmlStrQEqual (const xmlChar *pref,
+ const xmlChar *name,
+ const xmlChar *str);
+XMLPUBFUN int
+ xmlStrlen (const xmlChar *str);
+XMLPUBFUN xmlChar *
+ xmlStrcat (xmlChar *cur,
+ const xmlChar *add);
+XMLPUBFUN xmlChar *
+ xmlStrncat (xmlChar *cur,
+ const xmlChar *add,
+ int len);
+XMLPUBFUN xmlChar *
+ xmlStrncatNew (const xmlChar *str1,
+ const xmlChar *str2,
+ int len);
+XMLPUBFUN int
+ xmlStrPrintf (xmlChar *buf,
+ int len,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(3,4);
+XMLPUBFUN int
+ xmlStrVPrintf (xmlChar *buf,
+ int len,
+ const char *msg,
+ va_list ap) LIBXML_ATTR_FORMAT(3,0);
+
+XMLPUBFUN int
+ xmlGetUTF8Char (const unsigned char *utf,
+ int *len);
+XMLPUBFUN int
+ xmlCheckUTF8 (const unsigned char *utf);
+XMLPUBFUN int
+ xmlUTF8Strsize (const xmlChar *utf,
+ int len);
+XMLPUBFUN xmlChar *
+ xmlUTF8Strndup (const xmlChar *utf,
+ int len);
+XMLPUBFUN const xmlChar *
+ xmlUTF8Strpos (const xmlChar *utf,
+ int pos);
+XMLPUBFUN int
+ xmlUTF8Strloc (const xmlChar *utf,
+ const xmlChar *utfchar);
+XMLPUBFUN xmlChar *
+ xmlUTF8Strsub (const xmlChar *utf,
+ int start,
+ int len);
+XMLPUBFUN int
+ xmlUTF8Strlen (const xmlChar *utf);
+XMLPUBFUN int
+ xmlUTF8Size (const xmlChar *utf);
+XMLPUBFUN int
+ xmlUTF8Charcmp (const xmlChar *utf1,
+ const xmlChar *utf2);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_STRING_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlunicode.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlunicode.h
new file mode 100644
index 0000000000000000000000000000000000000000..efda81b2b91b68dd4f5039c93fda0ff90d4fd588
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlunicode.h
@@ -0,0 +1,15 @@
+/*
+ * Summary: Unicode character APIs
+ * Description: API for the Unicode character APIs
+ *
+ * Deprecated, don't use.
+ */
+
+#ifndef __XML_UNICODE_H__
+#define __XML_UNICODE_H__
+
+#ifdef __GNUC__
+ #warning "libxml/xmlunicode.h is deprecated"
+#endif
+
+#endif /* __XML_UNICODE_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlversion.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlversion.h
new file mode 100644
index 0000000000000000000000000000000000000000..daac534c48d259060bff33e80c523f43ef7f8c12
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlversion.h
@@ -0,0 +1,332 @@
+/*
+ * Summary: compile-time version information
+ * Description: compile-time version information for the XML library
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_VERSION_H__
+#define __XML_VERSION_H__
+
+/**
+ * LIBXML_DOTTED_VERSION:
+ *
+ * the version string like "1.2.3"
+ */
+#define LIBXML_DOTTED_VERSION "2.14.5"
+
+/**
+ * LIBXML_VERSION:
+ *
+ * the version number: 1.2.3 value is 10203
+ */
+#define LIBXML_VERSION 21405
+
+/**
+ * LIBXML_VERSION_STRING:
+ *
+ * the version number string, 1.2.3 value is "10203"
+ */
+#define LIBXML_VERSION_STRING "21405"
+
+/**
+ * LIBXML_VERSION_EXTRA:
+ *
+ * extra version information, used to show a git commit description
+ */
+#define LIBXML_VERSION_EXTRA ""
+
+/**
+ * LIBXML_TEST_VERSION:
+ *
+ * Macro to check that the libxml version in use is compatible with
+ * the version the software has been compiled against
+ */
+#define LIBXML_TEST_VERSION xmlCheckVersion(21405);
+
+/**
+ * LIBXML_THREAD_ENABLED:
+ *
+ * Whether the thread support is configured in
+ */
+#if 1
+#define LIBXML_THREAD_ENABLED
+#endif
+
+/**
+ * LIBXML_THREAD_ALLOC_ENABLED:
+ *
+ * Whether the allocation hooks are per-thread
+ */
+#if 0
+#define LIBXML_THREAD_ALLOC_ENABLED
+#endif
+
+/**
+ * LIBXML_TREE_ENABLED:
+ *
+ * Always enabled since 2.14.0
+ */
+#define LIBXML_TREE_ENABLED
+
+/**
+ * LIBXML_OUTPUT_ENABLED:
+ *
+ * Whether the serialization/saving support is configured in
+ */
+#if 1
+#define LIBXML_OUTPUT_ENABLED
+#endif
+
+/**
+ * LIBXML_PUSH_ENABLED:
+ *
+ * Whether the push parsing interfaces are configured in
+ */
+#if 1
+#define LIBXML_PUSH_ENABLED
+#endif
+
+/**
+ * LIBXML_READER_ENABLED:
+ *
+ * Whether the xmlReader parsing interface is configured in
+ */
+#if 1
+#define LIBXML_READER_ENABLED
+#endif
+
+/**
+ * LIBXML_PATTERN_ENABLED:
+ *
+ * Whether the xmlPattern node selection interface is configured in
+ */
+#if 1
+#define LIBXML_PATTERN_ENABLED
+#endif
+
+/**
+ * LIBXML_WRITER_ENABLED:
+ *
+ * Whether the xmlWriter saving interface is configured in
+ */
+#if 1
+#define LIBXML_WRITER_ENABLED
+#endif
+
+/**
+ * LIBXML_SAX1_ENABLED:
+ *
+ * Whether the older SAX1 interface is configured in
+ */
+#if 1
+#define LIBXML_SAX1_ENABLED
+#endif
+
+/**
+ * LIBXML_HTTP_ENABLED:
+ *
+ * Whether the HTTP support is configured in
+ */
+#if 0
+#define LIBXML_HTTP_ENABLED
+#endif
+
+/**
+ * LIBXML_VALID_ENABLED:
+ *
+ * Whether the DTD validation support is configured in
+ */
+#if 1
+#define LIBXML_VALID_ENABLED
+#endif
+
+/**
+ * LIBXML_HTML_ENABLED:
+ *
+ * Whether the HTML support is configured in
+ */
+#if 1
+#define LIBXML_HTML_ENABLED
+#endif
+
+/**
+ * LIBXML_LEGACY_ENABLED:
+ *
+ * Removed in 2.14
+ */
+#undef LIBXML_LEGACY_ENABLED
+
+/**
+ * LIBXML_C14N_ENABLED:
+ *
+ * Whether the Canonicalization support is configured in
+ */
+#if 1
+#define LIBXML_C14N_ENABLED
+#endif
+
+/**
+ * LIBXML_CATALOG_ENABLED:
+ *
+ * Whether the Catalog support is configured in
+ */
+#if 1
+#define LIBXML_CATALOG_ENABLED
+#endif
+
+/**
+ * LIBXML_XPATH_ENABLED:
+ *
+ * Whether XPath is configured in
+ */
+#if 1
+#define LIBXML_XPATH_ENABLED
+#endif
+
+/**
+ * LIBXML_XPTR_ENABLED:
+ *
+ * Whether XPointer is configured in
+ */
+#if 1
+#define LIBXML_XPTR_ENABLED
+#endif
+
+/**
+ * LIBXML_XINCLUDE_ENABLED:
+ *
+ * Whether XInclude is configured in
+ */
+#if 1
+#define LIBXML_XINCLUDE_ENABLED
+#endif
+
+/**
+ * LIBXML_ICONV_ENABLED:
+ *
+ * Whether iconv support is available
+ */
+#if 1
+#define LIBXML_ICONV_ENABLED
+#endif
+
+/**
+ * LIBXML_ICU_ENABLED:
+ *
+ * Whether icu support is available
+ */
+#if 0
+#define LIBXML_ICU_ENABLED
+#endif
+
+/**
+ * LIBXML_ISO8859X_ENABLED:
+ *
+ * Whether ISO-8859-* support is made available in case iconv is not
+ */
+#if 1
+#define LIBXML_ISO8859X_ENABLED
+#endif
+
+/**
+ * LIBXML_DEBUG_ENABLED:
+ *
+ * Whether Debugging module is configured in
+ */
+#if 1
+#define LIBXML_DEBUG_ENABLED
+#endif
+
+/**
+ * LIBXML_UNICODE_ENABLED:
+ *
+ * Removed in 2.14
+ */
+#undef LIBXML_UNICODE_ENABLED
+
+/**
+ * LIBXML_REGEXP_ENABLED:
+ *
+ * Whether the regular expressions interfaces are compiled in
+ */
+#if 1
+#define LIBXML_REGEXP_ENABLED
+#endif
+
+/**
+ * LIBXML_AUTOMATA_ENABLED:
+ *
+ * Whether the automata interfaces are compiled in
+ */
+#if 1
+#define LIBXML_AUTOMATA_ENABLED
+#endif
+
+/**
+ * LIBXML_RELAXNG_ENABLED:
+ *
+ * Whether the RelaxNG validation interfaces are compiled in
+ */
+#if 1
+#define LIBXML_RELAXNG_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMAS_ENABLED:
+ *
+ * Whether the Schemas validation interfaces are compiled in
+ */
+#if 1
+#define LIBXML_SCHEMAS_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMATRON_ENABLED:
+ *
+ * Whether the Schematron validation interfaces are compiled in
+ */
+#if 1
+#define LIBXML_SCHEMATRON_ENABLED
+#endif
+
+/**
+ * LIBXML_MODULES_ENABLED:
+ *
+ * Whether the module interfaces are compiled in
+ */
+#if 1
+#define LIBXML_MODULES_ENABLED
+/**
+ * LIBXML_MODULE_EXTENSION:
+ *
+ * the string suffix used by dynamic modules (usually shared libraries)
+ */
+#define LIBXML_MODULE_EXTENSION ".so"
+#endif
+
+/**
+ * LIBXML_ZLIB_ENABLED:
+ *
+ * Whether the Zlib support is compiled in
+ */
+#if 1
+#define LIBXML_ZLIB_ENABLED
+#endif
+
+/**
+ * LIBXML_LZMA_ENABLED:
+ *
+ * Whether the Lzma support is compiled in
+ */
+#if 0
+#define LIBXML_LZMA_ENABLED
+#endif
+
+#include
+
+#endif
+
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlwriter.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlwriter.h
new file mode 100644
index 0000000000000000000000000000000000000000..55f88bc71f0c55d0d162a398bc5300dc87290f1b
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xmlwriter.h
@@ -0,0 +1,489 @@
+/*
+ * Summary: text writing API for XML
+ * Description: text writing API for XML
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Alfred Mickautsch
+ */
+
+#ifndef __XML_XMLWRITER_H__
+#define __XML_XMLWRITER_H__
+
+#include
+
+#ifdef LIBXML_WRITER_ENABLED
+
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ typedef struct _xmlTextWriter xmlTextWriter;
+ typedef xmlTextWriter *xmlTextWriterPtr;
+
+/*
+ * Constructors & Destructor
+ */
+ XMLPUBFUN xmlTextWriterPtr
+ xmlNewTextWriter(xmlOutputBufferPtr out);
+ XMLPUBFUN xmlTextWriterPtr
+ xmlNewTextWriterFilename(const char *uri, int compression);
+ XMLPUBFUN xmlTextWriterPtr
+ xmlNewTextWriterMemory(xmlBufferPtr buf, int compression);
+ XMLPUBFUN xmlTextWriterPtr
+ xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, int compression);
+ XMLPUBFUN xmlTextWriterPtr
+ xmlNewTextWriterDoc(xmlDocPtr * doc, int compression);
+ XMLPUBFUN xmlTextWriterPtr
+ xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node,
+ int compression);
+ XMLPUBFUN void xmlFreeTextWriter(xmlTextWriterPtr writer);
+
+/*
+ * Functions
+ */
+
+
+/*
+ * Document
+ */
+ XMLPUBFUN int
+ xmlTextWriterStartDocument(xmlTextWriterPtr writer,
+ const char *version,
+ const char *encoding,
+ const char *standalone);
+ XMLPUBFUN int xmlTextWriterEndDocument(xmlTextWriterPtr
+ writer);
+
+/*
+ * Comments
+ */
+ XMLPUBFUN int xmlTextWriterStartComment(xmlTextWriterPtr
+ writer);
+ XMLPUBFUN int xmlTextWriterEndComment(xmlTextWriterPtr writer);
+ XMLPUBFUN int
+ xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int
+ xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int xmlTextWriterWriteComment(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ content);
+
+/*
+ * Elements
+ */
+ XMLPUBFUN int
+ xmlTextWriterStartElement(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int xmlTextWriterStartElementNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar * name,
+ const xmlChar *
+ namespaceURI);
+ XMLPUBFUN int xmlTextWriterEndElement(xmlTextWriterPtr writer);
+ XMLPUBFUN int xmlTextWriterFullEndElement(xmlTextWriterPtr
+ writer);
+
+/*
+ * Elements conveniency functions
+ */
+ XMLPUBFUN int
+ xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int
+ xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int xmlTextWriterWriteElement(xmlTextWriterPtr
+ writer,
+ const xmlChar * name,
+ const xmlChar *
+ content);
+ XMLPUBFUN int
+ xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int
+ xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int xmlTextWriterWriteElementNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar * name,
+ const xmlChar *
+ namespaceURI,
+ const xmlChar *
+ content);
+
+/*
+ * Text
+ */
+ XMLPUBFUN int
+ xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int
+ xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int
+ xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
+ const xmlChar * content, int len);
+ XMLPUBFUN int
+ xmlTextWriterWriteRaw(xmlTextWriterPtr writer,
+ const xmlChar * content);
+ XMLPUBFUN int xmlTextWriterWriteFormatString(xmlTextWriterPtr
+ writer,
+ const char
+ *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int xmlTextWriterWriteVFormatString(xmlTextWriterPtr
+ writer,
+ const char
+ *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int xmlTextWriterWriteString(xmlTextWriterPtr writer,
+ const xmlChar *
+ content);
+ XMLPUBFUN int xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
+ const char *data,
+ int start, int len);
+ XMLPUBFUN int xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
+ const char *data,
+ int start, int len);
+
+/*
+ * Attributes
+ */
+ XMLPUBFUN int
+ xmlTextWriterStartAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int xmlTextWriterStartAttributeNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar *
+ name,
+ const xmlChar *
+ namespaceURI);
+ XMLPUBFUN int xmlTextWriterEndAttribute(xmlTextWriterPtr
+ writer);
+
+/*
+ * Attributes conveniency functions
+ */
+ XMLPUBFUN int
+ xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int
+ xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int xmlTextWriterWriteAttribute(xmlTextWriterPtr
+ writer,
+ const xmlChar * name,
+ const xmlChar *
+ content);
+ XMLPUBFUN int
+ xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int
+ xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar *
+ name,
+ const xmlChar *
+ namespaceURI,
+ const xmlChar *
+ content);
+
+/*
+ * PI's
+ */
+ XMLPUBFUN int
+ xmlTextWriterStartPI(xmlTextWriterPtr writer,
+ const xmlChar * target);
+ XMLPUBFUN int xmlTextWriterEndPI(xmlTextWriterPtr writer);
+
+/*
+ * PI conveniency functions
+ */
+ XMLPUBFUN int
+ xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int
+ xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int
+ xmlTextWriterWritePI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const xmlChar * content);
+
+/**
+ * xmlTextWriterWriteProcessingInstruction:
+ *
+ * This macro maps to xmlTextWriterWritePI
+ */
+#define xmlTextWriterWriteProcessingInstruction xmlTextWriterWritePI
+
+/*
+ * CDATA
+ */
+ XMLPUBFUN int xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
+ XMLPUBFUN int xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
+
+/*
+ * CDATA conveniency functions
+ */
+ XMLPUBFUN int
+ xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int
+ xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int
+ xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
+ const xmlChar * content);
+
+/*
+ * DTD
+ */
+ XMLPUBFUN int
+ xmlTextWriterStartDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid);
+ XMLPUBFUN int xmlTextWriterEndDTD(xmlTextWriterPtr writer);
+
+/*
+ * DTD conveniency functions
+ */
+ XMLPUBFUN int
+ xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int
+ xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int
+ xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar * subset);
+
+/**
+ * xmlTextWriterWriteDocType:
+ *
+ * this macro maps to xmlTextWriterWriteDTD
+ */
+#define xmlTextWriterWriteDocType xmlTextWriterWriteDTD
+
+/*
+ * DTD element definition
+ */
+ XMLPUBFUN int
+ xmlTextWriterStartDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int xmlTextWriterEndDTDElement(xmlTextWriterPtr
+ writer);
+
+/*
+ * DTD element definition conveniency functions
+ */
+ XMLPUBFUN int
+ xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int
+ xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int xmlTextWriterWriteDTDElement(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ name,
+ const xmlChar *
+ content);
+
+/*
+ * DTD attribute list definition
+ */
+ XMLPUBFUN int
+ xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
+ writer);
+
+/*
+ * DTD attribute list definition conveniency functions
+ */
+ XMLPUBFUN int
+ xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int
+ xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ name,
+ const xmlChar *
+ content);
+
+/*
+ * DTD entity definition
+ */
+ XMLPUBFUN int
+ xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
+ int pe, const xmlChar * name);
+ XMLPUBFUN int xmlTextWriterEndDTDEntity(xmlTextWriterPtr
+ writer);
+
+/*
+ * DTD entity definition conveniency functions
+ */
+ XMLPUBFUN int
+ xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(4,5);
+ XMLPUBFUN int
+ xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(4,0);
+ XMLPUBFUN int
+ xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const xmlChar * content);
+ XMLPUBFUN int
+ xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar * ndataid);
+ XMLPUBFUN int
+ xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr
+ writer,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar *
+ ndataid);
+ XMLPUBFUN int xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
+ writer, int pe,
+ const xmlChar * name,
+ const xmlChar *
+ pubid,
+ const xmlChar *
+ sysid,
+ const xmlChar *
+ ndataid,
+ const xmlChar *
+ content);
+
+/*
+ * DTD notation definition
+ */
+ XMLPUBFUN int
+ xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid);
+
+/*
+ * Indentation
+ */
+ XMLPUBFUN int
+ xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent);
+ XMLPUBFUN int
+ xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
+ const xmlChar * str);
+
+ XMLPUBFUN int
+ xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar);
+
+
+/*
+ * misc
+ */
+ XMLPUBFUN int xmlTextWriterFlush(xmlTextWriterPtr writer);
+ XMLPUBFUN int xmlTextWriterClose(xmlTextWriterPtr writer);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_WRITER_ENABLED */
+
+#endif /* __XML_XMLWRITER_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xpath.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xpath.h
new file mode 100644
index 0000000000000000000000000000000000000000..e03e97df3d246dea2aa3936d18fd4bcf009673a2
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xpath.h
@@ -0,0 +1,569 @@
+/*
+ * Summary: XML Path Language implementation
+ * Description: API for the XML Path Language implementation
+ *
+ * XML Path Language implementation
+ * XPath is a language for addressing parts of an XML document,
+ * designed to be used by both XSLT and XPointer
+ * http://www.w3.org/TR/xpath
+ *
+ * Implements
+ * W3C Recommendation 16 November 1999
+ * http://www.w3.org/TR/1999/REC-xpath-19991116
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XPATH_H__
+#define __XML_XPATH_H__
+
+#include
+
+#ifdef LIBXML_XPATH_ENABLED
+
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _xmlXPathContext xmlXPathContext;
+typedef xmlXPathContext *xmlXPathContextPtr;
+typedef struct _xmlXPathParserContext xmlXPathParserContext;
+typedef xmlXPathParserContext *xmlXPathParserContextPtr;
+
+/**
+ * The set of XPath error codes.
+ */
+
+typedef enum {
+ XPATH_EXPRESSION_OK = 0,
+ XPATH_NUMBER_ERROR,
+ XPATH_UNFINISHED_LITERAL_ERROR,
+ XPATH_START_LITERAL_ERROR,
+ XPATH_VARIABLE_REF_ERROR,
+ XPATH_UNDEF_VARIABLE_ERROR,
+ XPATH_INVALID_PREDICATE_ERROR,
+ XPATH_EXPR_ERROR,
+ XPATH_UNCLOSED_ERROR,
+ XPATH_UNKNOWN_FUNC_ERROR,
+ XPATH_INVALID_OPERAND,
+ XPATH_INVALID_TYPE,
+ XPATH_INVALID_ARITY,
+ XPATH_INVALID_CTXT_SIZE,
+ XPATH_INVALID_CTXT_POSITION,
+ XPATH_MEMORY_ERROR,
+ XPTR_SYNTAX_ERROR,
+ XPTR_RESOURCE_ERROR,
+ XPTR_SUB_RESOURCE_ERROR,
+ XPATH_UNDEF_PREFIX_ERROR,
+ XPATH_ENCODING_ERROR,
+ XPATH_INVALID_CHAR_ERROR,
+ XPATH_INVALID_CTXT,
+ XPATH_STACK_ERROR,
+ XPATH_FORBID_VARIABLE_ERROR,
+ XPATH_OP_LIMIT_EXCEEDED,
+ XPATH_RECURSION_LIMIT_EXCEEDED
+} xmlXPathError;
+
+/*
+ * A node-set (an unordered collection of nodes without duplicates).
+ */
+typedef struct _xmlNodeSet xmlNodeSet;
+typedef xmlNodeSet *xmlNodeSetPtr;
+struct _xmlNodeSet {
+ int nodeNr; /* number of nodes in the set */
+ int nodeMax; /* size of the array as allocated */
+ xmlNodePtr *nodeTab; /* array of nodes in no particular order */
+ /* @@ with_ns to check whether namespace nodes should be looked at @@ */
+};
+
+/*
+ * An expression is evaluated to yield an object, which
+ * has one of the following four basic types:
+ * - node-set
+ * - boolean
+ * - number
+ * - string
+ *
+ * @@ XPointer will add more types !
+ */
+
+typedef enum {
+ XPATH_UNDEFINED = 0,
+ XPATH_NODESET = 1,
+ XPATH_BOOLEAN = 2,
+ XPATH_NUMBER = 3,
+ XPATH_STRING = 4,
+ XPATH_USERS = 8,
+ XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */
+} xmlXPathObjectType;
+
+/** DOC_DISABLE */
+#define XPATH_POINT 5
+#define XPATH_RANGE 6
+#define XPATH_LOCATIONSET 7
+/** DOC_ENABLE */
+
+typedef struct _xmlXPathObject xmlXPathObject;
+typedef xmlXPathObject *xmlXPathObjectPtr;
+struct _xmlXPathObject {
+ xmlXPathObjectType type;
+ xmlNodeSetPtr nodesetval;
+ int boolval;
+ double floatval;
+ xmlChar *stringval;
+ void *user;
+ int index;
+ void *user2;
+ int index2;
+};
+
+/**
+ * xmlXPathConvertFunc:
+ * @obj: an XPath object
+ * @type: the number of the target type
+ *
+ * A conversion function is associated to a type and used to cast
+ * the new type to primitive values.
+ *
+ * Returns -1 in case of error, 0 otherwise
+ */
+typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type);
+
+/*
+ * Extra type: a name and a conversion function.
+ */
+
+typedef struct _xmlXPathType xmlXPathType;
+typedef xmlXPathType *xmlXPathTypePtr;
+struct _xmlXPathType {
+ const xmlChar *name; /* the type name */
+ xmlXPathConvertFunc func; /* the conversion function */
+};
+
+/*
+ * Extra variable: a name and a value.
+ */
+
+typedef struct _xmlXPathVariable xmlXPathVariable;
+typedef xmlXPathVariable *xmlXPathVariablePtr;
+struct _xmlXPathVariable {
+ const xmlChar *name; /* the variable name */
+ xmlXPathObjectPtr value; /* the value */
+};
+
+/**
+ * xmlXPathEvalFunc:
+ * @ctxt: an XPath parser context
+ * @nargs: the number of arguments passed to the function
+ *
+ * An XPath evaluation function, the parameters are on the XPath context stack.
+ */
+
+typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt,
+ int nargs);
+
+/*
+ * Extra function: a name and a evaluation function.
+ */
+
+typedef struct _xmlXPathFunct xmlXPathFunct;
+typedef xmlXPathFunct *xmlXPathFuncPtr;
+struct _xmlXPathFunct {
+ const xmlChar *name; /* the function name */
+ xmlXPathEvalFunc func; /* the evaluation function */
+};
+
+/**
+ * xmlXPathAxisFunc:
+ * @ctxt: the XPath interpreter context
+ * @cur: the previous node being explored on that axis
+ *
+ * An axis traversal function. To traverse an axis, the engine calls
+ * the first time with cur == NULL and repeat until the function returns
+ * NULL indicating the end of the axis traversal.
+ *
+ * Returns the next node in that axis or NULL if at the end of the axis.
+ */
+
+typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr cur);
+
+/*
+ * Extra axis: a name and an axis function.
+ */
+
+typedef struct _xmlXPathAxis xmlXPathAxis;
+typedef xmlXPathAxis *xmlXPathAxisPtr;
+struct _xmlXPathAxis {
+ const xmlChar *name; /* the axis name */
+ xmlXPathAxisFunc func; /* the search function */
+};
+
+/**
+ * xmlXPathFunction:
+ * @ctxt: the XPath interprestation context
+ * @nargs: the number of arguments
+ *
+ * An XPath function.
+ * The arguments (if any) are popped out from the context stack
+ * and the result is pushed on the stack.
+ */
+
+typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
+
+/*
+ * Function and Variable Lookup.
+ */
+
+/**
+ * xmlXPathVariableLookupFunc:
+ * @ctxt: an XPath context
+ * @name: name of the variable
+ * @ns_uri: the namespace name hosting this variable
+ *
+ * Prototype for callbacks used to plug variable lookup in the XPath
+ * engine.
+ *
+ * Returns the XPath object value or NULL if not found.
+ */
+typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+
+/**
+ * xmlXPathFuncLookupFunc:
+ * @ctxt: an XPath context
+ * @name: name of the function
+ * @ns_uri: the namespace name hosting this function
+ *
+ * Prototype for callbacks used to plug function lookup in the XPath
+ * engine.
+ *
+ * Returns the XPath function or NULL if not found.
+ */
+typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+
+/**
+ * xmlXPathFlags:
+ * Flags for XPath engine compilation and runtime
+ */
+/**
+ * XML_XPATH_CHECKNS:
+ *
+ * check namespaces at compilation
+ */
+#define XML_XPATH_CHECKNS (1<<0)
+/**
+ * XML_XPATH_NOVAR:
+ *
+ * forbid variables in expression
+ */
+#define XML_XPATH_NOVAR (1<<1)
+
+/**
+ * xmlXPathContext:
+ *
+ * Expression evaluation occurs with respect to a context.
+ * he context consists of:
+ * - a node (the context node)
+ * - a node list (the context node list)
+ * - a set of variable bindings
+ * - a function library
+ * - the set of namespace declarations in scope for the expression
+ * Following the switch to hash tables, this need to be trimmed up at
+ * the next binary incompatible release.
+ * The node may be modified when the context is passed to libxml2
+ * for an XPath evaluation so you may need to initialize it again
+ * before the next call.
+ */
+
+struct _xmlXPathContext {
+ xmlDocPtr doc; /* The current document */
+ xmlNodePtr node; /* The current node */
+
+ int nb_variables_unused; /* unused (hash table) */
+ int max_variables_unused; /* unused (hash table) */
+ xmlHashTablePtr varHash; /* Hash table of defined variables */
+
+ int nb_types; /* number of defined types */
+ int max_types; /* max number of types */
+ xmlXPathTypePtr types; /* Array of defined types */
+
+ int nb_funcs_unused; /* unused (hash table) */
+ int max_funcs_unused; /* unused (hash table) */
+ xmlHashTablePtr funcHash; /* Hash table of defined funcs */
+
+ int nb_axis; /* number of defined axis */
+ int max_axis; /* max number of axis */
+ xmlXPathAxisPtr axis; /* Array of defined axis */
+
+ /* the namespace nodes of the context node */
+ xmlNsPtr *namespaces; /* Array of namespaces */
+ int nsNr; /* number of namespace in scope */
+ void *user; /* function to free */
+
+ /* extra variables */
+ int contextSize; /* the context size */
+ int proximityPosition; /* the proximity position */
+
+ /* extra stuff for XPointer */
+ int xptr; /* is this an XPointer context? */
+ xmlNodePtr here; /* for here() */
+ xmlNodePtr origin; /* for origin() */
+
+ /* the set of namespace declarations in scope for the expression */
+ xmlHashTablePtr nsHash; /* The namespaces hash table */
+ xmlXPathVariableLookupFunc varLookupFunc;/* variable lookup func */
+ void *varLookupData; /* variable lookup data */
+
+ /* Possibility to link in an extra item */
+ void *extra; /* needed for XSLT */
+
+ /* The function name and URI when calling a function */
+ const xmlChar *function;
+ const xmlChar *functionURI;
+
+ /* function lookup function and data */
+ xmlXPathFuncLookupFunc funcLookupFunc;/* function lookup func */
+ void *funcLookupData; /* function lookup data */
+
+ /* temporary namespace lists kept for walking the namespace axis */
+ xmlNsPtr *tmpNsList; /* Array of namespaces */
+ int tmpNsNr; /* number of namespaces in scope */
+
+ /* error reporting mechanism */
+ void *userData; /* user specific data block */
+ xmlStructuredErrorFunc error; /* the callback in case of errors */
+ xmlError lastError; /* the last error */
+ xmlNodePtr debugNode; /* the source node XSLT */
+
+ /* dictionary */
+ xmlDictPtr dict; /* dictionary if any */
+
+ int flags; /* flags to control compilation */
+
+ /* Cache for reusal of XPath objects */
+ void *cache;
+
+ /* Resource limits */
+ unsigned long opLimit;
+ unsigned long opCount;
+ int depth;
+};
+
+/*
+ * The structure of a compiled expression form is not public.
+ */
+
+typedef struct _xmlXPathCompExpr xmlXPathCompExpr;
+typedef xmlXPathCompExpr *xmlXPathCompExprPtr;
+
+/**
+ * xmlXPathParserContext:
+ *
+ * An XPath parser context. It contains pure parsing information,
+ * an xmlXPathContext, and the stack of objects.
+ */
+struct _xmlXPathParserContext {
+ const xmlChar *cur; /* the current char being parsed */
+ const xmlChar *base; /* the full expression */
+
+ int error; /* error code */
+
+ xmlXPathContextPtr context; /* the evaluation context */
+ xmlXPathObjectPtr value; /* the current value */
+ int valueNr; /* number of values stacked */
+ int valueMax; /* max number of values stacked */
+ xmlXPathObjectPtr *valueTab; /* stack of values */
+
+ xmlXPathCompExprPtr comp; /* the precompiled expression */
+ int xptr; /* it this an XPointer expression */
+ xmlNodePtr ancestor; /* used for walking preceding axis */
+
+ int valueFrame; /* always zero for compatibility */
+};
+
+/************************************************************************
+ * *
+ * Public API *
+ * *
+ ************************************************************************/
+
+/**
+ * Objects and Nodesets handling
+ */
+
+XML_DEPRECATED
+XMLPUBVAR double xmlXPathNAN;
+XML_DEPRECATED
+XMLPUBVAR double xmlXPathPINF;
+XML_DEPRECATED
+XMLPUBVAR double xmlXPathNINF;
+
+/* These macros may later turn into functions */
+/**
+ * xmlXPathNodeSetGetLength:
+ * @ns: a node-set
+ *
+ * Implement a functionality similar to the DOM NodeList.length.
+ *
+ * Returns the number of nodes in the node-set.
+ */
+#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
+/**
+ * xmlXPathNodeSetItem:
+ * @ns: a node-set
+ * @index: index of a node in the set
+ *
+ * Implements a functionality similar to the DOM NodeList.item().
+ *
+ * Returns the xmlNodePtr at the given @index in @ns or NULL if
+ * @index is out of range (0 to length-1)
+ */
+#define xmlXPathNodeSetItem(ns, index) \
+ ((((ns) != NULL) && \
+ ((index) >= 0) && ((index) < (ns)->nodeNr)) ? \
+ (ns)->nodeTab[(index)] \
+ : NULL)
+/**
+ * xmlXPathNodeSetIsEmpty:
+ * @ns: a node-set
+ *
+ * Checks whether @ns is empty or not.
+ *
+ * Returns %TRUE if @ns is an empty node-set.
+ */
+#define xmlXPathNodeSetIsEmpty(ns) \
+ (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
+
+
+XMLPUBFUN void
+ xmlXPathFreeObject (xmlXPathObjectPtr obj);
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathNodeSetCreate (xmlNodePtr val);
+XMLPUBFUN void
+ xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj);
+XMLPUBFUN void
+ xmlXPathFreeNodeSet (xmlNodeSetPtr obj);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathObjectCopy (xmlXPathObjectPtr val);
+XMLPUBFUN int
+ xmlXPathCmpNodes (xmlNodePtr node1,
+ xmlNodePtr node2);
+/**
+ * Conversion functions to basic types.
+ */
+XMLPUBFUN int
+ xmlXPathCastNumberToBoolean (double val);
+XMLPUBFUN int
+ xmlXPathCastStringToBoolean (const xmlChar * val);
+XMLPUBFUN int
+ xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns);
+XMLPUBFUN int
+ xmlXPathCastToBoolean (xmlXPathObjectPtr val);
+
+XMLPUBFUN double
+ xmlXPathCastBooleanToNumber (int val);
+XMLPUBFUN double
+ xmlXPathCastStringToNumber (const xmlChar * val);
+XMLPUBFUN double
+ xmlXPathCastNodeToNumber (xmlNodePtr node);
+XMLPUBFUN double
+ xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns);
+XMLPUBFUN double
+ xmlXPathCastToNumber (xmlXPathObjectPtr val);
+
+XMLPUBFUN xmlChar *
+ xmlXPathCastBooleanToString (int val);
+XMLPUBFUN xmlChar *
+ xmlXPathCastNumberToString (double val);
+XMLPUBFUN xmlChar *
+ xmlXPathCastNodeToString (xmlNodePtr node);
+XMLPUBFUN xmlChar *
+ xmlXPathCastNodeSetToString (xmlNodeSetPtr ns);
+XMLPUBFUN xmlChar *
+ xmlXPathCastToString (xmlXPathObjectPtr val);
+
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathConvertBoolean (xmlXPathObjectPtr val);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathConvertNumber (xmlXPathObjectPtr val);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathConvertString (xmlXPathObjectPtr val);
+
+/**
+ * Context handling.
+ */
+XMLPUBFUN xmlXPathContextPtr
+ xmlXPathNewContext (xmlDocPtr doc);
+XMLPUBFUN void
+ xmlXPathFreeContext (xmlXPathContextPtr ctxt);
+XMLPUBFUN void
+ xmlXPathSetErrorHandler(xmlXPathContextPtr ctxt,
+ xmlStructuredErrorFunc handler,
+ void *context);
+XMLPUBFUN int
+ xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
+ int active,
+ int value,
+ int options);
+/**
+ * Evaluation functions.
+ */
+XMLPUBFUN long
+ xmlXPathOrderDocElems (xmlDocPtr doc);
+XMLPUBFUN int
+ xmlXPathSetContextNode (xmlNodePtr node,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathNodeEval (xmlNodePtr node,
+ const xmlChar *str,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathEval (const xmlChar *str,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathEvalExpression (const xmlChar *str,
+ xmlXPathContextPtr ctxt);
+XMLPUBFUN int
+ xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
+ xmlXPathObjectPtr res);
+/**
+ * Separate compilation/evaluation entry points.
+ */
+XMLPUBFUN xmlXPathCompExprPtr
+ xmlXPathCompile (const xmlChar *str);
+XMLPUBFUN xmlXPathCompExprPtr
+ xmlXPathCtxtCompile (xmlXPathContextPtr ctxt,
+ const xmlChar *str);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathCompiledEval (xmlXPathCompExprPtr comp,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN int
+ xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
+ xmlXPathContextPtr ctxt);
+XMLPUBFUN void
+ xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
+
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlXPathInit (void);
+XMLPUBFUN int
+ xmlXPathIsNaN (double val);
+XMLPUBFUN int
+ xmlXPathIsInf (double val);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPATH_ENABLED */
+#endif /* ! __XML_XPATH_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xpathInternals.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xpathInternals.h
new file mode 100644
index 0000000000000000000000000000000000000000..88b487af31b0a498dff92c7b5ddc5f60cbba0b36
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xpathInternals.h
@@ -0,0 +1,639 @@
+/*
+ * Summary: internal interfaces for XML Path Language implementation
+ * Description: internal interfaces for XML Path Language implementation
+ * used to build new modules on top of XPath like XPointer and
+ * XSLT
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XPATH_INTERNALS_H__
+#define __XML_XPATH_INTERNALS_H__
+
+#include
+#include
+#include
+
+#ifdef LIBXML_XPATH_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Backward compatibility
+ */
+#define valuePush xmlXPathValuePush
+#define valuePop xmlXPathValuePop
+
+/************************************************************************
+ * *
+ * Helpers *
+ * *
+ ************************************************************************/
+
+/*
+ * Many of these macros may later turn into functions. They
+ * shouldn't be used in #ifdef's preprocessor instructions.
+ */
+/**
+ * xmlXPathSetError:
+ * @ctxt: an XPath parser context
+ * @err: an xmlXPathError code
+ *
+ * Raises an error.
+ */
+#define xmlXPathSetError(ctxt, err) \
+ { xmlXPatherror((ctxt), __FILE__, __LINE__, (err)); \
+ if ((ctxt) != NULL) (ctxt)->error = (err); }
+
+/**
+ * xmlXPathSetArityError:
+ * @ctxt: an XPath parser context
+ *
+ * Raises an XPATH_INVALID_ARITY error.
+ */
+#define xmlXPathSetArityError(ctxt) \
+ xmlXPathSetError((ctxt), XPATH_INVALID_ARITY)
+
+/**
+ * xmlXPathSetTypeError:
+ * @ctxt: an XPath parser context
+ *
+ * Raises an XPATH_INVALID_TYPE error.
+ */
+#define xmlXPathSetTypeError(ctxt) \
+ xmlXPathSetError((ctxt), XPATH_INVALID_TYPE)
+
+/**
+ * xmlXPathGetError:
+ * @ctxt: an XPath parser context
+ *
+ * Get the error code of an XPath context.
+ *
+ * Returns the context error.
+ */
+#define xmlXPathGetError(ctxt) ((ctxt)->error)
+
+/**
+ * xmlXPathCheckError:
+ * @ctxt: an XPath parser context
+ *
+ * Check if an XPath error was raised.
+ *
+ * Returns true if an error has been raised, false otherwise.
+ */
+#define xmlXPathCheckError(ctxt) ((ctxt)->error != XPATH_EXPRESSION_OK)
+
+/**
+ * xmlXPathGetDocument:
+ * @ctxt: an XPath parser context
+ *
+ * Get the document of an XPath context.
+ *
+ * Returns the context document.
+ */
+#define xmlXPathGetDocument(ctxt) ((ctxt)->context->doc)
+
+/**
+ * xmlXPathGetContextNode:
+ * @ctxt: an XPath parser context
+ *
+ * Get the context node of an XPath context.
+ *
+ * Returns the context node.
+ */
+#define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node)
+
+XMLPUBFUN int
+ xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN double
+ xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlChar *
+ xmlXPathPopString (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void *
+ xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
+
+/**
+ * xmlXPathReturnBoolean:
+ * @ctxt: an XPath parser context
+ * @val: a boolean
+ *
+ * Pushes the boolean @val on the context stack.
+ */
+#define xmlXPathReturnBoolean(ctxt, val) \
+ valuePush((ctxt), xmlXPathNewBoolean(val))
+
+/**
+ * xmlXPathReturnTrue:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes true on the context stack.
+ */
+#define xmlXPathReturnTrue(ctxt) xmlXPathReturnBoolean((ctxt), 1)
+
+/**
+ * xmlXPathReturnFalse:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes false on the context stack.
+ */
+#define xmlXPathReturnFalse(ctxt) xmlXPathReturnBoolean((ctxt), 0)
+
+/**
+ * xmlXPathReturnNumber:
+ * @ctxt: an XPath parser context
+ * @val: a double
+ *
+ * Pushes the double @val on the context stack.
+ */
+#define xmlXPathReturnNumber(ctxt, val) \
+ valuePush((ctxt), xmlXPathNewFloat(val))
+
+/**
+ * xmlXPathReturnString:
+ * @ctxt: an XPath parser context
+ * @str: a string
+ *
+ * Pushes the string @str on the context stack.
+ */
+#define xmlXPathReturnString(ctxt, str) \
+ valuePush((ctxt), xmlXPathWrapString(str))
+
+/**
+ * xmlXPathReturnEmptyString:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes an empty string on the stack.
+ */
+#define xmlXPathReturnEmptyString(ctxt) \
+ valuePush((ctxt), xmlXPathNewCString(""))
+
+/**
+ * xmlXPathReturnNodeSet:
+ * @ctxt: an XPath parser context
+ * @ns: a node-set
+ *
+ * Pushes the node-set @ns on the context stack.
+ */
+#define xmlXPathReturnNodeSet(ctxt, ns) \
+ valuePush((ctxt), xmlXPathWrapNodeSet(ns))
+
+/**
+ * xmlXPathReturnEmptyNodeSet:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes an empty node-set on the context stack.
+ */
+#define xmlXPathReturnEmptyNodeSet(ctxt) \
+ valuePush((ctxt), xmlXPathNewNodeSet(NULL))
+
+/**
+ * xmlXPathReturnExternal:
+ * @ctxt: an XPath parser context
+ * @val: user data
+ *
+ * Pushes user data on the context stack.
+ */
+#define xmlXPathReturnExternal(ctxt, val) \
+ valuePush((ctxt), xmlXPathWrapExternal(val))
+
+/**
+ * xmlXPathStackIsNodeSet:
+ * @ctxt: an XPath parser context
+ *
+ * Check if the current value on the XPath stack is a node set or
+ * an XSLT value tree.
+ *
+ * Returns true if the current object on the stack is a node-set.
+ */
+#define xmlXPathStackIsNodeSet(ctxt) \
+ (((ctxt)->value != NULL) \
+ && (((ctxt)->value->type == XPATH_NODESET) \
+ || ((ctxt)->value->type == XPATH_XSLT_TREE)))
+
+/**
+ * xmlXPathStackIsExternal:
+ * @ctxt: an XPath parser context
+ *
+ * Checks if the current value on the XPath stack is an external
+ * object.
+ *
+ * Returns true if the current object on the stack is an external
+ * object.
+ */
+#define xmlXPathStackIsExternal(ctxt) \
+ ((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS))
+
+/**
+ * xmlXPathEmptyNodeSet:
+ * @ns: a node-set
+ *
+ * Empties a node-set.
+ */
+#define xmlXPathEmptyNodeSet(ns) \
+ { while ((ns)->nodeNr > 0) (ns)->nodeTab[--(ns)->nodeNr] = NULL; }
+
+/**
+ * CHECK_ERROR:
+ *
+ * Macro to return from the function if an XPath error was detected.
+ */
+#define CHECK_ERROR \
+ if (ctxt->error != XPATH_EXPRESSION_OK) return
+
+/**
+ * CHECK_ERROR0:
+ *
+ * Macro to return 0 from the function if an XPath error was detected.
+ */
+#define CHECK_ERROR0 \
+ if (ctxt->error != XPATH_EXPRESSION_OK) return(0)
+
+/**
+ * XP_ERROR:
+ * @X: the error code
+ *
+ * Macro to raise an XPath error and return.
+ */
+#define XP_ERROR(X) \
+ { xmlXPathErr(ctxt, X); return; }
+
+/**
+ * XP_ERROR0:
+ * @X: the error code
+ *
+ * Macro to raise an XPath error and return 0.
+ */
+#define XP_ERROR0(X) \
+ { xmlXPathErr(ctxt, X); return(0); }
+
+/**
+ * CHECK_TYPE:
+ * @typeval: the XPath type
+ *
+ * Macro to check that the value on top of the XPath stack is of a given
+ * type.
+ */
+#define CHECK_TYPE(typeval) \
+ if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
+ XP_ERROR(XPATH_INVALID_TYPE)
+
+/**
+ * CHECK_TYPE0:
+ * @typeval: the XPath type
+ *
+ * Macro to check that the value on top of the XPath stack is of a given
+ * type. Return(0) in case of failure
+ */
+#define CHECK_TYPE0(typeval) \
+ if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
+ XP_ERROR0(XPATH_INVALID_TYPE)
+
+/**
+ * CHECK_ARITY:
+ * @x: the number of expected args
+ *
+ * Macro to check that the number of args passed to an XPath function matches.
+ */
+#define CHECK_ARITY(x) \
+ if (ctxt == NULL) return; \
+ if (nargs != (x)) \
+ XP_ERROR(XPATH_INVALID_ARITY); \
+ if (ctxt->valueNr < (x)) \
+ XP_ERROR(XPATH_STACK_ERROR);
+
+/**
+ * CAST_TO_STRING:
+ *
+ * Macro to try to cast the value on the top of the XPath stack to a string.
+ */
+#define CAST_TO_STRING \
+ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING)) \
+ xmlXPathStringFunction(ctxt, 1);
+
+/**
+ * CAST_TO_NUMBER:
+ *
+ * Macro to try to cast the value on the top of the XPath stack to a number.
+ */
+#define CAST_TO_NUMBER \
+ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER)) \
+ xmlXPathNumberFunction(ctxt, 1);
+
+/**
+ * CAST_TO_BOOLEAN:
+ *
+ * Macro to try to cast the value on the top of the XPath stack to a boolean.
+ */
+#define CAST_TO_BOOLEAN \
+ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN)) \
+ xmlXPathBooleanFunction(ctxt, 1);
+
+/*
+ * Variable Lookup forwarding.
+ */
+
+XMLPUBFUN void
+ xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
+ xmlXPathVariableLookupFunc f,
+ void *data);
+
+/*
+ * Function Lookup forwarding.
+ */
+
+XMLPUBFUN void
+ xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
+ xmlXPathFuncLookupFunc f,
+ void *funcCtxt);
+
+/*
+ * Error reporting.
+ */
+XMLPUBFUN void
+ xmlXPatherror (xmlXPathParserContextPtr ctxt,
+ const char *file,
+ int line,
+ int no);
+
+XMLPUBFUN void
+ xmlXPathErr (xmlXPathParserContextPtr ctxt,
+ int error);
+
+#ifdef LIBXML_DEBUG_ENABLED
+XMLPUBFUN void
+ xmlXPathDebugDumpObject (FILE *output,
+ xmlXPathObjectPtr cur,
+ int depth);
+XMLPUBFUN void
+ xmlXPathDebugDumpCompExpr(FILE *output,
+ xmlXPathCompExprPtr comp,
+ int depth);
+#endif
+/**
+ * NodeSet handling.
+ */
+XMLPUBFUN int
+ xmlXPathNodeSetContains (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathDifference (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathIntersection (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathDistinctSorted (xmlNodeSetPtr nodes);
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathDistinct (xmlNodeSetPtr nodes);
+
+XMLPUBFUN int
+ xmlXPathHasSameNodes (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathLeadingSorted (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathNodeLeading (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathLeading (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathTrailingSorted (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathNodeTrailing (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathTrailing (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+
+/**
+ * Extending a context.
+ */
+
+XMLPUBFUN int
+ xmlXPathRegisterNs (xmlXPathContextPtr ctxt,
+ const xmlChar *prefix,
+ const xmlChar *ns_uri);
+XMLPUBFUN const xmlChar *
+ xmlXPathNsLookup (xmlXPathContextPtr ctxt,
+ const xmlChar *prefix);
+XMLPUBFUN void
+ xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
+
+XMLPUBFUN int
+ xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ xmlXPathFunction f);
+XMLPUBFUN int
+ xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri,
+ xmlXPathFunction f);
+XMLPUBFUN int
+ xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ xmlXPathObjectPtr value);
+XMLPUBFUN int
+ xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri,
+ xmlXPathObjectPtr value);
+XMLPUBFUN xmlXPathFunction
+ xmlXPathFunctionLookup (xmlXPathContextPtr ctxt,
+ const xmlChar *name);
+XMLPUBFUN xmlXPathFunction
+ xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+XMLPUBFUN void
+ xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathVariableLookup (xmlXPathContextPtr ctxt,
+ const xmlChar *name);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+XMLPUBFUN void
+ xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
+
+/**
+ * Utilities to extend XPath.
+ */
+XMLPUBFUN xmlXPathParserContextPtr
+ xmlXPathNewParserContext (const xmlChar *str,
+ xmlXPathContextPtr ctxt);
+XMLPUBFUN void
+ xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
+
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathValuePop (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int
+ xmlXPathValuePush (xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr value);
+
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathNewString (const xmlChar *val);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathNewCString (const char *val);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathWrapString (xmlChar *val);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathWrapCString (char * val);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathNewFloat (double val);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathNewBoolean (int val);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathNewNodeSet (xmlNodePtr val);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathNewValueTree (xmlNodePtr val);
+XMLPUBFUN int
+ xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN int
+ xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN int
+ xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
+ xmlNodePtr node,
+ xmlNsPtr ns);
+XMLPUBFUN void
+ xmlXPathNodeSetSort (xmlNodeSetPtr set);
+
+XMLPUBFUN void
+ xmlXPathRoot (xmlXPathParserContextPtr ctxt);
+XML_DEPRECATED
+XMLPUBFUN void
+ xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlChar *
+ xmlXPathParseName (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlChar *
+ xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
+
+/*
+ * Existing functions.
+ */
+XMLPUBFUN double
+ xmlXPathStringEvalNumber (const xmlChar *str);
+XMLPUBFUN int
+ xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr res);
+XMLPUBFUN void
+ xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt);
+XMLPUBFUN xmlNodeSetPtr
+ xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
+ xmlNodeSetPtr val2);
+XMLPUBFUN void
+ xmlXPathNodeSetDel (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN void
+ xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
+ int val);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathNewNodeSetList (xmlNodeSetPtr val);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathWrapNodeSet (xmlNodeSetPtr val);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPathWrapExternal (void *val);
+
+XMLPUBFUN int xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
+XMLPUBFUN void xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void xmlXPathModValues(xmlXPathParserContextPtr ctxt);
+
+XMLPUBFUN int xmlXPathIsNodeType(const xmlChar *name);
+
+/*
+ * Some of the axis navigation routines.
+ */
+XMLPUBFUN xmlNodePtr xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr xmlXPathNextChild(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr xmlXPathNextParent(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+/*
+ * The official core of XPath functions.
+ */
+XMLPUBFUN void xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
+
+/**
+ * Really internal functions
+ */
+XMLPUBFUN void xmlXPathNodeSetFreeNs(xmlNsPtr ns);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPATH_ENABLED */
+#endif /* ! __XML_XPATH_INTERNALS_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xpointer.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xpointer.h
new file mode 100644
index 0000000000000000000000000000000000000000..16bd5b9fd60be2a2bb778fa02a16f9ba1a9a5bca
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/xpointer.h
@@ -0,0 +1,48 @@
+/*
+ * Summary: API to handle XML Pointers
+ * Description: API to handle XML Pointers
+ * Base implementation was made accordingly to
+ * W3C Candidate Recommendation 7 June 2000
+ * http://www.w3.org/TR/2000/CR-xptr-20000607
+ *
+ * Added support for the element() scheme described in:
+ * W3C Proposed Recommendation 13 November 2002
+ * http://www.w3.org/TR/2002/PR-xptr-element-20021113/
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XPTR_H__
+#define __XML_XPTR_H__
+
+#include
+
+#ifdef LIBXML_XPTR_ENABLED
+
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Functions.
+ */
+XML_DEPRECATED
+XMLPUBFUN xmlXPathContextPtr
+ xmlXPtrNewContext (xmlDocPtr doc,
+ xmlNodePtr here,
+ xmlNodePtr origin);
+XMLPUBFUN xmlXPathObjectPtr
+ xmlXPtrEval (const xmlChar *str,
+ xmlXPathContextPtr ctx);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPTR_ENABLED */
+#endif /* __XML_XPTR_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/attributes.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/attributes.h
new file mode 100644
index 0000000000000000000000000000000000000000..d9b99a74aa1394507a6f2fea9c322741fe36b1a5
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/attributes.h
@@ -0,0 +1,39 @@
+/*
+ * Summary: interface for the XSLT attribute handling
+ * Description: this module handles the specificities of attribute
+ * and attribute groups processing.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_ATTRIBUTES_H__
+#define __XML_XSLT_ATTRIBUTES_H__
+
+#include
+#include "xsltexports.h"
+#include "xsltInternals.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XSLTPUBFUN void XSLTCALL
+ xsltParseStylesheetAttributeSet (xsltStylesheetPtr style,
+ xmlNodePtr cur);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeAttributeSetsHashes (xsltStylesheetPtr style);
+XSLTPUBFUN void XSLTCALL
+ xsltApplyAttributeSet (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ const xmlChar *attributes);
+XSLTPUBFUN void XSLTCALL
+ xsltResolveStylesheetAttributeSet(xsltStylesheetPtr style);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_ATTRIBUTES_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/documents.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/documents.h
new file mode 100644
index 0000000000000000000000000000000000000000..ae7c0ca24b93ec9a14b1dba5808f45998bba796c
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/documents.h
@@ -0,0 +1,93 @@
+/*
+ * Summary: interface for the document handling
+ * Description: implements document loading and cache (multiple
+ * document() reference for the same resources must
+ * be equal.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_DOCUMENTS_H__
+#define __XML_XSLT_DOCUMENTS_H__
+
+#include
+#include "xsltexports.h"
+#include "xsltInternals.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XSLTPUBFUN xsltDocumentPtr XSLTCALL
+ xsltNewDocument (xsltTransformContextPtr ctxt,
+ xmlDocPtr doc);
+XSLTPUBFUN xsltDocumentPtr XSLTCALL
+ xsltLoadDocument (xsltTransformContextPtr ctxt,
+ const xmlChar *URI);
+XSLTPUBFUN xsltDocumentPtr XSLTCALL
+ xsltFindDocument (xsltTransformContextPtr ctxt,
+ xmlDocPtr doc);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeDocuments (xsltTransformContextPtr ctxt);
+
+XSLTPUBFUN xsltDocumentPtr XSLTCALL
+ xsltLoadStyleDocument (xsltStylesheetPtr style,
+ const xmlChar *URI);
+XSLTPUBFUN xsltDocumentPtr XSLTCALL
+ xsltNewStyleDocument (xsltStylesheetPtr style,
+ xmlDocPtr doc);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeStyleDocuments (xsltStylesheetPtr style);
+
+/*
+ * Hooks for document loading
+ */
+
+/**
+ * xsltLoadType:
+ *
+ * Enum defining the kind of loader requirement.
+ */
+typedef enum {
+ XSLT_LOAD_START = 0, /* loading for a top stylesheet */
+ XSLT_LOAD_STYLESHEET = 1, /* loading for a stylesheet include/import */
+ XSLT_LOAD_DOCUMENT = 2 /* loading document at transformation time */
+} xsltLoadType;
+
+/**
+ * xsltDocLoaderFunc:
+ * @URI: the URI of the document to load
+ * @dict: the dictionary to use when parsing that document
+ * @options: parsing options, a set of xmlParserOption
+ * @ctxt: the context, either a stylesheet or a transformation context
+ * @type: the xsltLoadType indicating the kind of loading required
+ *
+ * An xsltDocLoaderFunc is a signature for a function which can be
+ * registered to load document not provided by the compilation or
+ * transformation API themselve, for example when an xsl:import,
+ * xsl:include is found at compilation time or when a document()
+ * call is made at runtime.
+ *
+ * Returns the pointer to the document (which will be modified and
+ * freed by the engine later), or NULL in case of error.
+ */
+typedef xmlDocPtr (*xsltDocLoaderFunc) (const xmlChar *URI,
+ xmlDictPtr dict,
+ int options,
+ void *ctxt,
+ xsltLoadType type);
+
+XSLTPUBFUN void XSLTCALL
+ xsltSetLoaderFunc (xsltDocLoaderFunc f);
+
+/* the loader may be needed by extension libraries so it is exported */
+XSLTPUBVAR xsltDocLoaderFunc xsltDocDefaultLoader;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_DOCUMENTS_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/extensions.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/extensions.h
new file mode 100644
index 0000000000000000000000000000000000000000..84d6aa44ad3e89ddece4d45e4eb738771c7e1f0f
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/extensions.h
@@ -0,0 +1,262 @@
+/*
+ * Summary: interface for the extension support
+ * Description: This provide the API needed for simple and module
+ * extension support.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_EXTENSION_H__
+#define __XML_XSLT_EXTENSION_H__
+
+#include
+#include "xsltexports.h"
+#include "xsltInternals.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Extension Modules API.
+ */
+
+/**
+ * xsltInitGlobals:
+ *
+ * Initialize the global variables for extensions
+ *
+ */
+
+XSLTPUBFUN void XSLTCALL
+ xsltInitGlobals (void);
+
+/**
+ * xsltStyleExtInitFunction:
+ * @ctxt: an XSLT stylesheet
+ * @URI: the namespace URI for the extension
+ *
+ * A function called at initialization time of an XSLT extension module.
+ *
+ * Returns a pointer to the module specific data for this transformation.
+ */
+typedef void * (*xsltStyleExtInitFunction) (xsltStylesheetPtr style,
+ const xmlChar *URI);
+
+/**
+ * xsltStyleExtShutdownFunction:
+ * @ctxt: an XSLT stylesheet
+ * @URI: the namespace URI for the extension
+ * @data: the data associated to this module
+ *
+ * A function called at shutdown time of an XSLT extension module.
+ */
+typedef void (*xsltStyleExtShutdownFunction) (xsltStylesheetPtr style,
+ const xmlChar *URI,
+ void *data);
+
+/**
+ * xsltExtInitFunction:
+ * @ctxt: an XSLT transformation context
+ * @URI: the namespace URI for the extension
+ *
+ * A function called at initialization time of an XSLT extension module.
+ *
+ * Returns a pointer to the module specific data for this transformation.
+ */
+typedef void * (*xsltExtInitFunction) (xsltTransformContextPtr ctxt,
+ const xmlChar *URI);
+
+/**
+ * xsltExtShutdownFunction:
+ * @ctxt: an XSLT transformation context
+ * @URI: the namespace URI for the extension
+ * @data: the data associated to this module
+ *
+ * A function called at shutdown time of an XSLT extension module.
+ */
+typedef void (*xsltExtShutdownFunction) (xsltTransformContextPtr ctxt,
+ const xmlChar *URI,
+ void *data);
+
+XSLTPUBFUN int XSLTCALL
+ xsltRegisterExtModule (const xmlChar *URI,
+ xsltExtInitFunction initFunc,
+ xsltExtShutdownFunction shutdownFunc);
+XSLTPUBFUN int XSLTCALL
+ xsltRegisterExtModuleFull
+ (const xmlChar * URI,
+ xsltExtInitFunction initFunc,
+ xsltExtShutdownFunction shutdownFunc,
+ xsltStyleExtInitFunction styleInitFunc,
+ xsltStyleExtShutdownFunction styleShutdownFunc);
+
+XSLTPUBFUN int XSLTCALL
+ xsltUnregisterExtModule (const xmlChar * URI);
+
+XSLTPUBFUN void * XSLTCALL
+ xsltGetExtData (xsltTransformContextPtr ctxt,
+ const xmlChar *URI);
+
+XSLTPUBFUN void * XSLTCALL
+ xsltStyleGetExtData (xsltStylesheetPtr style,
+ const xmlChar *URI);
+#ifdef XSLT_REFACTORED
+XSLTPUBFUN void * XSLTCALL
+ xsltStyleStylesheetLevelGetExtData(
+ xsltStylesheetPtr style,
+ const xmlChar * URI);
+#endif
+XSLTPUBFUN void XSLTCALL
+ xsltShutdownCtxtExts (xsltTransformContextPtr ctxt);
+
+XSLTPUBFUN void XSLTCALL
+ xsltShutdownExts (xsltStylesheetPtr style);
+
+XSLTPUBFUN xsltTransformContextPtr XSLTCALL
+ xsltXPathGetTransformContext
+ (xmlXPathParserContextPtr ctxt);
+
+/*
+ * extension functions
+*/
+XSLTPUBFUN int XSLTCALL
+ xsltRegisterExtModuleFunction
+ (const xmlChar *name,
+ const xmlChar *URI,
+ xmlXPathFunction function);
+XSLTPUBFUN xmlXPathFunction XSLTCALL
+ xsltExtModuleFunctionLookup (const xmlChar *name,
+ const xmlChar *URI);
+XSLTPUBFUN int XSLTCALL
+ xsltUnregisterExtModuleFunction
+ (const xmlChar *name,
+ const xmlChar *URI);
+
+/*
+ * extension elements
+ */
+typedef xsltElemPreCompPtr (*xsltPreComputeFunction)
+ (xsltStylesheetPtr style,
+ xmlNodePtr inst,
+ xsltTransformFunction function);
+
+XSLTPUBFUN xsltElemPreCompPtr XSLTCALL
+ xsltNewElemPreComp (xsltStylesheetPtr style,
+ xmlNodePtr inst,
+ xsltTransformFunction function);
+XSLTPUBFUN void XSLTCALL
+ xsltInitElemPreComp (xsltElemPreCompPtr comp,
+ xsltStylesheetPtr style,
+ xmlNodePtr inst,
+ xsltTransformFunction function,
+ xsltElemPreCompDeallocator freeFunc);
+
+XSLTPUBFUN int XSLTCALL
+ xsltRegisterExtModuleElement
+ (const xmlChar *name,
+ const xmlChar *URI,
+ xsltPreComputeFunction precomp,
+ xsltTransformFunction transform);
+XSLTPUBFUN xsltTransformFunction XSLTCALL
+ xsltExtElementLookup (xsltTransformContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *URI);
+XSLTPUBFUN xsltTransformFunction XSLTCALL
+ xsltExtModuleElementLookup
+ (const xmlChar *name,
+ const xmlChar *URI);
+XSLTPUBFUN xsltPreComputeFunction XSLTCALL
+ xsltExtModuleElementPreComputeLookup
+ (const xmlChar *name,
+ const xmlChar *URI);
+XSLTPUBFUN int XSLTCALL
+ xsltUnregisterExtModuleElement
+ (const xmlChar *name,
+ const xmlChar *URI);
+
+/*
+ * top-level elements
+ */
+typedef void (*xsltTopLevelFunction) (xsltStylesheetPtr style,
+ xmlNodePtr inst);
+
+XSLTPUBFUN int XSLTCALL
+ xsltRegisterExtModuleTopLevel
+ (const xmlChar *name,
+ const xmlChar *URI,
+ xsltTopLevelFunction function);
+XSLTPUBFUN xsltTopLevelFunction XSLTCALL
+ xsltExtModuleTopLevelLookup
+ (const xmlChar *name,
+ const xmlChar *URI);
+XSLTPUBFUN int XSLTCALL
+ xsltUnregisterExtModuleTopLevel
+ (const xmlChar *name,
+ const xmlChar *URI);
+
+
+/* These 2 functions are deprecated for use within modules. */
+XSLTPUBFUN int XSLTCALL
+ xsltRegisterExtFunction (xsltTransformContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *URI,
+ xmlXPathFunction function);
+XSLTPUBFUN int XSLTCALL
+ xsltRegisterExtElement (xsltTransformContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *URI,
+ xsltTransformFunction function);
+
+/*
+ * Extension Prefix handling API.
+ * Those are used by the XSLT (pre)processor.
+ */
+
+XSLTPUBFUN int XSLTCALL
+ xsltRegisterExtPrefix (xsltStylesheetPtr style,
+ const xmlChar *prefix,
+ const xmlChar *URI);
+XSLTPUBFUN int XSLTCALL
+ xsltCheckExtPrefix (xsltStylesheetPtr style,
+ const xmlChar *URI);
+XSLTPUBFUN int XSLTCALL
+ xsltCheckExtURI (xsltStylesheetPtr style,
+ const xmlChar *URI);
+XSLTPUBFUN int XSLTCALL
+ xsltInitCtxtExts (xsltTransformContextPtr ctxt);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeCtxtExts (xsltTransformContextPtr ctxt);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeExts (xsltStylesheetPtr style);
+
+XSLTPUBFUN xsltElemPreCompPtr XSLTCALL
+ xsltPreComputeExtModuleElement
+ (xsltStylesheetPtr style,
+ xmlNodePtr inst);
+/*
+ * Extension Infos access.
+ * Used by exslt initialisation
+ */
+
+XSLTPUBFUN xmlHashTablePtr XSLTCALL
+ xsltGetExtInfo (xsltStylesheetPtr style,
+ const xmlChar *URI);
+
+/**
+ * Test of the extension module API
+ */
+XSLTPUBFUN void XSLTCALL
+ xsltRegisterTestModule (void);
+XSLTPUBFUN void XSLTCALL
+ xsltDebugDumpExtensions (FILE * output);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_EXTENSION_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/extra.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/extra.h
new file mode 100644
index 0000000000000000000000000000000000000000..e512fd03dd4b4c459e2498e50126be59557d30c9
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/extra.h
@@ -0,0 +1,72 @@
+/*
+ * Summary: interface for the non-standard features
+ * Description: implement some extension outside the XSLT namespace
+ * but not EXSLT with is in a different library.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_EXTRA_H__
+#define __XML_XSLT_EXTRA_H__
+
+#include
+#include "xsltexports.h"
+#include "xsltInternals.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XSLT_LIBXSLT_NAMESPACE:
+ *
+ * This is the libxslt namespace for specific extensions.
+ */
+#define XSLT_LIBXSLT_NAMESPACE ((xmlChar *) "http://xmlsoft.org/XSLT/namespace")
+
+/**
+ * XSLT_SAXON_NAMESPACE:
+ *
+ * This is Michael Kay's Saxon processor namespace for extensions.
+ */
+#define XSLT_SAXON_NAMESPACE ((xmlChar *) "http://icl.com/saxon")
+
+/**
+ * XSLT_XT_NAMESPACE:
+ *
+ * This is James Clark's XT processor namespace for extensions.
+ */
+#define XSLT_XT_NAMESPACE ((xmlChar *) "http://www.jclark.com/xt")
+
+/**
+ * XSLT_XALAN_NAMESPACE:
+ *
+ * This is the Apache project XALAN processor namespace for extensions.
+ */
+#define XSLT_XALAN_NAMESPACE ((xmlChar *) \
+ "org.apache.xalan.xslt.extensions.Redirect")
+
+
+XSLTPUBFUN void XSLTCALL
+ xsltFunctionNodeSet (xmlXPathParserContextPtr ctxt,
+ int nargs);
+XSLTPUBFUN void XSLTCALL
+ xsltDebug (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+
+
+XSLTPUBFUN void XSLTCALL
+ xsltRegisterExtras (xsltTransformContextPtr ctxt);
+XSLTPUBFUN void XSLTCALL
+ xsltRegisterAllExtras (void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_EXTRA_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/functions.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/functions.h
new file mode 100644
index 0000000000000000000000000000000000000000..5455b7f47802ac6cae284fadbbcd7a0665c34341
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/functions.h
@@ -0,0 +1,78 @@
+/*
+ * Summary: interface for the XSLT functions not from XPath
+ * Description: a set of extra functions coming from XSLT but not in XPath
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard and Bjorn Reese
+ */
+
+#ifndef __XML_XSLT_FUNCTIONS_H__
+#define __XML_XSLT_FUNCTIONS_H__
+
+#include
+#include
+#include "xsltexports.h"
+#include "xsltInternals.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XSLT_REGISTER_FUNCTION_LOOKUP:
+ *
+ * Registering macro, not general purpose at all but used in different modules.
+ */
+#define XSLT_REGISTER_FUNCTION_LOOKUP(ctxt) \
+ xmlXPathRegisterFuncLookup((ctxt)->xpathCtxt, \
+ xsltXPathFunctionLookup, \
+ (void *)(ctxt->xpathCtxt));
+
+XSLTPUBFUN xmlXPathFunction XSLTCALL
+ xsltXPathFunctionLookup (void *vctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+
+/*
+ * Interfaces for the functions implementations.
+ */
+
+XSLTPUBFUN void XSLTCALL
+ xsltDocumentFunction (xmlXPathParserContextPtr ctxt,
+ int nargs);
+XSLTPUBFUN void XSLTCALL
+ xsltKeyFunction (xmlXPathParserContextPtr ctxt,
+ int nargs);
+XSLTPUBFUN void XSLTCALL
+ xsltUnparsedEntityURIFunction (xmlXPathParserContextPtr ctxt,
+ int nargs);
+XSLTPUBFUN void XSLTCALL
+ xsltFormatNumberFunction (xmlXPathParserContextPtr ctxt,
+ int nargs);
+XSLTPUBFUN void XSLTCALL
+ xsltGenerateIdFunction (xmlXPathParserContextPtr ctxt,
+ int nargs);
+XSLTPUBFUN void XSLTCALL
+ xsltSystemPropertyFunction (xmlXPathParserContextPtr ctxt,
+ int nargs);
+XSLTPUBFUN void XSLTCALL
+ xsltElementAvailableFunction (xmlXPathParserContextPtr ctxt,
+ int nargs);
+XSLTPUBFUN void XSLTCALL
+ xsltFunctionAvailableFunction (xmlXPathParserContextPtr ctxt,
+ int nargs);
+
+/*
+ * And the registration
+ */
+
+XSLTPUBFUN void XSLTCALL
+ xsltRegisterAllFunctions (xmlXPathContextPtr ctxt);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_FUNCTIONS_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/imports.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/imports.h
new file mode 100644
index 0000000000000000000000000000000000000000..95e44e51da10f1a7334ddefd56f02ef40d94719d
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/imports.h
@@ -0,0 +1,75 @@
+/*
+ * Summary: interface for the XSLT import support
+ * Description: macros and fuctions needed to implement and
+ * access the import tree
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_IMPORTS_H__
+#define __XML_XSLT_IMPORTS_H__
+
+#include
+#include "xsltexports.h"
+#include "xsltInternals.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XSLT_GET_IMPORT_PTR:
+ *
+ * A macro to import pointers from the stylesheet cascading order.
+ */
+#define XSLT_GET_IMPORT_PTR(res, style, name) { \
+ xsltStylesheetPtr st = style; \
+ res = NULL; \
+ while (st != NULL) { \
+ if (st->name != NULL) { res = st->name; break; } \
+ st = xsltNextImport(st); \
+ }}
+
+/**
+ * XSLT_GET_IMPORT_INT:
+ *
+ * A macro to import intergers from the stylesheet cascading order.
+ */
+#define XSLT_GET_IMPORT_INT(res, style, name) { \
+ xsltStylesheetPtr st = style; \
+ res = -1; \
+ while (st != NULL) { \
+ if (st->name != -1) { res = st->name; break; } \
+ st = xsltNextImport(st); \
+ }}
+
+/*
+ * Module interfaces
+ */
+XSLTPUBFUN int XSLTCALL
+ xsltParseStylesheetImport(xsltStylesheetPtr style,
+ xmlNodePtr cur);
+XSLTPUBFUN int XSLTCALL
+ xsltParseStylesheetInclude
+ (xsltStylesheetPtr style,
+ xmlNodePtr cur);
+XSLTPUBFUN xsltStylesheetPtr XSLTCALL
+ xsltNextImport (xsltStylesheetPtr style);
+XSLTPUBFUN int XSLTCALL
+ xsltNeedElemSpaceHandling(xsltTransformContextPtr ctxt);
+XSLTPUBFUN int XSLTCALL
+ xsltFindElemSpaceHandling(xsltTransformContextPtr ctxt,
+ xmlNodePtr node);
+XSLTPUBFUN xsltTemplatePtr XSLTCALL
+ xsltFindTemplate (xsltTransformContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *nameURI);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_IMPORTS_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/keys.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/keys.h
new file mode 100644
index 0000000000000000000000000000000000000000..757d122463ae4f3476bbf73e549e15c30e7de617
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/keys.h
@@ -0,0 +1,53 @@
+/*
+ * Summary: interface for the key matching used in key() and template matches.
+ * Description: implementation of the key mechanims.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_KEY_H__
+#define __XML_XSLT_KEY_H__
+
+#include
+#include "xsltexports.h"
+#include "xsltInternals.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * NODE_IS_KEYED:
+ *
+ * check for bit 15 set
+ */
+#define NODE_IS_KEYED (1 >> 15)
+
+XSLTPUBFUN int XSLTCALL
+ xsltAddKey (xsltStylesheetPtr style,
+ const xmlChar *name,
+ const xmlChar *nameURI,
+ const xmlChar *match,
+ const xmlChar *use,
+ xmlNodePtr inst);
+XSLTPUBFUN xmlNodeSetPtr XSLTCALL
+ xsltGetKey (xsltTransformContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *nameURI,
+ const xmlChar *value);
+XSLTPUBFUN void XSLTCALL
+ xsltInitCtxtKeys (xsltTransformContextPtr ctxt,
+ xsltDocumentPtr doc);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeKeys (xsltStylesheetPtr style);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeDocumentKeys (xsltDocumentPtr doc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/namespaces.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/namespaces.h
new file mode 100644
index 0000000000000000000000000000000000000000..fa2d3b4ce75cf64da845ed8eac860145f99a0b81
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/namespaces.h
@@ -0,0 +1,68 @@
+/*
+ * Summary: interface for the XSLT namespace handling
+ * Description: set of function easing the processing and generation
+ * of namespace nodes in XSLT.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_NAMESPACES_H__
+#define __XML_XSLT_NAMESPACES_H__
+
+#include
+#include "xsltexports.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Used within nsAliases hashtable when the default namespace is required
+ * but it's not been explicitly defined
+ */
+/**
+ * UNDEFINED_DEFAULT_NS:
+ *
+ * Special value for undefined namespace, internal
+ */
+#define UNDEFINED_DEFAULT_NS (const xmlChar *) -1L
+
+XSLTPUBFUN void XSLTCALL
+ xsltNamespaceAlias (xsltStylesheetPtr style,
+ xmlNodePtr node);
+XSLTPUBFUN xmlNsPtr XSLTCALL
+ xsltGetNamespace (xsltTransformContextPtr ctxt,
+ xmlNodePtr cur,
+ xmlNsPtr ns,
+ xmlNodePtr out);
+XSLTPUBFUN xmlNsPtr XSLTCALL
+ xsltGetPlainNamespace (xsltTransformContextPtr ctxt,
+ xmlNodePtr cur,
+ xmlNsPtr ns,
+ xmlNodePtr out);
+XSLTPUBFUN xmlNsPtr XSLTCALL
+ xsltGetSpecialNamespace (xsltTransformContextPtr ctxt,
+ xmlNodePtr cur,
+ const xmlChar *URI,
+ const xmlChar *prefix,
+ xmlNodePtr out);
+XSLTPUBFUN xmlNsPtr XSLTCALL
+ xsltCopyNamespace (xsltTransformContextPtr ctxt,
+ xmlNodePtr elem,
+ xmlNsPtr ns);
+XSLTPUBFUN xmlNsPtr XSLTCALL
+ xsltCopyNamespaceList (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNsPtr cur);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeNamespaceAliasHashes
+ (xsltStylesheetPtr style);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_NAMESPACES_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/numbersInternals.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/numbersInternals.h
new file mode 100644
index 0000000000000000000000000000000000000000..8524592811aedebb82db9412b95c4bb50d918503
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/numbersInternals.h
@@ -0,0 +1,73 @@
+/*
+ * Summary: Implementation of the XSLT number functions
+ * Description: Implementation of the XSLT number functions
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Bjorn Reese and Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_NUMBERSINTERNALS_H__
+#define __XML_XSLT_NUMBERSINTERNALS_H__
+
+#include
+#include "xsltexports.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct _xsltCompMatch;
+
+/**
+ * xsltNumberData:
+ *
+ * This data structure is just a wrapper to pass xsl:number data in.
+ */
+typedef struct _xsltNumberData xsltNumberData;
+typedef xsltNumberData *xsltNumberDataPtr;
+
+struct _xsltNumberData {
+ const xmlChar *level;
+ const xmlChar *count;
+ const xmlChar *from;
+ const xmlChar *value;
+ const xmlChar *format;
+ int has_format;
+ int digitsPerGroup;
+ int groupingCharacter;
+ int groupingCharacterLen;
+ xmlDocPtr doc;
+ xmlNodePtr node;
+ struct _xsltCompMatch *countPat;
+ struct _xsltCompMatch *fromPat;
+
+ /*
+ * accelerators
+ */
+};
+
+/**
+ * xsltFormatNumberInfo,:
+ *
+ * This data structure lists the various parameters needed to format numbers.
+ */
+typedef struct _xsltFormatNumberInfo xsltFormatNumberInfo;
+typedef xsltFormatNumberInfo *xsltFormatNumberInfoPtr;
+
+struct _xsltFormatNumberInfo {
+ int integer_hash; /* Number of '#' in integer part */
+ int integer_digits; /* Number of '0' in integer part */
+ int frac_digits; /* Number of '0' in fractional part */
+ int frac_hash; /* Number of '#' in fractional part */
+ int group; /* Number of chars per display 'group' */
+ int multiplier; /* Scaling for percent or permille */
+ char add_decimal; /* Flag for whether decimal point appears in pattern */
+ char is_multiplier_set; /* Flag to catch multiple occurences of percent/permille */
+ char is_negative_pattern;/* Flag for processing -ve prefix/suffix */
+};
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_XSLT_NUMBERSINTERNALS_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/pattern.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/pattern.h
new file mode 100644
index 0000000000000000000000000000000000000000..a0991c0ce83ee4406d6dca356138dd698e8efbe2
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/pattern.h
@@ -0,0 +1,84 @@
+/*
+ * Summary: interface for the pattern matching used in template matches.
+ * Description: the implementation of the lookup of the right template
+ * for a given node must be really fast in order to keep
+ * decent performances.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_PATTERN_H__
+#define __XML_XSLT_PATTERN_H__
+
+#include "xsltInternals.h"
+#include "xsltexports.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xsltCompMatch:
+ *
+ * Data structure used for the implementation of patterns.
+ * It is kept private (in pattern.c).
+ */
+typedef struct _xsltCompMatch xsltCompMatch;
+typedef xsltCompMatch *xsltCompMatchPtr;
+
+/*
+ * Pattern related interfaces.
+ */
+
+XSLTPUBFUN xsltCompMatchPtr XSLTCALL
+ xsltCompilePattern (const xmlChar *pattern,
+ xmlDocPtr doc,
+ xmlNodePtr node,
+ xsltStylesheetPtr style,
+ xsltTransformContextPtr runtime);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeCompMatchList (xsltCompMatchPtr comp);
+XSLTPUBFUN int XSLTCALL
+ xsltTestCompMatchList (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xsltCompMatchPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltCompMatchClearCache (xsltTransformContextPtr ctxt,
+ xsltCompMatchPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltNormalizeCompSteps (void *payload,
+ void *data,
+ const xmlChar *name);
+
+/*
+ * Template related interfaces.
+ */
+XSLTPUBFUN int XSLTCALL
+ xsltAddTemplate (xsltStylesheetPtr style,
+ xsltTemplatePtr cur,
+ const xmlChar *mode,
+ const xmlChar *modeURI);
+XSLTPUBFUN xsltTemplatePtr XSLTCALL
+ xsltGetTemplate (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xsltStylesheetPtr style);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeTemplateHashes (xsltStylesheetPtr style);
+XSLTPUBFUN void XSLTCALL
+ xsltCleanupTemplates (xsltStylesheetPtr style);
+
+#if 0
+int xsltMatchPattern (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ const xmlChar *pattern,
+ xmlDocPtr ctxtdoc,
+ xmlNodePtr ctxtnode);
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_PATTERN_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/preproc.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/preproc.h
new file mode 100644
index 0000000000000000000000000000000000000000..2a2fc7e4305e567464874ba6cb7bcba69f85efdf
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/preproc.h
@@ -0,0 +1,43 @@
+/*
+ * Summary: precomputing stylesheets
+ * Description: this is the compilation phase, where most of the
+ * stylesheet is "compiled" into faster to use data.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_PRECOMP_H__
+#define __XML_XSLT_PRECOMP_H__
+
+#include
+#include "xsltexports.h"
+#include "xsltInternals.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Interfaces
+ */
+XSLTPUBVAR const xmlChar *xsltExtMarker;
+
+XSLTPUBFUN xsltElemPreCompPtr XSLTCALL
+ xsltDocumentComp (xsltStylesheetPtr style,
+ xmlNodePtr inst,
+ xsltTransformFunction function);
+
+XSLTPUBFUN void XSLTCALL
+ xsltStylePreCompute (xsltStylesheetPtr style,
+ xmlNodePtr inst);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeStylePreComps (xsltStylesheetPtr style);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_PRECOMP_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/security.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/security.h
new file mode 100644
index 0000000000000000000000000000000000000000..bab5c8c6b213ae0dec3160c08870e5232112cea4
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/security.h
@@ -0,0 +1,104 @@
+/*
+ * Summary: interface for the libxslt security framework
+ * Description: the libxslt security framework allow to restrict
+ * the access to new resources (file or URL) from
+ * the stylesheet at runtime.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_SECURITY_H__
+#define __XML_XSLT_SECURITY_H__
+
+#include
+#include "xsltexports.h"
+#include "xsltInternals.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xsltSecurityPref:
+ *
+ * structure to indicate the preferences for security in the XSLT
+ * transformation.
+ */
+typedef struct _xsltSecurityPrefs xsltSecurityPrefs;
+typedef xsltSecurityPrefs *xsltSecurityPrefsPtr;
+
+/**
+ * xsltSecurityOption:
+ *
+ * the set of option that can be configured
+ */
+typedef enum {
+ XSLT_SECPREF_READ_FILE = 1,
+ XSLT_SECPREF_WRITE_FILE,
+ XSLT_SECPREF_CREATE_DIRECTORY,
+ XSLT_SECPREF_READ_NETWORK,
+ XSLT_SECPREF_WRITE_NETWORK
+} xsltSecurityOption;
+
+/**
+ * xsltSecurityCheck:
+ *
+ * User provided function to check the value of a string like a file
+ * path or an URL ...
+ */
+typedef int (*xsltSecurityCheck) (xsltSecurityPrefsPtr sec,
+ xsltTransformContextPtr ctxt,
+ const char *value);
+
+/*
+ * Module interfaces
+ */
+XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL
+ xsltNewSecurityPrefs (void);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeSecurityPrefs (xsltSecurityPrefsPtr sec);
+XSLTPUBFUN int XSLTCALL
+ xsltSetSecurityPrefs (xsltSecurityPrefsPtr sec,
+ xsltSecurityOption option,
+ xsltSecurityCheck func);
+XSLTPUBFUN xsltSecurityCheck XSLTCALL
+ xsltGetSecurityPrefs (xsltSecurityPrefsPtr sec,
+ xsltSecurityOption option);
+
+XSLTPUBFUN void XSLTCALL
+ xsltSetDefaultSecurityPrefs (xsltSecurityPrefsPtr sec);
+XSLTPUBFUN xsltSecurityPrefsPtr XSLTCALL
+ xsltGetDefaultSecurityPrefs (void);
+
+XSLTPUBFUN int XSLTCALL
+ xsltSetCtxtSecurityPrefs (xsltSecurityPrefsPtr sec,
+ xsltTransformContextPtr ctxt);
+
+XSLTPUBFUN int XSLTCALL
+ xsltSecurityAllow (xsltSecurityPrefsPtr sec,
+ xsltTransformContextPtr ctxt,
+ const char *value);
+XSLTPUBFUN int XSLTCALL
+ xsltSecurityForbid (xsltSecurityPrefsPtr sec,
+ xsltTransformContextPtr ctxt,
+ const char *value);
+/*
+ * internal interfaces
+ */
+XSLTPUBFUN int XSLTCALL
+ xsltCheckWrite (xsltSecurityPrefsPtr sec,
+ xsltTransformContextPtr ctxt,
+ const xmlChar *URL);
+XSLTPUBFUN int XSLTCALL
+ xsltCheckRead (xsltSecurityPrefsPtr sec,
+ xsltTransformContextPtr ctxt,
+ const xmlChar *URL);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_SECURITY_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/templates.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/templates.h
new file mode 100644
index 0000000000000000000000000000000000000000..84a9de4d359668b40fe0f24e67795ec350e0eb04
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/templates.h
@@ -0,0 +1,77 @@
+/*
+ * Summary: interface for the template processing
+ * Description: This set of routine encapsulates XPath calls
+ * and Attribute Value Templates evaluation.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_TEMPLATES_H__
+#define __XML_XSLT_TEMPLATES_H__
+
+#include
+#include
+#include "xsltexports.h"
+#include "xsltInternals.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XSLTPUBFUN int XSLTCALL
+ xsltEvalXPathPredicate (xsltTransformContextPtr ctxt,
+ xmlXPathCompExprPtr comp,
+ xmlNsPtr *nsList,
+ int nsNr);
+XSLTPUBFUN xmlChar * XSLTCALL
+ xsltEvalTemplateString (xsltTransformContextPtr ctxt,
+ xmlNodePtr contextNode,
+ xmlNodePtr inst);
+XSLTPUBFUN xmlChar * XSLTCALL
+ xsltEvalAttrValueTemplate (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *ns);
+XSLTPUBFUN const xmlChar * XSLTCALL
+ xsltEvalStaticAttrValueTemplate (xsltStylesheetPtr style,
+ xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *ns,
+ int *found);
+
+/* TODO: this is obviously broken ... the namespaces should be passed too ! */
+XSLTPUBFUN xmlChar * XSLTCALL
+ xsltEvalXPathString (xsltTransformContextPtr ctxt,
+ xmlXPathCompExprPtr comp);
+XSLTPUBFUN xmlChar * XSLTCALL
+ xsltEvalXPathStringNs (xsltTransformContextPtr ctxt,
+ xmlXPathCompExprPtr comp,
+ int nsNr,
+ xmlNsPtr *nsList);
+
+XSLTPUBFUN xmlNodePtr * XSLTCALL
+ xsltTemplateProcess (xsltTransformContextPtr ctxt,
+ xmlNodePtr node);
+XSLTPUBFUN xmlAttrPtr XSLTCALL
+ xsltAttrListTemplateProcess (xsltTransformContextPtr ctxt,
+ xmlNodePtr target,
+ xmlAttrPtr cur);
+XSLTPUBFUN xmlAttrPtr XSLTCALL
+ xsltAttrTemplateProcess (xsltTransformContextPtr ctxt,
+ xmlNodePtr target,
+ xmlAttrPtr attr);
+XSLTPUBFUN xmlChar * XSLTCALL
+ xsltAttrTemplateValueProcess (xsltTransformContextPtr ctxt,
+ const xmlChar* attr);
+XSLTPUBFUN xmlChar * XSLTCALL
+ xsltAttrTemplateValueProcessNode(xsltTransformContextPtr ctxt,
+ const xmlChar* str,
+ xmlNodePtr node);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_TEMPLATES_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/variables.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/variables.h
new file mode 100644
index 0000000000000000000000000000000000000000..e2adee0f7551c6b80e2b76ded49f0b51e405f546
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/variables.h
@@ -0,0 +1,118 @@
+/*
+ * Summary: interface for the variable matching and lookup.
+ * Description: interface for the variable matching and lookup.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_VARIABLES_H__
+#define __XML_XSLT_VARIABLES_H__
+
+#include
+#include
+#include "xsltexports.h"
+#include "xsltInternals.h"
+#include "functions.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * XSLT_REGISTER_VARIABLE_LOOKUP:
+ *
+ * Registering macro, not general purpose at all but used in different modules.
+ */
+
+#define XSLT_REGISTER_VARIABLE_LOOKUP(ctxt) \
+ xmlXPathRegisterVariableLookup((ctxt)->xpathCtxt, \
+ xsltXPathVariableLookup, (void *)(ctxt)); \
+ xsltRegisterAllFunctions((ctxt)->xpathCtxt); \
+ xsltRegisterAllElement(ctxt); \
+ (ctxt)->xpathCtxt->extra = ctxt
+
+/*
+ * Flags for memory management of RVTs
+ */
+
+/**
+ * XSLT_RVT_LOCAL:
+ *
+ * RVT is destroyed after the current instructions ends.
+ */
+#define XSLT_RVT_LOCAL 1
+
+/**
+ * XSLT_RVT_FUNC_RESULT:
+ *
+ * RVT is part of results returned with func:result. The RVT won't be
+ * destroyed after exiting a template and will be reset to XSLT_RVT_LOCAL or
+ * XSLT_RVT_VARIABLE in the template that receives the return value.
+ */
+#define XSLT_RVT_FUNC_RESULT 2
+
+/**
+ * XSLT_RVT_GLOBAL:
+ *
+ * RVT is part of a global variable.
+ */
+#define XSLT_RVT_GLOBAL 3
+
+/*
+ * Interfaces for the variable module.
+ */
+
+XSLTPUBFUN int XSLTCALL
+ xsltEvalGlobalVariables (xsltTransformContextPtr ctxt);
+XSLTPUBFUN int XSLTCALL
+ xsltEvalUserParams (xsltTransformContextPtr ctxt,
+ const char **params);
+XSLTPUBFUN int XSLTCALL
+ xsltQuoteUserParams (xsltTransformContextPtr ctxt,
+ const char **params);
+XSLTPUBFUN int XSLTCALL
+ xsltEvalOneUserParam (xsltTransformContextPtr ctxt,
+ const xmlChar * name,
+ const xmlChar * value);
+XSLTPUBFUN int XSLTCALL
+ xsltQuoteOneUserParam (xsltTransformContextPtr ctxt,
+ const xmlChar * name,
+ const xmlChar * value);
+
+XSLTPUBFUN void XSLTCALL
+ xsltParseGlobalVariable (xsltStylesheetPtr style,
+ xmlNodePtr cur);
+XSLTPUBFUN void XSLTCALL
+ xsltParseGlobalParam (xsltStylesheetPtr style,
+ xmlNodePtr cur);
+XSLTPUBFUN void XSLTCALL
+ xsltParseStylesheetVariable (xsltTransformContextPtr ctxt,
+ xmlNodePtr cur);
+XSLTPUBFUN void XSLTCALL
+ xsltParseStylesheetParam (xsltTransformContextPtr ctxt,
+ xmlNodePtr cur);
+XSLTPUBFUN xsltStackElemPtr XSLTCALL
+ xsltParseStylesheetCallerParam (xsltTransformContextPtr ctxt,
+ xmlNodePtr cur);
+XSLTPUBFUN int XSLTCALL
+ xsltAddStackElemList (xsltTransformContextPtr ctxt,
+ xsltStackElemPtr elems);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeGlobalVariables (xsltTransformContextPtr ctxt);
+XSLTPUBFUN xmlXPathObjectPtr XSLTCALL
+ xsltVariableLookup (xsltTransformContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+XSLTPUBFUN xmlXPathObjectPtr XSLTCALL
+ xsltXPathVariableLookup (void *ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_VARIABLES_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xslt.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xslt.h
new file mode 100644
index 0000000000000000000000000000000000000000..02f491a58ec0e87e5e9d630be1ab81ad3e354f87
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xslt.h
@@ -0,0 +1,110 @@
+/*
+ * Summary: Interfaces, constants and types related to the XSLT engine
+ * Description: Interfaces, constants and types related to the XSLT engine
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_H__
+#define __XML_XSLT_H__
+
+#include
+#include "xsltexports.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XSLT_DEFAULT_VERSION:
+ *
+ * The default version of XSLT supported.
+ */
+#define XSLT_DEFAULT_VERSION "1.0"
+
+/**
+ * XSLT_DEFAULT_VENDOR:
+ *
+ * The XSLT "vendor" string for this processor.
+ */
+#define XSLT_DEFAULT_VENDOR "libxslt"
+
+/**
+ * XSLT_DEFAULT_URL:
+ *
+ * The XSLT "vendor" URL for this processor.
+ */
+#define XSLT_DEFAULT_URL "http://xmlsoft.org/XSLT/"
+
+/**
+ * XSLT_NAMESPACE:
+ *
+ * The XSLT specification namespace.
+ */
+#define XSLT_NAMESPACE ((const xmlChar *)"http://www.w3.org/1999/XSL/Transform")
+
+/**
+ * XSLT_PARSE_OPTIONS:
+ *
+ * The set of options to pass to an xmlReadxxx when loading files for
+ * XSLT consumption.
+ */
+#define XSLT_PARSE_OPTIONS \
+ XML_PARSE_NOENT | XML_PARSE_DTDLOAD | XML_PARSE_DTDATTR | XML_PARSE_NOCDATA
+
+/**
+ * xsltMaxDepth:
+ *
+ * This value is used to detect templates loops.
+ */
+XSLTPUBVAR int xsltMaxDepth;
+
+/**
+ * * xsltMaxVars:
+ * *
+ * * This value is used to detect templates loops.
+ * */
+XSLTPUBVAR int xsltMaxVars;
+
+/**
+ * xsltEngineVersion:
+ *
+ * The version string for libxslt.
+ */
+XSLTPUBVAR const char *xsltEngineVersion;
+
+/**
+ * xsltLibxsltVersion:
+ *
+ * The version of libxslt compiled.
+ */
+XSLTPUBVAR const int xsltLibxsltVersion;
+
+/**
+ * xsltLibxmlVersion:
+ *
+ * The version of libxml libxslt was compiled against.
+ */
+XSLTPUBVAR const int xsltLibxmlVersion;
+
+/*
+ * Global initialization function.
+ */
+
+XSLTPUBFUN void XSLTCALL
+ xsltInit (void);
+
+/*
+ * Global cleanup function.
+ */
+XSLTPUBFUN void XSLTCALL
+ xsltCleanupGlobals (void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltInternals.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltInternals.h
new file mode 100644
index 0000000000000000000000000000000000000000..6faa07db5299557507739b99838a03ab5f3d8995
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltInternals.h
@@ -0,0 +1,1995 @@
+/*
+ * Summary: internal data structures, constants and functions
+ * Description: Internal data structures, constants and functions used
+ * by the XSLT engine.
+ * They are not part of the API or ABI, i.e. they can change
+ * without prior notice, use carefully.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_INTERNALS_H__
+#define __XML_XSLT_INTERNALS_H__
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "xsltexports.h"
+#include "numbersInternals.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* #define XSLT_DEBUG_PROFILE_CACHE */
+
+/**
+ * XSLT_IS_TEXT_NODE:
+ *
+ * check if the argument is a text node
+ */
+#define XSLT_IS_TEXT_NODE(n) ((n != NULL) && \
+ (((n)->type == XML_TEXT_NODE) || \
+ ((n)->type == XML_CDATA_SECTION_NODE)))
+
+
+/**
+ * XSLT_MARK_RES_TREE_FRAG:
+ *
+ * internal macro to set up tree fragments
+ */
+#define XSLT_MARK_RES_TREE_FRAG(n) \
+ (n)->name = (char *) xmlStrdup(BAD_CAST " fake node libxslt");
+
+/**
+ * XSLT_IS_RES_TREE_FRAG:
+ *
+ * internal macro to test tree fragments
+ */
+#define XSLT_IS_RES_TREE_FRAG(n) \
+ ((n != NULL) && ((n)->type == XML_DOCUMENT_NODE) && \
+ ((n)->name != NULL) && ((n)->name[0] == ' '))
+
+/**
+ * XSLT_REFACTORED_KEYCOMP:
+ *
+ * Internal define to enable on-demand xsl:key computation.
+ * That's the only mode now but the define is kept for compatibility
+ */
+#define XSLT_REFACTORED_KEYCOMP
+
+/**
+ * XSLT_FAST_IF:
+ *
+ * Internal define to enable usage of xmlXPathCompiledEvalToBoolean()
+ * for XSLT "tests"; e.g. in
+ */
+#define XSLT_FAST_IF
+
+/**
+ * XSLT_REFACTORED:
+ *
+ * Internal define to enable the refactored parts of Libxslt.
+ */
+/* #define XSLT_REFACTORED */
+/* ==================================================================== */
+
+/**
+ * XSLT_REFACTORED_VARS:
+ *
+ * Internal define to enable the refactored variable part of libxslt
+ */
+#define XSLT_REFACTORED_VARS
+
+#ifdef XSLT_REFACTORED
+
+extern const xmlChar *xsltXSLTAttrMarker;
+
+
+/* TODO: REMOVE: #define XSLT_REFACTORED_EXCLRESNS */
+
+/* TODO: REMOVE: #define XSLT_REFACTORED_NSALIAS */
+
+/**
+ * XSLT_REFACTORED_XSLT_NSCOMP
+ *
+ * Internal define to enable the pointer-comparison of
+ * namespaces of XSLT elements.
+ */
+/* #define XSLT_REFACTORED_XSLT_NSCOMP */
+
+#ifdef XSLT_REFACTORED_XSLT_NSCOMP
+
+extern const xmlChar *xsltConstNamespaceNameXSLT;
+
+/**
+ * IS_XSLT_ELEM_FAST:
+ *
+ * quick test to detect XSLT elements
+ */
+#define IS_XSLT_ELEM_FAST(n) \
+ (((n) != NULL) && ((n)->ns != NULL) && \
+ ((n)->ns->href == xsltConstNamespaceNameXSLT))
+
+/**
+ * IS_XSLT_ATTR_FAST:
+ *
+ * quick test to detect XSLT attributes
+ */
+#define IS_XSLT_ATTR_FAST(a) \
+ (((a) != NULL) && ((a)->ns != NULL) && \
+ ((a)->ns->href == xsltConstNamespaceNameXSLT))
+
+/**
+ * XSLT_HAS_INTERNAL_NSMAP:
+ *
+ * check for namespace mapping
+ */
+#define XSLT_HAS_INTERNAL_NSMAP(s) \
+ (((s) != NULL) && ((s)->principal) && \
+ ((s)->principal->principalData) && \
+ ((s)->principal->principalData->nsMap))
+
+/**
+ * XSLT_GET_INTERNAL_NSMAP:
+ *
+ * get pointer to namespace map
+ */
+#define XSLT_GET_INTERNAL_NSMAP(s) ((s)->principal->principalData->nsMap)
+
+#else /* XSLT_REFACTORED_XSLT_NSCOMP */
+
+/**
+ * IS_XSLT_ELEM_FAST:
+ *
+ * quick check whether this is an xslt element
+ */
+#define IS_XSLT_ELEM_FAST(n) \
+ (((n) != NULL) && ((n)->ns != NULL) && \
+ (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE)))
+
+/**
+ * IS_XSLT_ATTR_FAST:
+ *
+ * quick check for xslt namespace attribute
+ */
+#define IS_XSLT_ATTR_FAST(a) \
+ (((a) != NULL) && ((a)->ns != NULL) && \
+ (xmlStrEqual((a)->ns->href, XSLT_NAMESPACE)))
+
+
+#endif /* XSLT_REFACTORED_XSLT_NSCOMP */
+
+
+/**
+ * XSLT_REFACTORED_MANDATORY_VERSION:
+ *
+ * TODO: Currently disabled to surpress regression test failures, since
+ * the old behaviour was that a missing version attribute
+ * produced a only a warning and not an error, which was incerrect.
+ * So the regression tests need to be fixed if this is enabled.
+ */
+/* #define XSLT_REFACTORED_MANDATORY_VERSION */
+
+/**
+ * xsltPointerList:
+ *
+ * Pointer-list for various purposes.
+ */
+typedef struct _xsltPointerList xsltPointerList;
+typedef xsltPointerList *xsltPointerListPtr;
+struct _xsltPointerList {
+ void **items;
+ int number;
+ int size;
+};
+
+#endif
+
+/**
+ * XSLT_REFACTORED_PARSING:
+ *
+ * Internal define to enable the refactored parts of Libxslt
+ * related to parsing.
+ */
+/* #define XSLT_REFACTORED_PARSING */
+
+/**
+ * XSLT_MAX_SORT:
+ *
+ * Max number of specified xsl:sort on an element.
+ */
+#define XSLT_MAX_SORT 15
+
+/**
+ * XSLT_PAT_NO_PRIORITY:
+ *
+ * Specific value for pattern without priority expressed.
+ */
+#define XSLT_PAT_NO_PRIORITY -12345789
+
+/**
+ * xsltRuntimeExtra:
+ *
+ * Extra information added to the transformation context.
+ */
+typedef struct _xsltRuntimeExtra xsltRuntimeExtra;
+typedef xsltRuntimeExtra *xsltRuntimeExtraPtr;
+struct _xsltRuntimeExtra {
+ void *info; /* pointer to the extra data */
+ xmlFreeFunc deallocate; /* pointer to the deallocation routine */
+ union { /* dual-purpose field */
+ void *ptr; /* data not needing deallocation */
+ int ival; /* integer value storage */
+ } val;
+};
+
+/**
+ * XSLT_RUNTIME_EXTRA_LST:
+ * @ctxt: the transformation context
+ * @nr: the index
+ *
+ * Macro used to access extra information stored in the context
+ */
+#define XSLT_RUNTIME_EXTRA_LST(ctxt, nr) (ctxt)->extras[(nr)].info
+/**
+ * XSLT_RUNTIME_EXTRA_FREE:
+ * @ctxt: the transformation context
+ * @nr: the index
+ *
+ * Macro used to free extra information stored in the context
+ */
+#define XSLT_RUNTIME_EXTRA_FREE(ctxt, nr) (ctxt)->extras[(nr)].deallocate
+/**
+ * XSLT_RUNTIME_EXTRA:
+ * @ctxt: the transformation context
+ * @nr: the index
+ *
+ * Macro used to define extra information stored in the context
+ */
+#define XSLT_RUNTIME_EXTRA(ctxt, nr, typ) (ctxt)->extras[(nr)].val.typ
+
+/**
+ * xsltTemplate:
+ *
+ * The in-memory structure corresponding to an XSLT Template.
+ */
+typedef struct _xsltTemplate xsltTemplate;
+typedef xsltTemplate *xsltTemplatePtr;
+struct _xsltTemplate {
+ struct _xsltTemplate *next;/* chained list sorted by priority */
+ struct _xsltStylesheet *style;/* the containing stylesheet */
+ xmlChar *match; /* the matching string */
+ float priority; /* as given from the stylesheet, not computed */
+ const xmlChar *name; /* the local part of the name QName */
+ const xmlChar *nameURI; /* the URI part of the name QName */
+ const xmlChar *mode;/* the local part of the mode QName */
+ const xmlChar *modeURI;/* the URI part of the mode QName */
+ xmlNodePtr content; /* the template replacement value */
+ xmlNodePtr elem; /* the source element */
+
+ /*
+ * TODO: @inheritedNsNr and @inheritedNs won't be used in the
+ * refactored code.
+ */
+ int inheritedNsNr; /* number of inherited namespaces */
+ xmlNsPtr *inheritedNs;/* inherited non-excluded namespaces */
+
+ /* Profiling information */
+ int nbCalls; /* the number of time the template was called */
+ unsigned long time; /* the time spent in this template */
+ void *params; /* xsl:param instructions */
+
+ int templNr; /* Nb of templates in the stack */
+ int templMax; /* Size of the templtes stack */
+ xsltTemplatePtr *templCalledTab; /* templates called */
+ int *templCountTab; /* .. and how often */
+
+ /* Conflict resolution */
+ int position;
+};
+
+/**
+ * xsltDecimalFormat:
+ *
+ * Data structure of decimal-format.
+ */
+typedef struct _xsltDecimalFormat xsltDecimalFormat;
+typedef xsltDecimalFormat *xsltDecimalFormatPtr;
+struct _xsltDecimalFormat {
+ struct _xsltDecimalFormat *next; /* chained list */
+ xmlChar *name;
+ /* Used for interpretation of pattern */
+ xmlChar *digit;
+ xmlChar *patternSeparator;
+ /* May appear in result */
+ xmlChar *minusSign;
+ xmlChar *infinity;
+ xmlChar *noNumber; /* Not-a-number */
+ /* Used for interpretation of pattern and may appear in result */
+ xmlChar *decimalPoint;
+ xmlChar *grouping;
+ xmlChar *percent;
+ xmlChar *permille;
+ xmlChar *zeroDigit;
+ const xmlChar *nsUri;
+};
+
+/**
+ * xsltDocument:
+ *
+ * Data structure associated to a parsed document.
+ */
+typedef struct _xsltDocument xsltDocument;
+typedef xsltDocument *xsltDocumentPtr;
+struct _xsltDocument {
+ struct _xsltDocument *next; /* documents are kept in a chained list */
+ int main; /* is this the main document */
+ xmlDocPtr doc; /* the parsed document */
+ void *keys; /* key tables storage */
+ struct _xsltDocument *includes; /* subsidiary includes */
+ int preproc; /* pre-processing already done */
+ int nbKeysComputed;
+};
+
+/**
+ * xsltKeyDef:
+ *
+ * Representation of an xsl:key.
+ */
+typedef struct _xsltKeyDef xsltKeyDef;
+typedef xsltKeyDef *xsltKeyDefPtr;
+struct _xsltKeyDef {
+ struct _xsltKeyDef *next;
+ xmlNodePtr inst;
+ xmlChar *name;
+ xmlChar *nameURI;
+ xmlChar *match;
+ xmlChar *use;
+ xmlXPathCompExprPtr comp;
+ xmlXPathCompExprPtr usecomp;
+ xmlNsPtr *nsList; /* the namespaces in scope */
+ int nsNr; /* the number of namespaces in scope */
+};
+
+/**
+ * xsltKeyTable:
+ *
+ * Holds the computed keys for key definitions of the same QName.
+ * Is owned by an xsltDocument.
+ */
+typedef struct _xsltKeyTable xsltKeyTable;
+typedef xsltKeyTable *xsltKeyTablePtr;
+struct _xsltKeyTable {
+ struct _xsltKeyTable *next;
+ xmlChar *name;
+ xmlChar *nameURI;
+ xmlHashTablePtr keys;
+};
+
+/*
+ * The in-memory structure corresponding to an XSLT Stylesheet.
+ * NOTE: most of the content is simply linked from the doc tree
+ * structure, no specific allocation is made.
+ */
+typedef struct _xsltStylesheet xsltStylesheet;
+typedef xsltStylesheet *xsltStylesheetPtr;
+
+typedef struct _xsltTransformContext xsltTransformContext;
+typedef xsltTransformContext *xsltTransformContextPtr;
+
+/**
+ * xsltElemPreComp:
+ *
+ * The in-memory structure corresponding to element precomputed data,
+ * designed to be extended by extension implementors.
+ */
+typedef struct _xsltElemPreComp xsltElemPreComp;
+typedef xsltElemPreComp *xsltElemPreCompPtr;
+
+/**
+ * xsltTransformFunction:
+ * @ctxt: the XSLT transformation context
+ * @node: the input node
+ * @inst: the stylesheet node
+ * @comp: the compiled information from the stylesheet
+ *
+ * Signature of the function associated to elements part of the
+ * stylesheet language like xsl:if or xsl:apply-templates.
+ */
+typedef void (*xsltTransformFunction) (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+
+/**
+ * xsltSortFunc:
+ * @ctxt: a transformation context
+ * @sorts: the node-set to sort
+ * @nbsorts: the number of sorts
+ *
+ * Signature of the function to use during sorting
+ */
+typedef void (*xsltSortFunc) (xsltTransformContextPtr ctxt, xmlNodePtr *sorts,
+ int nbsorts);
+
+typedef enum {
+ XSLT_FUNC_COPY=1,
+ XSLT_FUNC_SORT,
+ XSLT_FUNC_TEXT,
+ XSLT_FUNC_ELEMENT,
+ XSLT_FUNC_ATTRIBUTE,
+ XSLT_FUNC_COMMENT,
+ XSLT_FUNC_PI,
+ XSLT_FUNC_COPYOF,
+ XSLT_FUNC_VALUEOF,
+ XSLT_FUNC_NUMBER,
+ XSLT_FUNC_APPLYIMPORTS,
+ XSLT_FUNC_CALLTEMPLATE,
+ XSLT_FUNC_APPLYTEMPLATES,
+ XSLT_FUNC_CHOOSE,
+ XSLT_FUNC_IF,
+ XSLT_FUNC_FOREACH,
+ XSLT_FUNC_DOCUMENT,
+ XSLT_FUNC_WITHPARAM,
+ XSLT_FUNC_PARAM,
+ XSLT_FUNC_VARIABLE,
+ XSLT_FUNC_WHEN,
+ XSLT_FUNC_EXTENSION
+#ifdef XSLT_REFACTORED
+ ,
+ XSLT_FUNC_OTHERWISE,
+ XSLT_FUNC_FALLBACK,
+ XSLT_FUNC_MESSAGE,
+ XSLT_FUNC_INCLUDE,
+ XSLT_FUNC_ATTRSET,
+ XSLT_FUNC_LITERAL_RESULT_ELEMENT,
+ XSLT_FUNC_UNKOWN_FORWARDS_COMPAT
+#endif
+} xsltStyleType;
+
+/**
+ * xsltElemPreCompDeallocator:
+ * @comp: the #xsltElemPreComp to free up
+ *
+ * Deallocates an #xsltElemPreComp structure.
+ */
+typedef void (*xsltElemPreCompDeallocator) (xsltElemPreCompPtr comp);
+
+/**
+ * xsltElemPreComp:
+ *
+ * The basic structure for compiled items of the AST of the XSLT processor.
+ * This structure is also intended to be extended by extension implementors.
+ * TODO: This is somehow not nice, since it has a "free" field, which
+ * derived stylesheet-structs do not have.
+ */
+struct _xsltElemPreComp {
+ xsltElemPreCompPtr next; /* next item in the global chained
+ list held by xsltStylesheet. */
+ xsltStyleType type; /* type of the element */
+ xsltTransformFunction func; /* handling function */
+ xmlNodePtr inst; /* the node in the stylesheet's tree
+ corresponding to this item */
+
+ /* end of common part */
+ xsltElemPreCompDeallocator free; /* the deallocator */
+};
+
+/**
+ * xsltStylePreComp:
+ *
+ * The abstract basic structure for items of the XSLT processor.
+ * This includes:
+ * 1) compiled forms of XSLT instructions (xsl:if, xsl:attribute, etc.)
+ * 2) compiled forms of literal result elements
+ * 3) compiled forms of extension elements
+ */
+typedef struct _xsltStylePreComp xsltStylePreComp;
+typedef xsltStylePreComp *xsltStylePreCompPtr;
+
+#ifdef XSLT_REFACTORED
+
+/*
+* Some pointer-list utility functions.
+*/
+XSLTPUBFUN xsltPointerListPtr XSLTCALL
+ xsltPointerListCreate (int initialSize);
+XSLTPUBFUN void XSLTCALL
+ xsltPointerListFree (xsltPointerListPtr list);
+XSLTPUBFUN void XSLTCALL
+ xsltPointerListClear (xsltPointerListPtr list);
+XSLTPUBFUN int XSLTCALL
+ xsltPointerListAddSize (xsltPointerListPtr list,
+ void *item,
+ int initialSize);
+
+/************************************************************************
+ * *
+ * Refactored structures *
+ * *
+ ************************************************************************/
+
+typedef struct _xsltNsListContainer xsltNsListContainer;
+typedef xsltNsListContainer *xsltNsListContainerPtr;
+struct _xsltNsListContainer {
+ xmlNsPtr *list;
+ int totalNumber;
+ int xpathNumber;
+};
+
+/**
+ * XSLT_ITEM_COMPATIBILITY_FIELDS:
+ *
+ * Fields for API compatibility to the structure
+ * _xsltElemPreComp which is used for extension functions.
+ * Note that @next is used for storage; it does not reflect a next
+ * sibling in the tree.
+ * TODO: Evaluate if we really need such a compatibility.
+ */
+#define XSLT_ITEM_COMPATIBILITY_FIELDS \
+ xsltElemPreCompPtr next;\
+ xsltStyleType type;\
+ xsltTransformFunction func;\
+ xmlNodePtr inst;
+
+/**
+ * XSLT_ITEM_NAVIGATION_FIELDS:
+ *
+ * Currently empty.
+ * TODO: It is intended to hold navigational fields in the future.
+ */
+#define XSLT_ITEM_NAVIGATION_FIELDS
+/*
+ xsltStylePreCompPtr parent;\
+ xsltStylePreCompPtr children;\
+ xsltStylePreCompPtr nextItem;
+*/
+
+/**
+ * XSLT_ITEM_NSINSCOPE_FIELDS:
+ *
+ * The in-scope namespaces.
+ */
+#define XSLT_ITEM_NSINSCOPE_FIELDS xsltNsListContainerPtr inScopeNs;
+
+/**
+ * XSLT_ITEM_COMMON_FIELDS:
+ *
+ * Common fields used for all items.
+ */
+#define XSLT_ITEM_COMMON_FIELDS \
+ XSLT_ITEM_COMPATIBILITY_FIELDS \
+ XSLT_ITEM_NAVIGATION_FIELDS \
+ XSLT_ITEM_NSINSCOPE_FIELDS
+
+/**
+ * _xsltStylePreComp:
+ *
+ * The abstract basic structure for items of the XSLT processor.
+ * This includes:
+ * 1) compiled forms of XSLT instructions (e.g. xsl:if, xsl:attribute, etc.)
+ * 2) compiled forms of literal result elements
+ * 3) various properties for XSLT instructions (e.g. xsl:when,
+ * xsl:with-param)
+ *
+ * REVISIT TODO: Keep this structure equal to the fields
+ * defined by XSLT_ITEM_COMMON_FIELDS
+ */
+struct _xsltStylePreComp {
+ xsltElemPreCompPtr next; /* next item in the global chained
+ list held by xsltStylesheet */
+ xsltStyleType type; /* type of the item */
+ xsltTransformFunction func; /* handling function */
+ xmlNodePtr inst; /* the node in the stylesheet's tree
+ corresponding to this item. */
+ /* Currently no navigational fields. */
+ xsltNsListContainerPtr inScopeNs;
+};
+
+/**
+ * xsltStyleBasicEmptyItem:
+ *
+ * Abstract structure only used as a short-cut for
+ * XSLT items with no extra fields.
+ * NOTE that it is intended that this structure looks the same as
+ * _xsltStylePreComp.
+ */
+typedef struct _xsltStyleBasicEmptyItem xsltStyleBasicEmptyItem;
+typedef xsltStyleBasicEmptyItem *xsltStyleBasicEmptyItemPtr;
+
+struct _xsltStyleBasicEmptyItem {
+ XSLT_ITEM_COMMON_FIELDS
+};
+
+/**
+ * xsltStyleBasicExpressionItem:
+ *
+ * Abstract structure only used as a short-cut for
+ * XSLT items with just an expression.
+ */
+typedef struct _xsltStyleBasicExpressionItem xsltStyleBasicExpressionItem;
+typedef xsltStyleBasicExpressionItem *xsltStyleBasicExpressionItemPtr;
+
+struct _xsltStyleBasicExpressionItem {
+ XSLT_ITEM_COMMON_FIELDS
+
+ const xmlChar *select; /* TODO: Change this to "expression". */
+ xmlXPathCompExprPtr comp; /* TODO: Change this to compExpr. */
+};
+
+/************************************************************************
+ * *
+ * XSLT-instructions/declarations *
+ * *
+ ************************************************************************/
+
+/**
+ * xsltStyleItemElement:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef struct _xsltStyleItemElement xsltStyleItemElement;
+typedef xsltStyleItemElement *xsltStyleItemElementPtr;
+
+struct _xsltStyleItemElement {
+ XSLT_ITEM_COMMON_FIELDS
+
+ const xmlChar *use;
+ int has_use;
+ const xmlChar *name;
+ int has_name;
+ const xmlChar *ns;
+ const xmlChar *nsPrefix;
+ int has_ns;
+};
+
+/**
+ * xsltStyleItemAttribute:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef struct _xsltStyleItemAttribute xsltStyleItemAttribute;
+typedef xsltStyleItemAttribute *xsltStyleItemAttributePtr;
+
+struct _xsltStyleItemAttribute {
+ XSLT_ITEM_COMMON_FIELDS
+ const xmlChar *name;
+ int has_name;
+ const xmlChar *ns;
+ const xmlChar *nsPrefix;
+ int has_ns;
+};
+
+/**
+ * xsltStyleItemText:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef struct _xsltStyleItemText xsltStyleItemText;
+typedef xsltStyleItemText *xsltStyleItemTextPtr;
+
+struct _xsltStyleItemText {
+ XSLT_ITEM_COMMON_FIELDS
+ int noescape; /* text */
+};
+
+/**
+ * xsltStyleItemComment:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef xsltStyleBasicEmptyItem xsltStyleItemComment;
+typedef xsltStyleItemComment *xsltStyleItemCommentPtr;
+
+/**
+ * xsltStyleItemPI:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef struct _xsltStyleItemPI xsltStyleItemPI;
+typedef xsltStyleItemPI *xsltStyleItemPIPtr;
+
+struct _xsltStyleItemPI {
+ XSLT_ITEM_COMMON_FIELDS
+ const xmlChar *name;
+ int has_name;
+};
+
+/**
+ * xsltStyleItemApplyImports:
+ *
+ *
+ *
+ */
+typedef xsltStyleBasicEmptyItem xsltStyleItemApplyImports;
+typedef xsltStyleItemApplyImports *xsltStyleItemApplyImportsPtr;
+
+/**
+ * xsltStyleItemApplyTemplates:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef struct _xsltStyleItemApplyTemplates xsltStyleItemApplyTemplates;
+typedef xsltStyleItemApplyTemplates *xsltStyleItemApplyTemplatesPtr;
+
+struct _xsltStyleItemApplyTemplates {
+ XSLT_ITEM_COMMON_FIELDS
+
+ const xmlChar *mode; /* apply-templates */
+ const xmlChar *modeURI; /* apply-templates */
+ const xmlChar *select; /* sort, copy-of, value-of, apply-templates */
+ xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
+ /* TODO: with-params */
+};
+
+/**
+ * xsltStyleItemCallTemplate:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef struct _xsltStyleItemCallTemplate xsltStyleItemCallTemplate;
+typedef xsltStyleItemCallTemplate *xsltStyleItemCallTemplatePtr;
+
+struct _xsltStyleItemCallTemplate {
+ XSLT_ITEM_COMMON_FIELDS
+
+ xsltTemplatePtr templ; /* call-template */
+ const xmlChar *name; /* element, attribute, pi */
+ int has_name; /* element, attribute, pi */
+ const xmlChar *ns; /* element */
+ int has_ns; /* element */
+ /* TODO: with-params */
+};
+
+/**
+ * xsltStyleItemCopy:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef struct _xsltStyleItemCopy xsltStyleItemCopy;
+typedef xsltStyleItemCopy *xsltStyleItemCopyPtr;
+
+struct _xsltStyleItemCopy {
+ XSLT_ITEM_COMMON_FIELDS
+ const xmlChar *use; /* copy, element */
+ int has_use; /* copy, element */
+};
+
+/**
+ * xsltStyleItemIf:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef struct _xsltStyleItemIf xsltStyleItemIf;
+typedef xsltStyleItemIf *xsltStyleItemIfPtr;
+
+struct _xsltStyleItemIf {
+ XSLT_ITEM_COMMON_FIELDS
+
+ const xmlChar *test; /* if */
+ xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
+};
+
+
+/**
+ * xsltStyleItemCopyOf:
+ *
+ *
+ *
+ */
+typedef xsltStyleBasicExpressionItem xsltStyleItemCopyOf;
+typedef xsltStyleItemCopyOf *xsltStyleItemCopyOfPtr;
+
+/**
+ * xsltStyleItemValueOf:
+ *
+ *
+ *
+ */
+typedef struct _xsltStyleItemValueOf xsltStyleItemValueOf;
+typedef xsltStyleItemValueOf *xsltStyleItemValueOfPtr;
+
+struct _xsltStyleItemValueOf {
+ XSLT_ITEM_COMMON_FIELDS
+
+ const xmlChar *select;
+ xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
+ int noescape;
+};
+
+/**
+ * xsltStyleItemNumber:
+ *
+ *
+ *
+ */
+typedef struct _xsltStyleItemNumber xsltStyleItemNumber;
+typedef xsltStyleItemNumber *xsltStyleItemNumberPtr;
+
+struct _xsltStyleItemNumber {
+ XSLT_ITEM_COMMON_FIELDS
+ xsltNumberData numdata; /* number */
+};
+
+/**
+ * xsltStyleItemChoose:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef xsltStyleBasicEmptyItem xsltStyleItemChoose;
+typedef xsltStyleItemChoose *xsltStyleItemChoosePtr;
+
+/**
+ * xsltStyleItemFallback:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef xsltStyleBasicEmptyItem xsltStyleItemFallback;
+typedef xsltStyleItemFallback *xsltStyleItemFallbackPtr;
+
+/**
+ * xsltStyleItemForEach:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef xsltStyleBasicExpressionItem xsltStyleItemForEach;
+typedef xsltStyleItemForEach *xsltStyleItemForEachPtr;
+
+/**
+ * xsltStyleItemMessage:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef struct _xsltStyleItemMessage xsltStyleItemMessage;
+typedef xsltStyleItemMessage *xsltStyleItemMessagePtr;
+
+struct _xsltStyleItemMessage {
+ XSLT_ITEM_COMMON_FIELDS
+ int terminate;
+};
+
+/**
+ * xsltStyleItemDocument:
+ *
+ * NOTE: This is not an instruction of XSLT 1.0.
+ */
+typedef struct _xsltStyleItemDocument xsltStyleItemDocument;
+typedef xsltStyleItemDocument *xsltStyleItemDocumentPtr;
+
+struct _xsltStyleItemDocument {
+ XSLT_ITEM_COMMON_FIELDS
+ int ver11; /* assigned: in xsltDocumentComp;
+ read: nowhere;
+ TODO: Check if we need. */
+ const xmlChar *filename; /* document URL */
+ int has_filename;
+};
+
+/************************************************************************
+ * *
+ * Non-instructions (actually properties of instructions/declarations) *
+ * *
+ ************************************************************************/
+
+/**
+ * xsltStyleBasicItemVariable:
+ *
+ * Basic struct for xsl:variable, xsl:param and xsl:with-param.
+ * It's currently important to have equal fields, since
+ * xsltParseStylesheetCallerParam() is used with xsl:with-param from
+ * the xslt side and with xsl:param from the exslt side (in
+ * exsltFuncFunctionFunction()).
+ *
+ * FUTURE NOTE: In XSLT 2.0 xsl:param, xsl:variable and xsl:with-param
+ * have additional different fields.
+ */
+typedef struct _xsltStyleBasicItemVariable xsltStyleBasicItemVariable;
+typedef xsltStyleBasicItemVariable *xsltStyleBasicItemVariablePtr;
+
+struct _xsltStyleBasicItemVariable {
+ XSLT_ITEM_COMMON_FIELDS
+
+ const xmlChar *select;
+ xmlXPathCompExprPtr comp;
+
+ const xmlChar *name;
+ int has_name;
+ const xmlChar *ns;
+ int has_ns;
+};
+
+/**
+ * xsltStyleItemVariable:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef xsltStyleBasicItemVariable xsltStyleItemVariable;
+typedef xsltStyleItemVariable *xsltStyleItemVariablePtr;
+
+/**
+ * xsltStyleItemParam:
+ *
+ *
+ *
+ *
+ *
+ */
+typedef struct _xsltStyleItemParam xsltStyleItemParam;
+typedef xsltStyleItemParam *xsltStyleItemParamPtr;
+
+struct _xsltStyleItemParam {
+ XSLT_ITEM_COMMON_FIELDS
+
+ const xmlChar *select;
+ xmlXPathCompExprPtr comp;
+
+ const xmlChar *name;
+ int has_name;
+ const xmlChar *ns;
+ int has_ns;
+};
+
+/**
+ * xsltStyleItemWithParam:
+ *
+ *
+ *
+ *
+ */
+typedef xsltStyleBasicItemVariable xsltStyleItemWithParam;
+typedef xsltStyleItemWithParam *xsltStyleItemWithParamPtr;
+
+/**
+ * xsltStyleItemSort:
+ *
+ * Reflects the XSLT xsl:sort item.
+ * Allowed parents: xsl:apply-templates, xsl:for-each
+ *
+ */
+typedef struct _xsltStyleItemSort xsltStyleItemSort;
+typedef xsltStyleItemSort *xsltStyleItemSortPtr;
+
+struct _xsltStyleItemSort {
+ XSLT_ITEM_COMMON_FIELDS
+
+ const xmlChar *stype; /* sort */
+ int has_stype; /* sort */
+ int number; /* sort */
+ const xmlChar *order; /* sort */
+ int has_order; /* sort */
+ int descending; /* sort */
+ const xmlChar *lang; /* sort */
+ int has_lang; /* sort */
+ const xmlChar *case_order; /* sort */
+ int lower_first; /* sort */
+
+ const xmlChar *use;
+ int has_use;
+
+ const xmlChar *select; /* sort, copy-of, value-of, apply-templates */
+
+ xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
+};
+
+
+/**
+ * xsltStyleItemWhen:
+ *
+ *
+ *
+ *
+ * Allowed parent: xsl:choose
+ */
+typedef struct _xsltStyleItemWhen xsltStyleItemWhen;
+typedef xsltStyleItemWhen *xsltStyleItemWhenPtr;
+
+struct _xsltStyleItemWhen {
+ XSLT_ITEM_COMMON_FIELDS
+
+ const xmlChar *test;
+ xmlXPathCompExprPtr comp;
+};
+
+/**
+ * xsltStyleItemOtherwise:
+ *
+ * Allowed parent: xsl:choose
+ *
+ *
+ *
+ */
+typedef struct _xsltStyleItemOtherwise xsltStyleItemOtherwise;
+typedef xsltStyleItemOtherwise *xsltStyleItemOtherwisePtr;
+
+struct _xsltStyleItemOtherwise {
+ XSLT_ITEM_COMMON_FIELDS
+};
+
+typedef struct _xsltStyleItemInclude xsltStyleItemInclude;
+typedef xsltStyleItemInclude *xsltStyleItemIncludePtr;
+
+struct _xsltStyleItemInclude {
+ XSLT_ITEM_COMMON_FIELDS
+ xsltDocumentPtr include;
+};
+
+/************************************************************************
+ * *
+ * XSLT elements in forwards-compatible mode *
+ * *
+ ************************************************************************/
+
+typedef struct _xsltStyleItemUknown xsltStyleItemUknown;
+typedef xsltStyleItemUknown *xsltStyleItemUknownPtr;
+struct _xsltStyleItemUknown {
+ XSLT_ITEM_COMMON_FIELDS
+};
+
+
+/************************************************************************
+ * *
+ * Extension elements *
+ * *
+ ************************************************************************/
+
+/*
+ * xsltStyleItemExtElement:
+ *
+ * Reflects extension elements.
+ *
+ * NOTE: Due to the fact that the structure xsltElemPreComp is most
+ * probably already heavily in use out there by users, so we cannot
+ * easily change it, we'll create an intermediate structure which will
+ * hold an xsltElemPreCompPtr.
+ * BIG NOTE: The only problem I see here is that the user processes the
+ * content of the stylesheet tree, possibly he'll lookup the node->psvi
+ * fields in order to find subsequent extension functions.
+ * In this case, the user's code will break, since the node->psvi
+ * field will hold now the xsltStyleItemExtElementPtr and not
+ * the xsltElemPreCompPtr.
+ * However the place where the structure is anchored in the node-tree,
+ * namely node->psvi, has beed already once been moved from node->_private
+ * to node->psvi, so we have a precedent here, which, I think, should allow
+ * us to change such semantics without headaches.
+ */
+typedef struct _xsltStyleItemExtElement xsltStyleItemExtElement;
+typedef xsltStyleItemExtElement *xsltStyleItemExtElementPtr;
+struct _xsltStyleItemExtElement {
+ XSLT_ITEM_COMMON_FIELDS
+ xsltElemPreCompPtr item;
+};
+
+/************************************************************************
+ * *
+ * Literal result elements *
+ * *
+ ************************************************************************/
+
+typedef struct _xsltEffectiveNs xsltEffectiveNs;
+typedef xsltEffectiveNs *xsltEffectiveNsPtr;
+struct _xsltEffectiveNs {
+ xsltEffectiveNsPtr nextInStore; /* storage next */
+ xsltEffectiveNsPtr next; /* next item in the list */
+ const xmlChar *prefix;
+ const xmlChar *nsName;
+ /*
+ * Indicates if eclared on the literal result element; dunno if really
+ * needed.
+ */
+ int holdByElem;
+};
+
+/*
+ * Info for literal result elements.
+ * This will be set on the elem->psvi field and will be
+ * shared by literal result elements, which have the same
+ * excluded result namespaces; i.e., this *won't* be created uniquely
+ * for every literal result element.
+ */
+typedef struct _xsltStyleItemLRElementInfo xsltStyleItemLRElementInfo;
+typedef xsltStyleItemLRElementInfo *xsltStyleItemLRElementInfoPtr;
+struct _xsltStyleItemLRElementInfo {
+ XSLT_ITEM_COMMON_FIELDS
+ /*
+ * @effectiveNs is the set of effective ns-nodes
+ * on the literal result element, which will be added to the result
+ * element if not already existing in the result tree.
+ * This means that excluded namespaces (via exclude-result-prefixes,
+ * extension-element-prefixes and the XSLT namespace) not added
+ * to the set.
+ * Namespace-aliasing was applied on the @effectiveNs.
+ */
+ xsltEffectiveNsPtr effectiveNs;
+
+};
+
+#ifdef XSLT_REFACTORED
+
+typedef struct _xsltNsAlias xsltNsAlias;
+typedef xsltNsAlias *xsltNsAliasPtr;
+struct _xsltNsAlias {
+ xsltNsAliasPtr next; /* next in the list */
+ xmlNsPtr literalNs;
+ xmlNsPtr targetNs;
+ xmlDocPtr docOfTargetNs;
+};
+#endif
+
+#ifdef XSLT_REFACTORED_XSLT_NSCOMP
+
+typedef struct _xsltNsMap xsltNsMap;
+typedef xsltNsMap *xsltNsMapPtr;
+struct _xsltNsMap {
+ xsltNsMapPtr next; /* next in the list */
+ xmlDocPtr doc;
+ xmlNodePtr elem; /* the element holding the ns-decl */
+ xmlNsPtr ns; /* the xmlNs structure holding the XML namespace name */
+ const xmlChar *origNsName; /* the original XML namespace name */
+ const xmlChar *newNsName; /* the mapped XML namespace name */
+};
+#endif
+
+/************************************************************************
+ * *
+ * Compile-time structures for *internal* use only *
+ * *
+ ************************************************************************/
+
+typedef struct _xsltPrincipalStylesheetData xsltPrincipalStylesheetData;
+typedef xsltPrincipalStylesheetData *xsltPrincipalStylesheetDataPtr;
+
+typedef struct _xsltNsList xsltNsList;
+typedef xsltNsList *xsltNsListPtr;
+struct _xsltNsList {
+ xsltNsListPtr next; /* next in the list */
+ xmlNsPtr ns;
+};
+
+/*
+* xsltVarInfo:
+*
+* Used at compilation time for parameters and variables.
+*/
+typedef struct _xsltVarInfo xsltVarInfo;
+typedef xsltVarInfo *xsltVarInfoPtr;
+struct _xsltVarInfo {
+ xsltVarInfoPtr next; /* next in the list */
+ xsltVarInfoPtr prev;
+ int depth; /* the depth in the tree */
+ const xmlChar *name;
+ const xmlChar *nsName;
+};
+
+/**
+ * xsltCompilerNodeInfo:
+ *
+ * Per-node information during compile-time.
+ */
+typedef struct _xsltCompilerNodeInfo xsltCompilerNodeInfo;
+typedef xsltCompilerNodeInfo *xsltCompilerNodeInfoPtr;
+struct _xsltCompilerNodeInfo {
+ xsltCompilerNodeInfoPtr next;
+ xsltCompilerNodeInfoPtr prev;
+ xmlNodePtr node;
+ int depth;
+ xsltTemplatePtr templ; /* The owning template */
+ int category; /* XSLT element, LR-element or
+ extension element */
+ xsltStyleType type;
+ xsltElemPreCompPtr item; /* The compiled information */
+ /* The current in-scope namespaces */
+ xsltNsListContainerPtr inScopeNs;
+ /* The current excluded result namespaces */
+ xsltPointerListPtr exclResultNs;
+ /* The current extension instruction namespaces */
+ xsltPointerListPtr extElemNs;
+
+ /* The current info for literal result elements. */
+ xsltStyleItemLRElementInfoPtr litResElemInfo;
+ /*
+ * Set to 1 if in-scope namespaces changed,
+ * or excluded result namespaces changed,
+ * or extension element namespaces changed.
+ * This will trigger creation of new infos
+ * for literal result elements.
+ */
+ int nsChanged;
+ int preserveWhitespace;
+ int stripWhitespace;
+ int isRoot; /* whether this is the stylesheet's root node */
+ int forwardsCompat; /* whether forwards-compatible mode is enabled */
+ /* whether the content of an extension element was processed */
+ int extContentHandled;
+ /* the type of the current child */
+ xsltStyleType curChildType;
+};
+
+/**
+ * XSLT_CCTXT:
+ *
+ * get pointer to compiler context
+ */
+#define XSLT_CCTXT(style) ((xsltCompilerCtxtPtr) style->compCtxt)
+
+typedef enum {
+ XSLT_ERROR_SEVERITY_ERROR = 0,
+ XSLT_ERROR_SEVERITY_WARNING
+} xsltErrorSeverityType;
+
+typedef struct _xsltCompilerCtxt xsltCompilerCtxt;
+typedef xsltCompilerCtxt *xsltCompilerCtxtPtr;
+struct _xsltCompilerCtxt {
+ void *errorCtxt; /* user specific error context */
+ /*
+ * used for error/warning reports; e.g. XSLT_ERROR_SEVERITY_WARNING */
+ xsltErrorSeverityType errSeverity;
+ int warnings; /* TODO: number of warnings found at
+ compilation */
+ int errors; /* TODO: number of errors found at
+ compilation */
+ xmlDictPtr dict;
+ xsltStylesheetPtr style;
+ int simplified; /* whether this is a simplified stylesheet */
+ /* TODO: structured/unstructured error contexts. */
+ int depth; /* Current depth of processing */
+
+ xsltCompilerNodeInfoPtr inode;
+ xsltCompilerNodeInfoPtr inodeList;
+ xsltCompilerNodeInfoPtr inodeLast;
+ xsltPointerListPtr tmpList; /* Used for various purposes */
+ /*
+ * The XSLT version as specified by the stylesheet's root element.
+ */
+ int isInclude;
+ int hasForwardsCompat; /* whether forwards-compatible mode was used
+ in a parsing episode */
+ int maxNodeInfos; /* TEMP TODO: just for the interest */
+ int maxLREs; /* TEMP TODO: just for the interest */
+ /*
+ * In order to keep the old behaviour, applying strict rules of
+ * the spec can be turned off. This has effect only on special
+ * mechanisms like whitespace-stripping in the stylesheet.
+ */
+ int strict;
+ xsltPrincipalStylesheetDataPtr psData;
+ xsltStyleItemUknownPtr unknownItem;
+ int hasNsAliases; /* Indicator if there was an xsl:namespace-alias. */
+ xsltNsAliasPtr nsAliases;
+ xsltVarInfoPtr ivars; /* Storage of local in-scope variables/params. */
+ xsltVarInfoPtr ivar; /* topmost local variable/param. */
+};
+
+#else /* XSLT_REFACTORED */
+/*
+* The old structures before refactoring.
+*/
+
+/**
+ * _xsltStylePreComp:
+ *
+ * The in-memory structure corresponding to XSLT stylesheet constructs
+ * precomputed data.
+ */
+struct _xsltStylePreComp {
+ xsltElemPreCompPtr next; /* chained list */
+ xsltStyleType type; /* type of the element */
+ xsltTransformFunction func; /* handling function */
+ xmlNodePtr inst; /* the instruction */
+
+ /*
+ * Pre computed values.
+ */
+
+ const xmlChar *stype; /* sort */
+ int has_stype; /* sort */
+ int number; /* sort */
+ const xmlChar *order; /* sort */
+ int has_order; /* sort */
+ int descending; /* sort */
+ const xmlChar *lang; /* sort */
+ int has_lang; /* sort */
+ const xmlChar *case_order; /* sort */
+ int lower_first; /* sort */
+
+ const xmlChar *use; /* copy, element */
+ int has_use; /* copy, element */
+
+ int noescape; /* text */
+
+ const xmlChar *name; /* element, attribute, pi */
+ int has_name; /* element, attribute, pi */
+ const xmlChar *ns; /* element */
+ int has_ns; /* element */
+
+ const xmlChar *mode; /* apply-templates */
+ const xmlChar *modeURI; /* apply-templates */
+
+ const xmlChar *test; /* if */
+
+ xsltTemplatePtr templ; /* call-template */
+
+ const xmlChar *select; /* sort, copy-of, value-of, apply-templates */
+
+ int ver11; /* document */
+ const xmlChar *filename; /* document URL */
+ int has_filename; /* document */
+
+ xsltNumberData numdata; /* number */
+
+ xmlXPathCompExprPtr comp; /* a precompiled XPath expression */
+ xmlNsPtr *nsList; /* the namespaces in scope */
+ int nsNr; /* the number of namespaces in scope */
+};
+
+#endif /* XSLT_REFACTORED */
+
+
+/*
+ * The in-memory structure corresponding to an XSLT Variable
+ * or Param.
+ */
+typedef struct _xsltStackElem xsltStackElem;
+typedef xsltStackElem *xsltStackElemPtr;
+struct _xsltStackElem {
+ struct _xsltStackElem *next;/* chained list */
+ xsltStylePreCompPtr comp; /* the compiled form */
+ int computed; /* was the evaluation done */
+ const xmlChar *name; /* the local part of the name QName */
+ const xmlChar *nameURI; /* the URI part of the name QName */
+ const xmlChar *select; /* the eval string */
+ xmlNodePtr tree; /* the sequence constructor if no eval
+ string or the location */
+ xmlXPathObjectPtr value; /* The value if computed */
+ xmlDocPtr fragment; /* The Result Tree Fragments (needed for XSLT 1.0)
+ which are bound to the variable's lifetime. */
+ int level; /* the depth in the tree;
+ -1 if persistent (e.g. a given xsl:with-param) */
+ xsltTransformContextPtr context; /* The transformation context; needed to cache
+ the variables */
+ int flags;
+};
+
+#ifdef XSLT_REFACTORED
+
+struct _xsltPrincipalStylesheetData {
+ /*
+ * Namespace dictionary for ns-prefixes and ns-names:
+ * TODO: Shared between stylesheets, and XPath mechanisms.
+ * Not used yet.
+ */
+ xmlDictPtr namespaceDict;
+ /*
+ * Global list of in-scope namespaces.
+ */
+ xsltPointerListPtr inScopeNamespaces;
+ /*
+ * Global list of information for [xsl:]excluded-result-prefixes.
+ */
+ xsltPointerListPtr exclResultNamespaces;
+ /*
+ * Global list of information for [xsl:]extension-element-prefixes.
+ */
+ xsltPointerListPtr extElemNamespaces;
+ xsltEffectiveNsPtr effectiveNs;
+#ifdef XSLT_REFACTORED_XSLT_NSCOMP
+ /*
+ * Namespace name map to get rid of string comparison of namespace names.
+ */
+ xsltNsMapPtr nsMap;
+#endif
+};
+
+
+#endif
+/*
+ * Note that we added a @compCtxt field to anchor an stylesheet compilation
+ * context, since, due to historical reasons, various compile-time function
+ * take only the stylesheet as argument and not a compilation context.
+ */
+struct _xsltStylesheet {
+ /*
+ * The stylesheet import relation is kept as a tree.
+ */
+ struct _xsltStylesheet *parent;
+ struct _xsltStylesheet *next;
+ struct _xsltStylesheet *imports;
+
+ xsltDocumentPtr docList; /* the include document list */
+
+ /*
+ * General data on the style sheet document.
+ */
+ xmlDocPtr doc; /* the parsed XML stylesheet */
+ xmlHashTablePtr stripSpaces;/* the hash table of the strip-space and
+ preserve space elements */
+ int stripAll; /* strip-space * (1) preserve-space * (-1) */
+ xmlHashTablePtr cdataSection;/* the hash table of the cdata-section */
+
+ /*
+ * Global variable or parameters.
+ */
+ xsltStackElemPtr variables; /* linked list of param and variables */
+
+ /*
+ * Template descriptions.
+ */
+ xsltTemplatePtr templates; /* the ordered list of templates */
+ xmlHashTablePtr templatesHash; /* hash table or wherever compiled
+ templates information is stored */
+ struct _xsltCompMatch *rootMatch; /* template based on / */
+ struct _xsltCompMatch *keyMatch; /* template based on key() */
+ struct _xsltCompMatch *elemMatch; /* template based on * */
+ struct _xsltCompMatch *attrMatch; /* template based on @* */
+ struct _xsltCompMatch *parentMatch; /* template based on .. */
+ struct _xsltCompMatch *textMatch; /* template based on text() */
+ struct _xsltCompMatch *piMatch; /* template based on
+ processing-instruction() */
+ struct _xsltCompMatch *commentMatch; /* template based on comment() */
+
+ /*
+ * Namespace aliases.
+ * NOTE: Not used in the refactored code.
+ */
+ xmlHashTablePtr nsAliases; /* the namespace alias hash tables */
+
+ /*
+ * Attribute sets.
+ */
+ xmlHashTablePtr attributeSets;/* the attribute sets hash tables */
+
+ /*
+ * Namespaces.
+ * TODO: Eliminate this.
+ */
+ xmlHashTablePtr nsHash; /* the set of namespaces in use:
+ ATTENTION: This is used for
+ execution of XPath expressions; unfortunately
+ it restricts the stylesheet to have distinct
+ prefixes.
+ TODO: We need to get rid of this.
+ */
+ void *nsDefs; /* ATTENTION TODO: This is currently used to store
+ xsltExtDefPtr (in extensions.c) and
+ *not* xmlNsPtr.
+ */
+
+ /*
+ * Key definitions.
+ */
+ void *keys; /* key definitions */
+
+ /*
+ * Output related stuff.
+ */
+ xmlChar *method; /* the output method */
+ xmlChar *methodURI; /* associated namespace if any */
+ xmlChar *version; /* version string */
+ xmlChar *encoding; /* encoding string */
+ int omitXmlDeclaration; /* omit-xml-declaration = "yes" | "no" */
+
+ /*
+ * Number formatting.
+ */
+ xsltDecimalFormatPtr decimalFormat;
+ int standalone; /* standalone = "yes" | "no" */
+ xmlChar *doctypePublic; /* doctype-public string */
+ xmlChar *doctypeSystem; /* doctype-system string */
+ int indent; /* should output being indented */
+ xmlChar *mediaType; /* media-type string */
+
+ /*
+ * Precomputed blocks.
+ */
+ xsltElemPreCompPtr preComps;/* list of precomputed blocks */
+ int warnings; /* number of warnings found at compilation */
+ int errors; /* number of errors found at compilation */
+
+ xmlChar *exclPrefix; /* last excluded prefixes */
+ xmlChar **exclPrefixTab; /* array of excluded prefixes */
+ int exclPrefixNr; /* number of excluded prefixes in scope */
+ int exclPrefixMax; /* size of the array */
+
+ void *_private; /* user defined data */
+
+ /*
+ * Extensions.
+ */
+ xmlHashTablePtr extInfos; /* the extension data */
+ int extrasNr; /* the number of extras required */
+
+ /*
+ * For keeping track of nested includes
+ */
+ xsltDocumentPtr includes; /* points to last nested include */
+
+ /*
+ * dictionary: shared between stylesheet, context and documents.
+ */
+ xmlDictPtr dict;
+ /*
+ * precompiled attribute value templates.
+ */
+ void *attVTs;
+ /*
+ * if namespace-alias has an alias for the default stylesheet prefix
+ * NOTE: Not used in the refactored code.
+ */
+ const xmlChar *defaultAlias;
+ /*
+ * bypass pre-processing (already done) (used in imports)
+ */
+ int nopreproc;
+ /*
+ * all document text strings were internalized
+ */
+ int internalized;
+ /*
+ * Literal Result Element as Stylesheet c.f. section 2.3
+ */
+ int literal_result;
+ /*
+ * The principal stylesheet
+ */
+ xsltStylesheetPtr principal;
+#ifdef XSLT_REFACTORED
+ /*
+ * Compilation context used during compile-time.
+ */
+ xsltCompilerCtxtPtr compCtxt; /* TODO: Change this to (void *). */
+
+ xsltPrincipalStylesheetDataPtr principalData;
+#endif
+ /*
+ * Forwards-compatible processing
+ */
+ int forwards_compatible;
+
+ xmlHashTablePtr namedTemplates; /* hash table of named templates */
+
+ xmlXPathContextPtr xpathCtxt;
+
+ unsigned long opLimit;
+ unsigned long opCount;
+};
+
+typedef struct _xsltTransformCache xsltTransformCache;
+typedef xsltTransformCache *xsltTransformCachePtr;
+struct _xsltTransformCache {
+ xmlDocPtr RVT;
+ int nbRVT;
+ xsltStackElemPtr stackItems;
+ int nbStackItems;
+#ifdef XSLT_DEBUG_PROFILE_CACHE
+ int dbgCachedRVTs;
+ int dbgReusedRVTs;
+ int dbgCachedVars;
+ int dbgReusedVars;
+#endif
+};
+
+/*
+ * The in-memory structure corresponding to an XSLT Transformation.
+ */
+typedef enum {
+ XSLT_OUTPUT_XML = 0,
+ XSLT_OUTPUT_HTML,
+ XSLT_OUTPUT_TEXT
+} xsltOutputType;
+
+typedef void *
+(*xsltNewLocaleFunc)(const xmlChar *lang, int lowerFirst);
+typedef void
+(*xsltFreeLocaleFunc)(void *locale);
+typedef xmlChar *
+(*xsltGenSortKeyFunc)(void *locale, const xmlChar *lang);
+
+typedef enum {
+ XSLT_STATE_OK = 0,
+ XSLT_STATE_ERROR,
+ XSLT_STATE_STOPPED
+} xsltTransformState;
+
+struct _xsltTransformContext {
+ xsltStylesheetPtr style; /* the stylesheet used */
+ xsltOutputType type; /* the type of output */
+
+ xsltTemplatePtr templ; /* the current template */
+ int templNr; /* Nb of templates in the stack */
+ int templMax; /* Size of the templtes stack */
+ xsltTemplatePtr *templTab; /* the template stack */
+
+ xsltStackElemPtr vars; /* the current variable list */
+ int varsNr; /* Nb of variable list in the stack */
+ int varsMax; /* Size of the variable list stack */
+ xsltStackElemPtr *varsTab; /* the variable list stack */
+ int varsBase; /* the var base for current templ */
+
+ /*
+ * Extensions
+ */
+ xmlHashTablePtr extFunctions; /* the extension functions */
+ xmlHashTablePtr extElements; /* the extension elements */
+ xmlHashTablePtr extInfos; /* the extension data */
+
+ const xmlChar *mode; /* the current mode */
+ const xmlChar *modeURI; /* the current mode URI */
+
+ xsltDocumentPtr docList; /* the document list */
+
+ xsltDocumentPtr document; /* the current source document; can be NULL if an RTF */
+ xmlNodePtr node; /* the current node being processed */
+ xmlNodeSetPtr nodeList; /* the current node list */
+ /* xmlNodePtr current; the node */
+
+ xmlDocPtr output; /* the resulting document */
+ xmlNodePtr insert; /* the insertion node */
+
+ xmlXPathContextPtr xpathCtxt; /* the XPath context */
+ xsltTransformState state; /* the current state */
+
+ /*
+ * Global variables
+ */
+ xmlHashTablePtr globalVars; /* the global variables and params */
+
+ xmlNodePtr inst; /* the instruction in the stylesheet */
+
+ int xinclude; /* should XInclude be processed */
+
+ const char * outputFile; /* the output URI if known */
+
+ int profile; /* is this run profiled */
+ long prof; /* the current profiled value */
+ int profNr; /* Nb of templates in the stack */
+ int profMax; /* Size of the templtaes stack */
+ long *profTab; /* the profile template stack */
+
+ void *_private; /* user defined data */
+
+ int extrasNr; /* the number of extras used */
+ int extrasMax; /* the number of extras allocated */
+ xsltRuntimeExtraPtr extras; /* extra per runtime information */
+
+ xsltDocumentPtr styleList; /* the stylesheet docs list */
+ void * sec; /* the security preferences if any */
+
+ xmlGenericErrorFunc error; /* a specific error handler */
+ void * errctx; /* context for the error handler */
+
+ xsltSortFunc sortfunc; /* a ctxt specific sort routine */
+
+ /*
+ * handling of temporary Result Value Tree
+ * (XSLT 1.0 term: "Result Tree Fragment")
+ */
+ xmlDocPtr tmpRVT; /* list of RVT without persistance */
+ xmlDocPtr persistRVT; /* list of persistant RVTs */
+ int ctxtflags; /* context processing flags */
+
+ /*
+ * Speed optimization when coalescing text nodes
+ */
+ const xmlChar *lasttext; /* last text node content */
+ int lasttsize; /* last text node size */
+ int lasttuse; /* last text node use */
+ /*
+ * Per Context Debugging
+ */
+ int debugStatus; /* the context level debug status */
+ unsigned long* traceCode; /* pointer to the variable holding the mask */
+
+ int parserOptions; /* parser options xmlParserOption */
+
+ /*
+ * dictionary: shared between stylesheet, context and documents.
+ */
+ xmlDictPtr dict;
+ xmlDocPtr tmpDoc; /* Obsolete; not used in the library. */
+ /*
+ * all document text strings are internalized
+ */
+ int internalized;
+ int nbKeys;
+ int hasTemplKeyPatterns;
+ xsltTemplatePtr currentTemplateRule; /* the Current Template Rule */
+ xmlNodePtr initialContextNode;
+ xmlDocPtr initialContextDoc;
+ xsltTransformCachePtr cache;
+ void *contextVariable; /* the current variable item */
+ xmlDocPtr localRVT; /* list of local tree fragments; will be freed when
+ the instruction which created the fragment
+ exits */
+ xmlDocPtr localRVTBase; /* Obsolete */
+ int keyInitLevel; /* Needed to catch recursive keys issues */
+ int depth; /* Needed to catch recursions */
+ int maxTemplateDepth;
+ int maxTemplateVars;
+ unsigned long opLimit;
+ unsigned long opCount;
+ int sourceDocDirty;
+ unsigned long currentId; /* For generate-id() */
+
+ xsltNewLocaleFunc newLocale;
+ xsltFreeLocaleFunc freeLocale;
+ xsltGenSortKeyFunc genSortKey;
+};
+
+/**
+ * CHECK_STOPPED:
+ *
+ * Macro to check if the XSLT processing should be stopped.
+ * Will return from the function.
+ */
+#define CHECK_STOPPED if (ctxt->state == XSLT_STATE_STOPPED) return;
+
+/**
+ * CHECK_STOPPEDE:
+ *
+ * Macro to check if the XSLT processing should be stopped.
+ * Will goto the error: label.
+ */
+#define CHECK_STOPPEDE if (ctxt->state == XSLT_STATE_STOPPED) goto error;
+
+/**
+ * CHECK_STOPPED0:
+ *
+ * Macro to check if the XSLT processing should be stopped.
+ * Will return from the function with a 0 value.
+ */
+#define CHECK_STOPPED0 if (ctxt->state == XSLT_STATE_STOPPED) return(0);
+
+/*
+ * The macro XML_CAST_FPTR is a hack to avoid a gcc warning about
+ * possible incompatibilities between function pointers and object
+ * pointers. It is defined in libxml/hash.h within recent versions
+ * of libxml2, but is put here for compatibility.
+ */
+#ifndef XML_CAST_FPTR
+/**
+ * XML_CAST_FPTR:
+ * @fptr: pointer to a function
+ *
+ * Macro to do a casting from an object pointer to a
+ * function pointer without encountering a warning from
+ * gcc
+ *
+ * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
+ * This macro violated ISO C aliasing rules (gcc4 on s390 broke)
+ * so it is disabled now
+ */
+
+#define XML_CAST_FPTR(fptr) fptr
+#endif
+/*
+ * Functions associated to the internal types
+xsltDecimalFormatPtr xsltDecimalFormatGetByName(xsltStylesheetPtr sheet,
+ xmlChar *name);
+ */
+XSLTPUBFUN xsltStylesheetPtr XSLTCALL
+ xsltNewStylesheet (void);
+XSLTPUBFUN xsltStylesheetPtr XSLTCALL
+ xsltParseStylesheetFile (const xmlChar* filename);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeStylesheet (xsltStylesheetPtr style);
+XSLTPUBFUN int XSLTCALL
+ xsltIsBlank (xmlChar *str);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeStackElemList (xsltStackElemPtr elem);
+XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL
+ xsltDecimalFormatGetByName(xsltStylesheetPtr style,
+ xmlChar *name);
+XSLTPUBFUN xsltDecimalFormatPtr XSLTCALL
+ xsltDecimalFormatGetByQName(xsltStylesheetPtr style,
+ const xmlChar *nsUri,
+ const xmlChar *name);
+
+XSLTPUBFUN xsltStylesheetPtr XSLTCALL
+ xsltParseStylesheetProcess(xsltStylesheetPtr ret,
+ xmlDocPtr doc);
+XSLTPUBFUN void XSLTCALL
+ xsltParseStylesheetOutput(xsltStylesheetPtr style,
+ xmlNodePtr cur);
+XSLTPUBFUN xsltStylesheetPtr XSLTCALL
+ xsltParseStylesheetDoc (xmlDocPtr doc);
+XSLTPUBFUN xsltStylesheetPtr XSLTCALL
+ xsltParseStylesheetImportedDoc(xmlDocPtr doc,
+ xsltStylesheetPtr style);
+XSLTPUBFUN int XSLTCALL
+ xsltParseStylesheetUser(xsltStylesheetPtr style,
+ xmlDocPtr doc);
+XSLTPUBFUN xsltStylesheetPtr XSLTCALL
+ xsltLoadStylesheetPI (xmlDocPtr doc);
+XSLTPUBFUN void XSLTCALL
+ xsltNumberFormat (xsltTransformContextPtr ctxt,
+ xsltNumberDataPtr data,
+ xmlNodePtr node);
+XSLTPUBFUN xmlXPathError XSLTCALL
+ xsltFormatNumberConversion(xsltDecimalFormatPtr self,
+ xmlChar *format,
+ double number,
+ xmlChar **result);
+
+XSLTPUBFUN void XSLTCALL
+ xsltParseTemplateContent(xsltStylesheetPtr style,
+ xmlNodePtr templ);
+XSLTPUBFUN int XSLTCALL
+ xsltAllocateExtra (xsltStylesheetPtr style);
+XSLTPUBFUN int XSLTCALL
+ xsltAllocateExtraCtxt (xsltTransformContextPtr ctxt);
+/*
+ * Extra functions for Result Value Trees
+ */
+XSLTPUBFUN xmlDocPtr XSLTCALL
+ xsltCreateRVT (xsltTransformContextPtr ctxt);
+XSLTPUBFUN int XSLTCALL
+ xsltRegisterTmpRVT (xsltTransformContextPtr ctxt,
+ xmlDocPtr RVT);
+XSLTPUBFUN int XSLTCALL
+ xsltRegisterLocalRVT (xsltTransformContextPtr ctxt,
+ xmlDocPtr RVT);
+XSLTPUBFUN int XSLTCALL
+ xsltRegisterPersistRVT (xsltTransformContextPtr ctxt,
+ xmlDocPtr RVT);
+XSLTPUBFUN int XSLTCALL
+ xsltExtensionInstructionResultRegister(
+ xsltTransformContextPtr ctxt,
+ xmlXPathObjectPtr obj);
+XSLTPUBFUN int XSLTCALL
+ xsltExtensionInstructionResultFinalize(
+ xsltTransformContextPtr ctxt);
+XSLTPUBFUN int XSLTCALL
+ xsltFlagRVTs(
+ xsltTransformContextPtr ctxt,
+ xmlXPathObjectPtr obj,
+ int val);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeRVTs (xsltTransformContextPtr ctxt);
+XSLTPUBFUN void XSLTCALL
+ xsltReleaseRVT (xsltTransformContextPtr ctxt,
+ xmlDocPtr RVT);
+/*
+ * Extra functions for Attribute Value Templates
+ */
+XSLTPUBFUN void XSLTCALL
+ xsltCompileAttr (xsltStylesheetPtr style,
+ xmlAttrPtr attr);
+XSLTPUBFUN xmlChar * XSLTCALL
+ xsltEvalAVT (xsltTransformContextPtr ctxt,
+ void *avt,
+ xmlNodePtr node);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeAVTList (void *avt);
+
+/*
+ * Extra function for successful xsltCleanupGlobals / xsltInit sequence.
+ */
+
+XSLTPUBFUN void XSLTCALL
+ xsltUninit (void);
+
+/************************************************************************
+ * *
+ * Compile-time functions for *internal* use only *
+ * *
+ ************************************************************************/
+
+#ifdef XSLT_REFACTORED
+XSLTPUBFUN void XSLTCALL
+ xsltParseSequenceConstructor(
+ xsltCompilerCtxtPtr cctxt,
+ xmlNodePtr start);
+XSLTPUBFUN int XSLTCALL
+ xsltParseAnyXSLTElem (xsltCompilerCtxtPtr cctxt,
+ xmlNodePtr elem);
+#ifdef XSLT_REFACTORED_XSLT_NSCOMP
+XSLTPUBFUN int XSLTCALL
+ xsltRestoreDocumentNamespaces(
+ xsltNsMapPtr ns,
+ xmlDocPtr doc);
+#endif
+#endif /* XSLT_REFACTORED */
+
+/************************************************************************
+ * *
+ * Transformation-time functions for *internal* use only *
+ * *
+ ************************************************************************/
+XSLTPUBFUN int XSLTCALL
+ xsltInitCtxtKey (xsltTransformContextPtr ctxt,
+ xsltDocumentPtr doc,
+ xsltKeyDefPtr keyd);
+XSLTPUBFUN int XSLTCALL
+ xsltInitAllDocKeys (xsltTransformContextPtr ctxt);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltexports.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltexports.h
new file mode 100644
index 0000000000000000000000000000000000000000..95c352fee2a808c4e3f12e4273ab4622eeb249b8
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltexports.h
@@ -0,0 +1,64 @@
+/*
+ * Summary: macros for marking symbols as exportable/importable.
+ * Description: macros for marking symbols as exportable/importable.
+ *
+ * Copy: See Copyright for the status of this software.
+ */
+
+#ifndef __XSLT_EXPORTS_H__
+#define __XSLT_EXPORTS_H__
+
+#if defined(_WIN32) || defined(__CYGWIN__)
+/** DOC_DISABLE */
+
+#ifdef LIBXSLT_STATIC
+ #define XSLTPUBLIC
+#elif defined(IN_LIBXSLT)
+ #define XSLTPUBLIC __declspec(dllexport)
+#else
+ #define XSLTPUBLIC __declspec(dllimport)
+#endif
+
+#define XSLTCALL __cdecl
+
+/** DOC_ENABLE */
+#else /* not Windows */
+
+/**
+ * XSLTPUBLIC:
+ *
+ * Macro which declares a public symbol
+ */
+#define XSLTPUBLIC
+
+/**
+ * XSLTCALL:
+ *
+ * Macro which declares the calling convention for exported functions
+ */
+#define XSLTCALL
+
+#endif /* platform switch */
+
+/*
+ * XSLTPUBFUN:
+ *
+ * Macro which declares an exportable function
+ */
+#define XSLTPUBFUN XSLTPUBLIC
+
+/**
+ * XSLTPUBVAR:
+ *
+ * Macro which declares an exportable variable
+ */
+#define XSLTPUBVAR XSLTPUBLIC extern
+
+/* Compatibility */
+#if !defined(LIBXSLT_PUBLIC)
+#define LIBXSLT_PUBLIC XSLTPUBVAR
+#endif
+
+#endif /* __XSLT_EXPORTS_H__ */
+
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/schematron.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/schematron.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..181248afd6ab89811c896f2992aa8bf4c69affe9
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/schematron.pxd
@@ -0,0 +1,34 @@
+from lxml.includes cimport xmlerror
+from lxml.includes.tree cimport xmlDoc
+
+cdef extern from "libxml/schematron.h" nogil:
+ ctypedef struct xmlSchematron
+ ctypedef struct xmlSchematronParserCtxt
+ ctypedef struct xmlSchematronValidCtxt
+
+ ctypedef enum xmlSchematronValidOptions:
+ XML_SCHEMATRON_OUT_QUIET = 1 # quiet no report
+ XML_SCHEMATRON_OUT_TEXT = 2 # build a textual report
+ XML_SCHEMATRON_OUT_XML = 4 # output SVRL
+ XML_SCHEMATRON_OUT_ERROR = 8 # output via xmlStructuredErrorFunc
+ XML_SCHEMATRON_OUT_FILE = 256 # output to a file descriptor
+ XML_SCHEMATRON_OUT_BUFFER = 512 # output to a buffer
+ XML_SCHEMATRON_OUT_IO = 1024 # output to I/O mechanism
+
+ cdef xmlSchematronParserCtxt* xmlSchematronNewDocParserCtxt(
+ xmlDoc* doc)
+ cdef xmlSchematronParserCtxt* xmlSchematronNewParserCtxt(
+ char* filename) nogil
+ cdef xmlSchematronValidCtxt* xmlSchematronNewValidCtxt(
+ xmlSchematron* schema, int options)
+
+ cdef xmlSchematron* xmlSchematronParse(xmlSchematronParserCtxt* ctxt)
+ cdef int xmlSchematronValidateDoc(xmlSchematronValidCtxt* ctxt,
+ xmlDoc* instance)
+
+ cdef void xmlSchematronFreeParserCtxt(xmlSchematronParserCtxt* ctxt)
+ cdef void xmlSchematronFreeValidCtxt(xmlSchematronValidCtxt* ctxt)
+ cdef void xmlSchematronFree(xmlSchematron* schema)
+ cdef void xmlSchematronSetValidStructuredErrors(
+ xmlSchematronValidCtxt* ctxt,
+ xmlerror.xmlStructuredErrorFunc error_func, void *data)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/tree.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/tree.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..43a52e647be68a5aea00f7363df1df1de4f2a48c
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/tree.pxd
@@ -0,0 +1,492 @@
+from libc cimport stdio
+from libc.string cimport const_char, const_uchar
+
+cdef extern from "lxml-version.h":
+ # deprecated declaration, use etreepublic.pxd instead
+ cdef char* LXML_VERSION_STRING
+
+cdef extern from "libxml/xmlversion.h":
+ const char* xmlParserVersion
+ int LIBXML_VERSION
+
+
+cdef extern from "libxml/xmlstring.h" nogil:
+ ctypedef unsigned char xmlChar
+ ctypedef const xmlChar const_xmlChar "const xmlChar"
+ cdef int xmlStrlen(const_xmlChar* str)
+ cdef xmlChar* xmlStrdup(const_xmlChar* cur)
+ cdef int xmlStrncmp(const_xmlChar* str1, const_xmlChar* str2, int length)
+ cdef int xmlStrcmp(const_xmlChar* str1, const_xmlChar* str2)
+ cdef int xmlStrcasecmp(const xmlChar *str1, const xmlChar *str2)
+ cdef const_xmlChar* xmlStrstr(const_xmlChar* str1, const_xmlChar* str2)
+ cdef const_xmlChar* xmlStrchr(const_xmlChar* str1, xmlChar ch)
+ cdef const_xmlChar* _xcstr "(const xmlChar*)PyBytes_AS_STRING" (object s)
+
+cdef extern from "libxml/encoding.h" nogil:
+ ctypedef enum xmlCharEncoding:
+ XML_CHAR_ENCODING_ERROR = -1 # No char encoding detected
+ XML_CHAR_ENCODING_NONE = 0 # No char encoding detected
+ XML_CHAR_ENCODING_UTF8 = 1 # UTF-8
+ XML_CHAR_ENCODING_UTF16LE = 2 # UTF-16 little endian
+ XML_CHAR_ENCODING_UTF16BE = 3 # UTF-16 big endian
+ XML_CHAR_ENCODING_UCS4LE = 4 # UCS-4 little endian
+ XML_CHAR_ENCODING_UCS4BE = 5 # UCS-4 big endian
+ XML_CHAR_ENCODING_EBCDIC = 6 # EBCDIC uh!
+ XML_CHAR_ENCODING_UCS4_2143 = 7 # UCS-4 unusual ordering
+ XML_CHAR_ENCODING_UCS4_3412 = 8 # UCS-4 unusual ordering
+ XML_CHAR_ENCODING_UCS2 = 9 # UCS-2
+ XML_CHAR_ENCODING_8859_1 = 10 # ISO-8859-1 ISO Latin 1
+ XML_CHAR_ENCODING_8859_2 = 11 # ISO-8859-2 ISO Latin 2
+ XML_CHAR_ENCODING_8859_3 = 12 # ISO-8859-3
+ XML_CHAR_ENCODING_8859_4 = 13 # ISO-8859-4
+ XML_CHAR_ENCODING_8859_5 = 14 # ISO-8859-5
+ XML_CHAR_ENCODING_8859_6 = 15 # ISO-8859-6
+ XML_CHAR_ENCODING_8859_7 = 16 # ISO-8859-7
+ XML_CHAR_ENCODING_8859_8 = 17 # ISO-8859-8
+ XML_CHAR_ENCODING_8859_9 = 18 # ISO-8859-9
+ XML_CHAR_ENCODING_2022_JP = 19 # ISO-2022-JP
+ XML_CHAR_ENCODING_SHIFT_JIS = 20 # Shift_JIS
+ XML_CHAR_ENCODING_EUC_JP = 21 # EUC-JP
+ XML_CHAR_ENCODING_ASCII = 22 # pure ASCII
+
+ ctypedef struct xmlCharEncodingHandler:
+ char* name
+
+ cdef xmlCharEncodingHandler* xmlFindCharEncodingHandler(char* name)
+ cdef xmlCharEncodingHandler* xmlGetCharEncodingHandler(
+ xmlCharEncoding enc)
+ cdef int xmlCharEncCloseFunc(xmlCharEncodingHandler* handler)
+ cdef xmlCharEncoding xmlDetectCharEncoding(const_xmlChar* text, int len)
+ cdef const_char* xmlGetCharEncodingName(xmlCharEncoding enc)
+ cdef xmlCharEncoding xmlParseCharEncoding(char* name)
+ ctypedef int (*xmlCharEncodingOutputFunc)(
+ unsigned char *out_buf, int *outlen, const_uchar *in_buf, int *inlen)
+
+cdef extern from "libxml/chvalid.h" nogil:
+ cdef int xmlIsChar_ch(char c)
+ cdef int xmlIsCharQ(int ch)
+
+cdef extern from "libxml/hash.h":
+ ctypedef struct xmlHashTable
+ ctypedef void (*xmlHashScanner)(void* payload, void* data, const_xmlChar* name) noexcept # may require GIL!
+ void xmlHashScan(xmlHashTable* table, xmlHashScanner f, void* data) nogil
+ void* xmlHashLookup(xmlHashTable* table, const_xmlChar* name) nogil
+ ctypedef void (*xmlHashDeallocator)(void *payload, xmlChar *name) noexcept
+ cdef xmlHashTable* xmlHashCreate(int size) nogil
+ cdef xmlHashTable* xmlHashCreateDict(int size, xmlDict *dict) nogil
+ cdef int xmlHashSize(xmlHashTable* table) nogil
+ cdef void xmlHashFree(xmlHashTable* table, xmlHashDeallocator f) nogil
+
+cdef extern from * nogil: # actually "libxml/dict.h"
+ # libxml/dict.h appears to be broken to include in C
+ ctypedef struct xmlDict
+ cdef const_xmlChar* xmlDictLookup(xmlDict* dict, const_xmlChar* name, int len)
+ cdef const_xmlChar* xmlDictExists(xmlDict* dict, const_xmlChar* name, int len)
+ cdef int xmlDictOwns(xmlDict* dict, const_xmlChar* name)
+ cdef size_t xmlDictSize(xmlDict* dict)
+
+cdef extern from "libxml/tree.h" nogil:
+ ctypedef struct xmlDoc
+ ctypedef struct xmlAttr
+ ctypedef struct xmlNotationTable
+
+ ctypedef enum xmlElementType:
+ XML_ELEMENT_NODE= 1
+ XML_ATTRIBUTE_NODE= 2
+ XML_TEXT_NODE= 3
+ XML_CDATA_SECTION_NODE= 4
+ XML_ENTITY_REF_NODE= 5
+ XML_ENTITY_NODE= 6
+ XML_PI_NODE= 7
+ XML_COMMENT_NODE= 8
+ XML_DOCUMENT_NODE= 9
+ XML_DOCUMENT_TYPE_NODE= 10
+ XML_DOCUMENT_FRAG_NODE= 11
+ XML_NOTATION_NODE= 12
+ XML_HTML_DOCUMENT_NODE= 13
+ XML_DTD_NODE= 14
+ XML_ELEMENT_DECL= 15
+ XML_ATTRIBUTE_DECL= 16
+ XML_ENTITY_DECL= 17
+ XML_NAMESPACE_DECL= 18
+ XML_XINCLUDE_START= 19
+ XML_XINCLUDE_END= 20
+
+ ctypedef enum xmlElementTypeVal:
+ XML_ELEMENT_TYPE_UNDEFINED= 0
+ XML_ELEMENT_TYPE_EMPTY= 1
+ XML_ELEMENT_TYPE_ANY= 2
+ XML_ELEMENT_TYPE_MIXED= 3
+ XML_ELEMENT_TYPE_ELEMENT= 4
+
+ ctypedef enum xmlElementContentType:
+ XML_ELEMENT_CONTENT_PCDATA= 1
+ XML_ELEMENT_CONTENT_ELEMENT= 2
+ XML_ELEMENT_CONTENT_SEQ= 3
+ XML_ELEMENT_CONTENT_OR= 4
+
+ ctypedef enum xmlElementContentOccur:
+ XML_ELEMENT_CONTENT_ONCE= 1
+ XML_ELEMENT_CONTENT_OPT= 2
+ XML_ELEMENT_CONTENT_MULT= 3
+ XML_ELEMENT_CONTENT_PLUS= 4
+
+ ctypedef enum xmlAttributeType:
+ XML_ATTRIBUTE_CDATA = 1
+ XML_ATTRIBUTE_ID= 2
+ XML_ATTRIBUTE_IDREF= 3
+ XML_ATTRIBUTE_IDREFS= 4
+ XML_ATTRIBUTE_ENTITY= 5
+ XML_ATTRIBUTE_ENTITIES= 6
+ XML_ATTRIBUTE_NMTOKEN= 7
+ XML_ATTRIBUTE_NMTOKENS= 8
+ XML_ATTRIBUTE_ENUMERATION= 9
+ XML_ATTRIBUTE_NOTATION= 10
+
+ ctypedef enum xmlAttributeDefault:
+ XML_ATTRIBUTE_NONE= 1
+ XML_ATTRIBUTE_REQUIRED= 2
+ XML_ATTRIBUTE_IMPLIED= 3
+ XML_ATTRIBUTE_FIXED= 4
+
+ ctypedef enum xmlEntityType:
+ XML_INTERNAL_GENERAL_ENTITY= 1
+ XML_EXTERNAL_GENERAL_PARSED_ENTITY= 2
+ XML_EXTERNAL_GENERAL_UNPARSED_ENTITY= 3
+ XML_INTERNAL_PARAMETER_ENTITY= 4
+ XML_EXTERNAL_PARAMETER_ENTITY= 5
+ XML_INTERNAL_PREDEFINED_ENTITY= 6
+
+ ctypedef enum xmlDocProperties:
+ XML_DOC_WELLFORMED = 1 # /* document is XML well formed */
+ XML_DOC_NSVALID = 2 # /* document is Namespace valid */
+ XML_DOC_OLD10 = 4 # /* parsed with old XML-1.0 parser */
+ XML_DOC_DTDVALID = 8 # /* DTD validation was successful */
+ XML_DOC_XINCLUDE = 16 # /* XInclude substitution was done */
+ XML_DOC_USERBUILT = 32 # /* Document was built using the API
+ # and not by parsing an instance */
+ XML_DOC_INTERNAL = 64 # /* built for internal processing */
+ XML_DOC_HTML = 128 # /* parsed or built HTML document */
+
+ ctypedef struct xmlNs:
+ const_xmlChar* href
+ const_xmlChar* prefix
+ xmlNs* next
+
+ ctypedef struct xmlNode:
+ void* _private
+ xmlElementType type
+ const_xmlChar* name
+ xmlNode* children
+ xmlNode* last
+ xmlNode* parent
+ xmlNode* next
+ xmlNode* prev
+ xmlDoc* doc
+ xmlChar* content
+ xmlAttr* properties
+ xmlNs* ns
+ xmlNs* nsDef
+ unsigned short line
+
+ ctypedef struct xmlElementContent:
+ xmlElementContentType type
+ xmlElementContentOccur ocur
+ const_xmlChar *name
+ xmlElementContent *c1
+ xmlElementContent *c2
+ xmlElementContent *parent
+ const_xmlChar *prefix
+
+ ctypedef struct xmlEnumeration:
+ xmlEnumeration *next
+ const_xmlChar *name
+
+ ctypedef struct xmlAttribute:
+ void* _private
+ xmlElementType type
+ const_xmlChar* name
+ xmlNode* children
+ xmlNode* last
+ xmlDtd* parent
+ xmlNode* next
+ xmlNode* prev
+ xmlDoc* doc
+ xmlAttribute* nexth
+ xmlAttributeType atype
+ xmlAttributeDefault def_ "def"
+ const_xmlChar* defaultValue
+ xmlEnumeration* tree
+ const_xmlChar* prefix
+ const_xmlChar* elem
+
+ ctypedef struct xmlElement:
+ void* _private
+ xmlElementType type
+ const_xmlChar* name
+ xmlNode* children
+ xmlNode* last
+ xmlNode* parent
+ xmlNode* next
+ xmlNode* prev
+ xmlDoc* doc
+ xmlElementTypeVal etype
+ xmlElementContent* content
+ xmlAttribute* attributes
+ const_xmlChar* prefix
+ void *contModel
+
+ ctypedef struct xmlEntity:
+ void* _private
+ xmlElementType type
+ const_xmlChar* name
+ xmlNode* children
+ xmlNode* last
+ xmlDtd* parent
+ xmlNode* next
+ xmlNode* prev
+ xmlDoc* doc
+ xmlChar* orig
+ xmlChar* content
+ int length
+ xmlEntityType etype
+ const_xmlChar* ExternalID
+ const_xmlChar* SystemID
+ xmlEntity* nexte
+ const_xmlChar* URI
+ int owner
+ int checked
+
+ ctypedef struct xmlDtd:
+ const_xmlChar* name
+ const_xmlChar* ExternalID
+ const_xmlChar* SystemID
+ void* notations
+ void* entities
+ void* pentities
+ void* attributes
+ void* elements
+ xmlNode* children
+ xmlNode* last
+ xmlDoc* doc
+
+ ctypedef struct xmlDoc:
+ xmlElementType type
+ char* name
+ xmlNode* children
+ xmlNode* last
+ xmlNode* parent
+ xmlNode* next
+ xmlNode* prev
+ xmlDoc* doc
+ xmlDict* dict
+ xmlHashTable* ids
+ int standalone
+ const_xmlChar* version
+ const_xmlChar* encoding
+ const_xmlChar* URL
+ void* _private
+ xmlDtd* intSubset
+ xmlDtd* extSubset
+ int properties
+
+ ctypedef struct xmlAttr:
+ void* _private
+ xmlElementType type
+ const_xmlChar* name
+ xmlNode* children
+ xmlNode* last
+ xmlNode* parent
+ xmlAttr* next
+ xmlAttr* prev
+ xmlDoc* doc
+ xmlNs* ns
+ xmlAttributeType atype
+
+ ctypedef struct xmlID:
+ const_xmlChar* value
+ const_xmlChar* name
+ xmlAttr* attr
+ xmlDoc* doc
+
+ ctypedef struct xmlBuffer
+
+ ctypedef struct xmlBuf # new in libxml2 2.9
+
+ ctypedef struct xmlOutputBuffer:
+ xmlBuf* buffer
+ xmlBuf* conv
+ int error
+
+ const_xmlChar* XML_XML_NAMESPACE
+
+ cdef void xmlFreeDoc(xmlDoc* cur)
+ cdef void xmlFreeDtd(xmlDtd* cur)
+ cdef void xmlFreeNode(xmlNode* cur)
+ cdef void xmlFreeNsList(xmlNs* ns)
+ cdef void xmlFreeNs(xmlNs* ns)
+ cdef void xmlFree(void* buf)
+
+ cdef xmlNode* xmlNewNode(xmlNs* ns, const_xmlChar* name)
+ cdef xmlNode* xmlNewDocText(xmlDoc* doc, const_xmlChar* content)
+ cdef xmlNode* xmlNewDocComment(xmlDoc* doc, const_xmlChar* content)
+ cdef xmlNode* xmlNewDocPI(xmlDoc* doc, const_xmlChar* name, const_xmlChar* content)
+ cdef xmlNode* xmlNewReference(xmlDoc* doc, const_xmlChar* name)
+ cdef xmlNode* xmlNewCDataBlock(xmlDoc* doc, const_xmlChar* text, int len)
+ cdef xmlNs* xmlNewNs(xmlNode* node, const_xmlChar* href, const_xmlChar* prefix)
+ cdef xmlNode* xmlAddChild(xmlNode* parent, xmlNode* cur)
+ cdef xmlNode* xmlReplaceNode(xmlNode* old, xmlNode* cur)
+ cdef xmlNode* xmlAddPrevSibling(xmlNode* cur, xmlNode* elem)
+ cdef xmlNode* xmlAddNextSibling(xmlNode* cur, xmlNode* elem)
+ cdef xmlNode* xmlNewDocNode(xmlDoc* doc, xmlNs* ns,
+ const_xmlChar* name, const_xmlChar* content)
+ cdef xmlDoc* xmlNewDoc(const_xmlChar* version)
+ cdef xmlAttr* xmlNewProp(xmlNode* node, const_xmlChar* name, const_xmlChar* value)
+ cdef xmlAttr* xmlNewNsProp(xmlNode* node, xmlNs* ns,
+ const_xmlChar* name, const_xmlChar* value)
+ cdef xmlChar* xmlGetNoNsProp(xmlNode* node, const_xmlChar* name)
+ cdef xmlChar* xmlGetNsProp(xmlNode* node, const_xmlChar* name, const_xmlChar* nameSpace)
+ cdef void xmlSetNs(xmlNode* node, xmlNs* ns)
+ cdef xmlAttr* xmlSetProp(xmlNode* node, const_xmlChar* name, const_xmlChar* value)
+ cdef xmlAttr* xmlSetNsProp(xmlNode* node, xmlNs* ns,
+ const_xmlChar* name, const_xmlChar* value)
+ cdef int xmlRemoveID(xmlDoc* doc, xmlAttr* cur)
+ cdef int xmlRemoveProp(xmlAttr* cur)
+ cdef void xmlFreePropList(xmlAttr* cur)
+ cdef xmlChar* xmlGetNodePath(xmlNode* node)
+ cdef void xmlDocDumpMemory(xmlDoc* cur, char** mem, int* size)
+ cdef void xmlDocDumpMemoryEnc(xmlDoc* cur, char** mem, int* size,
+ char* encoding)
+ cdef int xmlSaveFileTo(xmlOutputBuffer* out, xmlDoc* cur,
+ char* encoding)
+
+ cdef void xmlUnlinkNode(xmlNode* cur)
+ cdef xmlNode* xmlDocSetRootElement(xmlDoc* doc, xmlNode* root)
+ cdef xmlNode* xmlDocGetRootElement(xmlDoc* doc)
+ cdef void xmlSetTreeDoc(xmlNode* tree, xmlDoc* doc)
+ cdef xmlAttr* xmlHasProp(xmlNode* node, const_xmlChar* name)
+ cdef xmlAttr* xmlHasNsProp(xmlNode* node, const_xmlChar* name, const_xmlChar* nameSpace)
+ cdef xmlChar* xmlNodeGetContent(xmlNode* cur)
+ cdef int xmlNodeBufGetContent(xmlBuffer* buffer, xmlNode* cur)
+ cdef xmlNs* xmlSearchNs(xmlDoc* doc, xmlNode* node, const_xmlChar* prefix)
+ cdef xmlNs* xmlSearchNsByHref(xmlDoc* doc, xmlNode* node, const_xmlChar* href)
+ cdef int xmlIsBlankNode(xmlNode* node)
+ cdef long xmlGetLineNo(xmlNode* node)
+ cdef void xmlElemDump(stdio.FILE* f, xmlDoc* doc, xmlNode* cur)
+ cdef void xmlNodeDumpOutput(xmlOutputBuffer* buf,
+ xmlDoc* doc, xmlNode* cur, int level,
+ int format, const_char* encoding)
+ cdef void xmlBufAttrSerializeTxtContent(xmlOutputBuffer *buf, xmlDoc *doc,
+ xmlAttr *attr, const_xmlChar *string)
+ cdef void xmlNodeSetName(xmlNode* cur, const_xmlChar* name)
+ cdef void xmlNodeSetContent(xmlNode* cur, const_xmlChar* content)
+ cdef xmlDtd* xmlCopyDtd(xmlDtd* dtd)
+ cdef xmlDoc* xmlCopyDoc(xmlDoc* doc, int recursive)
+ cdef xmlNode* xmlCopyNode(xmlNode* node, int extended)
+ cdef xmlNode* xmlDocCopyNode(xmlNode* node, xmlDoc* doc, int extended)
+ cdef int xmlReconciliateNs(xmlDoc* doc, xmlNode* tree)
+ cdef xmlNs* xmlNewReconciliedNs(xmlDoc* doc, xmlNode* tree, xmlNs* ns)
+ cdef xmlBuffer* xmlBufferCreate()
+ cdef void xmlBufferWriteChar(xmlBuffer* buf, char* string)
+ cdef void xmlBufferFree(xmlBuffer* buf)
+ cdef const_xmlChar* xmlBufferContent(xmlBuffer* buf)
+ cdef int xmlBufferLength(xmlBuffer* buf)
+ cdef const_xmlChar* xmlBufContent(xmlBuf* buf) # new in libxml2 2.9
+ cdef size_t xmlBufUse(xmlBuf* buf) # new in libxml2 2.9
+ cdef int xmlKeepBlanksDefault(int val)
+ cdef xmlChar* xmlNodeGetBase(xmlDoc* doc, xmlNode* node)
+ cdef xmlDtd* xmlCreateIntSubset(xmlDoc* doc, const_xmlChar* name,
+ const_xmlChar* ExternalID, const_xmlChar* SystemID)
+ cdef void xmlNodeSetBase(xmlNode* node, const_xmlChar* uri)
+ cdef int xmlValidateNCName(const_xmlChar* value, int space)
+
+cdef extern from "libxml/uri.h" nogil:
+ cdef const_xmlChar* xmlBuildURI(const_xmlChar* href, const_xmlChar* base)
+
+cdef extern from "libxml/HTMLtree.h" nogil:
+ cdef void htmlNodeDumpFormatOutput(xmlOutputBuffer* buf,
+ xmlDoc* doc, xmlNode* cur,
+ char* encoding, int format)
+ cdef xmlDoc* htmlNewDoc(const_xmlChar* uri, const_xmlChar* externalID)
+
+cdef extern from "libxml/valid.h" nogil:
+ cdef xmlAttr* xmlGetID(xmlDoc* doc, const_xmlChar* ID)
+ cdef void xmlDumpNotationTable(xmlBuffer* buffer,
+ xmlNotationTable* table)
+ cdef int xmlValidateNameValue(const_xmlChar* value)
+
+cdef extern from "libxml/xmlIO.h":
+ cdef int xmlOutputBufferWrite(xmlOutputBuffer* out,
+ int len, const_char* str) nogil
+ cdef int xmlOutputBufferWriteString(xmlOutputBuffer* out, const_char* str) nogil
+ cdef int xmlOutputBufferWriteEscape(xmlOutputBuffer* out,
+ const_xmlChar* str,
+ xmlCharEncodingOutputFunc escapefunc) nogil
+ cdef int xmlOutputBufferFlush(xmlOutputBuffer* out) nogil
+ cdef int xmlOutputBufferClose(xmlOutputBuffer* out) nogil
+
+ ctypedef int (*xmlInputReadCallback)(void* context,
+ char* buffer, int len) noexcept nogil
+ ctypedef int (*xmlInputCloseCallback)(void* context) noexcept nogil
+
+ ctypedef int (*xmlOutputWriteCallback)(void* context,
+ char* buffer, int len) noexcept
+ ctypedef int (*xmlOutputCloseCallback)(void* context) noexcept
+
+ cdef xmlOutputBuffer* xmlAllocOutputBuffer(
+ xmlCharEncodingHandler* encoder) nogil
+ cdef xmlOutputBuffer* xmlOutputBufferCreateIO(
+ xmlOutputWriteCallback iowrite,
+ xmlOutputCloseCallback ioclose,
+ void * ioctx,
+ xmlCharEncodingHandler* encoder) nogil
+ cdef xmlOutputBuffer* xmlOutputBufferCreateFile(
+ stdio.FILE* file, xmlCharEncodingHandler* encoder) nogil
+ cdef xmlOutputBuffer* xmlOutputBufferCreateFilename(
+ char* URI, xmlCharEncodingHandler* encoder, int compression) nogil
+
+cdef extern from "libxml/xmlsave.h" nogil:
+ ctypedef struct xmlSaveCtxt
+
+ ctypedef enum xmlSaveOption:
+ XML_SAVE_FORMAT = 1 # format save output (2.6.17)
+ XML_SAVE_NO_DECL = 2 # drop the xml declaration (2.6.21)
+ XML_SAVE_NO_EMPTY = 4 # no empty tags (2.6.22)
+ XML_SAVE_NO_XHTML = 8 # disable XHTML1 specific rules (2.6.22)
+ XML_SAVE_XHTML = 16 # force XHTML1 specific rules (2.7.2)
+ XML_SAVE_AS_XML = 32 # force XML serialization on HTML doc (2.7.2)
+ XML_SAVE_AS_HTML = 64 # force HTML serialization on XML doc (2.7.2)
+
+ cdef xmlSaveCtxt* xmlSaveToFilename(char* filename, char* encoding,
+ int options)
+ cdef xmlSaveCtxt* xmlSaveToBuffer(xmlBuffer* buffer, char* encoding,
+ int options) # libxml2 2.6.23
+ cdef long xmlSaveDoc(xmlSaveCtxt* ctxt, xmlDoc* doc)
+ cdef long xmlSaveTree(xmlSaveCtxt* ctxt, xmlNode* node)
+ cdef int xmlSaveClose(xmlSaveCtxt* ctxt)
+ cdef int xmlSaveFlush(xmlSaveCtxt* ctxt)
+ cdef int xmlSaveSetAttrEscape(xmlSaveCtxt* ctxt, void* escape_func)
+ cdef int xmlSaveSetEscape(xmlSaveCtxt* ctxt, void* escape_func)
+
+cdef extern from "libxml/globals.h" nogil:
+ cdef int xmlThrDefKeepBlanksDefaultValue(int onoff)
+ cdef int xmlThrDefLineNumbersDefaultValue(int onoff)
+ cdef int xmlThrDefIndentTreeOutput(int onoff)
+
+cdef extern from "libxml/xmlmemory.h" nogil:
+ cdef void* xmlMalloc(size_t size)
+ cdef int xmlMemBlocks()
+ cdef int xmlMemUsed()
+
+cdef extern from "etree_defs.h" nogil:
+ cdef bint _isElement(xmlNode* node)
+ cdef bint _isElementOrXInclude(xmlNode* node)
+ cdef const_xmlChar* _getNs(xmlNode* node)
+ cdef void BEGIN_FOR_EACH_ELEMENT_FROM(xmlNode* tree_top,
+ xmlNode* start_node,
+ bint inclusive)
+ cdef void END_FOR_EACH_ELEMENT_FROM(xmlNode* start_node)
+ cdef void BEGIN_FOR_EACH_FROM(xmlNode* tree_top,
+ xmlNode* start_node,
+ bint inclusive)
+ cdef void END_FOR_EACH_FROM(xmlNode* start_node)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/uri.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/uri.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..f886a54b9a9d7fc3094f99210f54edd98f12fab7
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/uri.pxd
@@ -0,0 +1,5 @@
+cdef extern from "libxml/uri.h" nogil:
+ ctypedef struct xmlURI
+
+ cdef xmlURI* xmlParseURI(char* str)
+ cdef void xmlFreeURI(xmlURI* uri)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xinclude.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xinclude.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..68267175afa602f6bb0970566bd5f71f2d318af7
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xinclude.pxd
@@ -0,0 +1,22 @@
+from lxml.includes.tree cimport xmlDoc, xmlNode
+
+cdef extern from "libxml/xinclude.h" nogil:
+
+ ctypedef struct xmlXIncludeCtxt
+
+ cdef int xmlXIncludeProcess(xmlDoc* doc)
+ cdef int xmlXIncludeProcessFlags(xmlDoc* doc, int parser_opts)
+ cdef int xmlXIncludeProcessTree(xmlNode* doc)
+ cdef int xmlXIncludeProcessTreeFlags(xmlNode* doc, int parser_opts)
+
+ # libxml2 >= 2.7.4
+ cdef int xmlXIncludeProcessTreeFlagsData(
+ xmlNode* doc, int parser_opts, void* data)
+
+ cdef xmlXIncludeCtxt* xmlXIncludeNewContext(xmlDoc* doc)
+ cdef int xmlXIncludeProcessNode(xmlXIncludeCtxt* ctxt, xmlNode* node)
+ cdef int xmlXIncludeSetFlags(xmlXIncludeCtxt* ctxt, int flags)
+
+ # libxml2 >= 2.6.27
+ cdef int xmlXIncludeProcessFlagsData(
+ xmlDoc* doc, int flags, void* data)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xmlerror.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xmlerror.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..589e38eabdf7fc8b2c8a90261a25feec4d843998
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xmlerror.pxd
@@ -0,0 +1,852 @@
+
+# --- BEGIN: GENERATED CONSTANTS ---
+
+# This section is generated by the script 'update-error-constants.py'.
+
+cdef extern from "libxml/xmlerror.h":
+ ctypedef enum xmlErrorLevel:
+ XML_ERR_NONE = 0
+ XML_ERR_WARNING = 1 # A simple warning
+ XML_ERR_ERROR = 2 # A recoverable error
+ XML_ERR_FATAL = 3 # A fatal error
+
+ ctypedef enum xmlErrorDomain:
+ XML_FROM_NONE = 0
+ XML_FROM_PARSER = 1 # The XML parser
+ XML_FROM_TREE = 2 # The tree module
+ XML_FROM_NAMESPACE = 3 # The XML Namespace module
+ XML_FROM_DTD = 4 # The XML DTD validation with parser contex
+ XML_FROM_HTML = 5 # The HTML parser
+ XML_FROM_MEMORY = 6 # The memory allocator
+ XML_FROM_OUTPUT = 7 # The serialization code
+ XML_FROM_IO = 8 # The Input/Output stack
+ XML_FROM_FTP = 9 # The FTP module
+ XML_FROM_HTTP = 10 # The HTTP module
+ XML_FROM_XINCLUDE = 11 # The XInclude processing
+ XML_FROM_XPATH = 12 # The XPath module
+ XML_FROM_XPOINTER = 13 # The XPointer module
+ XML_FROM_REGEXP = 14 # The regular expressions module
+ XML_FROM_DATATYPE = 15 # The W3C XML Schemas Datatype module
+ XML_FROM_SCHEMASP = 16 # The W3C XML Schemas parser module
+ XML_FROM_SCHEMASV = 17 # The W3C XML Schemas validation module
+ XML_FROM_RELAXNGP = 18 # The Relax-NG parser module
+ XML_FROM_RELAXNGV = 19 # The Relax-NG validator module
+ XML_FROM_CATALOG = 20 # The Catalog module
+ XML_FROM_C14N = 21 # The Canonicalization module
+ XML_FROM_XSLT = 22 # The XSLT engine from libxslt
+ XML_FROM_VALID = 23 # The XML DTD validation with valid context
+ XML_FROM_CHECK = 24 # The error checking module
+ XML_FROM_WRITER = 25 # The xmlwriter module
+ XML_FROM_MODULE = 26 # The dynamically loaded module modul
+ XML_FROM_I18N = 27 # The module handling character conversion
+ XML_FROM_SCHEMATRONV = 28 # The Schematron validator module
+ XML_FROM_BUFFER = 29 # The buffers module
+ XML_FROM_URI = 30 # The URI module
+
+ ctypedef enum xmlParserErrors:
+ XML_ERR_OK = 0
+ XML_ERR_INTERNAL_ERROR = 1
+ XML_ERR_NO_MEMORY = 2
+ XML_ERR_DOCUMENT_START = 3
+ XML_ERR_DOCUMENT_EMPTY = 4
+ XML_ERR_DOCUMENT_END = 5
+ XML_ERR_INVALID_HEX_CHARREF = 6
+ XML_ERR_INVALID_DEC_CHARREF = 7
+ XML_ERR_INVALID_CHARREF = 8
+ XML_ERR_INVALID_CHAR = 9
+ XML_ERR_CHARREF_AT_EOF = 10
+ XML_ERR_CHARREF_IN_PROLOG = 11
+ XML_ERR_CHARREF_IN_EPILOG = 12
+ XML_ERR_CHARREF_IN_DTD = 13
+ XML_ERR_ENTITYREF_AT_EOF = 14
+ XML_ERR_ENTITYREF_IN_PROLOG = 15
+ XML_ERR_ENTITYREF_IN_EPILOG = 16
+ XML_ERR_ENTITYREF_IN_DTD = 17
+ XML_ERR_PEREF_AT_EOF = 18
+ XML_ERR_PEREF_IN_PROLOG = 19
+ XML_ERR_PEREF_IN_EPILOG = 20
+ XML_ERR_PEREF_IN_INT_SUBSET = 21
+ XML_ERR_ENTITYREF_NO_NAME = 22
+ XML_ERR_ENTITYREF_SEMICOL_MISSING = 23
+ XML_ERR_PEREF_NO_NAME = 24
+ XML_ERR_PEREF_SEMICOL_MISSING = 25
+ XML_ERR_UNDECLARED_ENTITY = 26
+ XML_WAR_UNDECLARED_ENTITY = 27
+ XML_ERR_UNPARSED_ENTITY = 28
+ XML_ERR_ENTITY_IS_EXTERNAL = 29
+ XML_ERR_ENTITY_IS_PARAMETER = 30
+ XML_ERR_UNKNOWN_ENCODING = 31
+ XML_ERR_UNSUPPORTED_ENCODING = 32
+ XML_ERR_STRING_NOT_STARTED = 33
+ XML_ERR_STRING_NOT_CLOSED = 34
+ XML_ERR_NS_DECL_ERROR = 35
+ XML_ERR_ENTITY_NOT_STARTED = 36
+ XML_ERR_ENTITY_NOT_FINISHED = 37
+ XML_ERR_LT_IN_ATTRIBUTE = 38
+ XML_ERR_ATTRIBUTE_NOT_STARTED = 39
+ XML_ERR_ATTRIBUTE_NOT_FINISHED = 40
+ XML_ERR_ATTRIBUTE_WITHOUT_VALUE = 41
+ XML_ERR_ATTRIBUTE_REDEFINED = 42
+ XML_ERR_LITERAL_NOT_STARTED = 43
+ XML_ERR_LITERAL_NOT_FINISHED = 44
+ XML_ERR_COMMENT_NOT_FINISHED = 45
+ XML_ERR_PI_NOT_STARTED = 46
+ XML_ERR_PI_NOT_FINISHED = 47
+ XML_ERR_NOTATION_NOT_STARTED = 48
+ XML_ERR_NOTATION_NOT_FINISHED = 49
+ XML_ERR_ATTLIST_NOT_STARTED = 50
+ XML_ERR_ATTLIST_NOT_FINISHED = 51
+ XML_ERR_MIXED_NOT_STARTED = 52
+ XML_ERR_MIXED_NOT_FINISHED = 53
+ XML_ERR_ELEMCONTENT_NOT_STARTED = 54
+ XML_ERR_ELEMCONTENT_NOT_FINISHED = 55
+ XML_ERR_XMLDECL_NOT_STARTED = 56
+ XML_ERR_XMLDECL_NOT_FINISHED = 57
+ XML_ERR_CONDSEC_NOT_STARTED = 58
+ XML_ERR_CONDSEC_NOT_FINISHED = 59
+ XML_ERR_EXT_SUBSET_NOT_FINISHED = 60
+ XML_ERR_DOCTYPE_NOT_FINISHED = 61
+ XML_ERR_MISPLACED_CDATA_END = 62
+ XML_ERR_CDATA_NOT_FINISHED = 63
+ XML_ERR_RESERVED_XML_NAME = 64
+ XML_ERR_SPACE_REQUIRED = 65
+ XML_ERR_SEPARATOR_REQUIRED = 66
+ XML_ERR_NMTOKEN_REQUIRED = 67
+ XML_ERR_NAME_REQUIRED = 68
+ XML_ERR_PCDATA_REQUIRED = 69
+ XML_ERR_URI_REQUIRED = 70
+ XML_ERR_PUBID_REQUIRED = 71
+ XML_ERR_LT_REQUIRED = 72
+ XML_ERR_GT_REQUIRED = 73
+ XML_ERR_LTSLASH_REQUIRED = 74
+ XML_ERR_EQUAL_REQUIRED = 75
+ XML_ERR_TAG_NAME_MISMATCH = 76
+ XML_ERR_TAG_NOT_FINISHED = 77
+ XML_ERR_STANDALONE_VALUE = 78
+ XML_ERR_ENCODING_NAME = 79
+ XML_ERR_HYPHEN_IN_COMMENT = 80
+ XML_ERR_INVALID_ENCODING = 81
+ XML_ERR_EXT_ENTITY_STANDALONE = 82
+ XML_ERR_CONDSEC_INVALID = 83
+ XML_ERR_VALUE_REQUIRED = 84
+ XML_ERR_NOT_WELL_BALANCED = 85
+ XML_ERR_EXTRA_CONTENT = 86
+ XML_ERR_ENTITY_CHAR_ERROR = 87
+ XML_ERR_ENTITY_PE_INTERNAL = 88
+ XML_ERR_ENTITY_LOOP = 89
+ XML_ERR_ENTITY_BOUNDARY = 90
+ XML_ERR_INVALID_URI = 91
+ XML_ERR_URI_FRAGMENT = 92
+ XML_WAR_CATALOG_PI = 93
+ XML_ERR_NO_DTD = 94
+ XML_ERR_CONDSEC_INVALID_KEYWORD = 95
+ XML_ERR_VERSION_MISSING = 96
+ XML_WAR_UNKNOWN_VERSION = 97
+ XML_WAR_LANG_VALUE = 98
+ XML_WAR_NS_URI = 99
+ XML_WAR_NS_URI_RELATIVE = 100
+ XML_ERR_MISSING_ENCODING = 101
+ XML_WAR_SPACE_VALUE = 102
+ XML_ERR_NOT_STANDALONE = 103
+ XML_ERR_ENTITY_PROCESSING = 104
+ XML_ERR_NOTATION_PROCESSING = 105
+ XML_WAR_NS_COLUMN = 106
+ XML_WAR_ENTITY_REDEFINED = 107
+ XML_ERR_UNKNOWN_VERSION = 108
+ XML_ERR_VERSION_MISMATCH = 109
+ XML_ERR_NAME_TOO_LONG = 110
+ XML_ERR_USER_STOP = 111
+ XML_ERR_COMMENT_ABRUPTLY_ENDED = 112
+ XML_NS_ERR_XML_NAMESPACE = 200
+ XML_NS_ERR_UNDEFINED_NAMESPACE = 201
+ XML_NS_ERR_QNAME = 202
+ XML_NS_ERR_ATTRIBUTE_REDEFINED = 203
+ XML_NS_ERR_EMPTY = 204
+ XML_NS_ERR_COLON = 205
+ XML_DTD_ATTRIBUTE_DEFAULT = 500
+ XML_DTD_ATTRIBUTE_REDEFINED = 501
+ XML_DTD_ATTRIBUTE_VALUE = 502
+ XML_DTD_CONTENT_ERROR = 503
+ XML_DTD_CONTENT_MODEL = 504
+ XML_DTD_CONTENT_NOT_DETERMINIST = 505
+ XML_DTD_DIFFERENT_PREFIX = 506
+ XML_DTD_ELEM_DEFAULT_NAMESPACE = 507
+ XML_DTD_ELEM_NAMESPACE = 508
+ XML_DTD_ELEM_REDEFINED = 509
+ XML_DTD_EMPTY_NOTATION = 510
+ XML_DTD_ENTITY_TYPE = 511
+ XML_DTD_ID_FIXED = 512
+ XML_DTD_ID_REDEFINED = 513
+ XML_DTD_ID_SUBSET = 514
+ XML_DTD_INVALID_CHILD = 515
+ XML_DTD_INVALID_DEFAULT = 516
+ XML_DTD_LOAD_ERROR = 517
+ XML_DTD_MISSING_ATTRIBUTE = 518
+ XML_DTD_MIXED_CORRUPT = 519
+ XML_DTD_MULTIPLE_ID = 520
+ XML_DTD_NO_DOC = 521
+ XML_DTD_NO_DTD = 522
+ XML_DTD_NO_ELEM_NAME = 523
+ XML_DTD_NO_PREFIX = 524
+ XML_DTD_NO_ROOT = 525
+ XML_DTD_NOTATION_REDEFINED = 526
+ XML_DTD_NOTATION_VALUE = 527
+ XML_DTD_NOT_EMPTY = 528
+ XML_DTD_NOT_PCDATA = 529
+ XML_DTD_NOT_STANDALONE = 530
+ XML_DTD_ROOT_NAME = 531
+ XML_DTD_STANDALONE_WHITE_SPACE = 532
+ XML_DTD_UNKNOWN_ATTRIBUTE = 533
+ XML_DTD_UNKNOWN_ELEM = 534
+ XML_DTD_UNKNOWN_ENTITY = 535
+ XML_DTD_UNKNOWN_ID = 536
+ XML_DTD_UNKNOWN_NOTATION = 537
+ XML_DTD_STANDALONE_DEFAULTED = 538
+ XML_DTD_XMLID_VALUE = 539
+ XML_DTD_XMLID_TYPE = 540
+ XML_DTD_DUP_TOKEN = 541
+ XML_HTML_STRUCURE_ERROR = 800
+ XML_HTML_UNKNOWN_TAG = 801
+ XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000
+ XML_RNGP_ATTR_CONFLICT = 1001
+ XML_RNGP_ATTRIBUTE_CHILDREN = 1002
+ XML_RNGP_ATTRIBUTE_CONTENT = 1003
+ XML_RNGP_ATTRIBUTE_EMPTY = 1004
+ XML_RNGP_ATTRIBUTE_NOOP = 1005
+ XML_RNGP_CHOICE_CONTENT = 1006
+ XML_RNGP_CHOICE_EMPTY = 1007
+ XML_RNGP_CREATE_FAILURE = 1008
+ XML_RNGP_DATA_CONTENT = 1009
+ XML_RNGP_DEF_CHOICE_AND_INTERLEAVE = 1010
+ XML_RNGP_DEFINE_CREATE_FAILED = 1011
+ XML_RNGP_DEFINE_EMPTY = 1012
+ XML_RNGP_DEFINE_MISSING = 1013
+ XML_RNGP_DEFINE_NAME_MISSING = 1014
+ XML_RNGP_ELEM_CONTENT_EMPTY = 1015
+ XML_RNGP_ELEM_CONTENT_ERROR = 1016
+ XML_RNGP_ELEMENT_EMPTY = 1017
+ XML_RNGP_ELEMENT_CONTENT = 1018
+ XML_RNGP_ELEMENT_NAME = 1019
+ XML_RNGP_ELEMENT_NO_CONTENT = 1020
+ XML_RNGP_ELEM_TEXT_CONFLICT = 1021
+ XML_RNGP_EMPTY = 1022
+ XML_RNGP_EMPTY_CONSTRUCT = 1023
+ XML_RNGP_EMPTY_CONTENT = 1024
+ XML_RNGP_EMPTY_NOT_EMPTY = 1025
+ XML_RNGP_ERROR_TYPE_LIB = 1026
+ XML_RNGP_EXCEPT_EMPTY = 1027
+ XML_RNGP_EXCEPT_MISSING = 1028
+ XML_RNGP_EXCEPT_MULTIPLE = 1029
+ XML_RNGP_EXCEPT_NO_CONTENT = 1030
+ XML_RNGP_EXTERNALREF_EMTPY = 1031
+ XML_RNGP_EXTERNAL_REF_FAILURE = 1032
+ XML_RNGP_EXTERNALREF_RECURSE = 1033
+ XML_RNGP_FORBIDDEN_ATTRIBUTE = 1034
+ XML_RNGP_FOREIGN_ELEMENT = 1035
+ XML_RNGP_GRAMMAR_CONTENT = 1036
+ XML_RNGP_GRAMMAR_EMPTY = 1037
+ XML_RNGP_GRAMMAR_MISSING = 1038
+ XML_RNGP_GRAMMAR_NO_START = 1039
+ XML_RNGP_GROUP_ATTR_CONFLICT = 1040
+ XML_RNGP_HREF_ERROR = 1041
+ XML_RNGP_INCLUDE_EMPTY = 1042
+ XML_RNGP_INCLUDE_FAILURE = 1043
+ XML_RNGP_INCLUDE_RECURSE = 1044
+ XML_RNGP_INTERLEAVE_ADD = 1045
+ XML_RNGP_INTERLEAVE_CREATE_FAILED = 1046
+ XML_RNGP_INTERLEAVE_EMPTY = 1047
+ XML_RNGP_INTERLEAVE_NO_CONTENT = 1048
+ XML_RNGP_INVALID_DEFINE_NAME = 1049
+ XML_RNGP_INVALID_URI = 1050
+ XML_RNGP_INVALID_VALUE = 1051
+ XML_RNGP_MISSING_HREF = 1052
+ XML_RNGP_NAME_MISSING = 1053
+ XML_RNGP_NEED_COMBINE = 1054
+ XML_RNGP_NOTALLOWED_NOT_EMPTY = 1055
+ XML_RNGP_NSNAME_ATTR_ANCESTOR = 1056
+ XML_RNGP_NSNAME_NO_NS = 1057
+ XML_RNGP_PARAM_FORBIDDEN = 1058
+ XML_RNGP_PARAM_NAME_MISSING = 1059
+ XML_RNGP_PARENTREF_CREATE_FAILED = 1060
+ XML_RNGP_PARENTREF_NAME_INVALID = 1061
+ XML_RNGP_PARENTREF_NO_NAME = 1062
+ XML_RNGP_PARENTREF_NO_PARENT = 1063
+ XML_RNGP_PARENTREF_NOT_EMPTY = 1064
+ XML_RNGP_PARSE_ERROR = 1065
+ XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME = 1066
+ XML_RNGP_PAT_ATTR_ATTR = 1067
+ XML_RNGP_PAT_ATTR_ELEM = 1068
+ XML_RNGP_PAT_DATA_EXCEPT_ATTR = 1069
+ XML_RNGP_PAT_DATA_EXCEPT_ELEM = 1070
+ XML_RNGP_PAT_DATA_EXCEPT_EMPTY = 1071
+ XML_RNGP_PAT_DATA_EXCEPT_GROUP = 1072
+ XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE = 1073
+ XML_RNGP_PAT_DATA_EXCEPT_LIST = 1074
+ XML_RNGP_PAT_DATA_EXCEPT_ONEMORE = 1075
+ XML_RNGP_PAT_DATA_EXCEPT_REF = 1076
+ XML_RNGP_PAT_DATA_EXCEPT_TEXT = 1077
+ XML_RNGP_PAT_LIST_ATTR = 1078
+ XML_RNGP_PAT_LIST_ELEM = 1079
+ XML_RNGP_PAT_LIST_INTERLEAVE = 1080
+ XML_RNGP_PAT_LIST_LIST = 1081
+ XML_RNGP_PAT_LIST_REF = 1082
+ XML_RNGP_PAT_LIST_TEXT = 1083
+ XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME = 1084
+ XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME = 1085
+ XML_RNGP_PAT_ONEMORE_GROUP_ATTR = 1086
+ XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR = 1087
+ XML_RNGP_PAT_START_ATTR = 1088
+ XML_RNGP_PAT_START_DATA = 1089
+ XML_RNGP_PAT_START_EMPTY = 1090
+ XML_RNGP_PAT_START_GROUP = 1091
+ XML_RNGP_PAT_START_INTERLEAVE = 1092
+ XML_RNGP_PAT_START_LIST = 1093
+ XML_RNGP_PAT_START_ONEMORE = 1094
+ XML_RNGP_PAT_START_TEXT = 1095
+ XML_RNGP_PAT_START_VALUE = 1096
+ XML_RNGP_PREFIX_UNDEFINED = 1097
+ XML_RNGP_REF_CREATE_FAILED = 1098
+ XML_RNGP_REF_CYCLE = 1099
+ XML_RNGP_REF_NAME_INVALID = 1100
+ XML_RNGP_REF_NO_DEF = 1101
+ XML_RNGP_REF_NO_NAME = 1102
+ XML_RNGP_REF_NOT_EMPTY = 1103
+ XML_RNGP_START_CHOICE_AND_INTERLEAVE = 1104
+ XML_RNGP_START_CONTENT = 1105
+ XML_RNGP_START_EMPTY = 1106
+ XML_RNGP_START_MISSING = 1107
+ XML_RNGP_TEXT_EXPECTED = 1108
+ XML_RNGP_TEXT_HAS_CHILD = 1109
+ XML_RNGP_TYPE_MISSING = 1110
+ XML_RNGP_TYPE_NOT_FOUND = 1111
+ XML_RNGP_TYPE_VALUE = 1112
+ XML_RNGP_UNKNOWN_ATTRIBUTE = 1113
+ XML_RNGP_UNKNOWN_COMBINE = 1114
+ XML_RNGP_UNKNOWN_CONSTRUCT = 1115
+ XML_RNGP_UNKNOWN_TYPE_LIB = 1116
+ XML_RNGP_URI_FRAGMENT = 1117
+ XML_RNGP_URI_NOT_ABSOLUTE = 1118
+ XML_RNGP_VALUE_EMPTY = 1119
+ XML_RNGP_VALUE_NO_CONTENT = 1120
+ XML_RNGP_XMLNS_NAME = 1121
+ XML_RNGP_XML_NS = 1122
+ XML_XPATH_EXPRESSION_OK = 1200
+ XML_XPATH_NUMBER_ERROR = 1201
+ XML_XPATH_UNFINISHED_LITERAL_ERROR = 1202
+ XML_XPATH_START_LITERAL_ERROR = 1203
+ XML_XPATH_VARIABLE_REF_ERROR = 1204
+ XML_XPATH_UNDEF_VARIABLE_ERROR = 1205
+ XML_XPATH_INVALID_PREDICATE_ERROR = 1206
+ XML_XPATH_EXPR_ERROR = 1207
+ XML_XPATH_UNCLOSED_ERROR = 1208
+ XML_XPATH_UNKNOWN_FUNC_ERROR = 1209
+ XML_XPATH_INVALID_OPERAND = 1210
+ XML_XPATH_INVALID_TYPE = 1211
+ XML_XPATH_INVALID_ARITY = 1212
+ XML_XPATH_INVALID_CTXT_SIZE = 1213
+ XML_XPATH_INVALID_CTXT_POSITION = 1214
+ XML_XPATH_MEMORY_ERROR = 1215
+ XML_XPTR_SYNTAX_ERROR = 1216
+ XML_XPTR_RESOURCE_ERROR = 1217
+ XML_XPTR_SUB_RESOURCE_ERROR = 1218
+ XML_XPATH_UNDEF_PREFIX_ERROR = 1219
+ XML_XPATH_ENCODING_ERROR = 1220
+ XML_XPATH_INVALID_CHAR_ERROR = 1221
+ XML_TREE_INVALID_HEX = 1300
+ XML_TREE_INVALID_DEC = 1301
+ XML_TREE_UNTERMINATED_ENTITY = 1302
+ XML_TREE_NOT_UTF8 = 1303
+ XML_SAVE_NOT_UTF8 = 1400
+ XML_SAVE_CHAR_INVALID = 1401
+ XML_SAVE_NO_DOCTYPE = 1402
+ XML_SAVE_UNKNOWN_ENCODING = 1403
+ XML_REGEXP_COMPILE_ERROR = 1450
+ XML_IO_UNKNOWN = 1500
+ XML_IO_EACCES = 1501
+ XML_IO_EAGAIN = 1502
+ XML_IO_EBADF = 1503
+ XML_IO_EBADMSG = 1504
+ XML_IO_EBUSY = 1505
+ XML_IO_ECANCELED = 1506
+ XML_IO_ECHILD = 1507
+ XML_IO_EDEADLK = 1508
+ XML_IO_EDOM = 1509
+ XML_IO_EEXIST = 1510
+ XML_IO_EFAULT = 1511
+ XML_IO_EFBIG = 1512
+ XML_IO_EINPROGRESS = 1513
+ XML_IO_EINTR = 1514
+ XML_IO_EINVAL = 1515
+ XML_IO_EIO = 1516
+ XML_IO_EISDIR = 1517
+ XML_IO_EMFILE = 1518
+ XML_IO_EMLINK = 1519
+ XML_IO_EMSGSIZE = 1520
+ XML_IO_ENAMETOOLONG = 1521
+ XML_IO_ENFILE = 1522
+ XML_IO_ENODEV = 1523
+ XML_IO_ENOENT = 1524
+ XML_IO_ENOEXEC = 1525
+ XML_IO_ENOLCK = 1526
+ XML_IO_ENOMEM = 1527
+ XML_IO_ENOSPC = 1528
+ XML_IO_ENOSYS = 1529
+ XML_IO_ENOTDIR = 1530
+ XML_IO_ENOTEMPTY = 1531
+ XML_IO_ENOTSUP = 1532
+ XML_IO_ENOTTY = 1533
+ XML_IO_ENXIO = 1534
+ XML_IO_EPERM = 1535
+ XML_IO_EPIPE = 1536
+ XML_IO_ERANGE = 1537
+ XML_IO_EROFS = 1538
+ XML_IO_ESPIPE = 1539
+ XML_IO_ESRCH = 1540
+ XML_IO_ETIMEDOUT = 1541
+ XML_IO_EXDEV = 1542
+ XML_IO_NETWORK_ATTEMPT = 1543
+ XML_IO_ENCODER = 1544
+ XML_IO_FLUSH = 1545
+ XML_IO_WRITE = 1546
+ XML_IO_NO_INPUT = 1547
+ XML_IO_BUFFER_FULL = 1548
+ XML_IO_LOAD_ERROR = 1549
+ XML_IO_ENOTSOCK = 1550
+ XML_IO_EISCONN = 1551
+ XML_IO_ECONNREFUSED = 1552
+ XML_IO_ENETUNREACH = 1553
+ XML_IO_EADDRINUSE = 1554
+ XML_IO_EALREADY = 1555
+ XML_IO_EAFNOSUPPORT = 1556
+ XML_XINCLUDE_RECURSION = 1600
+ XML_XINCLUDE_PARSE_VALUE = 1601
+ XML_XINCLUDE_ENTITY_DEF_MISMATCH = 1602
+ XML_XINCLUDE_NO_HREF = 1603
+ XML_XINCLUDE_NO_FALLBACK = 1604
+ XML_XINCLUDE_HREF_URI = 1605
+ XML_XINCLUDE_TEXT_FRAGMENT = 1606
+ XML_XINCLUDE_TEXT_DOCUMENT = 1607
+ XML_XINCLUDE_INVALID_CHAR = 1608
+ XML_XINCLUDE_BUILD_FAILED = 1609
+ XML_XINCLUDE_UNKNOWN_ENCODING = 1610
+ XML_XINCLUDE_MULTIPLE_ROOT = 1611
+ XML_XINCLUDE_XPTR_FAILED = 1612
+ XML_XINCLUDE_XPTR_RESULT = 1613
+ XML_XINCLUDE_INCLUDE_IN_INCLUDE = 1614
+ XML_XINCLUDE_FALLBACKS_IN_INCLUDE = 1615
+ XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE = 1616
+ XML_XINCLUDE_DEPRECATED_NS = 1617
+ XML_XINCLUDE_FRAGMENT_ID = 1618
+ XML_CATALOG_MISSING_ATTR = 1650
+ XML_CATALOG_ENTRY_BROKEN = 1651
+ XML_CATALOG_PREFER_VALUE = 1652
+ XML_CATALOG_NOT_CATALOG = 1653
+ XML_CATALOG_RECURSION = 1654
+ XML_SCHEMAP_PREFIX_UNDEFINED = 1700
+ XML_SCHEMAP_ATTRFORMDEFAULT_VALUE = 1701
+ XML_SCHEMAP_ATTRGRP_NONAME_NOREF = 1702
+ XML_SCHEMAP_ATTR_NONAME_NOREF = 1703
+ XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF = 1704
+ XML_SCHEMAP_ELEMFORMDEFAULT_VALUE = 1705
+ XML_SCHEMAP_ELEM_NONAME_NOREF = 1706
+ XML_SCHEMAP_EXTENSION_NO_BASE = 1707
+ XML_SCHEMAP_FACET_NO_VALUE = 1708
+ XML_SCHEMAP_FAILED_BUILD_IMPORT = 1709
+ XML_SCHEMAP_GROUP_NONAME_NOREF = 1710
+ XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI = 1711
+ XML_SCHEMAP_IMPORT_REDEFINE_NSNAME = 1712
+ XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI = 1713
+ XML_SCHEMAP_INVALID_BOOLEAN = 1714
+ XML_SCHEMAP_INVALID_ENUM = 1715
+ XML_SCHEMAP_INVALID_FACET = 1716
+ XML_SCHEMAP_INVALID_FACET_VALUE = 1717
+ XML_SCHEMAP_INVALID_MAXOCCURS = 1718
+ XML_SCHEMAP_INVALID_MINOCCURS = 1719
+ XML_SCHEMAP_INVALID_REF_AND_SUBTYPE = 1720
+ XML_SCHEMAP_INVALID_WHITE_SPACE = 1721
+ XML_SCHEMAP_NOATTR_NOREF = 1722
+ XML_SCHEMAP_NOTATION_NO_NAME = 1723
+ XML_SCHEMAP_NOTYPE_NOREF = 1724
+ XML_SCHEMAP_REF_AND_SUBTYPE = 1725
+ XML_SCHEMAP_RESTRICTION_NONAME_NOREF = 1726
+ XML_SCHEMAP_SIMPLETYPE_NONAME = 1727
+ XML_SCHEMAP_TYPE_AND_SUBTYPE = 1728
+ XML_SCHEMAP_UNKNOWN_ALL_CHILD = 1729
+ XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD = 1730
+ XML_SCHEMAP_UNKNOWN_ATTR_CHILD = 1731
+ XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD = 1732
+ XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP = 1733
+ XML_SCHEMAP_UNKNOWN_BASE_TYPE = 1734
+ XML_SCHEMAP_UNKNOWN_CHOICE_CHILD = 1735
+ XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD = 1736
+ XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD = 1737
+ XML_SCHEMAP_UNKNOWN_ELEM_CHILD = 1738
+ XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD = 1739
+ XML_SCHEMAP_UNKNOWN_FACET_CHILD = 1740
+ XML_SCHEMAP_UNKNOWN_FACET_TYPE = 1741
+ XML_SCHEMAP_UNKNOWN_GROUP_CHILD = 1742
+ XML_SCHEMAP_UNKNOWN_IMPORT_CHILD = 1743
+ XML_SCHEMAP_UNKNOWN_LIST_CHILD = 1744
+ XML_SCHEMAP_UNKNOWN_NOTATION_CHILD = 1745
+ XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD = 1746
+ XML_SCHEMAP_UNKNOWN_REF = 1747
+ XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD = 1748
+ XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD = 1749
+ XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD = 1750
+ XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD = 1751
+ XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD = 1752
+ XML_SCHEMAP_UNKNOWN_TYPE = 1753
+ XML_SCHEMAP_UNKNOWN_UNION_CHILD = 1754
+ XML_SCHEMAP_ELEM_DEFAULT_FIXED = 1755
+ XML_SCHEMAP_REGEXP_INVALID = 1756
+ XML_SCHEMAP_FAILED_LOAD = 1757
+ XML_SCHEMAP_NOTHING_TO_PARSE = 1758
+ XML_SCHEMAP_NOROOT = 1759
+ XML_SCHEMAP_REDEFINED_GROUP = 1760
+ XML_SCHEMAP_REDEFINED_TYPE = 1761
+ XML_SCHEMAP_REDEFINED_ELEMENT = 1762
+ XML_SCHEMAP_REDEFINED_ATTRGROUP = 1763
+ XML_SCHEMAP_REDEFINED_ATTR = 1764
+ XML_SCHEMAP_REDEFINED_NOTATION = 1765
+ XML_SCHEMAP_FAILED_PARSE = 1766
+ XML_SCHEMAP_UNKNOWN_PREFIX = 1767
+ XML_SCHEMAP_DEF_AND_PREFIX = 1768
+ XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD = 1769
+ XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI = 1770
+ XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI = 1771
+ XML_SCHEMAP_NOT_SCHEMA = 1772
+ XML_SCHEMAP_UNKNOWN_MEMBER_TYPE = 1773
+ XML_SCHEMAP_INVALID_ATTR_USE = 1774
+ XML_SCHEMAP_RECURSIVE = 1775
+ XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE = 1776
+ XML_SCHEMAP_INVALID_ATTR_COMBINATION = 1777
+ XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION = 1778
+ XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD = 1779
+ XML_SCHEMAP_INVALID_ATTR_NAME = 1780
+ XML_SCHEMAP_REF_AND_CONTENT = 1781
+ XML_SCHEMAP_CT_PROPS_CORRECT_1 = 1782
+ XML_SCHEMAP_CT_PROPS_CORRECT_2 = 1783
+ XML_SCHEMAP_CT_PROPS_CORRECT_3 = 1784
+ XML_SCHEMAP_CT_PROPS_CORRECT_4 = 1785
+ XML_SCHEMAP_CT_PROPS_CORRECT_5 = 1786
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1 = 1787
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1 = 1788
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2 = 1789
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2 = 1790
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3 = 1791
+ XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER = 1792
+ XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE = 1793
+ XML_SCHEMAP_UNION_NOT_EXPRESSIBLE = 1794
+ XML_SCHEMAP_SRC_IMPORT_3_1 = 1795
+ XML_SCHEMAP_SRC_IMPORT_3_2 = 1796
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1 = 1797
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2 = 1798
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3 = 1799
+ XML_SCHEMAP_COS_CT_EXTENDS_1_3 = 1800
+ XML_SCHEMAV_NOROOT = 1801
+ XML_SCHEMAV_UNDECLAREDELEM = 1802
+ XML_SCHEMAV_NOTTOPLEVEL = 1803
+ XML_SCHEMAV_MISSING = 1804
+ XML_SCHEMAV_WRONGELEM = 1805
+ XML_SCHEMAV_NOTYPE = 1806
+ XML_SCHEMAV_NOROLLBACK = 1807
+ XML_SCHEMAV_ISABSTRACT = 1808
+ XML_SCHEMAV_NOTEMPTY = 1809
+ XML_SCHEMAV_ELEMCONT = 1810
+ XML_SCHEMAV_HAVEDEFAULT = 1811
+ XML_SCHEMAV_NOTNILLABLE = 1812
+ XML_SCHEMAV_EXTRACONTENT = 1813
+ XML_SCHEMAV_INVALIDATTR = 1814
+ XML_SCHEMAV_INVALIDELEM = 1815
+ XML_SCHEMAV_NOTDETERMINIST = 1816
+ XML_SCHEMAV_CONSTRUCT = 1817
+ XML_SCHEMAV_INTERNAL = 1818
+ XML_SCHEMAV_NOTSIMPLE = 1819
+ XML_SCHEMAV_ATTRUNKNOWN = 1820
+ XML_SCHEMAV_ATTRINVALID = 1821
+ XML_SCHEMAV_VALUE = 1822
+ XML_SCHEMAV_FACET = 1823
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1 = 1824
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2 = 1825
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3 = 1826
+ XML_SCHEMAV_CVC_TYPE_3_1_1 = 1827
+ XML_SCHEMAV_CVC_TYPE_3_1_2 = 1828
+ XML_SCHEMAV_CVC_FACET_VALID = 1829
+ XML_SCHEMAV_CVC_LENGTH_VALID = 1830
+ XML_SCHEMAV_CVC_MINLENGTH_VALID = 1831
+ XML_SCHEMAV_CVC_MAXLENGTH_VALID = 1832
+ XML_SCHEMAV_CVC_MININCLUSIVE_VALID = 1833
+ XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID = 1834
+ XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID = 1835
+ XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID = 1836
+ XML_SCHEMAV_CVC_TOTALDIGITS_VALID = 1837
+ XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID = 1838
+ XML_SCHEMAV_CVC_PATTERN_VALID = 1839
+ XML_SCHEMAV_CVC_ENUMERATION_VALID = 1840
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1 = 1841
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2 = 1842
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3 = 1843
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4 = 1844
+ XML_SCHEMAV_CVC_ELT_1 = 1845
+ XML_SCHEMAV_CVC_ELT_2 = 1846
+ XML_SCHEMAV_CVC_ELT_3_1 = 1847
+ XML_SCHEMAV_CVC_ELT_3_2_1 = 1848
+ XML_SCHEMAV_CVC_ELT_3_2_2 = 1849
+ XML_SCHEMAV_CVC_ELT_4_1 = 1850
+ XML_SCHEMAV_CVC_ELT_4_2 = 1851
+ XML_SCHEMAV_CVC_ELT_4_3 = 1852
+ XML_SCHEMAV_CVC_ELT_5_1_1 = 1853
+ XML_SCHEMAV_CVC_ELT_5_1_2 = 1854
+ XML_SCHEMAV_CVC_ELT_5_2_1 = 1855
+ XML_SCHEMAV_CVC_ELT_5_2_2_1 = 1856
+ XML_SCHEMAV_CVC_ELT_5_2_2_2_1 = 1857
+ XML_SCHEMAV_CVC_ELT_5_2_2_2_2 = 1858
+ XML_SCHEMAV_CVC_ELT_6 = 1859
+ XML_SCHEMAV_CVC_ELT_7 = 1860
+ XML_SCHEMAV_CVC_ATTRIBUTE_1 = 1861
+ XML_SCHEMAV_CVC_ATTRIBUTE_2 = 1862
+ XML_SCHEMAV_CVC_ATTRIBUTE_3 = 1863
+ XML_SCHEMAV_CVC_ATTRIBUTE_4 = 1864
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1 = 1865
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1 = 1866
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2 = 1867
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_4 = 1868
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1 = 1869
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2 = 1870
+ XML_SCHEMAV_ELEMENT_CONTENT = 1871
+ XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING = 1872
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_1 = 1873
+ XML_SCHEMAV_CVC_AU = 1874
+ XML_SCHEMAV_CVC_TYPE_1 = 1875
+ XML_SCHEMAV_CVC_TYPE_2 = 1876
+ XML_SCHEMAV_CVC_IDC = 1877
+ XML_SCHEMAV_CVC_WILDCARD = 1878
+ XML_SCHEMAV_MISC = 1879
+ XML_XPTR_UNKNOWN_SCHEME = 1900
+ XML_XPTR_CHILDSEQ_START = 1901
+ XML_XPTR_EVAL_FAILED = 1902
+ XML_XPTR_EXTRA_OBJECTS = 1903
+ XML_C14N_CREATE_CTXT = 1950
+ XML_C14N_REQUIRES_UTF8 = 1951
+ XML_C14N_CREATE_STACK = 1952
+ XML_C14N_INVALID_NODE = 1953
+ XML_C14N_UNKNOW_NODE = 1954
+ XML_C14N_RELATIVE_NAMESPACE = 1955
+ XML_FTP_PASV_ANSWER = 2000
+ XML_FTP_EPSV_ANSWER = 2001
+ XML_FTP_ACCNT = 2002
+ XML_FTP_URL_SYNTAX = 2003
+ XML_HTTP_URL_SYNTAX = 2020
+ XML_HTTP_USE_IP = 2021
+ XML_HTTP_UNKNOWN_HOST = 2022
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_2 = 3001
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_3 = 3002
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_4 = 3003
+ XML_SCHEMAP_SRC_RESOLVE = 3004
+ XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE = 3005
+ XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE = 3006
+ XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES = 3007
+ XML_SCHEMAP_ST_PROPS_CORRECT_1 = 3008
+ XML_SCHEMAP_ST_PROPS_CORRECT_2 = 3009
+ XML_SCHEMAP_ST_PROPS_CORRECT_3 = 3010
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_1 = 3011
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_2 = 3012
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1 = 3013
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2 = 3014
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_1 = 3015
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1 = 3016
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2 = 3017
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1 = 3018
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2 = 3019
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3 = 3020
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4 = 3021
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5 = 3022
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_1 = 3023
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1 = 3024
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2 = 3025
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2 = 3026
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1 = 3027
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3 = 3028
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4 = 3029
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5 = 3030
+ XML_SCHEMAP_COS_ST_DERIVED_OK_2_1 = 3031
+ XML_SCHEMAP_COS_ST_DERIVED_OK_2_2 = 3032
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED = 3033
+ XML_SCHEMAP_S4S_ELEM_MISSING = 3034
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED = 3035
+ XML_SCHEMAP_S4S_ATTR_MISSING = 3036
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE = 3037
+ XML_SCHEMAP_SRC_ELEMENT_1 = 3038
+ XML_SCHEMAP_SRC_ELEMENT_2_1 = 3039
+ XML_SCHEMAP_SRC_ELEMENT_2_2 = 3040
+ XML_SCHEMAP_SRC_ELEMENT_3 = 3041
+ XML_SCHEMAP_P_PROPS_CORRECT_1 = 3042
+ XML_SCHEMAP_P_PROPS_CORRECT_2_1 = 3043
+ XML_SCHEMAP_P_PROPS_CORRECT_2_2 = 3044
+ XML_SCHEMAP_E_PROPS_CORRECT_2 = 3045
+ XML_SCHEMAP_E_PROPS_CORRECT_3 = 3046
+ XML_SCHEMAP_E_PROPS_CORRECT_4 = 3047
+ XML_SCHEMAP_E_PROPS_CORRECT_5 = 3048
+ XML_SCHEMAP_E_PROPS_CORRECT_6 = 3049
+ XML_SCHEMAP_SRC_INCLUDE = 3050
+ XML_SCHEMAP_SRC_ATTRIBUTE_1 = 3051
+ XML_SCHEMAP_SRC_ATTRIBUTE_2 = 3052
+ XML_SCHEMAP_SRC_ATTRIBUTE_3_1 = 3053
+ XML_SCHEMAP_SRC_ATTRIBUTE_3_2 = 3054
+ XML_SCHEMAP_SRC_ATTRIBUTE_4 = 3055
+ XML_SCHEMAP_NO_XMLNS = 3056
+ XML_SCHEMAP_NO_XSI = 3057
+ XML_SCHEMAP_COS_VALID_DEFAULT_1 = 3058
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_1 = 3059
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1 = 3060
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2 = 3061
+ XML_SCHEMAP_CVC_SIMPLE_TYPE = 3062
+ XML_SCHEMAP_COS_CT_EXTENDS_1_1 = 3063
+ XML_SCHEMAP_SRC_IMPORT_1_1 = 3064
+ XML_SCHEMAP_SRC_IMPORT_1_2 = 3065
+ XML_SCHEMAP_SRC_IMPORT_2 = 3066
+ XML_SCHEMAP_SRC_IMPORT_2_1 = 3067
+ XML_SCHEMAP_SRC_IMPORT_2_2 = 3068
+ XML_SCHEMAP_INTERNAL = 3069 # 3069 non-W3C
+ XML_SCHEMAP_NOT_DETERMINISTIC = 3070 # 3070 non-W3C
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1 = 3071
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2 = 3072
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3 = 3073
+ XML_SCHEMAP_MG_PROPS_CORRECT_1 = 3074
+ XML_SCHEMAP_MG_PROPS_CORRECT_2 = 3075
+ XML_SCHEMAP_SRC_CT_1 = 3076
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3 = 3077
+ XML_SCHEMAP_AU_PROPS_CORRECT_2 = 3078
+ XML_SCHEMAP_A_PROPS_CORRECT_2 = 3079
+ XML_SCHEMAP_C_PROPS_CORRECT = 3080
+ XML_SCHEMAP_SRC_REDEFINE = 3081
+ XML_SCHEMAP_SRC_IMPORT = 3082
+ XML_SCHEMAP_WARN_SKIP_SCHEMA = 3083
+ XML_SCHEMAP_WARN_UNLOCATED_SCHEMA = 3084
+ XML_SCHEMAP_WARN_ATTR_REDECL_PROH = 3085
+ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH = 3086 # 3085
+ XML_SCHEMAP_AG_PROPS_CORRECT = 3087 # 3086
+ XML_SCHEMAP_COS_CT_EXTENDS_1_2 = 3088 # 3087
+ XML_SCHEMAP_AU_PROPS_CORRECT = 3089 # 3088
+ XML_SCHEMAP_A_PROPS_CORRECT_3 = 3090 # 3089
+ XML_SCHEMAP_COS_ALL_LIMITED = 3091 # 3090
+ XML_SCHEMATRONV_ASSERT = 4000
+ XML_SCHEMATRONV_REPORT = 4001
+ XML_MODULE_OPEN = 4900
+ XML_MODULE_CLOSE = 4901
+ XML_CHECK_FOUND_ELEMENT = 5000
+ XML_CHECK_FOUND_ATTRIBUTE = 5001
+ XML_CHECK_FOUND_TEXT = 5002
+ XML_CHECK_FOUND_CDATA = 5003
+ XML_CHECK_FOUND_ENTITYREF = 5004
+ XML_CHECK_FOUND_ENTITY = 5005
+ XML_CHECK_FOUND_PI = 5006
+ XML_CHECK_FOUND_COMMENT = 5007
+ XML_CHECK_FOUND_DOCTYPE = 5008
+ XML_CHECK_FOUND_FRAGMENT = 5009
+ XML_CHECK_FOUND_NOTATION = 5010
+ XML_CHECK_UNKNOWN_NODE = 5011
+ XML_CHECK_ENTITY_TYPE = 5012
+ XML_CHECK_NO_PARENT = 5013
+ XML_CHECK_NO_DOC = 5014
+ XML_CHECK_NO_NAME = 5015
+ XML_CHECK_NO_ELEM = 5016
+ XML_CHECK_WRONG_DOC = 5017
+ XML_CHECK_NO_PREV = 5018
+ XML_CHECK_WRONG_PREV = 5019
+ XML_CHECK_NO_NEXT = 5020
+ XML_CHECK_WRONG_NEXT = 5021
+ XML_CHECK_NOT_DTD = 5022
+ XML_CHECK_NOT_ATTR = 5023
+ XML_CHECK_NOT_ATTR_DECL = 5024
+ XML_CHECK_NOT_ELEM_DECL = 5025
+ XML_CHECK_NOT_ENTITY_DECL = 5026
+ XML_CHECK_NOT_NS_DECL = 5027
+ XML_CHECK_NO_HREF = 5028
+ XML_CHECK_WRONG_PARENT = 5029
+ XML_CHECK_NS_SCOPE = 5030
+ XML_CHECK_NS_ANCESTOR = 5031
+ XML_CHECK_NOT_UTF8 = 5032
+ XML_CHECK_NO_DICT = 5033
+ XML_CHECK_NOT_NCNAME = 5034
+ XML_CHECK_OUTSIDE_DICT = 5035
+ XML_CHECK_WRONG_NAME = 5036
+ XML_CHECK_NAME_NOT_NULL = 5037
+ XML_I18N_NO_NAME = 6000
+ XML_I18N_NO_HANDLER = 6001
+ XML_I18N_EXCESS_HANDLER = 6002
+ XML_I18N_CONV_FAILED = 6003
+ XML_I18N_NO_OUTPUT = 6004
+ XML_BUF_OVERFLOW = 7000
+
+ ctypedef enum xmlRelaxNGValidErr:
+ XML_RELAXNG_OK = 0
+ XML_RELAXNG_ERR_MEMORY = 1
+ XML_RELAXNG_ERR_TYPE = 2
+ XML_RELAXNG_ERR_TYPEVAL = 3
+ XML_RELAXNG_ERR_DUPID = 4
+ XML_RELAXNG_ERR_TYPECMP = 5
+ XML_RELAXNG_ERR_NOSTATE = 6
+ XML_RELAXNG_ERR_NODEFINE = 7
+ XML_RELAXNG_ERR_LISTEXTRA = 8
+ XML_RELAXNG_ERR_LISTEMPTY = 9
+ XML_RELAXNG_ERR_INTERNODATA = 10
+ XML_RELAXNG_ERR_INTERSEQ = 11
+ XML_RELAXNG_ERR_INTEREXTRA = 12
+ XML_RELAXNG_ERR_ELEMNAME = 13
+ XML_RELAXNG_ERR_ATTRNAME = 14
+ XML_RELAXNG_ERR_ELEMNONS = 15
+ XML_RELAXNG_ERR_ATTRNONS = 16
+ XML_RELAXNG_ERR_ELEMWRONGNS = 17
+ XML_RELAXNG_ERR_ATTRWRONGNS = 18
+ XML_RELAXNG_ERR_ELEMEXTRANS = 19
+ XML_RELAXNG_ERR_ATTREXTRANS = 20
+ XML_RELAXNG_ERR_ELEMNOTEMPTY = 21
+ XML_RELAXNG_ERR_NOELEM = 22
+ XML_RELAXNG_ERR_NOTELEM = 23
+ XML_RELAXNG_ERR_ATTRVALID = 24
+ XML_RELAXNG_ERR_CONTENTVALID = 25
+ XML_RELAXNG_ERR_EXTRACONTENT = 26
+ XML_RELAXNG_ERR_INVALIDATTR = 27
+ XML_RELAXNG_ERR_DATAELEM = 28
+ XML_RELAXNG_ERR_VALELEM = 29
+ XML_RELAXNG_ERR_LISTELEM = 30
+ XML_RELAXNG_ERR_DATATYPE = 31
+ XML_RELAXNG_ERR_VALUE = 32
+ XML_RELAXNG_ERR_LIST = 33
+ XML_RELAXNG_ERR_NOGRAMMAR = 34
+ XML_RELAXNG_ERR_EXTRADATA = 35
+ XML_RELAXNG_ERR_LACKDATA = 36
+ XML_RELAXNG_ERR_INTERNAL = 37
+ XML_RELAXNG_ERR_ELEMWRONG = 38
+ XML_RELAXNG_ERR_TEXTWRONG = 39
+# --- END: GENERATED CONSTANTS ---
+
+cdef extern from "libxml/xmlerror.h" nogil:
+ ctypedef struct xmlError:
+ int domain
+ int code
+ char* message
+ xmlErrorLevel level
+ char* file
+ char* str1
+ char* str2
+ char* str3
+ int line
+ int int1
+ int int2
+ void* node
+
+ ctypedef void (*xmlGenericErrorFunc)(void* ctxt, char* msg, ...) noexcept
+ ctypedef void (*xmlStructuredErrorFunc)(void* userData,
+ const xmlError* error) noexcept
+
+ cdef void xmlSetGenericErrorFunc(
+ void* ctxt, xmlGenericErrorFunc func)
+ cdef void xmlSetStructuredErrorFunc(
+ void* ctxt, xmlStructuredErrorFunc func)
+
+cdef extern from "libxml/globals.h" nogil:
+ cdef xmlStructuredErrorFunc xmlStructuredError
+ cdef void* xmlStructuredErrorContext
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xmlparser.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xmlparser.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..3a721c1dc999e9c9b91685a8b7d24e928f976819
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xmlparser.pxd
@@ -0,0 +1,310 @@
+from libc.string cimport const_char
+
+from lxml.includes.tree cimport (
+ xmlDoc, xmlNode, xmlEntity, xmlDict, xmlDtd, xmlChar, const_xmlChar)
+from lxml.includes.tree cimport xmlInputReadCallback, xmlInputCloseCallback
+from lxml.includes.xmlerror cimport xmlError, xmlStructuredErrorFunc, xmlErrorLevel
+
+
+cdef extern from "libxml/parser.h" nogil:
+ ctypedef void (*startElementNsSAX2Func)(void* ctx,
+ const_xmlChar* localname,
+ const_xmlChar* prefix,
+ const_xmlChar* URI,
+ int nb_namespaces,
+ const_xmlChar** namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const_xmlChar** attributes) noexcept
+
+ ctypedef void (*endElementNsSAX2Func)(void* ctx,
+ const_xmlChar* localname,
+ const_xmlChar* prefix,
+ const_xmlChar* URI) noexcept
+
+ ctypedef void (*startElementSAXFunc)(void* ctx, const_xmlChar* name, const_xmlChar** atts) noexcept
+
+ ctypedef void (*endElementSAXFunc)(void* ctx, const_xmlChar* name) noexcept
+
+ ctypedef void (*charactersSAXFunc)(void* ctx, const_xmlChar* ch, int len) noexcept
+
+ ctypedef void (*cdataBlockSAXFunc)(void* ctx, const_xmlChar* value, int len) noexcept
+
+ ctypedef void (*commentSAXFunc)(void* ctx, const_xmlChar* value) noexcept
+
+ ctypedef void (*processingInstructionSAXFunc)(void* ctx,
+ const_xmlChar* target,
+ const_xmlChar* data) noexcept
+
+ ctypedef void (*internalSubsetSAXFunc)(void* ctx,
+ const_xmlChar* name,
+ const_xmlChar* externalID,
+ const_xmlChar* systemID) noexcept
+
+ ctypedef void (*endDocumentSAXFunc)(void* ctx) noexcept
+
+ ctypedef void (*startDocumentSAXFunc)(void* ctx) noexcept
+
+ ctypedef void (*referenceSAXFunc)(void * ctx, const_xmlChar* name) noexcept
+
+ ctypedef xmlEntity* (*getEntitySAXFunc)(void* ctx, const_xmlChar* name) noexcept
+
+ cdef int XML_SAX2_MAGIC
+
+cdef extern from "libxml/tree.h" nogil:
+ ctypedef struct xmlParserInput:
+ int line
+ int col
+ int length
+ const_xmlChar* base
+ const_xmlChar* cur
+ const_xmlChar* end
+ const_char *filename
+
+ ctypedef struct xmlParserInputBuffer:
+ void* context
+ xmlInputReadCallback readcallback
+ xmlInputCloseCallback closecallback
+
+ ctypedef struct xmlSAXHandlerV1:
+ # same as xmlSAXHandler, but without namespaces
+ pass
+
+ ctypedef struct xmlSAXHandler:
+ internalSubsetSAXFunc internalSubset
+ startElementNsSAX2Func startElementNs
+ endElementNsSAX2Func endElementNs
+ startElementSAXFunc startElement
+ endElementSAXFunc endElement
+ charactersSAXFunc characters
+ cdataBlockSAXFunc cdataBlock
+ referenceSAXFunc reference
+ getEntitySAXFunc getEntity
+ commentSAXFunc comment
+ processingInstructionSAXFunc processingInstruction
+ startDocumentSAXFunc startDocument
+ endDocumentSAXFunc endDocument
+ int initialized
+ xmlStructuredErrorFunc serror
+ void* _private
+
+
+cdef extern from "libxml/SAX2.h" nogil:
+ cdef void xmlSAX2StartDocument(void* ctxt)
+
+
+cdef extern from "libxml/xmlIO.h" nogil:
+ cdef xmlParserInputBuffer* xmlAllocParserInputBuffer(int enc)
+
+
+cdef extern from "libxml/parser.h" nogil:
+
+ ctypedef enum xmlFeature:
+ XML_WITH_THREAD = 1
+ XML_WITH_TREE = 2
+ XML_WITH_OUTPUT = 3
+ XML_WITH_PUSH = 4
+ XML_WITH_READER = 5
+ XML_WITH_PATTERN = 6
+ XML_WITH_WRITER = 7
+ XML_WITH_SAX1 = 8
+ XML_WITH_FTP = 9
+ XML_WITH_HTTP = 10
+ XML_WITH_VALID = 11
+ XML_WITH_HTML = 12
+ XML_WITH_LEGACY = 13
+ XML_WITH_C14N = 14
+ XML_WITH_CATALOG = 15
+ XML_WITH_XPATH = 16
+ XML_WITH_XPTR = 17
+ XML_WITH_XINCLUDE = 18
+ XML_WITH_ICONV = 19
+ XML_WITH_ISO8859X = 20
+ XML_WITH_UNICODE = 21
+ XML_WITH_REGEXP = 22
+ XML_WITH_AUTOMATA = 23
+ XML_WITH_EXPR = 24
+ XML_WITH_SCHEMAS = 25
+ XML_WITH_SCHEMATRON = 26
+ XML_WITH_MODULES = 27
+ XML_WITH_DEBUG = 28
+ XML_WITH_DEBUG_MEM = 29
+ XML_WITH_DEBUG_RUN = 30
+ XML_WITH_ZLIB = 31
+ XML_WITH_ICU = 32
+ XML_WITH_LZMA = 33
+
+ cdef bint xmlHasFeature(xmlFeature feature)
+
+ cdef xmlDict* xmlDictCreate()
+ cdef xmlDict* xmlDictCreateSub(xmlDict* subdict)
+ cdef void xmlDictFree(xmlDict* sub)
+ cdef int xmlDictReference(xmlDict* dict)
+
+ cdef int XML_COMPLETE_ATTRS # SAX option for adding DTD default attributes
+ cdef int XML_SKIP_IDS # SAX option for not building an XML ID dict
+
+ ctypedef enum xmlParserInputState:
+ XML_PARSER_EOF = -1 # nothing is to be parsed
+ XML_PARSER_START = 0 # nothing has been parsed
+ XML_PARSER_MISC = 1 # Misc* before int subset
+ XML_PARSER_PI = 2 # Within a processing instruction
+ XML_PARSER_DTD = 3 # within some DTD content
+ XML_PARSER_PROLOG = 4 # Misc* after internal subset
+ XML_PARSER_COMMENT = 5 # within a comment
+ XML_PARSER_START_TAG = 6 # within a start tag
+ XML_PARSER_CONTENT = 7 # within the content
+ XML_PARSER_CDATA_SECTION = 8 # within a CDATA section
+ XML_PARSER_END_TAG = 9 # within a closing tag
+ XML_PARSER_ENTITY_DECL = 10 # within an entity declaration
+ XML_PARSER_ENTITY_VALUE = 11 # within an entity value in a decl
+ XML_PARSER_ATTRIBUTE_VALUE = 12 # within an attribute value
+ XML_PARSER_SYSTEM_LITERAL = 13 # within a SYSTEM value
+ XML_PARSER_EPILOG = 14 # the Misc* after the last end tag
+ XML_PARSER_IGNORE = 15 # within an IGNORED section
+ XML_PARSER_PUBLIC_LITERAL = 16 # within a PUBLIC value
+
+
+ ctypedef struct xmlParserCtxt:
+ xmlDoc* myDoc
+ xmlDict* dict
+ int dictNames
+ void* _private
+ bint wellFormed
+ bint recovery
+ int options
+ bint disableSAX
+ int errNo
+ xmlParserInputState instate
+ bint replaceEntities
+ int loadsubset # != 0 if enabled, int value == why
+ bint validate
+ xmlError lastError
+ xmlNode* node
+ xmlSAXHandler* sax
+ void* userData
+ int* spaceTab
+ int spaceMax
+ int nsNr
+ bint html
+ bint progressive
+ int inSubset
+ int charset
+ xmlParserInput* input
+ int inputNr
+ xmlParserInput* inputTab[]
+
+ ctypedef enum xmlParserOption:
+ XML_PARSE_RECOVER = 1 # recover on errors
+ XML_PARSE_NOENT = 2 # substitute entities
+ XML_PARSE_DTDLOAD = 4 # load the external subset
+ XML_PARSE_DTDATTR = 8 # default DTD attributes
+ XML_PARSE_DTDVALID = 16 # validate with the DTD
+ XML_PARSE_NOERROR = 32 # suppress error reports
+ XML_PARSE_NOWARNING = 64 # suppress warning reports
+ XML_PARSE_PEDANTIC = 128 # pedantic error reporting
+ XML_PARSE_NOBLANKS = 256 # remove blank nodes
+ XML_PARSE_SAX1 = 512 # use the SAX1 interface internally
+ XML_PARSE_XINCLUDE = 1024 # Implement XInclude substitution
+ XML_PARSE_NONET = 2048 # Forbid network access
+ XML_PARSE_NODICT = 4096 # Do not reuse the context dictionary
+ XML_PARSE_NSCLEAN = 8192 # remove redundant namespaces declarations
+ XML_PARSE_NOCDATA = 16384 # merge CDATA as text nodes
+ XML_PARSE_NOXINCNODE = 32768 # do not generate XINCLUDE START/END nodes
+ # libxml2 2.6.21+ only:
+ XML_PARSE_COMPACT = 65536 # compact small text nodes
+ # libxml2 2.7.0+ only:
+ XML_PARSE_OLD10 = 131072 # parse using XML-1.0 before update 5
+ XML_PARSE_NOBASEFIX = 262144 # do not fixup XINCLUDE xml:base uris
+ XML_PARSE_HUGE = 524288 # relax any hardcoded limit from the parser
+ # libxml2 2.7.3+ only:
+ XML_PARSE_OLDSAX = 1048576 # parse using SAX2 interface before 2.7.0
+ # libxml2 2.8.0+ only:
+ XML_PARSE_IGNORE_ENC = 2097152 # ignore internal document encoding hint
+ # libxml2 2.9.0+ only:
+ XML_PARSE_BIG_LINES = 4194304 # Store big lines numbers in text PSVI field
+
+ cdef void xmlInitParser()
+ cdef void xmlCleanupParser()
+
+ cdef int xmlLineNumbersDefault(int onoff)
+ cdef xmlParserCtxt* xmlNewParserCtxt()
+ cdef xmlParserInput* xmlNewIOInputStream(xmlParserCtxt* ctxt,
+ xmlParserInputBuffer* input,
+ int enc)
+ cdef int xmlCtxtUseOptions(xmlParserCtxt* ctxt, int options)
+ cdef void xmlFreeParserCtxt(xmlParserCtxt* ctxt)
+ cdef void xmlCtxtReset(xmlParserCtxt* ctxt)
+ cdef void xmlClearParserCtxt(xmlParserCtxt* ctxt)
+ cdef int xmlParseChunk(xmlParserCtxt* ctxt,
+ char* chunk, int size, int terminate)
+ cdef xmlDoc* xmlCtxtReadDoc(xmlParserCtxt* ctxt,
+ char* cur, char* URL, char* encoding,
+ int options)
+ cdef xmlDoc* xmlCtxtReadFile(xmlParserCtxt* ctxt,
+ char* filename, char* encoding,
+ int options)
+ cdef xmlDoc* xmlCtxtReadIO(xmlParserCtxt* ctxt,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void* ioctx,
+ char* URL, char* encoding,
+ int options)
+ cdef xmlDoc* xmlCtxtReadMemory(xmlParserCtxt* ctxt,
+ char* buffer, int size,
+ char* filename, const_char* encoding,
+ int options)
+
+ cdef void xmlErrParser(xmlParserCtxt* ctxt, xmlNode* node,
+ int domain, int code, xmlErrorLevel level,
+ const xmlChar *str1, const xmlChar *str2, const xmlChar *str3,
+ int int1, const char *msg, ...)
+
+
+# iterparse:
+
+ cdef xmlParserCtxt* xmlCreatePushParserCtxt(xmlSAXHandler* sax,
+ void* user_data,
+ char* chunk,
+ int size,
+ char* filename)
+
+ cdef int xmlCtxtResetPush(xmlParserCtxt* ctxt,
+ char* chunk,
+ int size,
+ char* filename,
+ char* encoding)
+
+# entity loaders:
+
+ ctypedef xmlParserInput* (*xmlExternalEntityLoader)(
+ const_char * URL, const_char * ID, xmlParserCtxt* context) noexcept
+ cdef xmlExternalEntityLoader xmlGetExternalEntityLoader()
+ cdef void xmlSetExternalEntityLoader(xmlExternalEntityLoader f)
+
+ cdef xmlEntity* xmlSAX2GetEntity(void* ctxt, const_xmlChar* name) noexcept
+
+# DTDs:
+
+ cdef xmlDtd* xmlParseDTD(const_xmlChar* ExternalID, const_xmlChar* SystemID)
+ cdef xmlDtd* xmlIOParseDTD(xmlSAXHandler* sax,
+ xmlParserInputBuffer* input,
+ int enc)
+
+
+cdef extern from "libxml/parserInternals.h" nogil:
+ """
+ #if LIBXML_VERSION < 21400
+ #define xmlNewInputFromMemory(url, mem, size, flags) (NULL)
+ #endif
+ """
+ cdef xmlParserInput* xmlNewInputStream(xmlParserCtxt* ctxt)
+ cdef xmlParserInput* xmlNewStringInputStream(xmlParserCtxt* ctxt,
+ char* buffer)
+ cdef xmlParserInput* xmlNewInputFromFile(xmlParserCtxt* ctxt,
+ char* filename)
+ cdef xmlParserInput* xmlNewInputFromMemory(
+ const char *url, const void *mem, size_t size, int flags) # actually "xmlParserInputFlags flags"
+ cdef void xmlFreeInputStream(xmlParserInput* input)
+ cdef int xmlSwitchEncoding(xmlParserCtxt* ctxt, int enc)
+ cdef bint xmlCtxtIsStopped(xmlParserCtxt* ctxt)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xmlschema.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xmlschema.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..0674111132ee3c2da8f2a3ec1db7d9dbb462ad30
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xmlschema.pxd
@@ -0,0 +1,35 @@
+from lxml.includes.tree cimport xmlDoc
+from lxml.includes.xmlparser cimport xmlSAXHandler
+from lxml.includes.xmlerror cimport xmlStructuredErrorFunc
+
+cdef extern from "libxml/xmlschemas.h" nogil:
+ ctypedef struct xmlSchema
+ ctypedef struct xmlSchemaParserCtxt
+
+ ctypedef struct xmlSchemaSAXPlugStruct
+ ctypedef struct xmlSchemaValidCtxt
+
+ ctypedef enum xmlSchemaValidOption:
+ XML_SCHEMA_VAL_VC_I_CREATE = 1
+
+ cdef xmlSchemaValidCtxt* xmlSchemaNewValidCtxt(xmlSchema* schema) nogil
+ cdef void xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxt* ctxt,
+ xmlStructuredErrorFunc serror, void *ctx)
+ cdef void xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxt* ctxt,
+ xmlStructuredErrorFunc serror, void *ctx)
+
+ cdef int xmlSchemaValidateDoc(xmlSchemaValidCtxt* ctxt, xmlDoc* doc) nogil
+ cdef xmlSchema* xmlSchemaParse(xmlSchemaParserCtxt* ctxt) nogil
+ cdef xmlSchemaParserCtxt* xmlSchemaNewParserCtxt(char* URL) nogil
+ cdef xmlSchemaParserCtxt* xmlSchemaNewDocParserCtxt(xmlDoc* doc) nogil
+ cdef void xmlSchemaFree(xmlSchema* schema) nogil
+ cdef void xmlSchemaFreeParserCtxt(xmlSchemaParserCtxt* ctxt) nogil
+ cdef void xmlSchemaFreeValidCtxt(xmlSchemaValidCtxt* ctxt) nogil
+ cdef int xmlSchemaSetValidOptions(xmlSchemaValidCtxt* ctxt,
+ int options) nogil
+
+ cdef xmlSchemaSAXPlugStruct* xmlSchemaSAXPlug(xmlSchemaValidCtxt* ctxt,
+ xmlSAXHandler** sax,
+ void** data) nogil
+ cdef int xmlSchemaSAXUnplug(xmlSchemaSAXPlugStruct* sax_plug)
+ cdef int xmlSchemaIsValid(xmlSchemaValidCtxt* ctxt)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xpath.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xpath.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..22069eb7cbb576b6236f53912f8529863a07cd08
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xpath.pxd
@@ -0,0 +1,136 @@
+from lxml.includes cimport tree
+from lxml.includes cimport xmlerror
+
+from libc.string cimport const_char
+from lxml.includes.tree cimport xmlChar, const_xmlChar
+
+
+cdef extern from "libxml/xpath.h" nogil:
+ ctypedef enum xmlXPathObjectType:
+ XPATH_UNDEFINED = 0
+ XPATH_NODESET = 1
+ XPATH_BOOLEAN = 2
+ XPATH_NUMBER = 3
+ XPATH_STRING = 4
+ XPATH_POINT = 5
+ XPATH_RANGE = 6
+ XPATH_LOCATIONSET = 7
+ XPATH_USERS = 8
+ XPATH_XSLT_TREE = 9
+
+ ctypedef enum xmlXPathError:
+ XPATH_EXPRESSION_OK = 0
+ XPATH_NUMBER_ERROR = 1
+ XPATH_UNFINISHED_LITERAL_ERROR = 2
+ XPATH_START_LITERAL_ERROR = 3
+ XPATH_VARIABLE_REF_ERROR = 4
+ XPATH_UNDEF_VARIABLE_ERROR = 5
+ XPATH_INVALID_PREDICATE_ERROR = 6
+ XPATH_EXPR_ERROR = 7
+ XPATH_UNCLOSED_ERROR = 8
+ XPATH_UNKNOWN_FUNC_ERROR = 9
+ XPATH_INVALID_OPERAND = 10
+ XPATH_INVALID_TYPE = 11
+ XPATH_INVALID_ARITY = 12
+ XPATH_INVALID_CTXT_SIZE = 13
+ XPATH_INVALID_CTXT_POSITION = 14
+ XPATH_MEMORY_ERROR = 15
+ XPTR_SYNTAX_ERROR = 16
+ XPTR_RESOURCE_ERROR = 17
+ XPTR_SUB_RESOURCE_ERROR = 18
+ XPATH_UNDEF_PREFIX_ERROR = 19
+ XPATH_ENCODING_ERROR = 20
+ XPATH_INVALID_CHAR_ERROR = 21
+ XPATH_INVALID_CTXT = 22
+
+ ctypedef struct xmlNodeSet:
+ int nodeNr
+ int nodeMax
+ tree.xmlNode** nodeTab
+
+ ctypedef struct xmlXPathObject:
+ xmlXPathObjectType type
+ xmlNodeSet* nodesetval
+ bint boolval
+ double floatval
+ xmlChar* stringval
+
+ ctypedef struct xmlXPathContext:
+ tree.xmlDoc* doc
+ tree.xmlNode* node
+ tree.xmlDict* dict
+ tree.xmlHashTable* nsHash
+ const_xmlChar* function
+ const_xmlChar* functionURI
+ xmlerror.xmlStructuredErrorFunc error
+ xmlerror.xmlError lastError
+ void* userData
+
+ ctypedef struct xmlXPathParserContext:
+ xmlXPathContext* context
+ xmlXPathObject* value
+ tree.xmlNode* ancestor
+ int error
+
+ ctypedef struct xmlXPathCompExpr
+
+ ctypedef void (*xmlXPathFunction)(xmlXPathParserContext* ctxt, int nargs)
+ ctypedef xmlXPathFunction (*xmlXPathFuncLookupFunc)(void* ctxt,
+ const_xmlChar* name,
+ const_xmlChar* ns_uri)
+
+ cdef xmlXPathContext* xmlXPathNewContext(tree.xmlDoc* doc)
+ cdef xmlXPathObject* xmlXPathEvalExpression(const_xmlChar* str,
+ xmlXPathContext* ctxt)
+ cdef xmlXPathObject* xmlXPathCompiledEval(xmlXPathCompExpr* comp,
+ xmlXPathContext* ctxt)
+ cdef xmlXPathCompExpr* xmlXPathCompile(const_xmlChar* str)
+ cdef xmlXPathCompExpr* xmlXPathCtxtCompile(xmlXPathContext* ctxt,
+ const_xmlChar* str)
+ cdef void xmlXPathFreeContext(xmlXPathContext* ctxt)
+ cdef void xmlXPathFreeCompExpr(xmlXPathCompExpr* comp)
+ cdef void xmlXPathFreeObject(xmlXPathObject* obj)
+ cdef int xmlXPathRegisterNs(xmlXPathContext* ctxt,
+ const_xmlChar* prefix, const_xmlChar* ns_uri)
+
+ cdef xmlNodeSet* xmlXPathNodeSetCreate(tree.xmlNode* val)
+ cdef void xmlXPathFreeNodeSet(xmlNodeSet* val)
+
+
+cdef extern from "libxml/xpathInternals.h" nogil:
+ cdef int xmlXPathRegisterFunc(xmlXPathContext* ctxt,
+ const_xmlChar* name,
+ xmlXPathFunction f)
+ cdef int xmlXPathRegisterFuncNS(xmlXPathContext* ctxt,
+ const_xmlChar* name,
+ const_xmlChar* ns_uri,
+ xmlXPathFunction f)
+ cdef void xmlXPathRegisterFuncLookup(xmlXPathContext *ctxt,
+ xmlXPathFuncLookupFunc f,
+ void *funcCtxt)
+ cdef int xmlXPathRegisterVariable(xmlXPathContext *ctxt,
+ const_xmlChar* name,
+ xmlXPathObject* value)
+ cdef int xmlXPathRegisterVariableNS(xmlXPathContext *ctxt,
+ const_xmlChar* name,
+ const_xmlChar* ns_uri,
+ xmlXPathObject* value)
+ cdef void xmlXPathRegisteredVariablesCleanup(xmlXPathContext *ctxt)
+ cdef void xmlXPathRegisteredNsCleanup(xmlXPathContext *ctxt)
+ cdef xmlXPathObject* valuePop (xmlXPathParserContext *ctxt)
+ cdef int valuePush(xmlXPathParserContext* ctxt, xmlXPathObject *value)
+
+ cdef xmlXPathObject* xmlXPathNewCString(const_char *val)
+ cdef xmlXPathObject* xmlXPathWrapCString(const_char * val)
+ cdef xmlXPathObject* xmlXPathNewString(const_xmlChar *val)
+ cdef xmlXPathObject* xmlXPathWrapString(const_xmlChar * val)
+ cdef xmlXPathObject* xmlXPathNewFloat(double val)
+ cdef xmlXPathObject* xmlXPathNewBoolean(int val)
+ cdef xmlXPathObject* xmlXPathNewNodeSet(tree.xmlNode* val)
+ cdef xmlXPathObject* xmlXPathNewValueTree(tree.xmlNode* val)
+ cdef void xmlXPathNodeSetAdd(xmlNodeSet* cur,
+ tree.xmlNode* val)
+ cdef void xmlXPathNodeSetAddUnique(xmlNodeSet* cur,
+ tree.xmlNode* val)
+ cdef xmlXPathObject* xmlXPathWrapNodeSet(xmlNodeSet* val)
+ cdef void xmlXPathErr(xmlXPathParserContext* ctxt, int error)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xslt.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xslt.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..abafe4325c9147e77590ff0f1647100bb5e9c56a
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/xslt.pxd
@@ -0,0 +1,190 @@
+from lxml.includes.tree cimport xmlDoc, xmlNode, xmlDict, xmlChar, const_xmlChar, xmlOutputBuffer
+from lxml.includes.xmlerror cimport xmlGenericErrorFunc
+from lxml.includes.xpath cimport xmlXPathContext, xmlXPathFunction
+
+from libc.string cimport const_char
+
+cdef extern from "libxslt/xslt.h":
+ cdef int xsltLibxsltVersion
+ cdef int xsltMaxDepth
+
+cdef extern from "libxslt/xsltconfig.h":
+ cdef int LIBXSLT_VERSION
+
+cdef extern from "libxslt/xsltInternals.h" nogil:
+ ctypedef enum xsltTransformState:
+ XSLT_STATE_OK # 0
+ XSLT_STATE_ERROR # 1
+ XSLT_STATE_STOPPED # 2
+
+ ctypedef struct xsltDocument:
+ xmlDoc* doc
+
+ ctypedef struct xsltStylesheet:
+ xmlChar* encoding
+ xmlDoc* doc
+ int errors
+
+ ctypedef struct xsltTransformContext:
+ xsltStylesheet* style
+ xmlXPathContext* xpathCtxt
+ xsltDocument* document
+ void* _private
+ xmlDict* dict
+ int profile
+ xmlNode* node
+ xmlDoc* output
+ xmlNode* insert
+ xmlNode* inst
+ xsltTransformState state
+
+ ctypedef struct xsltStackElem
+
+ ctypedef struct xsltTemplate
+
+ cdef xsltStylesheet* xsltParseStylesheetDoc(xmlDoc* doc)
+ cdef void xsltFreeStylesheet(xsltStylesheet* sheet)
+
+cdef extern from "libxslt/imports.h" nogil:
+ # actually defined in "etree_defs.h"
+ cdef void LXML_GET_XSLT_ENCODING(const_xmlChar* result_var, xsltStylesheet* style)
+
+cdef extern from "libxslt/extensions.h" nogil:
+ ctypedef void (*xsltTransformFunction)(xsltTransformContext* ctxt,
+ xmlNode* context_node,
+ xmlNode* inst,
+ void* precomp_unused) noexcept
+
+ cdef int xsltRegisterExtFunction(xsltTransformContext* ctxt,
+ const_xmlChar* name,
+ const_xmlChar* URI,
+ xmlXPathFunction function)
+ cdef int xsltRegisterExtModuleFunction(const_xmlChar* name, const_xmlChar* URI,
+ xmlXPathFunction function)
+ cdef int xsltUnregisterExtModuleFunction(const_xmlChar* name, const_xmlChar* URI)
+ cdef xmlXPathFunction xsltExtModuleFunctionLookup(
+ const_xmlChar* name, const_xmlChar* URI)
+ cdef int xsltRegisterExtPrefix(xsltStylesheet* style,
+ const_xmlChar* prefix, const_xmlChar* URI)
+ cdef int xsltRegisterExtElement(xsltTransformContext* ctxt,
+ const_xmlChar* name, const_xmlChar* URI,
+ xsltTransformFunction function)
+
+cdef extern from "libxslt/documents.h" nogil:
+ ctypedef enum xsltLoadType:
+ XSLT_LOAD_START
+ XSLT_LOAD_STYLESHEET
+ XSLT_LOAD_DOCUMENT
+
+ ctypedef xmlDoc* (*xsltDocLoaderFunc)(const_xmlChar* URI, xmlDict* dict,
+ int options,
+ void* ctxt,
+ xsltLoadType type) noexcept
+ cdef xsltDocLoaderFunc xsltDocDefaultLoader
+ cdef void xsltSetLoaderFunc(xsltDocLoaderFunc f)
+
+cdef extern from "libxslt/transform.h" nogil:
+ cdef xmlDoc* xsltApplyStylesheet(xsltStylesheet* style, xmlDoc* doc,
+ const_char** params)
+ cdef xmlDoc* xsltApplyStylesheetUser(xsltStylesheet* style, xmlDoc* doc,
+ const_char** params, const_char* output,
+ void* profile,
+ xsltTransformContext* context)
+ cdef void xsltProcessOneNode(xsltTransformContext* ctxt,
+ xmlNode* contextNode,
+ xsltStackElem* params)
+ cdef xsltTransformContext* xsltNewTransformContext(xsltStylesheet* style,
+ xmlDoc* doc)
+ cdef void xsltFreeTransformContext(xsltTransformContext* context)
+ cdef void xsltApplyOneTemplate(xsltTransformContext* ctxt,
+ xmlNode* contextNode, xmlNode* list,
+ xsltTemplate* templ,
+ xsltStackElem* params)
+
+
+cdef extern from "libxslt/xsltutils.h" nogil:
+ cdef int xsltSaveResultToString(xmlChar** doc_txt_ptr,
+ int* doc_txt_len,
+ xmlDoc* result,
+ xsltStylesheet* style)
+ cdef int xsltSaveResultToFilename(const_char *URL,
+ xmlDoc* result,
+ xsltStylesheet* style,
+ int compression)
+ cdef int xsltSaveResultTo(xmlOutputBuffer* buf,
+ xmlDoc* result,
+ xsltStylesheet* style)
+ cdef xmlGenericErrorFunc xsltGenericError
+ cdef void *xsltGenericErrorContext
+ cdef void xsltSetGenericErrorFunc(
+ void* ctxt, void (*handler)(void* ctxt, char* msg, ...) nogil)
+ cdef void xsltSetTransformErrorFunc(
+ xsltTransformContext*, void* ctxt,
+ void (*handler)(void* ctxt, char* msg, ...) nogil)
+ cdef void xsltTransformError(xsltTransformContext* ctxt,
+ xsltStylesheet* style,
+ xmlNode* node, char* msg, ...)
+ cdef void xsltSetCtxtParseOptions(
+ xsltTransformContext* ctxt, int options)
+
+
+cdef extern from "libxslt/security.h" nogil:
+ ctypedef struct xsltSecurityPrefs
+ ctypedef enum xsltSecurityOption:
+ XSLT_SECPREF_READ_FILE = 1
+ XSLT_SECPREF_WRITE_FILE = 2
+ XSLT_SECPREF_CREATE_DIRECTORY = 3
+ XSLT_SECPREF_READ_NETWORK = 4
+ XSLT_SECPREF_WRITE_NETWORK = 5
+
+ ctypedef int (*xsltSecurityCheck)(xsltSecurityPrefs* sec,
+ xsltTransformContext* ctxt,
+ char* value) noexcept
+
+ cdef xsltSecurityPrefs* xsltNewSecurityPrefs()
+ cdef void xsltFreeSecurityPrefs(xsltSecurityPrefs* sec)
+ cdef int xsltSecurityForbid(xsltSecurityPrefs* sec,
+ xsltTransformContext* ctxt,
+ char* value)
+ cdef int xsltSecurityAllow(xsltSecurityPrefs* sec,
+ xsltTransformContext* ctxt,
+ char* value)
+ cdef int xsltSetSecurityPrefs(xsltSecurityPrefs* sec,
+ xsltSecurityOption option,
+ xsltSecurityCheck func)
+ cdef xsltSecurityCheck xsltGetSecurityPrefs(
+ xsltSecurityPrefs* sec,
+ xsltSecurityOption option)
+ cdef int xsltSetCtxtSecurityPrefs(xsltSecurityPrefs* sec,
+ xsltTransformContext* ctxt)
+ cdef xmlDoc* xsltGetProfileInformation(xsltTransformContext* ctxt)
+
+cdef extern from "libxslt/variables.h" nogil:
+ cdef int xsltQuoteUserParams(xsltTransformContext* ctxt,
+ const_char** params)
+ cdef int xsltQuoteOneUserParam(xsltTransformContext* ctxt,
+ const_xmlChar* name,
+ const_xmlChar* value)
+
+cdef extern from "libxslt/extra.h" nogil:
+ const_xmlChar* XSLT_LIBXSLT_NAMESPACE
+ const_xmlChar* XSLT_XALAN_NAMESPACE
+ const_xmlChar* XSLT_SAXON_NAMESPACE
+ const_xmlChar* XSLT_XT_NAMESPACE
+
+ cdef xmlXPathFunction xsltFunctionNodeSet
+ cdef void xsltRegisterAllExtras()
+
+cdef extern from "libexslt/exslt.h" nogil:
+ cdef void exsltRegisterAll()
+
+ # libexslt 1.1.25+
+ const_xmlChar* EXSLT_DATE_NAMESPACE
+ const_xmlChar* EXSLT_SETS_NAMESPACE
+ const_xmlChar* EXSLT_MATH_NAMESPACE
+ const_xmlChar* EXSLT_STRINGS_NAMESPACE
+
+ cdef int exsltDateXpathCtxtRegister(xmlXPathContext* ctxt, const_xmlChar* prefix)
+ cdef int exsltSetsXpathCtxtRegister(xmlXPathContext* ctxt, const_xmlChar* prefix)
+ cdef int exsltMathXpathCtxtRegister(xmlXPathContext* ctxt, const_xmlChar* prefix)
+ cdef int exsltStrXpathCtxtRegister(xmlXPathContext* ctxt, const_xmlChar* prefix)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..ac89fb62e4527e81931d62b07aeecb6eaf3feec0
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/__init__.py
@@ -0,0 +1,348 @@
+"""The ``lxml.isoschematron`` package implements ISO Schematron support on top
+of the pure-xslt 'skeleton' implementation.
+"""
+
+import sys
+import os.path
+from lxml import etree as _etree # due to validator __init__ signature
+
+
+# some compat stuff, borrowed from lxml.html
+try:
+ unicode
+except NameError:
+ # Python 3
+ unicode = str
+try:
+ basestring
+except NameError:
+ # Python 3
+ basestring = str
+
+
+__all__ = ['extract_xsd', 'extract_rng', 'iso_dsdl_include',
+ 'iso_abstract_expand', 'iso_svrl_for_xslt1',
+ 'svrl_validation_errors', 'schematron_schema_valid',
+ 'stylesheet_params', 'Schematron']
+
+
+# some namespaces
+#FIXME: Maybe lxml should provide a dedicated place for common namespace
+#FIXME: definitions?
+XML_SCHEMA_NS = "http://www.w3.org/2001/XMLSchema"
+RELAXNG_NS = "http://relaxng.org/ns/structure/1.0"
+SCHEMATRON_NS = "http://purl.oclc.org/dsdl/schematron"
+SVRL_NS = "http://purl.oclc.org/dsdl/svrl"
+
+
+# some helpers
+_schematron_root = '{%s}schema' % SCHEMATRON_NS
+_xml_schema_root = '{%s}schema' % XML_SCHEMA_NS
+_resources_dir = os.path.join(os.path.dirname(__file__), 'resources')
+
+
+# the iso-schematron skeleton implementation steps aka xsl transformations
+extract_xsd = _etree.XSLT(_etree.parse(
+ os.path.join(_resources_dir, 'xsl', 'XSD2Schtrn.xsl')))
+extract_rng = _etree.XSLT(_etree.parse(
+ os.path.join(_resources_dir, 'xsl', 'RNG2Schtrn.xsl')))
+iso_dsdl_include = _etree.XSLT(_etree.parse(
+ os.path.join(_resources_dir, 'xsl', 'iso-schematron-xslt1',
+ 'iso_dsdl_include.xsl')))
+iso_abstract_expand = _etree.XSLT(_etree.parse(
+ os.path.join(_resources_dir, 'xsl', 'iso-schematron-xslt1',
+ 'iso_abstract_expand.xsl')))
+iso_svrl_for_xslt1 = _etree.XSLT(_etree.parse(
+ os.path.join(_resources_dir,
+ 'xsl', 'iso-schematron-xslt1', 'iso_svrl_for_xslt1.xsl')))
+
+
+# svrl result accessors
+svrl_validation_errors = _etree.XPath(
+ '//svrl:failed-assert', namespaces={'svrl': SVRL_NS})
+
+# RelaxNG validator for schematron schemas
+schematron_schema_valid_supported = False
+try:
+ schematron_schema_valid = _etree.RelaxNG(
+ file=os.path.join(_resources_dir, 'rng', 'iso-schematron.rng'))
+ schematron_schema_valid_supported = True
+except _etree.RelaxNGParseError:
+ # Some distributions delete the file due to licensing issues.
+ def schematron_schema_valid(arg):
+ raise NotImplementedError("Validating the ISO schematron requires iso-schematron.rng")
+
+
+def stylesheet_params(**kwargs):
+ """Convert keyword args to a dictionary of stylesheet parameters.
+ XSL stylesheet parameters must be XPath expressions, i.e.:
+
+ * string expressions, like "'5'"
+ * simple (number) expressions, like "5"
+ * valid XPath expressions, like "/a/b/text()"
+
+ This function converts native Python keyword arguments to stylesheet
+ parameters following these rules:
+ If an arg is a string wrap it with XSLT.strparam().
+ If an arg is an XPath object use its path string.
+ If arg is None raise TypeError.
+ Else convert arg to string.
+ """
+ result = {}
+ for key, val in kwargs.items():
+ if isinstance(val, basestring):
+ val = _etree.XSLT.strparam(val)
+ elif val is None:
+ raise TypeError('None not allowed as a stylesheet parameter')
+ elif not isinstance(val, _etree.XPath):
+ val = unicode(val)
+ result[key] = val
+ return result
+
+
+# helper function for use in Schematron __init__
+def _stylesheet_param_dict(paramsDict, kwargsDict):
+ """Return a copy of paramsDict, updated with kwargsDict entries, wrapped as
+ stylesheet arguments.
+ kwargsDict entries with a value of None are ignored.
+ """
+ # beware of changing mutable default arg
+ paramsDict = dict(paramsDict)
+ for k, v in kwargsDict.items():
+ if v is not None: # None values do not override
+ paramsDict[k] = v
+ paramsDict = stylesheet_params(**paramsDict)
+ return paramsDict
+
+
+class Schematron(_etree._Validator):
+ """An ISO Schematron validator.
+
+ Pass a root Element or an ElementTree to turn it into a validator.
+ Alternatively, pass a filename as keyword argument 'file' to parse from
+ the file system.
+
+ Schematron is a less well known, but very powerful schema language.
+ The main idea is to use the capabilities of XPath to put restrictions on
+ the structure and the content of XML documents.
+
+ The standard behaviour is to fail on ``failed-assert`` findings only
+ (``ASSERTS_ONLY``). To change this, you can either pass a report filter
+ function to the ``error_finder`` parameter (e.g. ``ASSERTS_AND_REPORTS``
+ or a custom ``XPath`` object), or subclass isoschematron.Schematron for
+ complete control of the validation process.
+
+ Built on the Schematron language 'reference' skeleton pure-xslt
+ implementation, the validator is created as an XSLT 1.0 stylesheet using
+ these steps:
+
+ 0) (Extract from XML Schema or RelaxNG schema)
+ 1) Process inclusions
+ 2) Process abstract patterns
+ 3) Compile the schematron schema to XSLT
+
+ The ``include`` and ``expand`` keyword arguments can be used to switch off
+ steps 1) and 2).
+ To set parameters for steps 1), 2) and 3) hand parameter dictionaries to the
+ keyword arguments ``include_params``, ``expand_params`` or
+ ``compile_params``.
+ For convenience, the compile-step parameter ``phase`` is also exposed as a
+ keyword argument ``phase``. This takes precedence if the parameter is also
+ given in the parameter dictionary.
+
+ If ``store_schematron`` is set to True, the (included-and-expanded)
+ schematron document tree is stored and available through the ``schematron``
+ property.
+ If ``store_xslt`` is set to True, the validation XSLT document tree will be
+ stored and can be retrieved through the ``validator_xslt`` property.
+ With ``store_report`` set to True (default: False), the resulting validation
+ report document gets stored and can be accessed as the ``validation_report``
+ property.
+
+ If ``validate_schema`` is set to False, the validation of the schema file
+ itself is disabled. Validation happens by default after building the full
+ schema, unless the schema validation file cannot be found at import time,
+ in which case the validation gets disabled. Some lxml distributions exclude
+ this file due to licensing issues. ISO-Schematron validation can then still
+ be used normally, but the schemas themselves cannot be validated.
+
+ Here is a usage example::
+
+ >>> from lxml import etree
+ >>> from lxml.isoschematron import Schematron
+
+ >>> schematron = Schematron(etree.XML('''
+ ...
+ ...
+ ... id is the only permitted attribute name
+ ...
+ ... Attribute
+ ... is forbidden
+ ...
+ ...
+ ...
+ ... '''),
+ ... error_finder=Schematron.ASSERTS_AND_REPORTS)
+
+ >>> xml = etree.XML('''
+ ...
+ ...
+ ...
+ ...
+ ... ''')
+
+ >>> schematron.validate(xml)
+ False
+
+ >>> xml = etree.XML('''
+ ...
+ ...
+ ...
+ ...
+ ... ''')
+
+ >>> schematron.validate(xml)
+ True
+ """
+
+ # libxml2 error categorization for validation errors
+ _domain = _etree.ErrorDomains.SCHEMATRONV
+ _level = _etree.ErrorLevels.ERROR
+ _error_type = _etree.ErrorTypes.SCHEMATRONV_ASSERT
+
+ # convenience definitions for common behaviours
+ ASSERTS_ONLY = svrl_validation_errors # Default
+ ASSERTS_AND_REPORTS = _etree.XPath(
+ '//svrl:failed-assert | //svrl:successful-report',
+ namespaces={'svrl': SVRL_NS})
+
+ def _extract(self, element):
+ """Extract embedded schematron schema from non-schematron host schema.
+ This method will only be called by __init__ if the given schema document
+ is not a schematron schema by itself.
+ Must return a schematron schema document tree or None.
+ """
+ schematron = None
+ if element.tag == _xml_schema_root:
+ schematron = self._extract_xsd(element)
+ elif element.nsmap.get(element.prefix) == RELAXNG_NS:
+ # RelaxNG does not have a single unique root element
+ schematron = self._extract_rng(element)
+ return schematron
+
+ # customization points
+ # etree.XSLT objects that provide the extract, include, expand, compile
+ # steps
+ _extract_xsd = extract_xsd
+ _extract_rng = extract_rng
+ _include = iso_dsdl_include
+ _expand = iso_abstract_expand
+ _compile = iso_svrl_for_xslt1
+
+ # etree.xpath object that determines input document validity when applied to
+ # the svrl result report; must return a list of result elements (empty if
+ # valid)
+ _validation_errors = ASSERTS_ONLY
+
+ def __init__(self, etree=None, file=None, include=True, expand=True,
+ include_params={}, expand_params={}, compile_params={},
+ store_schematron=False, store_xslt=False, store_report=False,
+ phase=None, error_finder=ASSERTS_ONLY,
+ validate_schema=schematron_schema_valid_supported):
+ super().__init__()
+
+ self._store_report = store_report
+ self._schematron = None
+ self._validator_xslt = None
+ self._validation_report = None
+ if error_finder is not self.ASSERTS_ONLY:
+ self._validation_errors = error_finder
+
+ # parse schema document, may be a schematron schema or an XML Schema or
+ # a RelaxNG schema with embedded schematron rules
+ root = None
+ try:
+ if etree is not None:
+ if _etree.iselement(etree):
+ root = etree
+ else:
+ root = etree.getroot()
+ elif file is not None:
+ root = _etree.parse(file).getroot()
+ except Exception:
+ raise _etree.SchematronParseError(
+ "No tree or file given: %s" % sys.exc_info()[1])
+ if root is None:
+ raise ValueError("Empty tree")
+ if root.tag == _schematron_root:
+ schematron = root
+ else:
+ schematron = self._extract(root)
+ if schematron is None:
+ raise _etree.SchematronParseError(
+ "Document is not a schematron schema or schematron-extractable")
+ # perform the iso-schematron skeleton implementation steps to get a
+ # validating xslt
+ if include:
+ schematron = self._include(schematron, **include_params)
+ if expand:
+ schematron = self._expand(schematron, **expand_params)
+ if validate_schema and not schematron_schema_valid(schematron):
+ raise _etree.SchematronParseError(
+ "invalid schematron schema: %s" %
+ schematron_schema_valid.error_log)
+ if store_schematron:
+ self._schematron = schematron
+ # add new compile keyword args here if exposing them
+ compile_kwargs = {'phase': phase}
+ compile_params = _stylesheet_param_dict(compile_params, compile_kwargs)
+ validator_xslt = self._compile(schematron, **compile_params)
+ if store_xslt:
+ self._validator_xslt = validator_xslt
+ self._validator = _etree.XSLT(validator_xslt)
+
+ def __call__(self, etree):
+ """Validate doc using Schematron.
+
+ Returns true if document is valid, false if not.
+ """
+ self._clear_error_log()
+ result = self._validator(etree)
+ if self._store_report:
+ self._validation_report = result
+ errors = self._validation_errors(result)
+ if errors:
+ if _etree.iselement(etree):
+ fname = etree.getroottree().docinfo.URL or ''
+ else:
+ fname = etree.docinfo.URL or ''
+ for error in errors:
+ # Does svrl report the line number, anywhere? Don't think so.
+ self._append_log_message(
+ domain=self._domain, type=self._error_type,
+ level=self._level, line=0,
+ message=_etree.tostring(error, encoding='unicode'),
+ filename=fname)
+ return False
+ return True
+
+ @property
+ def schematron(self):
+ """ISO-schematron schema document (None if object has been initialized
+ with store_schematron=False).
+ """
+ return self._schematron
+
+ @property
+ def validator_xslt(self):
+ """ISO-schematron skeleton implementation XSLT validator document (None
+ if object has been initialized with store_xslt=False).
+ """
+ return self._validator_xslt
+
+ @property
+ def validation_report(self):
+ """ISO-schematron validation result report (None if result-storing has
+ been turned off).
+ """
+ return self._validation_report
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/cli/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/cli/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c611fbaf2f1599a6a8d23b45de6b45ca3fc75a6f
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/cli/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/cli/__pycache__/parse.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/cli/__pycache__/parse.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8b83a08b243a14c724dc27a8988f4298f62a5884
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/cli/__pycache__/parse.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..75e6cd68f74fbfd9ec78258526897d80dfebb58d
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/entities.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/entities.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4a66e85c54735d009e5ada3940088df48a08fbfc
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/entities.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/html_blocks.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/html_blocks.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d2e98c1b2b9b0d867aa2f78ebc73d88f893dc0ef
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/html_blocks.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/html_re.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/html_re.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8359c329ae635c70378db3aa679b48b4999b2c62
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/html_re.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/normalize_url.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/normalize_url.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b7765b64ab1f4552fc6856f9661d260282592c43
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/normalize_url.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/utils.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/utils.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2f146f0de7fc69f7736930577c8c97057d787794
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__pycache__/utils.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/html_re.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/html_re.py
new file mode 100644
index 0000000000000000000000000000000000000000..ab822c5fc487c5a494966604a1e89b57a06e0564
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/html_re.py
@@ -0,0 +1,39 @@
+"""Regexps to match html elements"""
+
+import re
+
+attr_name = "[a-zA-Z_:][a-zA-Z0-9:._-]*"
+
+unquoted = "[^\"'=<>`\\x00-\\x20]+"
+single_quoted = "'[^']*'"
+double_quoted = '"[^"]*"'
+
+attr_value = "(?:" + unquoted + "|" + single_quoted + "|" + double_quoted + ")"
+
+attribute = "(?:\\s+" + attr_name + "(?:\\s*=\\s*" + attr_value + ")?)"
+
+open_tag = "<[A-Za-z][A-Za-z0-9\\-]*" + attribute + "*\\s*\\/?>"
+
+close_tag = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>"
+comment = ""
+processing = "<[?][\\s\\S]*?[?]>"
+declaration = "]*>"
+cdata = ""
+
+HTML_TAG_RE = re.compile(
+ "^(?:"
+ + open_tag
+ + "|"
+ + close_tag
+ + "|"
+ + comment
+ + "|"
+ + processing
+ + "|"
+ + declaration
+ + "|"
+ + cdata
+ + ")"
+)
+HTML_OPEN_CLOSE_TAG_STR = "^(?:" + open_tag + "|" + close_tag + ")"
+HTML_OPEN_CLOSE_TAG_RE = re.compile(HTML_OPEN_CLOSE_TAG_STR)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/utils.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..11bda644c260b714cf010ed44d2ed345de80314e
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/utils.py
@@ -0,0 +1,313 @@
+"""Utilities for parsing source text"""
+
+from __future__ import annotations
+
+import re
+from re import Match
+from typing import TypeVar
+import unicodedata
+
+from .entities import entities
+
+
+def charCodeAt(src: str, pos: int) -> int | None:
+ """
+ Returns the Unicode value of the character at the specified location.
+
+ @param - index The zero-based index of the desired character.
+ If there is no character at the specified index, NaN is returned.
+
+ This was added for compatibility with python
+ """
+ try:
+ return ord(src[pos])
+ except IndexError:
+ return None
+
+
+def charStrAt(src: str, pos: int) -> str | None:
+ """
+ Returns the Unicode value of the character at the specified location.
+
+ @param - index The zero-based index of the desired character.
+ If there is no character at the specified index, NaN is returned.
+
+ This was added for compatibility with python
+ """
+ try:
+ return src[pos]
+ except IndexError:
+ return None
+
+
+_ItemTV = TypeVar("_ItemTV")
+
+
+def arrayReplaceAt(
+ src: list[_ItemTV], pos: int, newElements: list[_ItemTV]
+) -> list[_ItemTV]:
+ """
+ Remove element from array and put another array at those position.
+ Useful for some operations with tokens
+ """
+ return src[:pos] + newElements + src[pos + 1 :]
+
+
+def isValidEntityCode(c: int) -> bool:
+ # broken sequence
+ if c >= 0xD800 and c <= 0xDFFF:
+ return False
+ # never used
+ if c >= 0xFDD0 and c <= 0xFDEF:
+ return False
+ if ((c & 0xFFFF) == 0xFFFF) or ((c & 0xFFFF) == 0xFFFE):
+ return False
+ # control codes
+ if c >= 0x00 and c <= 0x08:
+ return False
+ if c == 0x0B:
+ return False
+ if c >= 0x0E and c <= 0x1F:
+ return False
+ if c >= 0x7F and c <= 0x9F:
+ return False
+ # out of range
+ return not (c > 0x10FFFF)
+
+
+def fromCodePoint(c: int) -> str:
+ """Convert ordinal to unicode.
+
+ Note, in the original Javascript two string characters were required,
+ for codepoints larger than `0xFFFF`.
+ But Python 3 can represent any unicode codepoint in one character.
+ """
+ return chr(c)
+
+
+# UNESCAPE_MD_RE = re.compile(r'\\([!"#$%&\'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])')
+# ENTITY_RE_g = re.compile(r'&([a-z#][a-z0-9]{1,31})', re.IGNORECASE)
+UNESCAPE_ALL_RE = re.compile(
+ r'\\([!"#$%&\'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])' + "|" + r"&([a-z#][a-z0-9]{1,31});",
+ re.IGNORECASE,
+)
+DIGITAL_ENTITY_BASE10_RE = re.compile(r"#([0-9]{1,8})")
+DIGITAL_ENTITY_BASE16_RE = re.compile(r"#x([a-f0-9]{1,8})", re.IGNORECASE)
+
+
+def replaceEntityPattern(match: str, name: str) -> str:
+ """Convert HTML entity patterns,
+ see https://spec.commonmark.org/0.30/#entity-references
+ """
+ if name in entities:
+ return entities[name]
+
+ code: None | int = None
+ if pat := DIGITAL_ENTITY_BASE10_RE.fullmatch(name):
+ code = int(pat.group(1), 10)
+ elif pat := DIGITAL_ENTITY_BASE16_RE.fullmatch(name):
+ code = int(pat.group(1), 16)
+
+ if code is not None and isValidEntityCode(code):
+ return fromCodePoint(code)
+
+ return match
+
+
+def unescapeAll(string: str) -> str:
+ def replacer_func(match: Match[str]) -> str:
+ escaped = match.group(1)
+ if escaped:
+ return escaped
+ entity = match.group(2)
+ return replaceEntityPattern(match.group(), entity)
+
+ if "\\" not in string and "&" not in string:
+ return string
+ return UNESCAPE_ALL_RE.sub(replacer_func, string)
+
+
+ESCAPABLE = r"""\\!"#$%&'()*+,./:;<=>?@\[\]^`{}|_~-"""
+ESCAPE_CHAR = re.compile(r"\\([" + ESCAPABLE + r"])")
+
+
+def stripEscape(string: str) -> str:
+ """Strip escape \\ characters"""
+ return ESCAPE_CHAR.sub(r"\1", string)
+
+
+def escapeHtml(raw: str) -> str:
+ """Replace special characters "&", "<", ">" and '"' to HTML-safe sequences."""
+ # like html.escape, but without escaping single quotes
+ raw = raw.replace("&", "&") # Must be done first!
+ raw = raw.replace("<", "<")
+ raw = raw.replace(">", ">")
+ raw = raw.replace('"', """)
+ return raw
+
+
+# //////////////////////////////////////////////////////////////////////////////
+
+REGEXP_ESCAPE_RE = re.compile(r"[.?*+^$[\]\\(){}|-]")
+
+
+def escapeRE(string: str) -> str:
+ string = REGEXP_ESCAPE_RE.sub("\\$&", string)
+ return string
+
+
+# //////////////////////////////////////////////////////////////////////////////
+
+
+def isSpace(code: int | None) -> bool:
+ """Check if character code is a whitespace."""
+ return code in (0x09, 0x20)
+
+
+def isStrSpace(ch: str | None) -> bool:
+ """Check if character is a whitespace."""
+ return ch in ("\t", " ")
+
+
+MD_WHITESPACE = {
+ 0x09, # \t
+ 0x0A, # \n
+ 0x0B, # \v
+ 0x0C, # \f
+ 0x0D, # \r
+ 0x20, # space
+ 0xA0,
+ 0x1680,
+ 0x202F,
+ 0x205F,
+ 0x3000,
+}
+
+
+def isWhiteSpace(code: int) -> bool:
+ r"""Zs (unicode class) || [\t\f\v\r\n]"""
+ if code >= 0x2000 and code <= 0x200A:
+ return True
+ return code in MD_WHITESPACE
+
+
+# //////////////////////////////////////////////////////////////////////////////
+
+
+def isPunctChar(ch: str) -> bool:
+ """Check if character is a punctuation character."""
+ return unicodedata.category(ch).startswith(("P", "S"))
+
+
+MD_ASCII_PUNCT = {
+ 0x21, # /* ! */
+ 0x22, # /* " */
+ 0x23, # /* # */
+ 0x24, # /* $ */
+ 0x25, # /* % */
+ 0x26, # /* & */
+ 0x27, # /* ' */
+ 0x28, # /* ( */
+ 0x29, # /* ) */
+ 0x2A, # /* * */
+ 0x2B, # /* + */
+ 0x2C, # /* , */
+ 0x2D, # /* - */
+ 0x2E, # /* . */
+ 0x2F, # /* / */
+ 0x3A, # /* : */
+ 0x3B, # /* ; */
+ 0x3C, # /* < */
+ 0x3D, # /* = */
+ 0x3E, # /* > */
+ 0x3F, # /* ? */
+ 0x40, # /* @ */
+ 0x5B, # /* [ */
+ 0x5C, # /* \ */
+ 0x5D, # /* ] */
+ 0x5E, # /* ^ */
+ 0x5F, # /* _ */
+ 0x60, # /* ` */
+ 0x7B, # /* { */
+ 0x7C, # /* | */
+ 0x7D, # /* } */
+ 0x7E, # /* ~ */
+}
+
+
+def isMdAsciiPunct(ch: int) -> bool:
+ """Markdown ASCII punctuation characters.
+
+ ::
+
+ !, ", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~
+
+ See http://spec.commonmark.org/0.15/#ascii-punctuation-character
+
+ Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.
+
+ """
+ return ch in MD_ASCII_PUNCT
+
+
+def normalizeReference(string: str) -> str:
+ """Helper to unify [reference labels]."""
+ # Trim and collapse whitespace
+ #
+ string = re.sub(r"\s+", " ", string.strip())
+
+ # In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug
+ # fixed in v12 (couldn't find any details).
+ #
+ # So treat this one as a special case
+ # (remove this when node v10 is no longer supported).
+ #
+ # if ('ẞ'.toLowerCase() === 'Ṿ') {
+ # str = str.replace(/ẞ/g, 'ß')
+ # }
+
+ # .toLowerCase().toUpperCase() should get rid of all differences
+ # between letter variants.
+ #
+ # Simple .toLowerCase() doesn't normalize 125 code points correctly,
+ # and .toUpperCase doesn't normalize 6 of them (list of exceptions:
+ # İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently
+ # uppercased versions).
+ #
+ # Here's an example showing how it happens. Lets take greek letter omega:
+ # uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ)
+ #
+ # Unicode entries:
+ # 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8
+ # 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398
+ # 03D1;GREEK THETA SYMBOL;Ll;0;L; 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398
+ # 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L; 0398;;;;N;;;;03B8
+ #
+ # Case-insensitive comparison should treat all of them as equivalent.
+ #
+ # But .toLowerCase() doesn't change Ï‘ (it's already lowercase),
+ # and .toUpperCase() doesn't change Ï´ (already uppercase).
+ #
+ # Applying first lower then upper case normalizes any character:
+ # '\u0398\u03f4\u03b8\u03d1'.toLowerCase().toUpperCase() === '\u0398\u0398\u0398\u0398'
+ #
+ # Note: this is equivalent to unicode case folding; unicode normalization
+ # is a different step that is not required here.
+ #
+ # Final result should be uppercased, because it's later stored in an object
+ # (this avoid a conflict with Object.prototype members,
+ # most notably, `__proto__`)
+ #
+ return string.lower().upper()
+
+
+LINK_OPEN_RE = re.compile(r"^\s]", flags=re.IGNORECASE)
+LINK_CLOSE_RE = re.compile(r"^", flags=re.IGNORECASE)
+
+
+def isLinkOpen(string: str) -> bool:
+ return bool(LINK_OPEN_RE.search(string))
+
+
+def isLinkClose(string: str) -> bool:
+ return bool(LINK_CLOSE_RE.search(string))
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..f4e2cd21b94b9ee9ecb0cac21da619233a5258b9
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__init__.py
@@ -0,0 +1,6 @@
+"""Functions for parsing Links"""
+
+__all__ = ("parseLinkDestination", "parseLinkLabel", "parseLinkTitle")
+from .parse_link_destination import parseLinkDestination
+from .parse_link_label import parseLinkLabel
+from .parse_link_title import parseLinkTitle
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9152b7b1330f09b8592354db3de0882a9aa7d483
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__pycache__/parse_link_destination.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__pycache__/parse_link_destination.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..963f9ad19d974a83f164cda049faf671a9c851d4
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__pycache__/parse_link_destination.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__pycache__/parse_link_label.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__pycache__/parse_link_label.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9511da86779154e469b66057375804f0205cbe66
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__pycache__/parse_link_label.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__pycache__/parse_link_title.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__pycache__/parse_link_title.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..bea9b62571b12fd8065bbe7e0bcbab10337d4d8d
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/__pycache__/parse_link_title.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/parse_link_destination.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/parse_link_destination.py
new file mode 100644
index 0000000000000000000000000000000000000000..c98323c056e0103a12849671fbbac58dc76de4b4
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/parse_link_destination.py
@@ -0,0 +1,83 @@
+"""
+Parse link destination
+"""
+
+from ..common.utils import charCodeAt, unescapeAll
+
+
+class _Result:
+ __slots__ = ("ok", "pos", "str")
+
+ def __init__(self) -> None:
+ self.ok = False
+ self.pos = 0
+ self.str = ""
+
+
+def parseLinkDestination(string: str, pos: int, maximum: int) -> _Result:
+ start = pos
+ result = _Result()
+
+ if charCodeAt(string, pos) == 0x3C: # /* < */
+ pos += 1
+ while pos < maximum:
+ code = charCodeAt(string, pos)
+ if code == 0x0A: # /* \n */)
+ return result
+ if code == 0x3C: # / * < * /
+ return result
+ if code == 0x3E: # /* > */) {
+ result.pos = pos + 1
+ result.str = unescapeAll(string[start + 1 : pos])
+ result.ok = True
+ return result
+
+ if code == 0x5C and pos + 1 < maximum: # \
+ pos += 2
+ continue
+
+ pos += 1
+
+ # no closing '>'
+ return result
+
+ # this should be ... } else { ... branch
+
+ level = 0
+ while pos < maximum:
+ code = charCodeAt(string, pos)
+
+ if code is None or code == 0x20:
+ break
+
+ # ascii control characters
+ if code < 0x20 or code == 0x7F:
+ break
+
+ if code == 0x5C and pos + 1 < maximum:
+ if charCodeAt(string, pos + 1) == 0x20:
+ break
+ pos += 2
+ continue
+
+ if code == 0x28: # /* ( */)
+ level += 1
+ if level > 32:
+ return result
+
+ if code == 0x29: # /* ) */)
+ if level == 0:
+ break
+ level -= 1
+
+ pos += 1
+
+ if start == pos:
+ return result
+ if level != 0:
+ return result
+
+ result.str = unescapeAll(string[start:pos])
+ result.pos = pos
+ result.ok = True
+ return result
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/parse_link_label.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/parse_link_label.py
new file mode 100644
index 0000000000000000000000000000000000000000..c80da5a7ec54521281dac45b66977404f5384491
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/parse_link_label.py
@@ -0,0 +1,44 @@
+"""
+Parse link label
+
+this function assumes that first character ("[") already matches
+returns the end of the label
+
+"""
+
+from markdown_it.rules_inline import StateInline
+
+
+def parseLinkLabel(state: StateInline, start: int, disableNested: bool = False) -> int:
+ labelEnd = -1
+ oldPos = state.pos
+ found = False
+
+ state.pos = start + 1
+ level = 1
+
+ while state.pos < state.posMax:
+ marker = state.src[state.pos]
+ if marker == "]":
+ level -= 1
+ if level == 0:
+ found = True
+ break
+
+ prevPos = state.pos
+ state.md.inline.skipToken(state)
+ if marker == "[":
+ if prevPos == state.pos - 1:
+ # increase level if we find text `[`,
+ # which is not a part of any token
+ level += 1
+ elif disableNested:
+ state.pos = oldPos
+ return -1
+ if found:
+ labelEnd = state.pos
+
+ # restore old state
+ state.pos = oldPos
+
+ return labelEnd
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/parse_link_title.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/parse_link_title.py
new file mode 100644
index 0000000000000000000000000000000000000000..a38ff0d98ac7feaba80fd67f3c8f0d0454dde47f
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/helpers/parse_link_title.py
@@ -0,0 +1,75 @@
+"""Parse link title"""
+
+from ..common.utils import charCodeAt, unescapeAll
+
+
+class _State:
+ __slots__ = ("can_continue", "marker", "ok", "pos", "str")
+
+ def __init__(self) -> None:
+ self.ok = False
+ """if `true`, this is a valid link title"""
+ self.can_continue = False
+ """if `true`, this link can be continued on the next line"""
+ self.pos = 0
+ """if `ok`, it's the position of the first character after the closing marker"""
+ self.str = ""
+ """if `ok`, it's the unescaped title"""
+ self.marker = 0
+ """expected closing marker character code"""
+
+ def __str__(self) -> str:
+ return self.str
+
+
+def parseLinkTitle(
+ string: str, start: int, maximum: int, prev_state: _State | None = None
+) -> _State:
+ """Parse link title within `str` in [start, max] range,
+ or continue previous parsing if `prev_state` is defined (equal to result of last execution).
+ """
+ pos = start
+ state = _State()
+
+ if prev_state is not None:
+ # this is a continuation of a previous parseLinkTitle call on the next line,
+ # used in reference links only
+ state.str = prev_state.str
+ state.marker = prev_state.marker
+ else:
+ if pos >= maximum:
+ return state
+
+ marker = charCodeAt(string, pos)
+
+ # /* " */ /* ' */ /* ( */
+ if marker != 0x22 and marker != 0x27 and marker != 0x28:
+ return state
+
+ start += 1
+ pos += 1
+
+ # if opening marker is "(", switch it to closing marker ")"
+ if marker == 0x28:
+ marker = 0x29
+
+ state.marker = marker
+
+ while pos < maximum:
+ code = charCodeAt(string, pos)
+ if code == state.marker:
+ state.pos = pos + 1
+ state.str += unescapeAll(string[start:pos])
+ state.ok = True
+ return state
+ elif code == 0x28 and state.marker == 0x29: # /* ( */ /* ) */
+ return state
+ elif code == 0x5C and pos + 1 < maximum: # /* \ */
+ pos += 1
+
+ pos += 1
+
+ # no closing marker found, but this link title may continue on the next line (for references)
+ state.can_continue = True
+ state.str += unescapeAll(string[start:pos])
+ return state
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e21c7806930223fc6a2fda250f1c3e4065ef8c8f
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__init__.py
@@ -0,0 +1,28 @@
+__all__ = ("commonmark", "default", "gfm_like", "js_default", "zero")
+
+from ..utils import PresetType
+from . import commonmark, default, zero
+
+js_default = default
+
+
+class gfm_like: # noqa: N801
+ """GitHub Flavoured Markdown (GFM) like.
+
+ This adds the linkify, table and strikethrough components to CommmonMark.
+
+ Note, it lacks task-list items and raw HTML filtering,
+ to meet the the full GFM specification
+ (see https://github.github.com/gfm/#autolinks-extension-).
+ """
+
+ @staticmethod
+ def make() -> PresetType:
+ config = commonmark.make()
+ config["components"]["core"]["rules"].append("linkify")
+ config["components"]["block"]["rules"].append("table")
+ config["components"]["inline"]["rules"].extend(["strikethrough", "linkify"])
+ config["components"]["inline"]["rules2"].append("strikethrough")
+ config["options"]["linkify"] = True
+ config["options"]["html"] = True
+ return config
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e639533064ce560cc7ac152b816c8e25cef2274b
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__pycache__/commonmark.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__pycache__/commonmark.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cb85ed5808a845a4ba2fa8101d698b1b3ffad6e0
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__pycache__/commonmark.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__pycache__/default.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__pycache__/default.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e67fdfa68fdb7d83a0438fe63ea1d6c98ac65f9a
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__pycache__/default.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__pycache__/zero.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__pycache__/zero.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f035df99144db3589741f4b81c48f9b686e9d434
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/__pycache__/zero.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/commonmark.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/commonmark.py
new file mode 100644
index 0000000000000000000000000000000000000000..ed0de0fe4dfbad9e3ab82477433805ea0b6650c6
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/presets/commonmark.py
@@ -0,0 +1,75 @@
+"""Commonmark default options.
+
+This differs to presets.default,
+primarily in that it allows HTML and does not enable components:
+
+- block: table
+- inline: strikethrough
+"""
+
+from ..utils import PresetType
+
+
+def make() -> PresetType:
+ return {
+ "options": {
+ "maxNesting": 20, # Internal protection, recursion limit
+ "html": True, # Enable HTML tags in source,
+ # this is just a shorthand for .enable(["html_inline", "html_block"])
+ # used by the linkify rule:
+ "linkify": False, # autoconvert URL-like texts to links
+ # used by the replacements and smartquotes rules
+ # Enable some language-neutral replacements + quotes beautification
+ "typographer": False,
+ # used by the smartquotes rule:
+ # Double + single quotes replacement pairs, when typographer enabled,
+ # and smartquotes on. Could be either a String or an Array.
+ #
+ # For example, you can use '«»„“' for Russian, '„“‚‘' for German,
+ # and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
+ "quotes": "\u201c\u201d\u2018\u2019", # /* “�‘’ */
+ # Renderer specific; these options are used directly in the HTML renderer
+ "xhtmlOut": True, # Use '/' to close single tags (
)
+ "breaks": False, # Convert '\n' in paragraphs into
+ "langPrefix": "language-", # CSS language prefix for fenced blocks
+ # Highlighter function. Should return escaped HTML,
+ # or '' if the source string is not changed and should be escaped externally.
+ # If result starts with PresetType:
+ return {
+ "options": {
+ "maxNesting": 100, # Internal protection, recursion limit
+ "html": False, # Enable HTML tags in source
+ # this is just a shorthand for .disable(["html_inline", "html_block"])
+ # used by the linkify rule:
+ "linkify": False, # autoconvert URL-like texts to links
+ # used by the replacements and smartquotes rules:
+ # Enable some language-neutral replacements + quotes beautification
+ "typographer": False,
+ # used by the smartquotes rule:
+ # Double + single quotes replacement pairs, when typographer enabled,
+ # and smartquotes on. Could be either a String or an Array.
+ # For example, you can use '«»„“' for Russian, '„“‚‘' for German,
+ # and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
+ "quotes": "\u201c\u201d\u2018\u2019", # /* “�‘’ */
+ # Renderer specific; these options are used directly in the HTML renderer
+ "xhtmlOut": False, # Use '/' to close single tags (
)
+ "breaks": False, # Convert '\n' in paragraphs into
+ "langPrefix": "language-", # CSS language prefix for fenced blocks
+ # Highlighter function. Should return escaped HTML,
+ # or '' if the source string is not changed and should be escaped externally.
+ # If result starts with PresetType:
+ return {
+ "options": {
+ "maxNesting": 20, # Internal protection, recursion limit
+ "html": False, # Enable HTML tags in source
+ # this is just a shorthand for .disable(["html_inline", "html_block"])
+ # used by the linkify rule:
+ "linkify": False, # autoconvert URL-like texts to links
+ # used by the replacements and smartquotes rules:
+ # Enable some language-neutral replacements + quotes beautification
+ "typographer": False,
+ # used by the smartquotes rule:
+ # Double + single quotes replacement pairs, when typographer enabled,
+ # and smartquotes on. Could be either a String or an Array.
+ # For example, you can use '«»„“' for Russian, '„“‚‘' for German,
+ # and ['«\xA0', '\xA0»', '‹\xA0', '\xA0›'] for French (including nbsp).
+ "quotes": "\u201c\u201d\u2018\u2019", # /* “�‘’ */
+ # Renderer specific; these options are used directly in the HTML renderer
+ "xhtmlOut": False, # Use '/' to close single tags (
)
+ "breaks": False, # Convert '\n' in paragraphs into
+ "langPrefix": "language-", # CSS language prefix for fenced blocks
+ # Highlighter function. Should return escaped HTML,
+ # or '' if the source string is not changed and should be escaped externally.
+ # If result starts with bool:
+ LOGGER.debug(
+ "entering blockquote: %s, %s, %s, %s", state, startLine, endLine, silent
+ )
+
+ oldLineMax = state.lineMax
+ pos = state.bMarks[startLine] + state.tShift[startLine]
+ max = state.eMarks[startLine]
+
+ if state.is_code_block(startLine):
+ return False
+
+ # check the block quote marker
+ try:
+ if state.src[pos] != ">":
+ return False
+ except IndexError:
+ return False
+ pos += 1
+
+ # we know that it's going to be a valid blockquote,
+ # so no point trying to find the end of it in silent mode
+ if silent:
+ return True
+
+ # set offset past spaces and ">"
+ initial = offset = state.sCount[startLine] + 1
+
+ try:
+ second_char: str | None = state.src[pos]
+ except IndexError:
+ second_char = None
+
+ # skip one optional space after '>'
+ if second_char == " ":
+ # ' > test '
+ # ^ -- position start of line here:
+ pos += 1
+ initial += 1
+ offset += 1
+ adjustTab = False
+ spaceAfterMarker = True
+ elif second_char == "\t":
+ spaceAfterMarker = True
+
+ if (state.bsCount[startLine] + offset) % 4 == 3:
+ # ' >\t test '
+ # ^ -- position start of line here (tab has width==1)
+ pos += 1
+ initial += 1
+ offset += 1
+ adjustTab = False
+ else:
+ # ' >\t test '
+ # ^ -- position start of line here + shift bsCount slightly
+ # to make extra space appear
+ adjustTab = True
+
+ else:
+ spaceAfterMarker = False
+
+ oldBMarks = [state.bMarks[startLine]]
+ state.bMarks[startLine] = pos
+
+ while pos < max:
+ ch = state.src[pos]
+
+ if isStrSpace(ch):
+ if ch == "\t":
+ offset += (
+ 4
+ - (offset + state.bsCount[startLine] + (1 if adjustTab else 0)) % 4
+ )
+ else:
+ offset += 1
+
+ else:
+ break
+
+ pos += 1
+
+ oldBSCount = [state.bsCount[startLine]]
+ state.bsCount[startLine] = (
+ state.sCount[startLine] + 1 + (1 if spaceAfterMarker else 0)
+ )
+
+ lastLineEmpty = pos >= max
+
+ oldSCount = [state.sCount[startLine]]
+ state.sCount[startLine] = offset - initial
+
+ oldTShift = [state.tShift[startLine]]
+ state.tShift[startLine] = pos - state.bMarks[startLine]
+
+ terminatorRules = state.md.block.ruler.getRules("blockquote")
+
+ oldParentType = state.parentType
+ state.parentType = "blockquote"
+
+ # Search the end of the block
+ #
+ # Block ends with either:
+ # 1. an empty line outside:
+ # ```
+ # > test
+ #
+ # ```
+ # 2. an empty line inside:
+ # ```
+ # >
+ # test
+ # ```
+ # 3. another tag:
+ # ```
+ # > test
+ # - - -
+ # ```
+
+ # for (nextLine = startLine + 1; nextLine < endLine; nextLine++) {
+ nextLine = startLine + 1
+ while nextLine < endLine:
+ # check if it's outdented, i.e. it's inside list item and indented
+ # less than said list item:
+ #
+ # ```
+ # 1. anything
+ # > current blockquote
+ # 2. checking this line
+ # ```
+ isOutdented = state.sCount[nextLine] < state.blkIndent
+
+ pos = state.bMarks[nextLine] + state.tShift[nextLine]
+ max = state.eMarks[nextLine]
+
+ if pos >= max:
+ # Case 1: line is not inside the blockquote, and this line is empty.
+ break
+
+ evaluatesTrue = state.src[pos] == ">" and not isOutdented
+ pos += 1
+ if evaluatesTrue:
+ # This line is inside the blockquote.
+
+ # set offset past spaces and ">"
+ initial = offset = state.sCount[nextLine] + 1
+
+ try:
+ next_char: str | None = state.src[pos]
+ except IndexError:
+ next_char = None
+
+ # skip one optional space after '>'
+ if next_char == " ":
+ # ' > test '
+ # ^ -- position start of line here:
+ pos += 1
+ initial += 1
+ offset += 1
+ adjustTab = False
+ spaceAfterMarker = True
+ elif next_char == "\t":
+ spaceAfterMarker = True
+
+ if (state.bsCount[nextLine] + offset) % 4 == 3:
+ # ' >\t test '
+ # ^ -- position start of line here (tab has width==1)
+ pos += 1
+ initial += 1
+ offset += 1
+ adjustTab = False
+ else:
+ # ' >\t test '
+ # ^ -- position start of line here + shift bsCount slightly
+ # to make extra space appear
+ adjustTab = True
+
+ else:
+ spaceAfterMarker = False
+
+ oldBMarks.append(state.bMarks[nextLine])
+ state.bMarks[nextLine] = pos
+
+ while pos < max:
+ ch = state.src[pos]
+
+ if isStrSpace(ch):
+ if ch == "\t":
+ offset += (
+ 4
+ - (
+ offset
+ + state.bsCount[nextLine]
+ + (1 if adjustTab else 0)
+ )
+ % 4
+ )
+ else:
+ offset += 1
+ else:
+ break
+
+ pos += 1
+
+ lastLineEmpty = pos >= max
+
+ oldBSCount.append(state.bsCount[nextLine])
+ state.bsCount[nextLine] = (
+ state.sCount[nextLine] + 1 + (1 if spaceAfterMarker else 0)
+ )
+
+ oldSCount.append(state.sCount[nextLine])
+ state.sCount[nextLine] = offset - initial
+
+ oldTShift.append(state.tShift[nextLine])
+ state.tShift[nextLine] = pos - state.bMarks[nextLine]
+
+ nextLine += 1
+ continue
+
+ # Case 2: line is not inside the blockquote, and the last line was empty.
+ if lastLineEmpty:
+ break
+
+ # Case 3: another tag found.
+ terminate = False
+
+ for terminatorRule in terminatorRules:
+ if terminatorRule(state, nextLine, endLine, True):
+ terminate = True
+ break
+
+ if terminate:
+ # Quirk to enforce "hard termination mode" for paragraphs;
+ # normally if you call `tokenize(state, startLine, nextLine)`,
+ # paragraphs will look below nextLine for paragraph continuation,
+ # but if blockquote is terminated by another tag, they shouldn't
+ state.lineMax = nextLine
+
+ if state.blkIndent != 0:
+ # state.blkIndent was non-zero, we now set it to zero,
+ # so we need to re-calculate all offsets to appear as
+ # if indent wasn't changed
+ oldBMarks.append(state.bMarks[nextLine])
+ oldBSCount.append(state.bsCount[nextLine])
+ oldTShift.append(state.tShift[nextLine])
+ oldSCount.append(state.sCount[nextLine])
+ state.sCount[nextLine] -= state.blkIndent
+
+ break
+
+ oldBMarks.append(state.bMarks[nextLine])
+ oldBSCount.append(state.bsCount[nextLine])
+ oldTShift.append(state.tShift[nextLine])
+ oldSCount.append(state.sCount[nextLine])
+
+ # A negative indentation means that this is a paragraph continuation
+ #
+ state.sCount[nextLine] = -1
+
+ nextLine += 1
+
+ oldIndent = state.blkIndent
+ state.blkIndent = 0
+
+ token = state.push("blockquote_open", "blockquote", 1)
+ token.markup = ">"
+ token.map = lines = [startLine, 0]
+
+ state.md.block.tokenize(state, startLine, nextLine)
+
+ token = state.push("blockquote_close", "blockquote", -1)
+ token.markup = ">"
+
+ state.lineMax = oldLineMax
+ state.parentType = oldParentType
+ lines[1] = state.line
+
+ # Restore original tShift; this might not be necessary since the parser
+ # has already been here, but just to make sure we can do that.
+ for i, item in enumerate(oldTShift):
+ state.bMarks[i + startLine] = oldBMarks[i]
+ state.tShift[i + startLine] = item
+ state.sCount[i + startLine] = oldSCount[i]
+ state.bsCount[i + startLine] = oldBSCount[i]
+
+ state.blkIndent = oldIndent
+
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/code.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/code.py
new file mode 100644
index 0000000000000000000000000000000000000000..af8a41c8058b1a4887252469bdc6f20f085ad7d5
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/code.py
@@ -0,0 +1,36 @@
+"""Code block (4 spaces padded)."""
+
+import logging
+
+from .state_block import StateBlock
+
+LOGGER = logging.getLogger(__name__)
+
+
+def code(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool:
+ LOGGER.debug("entering code: %s, %s, %s, %s", state, startLine, endLine, silent)
+
+ if not state.is_code_block(startLine):
+ return False
+
+ last = nextLine = startLine + 1
+
+ while nextLine < endLine:
+ if state.isEmpty(nextLine):
+ nextLine += 1
+ continue
+
+ if state.is_code_block(nextLine):
+ nextLine += 1
+ last = nextLine
+ continue
+
+ break
+
+ state.line = last
+
+ token = state.push("code_block", "code", 0)
+ token.content = state.getLines(startLine, last, 4 + state.blkIndent, False) + "\n"
+ token.map = [startLine, state.line]
+
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/fence.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/fence.py
new file mode 100644
index 0000000000000000000000000000000000000000..263f1b8de8dcdd0dd736eeafab2d9da34ec2c205
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/fence.py
@@ -0,0 +1,101 @@
+# fences (``` lang, ~~~ lang)
+import logging
+
+from .state_block import StateBlock
+
+LOGGER = logging.getLogger(__name__)
+
+
+def fence(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool:
+ LOGGER.debug("entering fence: %s, %s, %s, %s", state, startLine, endLine, silent)
+
+ haveEndMarker = False
+ pos = state.bMarks[startLine] + state.tShift[startLine]
+ maximum = state.eMarks[startLine]
+
+ if state.is_code_block(startLine):
+ return False
+
+ if pos + 3 > maximum:
+ return False
+
+ marker = state.src[pos]
+
+ if marker not in ("~", "`"):
+ return False
+
+ # scan marker length
+ mem = pos
+ pos = state.skipCharsStr(pos, marker)
+
+ length = pos - mem
+
+ if length < 3:
+ return False
+
+ markup = state.src[mem:pos]
+ params = state.src[pos:maximum]
+
+ if marker == "`" and marker in params:
+ return False
+
+ # Since start is found, we can report success here in validation mode
+ if silent:
+ return True
+
+ # search end of block
+ nextLine = startLine
+
+ while True:
+ nextLine += 1
+ if nextLine >= endLine:
+ # unclosed block should be autoclosed by end of document.
+ # also block seems to be autoclosed by end of parent
+ break
+
+ pos = mem = state.bMarks[nextLine] + state.tShift[nextLine]
+ maximum = state.eMarks[nextLine]
+
+ if pos < maximum and state.sCount[nextLine] < state.blkIndent:
+ # non-empty line with negative indent should stop the list:
+ # - ```
+ # test
+ break
+
+ try:
+ if state.src[pos] != marker:
+ continue
+ except IndexError:
+ break
+
+ if state.is_code_block(nextLine):
+ continue
+
+ pos = state.skipCharsStr(pos, marker)
+
+ # closing code fence must be at least as long as the opening one
+ if pos - mem < length:
+ continue
+
+ # make sure tail has spaces only
+ pos = state.skipSpaces(pos)
+
+ if pos < maximum:
+ continue
+
+ haveEndMarker = True
+ # found!
+ break
+
+ # If a fence has heading spaces, they should be removed from its inner block
+ length = state.sCount[startLine]
+
+ state.line = nextLine + (1 if haveEndMarker else 0)
+
+ token = state.push("fence", "code", 0)
+ token.info = params
+ token.content = state.getLines(startLine + 1, nextLine, length, True)
+ token.markup = markup
+ token.map = [startLine, state.line]
+
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/heading.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/heading.py
new file mode 100644
index 0000000000000000000000000000000000000000..afcf9ed458124e52b9b365a6c17440872ffa0975
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/heading.py
@@ -0,0 +1,69 @@
+"""Atex heading (#, ##, ...)"""
+
+from __future__ import annotations
+
+import logging
+
+from ..common.utils import isStrSpace
+from .state_block import StateBlock
+
+LOGGER = logging.getLogger(__name__)
+
+
+def heading(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool:
+ LOGGER.debug("entering heading: %s, %s, %s, %s", state, startLine, endLine, silent)
+
+ pos = state.bMarks[startLine] + state.tShift[startLine]
+ maximum = state.eMarks[startLine]
+
+ if state.is_code_block(startLine):
+ return False
+
+ ch: str | None = state.src[pos]
+
+ if ch != "#" or pos >= maximum:
+ return False
+
+ # count heading level
+ level = 1
+ pos += 1
+ try:
+ ch = state.src[pos]
+ except IndexError:
+ ch = None
+ while ch == "#" and pos < maximum and level <= 6:
+ level += 1
+ pos += 1
+ try:
+ ch = state.src[pos]
+ except IndexError:
+ ch = None
+
+ if level > 6 or (pos < maximum and not isStrSpace(ch)):
+ return False
+
+ if silent:
+ return True
+
+ # Let's cut tails like ' ### ' from the end of string
+
+ maximum = state.skipSpacesBack(maximum, pos)
+ tmp = state.skipCharsStrBack(maximum, "#", pos)
+ if tmp > pos and isStrSpace(state.src[tmp - 1]):
+ maximum = tmp
+
+ state.line = startLine + 1
+
+ token = state.push("heading_open", "h" + str(level), 1)
+ token.markup = "########"[:level]
+ token.map = [startLine, state.line]
+
+ token = state.push("inline", "", 0)
+ token.content = state.src[pos:maximum].strip()
+ token.map = [startLine, state.line]
+ token.children = []
+
+ token = state.push("heading_close", "h" + str(level), -1)
+ token.markup = "########"[:level]
+
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/hr.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/hr.py
new file mode 100644
index 0000000000000000000000000000000000000000..fca7d79d2780a5e656e689ac4843b8464b4ab5bd
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/hr.py
@@ -0,0 +1,56 @@
+"""Horizontal rule
+
+At least 3 of these characters on a line * - _
+"""
+
+import logging
+
+from ..common.utils import isStrSpace
+from .state_block import StateBlock
+
+LOGGER = logging.getLogger(__name__)
+
+
+def hr(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool:
+ LOGGER.debug("entering hr: %s, %s, %s, %s", state, startLine, endLine, silent)
+
+ pos = state.bMarks[startLine] + state.tShift[startLine]
+ maximum = state.eMarks[startLine]
+
+ if state.is_code_block(startLine):
+ return False
+
+ try:
+ marker = state.src[pos]
+ except IndexError:
+ return False
+ pos += 1
+
+ # Check hr marker
+ if marker not in ("*", "-", "_"):
+ return False
+
+ # markers can be mixed with spaces, but there should be at least 3 of them
+
+ cnt = 1
+ while pos < maximum:
+ ch = state.src[pos]
+ pos += 1
+ if ch != marker and not isStrSpace(ch):
+ return False
+ if ch == marker:
+ cnt += 1
+
+ if cnt < 3:
+ return False
+
+ if silent:
+ return True
+
+ state.line = startLine + 1
+
+ token = state.push("hr", "hr", 0)
+ token.map = [startLine, state.line]
+ token.markup = marker * (cnt + 1)
+
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/html_block.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/html_block.py
new file mode 100644
index 0000000000000000000000000000000000000000..3d43f6ee1deb527a42f4d99da40bd052d9b02886
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/html_block.py
@@ -0,0 +1,90 @@
+# HTML block
+from __future__ import annotations
+
+import logging
+import re
+
+from ..common.html_blocks import block_names
+from ..common.html_re import HTML_OPEN_CLOSE_TAG_STR
+from .state_block import StateBlock
+
+LOGGER = logging.getLogger(__name__)
+
+# An array of opening and corresponding closing sequences for html tags,
+# last argument defines whether it can terminate a paragraph or not
+HTML_SEQUENCES: list[tuple[re.Pattern[str], re.Pattern[str], bool]] = [
+ (
+ re.compile(r"^<(script|pre|style|textarea)(?=(\s|>|$))", re.IGNORECASE),
+ re.compile(r"<\/(script|pre|style|textarea)>", re.IGNORECASE),
+ True,
+ ),
+ (re.compile(r"^"), True),
+ (re.compile(r"^<\?"), re.compile(r"\?>"), True),
+ (re.compile(r"^"), True),
+ (re.compile(r"^"), True),
+ (
+ re.compile("^?(" + "|".join(block_names) + ")(?=(\\s|/?>|$))", re.IGNORECASE),
+ re.compile(r"^$"),
+ True,
+ ),
+ (re.compile(HTML_OPEN_CLOSE_TAG_STR + "\\s*$"), re.compile(r"^$"), False),
+]
+
+
+def html_block(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool:
+ LOGGER.debug(
+ "entering html_block: %s, %s, %s, %s", state, startLine, endLine, silent
+ )
+ pos = state.bMarks[startLine] + state.tShift[startLine]
+ maximum = state.eMarks[startLine]
+
+ if state.is_code_block(startLine):
+ return False
+
+ if not state.md.options.get("html", None):
+ return False
+
+ if state.src[pos] != "<":
+ return False
+
+ lineText = state.src[pos:maximum]
+
+ html_seq = None
+ for HTML_SEQUENCE in HTML_SEQUENCES:
+ if HTML_SEQUENCE[0].search(lineText):
+ html_seq = HTML_SEQUENCE
+ break
+
+ if not html_seq:
+ return False
+
+ if silent:
+ # true if this sequence can be a terminator, false otherwise
+ return html_seq[2]
+
+ nextLine = startLine + 1
+
+ # If we are here - we detected HTML block.
+ # Let's roll down till block end.
+ if not html_seq[1].search(lineText):
+ while nextLine < endLine:
+ if state.sCount[nextLine] < state.blkIndent:
+ break
+
+ pos = state.bMarks[nextLine] + state.tShift[nextLine]
+ maximum = state.eMarks[nextLine]
+ lineText = state.src[pos:maximum]
+
+ if html_seq[1].search(lineText):
+ if len(lineText) != 0:
+ nextLine += 1
+ break
+ nextLine += 1
+
+ state.line = nextLine
+
+ token = state.push("html_block", "", 0)
+ token.map = [startLine, nextLine]
+ token.content = state.getLines(startLine, nextLine, state.blkIndent, True)
+
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/lheading.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/lheading.py
new file mode 100644
index 0000000000000000000000000000000000000000..3522207abb680510decdd6c54d0be81401128ad7
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/lheading.py
@@ -0,0 +1,86 @@
+# lheading (---, ==)
+import logging
+
+from .state_block import StateBlock
+
+LOGGER = logging.getLogger(__name__)
+
+
+def lheading(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool:
+ LOGGER.debug("entering lheading: %s, %s, %s, %s", state, startLine, endLine, silent)
+
+ level = None
+ nextLine = startLine + 1
+ ruler = state.md.block.ruler
+ terminatorRules = ruler.getRules("paragraph")
+
+ if state.is_code_block(startLine):
+ return False
+
+ oldParentType = state.parentType
+ state.parentType = "paragraph" # use paragraph to match terminatorRules
+
+ # jump line-by-line until empty one or EOF
+ while nextLine < endLine and not state.isEmpty(nextLine):
+ # this would be a code block normally, but after paragraph
+ # it's considered a lazy continuation regardless of what's there
+ if state.sCount[nextLine] - state.blkIndent > 3:
+ nextLine += 1
+ continue
+
+ # Check for underline in setext header
+ if state.sCount[nextLine] >= state.blkIndent:
+ pos = state.bMarks[nextLine] + state.tShift[nextLine]
+ maximum = state.eMarks[nextLine]
+
+ if pos < maximum:
+ marker = state.src[pos]
+
+ if marker in ("-", "="):
+ pos = state.skipCharsStr(pos, marker)
+ pos = state.skipSpaces(pos)
+
+ # /* = */
+ if pos >= maximum:
+ level = 1 if marker == "=" else 2
+ break
+
+ # quirk for blockquotes, this line should already be checked by that rule
+ if state.sCount[nextLine] < 0:
+ nextLine += 1
+ continue
+
+ # Some tags can terminate paragraph without empty line.
+ terminate = False
+ for terminatorRule in terminatorRules:
+ if terminatorRule(state, nextLine, endLine, True):
+ terminate = True
+ break
+ if terminate:
+ break
+
+ nextLine += 1
+
+ if not level:
+ # Didn't find valid underline
+ return False
+
+ content = state.getLines(startLine, nextLine, state.blkIndent, False).strip()
+
+ state.line = nextLine + 1
+
+ token = state.push("heading_open", "h" + str(level), 1)
+ token.markup = marker
+ token.map = [startLine, state.line]
+
+ token = state.push("inline", "", 0)
+ token.content = content
+ token.map = [startLine, state.line - 1]
+ token.children = []
+
+ token = state.push("heading_close", "h" + str(level), -1)
+ token.markup = marker
+
+ state.parentType = oldParentType
+
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/list.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/list.py
new file mode 100644
index 0000000000000000000000000000000000000000..d8070d747035dd6b43f11c4bd88d05533b22bc5b
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/list.py
@@ -0,0 +1,345 @@
+# Lists
+import logging
+
+from ..common.utils import isStrSpace
+from .state_block import StateBlock
+
+LOGGER = logging.getLogger(__name__)
+
+
+# Search `[-+*][\n ]`, returns next pos after marker on success
+# or -1 on fail.
+def skipBulletListMarker(state: StateBlock, startLine: int) -> int:
+ pos = state.bMarks[startLine] + state.tShift[startLine]
+ maximum = state.eMarks[startLine]
+
+ try:
+ marker = state.src[pos]
+ except IndexError:
+ return -1
+ pos += 1
+
+ if marker not in ("*", "-", "+"):
+ return -1
+
+ if pos < maximum:
+ ch = state.src[pos]
+
+ if not isStrSpace(ch):
+ # " -test " - is not a list item
+ return -1
+
+ return pos
+
+
+# Search `\d+[.)][\n ]`, returns next pos after marker on success
+# or -1 on fail.
+def skipOrderedListMarker(state: StateBlock, startLine: int) -> int:
+ start = state.bMarks[startLine] + state.tShift[startLine]
+ pos = start
+ maximum = state.eMarks[startLine]
+
+ # List marker should have at least 2 chars (digit + dot)
+ if pos + 1 >= maximum:
+ return -1
+
+ ch = state.src[pos]
+ pos += 1
+
+ ch_ord = ord(ch)
+ # /* 0 */ /* 9 */
+ if ch_ord < 0x30 or ch_ord > 0x39:
+ return -1
+
+ while True:
+ # EOL -> fail
+ if pos >= maximum:
+ return -1
+
+ ch = state.src[pos]
+ pos += 1
+
+ # /* 0 */ /* 9 */
+ ch_ord = ord(ch)
+ if ch_ord >= 0x30 and ch_ord <= 0x39:
+ # List marker should have no more than 9 digits
+ # (prevents integer overflow in browsers)
+ if pos - start >= 10:
+ return -1
+
+ continue
+
+ # found valid marker
+ if ch in (")", "."):
+ break
+
+ return -1
+
+ if pos < maximum:
+ ch = state.src[pos]
+
+ if not isStrSpace(ch):
+ # " 1.test " - is not a list item
+ return -1
+
+ return pos
+
+
+def markTightParagraphs(state: StateBlock, idx: int) -> None:
+ level = state.level + 2
+
+ i = idx + 2
+ length = len(state.tokens) - 2
+ while i < length:
+ if state.tokens[i].level == level and state.tokens[i].type == "paragraph_open":
+ state.tokens[i + 2].hidden = True
+ state.tokens[i].hidden = True
+ i += 2
+ i += 1
+
+
+def list_block(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool:
+ LOGGER.debug("entering list: %s, %s, %s, %s", state, startLine, endLine, silent)
+
+ isTerminatingParagraph = False
+ tight = True
+
+ if state.is_code_block(startLine):
+ return False
+
+ # Special case:
+ # - item 1
+ # - item 2
+ # - item 3
+ # - item 4
+ # - this one is a paragraph continuation
+ if (
+ state.listIndent >= 0
+ and state.sCount[startLine] - state.listIndent >= 4
+ and state.sCount[startLine] < state.blkIndent
+ ):
+ return False
+
+ # limit conditions when list can interrupt
+ # a paragraph (validation mode only)
+ # Next list item should still terminate previous list item
+ #
+ # This code can fail if plugins use blkIndent as well as lists,
+ # but I hope the spec gets fixed long before that happens.
+ #
+ if (
+ silent
+ and state.parentType == "paragraph"
+ and state.sCount[startLine] >= state.blkIndent
+ ):
+ isTerminatingParagraph = True
+
+ # Detect list type and position after marker
+ posAfterMarker = skipOrderedListMarker(state, startLine)
+ if posAfterMarker >= 0:
+ isOrdered = True
+ start = state.bMarks[startLine] + state.tShift[startLine]
+ markerValue = int(state.src[start : posAfterMarker - 1])
+
+ # If we're starting a new ordered list right after
+ # a paragraph, it should start with 1.
+ if isTerminatingParagraph and markerValue != 1:
+ return False
+ else:
+ posAfterMarker = skipBulletListMarker(state, startLine)
+ if posAfterMarker >= 0:
+ isOrdered = False
+ else:
+ return False
+
+ # If we're starting a new unordered list right after
+ # a paragraph, first line should not be empty.
+ if (
+ isTerminatingParagraph
+ and state.skipSpaces(posAfterMarker) >= state.eMarks[startLine]
+ ):
+ return False
+
+ # We should terminate list on style change. Remember first one to compare.
+ markerChar = state.src[posAfterMarker - 1]
+
+ # For validation mode we can terminate immediately
+ if silent:
+ return True
+
+ # Start list
+ listTokIdx = len(state.tokens)
+
+ if isOrdered:
+ token = state.push("ordered_list_open", "ol", 1)
+ if markerValue != 1:
+ token.attrs = {"start": markerValue}
+
+ else:
+ token = state.push("bullet_list_open", "ul", 1)
+
+ token.map = listLines = [startLine, 0]
+ token.markup = markerChar
+
+ #
+ # Iterate list items
+ #
+
+ nextLine = startLine
+ prevEmptyEnd = False
+ terminatorRules = state.md.block.ruler.getRules("list")
+
+ oldParentType = state.parentType
+ state.parentType = "list"
+
+ while nextLine < endLine:
+ pos = posAfterMarker
+ maximum = state.eMarks[nextLine]
+
+ initial = offset = (
+ state.sCount[nextLine]
+ + posAfterMarker
+ - (state.bMarks[startLine] + state.tShift[startLine])
+ )
+
+ while pos < maximum:
+ ch = state.src[pos]
+
+ if ch == "\t":
+ offset += 4 - (offset + state.bsCount[nextLine]) % 4
+ elif ch == " ":
+ offset += 1
+ else:
+ break
+
+ pos += 1
+
+ contentStart = pos
+
+ # trimming space in "- \n 3" case, indent is 1 here
+ indentAfterMarker = 1 if contentStart >= maximum else offset - initial
+
+ # If we have more than 4 spaces, the indent is 1
+ # (the rest is just indented code block)
+ if indentAfterMarker > 4:
+ indentAfterMarker = 1
+
+ # " - test"
+ # ^^^^^ - calculating total length of this thing
+ indent = initial + indentAfterMarker
+
+ # Run subparser & write tokens
+ token = state.push("list_item_open", "li", 1)
+ token.markup = markerChar
+ token.map = itemLines = [startLine, 0]
+ if isOrdered:
+ token.info = state.src[start : posAfterMarker - 1]
+
+ # change current state, then restore it after parser subcall
+ oldTight = state.tight
+ oldTShift = state.tShift[startLine]
+ oldSCount = state.sCount[startLine]
+
+ # - example list
+ # ^ listIndent position will be here
+ # ^ blkIndent position will be here
+ #
+ oldListIndent = state.listIndent
+ state.listIndent = state.blkIndent
+ state.blkIndent = indent
+
+ state.tight = True
+ state.tShift[startLine] = contentStart - state.bMarks[startLine]
+ state.sCount[startLine] = offset
+
+ if contentStart >= maximum and state.isEmpty(startLine + 1):
+ # workaround for this case
+ # (list item is empty, list terminates before "foo"):
+ # ~~~~~~~~
+ # -
+ #
+ # foo
+ # ~~~~~~~~
+ state.line = min(state.line + 2, endLine)
+ else:
+ # NOTE in list.js this was:
+ # state.md.block.tokenize(state, startLine, endLine, True)
+ # but tokeniz does not take the final parameter
+ state.md.block.tokenize(state, startLine, endLine)
+
+ # If any of list item is tight, mark list as tight
+ if (not state.tight) or prevEmptyEnd:
+ tight = False
+
+ # Item become loose if finish with empty line,
+ # but we should filter last element, because it means list finish
+ prevEmptyEnd = (state.line - startLine) > 1 and state.isEmpty(state.line - 1)
+
+ state.blkIndent = state.listIndent
+ state.listIndent = oldListIndent
+ state.tShift[startLine] = oldTShift
+ state.sCount[startLine] = oldSCount
+ state.tight = oldTight
+
+ token = state.push("list_item_close", "li", -1)
+ token.markup = markerChar
+
+ nextLine = startLine = state.line
+ itemLines[1] = nextLine
+
+ if nextLine >= endLine:
+ break
+
+ contentStart = state.bMarks[startLine]
+
+ #
+ # Try to check if list is terminated or continued.
+ #
+ if state.sCount[nextLine] < state.blkIndent:
+ break
+
+ if state.is_code_block(startLine):
+ break
+
+ # fail if terminating block found
+ terminate = False
+ for terminatorRule in terminatorRules:
+ if terminatorRule(state, nextLine, endLine, True):
+ terminate = True
+ break
+
+ if terminate:
+ break
+
+ # fail if list has another type
+ if isOrdered:
+ posAfterMarker = skipOrderedListMarker(state, nextLine)
+ if posAfterMarker < 0:
+ break
+ start = state.bMarks[nextLine] + state.tShift[nextLine]
+ else:
+ posAfterMarker = skipBulletListMarker(state, nextLine)
+ if posAfterMarker < 0:
+ break
+
+ if markerChar != state.src[posAfterMarker - 1]:
+ break
+
+ # Finalize list
+ if isOrdered:
+ token = state.push("ordered_list_close", "ol", -1)
+ else:
+ token = state.push("bullet_list_close", "ul", -1)
+
+ token.markup = markerChar
+
+ listLines[1] = nextLine
+ state.line = nextLine
+
+ state.parentType = oldParentType
+
+ # mark paragraphs tight if needed
+ if tight:
+ markTightParagraphs(state, listTokIdx)
+
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/paragraph.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/paragraph.py
new file mode 100644
index 0000000000000000000000000000000000000000..30ba877799beb764dc0a603caa21fe6e6b641375
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/paragraph.py
@@ -0,0 +1,66 @@
+"""Paragraph."""
+
+import logging
+
+from .state_block import StateBlock
+
+LOGGER = logging.getLogger(__name__)
+
+
+def paragraph(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool:
+ LOGGER.debug(
+ "entering paragraph: %s, %s, %s, %s", state, startLine, endLine, silent
+ )
+
+ nextLine = startLine + 1
+ ruler = state.md.block.ruler
+ terminatorRules = ruler.getRules("paragraph")
+ endLine = state.lineMax
+
+ oldParentType = state.parentType
+ state.parentType = "paragraph"
+
+ # jump line-by-line until empty one or EOF
+ while nextLine < endLine:
+ if state.isEmpty(nextLine):
+ break
+ # this would be a code block normally, but after paragraph
+ # it's considered a lazy continuation regardless of what's there
+ if state.sCount[nextLine] - state.blkIndent > 3:
+ nextLine += 1
+ continue
+
+ # quirk for blockquotes, this line should already be checked by that rule
+ if state.sCount[nextLine] < 0:
+ nextLine += 1
+ continue
+
+ # Some tags can terminate paragraph without empty line.
+ terminate = False
+ for terminatorRule in terminatorRules:
+ if terminatorRule(state, nextLine, endLine, True):
+ terminate = True
+ break
+
+ if terminate:
+ break
+
+ nextLine += 1
+
+ content = state.getLines(startLine, nextLine, state.blkIndent, False).strip()
+
+ state.line = nextLine
+
+ token = state.push("paragraph_open", "p", 1)
+ token.map = [startLine, state.line]
+
+ token = state.push("inline", "", 0)
+ token.content = content
+ token.map = [startLine, state.line]
+ token.children = []
+
+ token = state.push("paragraph_close", "p", -1)
+
+ state.parentType = oldParentType
+
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/reference.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/reference.py
new file mode 100644
index 0000000000000000000000000000000000000000..ad94d40941ee7cd43c7d3873ac64276a47c15d8b
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/reference.py
@@ -0,0 +1,235 @@
+import logging
+
+from ..common.utils import charCodeAt, isSpace, normalizeReference
+from .state_block import StateBlock
+
+LOGGER = logging.getLogger(__name__)
+
+
+def reference(state: StateBlock, startLine: int, _endLine: int, silent: bool) -> bool:
+ LOGGER.debug(
+ "entering reference: %s, %s, %s, %s", state, startLine, _endLine, silent
+ )
+
+ pos = state.bMarks[startLine] + state.tShift[startLine]
+ maximum = state.eMarks[startLine]
+ nextLine = startLine + 1
+
+ if state.is_code_block(startLine):
+ return False
+
+ if state.src[pos] != "[":
+ return False
+
+ string = state.src[pos : maximum + 1]
+
+ # string = state.getLines(startLine, nextLine, state.blkIndent, False).strip()
+ maximum = len(string)
+
+ labelEnd = None
+ pos = 1
+ while pos < maximum:
+ ch = charCodeAt(string, pos)
+ if ch == 0x5B: # /* [ */
+ return False
+ elif ch == 0x5D: # /* ] */
+ labelEnd = pos
+ break
+ elif ch == 0x0A: # /* \n */
+ if (lineContent := getNextLine(state, nextLine)) is not None:
+ string += lineContent
+ maximum = len(string)
+ nextLine += 1
+ elif ch == 0x5C: # /* \ */
+ pos += 1
+ if (
+ pos < maximum
+ and charCodeAt(string, pos) == 0x0A
+ and (lineContent := getNextLine(state, nextLine)) is not None
+ ):
+ string += lineContent
+ maximum = len(string)
+ nextLine += 1
+ pos += 1
+
+ if (
+ labelEnd is None or labelEnd < 0 or charCodeAt(string, labelEnd + 1) != 0x3A
+ ): # /* : */
+ return False
+
+ # [label]: destination 'title'
+ # ^^^ skip optional whitespace here
+ pos = labelEnd + 2
+ while pos < maximum:
+ ch = charCodeAt(string, pos)
+ if ch == 0x0A:
+ if (lineContent := getNextLine(state, nextLine)) is not None:
+ string += lineContent
+ maximum = len(string)
+ nextLine += 1
+ elif isSpace(ch):
+ pass
+ else:
+ break
+ pos += 1
+
+ # [label]: destination 'title'
+ # ^^^^^^^^^^^ parse this
+ destRes = state.md.helpers.parseLinkDestination(string, pos, maximum)
+ if not destRes.ok:
+ return False
+
+ href = state.md.normalizeLink(destRes.str)
+ if not state.md.validateLink(href):
+ return False
+
+ pos = destRes.pos
+
+ # save cursor state, we could require to rollback later
+ destEndPos = pos
+ destEndLineNo = nextLine
+
+ # [label]: destination 'title'
+ # ^^^ skipping those spaces
+ start = pos
+ while pos < maximum:
+ ch = charCodeAt(string, pos)
+ if ch == 0x0A:
+ if (lineContent := getNextLine(state, nextLine)) is not None:
+ string += lineContent
+ maximum = len(string)
+ nextLine += 1
+ elif isSpace(ch):
+ pass
+ else:
+ break
+ pos += 1
+
+ # [label]: destination 'title'
+ # ^^^^^^^ parse this
+ titleRes = state.md.helpers.parseLinkTitle(string, pos, maximum, None)
+ while titleRes.can_continue:
+ if (lineContent := getNextLine(state, nextLine)) is None:
+ break
+ string += lineContent
+ pos = maximum
+ maximum = len(string)
+ nextLine += 1
+ titleRes = state.md.helpers.parseLinkTitle(string, pos, maximum, titleRes)
+
+ if pos < maximum and start != pos and titleRes.ok:
+ title = titleRes.str
+ pos = titleRes.pos
+ else:
+ title = ""
+ pos = destEndPos
+ nextLine = destEndLineNo
+
+ # skip trailing spaces until the rest of the line
+ while pos < maximum:
+ ch = charCodeAt(string, pos)
+ if not isSpace(ch):
+ break
+ pos += 1
+
+ if pos < maximum and charCodeAt(string, pos) != 0x0A and title:
+ # garbage at the end of the line after title,
+ # but it could still be a valid reference if we roll back
+ title = ""
+ pos = destEndPos
+ nextLine = destEndLineNo
+ while pos < maximum:
+ ch = charCodeAt(string, pos)
+ if not isSpace(ch):
+ break
+ pos += 1
+
+ if pos < maximum and charCodeAt(string, pos) != 0x0A:
+ # garbage at the end of the line
+ return False
+
+ label = normalizeReference(string[1:labelEnd])
+ if not label:
+ # CommonMark 0.20 disallows empty labels
+ return False
+
+ # Reference can not terminate anything. This check is for safety only.
+ if silent:
+ return True
+
+ if "references" not in state.env:
+ state.env["references"] = {}
+
+ state.line = nextLine
+
+ # note, this is not part of markdown-it JS, but is useful for renderers
+ if state.md.options.get("inline_definitions", False):
+ token = state.push("definition", "", 0)
+ token.meta = {
+ "id": label,
+ "title": title,
+ "url": href,
+ "label": string[1:labelEnd],
+ }
+ token.map = [startLine, state.line]
+
+ if label not in state.env["references"]:
+ state.env["references"][label] = {
+ "title": title,
+ "href": href,
+ "map": [startLine, state.line],
+ }
+ else:
+ state.env.setdefault("duplicate_refs", []).append(
+ {
+ "title": title,
+ "href": href,
+ "label": label,
+ "map": [startLine, state.line],
+ }
+ )
+
+ return True
+
+
+def getNextLine(state: StateBlock, nextLine: int) -> None | str:
+ endLine = state.lineMax
+
+ if nextLine >= endLine or state.isEmpty(nextLine):
+ # empty line or end of input
+ return None
+
+ isContinuation = False
+
+ # this would be a code block normally, but after paragraph
+ # it's considered a lazy continuation regardless of what's there
+ if state.is_code_block(nextLine):
+ isContinuation = True
+
+ # quirk for blockquotes, this line should already be checked by that rule
+ if state.sCount[nextLine] < 0:
+ isContinuation = True
+
+ if not isContinuation:
+ terminatorRules = state.md.block.ruler.getRules("reference")
+ oldParentType = state.parentType
+ state.parentType = "reference"
+
+ # Some tags can terminate paragraph without empty line.
+ terminate = False
+ for terminatorRule in terminatorRules:
+ if terminatorRule(state, nextLine, endLine, True):
+ terminate = True
+ break
+
+ state.parentType = oldParentType
+
+ if terminate:
+ # terminated by another block
+ return None
+
+ pos = state.bMarks[nextLine] + state.tShift[nextLine]
+ maximum = state.eMarks[nextLine]
+
+ # max + 1 explicitly includes the newline
+ return state.src[pos : maximum + 1]
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/state_block.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/state_block.py
new file mode 100644
index 0000000000000000000000000000000000000000..445ad265a01e3f1dededf9f72848686a2b5ee901
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/state_block.py
@@ -0,0 +1,261 @@
+from __future__ import annotations
+
+from typing import TYPE_CHECKING, Literal
+
+from ..common.utils import isStrSpace
+from ..ruler import StateBase
+from ..token import Token
+from ..utils import EnvType
+
+if TYPE_CHECKING:
+ from markdown_it.main import MarkdownIt
+
+
+class StateBlock(StateBase):
+ def __init__(
+ self, src: str, md: MarkdownIt, env: EnvType, tokens: list[Token]
+ ) -> None:
+ self.src = src
+
+ # link to parser instance
+ self.md = md
+
+ self.env = env
+
+ #
+ # Internal state variables
+ #
+
+ self.tokens = tokens
+
+ self.bMarks: list[int] = [] # line begin offsets for fast jumps
+ self.eMarks: list[int] = [] # line end offsets for fast jumps
+ # offsets of the first non-space characters (tabs not expanded)
+ self.tShift: list[int] = []
+ self.sCount: list[int] = [] # indents for each line (tabs expanded)
+
+ # An amount of virtual spaces (tabs expanded) between beginning
+ # of each line (bMarks) and real beginning of that line.
+ #
+ # It exists only as a hack because blockquotes override bMarks
+ # losing information in the process.
+ #
+ # It's used only when expanding tabs, you can think about it as
+ # an initial tab length, e.g. bsCount=21 applied to string `\t123`
+ # means first tab should be expanded to 4-21%4 === 3 spaces.
+ #
+ self.bsCount: list[int] = []
+
+ # block parser variables
+ self.blkIndent = 0 # required block content indent (for example, if we are
+ # inside a list, it would be positioned after list marker)
+ self.line = 0 # line index in src
+ self.lineMax = 0 # lines count
+ self.tight = False # loose/tight mode for lists
+ self.ddIndent = -1 # indent of the current dd block (-1 if there isn't any)
+ self.listIndent = -1 # indent of the current list block (-1 if there isn't any)
+
+ # can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'
+ # used in lists to determine if they interrupt a paragraph
+ self.parentType = "root"
+
+ self.level = 0
+
+ # renderer
+ self.result = ""
+
+ # Create caches
+ # Generate markers.
+ indent_found = False
+
+ start = pos = indent = offset = 0
+ length = len(self.src)
+
+ for pos, character in enumerate(self.src):
+ if not indent_found:
+ if isStrSpace(character):
+ indent += 1
+
+ if character == "\t":
+ offset += 4 - offset % 4
+ else:
+ offset += 1
+ continue
+ else:
+ indent_found = True
+
+ if character == "\n" or pos == length - 1:
+ if character != "\n":
+ pos += 1
+ self.bMarks.append(start)
+ self.eMarks.append(pos)
+ self.tShift.append(indent)
+ self.sCount.append(offset)
+ self.bsCount.append(0)
+
+ indent_found = False
+ indent = 0
+ offset = 0
+ start = pos + 1
+
+ # Push fake entry to simplify cache bounds checks
+ self.bMarks.append(length)
+ self.eMarks.append(length)
+ self.tShift.append(0)
+ self.sCount.append(0)
+ self.bsCount.append(0)
+
+ self.lineMax = len(self.bMarks) - 1 # don't count last fake line
+
+ # pre-check if code blocks are enabled, to speed up is_code_block method
+ self._code_enabled = "code" in self.md["block"].ruler.get_active_rules()
+
+ def __repr__(self) -> str:
+ return (
+ f"{self.__class__.__name__}"
+ f"(line={self.line},level={self.level},tokens={len(self.tokens)})"
+ )
+
+ def push(self, ttype: str, tag: str, nesting: Literal[-1, 0, 1]) -> Token:
+ """Push new token to "stream"."""
+ token = Token(ttype, tag, nesting)
+ token.block = True
+ if nesting < 0:
+ self.level -= 1 # closing tag
+ token.level = self.level
+ if nesting > 0:
+ self.level += 1 # opening tag
+ self.tokens.append(token)
+ return token
+
+ def isEmpty(self, line: int) -> bool:
+ """."""
+ return (self.bMarks[line] + self.tShift[line]) >= self.eMarks[line]
+
+ def skipEmptyLines(self, from_pos: int) -> int:
+ """."""
+ while from_pos < self.lineMax:
+ try:
+ if (self.bMarks[from_pos] + self.tShift[from_pos]) < self.eMarks[
+ from_pos
+ ]:
+ break
+ except IndexError:
+ pass
+ from_pos += 1
+ return from_pos
+
+ def skipSpaces(self, pos: int) -> int:
+ """Skip spaces from given position."""
+ while True:
+ try:
+ current = self.src[pos]
+ except IndexError:
+ break
+ if not isStrSpace(current):
+ break
+ pos += 1
+ return pos
+
+ def skipSpacesBack(self, pos: int, minimum: int) -> int:
+ """Skip spaces from given position in reverse."""
+ if pos <= minimum:
+ return pos
+ while pos > minimum:
+ pos -= 1
+ if not isStrSpace(self.src[pos]):
+ return pos + 1
+ return pos
+
+ def skipChars(self, pos: int, code: int) -> int:
+ """Skip character code from given position."""
+ while True:
+ try:
+ current = self.srcCharCode[pos]
+ except IndexError:
+ break
+ if current != code:
+ break
+ pos += 1
+ return pos
+
+ def skipCharsStr(self, pos: int, ch: str) -> int:
+ """Skip character string from given position."""
+ while True:
+ try:
+ current = self.src[pos]
+ except IndexError:
+ break
+ if current != ch:
+ break
+ pos += 1
+ return pos
+
+ def skipCharsBack(self, pos: int, code: int, minimum: int) -> int:
+ """Skip character code reverse from given position - 1."""
+ if pos <= minimum:
+ return pos
+ while pos > minimum:
+ pos -= 1
+ if code != self.srcCharCode[pos]:
+ return pos + 1
+ return pos
+
+ def skipCharsStrBack(self, pos: int, ch: str, minimum: int) -> int:
+ """Skip character string reverse from given position - 1."""
+ if pos <= minimum:
+ return pos
+ while pos > minimum:
+ pos -= 1
+ if ch != self.src[pos]:
+ return pos + 1
+ return pos
+
+ def getLines(self, begin: int, end: int, indent: int, keepLastLF: bool) -> str:
+ """Cut lines range from source."""
+ line = begin
+ if begin >= end:
+ return ""
+
+ queue = [""] * (end - begin)
+
+ i = 1
+ while line < end:
+ lineIndent = 0
+ lineStart = first = self.bMarks[line]
+ last = (
+ self.eMarks[line] + 1
+ if line + 1 < end or keepLastLF
+ else self.eMarks[line]
+ )
+
+ while (first < last) and (lineIndent < indent):
+ ch = self.src[first]
+ if isStrSpace(ch):
+ if ch == "\t":
+ lineIndent += 4 - (lineIndent + self.bsCount[line]) % 4
+ else:
+ lineIndent += 1
+ elif first - lineStart < self.tShift[line]:
+ lineIndent += 1
+ else:
+ break
+ first += 1
+
+ if lineIndent > indent:
+ # partially expanding tabs in code blocks, e.g '\t\tfoobar'
+ # with indent=2 becomes ' \tfoobar'
+ queue[i - 1] = (" " * (lineIndent - indent)) + self.src[first:last]
+ else:
+ queue[i - 1] = self.src[first:last]
+
+ line += 1
+ i += 1
+
+ return "".join(queue)
+
+ def is_code_block(self, line: int) -> bool:
+ """Check if line is a code block,
+ i.e. the code block rule is enabled and text is indented by more than 3 spaces.
+ """
+ return self._code_enabled and (self.sCount[line] - self.blkIndent) >= 4
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/table.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/table.py
new file mode 100644
index 0000000000000000000000000000000000000000..c52553d8c21265df65e23be253686ef00b3297eb
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_block/table.py
@@ -0,0 +1,250 @@
+# GFM table, https://github.github.com/gfm/#tables-extension-
+from __future__ import annotations
+
+import re
+
+from ..common.utils import charStrAt, isStrSpace
+from .state_block import StateBlock
+
+headerLineRe = re.compile(r"^:?-+:?$")
+enclosingPipesRe = re.compile(r"^\||\|$")
+
+# Limit the amount of empty autocompleted cells in a table,
+# see https://github.com/markdown-it/markdown-it/issues/1000,
+# Both pulldown-cmark and commonmark-hs limit the number of cells this way to ~200k.
+# We set it to 65k, which can expand user input by a factor of x370
+# (256x256 square is 1.8kB expanded into 650kB).
+MAX_AUTOCOMPLETED_CELLS = 0x10000
+
+
+def getLine(state: StateBlock, line: int) -> str:
+ pos = state.bMarks[line] + state.tShift[line]
+ maximum = state.eMarks[line]
+
+ # return state.src.substr(pos, max - pos)
+ return state.src[pos:maximum]
+
+
+def escapedSplit(string: str) -> list[str]:
+ result: list[str] = []
+ pos = 0
+ max = len(string)
+ isEscaped = False
+ lastPos = 0
+ current = ""
+ ch = charStrAt(string, pos)
+
+ while pos < max:
+ if ch == "|":
+ if not isEscaped:
+ # pipe separating cells, '|'
+ result.append(current + string[lastPos:pos])
+ current = ""
+ lastPos = pos + 1
+ else:
+ # escaped pipe, '\|'
+ current += string[lastPos : pos - 1]
+ lastPos = pos
+
+ isEscaped = ch == "\\"
+ pos += 1
+
+ ch = charStrAt(string, pos)
+
+ result.append(current + string[lastPos:])
+
+ return result
+
+
+def table(state: StateBlock, startLine: int, endLine: int, silent: bool) -> bool:
+ tbodyLines = None
+
+ # should have at least two lines
+ if startLine + 2 > endLine:
+ return False
+
+ nextLine = startLine + 1
+
+ if state.sCount[nextLine] < state.blkIndent:
+ return False
+
+ if state.is_code_block(nextLine):
+ return False
+
+ # first character of the second line should be '|', '-', ':',
+ # and no other characters are allowed but spaces;
+ # basically, this is the equivalent of /^[-:|][-:|\s]*$/ regexp
+
+ pos = state.bMarks[nextLine] + state.tShift[nextLine]
+ if pos >= state.eMarks[nextLine]:
+ return False
+ first_ch = state.src[pos]
+ pos += 1
+ if first_ch not in ("|", "-", ":"):
+ return False
+
+ if pos >= state.eMarks[nextLine]:
+ return False
+ second_ch = state.src[pos]
+ pos += 1
+ if second_ch not in ("|", "-", ":") and not isStrSpace(second_ch):
+ return False
+
+ # if first character is '-', then second character must not be a space
+ # (due to parsing ambiguity with list)
+ if first_ch == "-" and isStrSpace(second_ch):
+ return False
+
+ while pos < state.eMarks[nextLine]:
+ ch = state.src[pos]
+
+ if ch not in ("|", "-", ":") and not isStrSpace(ch):
+ return False
+
+ pos += 1
+
+ lineText = getLine(state, startLine + 1)
+
+ columns = lineText.split("|")
+ aligns = []
+ for i in range(len(columns)):
+ t = columns[i].strip()
+ if not t:
+ # allow empty columns before and after table, but not in between columns;
+ # e.g. allow ` |---| `, disallow ` ---||--- `
+ if i == 0 or i == len(columns) - 1:
+ continue
+ else:
+ return False
+
+ if not headerLineRe.search(t):
+ return False
+ if charStrAt(t, len(t) - 1) == ":":
+ aligns.append("center" if charStrAt(t, 0) == ":" else "right")
+ elif charStrAt(t, 0) == ":":
+ aligns.append("left")
+ else:
+ aligns.append("")
+
+ lineText = getLine(state, startLine).strip()
+ if "|" not in lineText:
+ return False
+ if state.is_code_block(startLine):
+ return False
+ columns = escapedSplit(lineText)
+ if columns and columns[0] == "":
+ columns.pop(0)
+ if columns and columns[-1] == "":
+ columns.pop()
+
+ # header row will define an amount of columns in the entire table,
+ # and align row should be exactly the same (the rest of the rows can differ)
+ columnCount = len(columns)
+ if columnCount == 0 or columnCount != len(aligns):
+ return False
+
+ if silent:
+ return True
+
+ oldParentType = state.parentType
+ state.parentType = "table"
+
+ # use 'blockquote' lists for termination because it's
+ # the most similar to tables
+ terminatorRules = state.md.block.ruler.getRules("blockquote")
+
+ token = state.push("table_open", "table", 1)
+ token.map = tableLines = [startLine, 0]
+
+ token = state.push("thead_open", "thead", 1)
+ token.map = [startLine, startLine + 1]
+
+ token = state.push("tr_open", "tr", 1)
+ token.map = [startLine, startLine + 1]
+
+ for i in range(len(columns)):
+ token = state.push("th_open", "th", 1)
+ if aligns[i]:
+ token.attrs = {"style": "text-align:" + aligns[i]}
+
+ token = state.push("inline", "", 0)
+ # note in markdown-it this map was removed in v12.0.0 however, we keep it,
+ # since it is helpful to propagate to children tokens
+ token.map = [startLine, startLine + 1]
+ token.content = columns[i].strip()
+ token.children = []
+
+ token = state.push("th_close", "th", -1)
+
+ token = state.push("tr_close", "tr", -1)
+ token = state.push("thead_close", "thead", -1)
+
+ autocompleted_cells = 0
+ nextLine = startLine + 2
+ while nextLine < endLine:
+ if state.sCount[nextLine] < state.blkIndent:
+ break
+
+ terminate = False
+ for i in range(len(terminatorRules)):
+ if terminatorRules[i](state, nextLine, endLine, True):
+ terminate = True
+ break
+
+ if terminate:
+ break
+ lineText = getLine(state, nextLine).strip()
+ if not lineText:
+ break
+ if state.is_code_block(nextLine):
+ break
+ columns = escapedSplit(lineText)
+ if columns and columns[0] == "":
+ columns.pop(0)
+ if columns and columns[-1] == "":
+ columns.pop()
+
+ # note: autocomplete count can be negative if user specifies more columns than header,
+ # but that does not affect intended use (which is limiting expansion)
+ autocompleted_cells += columnCount - len(columns)
+ if autocompleted_cells > MAX_AUTOCOMPLETED_CELLS:
+ break
+
+ if nextLine == startLine + 2:
+ token = state.push("tbody_open", "tbody", 1)
+ token.map = tbodyLines = [startLine + 2, 0]
+
+ token = state.push("tr_open", "tr", 1)
+ token.map = [nextLine, nextLine + 1]
+
+ for i in range(columnCount):
+ token = state.push("td_open", "td", 1)
+ if aligns[i]:
+ token.attrs = {"style": "text-align:" + aligns[i]}
+
+ token = state.push("inline", "", 0)
+ # note in markdown-it this map was removed in v12.0.0 however, we keep it,
+ # since it is helpful to propagate to children tokens
+ token.map = [nextLine, nextLine + 1]
+ try:
+ token.content = columns[i].strip() if columns[i] else ""
+ except IndexError:
+ token.content = ""
+ token.children = []
+
+ token = state.push("td_close", "td", -1)
+
+ token = state.push("tr_close", "tr", -1)
+
+ nextLine += 1
+
+ if tbodyLines:
+ token = state.push("tbody_close", "tbody", -1)
+ tbodyLines[1] = nextLine
+
+ token = state.push("table_close", "table", -1)
+
+ tableLines[1] = nextLine
+ state.parentType = oldParentType
+ state.line = nextLine
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e7d775363c6e1d454e73a7e3fff9af3115be4339
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__init__.py
@@ -0,0 +1,19 @@
+__all__ = (
+ "StateCore",
+ "block",
+ "inline",
+ "linkify",
+ "normalize",
+ "replace",
+ "smartquotes",
+ "text_join",
+)
+
+from .block import block
+from .inline import inline
+from .linkify import linkify
+from .normalize import normalize
+from .replacements import replace
+from .smartquotes import smartquotes
+from .state_core import StateCore
+from .text_join import text_join
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f5a9cc6d51a961fd2545e501bf264522f1be71a0
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/block.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/block.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3160ef06824f1ba6f952bd54f0bd191ce2cc1d35
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/block.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/inline.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/inline.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..796fc608d694760922587bdc08c202e673f2386a
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/inline.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/linkify.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/linkify.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ce6a6fbe52532c7050e146eb8f9df0522af40d85
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/linkify.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/normalize.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/normalize.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f7f4d332fc08be514bad51c2954a088226480aca
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/normalize.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/replacements.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/replacements.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c41f255b73597bd28d754519d3d5b54c419a527b
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/replacements.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/smartquotes.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/smartquotes.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..621ad34eb35faacfaecc07234fbf7bd801f1e56b
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/smartquotes.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/state_core.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/state_core.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8f4bbd230b64b48358ac326ded848f45c982b2f3
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/state_core.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/text_join.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/text_join.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1426dd89c4f91d40b82a7084a3af73b3eaa13742
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/__pycache__/text_join.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/block.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/block.py
new file mode 100644
index 0000000000000000000000000000000000000000..a6c3bb8d7ae18880fd638690fb5b09beb78b103c
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/block.py
@@ -0,0 +1,13 @@
+from ..token import Token
+from .state_core import StateCore
+
+
+def block(state: StateCore) -> None:
+ if state.inlineMode:
+ token = Token("inline", "", 0)
+ token.content = state.src
+ token.map = [0, 1]
+ token.children = []
+ state.tokens.append(token)
+ else:
+ state.md.block.parse(state.src, state.md, state.env, state.tokens)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/inline.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/inline.py
new file mode 100644
index 0000000000000000000000000000000000000000..c3fd0b5e25dda5d8a5a644cc9e460d0f92ae2d1d
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/inline.py
@@ -0,0 +1,10 @@
+from .state_core import StateCore
+
+
+def inline(state: StateCore) -> None:
+ """Parse inlines"""
+ for token in state.tokens:
+ if token.type == "inline":
+ if token.children is None:
+ token.children = []
+ state.md.inline.parse(token.content, state.md, state.env, token.children)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/linkify.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/linkify.py
new file mode 100644
index 0000000000000000000000000000000000000000..efbc9d4c9b1cbada1c936401b3421d73fbff5b64
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/linkify.py
@@ -0,0 +1,149 @@
+from __future__ import annotations
+
+import re
+from typing import Protocol
+
+from ..common.utils import arrayReplaceAt, isLinkClose, isLinkOpen
+from ..token import Token
+from .state_core import StateCore
+
+HTTP_RE = re.compile(r"^http://")
+MAILTO_RE = re.compile(r"^mailto:")
+TEST_MAILTO_RE = re.compile(r"^mailto:", flags=re.IGNORECASE)
+
+
+def linkify(state: StateCore) -> None:
+ """Rule for identifying plain-text links."""
+ if not state.md.options.linkify:
+ return
+
+ if not state.md.linkify:
+ raise ModuleNotFoundError("Linkify enabled but not installed.")
+
+ for inline_token in state.tokens:
+ if inline_token.type != "inline" or not state.md.linkify.pretest(
+ inline_token.content
+ ):
+ continue
+
+ tokens = inline_token.children
+
+ htmlLinkLevel = 0
+
+ # We scan from the end, to keep position when new tags added.
+ # Use reversed logic in links start/end match
+ assert tokens is not None
+ i = len(tokens)
+ while i >= 1:
+ i -= 1
+ assert isinstance(tokens, list)
+ currentToken = tokens[i]
+
+ # Skip content of markdown links
+ if currentToken.type == "link_close":
+ i -= 1
+ while (
+ tokens[i].level != currentToken.level
+ and tokens[i].type != "link_open"
+ ):
+ i -= 1
+ continue
+
+ # Skip content of html tag links
+ if currentToken.type == "html_inline":
+ if isLinkOpen(currentToken.content) and htmlLinkLevel > 0:
+ htmlLinkLevel -= 1
+ if isLinkClose(currentToken.content):
+ htmlLinkLevel += 1
+ if htmlLinkLevel > 0:
+ continue
+
+ if currentToken.type == "text" and state.md.linkify.test(
+ currentToken.content
+ ):
+ text = currentToken.content
+ links: list[_LinkType] = state.md.linkify.match(text) or []
+
+ # Now split string to nodes
+ nodes = []
+ level = currentToken.level
+ lastPos = 0
+
+ # forbid escape sequence at the start of the string,
+ # this avoids http\://example.com/ from being linkified as
+ # http://example.com/
+ if (
+ links
+ and links[0].index == 0
+ and i > 0
+ and tokens[i - 1].type == "text_special"
+ ):
+ links = links[1:]
+
+ for link in links:
+ url = link.url
+ fullUrl = state.md.normalizeLink(url)
+ if not state.md.validateLink(fullUrl):
+ continue
+
+ urlText = link.text
+
+ # Linkifier might send raw hostnames like "example.com", where url
+ # starts with domain name. So we prepend http:// in those cases,
+ # and remove it afterwards.
+ if not link.schema:
+ urlText = HTTP_RE.sub(
+ "", state.md.normalizeLinkText("http://" + urlText)
+ )
+ elif link.schema == "mailto:" and TEST_MAILTO_RE.search(urlText):
+ urlText = MAILTO_RE.sub(
+ "", state.md.normalizeLinkText("mailto:" + urlText)
+ )
+ else:
+ urlText = state.md.normalizeLinkText(urlText)
+
+ pos = link.index
+
+ if pos > lastPos:
+ token = Token("text", "", 0)
+ token.content = text[lastPos:pos]
+ token.level = level
+ nodes.append(token)
+
+ token = Token("link_open", "a", 1)
+ token.attrs = {"href": fullUrl}
+ token.level = level
+ level += 1
+ token.markup = "linkify"
+ token.info = "auto"
+ nodes.append(token)
+
+ token = Token("text", "", 0)
+ token.content = urlText
+ token.level = level
+ nodes.append(token)
+
+ token = Token("link_close", "a", -1)
+ level -= 1
+ token.level = level
+ token.markup = "linkify"
+ token.info = "auto"
+ nodes.append(token)
+
+ lastPos = link.last_index
+
+ if lastPos < len(text):
+ token = Token("text", "", 0)
+ token.content = text[lastPos:]
+ token.level = level
+ nodes.append(token)
+
+ inline_token.children = tokens = arrayReplaceAt(tokens, i, nodes)
+
+
+class _LinkType(Protocol):
+ url: str
+ text: str
+ index: int
+ last_index: int
+ schema: str | None
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/normalize.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/normalize.py
new file mode 100644
index 0000000000000000000000000000000000000000..32439243ef6ebfa424d202ed63635983d4c9ea82
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/normalize.py
@@ -0,0 +1,19 @@
+"""Normalize input string."""
+
+import re
+
+from .state_core import StateCore
+
+# https://spec.commonmark.org/0.29/#line-ending
+NEWLINES_RE = re.compile(r"\r\n?|\n")
+NULL_RE = re.compile(r"\0")
+
+
+def normalize(state: StateCore) -> None:
+ # Normalize newlines
+ string = NEWLINES_RE.sub("\n", state.src)
+
+ # Replace NULL characters
+ string = NULL_RE.sub("\ufffd", string)
+
+ state.src = string
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/replacements.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/replacements.py
new file mode 100644
index 0000000000000000000000000000000000000000..bcc9980046bf76723245b1ca2543af132efe5541
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/replacements.py
@@ -0,0 +1,127 @@
+"""Simple typographic replacements
+
+* ``(c)``, ``(C)`` → ©
+* ``(tm)``, ``(TM)`` → ™
+* ``(r)``, ``(R)`` → ®
+* ``+-`` → ±
+* ``...`` → …
+* ``?....`` → ?..
+* ``!....`` → !..
+* ``????????`` → ???
+* ``!!!!!`` → !!!
+* ``,,,`` → ,
+* ``--`` → &ndash
+* ``---`` → &mdash
+"""
+
+from __future__ import annotations
+
+import logging
+import re
+
+from ..token import Token
+from .state_core import StateCore
+
+LOGGER = logging.getLogger(__name__)
+
+# TODO:
+# - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾
+# - multiplication 2 x 4 -> 2 × 4
+
+RARE_RE = re.compile(r"\+-|\.\.|\?\?\?\?|!!!!|,,|--")
+
+# Workaround for phantomjs - need regex without /g flag,
+# or root check will fail every second time
+# SCOPED_ABBR_TEST_RE = r"\((c|tm|r)\)"
+
+SCOPED_ABBR_RE = re.compile(r"\((c|tm|r)\)", flags=re.IGNORECASE)
+
+PLUS_MINUS_RE = re.compile(r"\+-")
+
+ELLIPSIS_RE = re.compile(r"\.{2,}")
+
+ELLIPSIS_QUESTION_EXCLAMATION_RE = re.compile(r"([?!])…")
+
+QUESTION_EXCLAMATION_RE = re.compile(r"([?!]){4,}")
+
+COMMA_RE = re.compile(r",{2,}")
+
+EM_DASH_RE = re.compile(r"(^|[^-])---(?=[^-]|$)", flags=re.MULTILINE)
+
+EN_DASH_RE = re.compile(r"(^|\s)--(?=\s|$)", flags=re.MULTILINE)
+
+EN_DASH_INDENT_RE = re.compile(r"(^|[^-\s])--(?=[^-\s]|$)", flags=re.MULTILINE)
+
+
+SCOPED_ABBR = {"c": "©", "r": "®", "tm": "™"}
+
+
+def replaceFn(match: re.Match[str]) -> str:
+ return SCOPED_ABBR[match.group(1).lower()]
+
+
+def replace_scoped(inlineTokens: list[Token]) -> None:
+ inside_autolink = 0
+
+ for token in inlineTokens:
+ if token.type == "text" and not inside_autolink:
+ token.content = SCOPED_ABBR_RE.sub(replaceFn, token.content)
+
+ if token.type == "link_open" and token.info == "auto":
+ inside_autolink -= 1
+
+ if token.type == "link_close" and token.info == "auto":
+ inside_autolink += 1
+
+
+def replace_rare(inlineTokens: list[Token]) -> None:
+ inside_autolink = 0
+
+ for token in inlineTokens:
+ if (
+ token.type == "text"
+ and (not inside_autolink)
+ and RARE_RE.search(token.content)
+ ):
+ # +- -> ±
+ token.content = PLUS_MINUS_RE.sub("±", token.content)
+
+ # .., ..., ....... -> …
+ token.content = ELLIPSIS_RE.sub("…", token.content)
+
+ # but ?..... & !..... -> ?.. & !..
+ token.content = ELLIPSIS_QUESTION_EXCLAMATION_RE.sub("\\1..", token.content)
+ token.content = QUESTION_EXCLAMATION_RE.sub("\\1\\1\\1", token.content)
+
+ # ,, ,,, ,,,, -> ,
+ token.content = COMMA_RE.sub(",", token.content)
+
+ # em-dash
+ token.content = EM_DASH_RE.sub("\\1\u2014", token.content)
+
+ # en-dash
+ token.content = EN_DASH_RE.sub("\\1\u2013", token.content)
+ token.content = EN_DASH_INDENT_RE.sub("\\1\u2013", token.content)
+
+ if token.type == "link_open" and token.info == "auto":
+ inside_autolink -= 1
+
+ if token.type == "link_close" and token.info == "auto":
+ inside_autolink += 1
+
+
+def replace(state: StateCore) -> None:
+ if not state.md.options.typographer:
+ return
+
+ for token in state.tokens:
+ if token.type != "inline":
+ continue
+ if token.children is None:
+ continue
+
+ if SCOPED_ABBR_RE.search(token.content):
+ replace_scoped(token.children)
+
+ if RARE_RE.search(token.content):
+ replace_rare(token.children)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/smartquotes.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/smartquotes.py
new file mode 100644
index 0000000000000000000000000000000000000000..f9b8b457b6c134f5736fabd3b14dc746e75ab86b
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/smartquotes.py
@@ -0,0 +1,202 @@
+"""Convert straight quotation marks to typographic ones"""
+
+from __future__ import annotations
+
+import re
+from typing import Any
+
+from ..common.utils import charCodeAt, isMdAsciiPunct, isPunctChar, isWhiteSpace
+from ..token import Token
+from .state_core import StateCore
+
+QUOTE_TEST_RE = re.compile(r"['\"]")
+QUOTE_RE = re.compile(r"['\"]")
+APOSTROPHE = "\u2019" # ’
+
+
+def replaceAt(string: str, index: int, ch: str) -> str:
+ # When the index is negative, the behavior is different from the js version.
+ # But basically, the index will not be negative.
+ assert index >= 0
+ return string[:index] + ch + string[index + 1 :]
+
+
+def process_inlines(tokens: list[Token], state: StateCore) -> None:
+ stack: list[dict[str, Any]] = []
+
+ for i, token in enumerate(tokens):
+ thisLevel = token.level
+
+ j = 0
+ for j in range(len(stack))[::-1]:
+ if stack[j]["level"] <= thisLevel:
+ break
+ else:
+ # When the loop is terminated without a "break".
+ # Subtract 1 to get the same index as the js version.
+ j -= 1
+
+ stack = stack[: j + 1]
+
+ if token.type != "text":
+ continue
+
+ text = token.content
+ pos = 0
+ maximum = len(text)
+
+ while pos < maximum:
+ goto_outer = False
+ lastIndex = pos
+ t = QUOTE_RE.search(text[lastIndex:])
+ if not t:
+ break
+
+ canOpen = canClose = True
+ pos = t.start(0) + lastIndex + 1
+ isSingle = t.group(0) == "'"
+
+ # Find previous character,
+ # default to space if it's the beginning of the line
+ lastChar: None | int = 0x20
+
+ if t.start(0) + lastIndex - 1 >= 0:
+ lastChar = charCodeAt(text, t.start(0) + lastIndex - 1)
+ else:
+ for j in range(i)[::-1]:
+ if tokens[j].type == "softbreak" or tokens[j].type == "hardbreak":
+ break
+ # should skip all tokens except 'text', 'html_inline' or 'code_inline'
+ if not tokens[j].content:
+ continue
+
+ lastChar = charCodeAt(tokens[j].content, len(tokens[j].content) - 1)
+ break
+
+ # Find next character,
+ # default to space if it's the end of the line
+ nextChar: None | int = 0x20
+
+ if pos < maximum:
+ nextChar = charCodeAt(text, pos)
+ else:
+ for j in range(i + 1, len(tokens)):
+ # nextChar defaults to 0x20
+ if tokens[j].type == "softbreak" or tokens[j].type == "hardbreak":
+ break
+ # should skip all tokens except 'text', 'html_inline' or 'code_inline'
+ if not tokens[j].content:
+ continue
+
+ nextChar = charCodeAt(tokens[j].content, 0)
+ break
+
+ isLastPunctChar = lastChar is not None and (
+ isMdAsciiPunct(lastChar) or isPunctChar(chr(lastChar))
+ )
+ isNextPunctChar = nextChar is not None and (
+ isMdAsciiPunct(nextChar) or isPunctChar(chr(nextChar))
+ )
+
+ isLastWhiteSpace = lastChar is not None and isWhiteSpace(lastChar)
+ isNextWhiteSpace = nextChar is not None and isWhiteSpace(nextChar)
+
+ if isNextWhiteSpace: # noqa: SIM114
+ canOpen = False
+ elif isNextPunctChar and not (isLastWhiteSpace or isLastPunctChar):
+ canOpen = False
+
+ if isLastWhiteSpace: # noqa: SIM114
+ canClose = False
+ elif isLastPunctChar and not (isNextWhiteSpace or isNextPunctChar):
+ canClose = False
+
+ if nextChar == 0x22 and t.group(0) == '"': # 0x22: " # noqa: SIM102
+ if (
+ lastChar is not None and lastChar >= 0x30 and lastChar <= 0x39
+ ): # 0x30: 0, 0x39: 9
+ # special case: 1"" - count first quote as an inch
+ canClose = canOpen = False
+
+ if canOpen and canClose:
+ # Replace quotes in the middle of punctuation sequence, but not
+ # in the middle of the words, i.e.:
+ #
+ # 1. foo " bar " baz - not replaced
+ # 2. foo-"-bar-"-baz - replaced
+ # 3. foo"bar"baz - not replaced
+ canOpen = isLastPunctChar
+ canClose = isNextPunctChar
+
+ if not canOpen and not canClose:
+ # middle of word
+ if isSingle:
+ token.content = replaceAt(
+ token.content, t.start(0) + lastIndex, APOSTROPHE
+ )
+ continue
+
+ if canClose:
+ # this could be a closing quote, rewind the stack to get a match
+ for j in range(len(stack))[::-1]:
+ item = stack[j]
+ if stack[j]["level"] < thisLevel:
+ break
+ if item["single"] == isSingle and stack[j]["level"] == thisLevel:
+ item = stack[j]
+
+ if isSingle:
+ openQuote = state.md.options.quotes[2]
+ closeQuote = state.md.options.quotes[3]
+ else:
+ openQuote = state.md.options.quotes[0]
+ closeQuote = state.md.options.quotes[1]
+
+ # replace token.content *before* tokens[item.token].content,
+ # because, if they are pointing at the same token, replaceAt
+ # could mess up indices when quote length != 1
+ token.content = replaceAt(
+ token.content, t.start(0) + lastIndex, closeQuote
+ )
+ tokens[item["token"]].content = replaceAt(
+ tokens[item["token"]].content, item["pos"], openQuote
+ )
+
+ pos += len(closeQuote) - 1
+ if item["token"] == i:
+ pos += len(openQuote) - 1
+
+ text = token.content
+ maximum = len(text)
+
+ stack = stack[:j]
+ goto_outer = True
+ break
+ if goto_outer:
+ goto_outer = False
+ continue
+
+ if canOpen:
+ stack.append(
+ {
+ "token": i,
+ "pos": t.start(0) + lastIndex,
+ "single": isSingle,
+ "level": thisLevel,
+ }
+ )
+ elif canClose and isSingle:
+ token.content = replaceAt(
+ token.content, t.start(0) + lastIndex, APOSTROPHE
+ )
+
+
+def smartquotes(state: StateCore) -> None:
+ if not state.md.options.typographer:
+ return
+
+ for token in state.tokens:
+ if token.type != "inline" or not QUOTE_RE.search(token.content):
+ continue
+ if token.children is not None:
+ process_inlines(token.children, state)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/state_core.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/state_core.py
new file mode 100644
index 0000000000000000000000000000000000000000..a938041d992fdf7ae3f2843a2e0f9ef298c45790
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/state_core.py
@@ -0,0 +1,25 @@
+from __future__ import annotations
+
+from typing import TYPE_CHECKING
+
+from ..ruler import StateBase
+from ..token import Token
+from ..utils import EnvType
+
+if TYPE_CHECKING:
+ from markdown_it import MarkdownIt
+
+
+class StateCore(StateBase):
+ def __init__(
+ self,
+ src: str,
+ md: MarkdownIt,
+ env: EnvType,
+ tokens: list[Token] | None = None,
+ ) -> None:
+ self.src = src
+ self.md = md # link to parser instance
+ self.env = env
+ self.tokens: list[Token] = tokens or []
+ self.inlineMode = False
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/text_join.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/text_join.py
new file mode 100644
index 0000000000000000000000000000000000000000..5379f6d7a8e9ea3ee27a6462a4108a26549ae520
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_core/text_join.py
@@ -0,0 +1,35 @@
+"""Join raw text tokens with the rest of the text
+
+This is set as a separate rule to provide an opportunity for plugins
+to run text replacements after text join, but before escape join.
+
+For example, `\\:)` shouldn't be replaced with an emoji.
+"""
+
+from __future__ import annotations
+
+from ..token import Token
+from .state_core import StateCore
+
+
+def text_join(state: StateCore) -> None:
+ """Join raw text for escape sequences (`text_special`) tokens with the rest of the text"""
+
+ for inline_token in state.tokens[:]:
+ if inline_token.type != "inline":
+ continue
+
+ # convert text_special to text and join all adjacent text nodes
+ new_tokens: list[Token] = []
+ for child_token in inline_token.children or []:
+ if child_token.type == "text_special":
+ child_token.type = "text"
+ if (
+ child_token.type == "text"
+ and new_tokens
+ and new_tokens[-1].type == "text"
+ ):
+ new_tokens[-1].content += child_token.content
+ else:
+ new_tokens.append(child_token)
+ inline_token.children = new_tokens
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..d82ef8fbcca54eab4bbb40e8410104eef7a27f57
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__init__.py
@@ -0,0 +1,31 @@
+__all__ = (
+ "StateInline",
+ "autolink",
+ "backtick",
+ "emphasis",
+ "entity",
+ "escape",
+ "fragments_join",
+ "html_inline",
+ "image",
+ "link",
+ "link_pairs",
+ "linkify",
+ "newline",
+ "strikethrough",
+ "text",
+)
+from . import emphasis, strikethrough
+from .autolink import autolink
+from .backticks import backtick
+from .balance_pairs import link_pairs
+from .entity import entity
+from .escape import escape
+from .fragments_join import fragments_join
+from .html_inline import html_inline
+from .image import image
+from .link import link
+from .linkify import linkify
+from .newline import newline
+from .state_inline import StateInline
+from .text import text
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..dd758b6fbd0b6fc333447cb57251a1f4c450502c
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/autolink.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/autolink.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..922918d4b78a45c144ccb0531249d3b79d270a01
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/autolink.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/backticks.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/backticks.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6c945bb0379a87c9115c6f4be583287ac35bd58c
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/backticks.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/balance_pairs.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/balance_pairs.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b2a7f90a5b0ec88d57e889cde07ea5eb9c158e85
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/balance_pairs.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/emphasis.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/emphasis.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f704e6b26ccc7620b4c131130281f54ae6060a1f
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/emphasis.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/entity.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/entity.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ad79ef97453f91328d2c525b7300f89b1243adf9
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/entity.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/escape.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/escape.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0098252a237c680366b898108c97c02573501969
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/escape.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/fragments_join.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/fragments_join.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..68c9af52259e39e1d2300c9a282dc59d5a507e15
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/fragments_join.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/html_inline.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/html_inline.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1a1b325f40441fd3fd484c14904312ea24dc30a7
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/html_inline.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/image.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/image.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c65e92af0fca8529c4c0e99d873cf271cf963d25
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/image.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/link.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/link.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c5d4950dc827725b7c2cad649b9ae3853c1f6854
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/link.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/linkify.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/linkify.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4e051f4fe46a5bb863320ad39f50216b17972235
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/linkify.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/newline.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/newline.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3fc762da4134e26432cf9acf0b20c60999bb8c2a
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/newline.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/state_inline.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/state_inline.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b940302a642923e390443ca12e230f1691baee32
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/state_inline.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/strikethrough.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/strikethrough.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c44ba4b180f79780a2fbbc5a657dc557ecbaadb0
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/strikethrough.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/text.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/text.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9f142223726caa1dbcb8282fa8536bd697ebe742
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/__pycache__/text.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/autolink.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/autolink.py
new file mode 100644
index 0000000000000000000000000000000000000000..6546e2502f93a1b38a49c3fd728963a156cf0243
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/autolink.py
@@ -0,0 +1,77 @@
+# Process autolinks ''
+import re
+
+from .state_inline import StateInline
+
+EMAIL_RE = re.compile(
+ r"^([a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$"
+)
+AUTOLINK_RE = re.compile(r"^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$")
+
+
+def autolink(state: StateInline, silent: bool) -> bool:
+ pos = state.pos
+
+ if state.src[pos] != "<":
+ return False
+
+ start = state.pos
+ maximum = state.posMax
+
+ while True:
+ pos += 1
+ if pos >= maximum:
+ return False
+
+ ch = state.src[pos]
+
+ if ch == "<":
+ return False
+ if ch == ">":
+ break
+
+ url = state.src[start + 1 : pos]
+
+ if AUTOLINK_RE.search(url) is not None:
+ fullUrl = state.md.normalizeLink(url)
+ if not state.md.validateLink(fullUrl):
+ return False
+
+ if not silent:
+ token = state.push("link_open", "a", 1)
+ token.attrs = {"href": fullUrl}
+ token.markup = "autolink"
+ token.info = "auto"
+
+ token = state.push("text", "", 0)
+ token.content = state.md.normalizeLinkText(url)
+
+ token = state.push("link_close", "a", -1)
+ token.markup = "autolink"
+ token.info = "auto"
+
+ state.pos += len(url) + 2
+ return True
+
+ if EMAIL_RE.search(url) is not None:
+ fullUrl = state.md.normalizeLink("mailto:" + url)
+ if not state.md.validateLink(fullUrl):
+ return False
+
+ if not silent:
+ token = state.push("link_open", "a", 1)
+ token.attrs = {"href": fullUrl}
+ token.markup = "autolink"
+ token.info = "auto"
+
+ token = state.push("text", "", 0)
+ token.content = state.md.normalizeLinkText(url)
+
+ token = state.push("link_close", "a", -1)
+ token.markup = "autolink"
+ token.info = "auto"
+
+ state.pos += len(url) + 2
+ return True
+
+ return False
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/backticks.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/backticks.py
new file mode 100644
index 0000000000000000000000000000000000000000..fc60d6b15cdfa7012a05bcf1ccbb06f44d870dfd
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/backticks.py
@@ -0,0 +1,72 @@
+# Parse backticks
+import re
+
+from .state_inline import StateInline
+
+regex = re.compile("^ (.+) $")
+
+
+def backtick(state: StateInline, silent: bool) -> bool:
+ pos = state.pos
+
+ if state.src[pos] != "`":
+ return False
+
+ start = pos
+ pos += 1
+ maximum = state.posMax
+
+ # scan marker length
+ while pos < maximum and (state.src[pos] == "`"):
+ pos += 1
+
+ marker = state.src[start:pos]
+ openerLength = len(marker)
+
+ if state.backticksScanned and state.backticks.get(openerLength, 0) <= start:
+ if not silent:
+ state.pending += marker
+ state.pos += openerLength
+ return True
+
+ matchStart = matchEnd = pos
+
+ # Nothing found in the cache, scan until the end of the line (or until marker is found)
+ while True:
+ try:
+ matchStart = state.src.index("`", matchEnd)
+ except ValueError:
+ break
+ matchEnd = matchStart + 1
+
+ # scan marker length
+ while matchEnd < maximum and (state.src[matchEnd] == "`"):
+ matchEnd += 1
+
+ closerLength = matchEnd - matchStart
+
+ if closerLength == openerLength:
+ # Found matching closer length.
+ if not silent:
+ token = state.push("code_inline", "code", 0)
+ token.markup = marker
+ token.content = state.src[pos:matchStart].replace("\n", " ")
+ if (
+ token.content.startswith(" ")
+ and token.content.endswith(" ")
+ and len(token.content.strip()) > 0
+ ):
+ token.content = token.content[1:-1]
+ state.pos = matchEnd
+ return True
+
+ # Some different length found, put it in cache as upper limit of where closer can be found
+ state.backticks[closerLength] = matchStart
+
+ # Scanned through the end, didn't find anything
+ state.backticksScanned = True
+
+ if not silent:
+ state.pending += marker
+ state.pos += openerLength
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/balance_pairs.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/balance_pairs.py
new file mode 100644
index 0000000000000000000000000000000000000000..9c63b27f7186eb99c61938d27309fda7e900b88d
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/balance_pairs.py
@@ -0,0 +1,138 @@
+"""Balance paired characters (*, _, etc) in inline tokens."""
+
+from __future__ import annotations
+
+from .state_inline import Delimiter, StateInline
+
+
+def processDelimiters(state: StateInline, delimiters: list[Delimiter]) -> None:
+ """For each opening emphasis-like marker find a matching closing one."""
+ if not delimiters:
+ return
+
+ openersBottom = {}
+ maximum = len(delimiters)
+
+ # headerIdx is the first delimiter of the current (where closer is) delimiter run
+ headerIdx = 0
+ lastTokenIdx = -2 # needs any value lower than -1
+ jumps: list[int] = []
+ closerIdx = 0
+ while closerIdx < maximum:
+ closer = delimiters[closerIdx]
+
+ jumps.append(0)
+
+ # markers belong to same delimiter run if:
+ # - they have adjacent tokens
+ # - AND markers are the same
+ #
+ if (
+ delimiters[headerIdx].marker != closer.marker
+ or lastTokenIdx != closer.token - 1
+ ):
+ headerIdx = closerIdx
+ lastTokenIdx = closer.token
+
+ # Length is only used for emphasis-specific "rule of 3",
+ # if it's not defined (in strikethrough or 3rd party plugins),
+ # we can default it to 0 to disable those checks.
+ #
+ closer.length = closer.length or 0
+
+ if not closer.close:
+ closerIdx += 1
+ continue
+
+ # Previously calculated lower bounds (previous fails)
+ # for each marker, each delimiter length modulo 3,
+ # and for whether this closer can be an opener;
+ # https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460
+ if closer.marker not in openersBottom:
+ openersBottom[closer.marker] = [-1, -1, -1, -1, -1, -1]
+
+ minOpenerIdx = openersBottom[closer.marker][
+ (3 if closer.open else 0) + (closer.length % 3)
+ ]
+
+ openerIdx = headerIdx - jumps[headerIdx] - 1
+
+ newMinOpenerIdx = openerIdx
+
+ while openerIdx > minOpenerIdx:
+ opener = delimiters[openerIdx]
+
+ if opener.marker != closer.marker:
+ openerIdx -= jumps[openerIdx] + 1
+ continue
+
+ if opener.open and opener.end < 0:
+ isOddMatch = False
+
+ # from spec:
+ #
+ # If one of the delimiters can both open and close emphasis, then the
+ # sum of the lengths of the delimiter runs containing the opening and
+ # closing delimiters must not be a multiple of 3 unless both lengths
+ # are multiples of 3.
+ #
+ if (
+ (opener.close or closer.open)
+ and ((opener.length + closer.length) % 3 == 0)
+ and (opener.length % 3 != 0 or closer.length % 3 != 0)
+ ):
+ isOddMatch = True
+
+ if not isOddMatch:
+ # If previous delimiter cannot be an opener, we can safely skip
+ # the entire sequence in future checks. This is required to make
+ # sure algorithm has linear complexity (see *_*_*_*_*_... case).
+ #
+ if openerIdx > 0 and not delimiters[openerIdx - 1].open:
+ lastJump = jumps[openerIdx - 1] + 1
+ else:
+ lastJump = 0
+
+ jumps[closerIdx] = closerIdx - openerIdx + lastJump
+ jumps[openerIdx] = lastJump
+
+ closer.open = False
+ opener.end = closerIdx
+ opener.close = False
+ newMinOpenerIdx = -1
+
+ # treat next token as start of run,
+ # it optimizes skips in **<...>**a**<...>** pathological case
+ lastTokenIdx = -2
+
+ break
+
+ openerIdx -= jumps[openerIdx] + 1
+
+ if newMinOpenerIdx != -1:
+ # If match for this delimiter run failed, we want to set lower bound for
+ # future lookups. This is required to make sure algorithm has linear
+ # complexity.
+ #
+ # See details here:
+ # https:#github.com/commonmark/cmark/issues/178#issuecomment-270417442
+ #
+ openersBottom[closer.marker][
+ (3 if closer.open else 0) + ((closer.length or 0) % 3)
+ ] = newMinOpenerIdx
+
+ closerIdx += 1
+
+
+def link_pairs(state: StateInline) -> None:
+ tokens_meta = state.tokens_meta
+ maximum = len(state.tokens_meta)
+
+ processDelimiters(state, state.delimiters)
+
+ curr = 0
+ while curr < maximum:
+ curr_meta = tokens_meta[curr]
+ if curr_meta and "delimiters" in curr_meta:
+ processDelimiters(state, curr_meta["delimiters"])
+ curr += 1
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/emphasis.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/emphasis.py
new file mode 100644
index 0000000000000000000000000000000000000000..9a98f9e216c94db0217e986270aaaa72fcc99f7f
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/emphasis.py
@@ -0,0 +1,102 @@
+# Process *this* and _that_
+#
+from __future__ import annotations
+
+from .state_inline import Delimiter, StateInline
+
+
+def tokenize(state: StateInline, silent: bool) -> bool:
+ """Insert each marker as a separate text token, and add it to delimiter list"""
+ start = state.pos
+ marker = state.src[start]
+
+ if silent:
+ return False
+
+ if marker not in ("_", "*"):
+ return False
+
+ scanned = state.scanDelims(state.pos, marker == "*")
+
+ for _ in range(scanned.length):
+ token = state.push("text", "", 0)
+ token.content = marker
+ state.delimiters.append(
+ Delimiter(
+ marker=ord(marker),
+ length=scanned.length,
+ token=len(state.tokens) - 1,
+ end=-1,
+ open=scanned.can_open,
+ close=scanned.can_close,
+ )
+ )
+
+ state.pos += scanned.length
+
+ return True
+
+
+def _postProcess(state: StateInline, delimiters: list[Delimiter]) -> None:
+ i = len(delimiters) - 1
+ while i >= 0:
+ startDelim = delimiters[i]
+
+ # /* _ */ /* * */
+ if startDelim.marker != 0x5F and startDelim.marker != 0x2A:
+ i -= 1
+ continue
+
+ # Process only opening markers
+ if startDelim.end == -1:
+ i -= 1
+ continue
+
+ endDelim = delimiters[startDelim.end]
+
+ # If the previous delimiter has the same marker and is adjacent to this one,
+ # merge those into one strong delimiter.
+ #
+ # `whatever` -> `whatever`
+ #
+ isStrong = (
+ i > 0
+ and delimiters[i - 1].end == startDelim.end + 1
+ # check that first two markers match and adjacent
+ and delimiters[i - 1].marker == startDelim.marker
+ and delimiters[i - 1].token == startDelim.token - 1
+ # check that last two markers are adjacent (we can safely assume they match)
+ and delimiters[startDelim.end + 1].token == endDelim.token + 1
+ )
+
+ ch = chr(startDelim.marker)
+
+ token = state.tokens[startDelim.token]
+ token.type = "strong_open" if isStrong else "em_open"
+ token.tag = "strong" if isStrong else "em"
+ token.nesting = 1
+ token.markup = ch + ch if isStrong else ch
+ token.content = ""
+
+ token = state.tokens[endDelim.token]
+ token.type = "strong_close" if isStrong else "em_close"
+ token.tag = "strong" if isStrong else "em"
+ token.nesting = -1
+ token.markup = ch + ch if isStrong else ch
+ token.content = ""
+
+ if isStrong:
+ state.tokens[delimiters[i - 1].token].content = ""
+ state.tokens[delimiters[startDelim.end + 1].token].content = ""
+ i -= 1
+
+ i -= 1
+
+
+def postProcess(state: StateInline) -> None:
+ """Walk through delimiter list and replace text tokens with tags."""
+ _postProcess(state, state.delimiters)
+
+ for token in state.tokens_meta:
+ if token and "delimiters" in token:
+ _postProcess(state, token["delimiters"])
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/entity.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/entity.py
new file mode 100644
index 0000000000000000000000000000000000000000..ec9d39650e5bc533e694d3d6699677068d22c69f
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/entity.py
@@ -0,0 +1,53 @@
+# Process html entity - {, ¯, ", ...
+import re
+
+from ..common.entities import entities
+from ..common.utils import fromCodePoint, isValidEntityCode
+from .state_inline import StateInline
+
+DIGITAL_RE = re.compile(r"^((?:x[a-f0-9]{1,6}|[0-9]{1,7}));", re.IGNORECASE)
+NAMED_RE = re.compile(r"^&([a-z][a-z0-9]{1,31});", re.IGNORECASE)
+
+
+def entity(state: StateInline, silent: bool) -> bool:
+ pos = state.pos
+ maximum = state.posMax
+
+ if state.src[pos] != "&":
+ return False
+
+ if pos + 1 >= maximum:
+ return False
+
+ if state.src[pos + 1] == "#":
+ if match := DIGITAL_RE.search(state.src[pos:]):
+ if not silent:
+ match1 = match.group(1)
+ code = (
+ int(match1[1:], 16) if match1[0].lower() == "x" else int(match1, 10)
+ )
+
+ token = state.push("text_special", "", 0)
+ token.content = (
+ fromCodePoint(code)
+ if isValidEntityCode(code)
+ else fromCodePoint(0xFFFD)
+ )
+ token.markup = match.group(0)
+ token.info = "entity"
+
+ state.pos += len(match.group(0))
+ return True
+
+ else:
+ if (match := NAMED_RE.search(state.src[pos:])) and match.group(1) in entities:
+ if not silent:
+ token = state.push("text_special", "", 0)
+ token.content = entities[match.group(1)]
+ token.markup = match.group(0)
+ token.info = "entity"
+
+ state.pos += len(match.group(0))
+ return True
+
+ return False
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/escape.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/escape.py
new file mode 100644
index 0000000000000000000000000000000000000000..0fca6c84e035b83b21d5224be92fd4973f25b80b
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/escape.py
@@ -0,0 +1,93 @@
+"""
+Process escaped chars and hardbreaks
+"""
+
+from ..common.utils import isStrSpace
+from .state_inline import StateInline
+
+
+def escape(state: StateInline, silent: bool) -> bool:
+ """Process escaped chars and hardbreaks."""
+ pos = state.pos
+ maximum = state.posMax
+
+ if state.src[pos] != "\\":
+ return False
+
+ pos += 1
+
+ # '\' at the end of the inline block
+ if pos >= maximum:
+ return False
+
+ ch1 = state.src[pos]
+ ch1_ord = ord(ch1)
+ if ch1 == "\n":
+ if not silent:
+ state.push("hardbreak", "br", 0)
+ pos += 1
+ # skip leading whitespaces from next line
+ while pos < maximum:
+ ch = state.src[pos]
+ if not isStrSpace(ch):
+ break
+ pos += 1
+
+ state.pos = pos
+ return True
+
+ escapedStr = state.src[pos]
+
+ if ch1_ord >= 0xD800 and ch1_ord <= 0xDBFF and pos + 1 < maximum:
+ ch2 = state.src[pos + 1]
+ ch2_ord = ord(ch2)
+ if ch2_ord >= 0xDC00 and ch2_ord <= 0xDFFF:
+ escapedStr += ch2
+ pos += 1
+
+ origStr = "\\" + escapedStr
+
+ if not silent:
+ token = state.push("text_special", "", 0)
+ token.content = escapedStr if ch1 in _ESCAPED else origStr
+ token.markup = origStr
+ token.info = "escape"
+
+ state.pos = pos + 1
+ return True
+
+
+_ESCAPED = {
+ "!",
+ '"',
+ "#",
+ "$",
+ "%",
+ "&",
+ "'",
+ "(",
+ ")",
+ "*",
+ "+",
+ ",",
+ "-",
+ ".",
+ "/",
+ ":",
+ ";",
+ "<",
+ "=",
+ ">",
+ "?",
+ "@",
+ "[",
+ "\\",
+ "]",
+ "^",
+ "_",
+ "`",
+ "{",
+ "|",
+ "}",
+ "~",
+}
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/fragments_join.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/fragments_join.py
new file mode 100644
index 0000000000000000000000000000000000000000..f795c1364b8ac098b7a17f34cd31d7070280cf36
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/fragments_join.py
@@ -0,0 +1,43 @@
+from .state_inline import StateInline
+
+
+def fragments_join(state: StateInline) -> None:
+ """
+ Clean up tokens after emphasis and strikethrough postprocessing:
+ merge adjacent text nodes into one and re-calculate all token levels
+
+ This is necessary because initially emphasis delimiter markers (``*, _, ~``)
+ are treated as their own separate text tokens. Then emphasis rule either
+ leaves them as text (needed to merge with adjacent text) or turns them
+ into opening/closing tags (which messes up levels inside).
+ """
+ level = 0
+ maximum = len(state.tokens)
+
+ curr = last = 0
+ while curr < maximum:
+ # re-calculate levels after emphasis/strikethrough turns some text nodes
+ # into opening/closing tags
+ if state.tokens[curr].nesting < 0:
+ level -= 1 # closing tag
+ state.tokens[curr].level = level
+ if state.tokens[curr].nesting > 0:
+ level += 1 # opening tag
+
+ if (
+ state.tokens[curr].type == "text"
+ and curr + 1 < maximum
+ and state.tokens[curr + 1].type == "text"
+ ):
+ # collapse two adjacent text nodes
+ state.tokens[curr + 1].content = (
+ state.tokens[curr].content + state.tokens[curr + 1].content
+ )
+ else:
+ if curr != last:
+ state.tokens[last] = state.tokens[curr]
+ last += 1
+ curr += 1
+
+ if curr != last:
+ del state.tokens[last:]
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/html_inline.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/html_inline.py
new file mode 100644
index 0000000000000000000000000000000000000000..9065e1d034da76270f7d3f1ba528132c8d57d341
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/html_inline.py
@@ -0,0 +1,43 @@
+# Process html tags
+from ..common.html_re import HTML_TAG_RE
+from ..common.utils import isLinkClose, isLinkOpen
+from .state_inline import StateInline
+
+
+def isLetter(ch: int) -> bool:
+ lc = ch | 0x20 # to lower case
+ # /* a */ and /* z */
+ return (lc >= 0x61) and (lc <= 0x7A)
+
+
+def html_inline(state: StateInline, silent: bool) -> bool:
+ pos = state.pos
+
+ if not state.md.options.get("html", None):
+ return False
+
+ # Check start
+ maximum = state.posMax
+ if state.src[pos] != "<" or pos + 2 >= maximum:
+ return False
+
+ # Quick fail on second char
+ ch = state.src[pos + 1]
+ if ch not in ("!", "?", "/") and not isLetter(ord(ch)): # /* / */
+ return False
+
+ match = HTML_TAG_RE.search(state.src[pos:])
+ if not match:
+ return False
+
+ if not silent:
+ token = state.push("html_inline", "", 0)
+ token.content = state.src[pos : pos + len(match.group(0))]
+
+ if isLinkOpen(token.content):
+ state.linkLevel += 1
+ if isLinkClose(token.content):
+ state.linkLevel -= 1
+
+ state.pos += len(match.group(0))
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/image.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/image.py
new file mode 100644
index 0000000000000000000000000000000000000000..005105b1c7ed1a93772c62af8bd5ef54d97dfebe
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/image.py
@@ -0,0 +1,148 @@
+# Process 
+from __future__ import annotations
+
+from ..common.utils import isStrSpace, normalizeReference
+from ..token import Token
+from .state_inline import StateInline
+
+
+def image(state: StateInline, silent: bool) -> bool:
+ label = None
+ href = ""
+ oldPos = state.pos
+ max = state.posMax
+
+ if state.src[state.pos] != "!":
+ return False
+
+ if state.pos + 1 < state.posMax and state.src[state.pos + 1] != "[":
+ return False
+
+ labelStart = state.pos + 2
+ labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, False)
+
+ # parser failed to find ']', so it's not a valid link
+ if labelEnd < 0:
+ return False
+
+ pos = labelEnd + 1
+
+ if pos < max and state.src[pos] == "(":
+ #
+ # Inline link
+ #
+
+ # [link]( "title" )
+ # ^^ skipping these spaces
+ pos += 1
+ while pos < max:
+ ch = state.src[pos]
+ if not isStrSpace(ch) and ch != "\n":
+ break
+ pos += 1
+
+ if pos >= max:
+ return False
+
+ # [link]( "title" )
+ # ^^^^^^ parsing link destination
+ start = pos
+ res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax)
+ if res.ok:
+ href = state.md.normalizeLink(res.str)
+ if state.md.validateLink(href):
+ pos = res.pos
+ else:
+ href = ""
+
+ # [link]( "title" )
+ # ^^ skipping these spaces
+ start = pos
+ while pos < max:
+ ch = state.src[pos]
+ if not isStrSpace(ch) and ch != "\n":
+ break
+ pos += 1
+
+ # [link]( "title" )
+ # ^^^^^^^ parsing link title
+ res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax, None)
+ if pos < max and start != pos and res.ok:
+ title = res.str
+ pos = res.pos
+
+ # [link]( "title" )
+ # ^^ skipping these spaces
+ while pos < max:
+ ch = state.src[pos]
+ if not isStrSpace(ch) and ch != "\n":
+ break
+ pos += 1
+ else:
+ title = ""
+
+ if pos >= max or state.src[pos] != ")":
+ state.pos = oldPos
+ return False
+
+ pos += 1
+
+ else:
+ #
+ # Link reference
+ #
+ if "references" not in state.env:
+ return False
+
+ # /* [ */
+ if pos < max and state.src[pos] == "[":
+ start = pos + 1
+ pos = state.md.helpers.parseLinkLabel(state, pos)
+ if pos >= 0:
+ label = state.src[start:pos]
+ pos += 1
+ else:
+ pos = labelEnd + 1
+ else:
+ pos = labelEnd + 1
+
+ # covers label == '' and label == undefined
+ # (collapsed reference link and shortcut reference link respectively)
+ if not label:
+ label = state.src[labelStart:labelEnd]
+
+ label = normalizeReference(label)
+
+ ref = state.env["references"].get(label, None)
+ if not ref:
+ state.pos = oldPos
+ return False
+
+ href = ref["href"]
+ title = ref["title"]
+
+ #
+ # We found the end of the link, and know for a fact it's a valid link
+ # so all that's left to do is to call tokenizer.
+ #
+ if not silent:
+ content = state.src[labelStart:labelEnd]
+
+ tokens: list[Token] = []
+ state.md.inline.parse(content, state.md, state.env, tokens)
+
+ token = state.push("image", "img", 0)
+ token.attrs = {"src": href, "alt": ""}
+ token.children = tokens or None
+ token.content = content
+
+ if title:
+ token.attrSet("title", title)
+
+ # note, this is not part of markdown-it JS, but is useful for renderers
+ if label and state.md.options.get("store_labels", False):
+ token.meta["label"] = label
+
+ state.pos = pos
+ state.posMax = max
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/link.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/link.py
new file mode 100644
index 0000000000000000000000000000000000000000..2e92c7d83629f00283b5ed885637c8c4a851ffc7
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/link.py
@@ -0,0 +1,149 @@
+# Process [link]( "stuff")
+
+from ..common.utils import isStrSpace, normalizeReference
+from .state_inline import StateInline
+
+
+def link(state: StateInline, silent: bool) -> bool:
+ href = ""
+ title = ""
+ label = None
+ oldPos = state.pos
+ maximum = state.posMax
+ start = state.pos
+ parseReference = True
+
+ if state.src[state.pos] != "[":
+ return False
+
+ labelStart = state.pos + 1
+ labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, True)
+
+ # parser failed to find ']', so it's not a valid link
+ if labelEnd < 0:
+ return False
+
+ pos = labelEnd + 1
+
+ if pos < maximum and state.src[pos] == "(":
+ #
+ # Inline link
+ #
+
+ # might have found a valid shortcut link, disable reference parsing
+ parseReference = False
+
+ # [link]( "title" )
+ # ^^ skipping these spaces
+ pos += 1
+ while pos < maximum:
+ ch = state.src[pos]
+ if not isStrSpace(ch) and ch != "\n":
+ break
+ pos += 1
+
+ if pos >= maximum:
+ return False
+
+ # [link]( "title" )
+ # ^^^^^^ parsing link destination
+ start = pos
+ res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax)
+ if res.ok:
+ href = state.md.normalizeLink(res.str)
+ if state.md.validateLink(href):
+ pos = res.pos
+ else:
+ href = ""
+
+ # [link]( "title" )
+ # ^^ skipping these spaces
+ start = pos
+ while pos < maximum:
+ ch = state.src[pos]
+ if not isStrSpace(ch) and ch != "\n":
+ break
+ pos += 1
+
+ # [link]( "title" )
+ # ^^^^^^^ parsing link title
+ res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax)
+ if pos < maximum and start != pos and res.ok:
+ title = res.str
+ pos = res.pos
+
+ # [link]( "title" )
+ # ^^ skipping these spaces
+ while pos < maximum:
+ ch = state.src[pos]
+ if not isStrSpace(ch) and ch != "\n":
+ break
+ pos += 1
+
+ if pos >= maximum or state.src[pos] != ")":
+ # parsing a valid shortcut link failed, fallback to reference
+ parseReference = True
+
+ pos += 1
+
+ if parseReference:
+ #
+ # Link reference
+ #
+ if "references" not in state.env:
+ return False
+
+ if pos < maximum and state.src[pos] == "[":
+ start = pos + 1
+ pos = state.md.helpers.parseLinkLabel(state, pos)
+ if pos >= 0:
+ label = state.src[start:pos]
+ pos += 1
+ else:
+ pos = labelEnd + 1
+
+ else:
+ pos = labelEnd + 1
+
+ # covers label == '' and label == undefined
+ # (collapsed reference link and shortcut reference link respectively)
+ if not label:
+ label = state.src[labelStart:labelEnd]
+
+ label = normalizeReference(label)
+
+ ref = state.env["references"].get(label, None)
+ if not ref:
+ state.pos = oldPos
+ return False
+
+ href = ref["href"]
+ title = ref["title"]
+
+ #
+ # We found the end of the link, and know for a fact it's a valid link
+ # so all that's left to do is to call tokenizer.
+ #
+ if not silent:
+ state.pos = labelStart
+ state.posMax = labelEnd
+
+ token = state.push("link_open", "a", 1)
+ token.attrs = {"href": href}
+
+ if title:
+ token.attrSet("title", title)
+
+ # note, this is not part of markdown-it JS, but is useful for renderers
+ if label and state.md.options.get("store_labels", False):
+ token.meta["label"] = label
+
+ state.linkLevel += 1
+ state.md.inline.tokenize(state)
+ state.linkLevel -= 1
+
+ token = state.push("link_close", "a", -1)
+
+ state.pos = pos
+ state.posMax = maximum
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/linkify.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/linkify.py
new file mode 100644
index 0000000000000000000000000000000000000000..3669396e3e7d51c125678f45a862139fe3b3fd9d
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/linkify.py
@@ -0,0 +1,62 @@
+"""Process links like https://example.org/"""
+
+import re
+
+from .state_inline import StateInline
+
+# RFC3986: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
+SCHEME_RE = re.compile(r"(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$", re.IGNORECASE)
+
+
+def linkify(state: StateInline, silent: bool) -> bool:
+ """Rule for identifying plain-text links."""
+ if not state.md.options.linkify:
+ return False
+ if state.linkLevel > 0:
+ return False
+ if not state.md.linkify:
+ raise ModuleNotFoundError("Linkify enabled but not installed.")
+
+ pos = state.pos
+ maximum = state.posMax
+
+ if (
+ (pos + 3) > maximum
+ or state.src[pos] != ":"
+ or state.src[pos + 1] != "/"
+ or state.src[pos + 2] != "/"
+ ):
+ return False
+
+ if not (match := SCHEME_RE.search(state.pending)):
+ return False
+
+ proto = match.group(1)
+ if not (link := state.md.linkify.match_at_start(state.src[pos - len(proto) :])):
+ return False
+ url: str = link.url
+
+ # disallow '*' at the end of the link (conflicts with emphasis)
+ url = url.rstrip("*")
+
+ full_url = state.md.normalizeLink(url)
+ if not state.md.validateLink(full_url):
+ return False
+
+ if not silent:
+ state.pending = state.pending[: -len(proto)]
+
+ token = state.push("link_open", "a", 1)
+ token.attrs = {"href": full_url}
+ token.markup = "linkify"
+ token.info = "auto"
+
+ token = state.push("text", "", 0)
+ token.content = state.md.normalizeLinkText(url)
+
+ token = state.push("link_close", "a", -1)
+ token.markup = "linkify"
+ token.info = "auto"
+
+ state.pos += len(url) - len(proto)
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/newline.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/newline.py
new file mode 100644
index 0000000000000000000000000000000000000000..d05ee6dac712a2211ab24f90dbea64a99e4d80b0
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/newline.py
@@ -0,0 +1,44 @@
+"""Proceess '\n'."""
+
+from ..common.utils import charStrAt, isStrSpace
+from .state_inline import StateInline
+
+
+def newline(state: StateInline, silent: bool) -> bool:
+ pos = state.pos
+
+ if state.src[pos] != "\n":
+ return False
+
+ pmax = len(state.pending) - 1
+ maximum = state.posMax
+
+ # ' \n' -> hardbreak
+ # Lookup in pending chars is bad practice! Don't copy to other rules!
+ # Pending string is stored in concat mode, indexed lookups will cause
+ # conversion to flat mode.
+ if not silent:
+ if pmax >= 0 and charStrAt(state.pending, pmax) == " ":
+ if pmax >= 1 and charStrAt(state.pending, pmax - 1) == " ":
+ # Find whitespaces tail of pending chars.
+ ws = pmax - 1
+ while ws >= 1 and charStrAt(state.pending, ws - 1) == " ":
+ ws -= 1
+ state.pending = state.pending[:ws]
+
+ state.push("hardbreak", "br", 0)
+ else:
+ state.pending = state.pending[:-1]
+ state.push("softbreak", "br", 0)
+
+ else:
+ state.push("softbreak", "br", 0)
+
+ pos += 1
+
+ # skip heading spaces for next line
+ while pos < maximum and isStrSpace(state.src[pos]):
+ pos += 1
+
+ state.pos = pos
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/state_inline.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/state_inline.py
new file mode 100644
index 0000000000000000000000000000000000000000..50dc41294d6b3df03f73bfb40d740ea4ba36c8ee
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/state_inline.py
@@ -0,0 +1,165 @@
+from __future__ import annotations
+
+from collections import namedtuple
+from dataclasses import dataclass
+from typing import TYPE_CHECKING, Any, Literal
+
+from ..common.utils import isMdAsciiPunct, isPunctChar, isWhiteSpace
+from ..ruler import StateBase
+from ..token import Token
+from ..utils import EnvType
+
+if TYPE_CHECKING:
+ from markdown_it import MarkdownIt
+
+
+@dataclass(slots=True)
+class Delimiter:
+ # Char code of the starting marker (number).
+ marker: int
+
+ # Total length of these series of delimiters.
+ length: int
+
+ # A position of the token this delimiter corresponds to.
+ token: int
+
+ # If this delimiter is matched as a valid opener, `end` will be
+ # equal to its position, otherwise it's `-1`.
+ end: int
+
+ # Boolean flags that determine if this delimiter could open or close
+ # an emphasis.
+ open: bool
+ close: bool
+
+ level: bool | None = None
+
+
+Scanned = namedtuple("Scanned", ["can_open", "can_close", "length"])
+
+
+class StateInline(StateBase):
+ def __init__(
+ self, src: str, md: MarkdownIt, env: EnvType, outTokens: list[Token]
+ ) -> None:
+ self.src = src
+ self.env = env
+ self.md = md
+ self.tokens = outTokens
+ self.tokens_meta: list[dict[str, Any] | None] = [None] * len(outTokens)
+
+ self.pos = 0
+ self.posMax = len(self.src)
+ self.level = 0
+ self.pending = ""
+ self.pendingLevel = 0
+
+ # Stores { start: end } pairs. Useful for backtrack
+ # optimization of pairs parse (emphasis, strikes).
+ self.cache: dict[int, int] = {}
+
+ # List of emphasis-like delimiters for current tag
+ self.delimiters: list[Delimiter] = []
+
+ # Stack of delimiter lists for upper level tags
+ self._prev_delimiters: list[list[Delimiter]] = []
+
+ # backticklength => last seen position
+ self.backticks: dict[int, int] = {}
+ self.backticksScanned = False
+
+ # Counter used to disable inline linkify-it execution
+ # inside and markdown links
+ self.linkLevel = 0
+
+ def __repr__(self) -> str:
+ return (
+ f"{self.__class__.__name__}"
+ f"(pos=[{self.pos} of {self.posMax}], token={len(self.tokens)})"
+ )
+
+ def pushPending(self) -> Token:
+ token = Token("text", "", 0)
+ token.content = self.pending
+ token.level = self.pendingLevel
+ self.tokens.append(token)
+ self.pending = ""
+ return token
+
+ def push(self, ttype: str, tag: str, nesting: Literal[-1, 0, 1]) -> Token:
+ """Push new token to "stream".
+ If pending text exists - flush it as text token
+ """
+ if self.pending:
+ self.pushPending()
+
+ token = Token(ttype, tag, nesting)
+ token_meta = None
+
+ if nesting < 0:
+ # closing tag
+ self.level -= 1
+ self.delimiters = self._prev_delimiters.pop()
+
+ token.level = self.level
+
+ if nesting > 0:
+ # opening tag
+ self.level += 1
+ self._prev_delimiters.append(self.delimiters)
+ self.delimiters = []
+ token_meta = {"delimiters": self.delimiters}
+
+ self.pendingLevel = self.level
+ self.tokens.append(token)
+ self.tokens_meta.append(token_meta)
+ return token
+
+ def scanDelims(self, start: int, canSplitWord: bool) -> Scanned:
+ """
+ Scan a sequence of emphasis-like markers, and determine whether
+ it can start an emphasis sequence or end an emphasis sequence.
+
+ - start - position to scan from (it should point at a valid marker);
+ - canSplitWord - determine if these markers can be found inside a word
+
+ """
+ pos = start
+ maximum = self.posMax
+ marker = self.src[start]
+
+ # treat beginning of the line as a whitespace
+ lastChar = self.src[start - 1] if start > 0 else " "
+
+ while pos < maximum and self.src[pos] == marker:
+ pos += 1
+
+ count = pos - start
+
+ # treat end of the line as a whitespace
+ nextChar = self.src[pos] if pos < maximum else " "
+
+ isLastPunctChar = isMdAsciiPunct(ord(lastChar)) or isPunctChar(lastChar)
+ isNextPunctChar = isMdAsciiPunct(ord(nextChar)) or isPunctChar(nextChar)
+
+ isLastWhiteSpace = isWhiteSpace(ord(lastChar))
+ isNextWhiteSpace = isWhiteSpace(ord(nextChar))
+
+ left_flanking = not (
+ isNextWhiteSpace
+ or (isNextPunctChar and not (isLastWhiteSpace or isLastPunctChar))
+ )
+ right_flanking = not (
+ isLastWhiteSpace
+ or (isLastPunctChar and not (isNextWhiteSpace or isNextPunctChar))
+ )
+
+ can_open = left_flanking and (
+ canSplitWord or (not right_flanking) or isLastPunctChar
+ )
+ can_close = right_flanking and (
+ canSplitWord or (not left_flanking) or isNextPunctChar
+ )
+
+ return Scanned(can_open, can_close, count)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/strikethrough.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/strikethrough.py
new file mode 100644
index 0000000000000000000000000000000000000000..ec816281d49b23d0774bf91db6600d996aaf8b06
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/strikethrough.py
@@ -0,0 +1,127 @@
+# ~~strike through~~
+from __future__ import annotations
+
+from .state_inline import Delimiter, StateInline
+
+
+def tokenize(state: StateInline, silent: bool) -> bool:
+ """Insert each marker as a separate text token, and add it to delimiter list"""
+ start = state.pos
+ ch = state.src[start]
+
+ if silent:
+ return False
+
+ if ch != "~":
+ return False
+
+ scanned = state.scanDelims(state.pos, True)
+ length = scanned.length
+
+ if length < 2:
+ return False
+
+ if length % 2:
+ token = state.push("text", "", 0)
+ token.content = ch
+ length -= 1
+
+ i = 0
+ while i < length:
+ token = state.push("text", "", 0)
+ token.content = ch + ch
+ state.delimiters.append(
+ Delimiter(
+ marker=ord(ch),
+ length=0, # disable "rule of 3" length checks meant for emphasis
+ token=len(state.tokens) - 1,
+ end=-1,
+ open=scanned.can_open,
+ close=scanned.can_close,
+ )
+ )
+
+ i += 2
+
+ state.pos += scanned.length
+
+ return True
+
+
+def _postProcess(state: StateInline, delimiters: list[Delimiter]) -> None:
+ loneMarkers = []
+ maximum = len(delimiters)
+
+ i = 0
+ while i < maximum:
+ startDelim = delimiters[i]
+
+ if startDelim.marker != 0x7E: # /* ~ */
+ i += 1
+ continue
+
+ if startDelim.end == -1:
+ i += 1
+ continue
+
+ endDelim = delimiters[startDelim.end]
+
+ token = state.tokens[startDelim.token]
+ token.type = "s_open"
+ token.tag = "s"
+ token.nesting = 1
+ token.markup = "~~"
+ token.content = ""
+
+ token = state.tokens[endDelim.token]
+ token.type = "s_close"
+ token.tag = "s"
+ token.nesting = -1
+ token.markup = "~~"
+ token.content = ""
+
+ if (
+ state.tokens[endDelim.token - 1].type == "text"
+ and state.tokens[endDelim.token - 1].content == "~"
+ ):
+ loneMarkers.append(endDelim.token - 1)
+
+ i += 1
+
+ # If a marker sequence has an odd number of characters, it's split
+ # like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the
+ # start of the sequence.
+ #
+ # So, we have to move all those markers after subsequent s_close tags.
+ #
+ while loneMarkers:
+ i = loneMarkers.pop()
+ j = i + 1
+
+ while (j < len(state.tokens)) and (state.tokens[j].type == "s_close"):
+ j += 1
+
+ j -= 1
+
+ if i != j:
+ token = state.tokens[j]
+ state.tokens[j] = state.tokens[i]
+ state.tokens[i] = token
+
+
+def postProcess(state: StateInline) -> None:
+ """Walk through delimiter list and replace text tokens with tags."""
+ tokens_meta = state.tokens_meta
+ maximum = len(state.tokens_meta)
+ _postProcess(state, state.delimiters)
+
+ curr = 0
+ while curr < maximum:
+ try:
+ curr_meta = tokens_meta[curr]
+ except IndexError:
+ pass
+ else:
+ if curr_meta and "delimiters" in curr_meta:
+ _postProcess(state, curr_meta["delimiters"])
+ curr += 1
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/text.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/text.py
new file mode 100644
index 0000000000000000000000000000000000000000..18b2fcc7a8f5a40d4820df53838d29fcce833f3f
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/rules_inline/text.py
@@ -0,0 +1,62 @@
+import functools
+import re
+
+# Skip text characters for text token, place those to pending buffer
+# and increment current pos
+from .state_inline import StateInline
+
+# Rule to skip pure text
+# '{}$%@~+=:' reserved for extensions
+
+# !!!! Don't confuse with "Markdown ASCII Punctuation" chars
+# http://spec.commonmark.org/0.15/#ascii-punctuation-character
+
+
+_TerminatorChars = {
+ "\n",
+ "!",
+ "#",
+ "$",
+ "%",
+ "&",
+ "*",
+ "+",
+ "-",
+ ":",
+ "<",
+ "=",
+ ">",
+ "@",
+ "[",
+ "\\",
+ "]",
+ "^",
+ "_",
+ "`",
+ "{",
+ "}",
+ "~",
+}
+
+
+@functools.cache
+def _terminator_char_regex() -> re.Pattern[str]:
+ return re.compile("[" + re.escape("".join(_TerminatorChars)) + "]")
+
+
+def text(state: StateInline, silent: bool) -> bool:
+ pos = state.pos
+ posMax = state.posMax
+
+ terminator_char = _terminator_char_regex().search(state.src, pos)
+ pos = terminator_char.start() if terminator_char else posMax
+
+ if pos == state.pos:
+ return False
+
+ if not silent:
+ state.pending += state.src[state.pos : pos]
+
+ state.pos = pos
+
+ return True
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..582ddf59e08277fe6e78cee924d2c84805fe36fe
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 ExecutableBookProject
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE.markdown-it b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE.markdown-it
new file mode 100644
index 0000000000000000000000000000000000000000..7ffa058cb78f8fb9beb974d9fd429004d2d2e585
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it_py-4.0.0.dist-info/licenses/LICENSE.markdown-it
@@ -0,0 +1,22 @@
+Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b80c600585c14fb697ae82c9f5a116f7331bbb7f
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_afm.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_afm.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..27e7a3f4f93b81762ec73618f7487bf0b22ad2bb
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_afm.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_animation_data.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_animation_data.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3c3214fb17cb3c53e3f0755af0f17f0ab21b0c70
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_animation_data.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_blocking_input.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_blocking_input.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..11b7d4d14e2f10bcf8e2b9434de2fd12f5e749d4
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_blocking_input.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_cm.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_cm.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7d16e37de9b7b67872633da785be842c46c2b380
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_cm.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_cm_bivar.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_cm_bivar.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9378b74cf7c46579ef50a7ee1869ed13840f0a19
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_cm_bivar.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_cm_multivar.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_cm_multivar.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6fa6a2456a496b0af5514a321162f87f925821db
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_cm_multivar.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_color_data.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_color_data.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1ff83a90e3a56f69f2ea4e14b23d37b80143b4c8
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_color_data.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_constrained_layout.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_constrained_layout.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..dcfc9ceedbfe393775442907ead8e022f4de857d
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_constrained_layout.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_docstring.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_docstring.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..20914c50afc9fbdf5e3e4f175a77b3a2ab4dd6b6
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_docstring.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_enums.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_enums.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a0e926332835c86938d4fb2914645a49424178e5
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_enums.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_fontconfig_pattern.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_fontconfig_pattern.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..82c757e18ed7d51d27a954bb935a2c37da2c06b6
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_fontconfig_pattern.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_internal_utils.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_internal_utils.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..25eef1e65217df3528861b26cf963599158c53aa
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_internal_utils.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_layoutgrid.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_layoutgrid.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..651d3c76d79e0fb5dbabfdd120b7bbdd59d891aa
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_layoutgrid.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_mathtext_data.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_mathtext_data.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..02b66bb9785a0259cb64348ae8851fbd0bd9c0db
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_mathtext_data.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_pylab_helpers.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_pylab_helpers.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c36aabd76b76888ac130ed0629ded539f85c9470
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_pylab_helpers.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_text_helpers.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_text_helpers.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..919bf3e858513a51ed8906697dfbec94f15f3aba
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_text_helpers.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_tight_bbox.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_tight_bbox.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..145a4ed17d56858c1d9bdfb59e7654cdc86bdbf0
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_tight_bbox.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_tight_layout.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_tight_layout.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b720c7cac3a0bcf3772244bd1d1fe4d8a582d0c7
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_tight_layout.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_type1font.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_type1font.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..aa4b7709398e89d56d661e454240bab3e19372c1
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_type1font.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_version.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_version.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8899abe06c0cbabe82b7f2b404eed30cc787d2f6
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/_version.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/animation.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/animation.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4b2b0445b088134872501ed750afbf3bbddc7a2f
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/animation.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/artist.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/artist.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1965b5b3e282a77e0288bc2371dd99d64f905ddc
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/artist.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/backend_managers.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/backend_managers.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..47a8a28e0c319f06df03d7fdff2f43d18b81fa34
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/backend_managers.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/backend_tools.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/backend_tools.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..36a3ec72adf702fd7893a5d1fceac69ac26f8247
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/backend_tools.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/bezier.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/bezier.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..bf701573269bb8fe8afde6919846b87b75d8f7d9
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/bezier.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/category.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/category.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..83a6a822a4beea214695c680b8b898db1a7c8ba1
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/category.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/cbook.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/cbook.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..64d191052ef743e6426a72ca0947ac2a3c71a077
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/cbook.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/cm.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/cm.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..824da166146ace618c12be81d50baba5cec76b62
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/cm.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/colorbar.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/colorbar.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b0393b4f6aadcdf56e6d779d246f967ec9a2a315
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/colorbar.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/colorizer.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/colorizer.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..482d4c2a8002ebdc60d0970792bebdb3e89a9f4b
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/colorizer.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/container.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/container.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d0298bbb7503fb83ea8282dd18852d9551f657f3
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/container.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/contour.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/contour.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3cb39cf122f4e6203fb5c861a46992a0eb4059b7
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/contour.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/dates.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/dates.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..163225eb22f139fc7748dff31e9953264ab03bc0
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/dates.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/dviread.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/dviread.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..369194c5dfbb8964c785934fb16bbb605434176f
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/dviread.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/font_manager.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/font_manager.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..45d5211799cc96f5a7779633ff583000828f1a0b
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/font_manager.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/gridspec.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/gridspec.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..fa5bd5e2cbb53b768eb8efc04ceae1e67063bb7d
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/gridspec.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/hatch.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/hatch.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c6361e4b31e4e4e7cfad5c97c0b8066603b2938c
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/hatch.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/image.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/image.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b8aa85efa7ae5eb93381397517d51d606278f579
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/image.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/inset.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/inset.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e5dd74984dc1ec0956e10ee92384f98a1e05727d
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/inset.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/layout_engine.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/layout_engine.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..53c6b984384187f3523a2bd5fc00e2ca2c7b4062
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/layout_engine.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/legend.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/legend.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..318c151abf0da2c631e08a3becad746dae6a05dc
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/legend.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/legend_handler.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/legend_handler.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9da3e13c1f9f570110f8ab08399a7da759221b84
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/legend_handler.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/lines.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/lines.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..824b299fba392eb8bb70ebac1e836a482f8d148a
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/lines.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/markers.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/markers.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..94a703584af421ab4110c12ee9d14dca5acdf2d9
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/markers.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/mathtext.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/mathtext.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..89da00307bba5011dfe63c6f32107953129f4ed4
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/mathtext.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/mlab.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/mlab.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e2d2bc0bde1beb0e96e8f629228a6fb0a21eb10e
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/mlab.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/offsetbox.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/offsetbox.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..90dc181df00fa34acfdecf7d70e3b9c5c85d2655
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/offsetbox.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/path.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/path.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5b2b7203b16324dedf45424b81963cf85521e83d
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/path.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/patheffects.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/patheffects.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2e15fe67f03e6f3ef093cca98f412add93db8e24
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/patheffects.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/pylab.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/pylab.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..bb13b9269c4ec9d85665b68cdc5170660a3e6285
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/pylab.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/quiver.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/quiver.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0ac55373f3ef57439c03a16316940d7da283b27a
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/quiver.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/rcsetup.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/rcsetup.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..39122fe6359c445e987395d86a413cd8c1106cc0
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/rcsetup.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/sankey.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/sankey.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2ab2dced6b41bb68ea3df0a1efa487805d8fa388
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/sankey.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/scale.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/scale.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..43d13a028aa61a4e25af8e8239f115728ff1ecc2
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/scale.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/spines.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/spines.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1b281c32cd7fd57a748d65d89dc70ce5bea310fa
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/spines.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/stackplot.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/stackplot.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..777623229faffce1533286357b70c288cc4d74e6
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/stackplot.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/streamplot.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/streamplot.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f1659c1135f2cfc174823b49da0928370c1bc83d
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/streamplot.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/table.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/table.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e5ae07ba37eb8a509243988fa7c5c8b64b38cff6
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/table.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/texmanager.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/texmanager.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d1b2daeb7be85413a75d8a0f88d716210e5b9869
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/texmanager.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/text.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/text.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e0cd97088b4540a80ad2ffbe583a10b4504cda67
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/text.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/textpath.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/textpath.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cf10fa846948487ec496566837a61f7583eed209
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/textpath.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/typing.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/typing.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5d3fbdbb8de8508a1ba0ebc43ea330f0e22057fc
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/typing.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/units.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/units.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b863fed49572afa43dd2f0b01f84ceb4af0949a9
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/__pycache__/units.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..22b58b62ff8e7f83043c9d99cc6d0dcefb0a93d2
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/__init__.py
@@ -0,0 +1,391 @@
+"""
+Helper functions for managing the Matplotlib API.
+
+This documentation is only relevant for Matplotlib developers, not for users.
+
+.. warning::
+
+ This module and its submodules are for internal use only. Do not use them
+ in your own code. We may change the API at any time with no warning.
+
+"""
+
+import functools
+import itertools
+import pathlib
+import re
+import sys
+import warnings
+
+from .deprecation import ( # noqa: F401
+ deprecated, warn_deprecated,
+ rename_parameter, delete_parameter, make_keyword_only,
+ deprecate_method_override, deprecate_privatize_attribute,
+ suppress_matplotlib_deprecation_warning,
+ MatplotlibDeprecationWarning)
+
+
+class classproperty:
+ """
+ Like `property`, but also triggers on access via the class, and it is the
+ *class* that's passed as argument.
+
+ Examples
+ --------
+ ::
+
+ class C:
+ @classproperty
+ def foo(cls):
+ return cls.__name__
+
+ assert C.foo == "C"
+ """
+
+ def __init__(self, fget, fset=None, fdel=None, doc=None):
+ self._fget = fget
+ if fset is not None or fdel is not None:
+ raise ValueError('classproperty only implements fget.')
+ self.fset = fset
+ self.fdel = fdel
+ # docs are ignored for now
+ self._doc = doc
+
+ def __get__(self, instance, owner):
+ return self._fget(owner)
+
+ @property
+ def fget(self):
+ return self._fget
+
+
+# In the following check_foo() functions, the first parameter is positional-only to make
+# e.g. `_api.check_isinstance([...], types=foo)` work.
+
+def check_isinstance(types, /, **kwargs):
+ """
+ For each *key, value* pair in *kwargs*, check that *value* is an instance
+ of one of *types*; if not, raise an appropriate TypeError.
+
+ As a special case, a ``None`` entry in *types* is treated as NoneType.
+
+ Examples
+ --------
+ >>> _api.check_isinstance((SomeClass, None), arg=arg)
+ """
+ none_type = type(None)
+ types = ((types,) if isinstance(types, type) else
+ (none_type,) if types is None else
+ tuple(none_type if tp is None else tp for tp in types))
+
+ def type_name(tp):
+ return ("None" if tp is none_type
+ else tp.__qualname__ if tp.__module__ == "builtins"
+ else f"{tp.__module__}.{tp.__qualname__}")
+
+ for k, v in kwargs.items():
+ if not isinstance(v, types):
+ names = [*map(type_name, types)]
+ if "None" in names: # Move it to the end for better wording.
+ names.remove("None")
+ names.append("None")
+ raise TypeError(
+ "{!r} must be an instance of {}, not a {}".format(
+ k,
+ ", ".join(names[:-1]) + " or " + names[-1]
+ if len(names) > 1 else names[0],
+ type_name(type(v))))
+
+
+def check_in_list(values, /, *, _print_supported_values=True, **kwargs):
+ """
+ For each *key, value* pair in *kwargs*, check that *value* is in *values*;
+ if not, raise an appropriate ValueError.
+
+ Parameters
+ ----------
+ values : iterable
+ Sequence of values to check on.
+ _print_supported_values : bool, default: True
+ Whether to print *values* when raising ValueError.
+ **kwargs : dict
+ *key, value* pairs as keyword arguments to find in *values*.
+
+ Raises
+ ------
+ ValueError
+ If any *value* in *kwargs* is not found in *values*.
+
+ Examples
+ --------
+ >>> _api.check_in_list(["foo", "bar"], arg=arg, other_arg=other_arg)
+ """
+ if not kwargs:
+ raise TypeError("No argument to check!")
+ for key, val in kwargs.items():
+ if val not in values:
+ msg = f"{val!r} is not a valid value for {key}"
+ if _print_supported_values:
+ msg += f"; supported values are {', '.join(map(repr, values))}"
+ raise ValueError(msg)
+
+
+def check_shape(shape, /, **kwargs):
+ """
+ For each *key, value* pair in *kwargs*, check that *value* has the shape *shape*;
+ if not, raise an appropriate ValueError.
+
+ *None* in the shape is treated as a "free" size that can have any length.
+ e.g. (None, 2) -> (N, 2)
+
+ The values checked must be numpy arrays.
+
+ Examples
+ --------
+ To check for (N, 2) shaped arrays
+
+ >>> _api.check_shape((None, 2), arg=arg, other_arg=other_arg)
+ """
+ for k, v in kwargs.items():
+ data_shape = v.shape
+
+ if (len(data_shape) != len(shape)
+ or any(s != t and t is not None for s, t in zip(data_shape, shape))):
+ dim_labels = iter(itertools.chain(
+ 'NMLKJIH',
+ (f"D{i}" for i in itertools.count())))
+ text_shape = ", ".join([str(n) if n is not None else next(dim_labels)
+ for n in shape[::-1]][::-1])
+ if len(shape) == 1:
+ text_shape += ","
+
+ raise ValueError(
+ f"{k!r} must be {len(shape)}D with shape ({text_shape}), "
+ f"but your input has shape {v.shape}"
+ )
+
+
+def check_getitem(mapping, /, **kwargs):
+ """
+ *kwargs* must consist of a single *key, value* pair. If *key* is in
+ *mapping*, return ``mapping[value]``; else, raise an appropriate
+ ValueError.
+
+ Examples
+ --------
+ >>> _api.check_getitem({"foo": "bar"}, arg=arg)
+ """
+ if len(kwargs) != 1:
+ raise ValueError("check_getitem takes a single keyword argument")
+ (k, v), = kwargs.items()
+ try:
+ return mapping[v]
+ except KeyError:
+ raise ValueError(
+ f"{v!r} is not a valid value for {k}; supported values are "
+ f"{', '.join(map(repr, mapping))}") from None
+
+
+def caching_module_getattr(cls):
+ """
+ Helper decorator for implementing module-level ``__getattr__`` as a class.
+
+ This decorator must be used at the module toplevel as follows::
+
+ @caching_module_getattr
+ class __getattr__: # The class *must* be named ``__getattr__``.
+ @property # Only properties are taken into account.
+ def name(self): ...
+
+ The ``__getattr__`` class will be replaced by a ``__getattr__``
+ function such that trying to access ``name`` on the module will
+ resolve the corresponding property (which may be decorated e.g. with
+ ``_api.deprecated`` for deprecating module globals). The properties are
+ all implicitly cached. Moreover, a suitable AttributeError is generated
+ and raised if no property with the given name exists.
+ """
+
+ assert cls.__name__ == "__getattr__"
+ # Don't accidentally export cls dunders.
+ props = {name: prop for name, prop in vars(cls).items()
+ if isinstance(prop, property)}
+ instance = cls()
+
+ @functools.cache
+ def __getattr__(name):
+ if name in props:
+ return props[name].__get__(instance)
+ raise AttributeError(
+ f"module {cls.__module__!r} has no attribute {name!r}")
+
+ return __getattr__
+
+
+def define_aliases(alias_d, cls=None):
+ """
+ Class decorator for defining property aliases.
+
+ Use as ::
+
+ @_api.define_aliases({"property": ["alias", ...], ...})
+ class C: ...
+
+ For each property, if the corresponding ``get_property`` is defined in the
+ class so far, an alias named ``get_alias`` will be defined; the same will
+ be done for setters. If neither the getter nor the setter exists, an
+ exception will be raised.
+
+ The alias map is stored as the ``_alias_map`` attribute on the class and
+ can be used by `.normalize_kwargs` (which assumes that higher priority
+ aliases come last).
+ """
+ if cls is None: # Return the actual class decorator.
+ return functools.partial(define_aliases, alias_d)
+
+ def make_alias(name): # Enforce a closure over *name*.
+ @functools.wraps(getattr(cls, name))
+ def method(self, *args, **kwargs):
+ return getattr(self, name)(*args, **kwargs)
+ return method
+
+ for prop, aliases in alias_d.items():
+ exists = False
+ for prefix in ["get_", "set_"]:
+ if prefix + prop in vars(cls):
+ exists = True
+ for alias in aliases:
+ method = make_alias(prefix + prop)
+ method.__name__ = prefix + alias
+ method.__doc__ = f"Alias for `{prefix + prop}`."
+ setattr(cls, prefix + alias, method)
+ if not exists:
+ raise ValueError(
+ f"Neither getter nor setter exists for {prop!r}")
+
+ def get_aliased_and_aliases(d):
+ return {*d, *(alias for aliases in d.values() for alias in aliases)}
+
+ preexisting_aliases = getattr(cls, "_alias_map", {})
+ conflicting = (get_aliased_and_aliases(preexisting_aliases)
+ & get_aliased_and_aliases(alias_d))
+ if conflicting:
+ # Need to decide on conflict resolution policy.
+ raise NotImplementedError(
+ f"Parent class already defines conflicting aliases: {conflicting}")
+ cls._alias_map = {**preexisting_aliases, **alias_d}
+ return cls
+
+
+def select_matching_signature(funcs, *args, **kwargs):
+ """
+ Select and call the function that accepts ``*args, **kwargs``.
+
+ *funcs* is a list of functions which should not raise any exception (other
+ than `TypeError` if the arguments passed do not match their signature).
+
+ `select_matching_signature` tries to call each of the functions in *funcs*
+ with ``*args, **kwargs`` (in the order in which they are given). Calls
+ that fail with a `TypeError` are silently skipped. As soon as a call
+ succeeds, `select_matching_signature` returns its return value. If no
+ function accepts ``*args, **kwargs``, then the `TypeError` raised by the
+ last failing call is re-raised.
+
+ Callers should normally make sure that any ``*args, **kwargs`` can only
+ bind a single *func* (to avoid any ambiguity), although this is not checked
+ by `select_matching_signature`.
+
+ Notes
+ -----
+ `select_matching_signature` is intended to help implementing
+ signature-overloaded functions. In general, such functions should be
+ avoided, except for back-compatibility concerns. A typical use pattern is
+ ::
+
+ def my_func(*args, **kwargs):
+ params = select_matching_signature(
+ [lambda old1, old2: locals(), lambda new: locals()],
+ *args, **kwargs)
+ if "old1" in params:
+ warn_deprecated(...)
+ old1, old2 = params.values() # note that locals() is ordered.
+ else:
+ new, = params.values()
+ # do things with params
+
+ which allows *my_func* to be called either with two parameters (*old1* and
+ *old2*) or a single one (*new*). Note that the new signature is given
+ last, so that callers get a `TypeError` corresponding to the new signature
+ if the arguments they passed in do not match any signature.
+ """
+ # Rather than relying on locals() ordering, one could have just used func's
+ # signature (``bound = inspect.signature(func).bind(*args, **kwargs);
+ # bound.apply_defaults(); return bound``) but that is significantly slower.
+ for i, func in enumerate(funcs):
+ try:
+ return func(*args, **kwargs)
+ except TypeError:
+ if i == len(funcs) - 1:
+ raise
+
+
+def nargs_error(name, takes, given):
+ """Generate a TypeError to be raised by function calls with wrong arity."""
+ return TypeError(f"{name}() takes {takes} positional arguments but "
+ f"{given} were given")
+
+
+def kwarg_error(name, kw):
+ """
+ Generate a TypeError to be raised by function calls with wrong kwarg.
+
+ Parameters
+ ----------
+ name : str
+ The name of the calling function.
+ kw : str or Iterable[str]
+ Either the invalid keyword argument name, or an iterable yielding
+ invalid keyword arguments (e.g., a ``kwargs`` dict).
+ """
+ if not isinstance(kw, str):
+ kw = next(iter(kw))
+ return TypeError(f"{name}() got an unexpected keyword argument '{kw}'")
+
+
+def recursive_subclasses(cls):
+ """Yield *cls* and direct and indirect subclasses of *cls*."""
+ yield cls
+ for subcls in cls.__subclasses__():
+ yield from recursive_subclasses(subcls)
+
+
+def warn_external(message, category=None):
+ """
+ `warnings.warn` wrapper that sets *stacklevel* to "outside Matplotlib".
+
+ The original emitter of the warning can be obtained by patching this
+ function back to `warnings.warn`, i.e. ``_api.warn_external =
+ warnings.warn`` (or ``functools.partial(warnings.warn, stacklevel=2)``,
+ etc.).
+ """
+ kwargs = {}
+ if sys.version_info[:2] >= (3, 12):
+ # Go to Python's `site-packages` or `lib` from an editable install.
+ basedir = pathlib.Path(__file__).parents[2]
+ kwargs['skip_file_prefixes'] = (str(basedir / 'matplotlib'),
+ str(basedir / 'mpl_toolkits'))
+ else:
+ frame = sys._getframe()
+ for stacklevel in itertools.count(1):
+ if frame is None:
+ # when called in embedded context may hit frame is None
+ kwargs['stacklevel'] = stacklevel
+ break
+ if not re.match(r"\A(matplotlib|mpl_toolkits)(\Z|\.(?!tests\.))",
+ # Work around sphinx-gallery not setting __name__.
+ frame.f_globals.get("__name__", "")):
+ kwargs['stacklevel'] = stacklevel
+ break
+ frame = frame.f_back
+ # preemptively break reference cycle between locals and the frame
+ del frame
+ warnings.warn(message, category, **kwargs)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/__init__.pyi b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/__init__.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..ea7076feac3c415be6d789e92f87020ea89db7a1
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/__init__.pyi
@@ -0,0 +1,59 @@
+from collections.abc import Callable, Generator, Iterable, Mapping, Sequence
+from typing import Any, TypeVar, overload
+from typing_extensions import Self # < Py 3.11
+
+from numpy.typing import NDArray
+
+from .deprecation import ( # noqa: F401, re-exported API
+ deprecated as deprecated,
+ warn_deprecated as warn_deprecated,
+ rename_parameter as rename_parameter,
+ delete_parameter as delete_parameter,
+ make_keyword_only as make_keyword_only,
+ deprecate_method_override as deprecate_method_override,
+ deprecate_privatize_attribute as deprecate_privatize_attribute,
+ suppress_matplotlib_deprecation_warning as suppress_matplotlib_deprecation_warning,
+ MatplotlibDeprecationWarning as MatplotlibDeprecationWarning,
+)
+
+_T = TypeVar("_T")
+
+class classproperty(Any):
+ def __init__(
+ self,
+ fget: Callable[[_T], Any],
+ fset: None = ...,
+ fdel: None = ...,
+ doc: str | None = None,
+ ): ...
+ @overload
+ def __get__(self, instance: None, owner: None) -> Self: ...
+ @overload
+ def __get__(self, instance: object, owner: type[object]) -> Any: ...
+ @property
+ def fget(self) -> Callable[[_T], Any]: ...
+
+def check_isinstance(
+ types: type | tuple[type | None, ...], /, **kwargs: Any
+) -> None: ...
+def check_in_list(
+ values: Sequence[Any], /, *, _print_supported_values: bool = ..., **kwargs: Any
+) -> None: ...
+def check_shape(shape: tuple[int | None, ...], /, **kwargs: NDArray) -> None: ...
+def check_getitem(mapping: Mapping[Any, Any], /, **kwargs: Any) -> Any: ...
+def caching_module_getattr(cls: type) -> Callable[[str], Any]: ...
+@overload
+def define_aliases(
+ alias_d: dict[str, list[str]], cls: None = ...
+) -> Callable[[type[_T]], type[_T]]: ...
+@overload
+def define_aliases(alias_d: dict[str, list[str]], cls: type[_T]) -> type[_T]: ...
+def select_matching_signature(
+ funcs: list[Callable], *args: Any, **kwargs: Any
+) -> Any: ...
+def nargs_error(name: str, takes: int | str, given: int) -> TypeError: ...
+def kwarg_error(name: str, kw: str | Iterable[str]) -> TypeError: ...
+def recursive_subclasses(cls: type) -> Generator[type, None, None]: ...
+def warn_external(
+ message: str | Warning, category: type[Warning] | None = ...
+) -> None: ...
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9ab91ff0c77a519991810e4436fafe0ee7d772c7
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/__pycache__/deprecation.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/__pycache__/deprecation.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..75b1d979aaa0aa76f6995d03f41479dbdbde1997
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/__pycache__/deprecation.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/deprecation.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/deprecation.py
new file mode 100644
index 0000000000000000000000000000000000000000..65a754bbb43d424f52e9b11f4580ba5d08dc6e59
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/deprecation.py
@@ -0,0 +1,509 @@
+"""
+Helper functions for deprecating parts of the Matplotlib API.
+
+This documentation is only relevant for Matplotlib developers, not for users.
+
+.. warning::
+
+ This module is for internal use only. Do not use it in your own code.
+ We may change the API at any time with no warning.
+
+"""
+
+import contextlib
+import functools
+import inspect
+import math
+import warnings
+
+
+class MatplotlibDeprecationWarning(DeprecationWarning):
+ """A class for issuing deprecation warnings for Matplotlib users."""
+
+
+def _generate_deprecation_warning(
+ since, message='', name='', alternative='', pending=False, obj_type='',
+ addendum='', *, removal=''):
+ if pending:
+ if removal:
+ raise ValueError("A pending deprecation cannot have a scheduled removal")
+ elif removal == '':
+ macro, meso, *_ = since.split('.')
+ removal = f'{macro}.{int(meso) + 2}'
+ if not message:
+ message = (
+ ("The %(name)s %(obj_type)s" if obj_type else "%(name)s") +
+ (" will be deprecated in a future version" if pending else
+ (" was deprecated in Matplotlib %(since)s" +
+ (" and will be removed in %(removal)s" if removal else ""))) +
+ "." +
+ (" Use %(alternative)s instead." if alternative else "") +
+ (" %(addendum)s" if addendum else ""))
+ warning_cls = PendingDeprecationWarning if pending else MatplotlibDeprecationWarning
+ return warning_cls(message % dict(
+ func=name, name=name, obj_type=obj_type, since=since, removal=removal,
+ alternative=alternative, addendum=addendum))
+
+
+def warn_deprecated(
+ since, *, message='', name='', alternative='', pending=False,
+ obj_type='', addendum='', removal=''):
+ """
+ Display a standardized deprecation.
+
+ Parameters
+ ----------
+ since : str
+ The release at which this API became deprecated.
+ message : str, optional
+ Override the default deprecation message. The ``%(since)s``,
+ ``%(name)s``, ``%(alternative)s``, ``%(obj_type)s``, ``%(addendum)s``,
+ and ``%(removal)s`` format specifiers will be replaced by the values
+ of the respective arguments passed to this function.
+ name : str, optional
+ The name of the deprecated object.
+ alternative : str, optional
+ An alternative API that the user may use in place of the deprecated
+ API. The deprecation warning will tell the user about this alternative
+ if provided.
+ pending : bool, optional
+ If True, uses a PendingDeprecationWarning instead of a
+ DeprecationWarning. Cannot be used together with *removal*.
+ obj_type : str, optional
+ The object type being deprecated.
+ addendum : str, optional
+ Additional text appended directly to the final message.
+ removal : str, optional
+ The expected removal version. With the default (an empty string), a
+ removal version is automatically computed from *since*. Set to other
+ Falsy values to not schedule a removal date. Cannot be used together
+ with *pending*.
+
+ Examples
+ --------
+ ::
+
+ # To warn of the deprecation of "matplotlib.name_of_module"
+ warn_deprecated('1.4.0', name='matplotlib.name_of_module',
+ obj_type='module')
+ """
+ warning = _generate_deprecation_warning(
+ since, message, name, alternative, pending, obj_type, addendum,
+ removal=removal)
+ from . import warn_external
+ warn_external(warning, category=MatplotlibDeprecationWarning)
+
+
+def deprecated(since, *, message='', name='', alternative='', pending=False,
+ obj_type=None, addendum='', removal=''):
+ """
+ Decorator to mark a function, a class, or a property as deprecated.
+
+ When deprecating a classmethod, a staticmethod, or a property, the
+ ``@deprecated`` decorator should go *under* ``@classmethod`` and
+ ``@staticmethod`` (i.e., `deprecated` should directly decorate the
+ underlying callable), but *over* ``@property``.
+
+ When deprecating a class ``C`` intended to be used as a base class in a
+ multiple inheritance hierarchy, ``C`` *must* define an ``__init__`` method
+ (if ``C`` instead inherited its ``__init__`` from its own base class, then
+ ``@deprecated`` would mess up ``__init__`` inheritance when installing its
+ own (deprecation-emitting) ``C.__init__``).
+
+ Parameters are the same as for `warn_deprecated`, except that *obj_type*
+ defaults to 'class' if decorating a class, 'attribute' if decorating a
+ property, and 'function' otherwise.
+
+ Examples
+ --------
+ ::
+
+ @deprecated('1.4.0')
+ def the_function_to_deprecate():
+ pass
+ """
+
+ def deprecate(obj, message=message, name=name, alternative=alternative,
+ pending=pending, obj_type=obj_type, addendum=addendum):
+ from matplotlib._api import classproperty
+
+ if isinstance(obj, type):
+ if obj_type is None:
+ obj_type = "class"
+ func = obj.__init__
+ name = name or obj.__name__
+ old_doc = obj.__doc__
+
+ def finalize(wrapper, new_doc):
+ try:
+ obj.__doc__ = new_doc
+ except AttributeError: # Can't set on some extension objects.
+ pass
+ obj.__init__ = functools.wraps(obj.__init__)(wrapper)
+ return obj
+
+ elif isinstance(obj, (property, classproperty)):
+ if obj_type is None:
+ obj_type = "attribute"
+ func = None
+ name = name or obj.fget.__name__
+ old_doc = obj.__doc__
+
+ class _deprecated_property(type(obj)):
+ def __get__(self, instance, owner=None):
+ if instance is not None or owner is not None \
+ and isinstance(self, classproperty):
+ emit_warning()
+ return super().__get__(instance, owner)
+
+ def __set__(self, instance, value):
+ if instance is not None:
+ emit_warning()
+ return super().__set__(instance, value)
+
+ def __delete__(self, instance):
+ if instance is not None:
+ emit_warning()
+ return super().__delete__(instance)
+
+ def __set_name__(self, owner, set_name):
+ nonlocal name
+ if name == "":
+ name = set_name
+
+ def finalize(_, new_doc):
+ return _deprecated_property(
+ fget=obj.fget, fset=obj.fset, fdel=obj.fdel, doc=new_doc)
+
+ else:
+ if obj_type is None:
+ obj_type = "function"
+ func = obj
+ name = name or obj.__name__
+ old_doc = func.__doc__
+
+ def finalize(wrapper, new_doc):
+ wrapper = functools.wraps(func)(wrapper)
+ wrapper.__doc__ = new_doc
+ return wrapper
+
+ def emit_warning():
+ warn_deprecated(
+ since, message=message, name=name, alternative=alternative,
+ pending=pending, obj_type=obj_type, addendum=addendum,
+ removal=removal)
+
+ def wrapper(*args, **kwargs):
+ emit_warning()
+ return func(*args, **kwargs)
+
+ old_doc = inspect.cleandoc(old_doc or '').strip('\n')
+
+ notes_header = '\nNotes\n-----'
+ second_arg = ' '.join([t.strip() for t in
+ (message, f"Use {alternative} instead."
+ if alternative else "", addendum) if t])
+ new_doc = (f"[*Deprecated*] {old_doc}\n"
+ f"{notes_header if notes_header not in old_doc else ''}\n"
+ f".. deprecated:: {since}\n"
+ f" {second_arg}")
+
+ if not old_doc:
+ # This is to prevent a spurious 'unexpected unindent' warning from
+ # docutils when the original docstring was blank.
+ new_doc += r'\ '
+
+ return finalize(wrapper, new_doc)
+
+ return deprecate
+
+
+class deprecate_privatize_attribute:
+ """
+ Helper to deprecate public access to an attribute (or method).
+
+ This helper should only be used at class scope, as follows::
+
+ class Foo:
+ attr = _deprecate_privatize_attribute(*args, **kwargs)
+
+ where *all* parameters are forwarded to `deprecated`. This form makes
+ ``attr`` a property which forwards read and write access to ``self._attr``
+ (same name but with a leading underscore), with a deprecation warning.
+ Note that the attribute name is derived from *the name this helper is
+ assigned to*. This helper also works for deprecating methods.
+ """
+
+ def __init__(self, *args, **kwargs):
+ self.deprecator = deprecated(*args, **kwargs)
+
+ def __set_name__(self, owner, name):
+ setattr(owner, name, self.deprecator(
+ property(lambda self: getattr(self, f"_{name}"),
+ lambda self, value: setattr(self, f"_{name}", value)),
+ name=name))
+
+
+# Used by _copy_docstring_and_deprecators to redecorate pyplot wrappers and
+# boilerplate.py to retrieve original signatures. It may seem natural to store
+# this information as an attribute on the wrapper, but if the wrapper gets
+# itself functools.wraps()ed, then such attributes are silently propagated to
+# the outer wrapper, which is not desired.
+DECORATORS = {}
+
+
+def rename_parameter(since, old, new, func=None):
+ """
+ Decorator indicating that parameter *old* of *func* is renamed to *new*.
+
+ The actual implementation of *func* should use *new*, not *old*. If *old*
+ is passed to *func*, a DeprecationWarning is emitted, and its value is
+ used, even if *new* is also passed by keyword (this is to simplify pyplot
+ wrapper functions, which always pass *new* explicitly to the Axes method).
+ If *new* is also passed but positionally, a TypeError will be raised by the
+ underlying function during argument binding.
+
+ Examples
+ --------
+ ::
+
+ @_api.rename_parameter("3.1", "bad_name", "good_name")
+ def func(good_name): ...
+ """
+
+ decorator = functools.partial(rename_parameter, since, old, new)
+
+ if func is None:
+ return decorator
+
+ signature = inspect.signature(func)
+ assert old not in signature.parameters, (
+ f"Matplotlib internal error: {old!r} cannot be a parameter for "
+ f"{func.__name__}()")
+ assert new in signature.parameters, (
+ f"Matplotlib internal error: {new!r} must be a parameter for "
+ f"{func.__name__}()")
+
+ @functools.wraps(func)
+ def wrapper(*args, **kwargs):
+ if old in kwargs:
+ warn_deprecated(
+ since, message=f"The {old!r} parameter of {func.__name__}() "
+ f"has been renamed {new!r} since Matplotlib {since}; support "
+ f"for the old name will be dropped in %(removal)s.")
+ kwargs[new] = kwargs.pop(old)
+ return func(*args, **kwargs)
+
+ # wrapper() must keep the same documented signature as func(): if we
+ # instead made both *old* and *new* appear in wrapper()'s signature, they
+ # would both show up in the pyplot function for an Axes method as well and
+ # pyplot would explicitly pass both arguments to the Axes method.
+
+ DECORATORS[wrapper] = decorator
+ return wrapper
+
+
+class _deprecated_parameter_class:
+ def __repr__(self):
+ return ""
+
+
+_deprecated_parameter = _deprecated_parameter_class()
+
+
+def delete_parameter(since, name, func=None, **kwargs):
+ """
+ Decorator indicating that parameter *name* of *func* is being deprecated.
+
+ The actual implementation of *func* should keep the *name* parameter in its
+ signature, or accept a ``**kwargs`` argument (through which *name* would be
+ passed).
+
+ Parameters that come after the deprecated parameter effectively become
+ keyword-only (as they cannot be passed positionally without triggering the
+ DeprecationWarning on the deprecated parameter), and should be marked as
+ such after the deprecation period has passed and the deprecated parameter
+ is removed.
+
+ Parameters other than *since*, *name*, and *func* are keyword-only and
+ forwarded to `.warn_deprecated`.
+
+ Examples
+ --------
+ ::
+
+ @_api.delete_parameter("3.1", "unused")
+ def func(used_arg, other_arg, unused, more_args): ...
+ """
+
+ decorator = functools.partial(delete_parameter, since, name, **kwargs)
+
+ if func is None:
+ return decorator
+
+ signature = inspect.signature(func)
+ # Name of `**kwargs` parameter of the decorated function, typically
+ # "kwargs" if such a parameter exists, or None if the decorated function
+ # doesn't accept `**kwargs`.
+ kwargs_name = next((param.name for param in signature.parameters.values()
+ if param.kind == inspect.Parameter.VAR_KEYWORD), None)
+ if name in signature.parameters:
+ kind = signature.parameters[name].kind
+ is_varargs = kind is inspect.Parameter.VAR_POSITIONAL
+ is_varkwargs = kind is inspect.Parameter.VAR_KEYWORD
+ if not is_varargs and not is_varkwargs:
+ name_idx = (
+ # Deprecated parameter can't be passed positionally.
+ math.inf if kind is inspect.Parameter.KEYWORD_ONLY
+ # If call site has no more than this number of parameters, the
+ # deprecated parameter can't have been passed positionally.
+ else [*signature.parameters].index(name))
+ func.__signature__ = signature = signature.replace(parameters=[
+ param.replace(default=_deprecated_parameter)
+ if param.name == name else param
+ for param in signature.parameters.values()])
+ else:
+ name_idx = -1 # Deprecated parameter can always have been passed.
+ else:
+ is_varargs = is_varkwargs = False
+ # Deprecated parameter can't be passed positionally.
+ name_idx = math.inf
+ assert kwargs_name, (
+ f"Matplotlib internal error: {name!r} must be a parameter for "
+ f"{func.__name__}()")
+
+ addendum = kwargs.pop('addendum', None)
+
+ @functools.wraps(func)
+ def wrapper(*inner_args, **inner_kwargs):
+ if len(inner_args) <= name_idx and name not in inner_kwargs:
+ # Early return in the simple, non-deprecated case (much faster than
+ # calling bind()).
+ return func(*inner_args, **inner_kwargs)
+ arguments = signature.bind(*inner_args, **inner_kwargs).arguments
+ if is_varargs and arguments.get(name):
+ warn_deprecated(
+ since, message=f"Additional positional arguments to "
+ f"{func.__name__}() are deprecated since %(since)s and "
+ f"support for them will be removed in %(removal)s.")
+ elif is_varkwargs and arguments.get(name):
+ warn_deprecated(
+ since, message=f"Additional keyword arguments to "
+ f"{func.__name__}() are deprecated since %(since)s and "
+ f"support for them will be removed in %(removal)s.")
+ # We cannot just check `name not in arguments` because the pyplot
+ # wrappers always pass all arguments explicitly.
+ elif any(name in d and d[name] != _deprecated_parameter
+ for d in [arguments, arguments.get(kwargs_name, {})]):
+ deprecation_addendum = (
+ f"If any parameter follows {name!r}, they should be passed as "
+ f"keyword, not positionally.")
+ warn_deprecated(
+ since,
+ name=repr(name),
+ obj_type=f"parameter of {func.__name__}()",
+ addendum=(addendum + " " + deprecation_addendum) if addendum
+ else deprecation_addendum,
+ **kwargs)
+ return func(*inner_args, **inner_kwargs)
+
+ DECORATORS[wrapper] = decorator
+ return wrapper
+
+
+def make_keyword_only(since, name, func=None):
+ """
+ Decorator indicating that passing parameter *name* (or any of the following
+ ones) positionally to *func* is being deprecated.
+
+ When used on a method that has a pyplot wrapper, this should be the
+ outermost decorator, so that :file:`boilerplate.py` can access the original
+ signature.
+ """
+
+ decorator = functools.partial(make_keyword_only, since, name)
+
+ if func is None:
+ return decorator
+
+ signature = inspect.signature(func)
+ POK = inspect.Parameter.POSITIONAL_OR_KEYWORD
+ KWO = inspect.Parameter.KEYWORD_ONLY
+ assert (name in signature.parameters
+ and signature.parameters[name].kind == POK), (
+ f"Matplotlib internal error: {name!r} must be a positional-or-keyword "
+ f"parameter for {func.__name__}(). If this error happens on a function with a "
+ f"pyplot wrapper, make sure make_keyword_only() is the outermost decorator.")
+ names = [*signature.parameters]
+ name_idx = names.index(name)
+ kwonly = [name for name in names[name_idx:]
+ if signature.parameters[name].kind == POK]
+
+ @functools.wraps(func)
+ def wrapper(*args, **kwargs):
+ # Don't use signature.bind here, as it would fail when stacked with
+ # rename_parameter and an "old" argument name is passed in
+ # (signature.bind would fail, but the actual call would succeed).
+ if len(args) > name_idx:
+ warn_deprecated(
+ since, message="Passing the %(name)s %(obj_type)s "
+ "positionally is deprecated since Matplotlib %(since)s; the "
+ "parameter will become keyword-only in %(removal)s.",
+ name=name, obj_type=f"parameter of {func.__name__}()")
+ return func(*args, **kwargs)
+
+ # Don't modify *func*'s signature, as boilerplate.py needs it.
+ wrapper.__signature__ = signature.replace(parameters=[
+ param.replace(kind=KWO) if param.name in kwonly else param
+ for param in signature.parameters.values()])
+ DECORATORS[wrapper] = decorator
+ return wrapper
+
+
+def deprecate_method_override(method, obj, *, allow_empty=False, **kwargs):
+ """
+ Return ``obj.method`` with a deprecation if it was overridden, else None.
+
+ Parameters
+ ----------
+ method
+ An unbound method, i.e. an expression of the form
+ ``Class.method_name``. Remember that within the body of a method, one
+ can always use ``__class__`` to refer to the class that is currently
+ being defined.
+ obj
+ Either an object of the class where *method* is defined, or a subclass
+ of that class.
+ allow_empty : bool, default: False
+ Whether to allow overrides by "empty" methods without emitting a
+ warning.
+ **kwargs
+ Additional parameters passed to `warn_deprecated` to generate the
+ deprecation warning; must at least include the "since" key.
+ """
+
+ def empty(): pass
+ def empty_with_docstring(): """doc"""
+
+ name = method.__name__
+ bound_child = getattr(obj, name)
+ bound_base = (
+ method # If obj is a class, then we need to use unbound methods.
+ if isinstance(bound_child, type(empty)) and isinstance(obj, type)
+ else method.__get__(obj))
+ if (bound_child != bound_base
+ and (not allow_empty
+ or (getattr(getattr(bound_child, "__code__", None),
+ "co_code", None)
+ not in [empty.__code__.co_code,
+ empty_with_docstring.__code__.co_code]))):
+ warn_deprecated(**{"name": name, "obj_type": "method", **kwargs})
+ return bound_child
+ return None
+
+
+@contextlib.contextmanager
+def suppress_matplotlib_deprecation_warning():
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore", MatplotlibDeprecationWarning)
+ yield
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/deprecation.pyi b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/deprecation.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e050290662d925fd68bd534881512e86db13a4bb
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/_api/deprecation.pyi
@@ -0,0 +1,75 @@
+from collections.abc import Callable
+import contextlib
+from typing import Any, Literal, ParamSpec, TypedDict, TypeVar, overload
+from typing_extensions import (
+ Unpack, # < Py 3.11
+)
+
+_P = ParamSpec("_P")
+_R = TypeVar("_R")
+_T = TypeVar("_T")
+
+class MatplotlibDeprecationWarning(DeprecationWarning): ...
+
+class DeprecationKwargs(TypedDict, total=False):
+ message: str
+ alternative: str
+ pending: bool
+ obj_type: str
+ addendum: str
+ removal: str | Literal[False]
+
+class NamedDeprecationKwargs(DeprecationKwargs, total=False):
+ name: str
+
+def warn_deprecated(since: str, **kwargs: Unpack[NamedDeprecationKwargs]) -> None: ...
+def deprecated(
+ since: str, **kwargs: Unpack[NamedDeprecationKwargs]
+) -> Callable[[_T], _T]: ...
+
+class deprecate_privatize_attribute(Any):
+ def __init__(self, since: str, **kwargs: Unpack[NamedDeprecationKwargs]): ...
+ def __set_name__(self, owner: type[object], name: str) -> None: ...
+
+DECORATORS: dict[Callable, Callable] = ...
+
+@overload
+def rename_parameter(
+ since: str, old: str, new: str, func: None = ...
+) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]: ...
+@overload
+def rename_parameter(
+ since: str, old: str, new: str, func: Callable[_P, _R]
+) -> Callable[_P, _R]: ...
+
+class _deprecated_parameter_class: ...
+
+_deprecated_parameter: _deprecated_parameter_class
+
+@overload
+def delete_parameter(
+ since: str, name: str, func: None = ..., **kwargs: Unpack[DeprecationKwargs]
+) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]: ...
+@overload
+def delete_parameter(
+ since: str, name: str, func: Callable[_P, _R], **kwargs: Unpack[DeprecationKwargs]
+) -> Callable[_P, _R]: ...
+@overload
+def make_keyword_only(
+ since: str, name: str, func: None = ...
+) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]: ...
+@overload
+def make_keyword_only(
+ since: str, name: str, func: Callable[_P, _R]
+) -> Callable[_P, _R]: ...
+def deprecate_method_override(
+ method: Callable[_P, _R],
+ obj: object | type,
+ *,
+ allow_empty: bool = ...,
+ since: str,
+ **kwargs: Unpack[NamedDeprecationKwargs]
+) -> Callable[_P, _R]: ...
+def suppress_matplotlib_deprecation_warning() -> (
+ contextlib.AbstractContextManager[None]
+): ...
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..cdc31f17aae693cd914528513f52776167d7d8d2
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/__init__.py
@@ -0,0 +1,18 @@
+from . import _base
+from ._axes import Axes
+
+# Backcompat.
+Subplot = Axes
+
+
+class _SubplotBaseMeta(type):
+ def __instancecheck__(self, obj):
+ return (isinstance(obj, _base._AxesBase)
+ and obj.get_subplotspec() is not None)
+
+
+class SubplotBase(metaclass=_SubplotBaseMeta):
+ pass
+
+
+def subplot_class_factory(cls): return cls
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/__init__.pyi b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/__init__.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..7df38b8bde9edc06720e08f41c245ab8d61fc091
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/__init__.pyi
@@ -0,0 +1,16 @@
+from typing import TypeVar
+
+from ._axes import Axes as Axes
+
+
+_T = TypeVar("_T")
+
+# Backcompat.
+Subplot = Axes
+
+class _SubplotBaseMeta(type):
+ def __instancecheck__(self, obj) -> bool: ...
+
+class SubplotBase(metaclass=_SubplotBaseMeta): ...
+
+def subplot_class_factory(cls: type[_T]) -> type[_T]: ...
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..fb287c85addb41d43e0c3888b253990c0e9678ce
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/__pycache__/_secondary_axes.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/__pycache__/_secondary_axes.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..bd199f2ff4b494c4aee6a3b9a0b925a81e8a4f27
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/__pycache__/_secondary_axes.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_axes.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_axes.py
new file mode 100644
index 0000000000000000000000000000000000000000..9d419430b088879b8d0ea439a341c88bc5c8ebc8
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_axes.py
@@ -0,0 +1,8871 @@
+import functools
+import itertools
+import logging
+import math
+from numbers import Integral, Number, Real
+
+import re
+import numpy as np
+
+import matplotlib as mpl
+import matplotlib.category # Register category unit converter as side effect.
+import matplotlib.cbook as cbook
+import matplotlib.collections as mcoll
+import matplotlib.colorizer as mcolorizer
+import matplotlib.colors as mcolors
+import matplotlib.contour as mcontour
+import matplotlib.dates # noqa: F401, Register date unit converter as side effect.
+import matplotlib.image as mimage
+import matplotlib.inset as minset
+import matplotlib.legend as mlegend
+import matplotlib.lines as mlines
+import matplotlib.markers as mmarkers
+import matplotlib.mlab as mlab
+import matplotlib.patches as mpatches
+import matplotlib.path as mpath
+import matplotlib.quiver as mquiver
+import matplotlib.stackplot as mstack
+import matplotlib.streamplot as mstream
+import matplotlib.table as mtable
+import matplotlib.text as mtext
+import matplotlib.ticker as mticker
+import matplotlib.transforms as mtransforms
+import matplotlib.tri as mtri
+import matplotlib.units as munits
+from matplotlib import _api, _docstring, _preprocess_data
+from matplotlib.axes._base import (
+ _AxesBase, _TransformedBoundsLocator, _process_plot_format)
+from matplotlib.axes._secondary_axes import SecondaryAxis
+from matplotlib.container import BarContainer, ErrorbarContainer, StemContainer
+from matplotlib.transforms import _ScaledRotation
+
+_log = logging.getLogger(__name__)
+
+
+# The axes module contains all the wrappers to plotting functions.
+# All the other methods should go in the _AxesBase class.
+
+
+def _make_axes_method(func):
+ """
+ Patch the qualname for functions that are directly added to Axes.
+
+ Some Axes functionality is defined in functions in other submodules.
+ These are simply added as attributes to Axes. As a result, their
+ ``__qualname__`` is e.g. only "table" and not "Axes.table". This
+ function fixes that.
+
+ Note that the function itself is patched, so that
+ ``matplotlib.table.table.__qualname__` will also show "Axes.table".
+ However, since these functions are not intended to be standalone,
+ this is bearable.
+ """
+ func.__qualname__ = f"Axes.{func.__name__}"
+ return func
+
+
+@_docstring.interpd
+class Axes(_AxesBase):
+ """
+ An Axes object encapsulates all the elements of an individual (sub-)plot in
+ a figure.
+
+ It contains most of the (sub-)plot elements: `~.axis.Axis`,
+ `~.axis.Tick`, `~.lines.Line2D`, `~.text.Text`, `~.patches.Polygon`, etc.,
+ and sets the coordinate system.
+
+ Like all visible elements in a figure, Axes is an `.Artist` subclass.
+
+ The `Axes` instance supports callbacks through a callbacks attribute which
+ is a `~.cbook.CallbackRegistry` instance. The events you can connect to
+ are 'xlim_changed' and 'ylim_changed' and the callback will be called with
+ func(*ax*) where *ax* is the `Axes` instance.
+
+ .. note::
+
+ As a user, you do not instantiate Axes directly, but use Axes creation
+ methods instead; e.g. from `.pyplot` or `.Figure`:
+ `~.pyplot.subplots`, `~.pyplot.subplot_mosaic` or `.Figure.add_axes`.
+
+ """
+ ### Labelling, legend and texts
+
+ def get_title(self, loc="center"):
+ """
+ Get an Axes title.
+
+ Get one of the three available Axes titles. The available titles
+ are positioned above the Axes in the center, flush with the left
+ edge, and flush with the right edge.
+
+ Parameters
+ ----------
+ loc : {'center', 'left', 'right'}, str, default: 'center'
+ Which title to return.
+
+ Returns
+ -------
+ str
+ The title text string.
+
+ """
+ titles = {'left': self._left_title,
+ 'center': self.title,
+ 'right': self._right_title}
+ title = _api.check_getitem(titles, loc=loc.lower())
+ return title.get_text()
+
+ def set_title(self, label, fontdict=None, loc=None, pad=None, *, y=None,
+ **kwargs):
+ """
+ Set a title for the Axes.
+
+ Set one of the three available Axes titles. The available titles
+ are positioned above the Axes in the center, flush with the left
+ edge, and flush with the right edge.
+
+ Parameters
+ ----------
+ label : str
+ Text to use for the title
+
+ fontdict : dict
+
+ .. admonition:: Discouraged
+
+ The use of *fontdict* is discouraged. Parameters should be passed as
+ individual keyword arguments or using dictionary-unpacking
+ ``set_title(..., **fontdict)``.
+
+ A dictionary controlling the appearance of the title text,
+ the default *fontdict* is::
+
+ {'fontsize': rcParams['axes.titlesize'],
+ 'fontweight': rcParams['axes.titleweight'],
+ 'color': rcParams['axes.titlecolor'],
+ 'verticalalignment': 'baseline',
+ 'horizontalalignment': loc}
+
+ loc : {'center', 'left', 'right'}, default: :rc:`axes.titlelocation`
+ Which title to set.
+
+ y : float, default: :rc:`axes.titley`
+ Vertical Axes location for the title (1.0 is the top). If
+ None (the default) and :rc:`axes.titley` is also None, y is
+ determined automatically to avoid decorators on the Axes.
+
+ pad : float, default: :rc:`axes.titlepad`
+ The offset of the title from the top of the Axes, in points.
+
+ Returns
+ -------
+ `.Text`
+ The matplotlib text instance representing the title
+
+ Other Parameters
+ ----------------
+ **kwargs : `~matplotlib.text.Text` properties
+ Other keyword arguments are text properties, see `.Text` for a list
+ of valid text properties.
+ """
+ if loc is None:
+ loc = mpl.rcParams['axes.titlelocation']
+
+ if y is None:
+ y = mpl.rcParams['axes.titley']
+ if y is None:
+ y = 1.0
+ else:
+ self._autotitlepos = False
+ kwargs['y'] = y
+
+ titles = {'left': self._left_title,
+ 'center': self.title,
+ 'right': self._right_title}
+ title = _api.check_getitem(titles, loc=loc.lower())
+ default = {
+ 'fontsize': mpl.rcParams['axes.titlesize'],
+ 'fontweight': mpl.rcParams['axes.titleweight'],
+ 'verticalalignment': 'baseline',
+ 'horizontalalignment': loc.lower()}
+ titlecolor = mpl.rcParams['axes.titlecolor']
+ if not cbook._str_lower_equal(titlecolor, 'auto'):
+ default["color"] = titlecolor
+ if pad is None:
+ pad = mpl.rcParams['axes.titlepad']
+ self._set_title_offset_trans(float(pad))
+ title.set_text(label)
+ title.update(default)
+ if fontdict is not None:
+ title.update(fontdict)
+ title._internal_update(kwargs)
+ return title
+
+ def get_legend_handles_labels(self, legend_handler_map=None):
+ """
+ Return handles and labels for legend
+
+ ``ax.legend()`` is equivalent to ::
+
+ h, l = ax.get_legend_handles_labels()
+ ax.legend(h, l)
+ """
+ # pass through to legend.
+ handles, labels = mlegend._get_legend_handles_labels(
+ [self], legend_handler_map)
+ return handles, labels
+
+ @_docstring.interpd
+ def legend(self, *args, **kwargs):
+ """
+ Place a legend on the Axes.
+
+ Call signatures::
+
+ legend()
+ legend(handles, labels)
+ legend(handles=handles)
+ legend(labels)
+
+ The call signatures correspond to the following different ways to use
+ this method:
+
+ **1. Automatic detection of elements to be shown in the legend**
+
+ The elements to be added to the legend are automatically determined,
+ when you do not pass in any extra arguments.
+
+ In this case, the labels are taken from the artist. You can specify
+ them either at artist creation or by calling the
+ :meth:`~.Artist.set_label` method on the artist::
+
+ ax.plot([1, 2, 3], label='Inline label')
+ ax.legend()
+
+ or::
+
+ line, = ax.plot([1, 2, 3])
+ line.set_label('Label via method')
+ ax.legend()
+
+ .. note::
+ Specific artists can be excluded from the automatic legend element
+ selection by using a label starting with an underscore, "_".
+ A string starting with an underscore is the default label for all
+ artists, so calling `.Axes.legend` without any arguments and
+ without setting the labels manually will result in a ``UserWarning``
+ and an empty legend being drawn.
+
+
+ **2. Explicitly listing the artists and labels in the legend**
+
+ For full control of which artists have a legend entry, it is possible
+ to pass an iterable of legend artists followed by an iterable of
+ legend labels respectively::
+
+ ax.legend([line1, line2, line3], ['label1', 'label2', 'label3'])
+
+
+ **3. Explicitly listing the artists in the legend**
+
+ This is similar to 2, but the labels are taken from the artists'
+ label properties. Example::
+
+ line1, = ax.plot([1, 2, 3], label='label1')
+ line2, = ax.plot([1, 2, 3], label='label2')
+ ax.legend(handles=[line1, line2])
+
+
+ **4. Labeling existing plot elements**
+
+ .. admonition:: Discouraged
+
+ This call signature is discouraged, because the relation between
+ plot elements and labels is only implicit by their order and can
+ easily be mixed up.
+
+ To make a legend for all artists on an Axes, call this function with
+ an iterable of strings, one for each legend item. For example::
+
+ ax.plot([1, 2, 3])
+ ax.plot([5, 6, 7])
+ ax.legend(['First line', 'Second line'])
+
+
+ Parameters
+ ----------
+ handles : list of (`.Artist` or tuple of `.Artist`), optional
+ A list of Artists (lines, patches) to be added to the legend.
+ Use this together with *labels*, if you need full control on what
+ is shown in the legend and the automatic mechanism described above
+ is not sufficient.
+
+ The length of handles and labels should be the same in this
+ case. If they are not, they are truncated to the smaller length.
+
+ If an entry contains a tuple, then the legend handler for all Artists in the
+ tuple will be placed alongside a single label.
+
+ labels : list of str, optional
+ A list of labels to show next to the artists.
+ Use this together with *handles*, if you need full control on what
+ is shown in the legend and the automatic mechanism described above
+ is not sufficient.
+
+ Returns
+ -------
+ `~matplotlib.legend.Legend`
+
+ Other Parameters
+ ----------------
+ %(_legend_kw_axes)s
+
+ See Also
+ --------
+ .Figure.legend
+
+ Notes
+ -----
+ Some artists are not supported by this function. See
+ :ref:`legend_guide` for details.
+
+ Examples
+ --------
+ .. plot:: gallery/text_labels_and_annotations/legend.py
+ """
+ handles, labels, kwargs = mlegend._parse_legend_args([self], *args, **kwargs)
+ self.legend_ = mlegend.Legend(self, handles, labels, **kwargs)
+ self.legend_._remove_method = self._remove_legend
+ return self.legend_
+
+ def _remove_legend(self, legend):
+ self.legend_ = None
+
+ def inset_axes(self, bounds, *, transform=None, zorder=5, **kwargs):
+ """
+ Add a child inset Axes to this existing Axes.
+
+
+ Parameters
+ ----------
+ bounds : [x0, y0, width, height]
+ Lower-left corner of inset Axes, and its width and height.
+
+ transform : `.Transform`
+ Defaults to `ax.transAxes`, i.e. the units of *rect* are in
+ Axes-relative coordinates.
+
+ projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', \
+'polar', 'rectilinear', str}, optional
+ The projection type of the inset `~.axes.Axes`. *str* is the name
+ of a custom projection, see `~matplotlib.projections`. The default
+ None results in a 'rectilinear' projection.
+
+ polar : bool, default: False
+ If True, equivalent to projection='polar'.
+
+ axes_class : subclass type of `~.axes.Axes`, optional
+ The `.axes.Axes` subclass that is instantiated. This parameter
+ is incompatible with *projection* and *polar*. See
+ :ref:`axisartist_users-guide-index` for examples.
+
+ zorder : number
+ Defaults to 5 (same as `.Axes.legend`). Adjust higher or lower
+ to change whether it is above or below data plotted on the
+ parent Axes.
+
+ **kwargs
+ Other keyword arguments are passed on to the inset Axes class.
+
+ Returns
+ -------
+ ax
+ The created `~.axes.Axes` instance.
+
+ Examples
+ --------
+ This example makes two inset Axes, the first is in Axes-relative
+ coordinates, and the second in data-coordinates::
+
+ fig, ax = plt.subplots()
+ ax.plot(range(10))
+ axin1 = ax.inset_axes([0.8, 0.1, 0.15, 0.15])
+ axin2 = ax.inset_axes(
+ [5, 7, 2.3, 2.3], transform=ax.transData)
+
+ """
+ if transform is None:
+ transform = self.transAxes
+ kwargs.setdefault('label', 'inset_axes')
+
+ # This puts the rectangle into figure-relative coordinates.
+ inset_locator = _TransformedBoundsLocator(bounds, transform)
+ bounds = inset_locator(self, None).bounds
+ fig = self.get_figure(root=False)
+ projection_class, pkw = fig._process_projection_requirements(**kwargs)
+ inset_ax = projection_class(fig, bounds, zorder=zorder, **pkw)
+
+ # this locator lets the axes move if in data coordinates.
+ # it gets called in `ax.apply_aspect() (of all places)
+ inset_ax.set_axes_locator(inset_locator)
+
+ self.add_child_axes(inset_ax)
+
+ return inset_ax
+
+ @_docstring.interpd
+ def indicate_inset(self, bounds=None, inset_ax=None, *, transform=None,
+ facecolor='none', edgecolor='0.5', alpha=0.5,
+ zorder=None, **kwargs):
+ """
+ Add an inset indicator to the Axes. This is a rectangle on the plot
+ at the position indicated by *bounds* that optionally has lines that
+ connect the rectangle to an inset Axes (`.Axes.inset_axes`).
+
+ Warnings
+ --------
+ This method is experimental as of 3.0, and the API may change.
+
+ Parameters
+ ----------
+ bounds : [x0, y0, width, height], optional
+ Lower-left corner of rectangle to be marked, and its width
+ and height. If not set, the bounds will be calculated from the
+ data limits of *inset_ax*, which must be supplied.
+
+ inset_ax : `.Axes`, optional
+ An optional inset Axes to draw connecting lines to. Two lines are
+ drawn connecting the indicator box to the inset Axes on corners
+ chosen so as to not overlap with the indicator box.
+
+ transform : `.Transform`
+ Transform for the rectangle coordinates. Defaults to
+ ``ax.transAxes``, i.e. the units of *rect* are in Axes-relative
+ coordinates.
+
+ facecolor : :mpltype:`color`, default: 'none'
+ Facecolor of the rectangle.
+
+ edgecolor : :mpltype:`color`, default: '0.5'
+ Color of the rectangle and color of the connecting lines.
+
+ alpha : float or None, default: 0.5
+ Transparency of the rectangle and connector lines. If not
+ ``None``, this overrides any alpha value included in the
+ *facecolor* and *edgecolor* parameters.
+
+ zorder : float, default: 4.99
+ Drawing order of the rectangle and connector lines. The default,
+ 4.99, is just below the default level of inset Axes.
+
+ **kwargs
+ Other keyword arguments are passed on to the `.Rectangle` patch:
+
+ %(Rectangle:kwdoc)s
+
+ Returns
+ -------
+ inset_indicator : `.inset.InsetIndicator`
+ An artist which contains
+
+ inset_indicator.rectangle : `.Rectangle`
+ The indicator frame.
+
+ inset_indicator.connectors : 4-tuple of `.patches.ConnectionPatch`
+ The four connector lines connecting to (lower_left, upper_left,
+ lower_right upper_right) corners of *inset_ax*. Two lines are
+ set with visibility to *False*, but the user can set the
+ visibility to True if the automatic choice is not deemed correct.
+
+ .. versionchanged:: 3.10
+ Previously the rectangle and connectors tuple were returned.
+ """
+ # to make the Axes connectors work, we need to apply the aspect to
+ # the parent Axes.
+ self.apply_aspect()
+
+ if transform is None:
+ transform = self.transData
+ kwargs.setdefault('label', '_indicate_inset')
+
+ indicator_patch = minset.InsetIndicator(
+ bounds, inset_ax=inset_ax,
+ facecolor=facecolor, edgecolor=edgecolor, alpha=alpha,
+ zorder=zorder, transform=transform, **kwargs)
+ self.add_artist(indicator_patch)
+
+ return indicator_patch
+
+ def indicate_inset_zoom(self, inset_ax, **kwargs):
+ """
+ Add an inset indicator rectangle to the Axes based on the axis
+ limits for an *inset_ax* and draw connectors between *inset_ax*
+ and the rectangle.
+
+ Warnings
+ --------
+ This method is experimental as of 3.0, and the API may change.
+
+ Parameters
+ ----------
+ inset_ax : `.Axes`
+ Inset Axes to draw connecting lines to. Two lines are
+ drawn connecting the indicator box to the inset Axes on corners
+ chosen so as to not overlap with the indicator box.
+
+ **kwargs
+ Other keyword arguments are passed on to `.Axes.indicate_inset`
+
+ Returns
+ -------
+ inset_indicator : `.inset.InsetIndicator`
+ An artist which contains
+
+ inset_indicator.rectangle : `.Rectangle`
+ The indicator frame.
+
+ inset_indicator.connectors : 4-tuple of `.patches.ConnectionPatch`
+ The four connector lines connecting to (lower_left, upper_left,
+ lower_right upper_right) corners of *inset_ax*. Two lines are
+ set with visibility to *False*, but the user can set the
+ visibility to True if the automatic choice is not deemed correct.
+
+ .. versionchanged:: 3.10
+ Previously the rectangle and connectors tuple were returned.
+ """
+
+ return self.indicate_inset(None, inset_ax, **kwargs)
+
+ @_docstring.interpd
+ def secondary_xaxis(self, location, functions=None, *, transform=None, **kwargs):
+ """
+ Add a second x-axis to this `~.axes.Axes`.
+
+ For example if we want to have a second scale for the data plotted on
+ the xaxis.
+
+ %(_secax_docstring)s
+
+ Examples
+ --------
+ The main axis shows frequency, and the secondary axis shows period.
+
+ .. plot::
+
+ fig, ax = plt.subplots()
+ ax.loglog(range(1, 360, 5), range(1, 360, 5))
+ ax.set_xlabel('frequency [Hz]')
+
+ def invert(x):
+ # 1/x with special treatment of x == 0
+ x = np.array(x).astype(float)
+ near_zero = np.isclose(x, 0)
+ x[near_zero] = np.inf
+ x[~near_zero] = 1 / x[~near_zero]
+ return x
+
+ # the inverse of 1/x is itself
+ secax = ax.secondary_xaxis('top', functions=(invert, invert))
+ secax.set_xlabel('Period [s]')
+ plt.show()
+
+ To add a secondary axis relative to your data, you can pass a transform
+ to the new axis.
+
+ .. plot::
+
+ fig, ax = plt.subplots()
+ ax.plot(range(0, 5), range(-1, 4))
+
+ # Pass 'ax.transData' as a transform to place the axis
+ # relative to your data at y=0
+ secax = ax.secondary_xaxis(0, transform=ax.transData)
+ """
+ if not (location in ['top', 'bottom'] or isinstance(location, Real)):
+ raise ValueError('secondary_xaxis location must be either '
+ 'a float or "top"/"bottom"')
+
+ secondary_ax = SecondaryAxis(self, 'x', location, functions,
+ transform, **kwargs)
+ self.add_child_axes(secondary_ax)
+ return secondary_ax
+
+ @_docstring.interpd
+ def secondary_yaxis(self, location, functions=None, *, transform=None, **kwargs):
+ """
+ Add a second y-axis to this `~.axes.Axes`.
+
+ For example if we want to have a second scale for the data plotted on
+ the yaxis.
+
+ %(_secax_docstring)s
+
+ Examples
+ --------
+ Add a secondary Axes that converts from radians to degrees
+
+ .. plot::
+
+ fig, ax = plt.subplots()
+ ax.plot(range(1, 360, 5), range(1, 360, 5))
+ ax.set_ylabel('degrees')
+ secax = ax.secondary_yaxis('right', functions=(np.deg2rad,
+ np.rad2deg))
+ secax.set_ylabel('radians')
+
+ To add a secondary axis relative to your data, you can pass a transform
+ to the new axis.
+
+ .. plot::
+
+ fig, ax = plt.subplots()
+ ax.plot(range(0, 5), range(-1, 4))
+
+ # Pass 'ax.transData' as a transform to place the axis
+ # relative to your data at x=3
+ secax = ax.secondary_yaxis(3, transform=ax.transData)
+ """
+ if not (location in ['left', 'right'] or isinstance(location, Real)):
+ raise ValueError('secondary_yaxis location must be either '
+ 'a float or "left"/"right"')
+
+ secondary_ax = SecondaryAxis(self, 'y', location, functions,
+ transform, **kwargs)
+ self.add_child_axes(secondary_ax)
+ return secondary_ax
+
+ @_docstring.interpd
+ def text(self, x, y, s, fontdict=None, **kwargs):
+ """
+ Add text to the Axes.
+
+ Add the text *s* to the Axes at location *x*, *y* in data coordinates,
+ with a default ``horizontalalignment`` on the ``left`` and
+ ``verticalalignment`` at the ``baseline``. See
+ :doc:`/gallery/text_labels_and_annotations/text_alignment`.
+
+ Parameters
+ ----------
+ x, y : float
+ The position to place the text. By default, this is in data
+ coordinates. The coordinate system can be changed using the
+ *transform* parameter.
+
+ s : str
+ The text.
+
+ fontdict : dict, default: None
+
+ .. admonition:: Discouraged
+
+ The use of *fontdict* is discouraged. Parameters should be passed as
+ individual keyword arguments or using dictionary-unpacking
+ ``text(..., **fontdict)``.
+
+ A dictionary to override the default text properties. If fontdict
+ is None, the defaults are determined by `.rcParams`.
+
+ Returns
+ -------
+ `.Text`
+ The created `.Text` instance.
+
+ Other Parameters
+ ----------------
+ **kwargs : `~matplotlib.text.Text` properties.
+ Other miscellaneous text parameters.
+
+ %(Text:kwdoc)s
+
+ Examples
+ --------
+ Individual keyword arguments can be used to override any given
+ parameter::
+
+ >>> text(x, y, s, fontsize=12)
+
+ The default transform specifies that text is in data coords,
+ alternatively, you can specify text in axis coords ((0, 0) is
+ lower-left and (1, 1) is upper-right). The example below places
+ text in the center of the Axes::
+
+ >>> text(0.5, 0.5, 'matplotlib', horizontalalignment='center',
+ ... verticalalignment='center', transform=ax.transAxes)
+
+ You can put a rectangular box around the text instance (e.g., to
+ set a background color) by using the keyword *bbox*. *bbox* is
+ a dictionary of `~matplotlib.patches.Rectangle`
+ properties. For example::
+
+ >>> text(x, y, s, bbox=dict(facecolor='red', alpha=0.5))
+ """
+ effective_kwargs = {
+ 'verticalalignment': 'baseline',
+ 'horizontalalignment': 'left',
+ 'transform': self.transData,
+ 'clip_on': False,
+ **(fontdict if fontdict is not None else {}),
+ **kwargs,
+ }
+ t = mtext.Text(x, y, text=s, **effective_kwargs)
+ if t.get_clip_path() is None:
+ t.set_clip_path(self.patch)
+ self._add_text(t)
+ return t
+
+ @_docstring.interpd
+ def annotate(self, text, xy, xytext=None, xycoords='data', textcoords=None,
+ arrowprops=None, annotation_clip=None, **kwargs):
+ # Signature must match Annotation. This is verified in
+ # test_annotate_signature().
+ a = mtext.Annotation(text, xy, xytext=xytext, xycoords=xycoords,
+ textcoords=textcoords, arrowprops=arrowprops,
+ annotation_clip=annotation_clip, **kwargs)
+ a.set_transform(mtransforms.IdentityTransform())
+ if kwargs.get('clip_on', False) and a.get_clip_path() is None:
+ a.set_clip_path(self.patch)
+ self._add_text(a)
+ return a
+ annotate.__doc__ = mtext.Annotation.__init__.__doc__
+ #### Lines and spans
+
+ @_docstring.interpd
+ def axhline(self, y=0, xmin=0, xmax=1, **kwargs):
+ """
+ Add a horizontal line spanning the whole or fraction of the Axes.
+
+ Note: If you want to set x-limits in data coordinates, use
+ `~.Axes.hlines` instead.
+
+ Parameters
+ ----------
+ y : float, default: 0
+ y position in :ref:`data coordinates `.
+
+ xmin : float, default: 0
+ The start x-position in :ref:`axes coordinates `.
+ Should be between 0 and 1, 0 being the far left of the plot,
+ 1 the far right of the plot.
+
+ xmax : float, default: 1
+ The end x-position in :ref:`axes coordinates `.
+ Should be between 0 and 1, 0 being the far left of the plot,
+ 1 the far right of the plot.
+
+ Returns
+ -------
+ `~matplotlib.lines.Line2D`
+ A `.Line2D` specified via two points ``(xmin, y)``, ``(xmax, y)``.
+ Its transform is set such that *x* is in
+ :ref:`axes coordinates ` and *y* is in
+ :ref:`data coordinates `.
+
+ This is still a generic line and the horizontal character is only
+ realized through using identical *y* values for both points. Thus,
+ if you want to change the *y* value later, you have to provide two
+ values ``line.set_ydata([3, 3])``.
+
+ Other Parameters
+ ----------------
+ **kwargs
+ Valid keyword arguments are `.Line2D` properties, except for
+ 'transform':
+
+ %(Line2D:kwdoc)s
+
+ See Also
+ --------
+ hlines : Add horizontal lines in data coordinates.
+ axhspan : Add a horizontal span (rectangle) across the axis.
+ axline : Add a line with an arbitrary slope.
+
+ Examples
+ --------
+ * draw a thick red hline at 'y' = 0 that spans the xrange::
+
+ >>> axhline(linewidth=4, color='r')
+
+ * draw a default hline at 'y' = 1 that spans the xrange::
+
+ >>> axhline(y=1)
+
+ * draw a default hline at 'y' = .5 that spans the middle half of
+ the xrange::
+
+ >>> axhline(y=.5, xmin=0.25, xmax=0.75)
+ """
+ self._check_no_units([xmin, xmax], ['xmin', 'xmax'])
+ if "transform" in kwargs:
+ raise ValueError("'transform' is not allowed as a keyword "
+ "argument; axhline generates its own transform.")
+ ymin, ymax = self.get_ybound()
+
+ # Strip away the units for comparison with non-unitized bounds.
+ yy, = self._process_unit_info([("y", y)], kwargs)
+ scaley = (yy < ymin) or (yy > ymax)
+
+ trans = self.get_yaxis_transform(which='grid')
+ l = mlines.Line2D([xmin, xmax], [y, y], transform=trans, **kwargs)
+ self.add_line(l)
+ l.get_path()._interpolation_steps = mpl.axis.GRIDLINE_INTERPOLATION_STEPS
+ if scaley:
+ self._request_autoscale_view("y")
+ return l
+
+ @_docstring.interpd
+ def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
+ """
+ Add a vertical line spanning the whole or fraction of the Axes.
+
+ Note: If you want to set y-limits in data coordinates, use
+ `~.Axes.vlines` instead.
+
+ Parameters
+ ----------
+ x : float, default: 0
+ x position in :ref:`data coordinates `.
+
+ ymin : float, default: 0
+ The start y-position in :ref:`axes coordinates `.
+ Should be between 0 and 1, 0 being the bottom of the plot, 1 the
+ top of the plot.
+
+ ymax : float, default: 1
+ The end y-position in :ref:`axes coordinates `.
+ Should be between 0 and 1, 0 being the bottom of the plot, 1 the
+ top of the plot.
+
+ Returns
+ -------
+ `~matplotlib.lines.Line2D`
+ A `.Line2D` specified via two points ``(x, ymin)``, ``(x, ymax)``.
+ Its transform is set such that *x* is in
+ :ref:`data coordinates ` and *y* is in
+ :ref:`axes coordinates `.
+
+ This is still a generic line and the vertical character is only
+ realized through using identical *x* values for both points. Thus,
+ if you want to change the *x* value later, you have to provide two
+ values ``line.set_xdata([3, 3])``.
+
+ Other Parameters
+ ----------------
+ **kwargs
+ Valid keyword arguments are `.Line2D` properties, except for
+ 'transform':
+
+ %(Line2D:kwdoc)s
+
+ See Also
+ --------
+ vlines : Add vertical lines in data coordinates.
+ axvspan : Add a vertical span (rectangle) across the axis.
+ axline : Add a line with an arbitrary slope.
+
+ Examples
+ --------
+ * draw a thick red vline at *x* = 0 that spans the yrange::
+
+ >>> axvline(linewidth=4, color='r')
+
+ * draw a default vline at *x* = 1 that spans the yrange::
+
+ >>> axvline(x=1)
+
+ * draw a default vline at *x* = .5 that spans the middle half of
+ the yrange::
+
+ >>> axvline(x=.5, ymin=0.25, ymax=0.75)
+ """
+ self._check_no_units([ymin, ymax], ['ymin', 'ymax'])
+ if "transform" in kwargs:
+ raise ValueError("'transform' is not allowed as a keyword "
+ "argument; axvline generates its own transform.")
+ xmin, xmax = self.get_xbound()
+
+ # Strip away the units for comparison with non-unitized bounds.
+ xx, = self._process_unit_info([("x", x)], kwargs)
+ scalex = (xx < xmin) or (xx > xmax)
+
+ trans = self.get_xaxis_transform(which='grid')
+ l = mlines.Line2D([x, x], [ymin, ymax], transform=trans, **kwargs)
+ self.add_line(l)
+ l.get_path()._interpolation_steps = mpl.axis.GRIDLINE_INTERPOLATION_STEPS
+ if scalex:
+ self._request_autoscale_view("x")
+ return l
+
+ @staticmethod
+ def _check_no_units(vals, names):
+ # Helper method to check that vals are not unitized
+ for val, name in zip(vals, names):
+ if not munits._is_natively_supported(val):
+ raise ValueError(f"{name} must be a single scalar value, "
+ f"but got {val}")
+
+ @_docstring.interpd
+ def axline(self, xy1, xy2=None, *, slope=None, **kwargs):
+ """
+ Add an infinitely long straight line.
+
+ The line can be defined either by two points *xy1* and *xy2*, or
+ by one point *xy1* and a *slope*.
+
+ This draws a straight line "on the screen", regardless of the x and y
+ scales, and is thus also suitable for drawing exponential decays in
+ semilog plots, power laws in loglog plots, etc. However, *slope*
+ should only be used with linear scales; It has no clear meaning for
+ all other scales, and thus the behavior is undefined. Please specify
+ the line using the points *xy1*, *xy2* for non-linear scales.
+
+ The *transform* keyword argument only applies to the points *xy1*,
+ *xy2*. The *slope* (if given) is always in data coordinates. This can
+ be used e.g. with ``ax.transAxes`` for drawing grid lines with a fixed
+ slope.
+
+ Parameters
+ ----------
+ xy1, xy2 : (float, float)
+ Points for the line to pass through.
+ Either *xy2* or *slope* has to be given.
+ slope : float, optional
+ The slope of the line. Either *xy2* or *slope* has to be given.
+
+ Returns
+ -------
+ `.AxLine`
+
+ Other Parameters
+ ----------------
+ **kwargs
+ Valid kwargs are `.Line2D` properties
+
+ %(Line2D:kwdoc)s
+
+ See Also
+ --------
+ axhline : for horizontal lines
+ axvline : for vertical lines
+
+ Examples
+ --------
+ Draw a thick red line passing through (0, 0) and (1, 1)::
+
+ >>> axline((0, 0), (1, 1), linewidth=4, color='r')
+ """
+ if slope is not None and (self.get_xscale() != 'linear' or
+ self.get_yscale() != 'linear'):
+ raise TypeError("'slope' cannot be used with non-linear scales")
+
+ datalim = [xy1] if xy2 is None else [xy1, xy2]
+ if "transform" in kwargs:
+ # if a transform is passed (i.e. line points not in data space),
+ # data limits should not be adjusted.
+ datalim = []
+
+ line = mlines.AxLine(xy1, xy2, slope, **kwargs)
+ # Like add_line, but correctly handling data limits.
+ self._set_artist_props(line)
+ if line.get_clip_path() is None:
+ line.set_clip_path(self.patch)
+ if not line.get_label():
+ line.set_label(f"_child{len(self._children)}")
+ self._children.append(line)
+ line._remove_method = self._children.remove
+ self.update_datalim(datalim)
+
+ self._request_autoscale_view()
+ return line
+
+ @_docstring.interpd
+ def axhspan(self, ymin, ymax, xmin=0, xmax=1, **kwargs):
+ """
+ Add a horizontal span (rectangle) across the Axes.
+
+ The rectangle spans from *ymin* to *ymax* vertically, and, by default,
+ the whole x-axis horizontally. The x-span can be set using *xmin*
+ (default: 0) and *xmax* (default: 1) which are in axis units; e.g.
+ ``xmin = 0.5`` always refers to the middle of the x-axis regardless of
+ the limits set by `~.Axes.set_xlim`.
+
+ Parameters
+ ----------
+ ymin : float
+ Lower y-coordinate of the span, in data units.
+ ymax : float
+ Upper y-coordinate of the span, in data units.
+ xmin : float, default: 0
+ Lower x-coordinate of the span, in x-axis (0-1) units.
+ xmax : float, default: 1
+ Upper x-coordinate of the span, in x-axis (0-1) units.
+
+ Returns
+ -------
+ `~matplotlib.patches.Rectangle`
+ Horizontal span (rectangle) from (xmin, ymin) to (xmax, ymax).
+
+ Other Parameters
+ ----------------
+ **kwargs : `~matplotlib.patches.Rectangle` properties
+
+ %(Rectangle:kwdoc)s
+
+ See Also
+ --------
+ axvspan : Add a vertical span across the Axes.
+ """
+ # Strip units away.
+ self._check_no_units([xmin, xmax], ['xmin', 'xmax'])
+ (ymin, ymax), = self._process_unit_info([("y", [ymin, ymax])], kwargs)
+
+ p = mpatches.Rectangle((xmin, ymin), xmax - xmin, ymax - ymin, **kwargs)
+ p.set_transform(self.get_yaxis_transform(which="grid"))
+ # For Rectangles and non-separable transforms, add_patch can be buggy
+ # and update the x limits even though it shouldn't do so for an
+ # yaxis_transformed patch, so undo that update.
+ ix = self.dataLim.intervalx.copy()
+ mx = self.dataLim.minposx
+ self.add_patch(p)
+ self.dataLim.intervalx = ix
+ self.dataLim.minposx = mx
+ p.get_path()._interpolation_steps = mpl.axis.GRIDLINE_INTERPOLATION_STEPS
+ self._request_autoscale_view("y")
+ return p
+
+ @_docstring.interpd
+ def axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs):
+ """
+ Add a vertical span (rectangle) across the Axes.
+
+ The rectangle spans from *xmin* to *xmax* horizontally, and, by
+ default, the whole y-axis vertically. The y-span can be set using
+ *ymin* (default: 0) and *ymax* (default: 1) which are in axis units;
+ e.g. ``ymin = 0.5`` always refers to the middle of the y-axis
+ regardless of the limits set by `~.Axes.set_ylim`.
+
+ Parameters
+ ----------
+ xmin : float
+ Lower x-coordinate of the span, in data units.
+ xmax : float
+ Upper x-coordinate of the span, in data units.
+ ymin : float, default: 0
+ Lower y-coordinate of the span, in y-axis units (0-1).
+ ymax : float, default: 1
+ Upper y-coordinate of the span, in y-axis units (0-1).
+
+ Returns
+ -------
+ `~matplotlib.patches.Rectangle`
+ Vertical span (rectangle) from (xmin, ymin) to (xmax, ymax).
+
+ Other Parameters
+ ----------------
+ **kwargs : `~matplotlib.patches.Rectangle` properties
+
+ %(Rectangle:kwdoc)s
+
+ See Also
+ --------
+ axhspan : Add a horizontal span across the Axes.
+
+ Examples
+ --------
+ Draw a vertical, green, translucent rectangle from x = 1.25 to
+ x = 1.55 that spans the yrange of the Axes.
+
+ >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
+
+ """
+ # Strip units away.
+ self._check_no_units([ymin, ymax], ['ymin', 'ymax'])
+ (xmin, xmax), = self._process_unit_info([("x", [xmin, xmax])], kwargs)
+
+ p = mpatches.Rectangle((xmin, ymin), xmax - xmin, ymax - ymin, **kwargs)
+ p.set_transform(self.get_xaxis_transform(which="grid"))
+ # For Rectangles and non-separable transforms, add_patch can be buggy
+ # and update the y limits even though it shouldn't do so for an
+ # xaxis_transformed patch, so undo that update.
+ iy = self.dataLim.intervaly.copy()
+ my = self.dataLim.minposy
+ self.add_patch(p)
+ self.dataLim.intervaly = iy
+ self.dataLim.minposy = my
+ p.get_path()._interpolation_steps = mpl.axis.GRIDLINE_INTERPOLATION_STEPS
+ self._request_autoscale_view("x")
+ return p
+
+ @_api.make_keyword_only("3.10", "label")
+ @_preprocess_data(replace_names=["y", "xmin", "xmax", "colors"],
+ label_namer="y")
+ def hlines(self, y, xmin, xmax, colors=None, linestyles='solid',
+ label='', **kwargs):
+ """
+ Plot horizontal lines at each *y* from *xmin* to *xmax*.
+
+ Parameters
+ ----------
+ y : float or array-like
+ y-indexes where to plot the lines.
+
+ xmin, xmax : float or array-like
+ Respective beginning and end of each line. If scalars are
+ provided, all lines will have the same length.
+
+ colors : :mpltype:`color` or list of color , default: :rc:`lines.color`
+
+ linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid'
+
+ label : str, default: ''
+
+ Returns
+ -------
+ `~matplotlib.collections.LineCollection`
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+ **kwargs : `~matplotlib.collections.LineCollection` properties.
+
+ See Also
+ --------
+ vlines : vertical lines
+ axhline : horizontal line across the Axes
+ """
+
+ # We do the conversion first since not all unitized data is uniform
+ xmin, xmax, y = self._process_unit_info(
+ [("x", xmin), ("x", xmax), ("y", y)], kwargs)
+
+ if not np.iterable(y):
+ y = [y]
+ if not np.iterable(xmin):
+ xmin = [xmin]
+ if not np.iterable(xmax):
+ xmax = [xmax]
+
+ # Create and combine masked_arrays from input
+ y, xmin, xmax = cbook._combine_masks(y, xmin, xmax)
+ y = np.ravel(y)
+ xmin = np.ravel(xmin)
+ xmax = np.ravel(xmax)
+
+ masked_verts = np.ma.empty((len(y), 2, 2))
+ masked_verts[:, 0, 0] = xmin
+ masked_verts[:, 0, 1] = y
+ masked_verts[:, 1, 0] = xmax
+ masked_verts[:, 1, 1] = y
+
+ lines = mcoll.LineCollection(masked_verts, colors=colors,
+ linestyles=linestyles, label=label)
+ self.add_collection(lines, autolim=False)
+ lines._internal_update(kwargs)
+
+ if len(y) > 0:
+ # Extreme values of xmin/xmax/y. Using masked_verts here handles
+ # the case of y being a masked *object* array (as can be generated
+ # e.g. by errorbar()), which would make nanmin/nanmax stumble.
+ updatex = True
+ updatey = True
+ if self.name == "rectilinear":
+ datalim = lines.get_datalim(self.transData)
+ t = lines.get_transform()
+ updatex, updatey = t.contains_branch_seperately(self.transData)
+ minx = np.nanmin(datalim.xmin)
+ maxx = np.nanmax(datalim.xmax)
+ miny = np.nanmin(datalim.ymin)
+ maxy = np.nanmax(datalim.ymax)
+ else:
+ minx = np.nanmin(masked_verts[..., 0])
+ maxx = np.nanmax(masked_verts[..., 0])
+ miny = np.nanmin(masked_verts[..., 1])
+ maxy = np.nanmax(masked_verts[..., 1])
+
+ corners = (minx, miny), (maxx, maxy)
+ self.update_datalim(corners, updatex, updatey)
+ self._request_autoscale_view()
+ return lines
+
+ @_api.make_keyword_only("3.10", "label")
+ @_preprocess_data(replace_names=["x", "ymin", "ymax", "colors"],
+ label_namer="x")
+ def vlines(self, x, ymin, ymax, colors=None, linestyles='solid',
+ label='', **kwargs):
+ """
+ Plot vertical lines at each *x* from *ymin* to *ymax*.
+
+ Parameters
+ ----------
+ x : float or array-like
+ x-indexes where to plot the lines.
+
+ ymin, ymax : float or array-like
+ Respective beginning and end of each line. If scalars are
+ provided, all lines will have the same length.
+
+ colors : :mpltype:`color` or list of color, default: :rc:`lines.color`
+
+ linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, default: 'solid'
+
+ label : str, default: ''
+
+ Returns
+ -------
+ `~matplotlib.collections.LineCollection`
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+ **kwargs : `~matplotlib.collections.LineCollection` properties.
+
+ See Also
+ --------
+ hlines : horizontal lines
+ axvline : vertical line across the Axes
+ """
+
+ # We do the conversion first since not all unitized data is uniform
+ x, ymin, ymax = self._process_unit_info(
+ [("x", x), ("y", ymin), ("y", ymax)], kwargs)
+
+ if not np.iterable(x):
+ x = [x]
+ if not np.iterable(ymin):
+ ymin = [ymin]
+ if not np.iterable(ymax):
+ ymax = [ymax]
+
+ # Create and combine masked_arrays from input
+ x, ymin, ymax = cbook._combine_masks(x, ymin, ymax)
+ x = np.ravel(x)
+ ymin = np.ravel(ymin)
+ ymax = np.ravel(ymax)
+
+ masked_verts = np.ma.empty((len(x), 2, 2))
+ masked_verts[:, 0, 0] = x
+ masked_verts[:, 0, 1] = ymin
+ masked_verts[:, 1, 0] = x
+ masked_verts[:, 1, 1] = ymax
+
+ lines = mcoll.LineCollection(masked_verts, colors=colors,
+ linestyles=linestyles, label=label)
+ self.add_collection(lines, autolim=False)
+ lines._internal_update(kwargs)
+
+ if len(x) > 0:
+ # Extreme values of x/ymin/ymax. Using masked_verts here handles
+ # the case of x being a masked *object* array (as can be generated
+ # e.g. by errorbar()), which would make nanmin/nanmax stumble.
+ updatex = True
+ updatey = True
+ if self.name == "rectilinear":
+ datalim = lines.get_datalim(self.transData)
+ t = lines.get_transform()
+ updatex, updatey = t.contains_branch_seperately(self.transData)
+ minx = np.nanmin(datalim.xmin)
+ maxx = np.nanmax(datalim.xmax)
+ miny = np.nanmin(datalim.ymin)
+ maxy = np.nanmax(datalim.ymax)
+ else:
+ minx = np.nanmin(masked_verts[..., 0])
+ maxx = np.nanmax(masked_verts[..., 0])
+ miny = np.nanmin(masked_verts[..., 1])
+ maxy = np.nanmax(masked_verts[..., 1])
+
+ corners = (minx, miny), (maxx, maxy)
+ self.update_datalim(corners, updatex, updatey)
+ self._request_autoscale_view()
+ return lines
+
+ @_api.make_keyword_only("3.10", "orientation")
+ @_preprocess_data(replace_names=["positions", "lineoffsets",
+ "linelengths", "linewidths",
+ "colors", "linestyles"])
+ @_docstring.interpd
+ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
+ linelengths=1, linewidths=None, colors=None, alpha=None,
+ linestyles='solid', **kwargs):
+ """
+ Plot identical parallel lines at the given positions.
+
+ This type of plot is commonly used in neuroscience for representing
+ neural events, where it is usually called a spike raster, dot raster,
+ or raster plot.
+
+ However, it is useful in any situation where you wish to show the
+ timing or position of multiple sets of discrete events, such as the
+ arrival times of people to a business on each day of the month or the
+ date of hurricanes each year of the last century.
+
+ Parameters
+ ----------
+ positions : array-like or list of array-like
+ A 1D array-like defines the positions of one sequence of events.
+
+ Multiple groups of events may be passed as a list of array-likes.
+ Each group can be styled independently by passing lists of values
+ to *lineoffsets*, *linelengths*, *linewidths*, *colors* and
+ *linestyles*.
+
+ Note that *positions* can be a 2D array, but in practice different
+ event groups usually have different counts so that one will use a
+ list of different-length arrays rather than a 2D array.
+
+ orientation : {'horizontal', 'vertical'}, default: 'horizontal'
+ The direction of the event sequence:
+
+ - 'horizontal': the events are arranged horizontally.
+ The indicator lines are vertical.
+ - 'vertical': the events are arranged vertically.
+ The indicator lines are horizontal.
+
+ lineoffsets : float or array-like, default: 1
+ The offset of the center of the lines from the origin, in the
+ direction orthogonal to *orientation*.
+
+ If *positions* is 2D, this can be a sequence with length matching
+ the length of *positions*.
+
+ linelengths : float or array-like, default: 1
+ The total height of the lines (i.e. the lines stretches from
+ ``lineoffset - linelength/2`` to ``lineoffset + linelength/2``).
+
+ If *positions* is 2D, this can be a sequence with length matching
+ the length of *positions*.
+
+ linewidths : float or array-like, default: :rc:`lines.linewidth`
+ The line width(s) of the event lines, in points.
+
+ If *positions* is 2D, this can be a sequence with length matching
+ the length of *positions*.
+
+ colors : :mpltype:`color` or list of color, default: :rc:`lines.color`
+ The color(s) of the event lines.
+
+ If *positions* is 2D, this can be a sequence with length matching
+ the length of *positions*.
+
+ alpha : float or array-like, default: 1
+ The alpha blending value(s), between 0 (transparent) and 1
+ (opaque).
+
+ If *positions* is 2D, this can be a sequence with length matching
+ the length of *positions*.
+
+ linestyles : str or tuple or list of such values, default: 'solid'
+ Default is 'solid'. Valid strings are ['solid', 'dashed',
+ 'dashdot', 'dotted', '-', '--', '-.', ':']. Dash tuples
+ should be of the form::
+
+ (offset, onoffseq),
+
+ where *onoffseq* is an even length tuple of on and off ink
+ in points.
+
+ If *positions* is 2D, this can be a sequence with length matching
+ the length of *positions*.
+
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Other keyword arguments are line collection properties. See
+ `.LineCollection` for a list of the valid properties.
+
+ Returns
+ -------
+ list of `.EventCollection`
+ The `.EventCollection` that were added.
+
+ Notes
+ -----
+ For *linelengths*, *linewidths*, *colors*, *alpha* and *linestyles*, if
+ only a single value is given, that value is applied to all lines. If an
+ array-like is given, it must have the same length as *positions*, and
+ each value will be applied to the corresponding row of the array.
+
+ Examples
+ --------
+ .. plot:: gallery/lines_bars_and_markers/eventplot_demo.py
+ """
+
+ lineoffsets, linelengths = self._process_unit_info(
+ [("y", lineoffsets), ("y", linelengths)], kwargs)
+
+ # fix positions, noting that it can be a list of lists:
+ if not np.iterable(positions):
+ positions = [positions]
+ elif any(np.iterable(position) for position in positions):
+ positions = [np.asanyarray(position) for position in positions]
+ else:
+ positions = [np.asanyarray(positions)]
+
+ poss = []
+ for position in positions:
+ poss += self._process_unit_info([("x", position)], kwargs)
+ positions = poss
+
+ # prevent 'singular' keys from **kwargs dict from overriding the effect
+ # of 'plural' keyword arguments (e.g. 'color' overriding 'colors')
+ colors = cbook._local_over_kwdict(colors, kwargs, 'color')
+ linewidths = cbook._local_over_kwdict(linewidths, kwargs, 'linewidth')
+ linestyles = cbook._local_over_kwdict(linestyles, kwargs, 'linestyle')
+
+ if not np.iterable(lineoffsets):
+ lineoffsets = [lineoffsets]
+ if not np.iterable(linelengths):
+ linelengths = [linelengths]
+ if not np.iterable(linewidths):
+ linewidths = [linewidths]
+ if not np.iterable(colors):
+ colors = [colors]
+ if not np.iterable(alpha):
+ alpha = [alpha]
+ if hasattr(linestyles, 'lower') or not np.iterable(linestyles):
+ linestyles = [linestyles]
+
+ lineoffsets = np.asarray(lineoffsets)
+ linelengths = np.asarray(linelengths)
+ linewidths = np.asarray(linewidths)
+
+ if len(lineoffsets) == 0:
+ raise ValueError('lineoffsets cannot be empty')
+ if len(linelengths) == 0:
+ raise ValueError('linelengths cannot be empty')
+ if len(linestyles) == 0:
+ raise ValueError('linestyles cannot be empty')
+ if len(linewidths) == 0:
+ raise ValueError('linewidths cannot be empty')
+ if len(alpha) == 0:
+ raise ValueError('alpha cannot be empty')
+ if len(colors) == 0:
+ colors = [None]
+ try:
+ # Early conversion of the colors into RGBA values to take care
+ # of cases like colors='0.5' or colors='C1'. (Issue #8193)
+ colors = mcolors.to_rgba_array(colors)
+ except ValueError:
+ # Will fail if any element of *colors* is None. But as long
+ # as len(colors) == 1 or len(positions), the rest of the
+ # code should process *colors* properly.
+ pass
+
+ if len(lineoffsets) == 1 and len(positions) != 1:
+ lineoffsets = np.tile(lineoffsets, len(positions))
+ lineoffsets[0] = 0
+ lineoffsets = np.cumsum(lineoffsets)
+ if len(linelengths) == 1:
+ linelengths = np.tile(linelengths, len(positions))
+ if len(linewidths) == 1:
+ linewidths = np.tile(linewidths, len(positions))
+ if len(colors) == 1:
+ colors = list(colors) * len(positions)
+ if len(alpha) == 1:
+ alpha = list(alpha) * len(positions)
+ if len(linestyles) == 1:
+ linestyles = [linestyles] * len(positions)
+
+ if len(lineoffsets) != len(positions):
+ raise ValueError('lineoffsets and positions are unequal sized '
+ 'sequences')
+ if len(linelengths) != len(positions):
+ raise ValueError('linelengths and positions are unequal sized '
+ 'sequences')
+ if len(linewidths) != len(positions):
+ raise ValueError('linewidths and positions are unequal sized '
+ 'sequences')
+ if len(colors) != len(positions):
+ raise ValueError('colors and positions are unequal sized '
+ 'sequences')
+ if len(alpha) != len(positions):
+ raise ValueError('alpha and positions are unequal sized '
+ 'sequences')
+ if len(linestyles) != len(positions):
+ raise ValueError('linestyles and positions are unequal sized '
+ 'sequences')
+
+ colls = []
+ for position, lineoffset, linelength, linewidth, color, alpha_, \
+ linestyle in \
+ zip(positions, lineoffsets, linelengths, linewidths,
+ colors, alpha, linestyles):
+ coll = mcoll.EventCollection(position,
+ orientation=orientation,
+ lineoffset=lineoffset,
+ linelength=linelength,
+ linewidth=linewidth,
+ color=color,
+ alpha=alpha_,
+ linestyle=linestyle)
+ self.add_collection(coll, autolim=False)
+ coll._internal_update(kwargs)
+ colls.append(coll)
+
+ if len(positions) > 0:
+ # try to get min/max
+ min_max = [(np.min(_p), np.max(_p)) for _p in positions
+ if len(_p) > 0]
+ # if we have any non-empty positions, try to autoscale
+ if len(min_max) > 0:
+ mins, maxes = zip(*min_max)
+ minpos = np.min(mins)
+ maxpos = np.max(maxes)
+
+ minline = (lineoffsets - linelengths).min()
+ maxline = (lineoffsets + linelengths).max()
+
+ if orientation == "vertical":
+ corners = (minline, minpos), (maxline, maxpos)
+ else: # "horizontal"
+ corners = (minpos, minline), (maxpos, maxline)
+ self.update_datalim(corners)
+ self._request_autoscale_view()
+
+ return colls
+
+ #### Basic plotting
+
+ # Uses a custom implementation of data-kwarg handling in
+ # _process_plot_var_args.
+ @_docstring.interpd
+ def plot(self, *args, scalex=True, scaley=True, data=None, **kwargs):
+ """
+ Plot y versus x as lines and/or markers.
+
+ Call signatures::
+
+ plot([x], y, [fmt], *, data=None, **kwargs)
+ plot([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)
+
+ The coordinates of the points or line nodes are given by *x*, *y*.
+
+ The optional parameter *fmt* is a convenient way for defining basic
+ formatting like color, marker and linestyle. It's a shortcut string
+ notation described in the *Notes* section below.
+
+ >>> plot(x, y) # plot x and y using default line style and color
+ >>> plot(x, y, 'bo') # plot x and y using blue circle markers
+ >>> plot(y) # plot y using x as index array 0..N-1
+ >>> plot(y, 'r+') # ditto, but with red plusses
+
+ You can use `.Line2D` properties as keyword arguments for more
+ control on the appearance. Line properties and *fmt* can be mixed.
+ The following two calls yield identical results:
+
+ >>> plot(x, y, 'go--', linewidth=2, markersize=12)
+ >>> plot(x, y, color='green', marker='o', linestyle='dashed',
+ ... linewidth=2, markersize=12)
+
+ When conflicting with *fmt*, keyword arguments take precedence.
+
+
+ **Plotting labelled data**
+
+ There's a convenient way for plotting objects with labelled data (i.e.
+ data that can be accessed by index ``obj['y']``). Instead of giving
+ the data in *x* and *y*, you can provide the object in the *data*
+ parameter and just give the labels for *x* and *y*::
+
+ >>> plot('xlabel', 'ylabel', data=obj)
+
+ All indexable objects are supported. This could e.g. be a `dict`, a
+ `pandas.DataFrame` or a structured numpy array.
+
+
+ **Plotting multiple sets of data**
+
+ There are various ways to plot multiple sets of data.
+
+ - The most straight forward way is just to call `plot` multiple times.
+ Example:
+
+ >>> plot(x1, y1, 'bo')
+ >>> plot(x2, y2, 'go')
+
+ - If *x* and/or *y* are 2D arrays, a separate data set will be drawn
+ for every column. If both *x* and *y* are 2D, they must have the
+ same shape. If only one of them is 2D with shape (N, m) the other
+ must have length N and will be used for every data set m.
+
+ Example:
+
+ >>> x = [1, 2, 3]
+ >>> y = np.array([[1, 2], [3, 4], [5, 6]])
+ >>> plot(x, y)
+
+ is equivalent to:
+
+ >>> for col in range(y.shape[1]):
+ ... plot(x, y[:, col])
+
+ - The third way is to specify multiple sets of *[x]*, *y*, *[fmt]*
+ groups::
+
+ >>> plot(x1, y1, 'g^', x2, y2, 'g-')
+
+ In this case, any additional keyword argument applies to all
+ datasets. Also, this syntax cannot be combined with the *data*
+ parameter.
+
+ By default, each line is assigned a different style specified by a
+ 'style cycle'. The *fmt* and line property parameters are only
+ necessary if you want explicit deviations from these defaults.
+ Alternatively, you can also change the style cycle using
+ :rc:`axes.prop_cycle`.
+
+
+ Parameters
+ ----------
+ x, y : array-like or float
+ The horizontal / vertical coordinates of the data points.
+ *x* values are optional and default to ``range(len(y))``.
+
+ Commonly, these parameters are 1D arrays.
+
+ They can also be scalars, or two-dimensional (in that case, the
+ columns represent separate data sets).
+
+ These arguments cannot be passed as keywords.
+
+ fmt : str, optional
+ A format string, e.g. 'ro' for red circles. See the *Notes*
+ section for a full description of the format strings.
+
+ Format strings are just an abbreviation for quickly setting
+ basic line properties. All of these and more can also be
+ controlled by keyword arguments.
+
+ This argument cannot be passed as keyword.
+
+ data : indexable object, optional
+ An object with labelled data. If given, provide the label names to
+ plot in *x* and *y*.
+
+ .. note::
+ Technically there's a slight ambiguity in calls where the
+ second label is a valid *fmt*. ``plot('n', 'o', data=obj)``
+ could be ``plt(x, y)`` or ``plt(y, fmt)``. In such cases,
+ the former interpretation is chosen, but a warning is issued.
+ You may suppress the warning by adding an empty format string
+ ``plot('n', 'o', '', data=obj)``.
+
+ Returns
+ -------
+ list of `.Line2D`
+ A list of lines representing the plotted data.
+
+ Other Parameters
+ ----------------
+ scalex, scaley : bool, default: True
+ These parameters determine if the view limits are adapted to the
+ data limits. The values are passed on to
+ `~.axes.Axes.autoscale_view`.
+
+ **kwargs : `~matplotlib.lines.Line2D` properties, optional
+ *kwargs* are used to specify properties like a line label (for
+ auto legends), linewidth, antialiasing, marker face color.
+ Example::
+
+ >>> plot([1, 2, 3], [1, 2, 3], 'go-', label='line 1', linewidth=2)
+ >>> plot([1, 2, 3], [1, 4, 9], 'rs', label='line 2')
+
+ If you specify multiple lines with one plot call, the kwargs apply
+ to all those lines. In case the label object is iterable, each
+ element is used as labels for each set of data.
+
+ Here is a list of available `.Line2D` properties:
+
+ %(Line2D:kwdoc)s
+
+ See Also
+ --------
+ scatter : XY scatter plot with markers of varying size and/or color (
+ sometimes also called bubble chart).
+
+ Notes
+ -----
+ **Format Strings**
+
+ A format string consists of a part for color, marker and line::
+
+ fmt = '[marker][line][color]'
+
+ Each of them is optional. If not provided, the value from the style
+ cycle is used. Exception: If ``line`` is given, but no ``marker``,
+ the data will be a line without markers.
+
+ Other combinations such as ``[color][marker][line]`` are also
+ supported, but note that their parsing may be ambiguous.
+
+ **Markers**
+
+ ============= ===============================
+ character description
+ ============= ===============================
+ ``'.'`` point marker
+ ``','`` pixel marker
+ ``'o'`` circle marker
+ ``'v'`` triangle_down marker
+ ``'^'`` triangle_up marker
+ ``'<'`` triangle_left marker
+ ``'>'`` triangle_right marker
+ ``'1'`` tri_down marker
+ ``'2'`` tri_up marker
+ ``'3'`` tri_left marker
+ ``'4'`` tri_right marker
+ ``'8'`` octagon marker
+ ``'s'`` square marker
+ ``'p'`` pentagon marker
+ ``'P'`` plus (filled) marker
+ ``'*'`` star marker
+ ``'h'`` hexagon1 marker
+ ``'H'`` hexagon2 marker
+ ``'+'`` plus marker
+ ``'x'`` x marker
+ ``'X'`` x (filled) marker
+ ``'D'`` diamond marker
+ ``'d'`` thin_diamond marker
+ ``'|'`` vline marker
+ ``'_'`` hline marker
+ ============= ===============================
+
+ **Line Styles**
+
+ ============= ===============================
+ character description
+ ============= ===============================
+ ``'-'`` solid line style
+ ``'--'`` dashed line style
+ ``'-.'`` dash-dot line style
+ ``':'`` dotted line style
+ ============= ===============================
+
+ Example format strings::
+
+ 'b' # blue markers with default shape
+ 'or' # red circles
+ '-g' # green solid line
+ '--' # dashed line with default color
+ '^k:' # black triangle_up markers connected by a dotted line
+
+ **Colors**
+
+ The supported color abbreviations are the single letter codes
+
+ ============= ===============================
+ character color
+ ============= ===============================
+ ``'b'`` blue
+ ``'g'`` green
+ ``'r'`` red
+ ``'c'`` cyan
+ ``'m'`` magenta
+ ``'y'`` yellow
+ ``'k'`` black
+ ``'w'`` white
+ ============= ===============================
+
+ and the ``'CN'`` colors that index into the default property cycle.
+
+ If the color is the only part of the format string, you can
+ additionally use any `matplotlib.colors` spec, e.g. full names
+ (``'green'``) or hex strings (``'#008000'``).
+ """
+ kwargs = cbook.normalize_kwargs(kwargs, mlines.Line2D)
+ lines = [*self._get_lines(self, *args, data=data, **kwargs)]
+ for line in lines:
+ self.add_line(line)
+ if scalex:
+ self._request_autoscale_view("x")
+ if scaley:
+ self._request_autoscale_view("y")
+ return lines
+
+ @_api.deprecated("3.9", alternative="plot")
+ @_preprocess_data(replace_names=["x", "y"], label_namer="y")
+ @_docstring.interpd
+ def plot_date(self, x, y, fmt='o', tz=None, xdate=True, ydate=False,
+ **kwargs):
+ """
+ Plot coercing the axis to treat floats as dates.
+
+ .. deprecated:: 3.9
+
+ This method exists for historic reasons and will be removed in version 3.11.
+
+ - ``datetime``-like data should directly be plotted using
+ `~.Axes.plot`.
+ - If you need to plot plain numeric data as :ref:`date-format` or
+ need to set a timezone, call ``ax.xaxis.axis_date`` /
+ ``ax.yaxis.axis_date`` before `~.Axes.plot`. See
+ `.Axis.axis_date`.
+
+ Similar to `.plot`, this plots *y* vs. *x* as lines or markers.
+ However, the axis labels are formatted as dates depending on *xdate*
+ and *ydate*. Note that `.plot` will work with `datetime` and
+ `numpy.datetime64` objects without resorting to this method.
+
+ Parameters
+ ----------
+ x, y : array-like
+ The coordinates of the data points. If *xdate* or *ydate* is
+ *True*, the respective values *x* or *y* are interpreted as
+ :ref:`Matplotlib dates `.
+
+ fmt : str, optional
+ The plot format string. For details, see the corresponding
+ parameter in `.plot`.
+
+ tz : timezone string or `datetime.tzinfo`, default: :rc:`timezone`
+ The time zone to use in labeling dates.
+
+ xdate : bool, default: True
+ If *True*, the *x*-axis will be interpreted as Matplotlib dates.
+
+ ydate : bool, default: False
+ If *True*, the *y*-axis will be interpreted as Matplotlib dates.
+
+ Returns
+ -------
+ list of `.Line2D`
+ Objects representing the plotted data.
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+ **kwargs
+ Keyword arguments control the `.Line2D` properties:
+
+ %(Line2D:kwdoc)s
+
+ See Also
+ --------
+ matplotlib.dates : Helper functions on dates.
+ matplotlib.dates.date2num : Convert dates to num.
+ matplotlib.dates.num2date : Convert num to dates.
+ matplotlib.dates.drange : Create an equally spaced sequence of dates.
+
+ Notes
+ -----
+ If you are using custom date tickers and formatters, it may be
+ necessary to set the formatters/locators after the call to
+ `.plot_date`. `.plot_date` will set the default tick locator to
+ `.AutoDateLocator` (if the tick locator is not already set to a
+ `.DateLocator` instance) and the default tick formatter to
+ `.AutoDateFormatter` (if the tick formatter is not already set to a
+ `.DateFormatter` instance).
+ """
+ if xdate:
+ self.xaxis_date(tz)
+ if ydate:
+ self.yaxis_date(tz)
+ return self.plot(x, y, fmt, **kwargs)
+
+ # @_preprocess_data() # let 'plot' do the unpacking..
+ @_docstring.interpd
+ def loglog(self, *args, **kwargs):
+ """
+ Make a plot with log scaling on both the x- and y-axis.
+
+ Call signatures::
+
+ loglog([x], y, [fmt], data=None, **kwargs)
+ loglog([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)
+
+ This is just a thin wrapper around `.plot` which additionally changes
+ both the x-axis and the y-axis to log scaling. All the concepts and
+ parameters of plot can be used here as well.
+
+ The additional parameters *base*, *subs* and *nonpositive* control the
+ x/y-axis properties. They are just forwarded to `.Axes.set_xscale` and
+ `.Axes.set_yscale`. To use different properties on the x-axis and the
+ y-axis, use e.g.
+ ``ax.set_xscale("log", base=10); ax.set_yscale("log", base=2)``.
+
+ Parameters
+ ----------
+ base : float, default: 10
+ Base of the logarithm.
+
+ subs : sequence, optional
+ The location of the minor ticks. If *None*, reasonable locations
+ are automatically chosen depending on the number of decades in the
+ plot. See `.Axes.set_xscale`/`.Axes.set_yscale` for details.
+
+ nonpositive : {'mask', 'clip'}, default: 'clip'
+ Non-positive values can be masked as invalid, or clipped to a very
+ small positive number.
+
+ **kwargs
+ All parameters supported by `.plot`.
+
+ Returns
+ -------
+ list of `.Line2D`
+ Objects representing the plotted data.
+ """
+ dx = {k: v for k, v in kwargs.items()
+ if k in ['base', 'subs', 'nonpositive',
+ 'basex', 'subsx', 'nonposx']}
+ self.set_xscale('log', **dx)
+ dy = {k: v for k, v in kwargs.items()
+ if k in ['base', 'subs', 'nonpositive',
+ 'basey', 'subsy', 'nonposy']}
+ self.set_yscale('log', **dy)
+ return self.plot(
+ *args, **{k: v for k, v in kwargs.items() if k not in {*dx, *dy}})
+
+ # @_preprocess_data() # let 'plot' do the unpacking..
+ @_docstring.interpd
+ def semilogx(self, *args, **kwargs):
+ """
+ Make a plot with log scaling on the x-axis.
+
+ Call signatures::
+
+ semilogx([x], y, [fmt], data=None, **kwargs)
+ semilogx([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)
+
+ This is just a thin wrapper around `.plot` which additionally changes
+ the x-axis to log scaling. All the concepts and parameters of plot can
+ be used here as well.
+
+ The additional parameters *base*, *subs*, and *nonpositive* control the
+ x-axis properties. They are just forwarded to `.Axes.set_xscale`.
+
+ Parameters
+ ----------
+ base : float, default: 10
+ Base of the x logarithm.
+
+ subs : array-like, optional
+ The location of the minor xticks. If *None*, reasonable locations
+ are automatically chosen depending on the number of decades in the
+ plot. See `.Axes.set_xscale` for details.
+
+ nonpositive : {'mask', 'clip'}, default: 'clip'
+ Non-positive values in x can be masked as invalid, or clipped to a
+ very small positive number.
+
+ **kwargs
+ All parameters supported by `.plot`.
+
+ Returns
+ -------
+ list of `.Line2D`
+ Objects representing the plotted data.
+ """
+ d = {k: v for k, v in kwargs.items()
+ if k in ['base', 'subs', 'nonpositive',
+ 'basex', 'subsx', 'nonposx']}
+ self.set_xscale('log', **d)
+ return self.plot(
+ *args, **{k: v for k, v in kwargs.items() if k not in d})
+
+ # @_preprocess_data() # let 'plot' do the unpacking..
+ @_docstring.interpd
+ def semilogy(self, *args, **kwargs):
+ """
+ Make a plot with log scaling on the y-axis.
+
+ Call signatures::
+
+ semilogy([x], y, [fmt], data=None, **kwargs)
+ semilogy([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)
+
+ This is just a thin wrapper around `.plot` which additionally changes
+ the y-axis to log scaling. All the concepts and parameters of plot can
+ be used here as well.
+
+ The additional parameters *base*, *subs*, and *nonpositive* control the
+ y-axis properties. They are just forwarded to `.Axes.set_yscale`.
+
+ Parameters
+ ----------
+ base : float, default: 10
+ Base of the y logarithm.
+
+ subs : array-like, optional
+ The location of the minor yticks. If *None*, reasonable locations
+ are automatically chosen depending on the number of decades in the
+ plot. See `.Axes.set_yscale` for details.
+
+ nonpositive : {'mask', 'clip'}, default: 'clip'
+ Non-positive values in y can be masked as invalid, or clipped to a
+ very small positive number.
+
+ **kwargs
+ All parameters supported by `.plot`.
+
+ Returns
+ -------
+ list of `.Line2D`
+ Objects representing the plotted data.
+ """
+ d = {k: v for k, v in kwargs.items()
+ if k in ['base', 'subs', 'nonpositive',
+ 'basey', 'subsy', 'nonposy']}
+ self.set_yscale('log', **d)
+ return self.plot(
+ *args, **{k: v for k, v in kwargs.items() if k not in d})
+
+ @_preprocess_data(replace_names=["x"], label_namer="x")
+ def acorr(self, x, **kwargs):
+ """
+ Plot the autocorrelation of *x*.
+
+ Parameters
+ ----------
+ x : array-like
+ Not run through Matplotlib's unit conversion, so this should
+ be a unit-less array.
+
+ detrend : callable, default: `.mlab.detrend_none` (no detrending)
+ A detrending function applied to *x*. It must have the
+ signature ::
+
+ detrend(x: np.ndarray) -> np.ndarray
+
+ normed : bool, default: True
+ If ``True``, input vectors are normalised to unit length.
+
+ usevlines : bool, default: True
+ Determines the plot style.
+
+ If ``True``, vertical lines are plotted from 0 to the acorr value
+ using `.Axes.vlines`. Additionally, a horizontal line is plotted
+ at y=0 using `.Axes.axhline`.
+
+ If ``False``, markers are plotted at the acorr values using
+ `.Axes.plot`.
+
+ maxlags : int, default: 10
+ Number of lags to show. If ``None``, will return all
+ ``2 * len(x) - 1`` lags.
+
+ Returns
+ -------
+ lags : array (length ``2*maxlags+1``)
+ The lag vector.
+ c : array (length ``2*maxlags+1``)
+ The auto correlation vector.
+ line : `.LineCollection` or `.Line2D`
+ `.Artist` added to the Axes of the correlation:
+
+ - `.LineCollection` if *usevlines* is True.
+ - `.Line2D` if *usevlines* is False.
+ b : `~matplotlib.lines.Line2D` or None
+ Horizontal line at 0 if *usevlines* is True
+ None *usevlines* is False.
+
+ Other Parameters
+ ----------------
+ linestyle : `~matplotlib.lines.Line2D` property, optional
+ The linestyle for plotting the data points.
+ Only used if *usevlines* is ``False``.
+
+ marker : str, default: 'o'
+ The marker for plotting the data points.
+ Only used if *usevlines* is ``False``.
+
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Additional parameters are passed to `.Axes.vlines` and
+ `.Axes.axhline` if *usevlines* is ``True``; otherwise they are
+ passed to `.Axes.plot`.
+
+ Notes
+ -----
+ The cross correlation is performed with `numpy.correlate` with
+ ``mode = "full"``.
+ """
+ return self.xcorr(x, x, **kwargs)
+
+ @_api.make_keyword_only("3.10", "normed")
+ @_preprocess_data(replace_names=["x", "y"], label_namer="y")
+ def xcorr(self, x, y, normed=True, detrend=mlab.detrend_none,
+ usevlines=True, maxlags=10, **kwargs):
+ r"""
+ Plot the cross correlation between *x* and *y*.
+
+ The correlation with lag k is defined as
+ :math:`\sum_n x[n+k] \cdot y^*[n]`, where :math:`y^*` is the complex
+ conjugate of :math:`y`.
+
+ Parameters
+ ----------
+ x, y : array-like of length n
+ Neither *x* nor *y* are run through Matplotlib's unit conversion, so
+ these should be unit-less arrays.
+
+ detrend : callable, default: `.mlab.detrend_none` (no detrending)
+ A detrending function applied to *x* and *y*. It must have the
+ signature ::
+
+ detrend(x: np.ndarray) -> np.ndarray
+
+ normed : bool, default: True
+ If ``True``, input vectors are normalised to unit length.
+
+ usevlines : bool, default: True
+ Determines the plot style.
+
+ If ``True``, vertical lines are plotted from 0 to the xcorr value
+ using `.Axes.vlines`. Additionally, a horizontal line is plotted
+ at y=0 using `.Axes.axhline`.
+
+ If ``False``, markers are plotted at the xcorr values using
+ `.Axes.plot`.
+
+ maxlags : int, default: 10
+ Number of lags to show. If None, will return all ``2 * len(x) - 1``
+ lags.
+
+ Returns
+ -------
+ lags : array (length ``2*maxlags+1``)
+ The lag vector.
+ c : array (length ``2*maxlags+1``)
+ The auto correlation vector.
+ line : `.LineCollection` or `.Line2D`
+ `.Artist` added to the Axes of the correlation:
+
+ - `.LineCollection` if *usevlines* is True.
+ - `.Line2D` if *usevlines* is False.
+ b : `~matplotlib.lines.Line2D` or None
+ Horizontal line at 0 if *usevlines* is True
+ None *usevlines* is False.
+
+ Other Parameters
+ ----------------
+ linestyle : `~matplotlib.lines.Line2D` property, optional
+ The linestyle for plotting the data points.
+ Only used if *usevlines* is ``False``.
+
+ marker : str, default: 'o'
+ The marker for plotting the data points.
+ Only used if *usevlines* is ``False``.
+
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Additional parameters are passed to `.Axes.vlines` and
+ `.Axes.axhline` if *usevlines* is ``True``; otherwise they are
+ passed to `.Axes.plot`.
+
+ Notes
+ -----
+ The cross correlation is performed with `numpy.correlate` with
+ ``mode = "full"``.
+ """
+ Nx = len(x)
+ if Nx != len(y):
+ raise ValueError('x and y must be equal length')
+
+ x = detrend(np.asarray(x))
+ y = detrend(np.asarray(y))
+
+ correls = np.correlate(x, y, mode="full")
+
+ if normed:
+ correls = correls / np.sqrt(np.dot(x, x) * np.dot(y, y))
+
+ if maxlags is None:
+ maxlags = Nx - 1
+
+ if maxlags >= Nx or maxlags < 1:
+ raise ValueError('maxlags must be None or strictly '
+ 'positive < %d' % Nx)
+
+ lags = np.arange(-maxlags, maxlags + 1)
+ correls = correls[Nx - 1 - maxlags:Nx + maxlags]
+
+ if usevlines:
+ a = self.vlines(lags, [0], correls, **kwargs)
+ # Make label empty so only vertical lines get a legend entry
+ kwargs.pop('label', '')
+ b = self.axhline(**kwargs)
+ else:
+ kwargs.setdefault('marker', 'o')
+ kwargs.setdefault('linestyle', 'None')
+ a, = self.plot(lags, correls, **kwargs)
+ b = None
+ return lags, correls, a, b
+
+ #### Specialized plotting
+
+ # @_preprocess_data() # let 'plot' do the unpacking..
+ def step(self, x, y, *args, where='pre', data=None, **kwargs):
+ """
+ Make a step plot.
+
+ Call signatures::
+
+ step(x, y, [fmt], *, data=None, where='pre', **kwargs)
+ step(x, y, [fmt], x2, y2, [fmt2], ..., *, where='pre', **kwargs)
+
+ This is just a thin wrapper around `.plot` which changes some
+ formatting options. Most of the concepts and parameters of plot can be
+ used here as well.
+
+ .. note::
+
+ This method uses a standard plot with a step drawstyle: The *x*
+ values are the reference positions and steps extend left/right/both
+ directions depending on *where*.
+
+ For the common case where you know the values and edges of the
+ steps, use `~.Axes.stairs` instead.
+
+ Parameters
+ ----------
+ x : array-like
+ 1D sequence of x positions. It is assumed, but not checked, that
+ it is uniformly increasing.
+
+ y : array-like
+ 1D sequence of y levels.
+
+ fmt : str, optional
+ A format string, e.g. 'g' for a green line. See `.plot` for a more
+ detailed description.
+
+ Note: While full format strings are accepted, it is recommended to
+ only specify the color. Line styles are currently ignored (use
+ the keyword argument *linestyle* instead). Markers are accepted
+ and plotted on the given positions, however, this is a rarely
+ needed feature for step plots.
+
+ where : {'pre', 'post', 'mid'}, default: 'pre'
+ Define where the steps should be placed:
+
+ - 'pre': The y value is continued constantly to the left from
+ every *x* position, i.e. the interval ``(x[i-1], x[i]]`` has the
+ value ``y[i]``.
+ - 'post': The y value is continued constantly to the right from
+ every *x* position, i.e. the interval ``[x[i], x[i+1])`` has the
+ value ``y[i]``.
+ - 'mid': Steps occur half-way between the *x* positions.
+
+ data : indexable object, optional
+ An object with labelled data. If given, provide the label names to
+ plot in *x* and *y*.
+
+ **kwargs
+ Additional parameters are the same as those for `.plot`.
+
+ Returns
+ -------
+ list of `.Line2D`
+ Objects representing the plotted data.
+ """
+ _api.check_in_list(('pre', 'post', 'mid'), where=where)
+ kwargs['drawstyle'] = 'steps-' + where
+ return self.plot(x, y, *args, data=data, **kwargs)
+
+ @staticmethod
+ def _convert_dx(dx, x0, xconv, convert):
+ """
+ Small helper to do logic of width conversion flexibly.
+
+ *dx* and *x0* have units, but *xconv* has already been converted
+ to unitless (and is an ndarray). This allows the *dx* to have units
+ that are different from *x0*, but are still accepted by the
+ ``__add__`` operator of *x0*.
+ """
+
+ # x should be an array...
+ assert type(xconv) is np.ndarray
+
+ if xconv.size == 0:
+ # xconv has already been converted, but maybe empty...
+ return convert(dx)
+
+ try:
+ # attempt to add the width to x0; this works for
+ # datetime+timedelta, for instance
+
+ # only use the first element of x and x0. This saves
+ # having to be sure addition works across the whole
+ # vector. This is particularly an issue if
+ # x0 and dx are lists so x0 + dx just concatenates the lists.
+ # We can't just cast x0 and dx to numpy arrays because that
+ # removes the units from unit packages like `pint` that
+ # wrap numpy arrays.
+ try:
+ x0 = cbook._safe_first_finite(x0)
+ except (TypeError, IndexError, KeyError):
+ pass
+
+ try:
+ x = cbook._safe_first_finite(xconv)
+ except (TypeError, IndexError, KeyError):
+ x = xconv
+
+ delist = False
+ if not np.iterable(dx):
+ dx = [dx]
+ delist = True
+ dx = [convert(x0 + ddx) - x for ddx in dx]
+ if delist:
+ dx = dx[0]
+ except (ValueError, TypeError, AttributeError):
+ # if the above fails (for any reason) just fallback to what
+ # we do by default and convert dx by itself.
+ dx = convert(dx)
+ return dx
+
+ def _parse_bar_color_args(self, kwargs):
+ """
+ Helper function to process color-related arguments of `.Axes.bar`.
+
+ Argument precedence for facecolors:
+
+ - kwargs['facecolor']
+ - kwargs['color']
+ - 'Result of ``self._get_patches_for_fill.get_next_color``
+
+ Argument precedence for edgecolors:
+
+ - kwargs['edgecolor']
+ - None
+
+ Parameters
+ ----------
+ self : Axes
+
+ kwargs : dict
+ Additional kwargs. If these keys exist, we pop and process them:
+ 'facecolor', 'edgecolor', 'color'
+ Note: The dict is modified by this function.
+
+
+ Returns
+ -------
+ facecolor
+ The facecolor. One or more colors as (N, 4) rgba array.
+ edgecolor
+ The edgecolor. Not normalized; may be any valid color spec or None.
+ """
+ color = kwargs.pop('color', None)
+
+ facecolor = kwargs.pop('facecolor', color)
+ edgecolor = kwargs.pop('edgecolor', None)
+
+ facecolor = (facecolor if facecolor is not None
+ else self._get_patches_for_fill.get_next_color())
+
+ try:
+ facecolor = mcolors.to_rgba_array(facecolor)
+ except ValueError as err:
+ raise ValueError(
+ "'facecolor' or 'color' argument must be a valid color or "
+ "sequence of colors."
+ ) from err
+
+ return facecolor, edgecolor
+
+ @_preprocess_data()
+ @_docstring.interpd
+ def bar(self, x, height, width=0.8, bottom=None, *, align="center",
+ **kwargs):
+ r"""
+ Make a bar plot.
+
+ The bars are positioned at *x* with the given *align*\ment. Their
+ dimensions are given by *height* and *width*. The vertical baseline
+ is *bottom* (default 0).
+
+ Many parameters can take either a single value applying to all bars
+ or a sequence of values, one for each bar.
+
+ Parameters
+ ----------
+ x : float or array-like
+ The x coordinates of the bars. See also *align* for the
+ alignment of the bars to the coordinates.
+
+ Bars are often used for categorical data, i.e. string labels below
+ the bars. You can provide a list of strings directly to *x*.
+ ``bar(['A', 'B', 'C'], [1, 2, 3])`` is often a shorter and more
+ convenient notation compared to
+ ``bar(range(3), [1, 2, 3], tick_label=['A', 'B', 'C'])``. They are
+ equivalent as long as the names are unique. The explicit *tick_label*
+ notation draws the names in the sequence given. However, when having
+ duplicate values in categorical *x* data, these values map to the same
+ numerical x coordinate, and hence the corresponding bars are drawn on
+ top of each other.
+
+ height : float or array-like
+ The height(s) of the bars.
+
+ Note that if *bottom* has units (e.g. datetime), *height* should be in
+ units that are a difference from the value of *bottom* (e.g. timedelta).
+
+ width : float or array-like, default: 0.8
+ The width(s) of the bars.
+
+ Note that if *x* has units (e.g. datetime), then *width* should be in
+ units that are a difference (e.g. timedelta) around the *x* values.
+
+ bottom : float or array-like, default: 0
+ The y coordinate(s) of the bottom side(s) of the bars.
+
+ Note that if *bottom* has units, then the y-axis will get a Locator and
+ Formatter appropriate for the units (e.g. dates, or categorical).
+
+ align : {'center', 'edge'}, default: 'center'
+ Alignment of the bars to the *x* coordinates:
+
+ - 'center': Center the base on the *x* positions.
+ - 'edge': Align the left edges of the bars with the *x* positions.
+
+ To align the bars on the right edge pass a negative *width* and
+ ``align='edge'``.
+
+ Returns
+ -------
+ `.BarContainer`
+ Container with all the bars and optionally errorbars.
+
+ Other Parameters
+ ----------------
+ color : :mpltype:`color` or list of :mpltype:`color`, optional
+ The colors of the bar faces. This is an alias for *facecolor*.
+ If both are given, *facecolor* takes precedence.
+
+ facecolor : :mpltype:`color` or list of :mpltype:`color`, optional
+ The colors of the bar faces.
+ If both *color* and *facecolor are given, *facecolor* takes precedence.
+
+ edgecolor : :mpltype:`color` or list of :mpltype:`color`, optional
+ The colors of the bar edges.
+
+ linewidth : float or array-like, optional
+ Width of the bar edge(s). If 0, don't draw edges.
+
+ tick_label : str or list of str, optional
+ The tick labels of the bars.
+ Default: None (Use default numeric labels.)
+
+ label : str or list of str, optional
+ A single label is attached to the resulting `.BarContainer` as a
+ label for the whole dataset.
+ If a list is provided, it must be the same length as *x* and
+ labels the individual bars. Repeated labels are not de-duplicated
+ and will cause repeated label entries, so this is best used when
+ bars also differ in style (e.g., by passing a list to *color*.)
+
+ xerr, yerr : float or array-like of shape(N,) or shape(2, N), optional
+ If not *None*, add horizontal / vertical errorbars to the bar tips.
+ The values are +/- sizes relative to the data:
+
+ - scalar: symmetric +/- values for all bars
+ - shape(N,): symmetric +/- values for each bar
+ - shape(2, N): Separate - and + values for each bar. First row
+ contains the lower errors, the second row contains the upper
+ errors.
+ - *None*: No errorbar. (Default)
+
+ See :doc:`/gallery/statistics/errorbar_features` for an example on
+ the usage of *xerr* and *yerr*.
+
+ ecolor : :mpltype:`color` or list of :mpltype:`color`, default: 'black'
+ The line color of the errorbars.
+
+ capsize : float, default: :rc:`errorbar.capsize`
+ The length of the error bar caps in points.
+
+ error_kw : dict, optional
+ Dictionary of keyword arguments to be passed to the
+ `~.Axes.errorbar` method. Values of *ecolor* or *capsize* defined
+ here take precedence over the independent keyword arguments.
+
+ log : bool, default: False
+ If *True*, set the y-axis to be log scale.
+
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs : `.Rectangle` properties
+
+ %(Rectangle:kwdoc)s
+
+ See Also
+ --------
+ barh : Plot a horizontal bar plot.
+
+ Notes
+ -----
+ Stacked bars can be achieved by passing individual *bottom* values per
+ bar. See :doc:`/gallery/lines_bars_and_markers/bar_stacked`.
+ """
+ kwargs = cbook.normalize_kwargs(kwargs, mpatches.Patch)
+ facecolor, edgecolor = self._parse_bar_color_args(kwargs)
+
+ linewidth = kwargs.pop('linewidth', None)
+ hatch = kwargs.pop('hatch', None)
+
+ # Because xerr and yerr will be passed to errorbar, most dimension
+ # checking and processing will be left to the errorbar method.
+ xerr = kwargs.pop('xerr', None)
+ yerr = kwargs.pop('yerr', None)
+ error_kw = kwargs.pop('error_kw', None)
+ error_kw = {} if error_kw is None else error_kw.copy()
+ ezorder = error_kw.pop('zorder', None)
+ if ezorder is None:
+ ezorder = kwargs.get('zorder', None)
+ if ezorder is not None:
+ # If using the bar zorder, increment slightly to make sure
+ # errorbars are drawn on top of bars
+ ezorder += 0.01
+ error_kw.setdefault('zorder', ezorder)
+ ecolor = kwargs.pop('ecolor', 'k')
+ capsize = kwargs.pop('capsize', mpl.rcParams["errorbar.capsize"])
+ error_kw.setdefault('ecolor', ecolor)
+ error_kw.setdefault('capsize', capsize)
+
+ # The keyword argument *orientation* is used by barh() to defer all
+ # logic and drawing to bar(). It is considered internal and is
+ # intentionally not mentioned in the docstring.
+ orientation = kwargs.pop('orientation', 'vertical')
+ _api.check_in_list(['vertical', 'horizontal'], orientation=orientation)
+ log = kwargs.pop('log', False)
+ label = kwargs.pop('label', '')
+ tick_labels = kwargs.pop('tick_label', None)
+
+ y = bottom # Matches barh call signature.
+ if orientation == 'vertical':
+ if y is None:
+ y = 0
+ else: # horizontal
+ if x is None:
+ x = 0
+
+ if orientation == 'vertical':
+ # It is possible for y (bottom) to contain unit information.
+ # However, it is also possible for y=0 for the default and height
+ # to contain unit information. This will prioritize the units of y.
+ self._process_unit_info(
+ [("x", x), ("y", y), ("y", height)], kwargs, convert=False)
+ if log:
+ self.set_yscale('log', nonpositive='clip')
+ else: # horizontal
+ # It is possible for x (left) to contain unit information.
+ # However, it is also possible for x=0 for the default and width
+ # to contain unit information. This will prioritize the units of x.
+ self._process_unit_info(
+ [("x", x), ("x", width), ("y", y)], kwargs, convert=False)
+ if log:
+ self.set_xscale('log', nonpositive='clip')
+
+ # lets do some conversions now since some types cannot be
+ # subtracted uniformly
+ if self.xaxis is not None:
+ x0 = x
+ x = np.asarray(self.convert_xunits(x))
+ width = self._convert_dx(width, x0, x, self.convert_xunits)
+ if xerr is not None:
+ xerr = self._convert_dx(xerr, x0, x, self.convert_xunits)
+ if self.yaxis is not None:
+ y0 = y
+ y = np.asarray(self.convert_yunits(y))
+ height = self._convert_dx(height, y0, y, self.convert_yunits)
+ if yerr is not None:
+ yerr = self._convert_dx(yerr, y0, y, self.convert_yunits)
+
+ x, height, width, y, linewidth, hatch = np.broadcast_arrays(
+ # Make args iterable too.
+ np.atleast_1d(x), height, width, y, linewidth, hatch)
+
+ # Now that units have been converted, set the tick locations.
+ if orientation == 'vertical':
+ tick_label_axis = self.xaxis
+ tick_label_position = x
+ else: # horizontal
+ tick_label_axis = self.yaxis
+ tick_label_position = y
+
+ if not isinstance(label, str) and np.iterable(label):
+ bar_container_label = '_nolegend_'
+ patch_labels = label
+ else:
+ bar_container_label = label
+ patch_labels = ['_nolegend_'] * len(x)
+ if len(patch_labels) != len(x):
+ raise ValueError(f'number of labels ({len(patch_labels)}) '
+ f'does not match number of bars ({len(x)}).')
+
+ linewidth = itertools.cycle(np.atleast_1d(linewidth))
+ hatch = itertools.cycle(np.atleast_1d(hatch))
+ facecolor = itertools.chain(itertools.cycle(facecolor),
+ # Fallback if color == "none".
+ itertools.repeat('none'))
+ if edgecolor is None:
+ edgecolor = itertools.repeat(None)
+ else:
+ edgecolor = itertools.chain(
+ itertools.cycle(mcolors.to_rgba_array(edgecolor)),
+ # Fallback if edgecolor == "none".
+ itertools.repeat('none'))
+
+ # We will now resolve the alignment and really have
+ # left, bottom, width, height vectors
+ _api.check_in_list(['center', 'edge'], align=align)
+ if align == 'center':
+ if orientation == 'vertical':
+ try:
+ left = x - width / 2
+ except TypeError as e:
+ raise TypeError(f'the dtypes of parameters x ({x.dtype}) '
+ f'and width ({width.dtype}) '
+ f'are incompatible') from e
+ bottom = y
+ else: # horizontal
+ try:
+ bottom = y - height / 2
+ except TypeError as e:
+ raise TypeError(f'the dtypes of parameters y ({y.dtype}) '
+ f'and height ({height.dtype}) '
+ f'are incompatible') from e
+ left = x
+ else: # edge
+ left = x
+ bottom = y
+
+ patches = []
+ args = zip(left, bottom, width, height, facecolor, edgecolor, linewidth,
+ hatch, patch_labels)
+ for l, b, w, h, c, e, lw, htch, lbl in args:
+ r = mpatches.Rectangle(
+ xy=(l, b), width=w, height=h,
+ facecolor=c,
+ edgecolor=e,
+ linewidth=lw,
+ label=lbl,
+ hatch=htch,
+ )
+ r._internal_update(kwargs)
+ r.get_path()._interpolation_steps = 100
+ if orientation == 'vertical':
+ r.sticky_edges.y.append(b)
+ else: # horizontal
+ r.sticky_edges.x.append(l)
+ self.add_patch(r)
+ patches.append(r)
+
+ if xerr is not None or yerr is not None:
+ if orientation == 'vertical':
+ # using list comps rather than arrays to preserve unit info
+ ex = [l + 0.5 * w for l, w in zip(left, width)]
+ ey = [b + h for b, h in zip(bottom, height)]
+
+ else: # horizontal
+ # using list comps rather than arrays to preserve unit info
+ ex = [l + w for l, w in zip(left, width)]
+ ey = [b + 0.5 * h for b, h in zip(bottom, height)]
+
+ error_kw.setdefault("label", '_nolegend_')
+
+ errorbar = self.errorbar(ex, ey, yerr=yerr, xerr=xerr, fmt='none',
+ **error_kw)
+ else:
+ errorbar = None
+
+ self._request_autoscale_view()
+
+ if orientation == 'vertical':
+ datavalues = height
+ else: # horizontal
+ datavalues = width
+
+ bar_container = BarContainer(patches, errorbar, datavalues=datavalues,
+ orientation=orientation,
+ label=bar_container_label)
+ self.add_container(bar_container)
+
+ if tick_labels is not None:
+ tick_labels = np.broadcast_to(tick_labels, len(patches))
+ tick_label_axis.set_ticks(tick_label_position)
+ tick_label_axis.set_ticklabels(tick_labels)
+
+ return bar_container
+
+ # @_preprocess_data() # let 'bar' do the unpacking..
+ @_docstring.interpd
+ def barh(self, y, width, height=0.8, left=None, *, align="center",
+ data=None, **kwargs):
+ r"""
+ Make a horizontal bar plot.
+
+ The bars are positioned at *y* with the given *align*\ment. Their
+ dimensions are given by *width* and *height*. The horizontal baseline
+ is *left* (default 0).
+
+ Many parameters can take either a single value applying to all bars
+ or a sequence of values, one for each bar.
+
+ Parameters
+ ----------
+ y : float or array-like
+ The y coordinates of the bars. See also *align* for the
+ alignment of the bars to the coordinates.
+
+ Bars are often used for categorical data, i.e. string labels below
+ the bars. You can provide a list of strings directly to *y*.
+ ``barh(['A', 'B', 'C'], [1, 2, 3])`` is often a shorter and more
+ convenient notation compared to
+ ``barh(range(3), [1, 2, 3], tick_label=['A', 'B', 'C'])``. They are
+ equivalent as long as the names are unique. The explicit *tick_label*
+ notation draws the names in the sequence given. However, when having
+ duplicate values in categorical *y* data, these values map to the same
+ numerical y coordinate, and hence the corresponding bars are drawn on
+ top of each other.
+
+ width : float or array-like
+ The width(s) of the bars.
+
+ Note that if *left* has units (e.g. datetime), *width* should be in
+ units that are a difference from the value of *left* (e.g. timedelta).
+
+ height : float or array-like, default: 0.8
+ The heights of the bars.
+
+ Note that if *y* has units (e.g. datetime), then *height* should be in
+ units that are a difference (e.g. timedelta) around the *y* values.
+
+ left : float or array-like, default: 0
+ The x coordinates of the left side(s) of the bars.
+
+ Note that if *left* has units, then the x-axis will get a Locator and
+ Formatter appropriate for the units (e.g. dates, or categorical).
+
+ align : {'center', 'edge'}, default: 'center'
+ Alignment of the base to the *y* coordinates*:
+
+ - 'center': Center the bars on the *y* positions.
+ - 'edge': Align the bottom edges of the bars with the *y*
+ positions.
+
+ To align the bars on the top edge pass a negative *height* and
+ ``align='edge'``.
+
+ Returns
+ -------
+ `.BarContainer`
+ Container with all the bars and optionally errorbars.
+
+ Other Parameters
+ ----------------
+ color : :mpltype:`color` or list of :mpltype:`color`, optional
+ The colors of the bar faces.
+
+ edgecolor : :mpltype:`color` or list of :mpltype:`color`, optional
+ The colors of the bar edges.
+
+ linewidth : float or array-like, optional
+ Width of the bar edge(s). If 0, don't draw edges.
+
+ tick_label : str or list of str, optional
+ The tick labels of the bars.
+ Default: None (Use default numeric labels.)
+
+ label : str or list of str, optional
+ A single label is attached to the resulting `.BarContainer` as a
+ label for the whole dataset.
+ If a list is provided, it must be the same length as *y* and
+ labels the individual bars. Repeated labels are not de-duplicated
+ and will cause repeated label entries, so this is best used when
+ bars also differ in style (e.g., by passing a list to *color*.)
+
+ xerr, yerr : float or array-like of shape(N,) or shape(2, N), optional
+ If not *None*, add horizontal / vertical errorbars to the bar tips.
+ The values are +/- sizes relative to the data:
+
+ - scalar: symmetric +/- values for all bars
+ - shape(N,): symmetric +/- values for each bar
+ - shape(2, N): Separate - and + values for each bar. First row
+ contains the lower errors, the second row contains the upper
+ errors.
+ - *None*: No errorbar. (default)
+
+ See :doc:`/gallery/statistics/errorbar_features` for an example on
+ the usage of *xerr* and *yerr*.
+
+ ecolor : :mpltype:`color` or list of :mpltype:`color`, default: 'black'
+ The line color of the errorbars.
+
+ capsize : float, default: :rc:`errorbar.capsize`
+ The length of the error bar caps in points.
+
+ error_kw : dict, optional
+ Dictionary of keyword arguments to be passed to the
+ `~.Axes.errorbar` method. Values of *ecolor* or *capsize* defined
+ here take precedence over the independent keyword arguments.
+
+ log : bool, default: False
+ If ``True``, set the x-axis to be log scale.
+
+ data : indexable object, optional
+ If given, all parameters also accept a string ``s``, which is
+ interpreted as ``data[s]`` if ``s`` is a key in ``data``.
+
+ **kwargs : `.Rectangle` properties
+
+ %(Rectangle:kwdoc)s
+
+ See Also
+ --------
+ bar : Plot a vertical bar plot.
+
+ Notes
+ -----
+ Stacked bars can be achieved by passing individual *left* values per
+ bar. See
+ :doc:`/gallery/lines_bars_and_markers/horizontal_barchart_distribution`.
+ """
+ kwargs.setdefault('orientation', 'horizontal')
+ patches = self.bar(x=left, height=height, width=width, bottom=y,
+ align=align, data=data, **kwargs)
+ return patches
+
+ def bar_label(self, container, labels=None, *, fmt="%g", label_type="edge",
+ padding=0, **kwargs):
+ """
+ Label a bar plot.
+
+ Adds labels to bars in the given `.BarContainer`.
+ You may need to adjust the axis limits to fit the labels.
+
+ Parameters
+ ----------
+ container : `.BarContainer`
+ Container with all the bars and optionally errorbars, likely
+ returned from `.bar` or `.barh`.
+
+ labels : array-like, optional
+ A list of label texts, that should be displayed. If not given, the
+ label texts will be the data values formatted with *fmt*.
+
+ fmt : str or callable, default: '%g'
+ An unnamed %-style or {}-style format string for the label or a
+ function to call with the value as the first argument.
+ When *fmt* is a string and can be interpreted in both formats,
+ %-style takes precedence over {}-style.
+
+ .. versionadded:: 3.7
+ Support for {}-style format string and callables.
+
+ label_type : {'edge', 'center'}, default: 'edge'
+ The label type. Possible values:
+
+ - 'edge': label placed at the end-point of the bar segment, and the
+ value displayed will be the position of that end-point.
+ - 'center': label placed in the center of the bar segment, and the
+ value displayed will be the length of that segment.
+ (useful for stacked bars, i.e.,
+ :doc:`/gallery/lines_bars_and_markers/bar_label_demo`)
+
+ padding : float, default: 0
+ Distance of label from the end of the bar, in points.
+
+ **kwargs
+ Any remaining keyword arguments are passed through to
+ `.Axes.annotate`. The alignment parameters (
+ *horizontalalignment* / *ha*, *verticalalignment* / *va*) are
+ not supported because the labels are automatically aligned to
+ the bars.
+
+ Returns
+ -------
+ list of `.Annotation`
+ A list of `.Annotation` instances for the labels.
+ """
+ for key in ['horizontalalignment', 'ha', 'verticalalignment', 'va']:
+ if key in kwargs:
+ raise ValueError(
+ f"Passing {key!r} to bar_label() is not supported.")
+
+ a, b = self.yaxis.get_view_interval()
+ y_inverted = a > b
+ c, d = self.xaxis.get_view_interval()
+ x_inverted = c > d
+
+ # want to know whether to put label on positive or negative direction
+ # cannot use np.sign here because it will return 0 if x == 0
+ def sign(x):
+ return 1 if x >= 0 else -1
+
+ _api.check_in_list(['edge', 'center'], label_type=label_type)
+
+ bars = container.patches
+ errorbar = container.errorbar
+ datavalues = container.datavalues
+ orientation = container.orientation
+
+ if errorbar:
+ # check "ErrorbarContainer" for the definition of these elements
+ lines = errorbar.lines # attribute of "ErrorbarContainer" (tuple)
+ barlinecols = lines[2] # 0: data_line, 1: caplines, 2: barlinecols
+ barlinecol = barlinecols[0] # the "LineCollection" of error bars
+ errs = barlinecol.get_segments()
+ else:
+ errs = []
+
+ if labels is None:
+ labels = []
+
+ annotations = []
+
+ for bar, err, dat, lbl in itertools.zip_longest(
+ bars, errs, datavalues, labels
+ ):
+ (x0, y0), (x1, y1) = bar.get_bbox().get_points()
+ xc, yc = (x0 + x1) / 2, (y0 + y1) / 2
+
+ if orientation == "vertical":
+ extrema = max(y0, y1) if dat >= 0 else min(y0, y1)
+ length = abs(y0 - y1)
+ else: # horizontal
+ extrema = max(x0, x1) if dat >= 0 else min(x0, x1)
+ length = abs(x0 - x1)
+
+ if err is None or np.size(err) == 0:
+ endpt = extrema
+ elif orientation == "vertical":
+ endpt = err[:, 1].max() if dat >= 0 else err[:, 1].min()
+ else: # horizontal
+ endpt = err[:, 0].max() if dat >= 0 else err[:, 0].min()
+
+ if label_type == "center":
+ value = sign(dat) * length
+ else: # edge
+ value = extrema
+
+ if label_type == "center":
+ xy = (0.5, 0.5)
+ kwargs["xycoords"] = (
+ lambda r, b=bar:
+ mtransforms.Bbox.intersection(
+ b.get_window_extent(r), b.get_clip_box()
+ ) or mtransforms.Bbox.null()
+ )
+ else: # edge
+ if orientation == "vertical":
+ xy = xc, endpt
+ else: # horizontal
+ xy = endpt, yc
+
+ if orientation == "vertical":
+ y_direction = -1 if y_inverted else 1
+ xytext = 0, y_direction * sign(dat) * padding
+ else: # horizontal
+ x_direction = -1 if x_inverted else 1
+ xytext = x_direction * sign(dat) * padding, 0
+
+ if label_type == "center":
+ ha, va = "center", "center"
+ else: # edge
+ if orientation == "vertical":
+ ha = 'center'
+ if y_inverted:
+ va = 'top' if dat > 0 else 'bottom' # also handles NaN
+ else:
+ va = 'top' if dat < 0 else 'bottom' # also handles NaN
+ else: # horizontal
+ if x_inverted:
+ ha = 'right' if dat > 0 else 'left' # also handles NaN
+ else:
+ ha = 'right' if dat < 0 else 'left' # also handles NaN
+ va = 'center'
+
+ if np.isnan(dat):
+ lbl = ''
+
+ if lbl is None:
+ if isinstance(fmt, str):
+ lbl = cbook._auto_format_str(fmt, value)
+ elif callable(fmt):
+ lbl = fmt(value)
+ else:
+ raise TypeError("fmt must be a str or callable")
+ annotation = self.annotate(lbl,
+ xy, xytext, textcoords="offset points",
+ ha=ha, va=va, **kwargs)
+ annotations.append(annotation)
+
+ return annotations
+
+ @_preprocess_data()
+ @_docstring.interpd
+ def broken_barh(self, xranges, yrange, **kwargs):
+ """
+ Plot a horizontal sequence of rectangles.
+
+ A rectangle is drawn for each element of *xranges*. All rectangles
+ have the same vertical position and size defined by *yrange*.
+
+ Parameters
+ ----------
+ xranges : sequence of tuples (*xmin*, *xwidth*)
+ The x-positions and extents of the rectangles. For each tuple
+ (*xmin*, *xwidth*) a rectangle is drawn from *xmin* to *xmin* +
+ *xwidth*.
+ yrange : (*ymin*, *yheight*)
+ The y-position and extent for all the rectangles.
+
+ Returns
+ -------
+ `~.collections.PolyCollection`
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+ **kwargs : `.PolyCollection` properties
+
+ Each *kwarg* can be either a single argument applying to all
+ rectangles, e.g.::
+
+ facecolors='black'
+
+ or a sequence of arguments over which is cycled, e.g.::
+
+ facecolors=('black', 'blue')
+
+ would create interleaving black and blue rectangles.
+
+ Supported keywords:
+
+ %(PolyCollection:kwdoc)s
+ """
+ # process the unit information
+ xdata = cbook._safe_first_finite(xranges) if len(xranges) else None
+ ydata = cbook._safe_first_finite(yrange) if len(yrange) else None
+ self._process_unit_info(
+ [("x", xdata), ("y", ydata)], kwargs, convert=False)
+
+ vertices = []
+ y0, dy = yrange
+ y0, y1 = self.convert_yunits((y0, y0 + dy))
+ for xr in xranges: # convert the absolute values, not the x and dx
+ try:
+ x0, dx = xr
+ except Exception:
+ raise ValueError(
+ "each range in xrange must be a sequence with two "
+ "elements (i.e. xrange must be an (N, 2) array)") from None
+ x0, x1 = self.convert_xunits((x0, x0 + dx))
+ vertices.append([(x0, y0), (x0, y1), (x1, y1), (x1, y0)])
+
+ col = mcoll.PolyCollection(np.array(vertices), **kwargs)
+ self.add_collection(col, autolim=True)
+ self._request_autoscale_view()
+
+ return col
+
+ @_preprocess_data()
+ def stem(self, *args, linefmt=None, markerfmt=None, basefmt=None, bottom=0,
+ label=None, orientation='vertical'):
+ """
+ Create a stem plot.
+
+ A stem plot draws lines perpendicular to a baseline at each location
+ *locs* from the baseline to *heads*, and places a marker there. For
+ vertical stem plots (the default), the *locs* are *x* positions, and
+ the *heads* are *y* values. For horizontal stem plots, the *locs* are
+ *y* positions, and the *heads* are *x* values.
+
+ Call signature::
+
+ stem([locs,] heads, linefmt=None, markerfmt=None, basefmt=None)
+
+ The *locs*-positions are optional. *linefmt* may be provided as
+ positional, but all other formats must be provided as keyword
+ arguments.
+
+ Parameters
+ ----------
+ locs : array-like, default: (0, 1, ..., len(heads) - 1)
+ For vertical stem plots, the x-positions of the stems.
+ For horizontal stem plots, the y-positions of the stems.
+
+ heads : array-like
+ For vertical stem plots, the y-values of the stem heads.
+ For horizontal stem plots, the x-values of the stem heads.
+
+ linefmt : str, optional
+ A string defining the color and/or linestyle of the vertical lines:
+
+ ========= =============
+ Character Line Style
+ ========= =============
+ ``'-'`` solid line
+ ``'--'`` dashed line
+ ``'-.'`` dash-dot line
+ ``':'`` dotted line
+ ========= =============
+
+ Default: 'C0-', i.e. solid line with the first color of the color
+ cycle.
+
+ Note: Markers specified through this parameter (e.g. 'x') will be
+ silently ignored. Instead, markers should be specified using
+ *markerfmt*.
+
+ markerfmt : str, optional
+ A string defining the color and/or shape of the markers at the stem
+ heads. If the marker is not given, use the marker 'o', i.e. filled
+ circles. If the color is not given, use the color from *linefmt*.
+
+ basefmt : str, default: 'C3-' ('C2-' in classic mode)
+ A format string defining the properties of the baseline.
+
+ orientation : {'vertical', 'horizontal'}, default: 'vertical'
+ The orientation of the stems.
+
+ bottom : float, default: 0
+ The y/x-position of the baseline (depending on *orientation*).
+
+ label : str, optional
+ The label to use for the stems in legends.
+
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ Returns
+ -------
+ `.StemContainer`
+ The container may be treated like a tuple
+ (*markerline*, *stemlines*, *baseline*)
+
+ Notes
+ -----
+ .. seealso::
+ The MATLAB function
+ `stem `_
+ which inspired this method.
+ """
+ if not 1 <= len(args) <= 3:
+ raise _api.nargs_error('stem', '1-3', len(args))
+ _api.check_in_list(['horizontal', 'vertical'], orientation=orientation)
+
+ if len(args) == 1:
+ heads, = args
+ locs = np.arange(len(heads))
+ args = ()
+ elif isinstance(args[1], str):
+ heads, *args = args
+ locs = np.arange(len(heads))
+ else:
+ locs, heads, *args = args
+
+ if orientation == 'vertical':
+ locs, heads = self._process_unit_info([("x", locs), ("y", heads)])
+ else: # horizontal
+ heads, locs = self._process_unit_info([("x", heads), ("y", locs)])
+
+ heads = cbook._check_1d(heads)
+ locs = cbook._check_1d(locs)
+
+ # resolve line format
+ if linefmt is None:
+ linefmt = args[0] if len(args) > 0 else "C0-"
+ linestyle, linemarker, linecolor = _process_plot_format(linefmt)
+
+ # resolve marker format
+ if markerfmt is None:
+ # if not given as kwarg, fall back to 'o'
+ markerfmt = "o"
+ if markerfmt == '':
+ markerfmt = ' ' # = empty line style; '' would resolve rcParams
+ markerstyle, markermarker, markercolor = \
+ _process_plot_format(markerfmt)
+ if markermarker is None:
+ markermarker = 'o'
+ if markerstyle is None:
+ markerstyle = 'None'
+ if markercolor is None:
+ markercolor = linecolor
+
+ # resolve baseline format
+ if basefmt is None:
+ basefmt = ("C2-" if mpl.rcParams["_internal.classic_mode"] else
+ "C3-")
+ basestyle, basemarker, basecolor = _process_plot_format(basefmt)
+
+ # New behaviour in 3.1 is to use a LineCollection for the stemlines
+ if linestyle is None:
+ linestyle = mpl.rcParams['lines.linestyle']
+ xlines = self.vlines if orientation == "vertical" else self.hlines
+ stemlines = xlines(
+ locs, bottom, heads,
+ colors=linecolor, linestyles=linestyle, label="_nolegend_")
+
+ if orientation == 'horizontal':
+ marker_x = heads
+ marker_y = locs
+ baseline_x = [bottom, bottom]
+ baseline_y = [np.min(locs), np.max(locs)]
+ else:
+ marker_x = locs
+ marker_y = heads
+ baseline_x = [np.min(locs), np.max(locs)]
+ baseline_y = [bottom, bottom]
+
+ markerline, = self.plot(marker_x, marker_y,
+ color=markercolor, linestyle=markerstyle,
+ marker=markermarker, label="_nolegend_")
+
+ baseline, = self.plot(baseline_x, baseline_y,
+ color=basecolor, linestyle=basestyle,
+ marker=basemarker, label="_nolegend_")
+
+ stem_container = StemContainer((markerline, stemlines, baseline),
+ label=label)
+ self.add_container(stem_container)
+ return stem_container
+
+ @_api.make_keyword_only("3.10", "explode")
+ @_preprocess_data(replace_names=["x", "explode", "labels", "colors"])
+ def pie(self, x, explode=None, labels=None, colors=None,
+ autopct=None, pctdistance=0.6, shadow=False, labeldistance=1.1,
+ startangle=0, radius=1, counterclock=True,
+ wedgeprops=None, textprops=None, center=(0, 0),
+ frame=False, rotatelabels=False, *, normalize=True, hatch=None):
+ """
+ Plot a pie chart.
+
+ Make a pie chart of array *x*. The fractional area of each wedge is
+ given by ``x/sum(x)``.
+
+ The wedges are plotted counterclockwise, by default starting from the
+ x-axis.
+
+ Parameters
+ ----------
+ x : 1D array-like
+ The wedge sizes.
+
+ explode : array-like, default: None
+ If not *None*, is a ``len(x)`` array which specifies the fraction
+ of the radius with which to offset each wedge.
+
+ labels : list, default: None
+ A sequence of strings providing the labels for each wedge
+
+ colors : :mpltype:`color` or list of :mpltype:`color`, default: None
+ A sequence of colors through which the pie chart will cycle. If
+ *None*, will use the colors in the currently active cycle.
+
+ hatch : str or list, default: None
+ Hatching pattern applied to all pie wedges or sequence of patterns
+ through which the chart will cycle. For a list of valid patterns,
+ see :doc:`/gallery/shapes_and_collections/hatch_style_reference`.
+
+ .. versionadded:: 3.7
+
+ autopct : None or str or callable, default: None
+ If not *None*, *autopct* is a string or function used to label the
+ wedges with their numeric value. The label will be placed inside
+ the wedge. If *autopct* is a format string, the label will be
+ ``fmt % pct``. If *autopct* is a function, then it will be called.
+
+ pctdistance : float, default: 0.6
+ The relative distance along the radius at which the text
+ generated by *autopct* is drawn. To draw the text outside the pie,
+ set *pctdistance* > 1. This parameter is ignored if *autopct* is
+ ``None``.
+
+ labeldistance : float or None, default: 1.1
+ The relative distance along the radius at which the labels are
+ drawn. To draw the labels inside the pie, set *labeldistance* < 1.
+ If set to ``None``, labels are not drawn but are still stored for
+ use in `.legend`.
+
+ shadow : bool or dict, default: False
+ If bool, whether to draw a shadow beneath the pie. If dict, draw a shadow
+ passing the properties in the dict to `.Shadow`.
+
+ .. versionadded:: 3.8
+ *shadow* can be a dict.
+
+ startangle : float, default: 0 degrees
+ The angle by which the start of the pie is rotated,
+ counterclockwise from the x-axis.
+
+ radius : float, default: 1
+ The radius of the pie.
+
+ counterclock : bool, default: True
+ Specify fractions direction, clockwise or counterclockwise.
+
+ wedgeprops : dict, default: None
+ Dict of arguments passed to each `.patches.Wedge` of the pie.
+ For example, ``wedgeprops = {'linewidth': 3}`` sets the width of
+ the wedge border lines equal to 3. By default, ``clip_on=False``.
+ When there is a conflict between these properties and other
+ keywords, properties passed to *wedgeprops* take precedence.
+
+ textprops : dict, default: None
+ Dict of arguments to pass to the text objects.
+
+ center : (float, float), default: (0, 0)
+ The coordinates of the center of the chart.
+
+ frame : bool, default: False
+ Plot Axes frame with the chart if true.
+
+ rotatelabels : bool, default: False
+ Rotate each label to the angle of the corresponding slice if true.
+
+ normalize : bool, default: True
+ When *True*, always make a full pie by normalizing x so that
+ ``sum(x) == 1``. *False* makes a partial pie if ``sum(x) <= 1``
+ and raises a `ValueError` for ``sum(x) > 1``.
+
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ Returns
+ -------
+ patches : list
+ A sequence of `matplotlib.patches.Wedge` instances
+
+ texts : list
+ A list of the label `.Text` instances.
+
+ autotexts : list
+ A list of `.Text` instances for the numeric labels. This will only
+ be returned if the parameter *autopct* is not *None*.
+
+ Notes
+ -----
+ The pie chart will probably look best if the figure and Axes are
+ square, or the Axes aspect is equal.
+ This method sets the aspect ratio of the axis to "equal".
+ The Axes aspect ratio can be controlled with `.Axes.set_aspect`.
+ """
+ self.set_aspect('equal')
+ # The use of float32 is "historical", but can't be changed without
+ # regenerating the test baselines.
+ x = np.asarray(x, np.float32)
+ if x.ndim > 1:
+ raise ValueError("x must be 1D")
+
+ if np.any(x < 0):
+ raise ValueError("Wedge sizes 'x' must be non negative values")
+
+ sx = x.sum()
+
+ if normalize:
+ x = x / sx
+ elif sx > 1:
+ raise ValueError('Cannot plot an unnormalized pie with sum(x) > 1')
+ if labels is None:
+ labels = [''] * len(x)
+ if explode is None:
+ explode = [0] * len(x)
+ if len(x) != len(labels):
+ raise ValueError(f"'labels' must be of length 'x', not {len(labels)}")
+ if len(x) != len(explode):
+ raise ValueError(f"'explode' must be of length 'x', not {len(explode)}")
+ if colors is None:
+ get_next_color = self._get_patches_for_fill.get_next_color
+ else:
+ color_cycle = itertools.cycle(colors)
+
+ def get_next_color():
+ return next(color_cycle)
+
+ hatch_cycle = itertools.cycle(np.atleast_1d(hatch))
+
+ _api.check_isinstance(Real, radius=radius, startangle=startangle)
+ if radius <= 0:
+ raise ValueError(f"'radius' must be a positive number, not {radius}")
+
+ # Starting theta1 is the start fraction of the circle
+ theta1 = startangle / 360
+
+ if wedgeprops is None:
+ wedgeprops = {}
+ if textprops is None:
+ textprops = {}
+
+ texts = []
+ slices = []
+ autotexts = []
+
+ for frac, label, expl in zip(x, labels, explode):
+ x, y = center
+ theta2 = (theta1 + frac) if counterclock else (theta1 - frac)
+ thetam = 2 * np.pi * 0.5 * (theta1 + theta2)
+ x += expl * math.cos(thetam)
+ y += expl * math.sin(thetam)
+
+ w = mpatches.Wedge((x, y), radius, 360. * min(theta1, theta2),
+ 360. * max(theta1, theta2),
+ facecolor=get_next_color(),
+ hatch=next(hatch_cycle),
+ clip_on=False,
+ label=label)
+ w.set(**wedgeprops)
+ slices.append(w)
+ self.add_patch(w)
+
+ if shadow:
+ # Make sure to add a shadow after the call to add_patch so the
+ # figure and transform props will be set.
+ shadow_dict = {'ox': -0.02, 'oy': -0.02, 'label': '_nolegend_'}
+ if isinstance(shadow, dict):
+ shadow_dict.update(shadow)
+ self.add_patch(mpatches.Shadow(w, **shadow_dict))
+
+ if labeldistance is not None:
+ xt = x + labeldistance * radius * math.cos(thetam)
+ yt = y + labeldistance * radius * math.sin(thetam)
+ label_alignment_h = 'left' if xt > 0 else 'right'
+ label_alignment_v = 'center'
+ label_rotation = 'horizontal'
+ if rotatelabels:
+ label_alignment_v = 'bottom' if yt > 0 else 'top'
+ label_rotation = (np.rad2deg(thetam)
+ + (0 if xt > 0 else 180))
+ t = self.text(xt, yt, label,
+ clip_on=False,
+ horizontalalignment=label_alignment_h,
+ verticalalignment=label_alignment_v,
+ rotation=label_rotation,
+ size=mpl.rcParams['xtick.labelsize'])
+ t.set(**textprops)
+ texts.append(t)
+
+ if autopct is not None:
+ xt = x + pctdistance * radius * math.cos(thetam)
+ yt = y + pctdistance * radius * math.sin(thetam)
+ if isinstance(autopct, str):
+ s = autopct % (100. * frac)
+ elif callable(autopct):
+ s = autopct(100. * frac)
+ else:
+ raise TypeError(
+ 'autopct must be callable or a format string')
+ if mpl._val_or_rc(textprops.get("usetex"), "text.usetex"):
+ # escape % (i.e. \%) if it is not already escaped
+ s = re.sub(r"([^\\])%", r"\1\\%", s)
+ t = self.text(xt, yt, s,
+ clip_on=False,
+ horizontalalignment='center',
+ verticalalignment='center')
+ t.set(**textprops)
+ autotexts.append(t)
+
+ theta1 = theta2
+
+ if frame:
+ self._request_autoscale_view()
+ else:
+ self.set(frame_on=False, xticks=[], yticks=[],
+ xlim=(-1.25 + center[0], 1.25 + center[0]),
+ ylim=(-1.25 + center[1], 1.25 + center[1]))
+
+ if autopct is None:
+ return slices, texts
+ else:
+ return slices, texts, autotexts
+
+ @staticmethod
+ def _errorevery_to_mask(x, errorevery):
+ """
+ Normalize `errorbar`'s *errorevery* to be a boolean mask for data *x*.
+
+ This function is split out to be usable both by 2D and 3D errorbars.
+ """
+ if isinstance(errorevery, Integral):
+ errorevery = (0, errorevery)
+ if isinstance(errorevery, tuple):
+ if (len(errorevery) == 2 and
+ isinstance(errorevery[0], Integral) and
+ isinstance(errorevery[1], Integral)):
+ errorevery = slice(errorevery[0], None, errorevery[1])
+ else:
+ raise ValueError(
+ f'{errorevery=!r} is a not a tuple of two integers')
+ elif isinstance(errorevery, slice):
+ pass
+ elif not isinstance(errorevery, str) and np.iterable(errorevery):
+ try:
+ x[errorevery] # fancy indexing
+ except (ValueError, IndexError) as err:
+ raise ValueError(
+ f"{errorevery=!r} is iterable but not a valid NumPy fancy "
+ "index to match 'xerr'/'yerr'") from err
+ else:
+ raise ValueError(f"{errorevery=!r} is not a recognized value")
+ everymask = np.zeros(len(x), bool)
+ everymask[errorevery] = True
+ return everymask
+
+ @_api.make_keyword_only("3.10", "ecolor")
+ @_preprocess_data(replace_names=["x", "y", "xerr", "yerr"],
+ label_namer="y")
+ @_docstring.interpd
+ def errorbar(self, x, y, yerr=None, xerr=None,
+ fmt='', ecolor=None, elinewidth=None, capsize=None,
+ barsabove=False, lolims=False, uplims=False,
+ xlolims=False, xuplims=False, errorevery=1, capthick=None,
+ **kwargs):
+ """
+ Plot y versus x as lines and/or markers with attached errorbars.
+
+ *x*, *y* define the data locations, *xerr*, *yerr* define the errorbar
+ sizes. By default, this draws the data markers/lines as well as the
+ errorbars. Use fmt='none' to draw errorbars without any data markers.
+
+ .. versionadded:: 3.7
+ Caps and error lines are drawn in polar coordinates on polar plots.
+
+
+ Parameters
+ ----------
+ x, y : float or array-like
+ The data positions.
+
+ xerr, yerr : float or array-like, shape(N,) or shape(2, N), optional
+ The errorbar sizes:
+
+ - scalar: Symmetric +/- values for all data points.
+ - shape(N,): Symmetric +/-values for each data point.
+ - shape(2, N): Separate - and + values for each bar. First row
+ contains the lower errors, the second row contains the upper
+ errors.
+ - *None*: No errorbar.
+
+ All values must be >= 0.
+
+ See :doc:`/gallery/statistics/errorbar_features`
+ for an example on the usage of ``xerr`` and ``yerr``.
+
+ fmt : str, default: ''
+ The format for the data points / data lines. See `.plot` for
+ details.
+
+ Use 'none' (case-insensitive) to plot errorbars without any data
+ markers.
+
+ ecolor : :mpltype:`color`, default: None
+ The color of the errorbar lines. If None, use the color of the
+ line connecting the markers.
+
+ elinewidth : float, default: None
+ The linewidth of the errorbar lines. If None, the linewidth of
+ the current style is used.
+
+ capsize : float, default: :rc:`errorbar.capsize`
+ The length of the error bar caps in points.
+
+ capthick : float, default: None
+ An alias to the keyword argument *markeredgewidth* (a.k.a. *mew*).
+ This setting is a more sensible name for the property that
+ controls the thickness of the error bar cap in points. For
+ backwards compatibility, if *mew* or *markeredgewidth* are given,
+ then they will over-ride *capthick*. This may change in future
+ releases.
+
+ barsabove : bool, default: False
+ If True, will plot the errorbars above the plot
+ symbols. Default is below.
+
+ lolims, uplims, xlolims, xuplims : bool or array-like, default: False
+ These arguments can be used to indicate that a value gives only
+ upper/lower limits. In that case a caret symbol is used to
+ indicate this. *lims*-arguments may be scalars, or array-likes of
+ the same length as *xerr* and *yerr*. To use limits with inverted
+ axes, `~.Axes.set_xlim` or `~.Axes.set_ylim` must be called before
+ :meth:`errorbar`. Note the tricky parameter names: setting e.g.
+ *lolims* to True means that the y-value is a *lower* limit of the
+ True value, so, only an *upward*-pointing arrow will be drawn!
+
+ errorevery : int or (int, int), default: 1
+ draws error bars on a subset of the data. *errorevery* =N draws
+ error bars on the points (x[::N], y[::N]).
+ *errorevery* =(start, N) draws error bars on the points
+ (x[start::N], y[start::N]). e.g. errorevery=(6, 3)
+ adds error bars to the data at (x[6], x[9], x[12], x[15], ...).
+ Used to avoid overlapping error bars when two series share x-axis
+ values.
+
+ Returns
+ -------
+ `.ErrorbarContainer`
+ The container contains:
+
+ - data_line : A `~matplotlib.lines.Line2D` instance of x, y plot markers
+ and/or line.
+ - caplines : A tuple of `~matplotlib.lines.Line2D` instances of the error
+ bar caps.
+ - barlinecols : A tuple of `.LineCollection` with the horizontal and
+ vertical error ranges.
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ All other keyword arguments are passed on to the `~.Axes.plot` call
+ drawing the markers. For example, this code makes big red squares
+ with thick green edges::
+
+ x, y, yerr = rand(3, 10)
+ errorbar(x, y, yerr, marker='s', mfc='red',
+ mec='green', ms=20, mew=4)
+
+ where *mfc*, *mec*, *ms* and *mew* are aliases for the longer
+ property names, *markerfacecolor*, *markeredgecolor*, *markersize*
+ and *markeredgewidth*.
+
+ Valid kwargs for the marker properties are:
+
+ - *dashes*
+ - *dash_capstyle*
+ - *dash_joinstyle*
+ - *drawstyle*
+ - *fillstyle*
+ - *linestyle*
+ - *marker*
+ - *markeredgecolor*
+ - *markeredgewidth*
+ - *markerfacecolor*
+ - *markerfacecoloralt*
+ - *markersize*
+ - *markevery*
+ - *solid_capstyle*
+ - *solid_joinstyle*
+
+ Refer to the corresponding `.Line2D` property for more details:
+
+ %(Line2D:kwdoc)s
+ """
+ kwargs = cbook.normalize_kwargs(kwargs, mlines.Line2D)
+ # Drop anything that comes in as None to use the default instead.
+ kwargs = {k: v for k, v in kwargs.items() if v is not None}
+ kwargs.setdefault('zorder', 2)
+
+ # Casting to object arrays preserves units.
+ if not isinstance(x, np.ndarray):
+ x = np.asarray(x, dtype=object)
+ if not isinstance(y, np.ndarray):
+ y = np.asarray(y, dtype=object)
+
+ def _upcast_err(err):
+ """
+ Safely handle tuple of containers that carry units.
+
+ This function covers the case where the input to the xerr/yerr is a
+ length 2 tuple of equal length ndarray-subclasses that carry the
+ unit information in the container.
+
+ If we have a tuple of nested numpy array (subclasses), we defer
+ coercing the units to be consistent to the underlying unit
+ library (and implicitly the broadcasting).
+
+ Otherwise, fallback to casting to an object array.
+ """
+
+ if (
+ # make sure it is not a scalar
+ np.iterable(err) and
+ # and it is not empty
+ len(err) > 0 and
+ # and the first element is an array sub-class use
+ # safe_first_element because getitem is index-first not
+ # location first on pandas objects so err[0] almost always
+ # fails.
+ isinstance(cbook._safe_first_finite(err), np.ndarray)
+ ):
+ # Get the type of the first element
+ atype = type(cbook._safe_first_finite(err))
+ # Promote the outer container to match the inner container
+ if atype is np.ndarray:
+ # Converts using np.asarray, because data cannot
+ # be directly passed to init of np.ndarray
+ return np.asarray(err, dtype=object)
+ # If atype is not np.ndarray, directly pass data to init.
+ # This works for types such as unyts and astropy units
+ return atype(err)
+ # Otherwise wrap it in an object array
+ return np.asarray(err, dtype=object)
+
+ if xerr is not None and not isinstance(xerr, np.ndarray):
+ xerr = _upcast_err(xerr)
+ if yerr is not None and not isinstance(yerr, np.ndarray):
+ yerr = _upcast_err(yerr)
+ x, y = np.atleast_1d(x, y) # Make sure all the args are iterable.
+ if len(x) != len(y):
+ raise ValueError("'x' and 'y' must have the same size")
+
+ everymask = self._errorevery_to_mask(x, errorevery)
+
+ label = kwargs.pop("label", None)
+ kwargs['label'] = '_nolegend_'
+
+ # Create the main line and determine overall kwargs for child artists.
+ # We avoid calling self.plot() directly, or self._get_lines(), because
+ # that would call self._process_unit_info again, and do other indirect
+ # data processing.
+ (data_line, base_style), = self._get_lines._plot_args(
+ self, (x, y) if fmt == '' else (x, y, fmt), kwargs, return_kwargs=True)
+
+ # Do this after creating `data_line` to avoid modifying `base_style`.
+ if barsabove:
+ data_line.set_zorder(kwargs['zorder'] - .1)
+ else:
+ data_line.set_zorder(kwargs['zorder'] + .1)
+
+ # Add line to plot, or throw it away and use it to determine kwargs.
+ if fmt.lower() != 'none':
+ self.add_line(data_line)
+ else:
+ data_line = None
+ # Remove alpha=0 color that _get_lines._plot_args returns for
+ # 'none' format, and replace it with user-specified color, if
+ # supplied.
+ base_style.pop('color')
+ if 'color' in kwargs:
+ base_style['color'] = kwargs.pop('color')
+
+ if 'color' not in base_style:
+ base_style['color'] = 'C0'
+ if ecolor is None:
+ ecolor = base_style['color']
+
+ # Eject any line-specific information from format string, as it's not
+ # needed for bars or caps.
+ for key in ['marker', 'markersize', 'markerfacecolor',
+ 'markerfacecoloralt',
+ 'markeredgewidth', 'markeredgecolor', 'markevery',
+ 'linestyle', 'fillstyle', 'drawstyle', 'dash_capstyle',
+ 'dash_joinstyle', 'solid_capstyle', 'solid_joinstyle',
+ 'dashes']:
+ base_style.pop(key, None)
+
+ # Make the style dict for the line collections (the bars).
+ eb_lines_style = {**base_style, 'color': ecolor}
+
+ if elinewidth is not None:
+ eb_lines_style['linewidth'] = elinewidth
+ elif 'linewidth' in kwargs:
+ eb_lines_style['linewidth'] = kwargs['linewidth']
+
+ for key in ('transform', 'alpha', 'zorder', 'rasterized'):
+ if key in kwargs:
+ eb_lines_style[key] = kwargs[key]
+
+ # Make the style dict for caps (the "hats").
+ eb_cap_style = {**base_style, 'linestyle': 'none'}
+ if capsize is None:
+ capsize = mpl.rcParams["errorbar.capsize"]
+ if capsize > 0:
+ eb_cap_style['markersize'] = 2. * capsize
+ if capthick is not None:
+ eb_cap_style['markeredgewidth'] = capthick
+
+ # For backwards-compat, allow explicit setting of
+ # 'markeredgewidth' to over-ride capthick.
+ for key in ('markeredgewidth', 'transform', 'alpha',
+ 'zorder', 'rasterized'):
+ if key in kwargs:
+ eb_cap_style[key] = kwargs[key]
+ eb_cap_style["markeredgecolor"] = ecolor
+
+ barcols = []
+ caplines = {'x': [], 'y': []}
+
+ # Vectorized fancy-indexer.
+ def apply_mask(arrays, mask):
+ return [array[mask] for array in arrays]
+
+ # dep: dependent dataset, indep: independent dataset
+ for (dep_axis, dep, err, lolims, uplims, indep, lines_func,
+ marker, lomarker, himarker) in [
+ ("x", x, xerr, xlolims, xuplims, y, self.hlines,
+ "|", mlines.CARETRIGHTBASE, mlines.CARETLEFTBASE),
+ ("y", y, yerr, lolims, uplims, x, self.vlines,
+ "_", mlines.CARETUPBASE, mlines.CARETDOWNBASE),
+ ]:
+ if err is None:
+ continue
+ lolims = np.broadcast_to(lolims, len(dep)).astype(bool)
+ uplims = np.broadcast_to(uplims, len(dep)).astype(bool)
+ try:
+ np.broadcast_to(err, (2, len(dep)))
+ except ValueError:
+ raise ValueError(
+ f"'{dep_axis}err' (shape: {np.shape(err)}) must be a "
+ f"scalar or a 1D or (2, n) array-like whose shape matches "
+ f"'{dep_axis}' (shape: {np.shape(dep)})") from None
+ if err.dtype is np.dtype(object) and np.any(err == None): # noqa: E711
+ raise ValueError(
+ f"'{dep_axis}err' must not contain None. "
+ "Use NaN if you want to skip a value.")
+
+ # Raise if any errors are negative, but not if they are nan.
+ # To avoid nan comparisons (which lead to warnings on some
+ # platforms), we select with `err==err` (which is False for nan).
+ # Also, since datetime.timedelta cannot be compared with 0,
+ # we compare with the negative error instead.
+ if np.any((check := err[err == err]) < -check):
+ raise ValueError(
+ f"'{dep_axis}err' must not contain negative values")
+ # This is like
+ # elow, ehigh = np.broadcast_to(...)
+ # return dep - elow * ~lolims, dep + ehigh * ~uplims
+ # except that broadcast_to would strip units.
+ low, high = dep + np.vstack([-(1 - lolims), 1 - uplims]) * err
+ barcols.append(lines_func(
+ *apply_mask([indep, low, high], everymask), **eb_lines_style))
+ if self.name == "polar" and dep_axis == "x":
+ for b in barcols:
+ for p in b.get_paths():
+ p._interpolation_steps = 2
+ # Normal errorbars for points without upper/lower limits.
+ nolims = ~(lolims | uplims)
+ if nolims.any() and capsize > 0:
+ indep_masked, lo_masked, hi_masked = apply_mask(
+ [indep, low, high], nolims & everymask)
+ for lh_masked in [lo_masked, hi_masked]:
+ # Since this has to work for x and y as dependent data, we
+ # first set both x and y to the independent variable and
+ # overwrite the respective dependent data in a second step.
+ line = mlines.Line2D(indep_masked, indep_masked,
+ marker=marker, **eb_cap_style)
+ line.set(**{f"{dep_axis}data": lh_masked})
+ caplines[dep_axis].append(line)
+ for idx, (lims, hl) in enumerate([(lolims, high), (uplims, low)]):
+ if not lims.any():
+ continue
+ hlmarker = (
+ himarker
+ if self._axis_map[dep_axis].get_inverted() ^ idx
+ else lomarker)
+ x_masked, y_masked, hl_masked = apply_mask(
+ [x, y, hl], lims & everymask)
+ # As above, we set the dependent data in a second step.
+ line = mlines.Line2D(x_masked, y_masked,
+ marker=hlmarker, **eb_cap_style)
+ line.set(**{f"{dep_axis}data": hl_masked})
+ caplines[dep_axis].append(line)
+ if capsize > 0:
+ caplines[dep_axis].append(mlines.Line2D(
+ x_masked, y_masked, marker=marker, **eb_cap_style))
+ if self.name == 'polar':
+ trans_shift = self.transShift
+ for axis in caplines:
+ for l in caplines[axis]:
+ # Rotate caps to be perpendicular to the error bars
+ for theta, r in zip(l.get_xdata(), l.get_ydata()):
+ rotation = _ScaledRotation(theta=theta, trans_shift=trans_shift)
+ if axis == 'y':
+ rotation += mtransforms.Affine2D().rotate(np.pi / 2)
+ ms = mmarkers.MarkerStyle(marker=marker,
+ transform=rotation)
+ self.add_line(mlines.Line2D([theta], [r], marker=ms,
+ **eb_cap_style))
+ else:
+ for axis in caplines:
+ for l in caplines[axis]:
+ self.add_line(l)
+
+ self._request_autoscale_view()
+ caplines = caplines['x'] + caplines['y']
+ errorbar_container = ErrorbarContainer(
+ (data_line, tuple(caplines), tuple(barcols)),
+ has_xerr=(xerr is not None), has_yerr=(yerr is not None),
+ label=label)
+ self.add_container(errorbar_container)
+
+ return errorbar_container # (l0, caplines, barcols)
+
+ @_api.make_keyword_only("3.10", "notch")
+ @_preprocess_data()
+ @_api.rename_parameter("3.9", "labels", "tick_labels")
+ def boxplot(self, x, notch=None, sym=None, vert=None,
+ orientation='vertical', whis=None, positions=None,
+ widths=None, patch_artist=None, bootstrap=None,
+ usermedians=None, conf_intervals=None,
+ meanline=None, showmeans=None, showcaps=None,
+ showbox=None, showfliers=None, boxprops=None,
+ tick_labels=None, flierprops=None, medianprops=None,
+ meanprops=None, capprops=None, whiskerprops=None,
+ manage_ticks=True, autorange=False, zorder=None,
+ capwidths=None, label=None):
+ """
+ Draw a box and whisker plot.
+
+ The box extends from the first quartile (Q1) to the third
+ quartile (Q3) of the data, with a line at the median.
+ The whiskers extend from the box to the farthest data point
+ lying within 1.5x the inter-quartile range (IQR) from the box.
+ Flier points are those past the end of the whiskers.
+ See https://en.wikipedia.org/wiki/Box_plot for reference.
+
+ .. code-block:: none
+
+ Q1-1.5IQR Q1 median Q3 Q3+1.5IQR
+ |-----:-----|
+ o |--------| : |--------| o o
+ |-----:-----|
+ flier <-----------> fliers
+ IQR
+
+
+ Parameters
+ ----------
+ x : Array or a sequence of vectors.
+ The input data. If a 2D array, a boxplot is drawn for each column
+ in *x*. If a sequence of 1D arrays, a boxplot is drawn for each
+ array in *x*.
+
+ notch : bool, default: :rc:`boxplot.notch`
+ Whether to draw a notched boxplot (`True`), or a rectangular
+ boxplot (`False`). The notches represent the confidence interval
+ (CI) around the median. The documentation for *bootstrap*
+ describes how the locations of the notches are computed by
+ default, but their locations may also be overridden by setting the
+ *conf_intervals* parameter.
+
+ .. note::
+
+ In cases where the values of the CI are less than the
+ lower quartile or greater than the upper quartile, the
+ notches will extend beyond the box, giving it a
+ distinctive "flipped" appearance. This is expected
+ behavior and consistent with other statistical
+ visualization packages.
+
+ sym : str, optional
+ The default symbol for flier points. An empty string ('') hides
+ the fliers. If `None`, then the fliers default to 'b+'. More
+ control is provided by the *flierprops* parameter.
+
+ vert : bool, optional
+ .. deprecated:: 3.11
+ Use *orientation* instead.
+
+ This is a pending deprecation for 3.10, with full deprecation
+ in 3.11 and removal in 3.13.
+ If this is given during the deprecation period, it overrides
+ the *orientation* parameter.
+
+ If True, plots the boxes vertically.
+ If False, plots the boxes horizontally.
+
+ orientation : {'vertical', 'horizontal'}, default: 'vertical'
+ If 'horizontal', plots the boxes horizontally.
+ Otherwise, plots the boxes vertically.
+
+ .. versionadded:: 3.10
+
+ whis : float or (float, float), default: 1.5
+ The position of the whiskers.
+
+ If a float, the lower whisker is at the lowest datum above
+ ``Q1 - whis*(Q3-Q1)``, and the upper whisker at the highest datum
+ below ``Q3 + whis*(Q3-Q1)``, where Q1 and Q3 are the first and
+ third quartiles. The default value of ``whis = 1.5`` corresponds
+ to Tukey's original definition of boxplots.
+
+ If a pair of floats, they indicate the percentiles at which to
+ draw the whiskers (e.g., (5, 95)). In particular, setting this to
+ (0, 100) results in whiskers covering the whole range of the data.
+
+ In the edge case where ``Q1 == Q3``, *whis* is automatically set
+ to (0, 100) (cover the whole range of the data) if *autorange* is
+ True.
+
+ Beyond the whiskers, data are considered outliers and are plotted
+ as individual points.
+
+ bootstrap : int, optional
+ Specifies whether to bootstrap the confidence intervals
+ around the median for notched boxplots. If *bootstrap* is
+ None, no bootstrapping is performed, and notches are
+ calculated using a Gaussian-based asymptotic approximation
+ (see McGill, R., Tukey, J.W., and Larsen, W.A., 1978, and
+ Kendall and Stuart, 1967). Otherwise, bootstrap specifies
+ the number of times to bootstrap the median to determine its
+ 95% confidence intervals. Values between 1000 and 10000 are
+ recommended.
+
+ usermedians : 1D array-like, optional
+ A 1D array-like of length ``len(x)``. Each entry that is not
+ `None` forces the value of the median for the corresponding
+ dataset. For entries that are `None`, the medians are computed
+ by Matplotlib as normal.
+
+ conf_intervals : array-like, optional
+ A 2D array-like of shape ``(len(x), 2)``. Each entry that is not
+ None forces the location of the corresponding notch (which is
+ only drawn if *notch* is `True`). For entries that are `None`,
+ the notches are computed by the method specified by the other
+ parameters (e.g., *bootstrap*).
+
+ positions : array-like, optional
+ The positions of the boxes. The ticks and limits are
+ automatically set to match the positions. Defaults to
+ ``range(1, N+1)`` where N is the number of boxes to be drawn.
+
+ widths : float or array-like
+ The widths of the boxes. The default is 0.5, or ``0.15*(distance
+ between extreme positions)``, if that is smaller.
+
+ patch_artist : bool, default: :rc:`boxplot.patchartist`
+ If `False` produces boxes with the Line2D artist. Otherwise,
+ boxes are drawn with Patch artists.
+
+ tick_labels : list of str, optional
+ The tick labels of each boxplot.
+ Ticks are always placed at the box *positions*. If *tick_labels* is given,
+ the ticks are labelled accordingly. Otherwise, they keep their numeric
+ values.
+
+ .. versionchanged:: 3.9
+ Renamed from *labels*, which is deprecated since 3.9
+ and will be removed in 3.11.
+
+ manage_ticks : bool, default: True
+ If True, the tick locations and labels will be adjusted to match
+ the boxplot positions.
+
+ autorange : bool, default: False
+ When `True` and the data are distributed such that the 25th and
+ 75th percentiles are equal, *whis* is set to (0, 100) such
+ that the whisker ends are at the minimum and maximum of the data.
+
+ meanline : bool, default: :rc:`boxplot.meanline`
+ If `True` (and *showmeans* is `True`), will try to render the
+ mean as a line spanning the full width of the box according to
+ *meanprops* (see below). Not recommended if *shownotches* is also
+ True. Otherwise, means will be shown as points.
+
+ zorder : float, default: ``Line2D.zorder = 2``
+ The zorder of the boxplot.
+
+ Returns
+ -------
+ dict
+ A dictionary mapping each component of the boxplot to a list
+ of the `.Line2D` instances created. That dictionary has the
+ following keys (assuming vertical boxplots):
+
+ - ``boxes``: the main body of the boxplot showing the
+ quartiles and the median's confidence intervals if
+ enabled.
+
+ - ``medians``: horizontal lines at the median of each box.
+
+ - ``whiskers``: the vertical lines extending to the most
+ extreme, non-outlier data points.
+
+ - ``caps``: the horizontal lines at the ends of the
+ whiskers.
+
+ - ``fliers``: points representing data that extend beyond
+ the whiskers (fliers).
+
+ - ``means``: points or lines representing the means.
+
+ Other Parameters
+ ----------------
+ showcaps : bool, default: :rc:`boxplot.showcaps`
+ Show the caps on the ends of whiskers.
+ showbox : bool, default: :rc:`boxplot.showbox`
+ Show the central box.
+ showfliers : bool, default: :rc:`boxplot.showfliers`
+ Show the outliers beyond the caps.
+ showmeans : bool, default: :rc:`boxplot.showmeans`
+ Show the arithmetic means.
+ capprops : dict, default: None
+ The style of the caps.
+ capwidths : float or array, default: None
+ The widths of the caps.
+ boxprops : dict, default: None
+ The style of the box.
+ whiskerprops : dict, default: None
+ The style of the whiskers.
+ flierprops : dict, default: None
+ The style of the fliers.
+ medianprops : dict, default: None
+ The style of the median.
+ meanprops : dict, default: None
+ The style of the mean.
+ label : str or list of str, optional
+ Legend labels. Use a single string when all boxes have the same style and
+ you only want a single legend entry for them. Use a list of strings to
+ label all boxes individually. To be distinguishable, the boxes should be
+ styled individually, which is currently only possible by modifying the
+ returned artists, see e.g. :doc:`/gallery/statistics/boxplot_demo`.
+
+ In the case of a single string, the legend entry will technically be
+ associated with the first box only. By default, the legend will show the
+ median line (``result["medians"]``); if *patch_artist* is True, the legend
+ will show the box `.Patch` artists (``result["boxes"]``) instead.
+
+ .. versionadded:: 3.9
+
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ See Also
+ --------
+ .Axes.bxp : Draw a boxplot from pre-computed statistics.
+ violinplot : Draw an estimate of the probability density function.
+ """
+
+ # Missing arguments default to rcParams.
+ if whis is None:
+ whis = mpl.rcParams['boxplot.whiskers']
+ if bootstrap is None:
+ bootstrap = mpl.rcParams['boxplot.bootstrap']
+
+ bxpstats = cbook.boxplot_stats(x, whis=whis, bootstrap=bootstrap,
+ labels=tick_labels, autorange=autorange)
+ if notch is None:
+ notch = mpl.rcParams['boxplot.notch']
+ if patch_artist is None:
+ patch_artist = mpl.rcParams['boxplot.patchartist']
+ if meanline is None:
+ meanline = mpl.rcParams['boxplot.meanline']
+ if showmeans is None:
+ showmeans = mpl.rcParams['boxplot.showmeans']
+ if showcaps is None:
+ showcaps = mpl.rcParams['boxplot.showcaps']
+ if showbox is None:
+ showbox = mpl.rcParams['boxplot.showbox']
+ if showfliers is None:
+ showfliers = mpl.rcParams['boxplot.showfliers']
+
+ if boxprops is None:
+ boxprops = {}
+ if whiskerprops is None:
+ whiskerprops = {}
+ if capprops is None:
+ capprops = {}
+ if medianprops is None:
+ medianprops = {}
+ if meanprops is None:
+ meanprops = {}
+ if flierprops is None:
+ flierprops = {}
+
+ if patch_artist:
+ boxprops['linestyle'] = 'solid' # Not consistent with bxp.
+ if 'color' in boxprops:
+ boxprops['edgecolor'] = boxprops.pop('color')
+
+ # if non-default sym value, put it into the flier dictionary
+ # the logic for providing the default symbol ('b+') now lives
+ # in bxp in the initial value of flierkw
+ # handle all of the *sym* related logic here so we only have to pass
+ # on the flierprops dict.
+ if sym is not None:
+ # no-flier case, which should really be done with
+ # 'showfliers=False' but none-the-less deal with it to keep back
+ # compatibility
+ if sym == '':
+ # blow away existing dict and make one for invisible markers
+ flierprops = dict(linestyle='none', marker='', color='none')
+ # turn the fliers off just to be safe
+ showfliers = False
+ # now process the symbol string
+ else:
+ # process the symbol string
+ # discarded linestyle
+ _, marker, color = _process_plot_format(sym)
+ # if we have a marker, use it
+ if marker is not None:
+ flierprops['marker'] = marker
+ # if we have a color, use it
+ if color is not None:
+ # assume that if color is passed in the user want
+ # filled symbol, if the users want more control use
+ # flierprops
+ flierprops['color'] = color
+ flierprops['markerfacecolor'] = color
+ flierprops['markeredgecolor'] = color
+
+ # replace medians if necessary:
+ if usermedians is not None:
+ if (len(np.ravel(usermedians)) != len(bxpstats) or
+ np.shape(usermedians)[0] != len(bxpstats)):
+ raise ValueError(
+ "'usermedians' and 'x' have different lengths")
+ else:
+ # reassign medians as necessary
+ for stats, med in zip(bxpstats, usermedians):
+ if med is not None:
+ stats['med'] = med
+
+ if conf_intervals is not None:
+ if len(conf_intervals) != len(bxpstats):
+ raise ValueError(
+ "'conf_intervals' and 'x' have different lengths")
+ else:
+ for stats, ci in zip(bxpstats, conf_intervals):
+ if ci is not None:
+ if len(ci) != 2:
+ raise ValueError('each confidence interval must '
+ 'have two values')
+ else:
+ if ci[0] is not None:
+ stats['cilo'] = ci[0]
+ if ci[1] is not None:
+ stats['cihi'] = ci[1]
+
+ artists = self.bxp(bxpstats, positions=positions, widths=widths,
+ vert=vert, patch_artist=patch_artist,
+ shownotches=notch, showmeans=showmeans,
+ showcaps=showcaps, showbox=showbox,
+ boxprops=boxprops, flierprops=flierprops,
+ medianprops=medianprops, meanprops=meanprops,
+ meanline=meanline, showfliers=showfliers,
+ capprops=capprops, whiskerprops=whiskerprops,
+ manage_ticks=manage_ticks, zorder=zorder,
+ capwidths=capwidths, label=label,
+ orientation=orientation)
+ return artists
+
+ @_api.make_keyword_only("3.10", "widths")
+ def bxp(self, bxpstats, positions=None, widths=None, vert=None,
+ orientation='vertical', patch_artist=False, shownotches=False,
+ showmeans=False, showcaps=True, showbox=True, showfliers=True,
+ boxprops=None, whiskerprops=None, flierprops=None,
+ medianprops=None, capprops=None, meanprops=None,
+ meanline=False, manage_ticks=True, zorder=None,
+ capwidths=None, label=None):
+ """
+ Draw a box and whisker plot from pre-computed statistics.
+
+ The box extends from the first quartile *q1* to the third
+ quartile *q3* of the data, with a line at the median (*med*).
+ The whiskers extend from *whislow* to *whishi*.
+ Flier points are markers past the end of the whiskers.
+ See https://en.wikipedia.org/wiki/Box_plot for reference.
+
+ .. code-block:: none
+
+ whislow q1 med q3 whishi
+ |-----:-----|
+ o |--------| : |--------| o o
+ |-----:-----|
+ flier fliers
+
+ .. note::
+ This is a low-level drawing function for when you already
+ have the statistical parameters. If you want a boxplot based
+ on a dataset, use `~.Axes.boxplot` instead.
+
+ Parameters
+ ----------
+ bxpstats : list of dicts
+ A list of dictionaries containing stats for each boxplot.
+ Required keys are:
+
+ - ``med``: Median (float).
+ - ``q1``, ``q3``: First & third quartiles (float).
+ - ``whislo``, ``whishi``: Lower & upper whisker positions (float).
+
+ Optional keys are:
+
+ - ``mean``: Mean (float). Needed if ``showmeans=True``.
+ - ``fliers``: Data beyond the whiskers (array-like).
+ Needed if ``showfliers=True``.
+ - ``cilo``, ``cihi``: Lower & upper confidence intervals
+ about the median. Needed if ``shownotches=True``.
+ - ``label``: Name of the dataset (str). If available,
+ this will be used a tick label for the boxplot
+
+ positions : array-like, default: [1, 2, ..., n]
+ The positions of the boxes. The ticks and limits
+ are automatically set to match the positions.
+
+ widths : float or array-like, default: None
+ The widths of the boxes. The default is
+ ``clip(0.15*(distance between extreme positions), 0.15, 0.5)``.
+
+ capwidths : float or array-like, default: None
+ Either a scalar or a vector and sets the width of each cap.
+ The default is ``0.5*(width of the box)``, see *widths*.
+
+ vert : bool, optional
+ .. deprecated:: 3.11
+ Use *orientation* instead.
+
+ This is a pending deprecation for 3.10, with full deprecation
+ in 3.11 and removal in 3.13.
+ If this is given during the deprecation period, it overrides
+ the *orientation* parameter.
+
+ If True, plots the boxes vertically.
+ If False, plots the boxes horizontally.
+
+ orientation : {'vertical', 'horizontal'}, default: 'vertical'
+ If 'horizontal', plots the boxes horizontally.
+ Otherwise, plots the boxes vertically.
+
+ .. versionadded:: 3.10
+
+ patch_artist : bool, default: False
+ If `False` produces boxes with the `.Line2D` artist.
+ If `True` produces boxes with the `~matplotlib.patches.Patch` artist.
+
+ shownotches, showmeans, showcaps, showbox, showfliers : bool
+ Whether to draw the CI notches, the mean value (both default to
+ False), the caps, the box, and the fliers (all three default to
+ True).
+
+ boxprops, whiskerprops, capprops, flierprops, medianprops, meanprops :\
+ dict, optional
+ Artist properties for the boxes, whiskers, caps, fliers, medians, and
+ means.
+
+ meanline : bool, default: False
+ If `True` (and *showmeans* is `True`), will try to render the mean
+ as a line spanning the full width of the box according to
+ *meanprops*. Not recommended if *shownotches* is also True.
+ Otherwise, means will be shown as points.
+
+ manage_ticks : bool, default: True
+ If True, the tick locations and labels will be adjusted to match the
+ boxplot positions.
+
+ label : str or list of str, optional
+ Legend labels. Use a single string when all boxes have the same style and
+ you only want a single legend entry for them. Use a list of strings to
+ label all boxes individually. To be distinguishable, the boxes should be
+ styled individually, which is currently only possible by modifying the
+ returned artists, see e.g. :doc:`/gallery/statistics/boxplot_demo`.
+
+ In the case of a single string, the legend entry will technically be
+ associated with the first box only. By default, the legend will show the
+ median line (``result["medians"]``); if *patch_artist* is True, the legend
+ will show the box `.Patch` artists (``result["boxes"]``) instead.
+
+ .. versionadded:: 3.9
+
+ zorder : float, default: ``Line2D.zorder = 2``
+ The zorder of the resulting boxplot.
+
+ Returns
+ -------
+ dict
+ A dictionary mapping each component of the boxplot to a list
+ of the `.Line2D` instances created. That dictionary has the
+ following keys (assuming vertical boxplots):
+
+ - ``boxes``: main bodies of the boxplot showing the quartiles, and
+ the median's confidence intervals if enabled.
+ - ``medians``: horizontal lines at the median of each box.
+ - ``whiskers``: vertical lines up to the last non-outlier data.
+ - ``caps``: horizontal lines at the ends of the whiskers.
+ - ``fliers``: points representing data beyond the whiskers (fliers).
+ - ``means``: points or lines representing the means.
+
+ See Also
+ --------
+ boxplot : Draw a boxplot from data instead of pre-computed statistics.
+ """
+ # Clamp median line to edge of box by default.
+ medianprops = {
+ "solid_capstyle": "butt",
+ "dash_capstyle": "butt",
+ **(medianprops or {}),
+ }
+ meanprops = {
+ "solid_capstyle": "butt",
+ "dash_capstyle": "butt",
+ **(meanprops or {}),
+ }
+
+ # lists of artists to be output
+ whiskers = []
+ caps = []
+ boxes = []
+ medians = []
+ means = []
+ fliers = []
+
+ # empty list of xticklabels
+ datalabels = []
+
+ # Use default zorder if none specified
+ if zorder is None:
+ zorder = mlines.Line2D.zorder
+
+ zdelta = 0.1
+
+ def merge_kw_rc(subkey, explicit, zdelta=0, usemarker=True):
+ d = {k.split('.')[-1]: v for k, v in mpl.rcParams.items()
+ if k.startswith(f'boxplot.{subkey}props')}
+ d['zorder'] = zorder + zdelta
+ if not usemarker:
+ d['marker'] = ''
+ d.update(cbook.normalize_kwargs(explicit, mlines.Line2D))
+ return d
+
+ box_kw = {
+ 'linestyle': mpl.rcParams['boxplot.boxprops.linestyle'],
+ 'linewidth': mpl.rcParams['boxplot.boxprops.linewidth'],
+ 'edgecolor': mpl.rcParams['boxplot.boxprops.color'],
+ 'facecolor': ('white' if mpl.rcParams['_internal.classic_mode']
+ else mpl.rcParams['patch.facecolor']),
+ 'zorder': zorder,
+ **cbook.normalize_kwargs(boxprops, mpatches.PathPatch)
+ } if patch_artist else merge_kw_rc('box', boxprops, usemarker=False)
+ whisker_kw = merge_kw_rc('whisker', whiskerprops, usemarker=False)
+ cap_kw = merge_kw_rc('cap', capprops, usemarker=False)
+ flier_kw = merge_kw_rc('flier', flierprops)
+ median_kw = merge_kw_rc('median', medianprops, zdelta, usemarker=False)
+ mean_kw = merge_kw_rc('mean', meanprops, zdelta)
+ removed_prop = 'marker' if meanline else 'linestyle'
+ # Only remove the property if it's not set explicitly as a parameter.
+ if meanprops is None or removed_prop not in meanprops:
+ mean_kw[removed_prop] = ''
+
+ # vert and orientation parameters are linked until vert's
+ # deprecation period expires. vert only takes precedence
+ # if set to False.
+ if vert is None:
+ vert = mpl.rcParams['boxplot.vertical']
+ else:
+ _api.warn_deprecated(
+ "3.11",
+ name="vert: bool",
+ alternative="orientation: {'vertical', 'horizontal'}",
+ pending=True,
+ )
+ if vert is False:
+ orientation = 'horizontal'
+ _api.check_in_list(['horizontal', 'vertical'], orientation=orientation)
+
+ if not mpl.rcParams['boxplot.vertical']:
+ _api.warn_deprecated(
+ "3.10",
+ name='boxplot.vertical', obj_type="rcparam"
+ )
+
+ # vertical or horizontal plot?
+ maybe_swap = slice(None) if orientation == 'vertical' else slice(None, None, -1)
+
+ def do_plot(xs, ys, **kwargs):
+ return self.plot(*[xs, ys][maybe_swap], **kwargs)[0]
+
+ def do_patch(xs, ys, **kwargs):
+ path = mpath.Path._create_closed(
+ np.column_stack([xs, ys][maybe_swap]))
+ patch = mpatches.PathPatch(path, **kwargs)
+ self.add_artist(patch)
+ return patch
+
+ # input validation
+ N = len(bxpstats)
+ datashape_message = ("List of boxplot statistics and `{0}` "
+ "values must have same the length")
+ # check position
+ if positions is None:
+ positions = list(range(1, N + 1))
+ elif len(positions) != N:
+ raise ValueError(datashape_message.format("positions"))
+
+ positions = np.array(positions)
+ if len(positions) > 0 and not all(isinstance(p, Real) for p in positions):
+ raise TypeError("positions should be an iterable of numbers")
+
+ # width
+ if widths is None:
+ widths = [np.clip(0.15 * np.ptp(positions), 0.15, 0.5)] * N
+ elif np.isscalar(widths):
+ widths = [widths] * N
+ elif len(widths) != N:
+ raise ValueError(datashape_message.format("widths"))
+
+ # capwidth
+ if capwidths is None:
+ capwidths = 0.5 * np.array(widths)
+ elif np.isscalar(capwidths):
+ capwidths = [capwidths] * N
+ elif len(capwidths) != N:
+ raise ValueError(datashape_message.format("capwidths"))
+
+ for pos, width, stats, capwidth in zip(positions, widths, bxpstats,
+ capwidths):
+ # try to find a new label
+ datalabels.append(stats.get('label', pos))
+
+ # whisker coords
+ whis_x = [pos, pos]
+ whislo_y = [stats['q1'], stats['whislo']]
+ whishi_y = [stats['q3'], stats['whishi']]
+ # cap coords
+ cap_left = pos - capwidth * 0.5
+ cap_right = pos + capwidth * 0.5
+ cap_x = [cap_left, cap_right]
+ cap_lo = np.full(2, stats['whislo'])
+ cap_hi = np.full(2, stats['whishi'])
+ # box and median coords
+ box_left = pos - width * 0.5
+ box_right = pos + width * 0.5
+ med_y = [stats['med'], stats['med']]
+ # notched boxes
+ if shownotches:
+ notch_left = pos - width * 0.25
+ notch_right = pos + width * 0.25
+ box_x = [box_left, box_right, box_right, notch_right,
+ box_right, box_right, box_left, box_left, notch_left,
+ box_left, box_left]
+ box_y = [stats['q1'], stats['q1'], stats['cilo'],
+ stats['med'], stats['cihi'], stats['q3'],
+ stats['q3'], stats['cihi'], stats['med'],
+ stats['cilo'], stats['q1']]
+ med_x = [notch_left, notch_right]
+ # plain boxes
+ else:
+ box_x = [box_left, box_right, box_right, box_left, box_left]
+ box_y = [stats['q1'], stats['q1'], stats['q3'], stats['q3'],
+ stats['q1']]
+ med_x = [box_left, box_right]
+
+ # maybe draw the box
+ if showbox:
+ do_box = do_patch if patch_artist else do_plot
+ boxes.append(do_box(box_x, box_y, **box_kw))
+ median_kw.setdefault('label', '_nolegend_')
+ # draw the whiskers
+ whisker_kw.setdefault('label', '_nolegend_')
+ whiskers.append(do_plot(whis_x, whislo_y, **whisker_kw))
+ whiskers.append(do_plot(whis_x, whishi_y, **whisker_kw))
+ # maybe draw the caps
+ if showcaps:
+ cap_kw.setdefault('label', '_nolegend_')
+ caps.append(do_plot(cap_x, cap_lo, **cap_kw))
+ caps.append(do_plot(cap_x, cap_hi, **cap_kw))
+ # draw the medians
+ medians.append(do_plot(med_x, med_y, **median_kw))
+ # maybe draw the means
+ if showmeans:
+ if meanline:
+ means.append(do_plot(
+ [box_left, box_right], [stats['mean'], stats['mean']],
+ **mean_kw
+ ))
+ else:
+ means.append(do_plot([pos], [stats['mean']], **mean_kw))
+ # maybe draw the fliers
+ if showfliers:
+ flier_kw.setdefault('label', '_nolegend_')
+ flier_x = np.full(len(stats['fliers']), pos, dtype=np.float64)
+ flier_y = stats['fliers']
+ fliers.append(do_plot(flier_x, flier_y, **flier_kw))
+
+ # Set legend labels
+ if label:
+ box_or_med = boxes if showbox and patch_artist else medians
+ if cbook.is_scalar_or_string(label):
+ # assign the label only to the first box
+ box_or_med[0].set_label(label)
+ else: # label is a sequence
+ if len(box_or_med) != len(label):
+ raise ValueError(datashape_message.format("label"))
+ for artist, lbl in zip(box_or_med, label):
+ artist.set_label(lbl)
+
+ if manage_ticks:
+ axis_name = "x" if orientation == 'vertical' else "y"
+ interval = getattr(self.dataLim, f"interval{axis_name}")
+ axis = self._axis_map[axis_name]
+ positions = axis.convert_units(positions)
+ # The 0.5 additional padding ensures reasonable-looking boxes
+ # even when drawing a single box. We set the sticky edge to
+ # prevent margins expansion, in order to match old behavior (back
+ # when separate calls to boxplot() would completely reset the axis
+ # limits regardless of what was drawn before). The sticky edges
+ # are attached to the median lines, as they are always present.
+ interval[:] = (min(interval[0], min(positions) - .5),
+ max(interval[1], max(positions) + .5))
+ for median, position in zip(medians, positions):
+ getattr(median.sticky_edges, axis_name).extend(
+ [position - .5, position + .5])
+ # Modified from Axis.set_ticks and Axis.set_ticklabels.
+ locator = axis.get_major_locator()
+ if not isinstance(axis.get_major_locator(),
+ mticker.FixedLocator):
+ locator = mticker.FixedLocator([])
+ axis.set_major_locator(locator)
+ locator.locs = np.array([*locator.locs, *positions])
+ formatter = axis.get_major_formatter()
+ if not isinstance(axis.get_major_formatter(),
+ mticker.FixedFormatter):
+ formatter = mticker.FixedFormatter([])
+ axis.set_major_formatter(formatter)
+ formatter.seq = [*formatter.seq, *datalabels]
+
+ self._request_autoscale_view()
+
+ return dict(whiskers=whiskers, caps=caps, boxes=boxes,
+ medians=medians, fliers=fliers, means=means)
+
+ @staticmethod
+ def _parse_scatter_color_args(c, edgecolors, kwargs, xsize,
+ get_next_color_func):
+ """
+ Helper function to process color related arguments of `.Axes.scatter`.
+
+ Argument precedence for facecolors:
+
+ - c (if not None)
+ - kwargs['facecolor']
+ - kwargs['facecolors']
+ - kwargs['color'] (==kwcolor)
+ - 'b' if in classic mode else the result of ``get_next_color_func()``
+
+ Argument precedence for edgecolors:
+
+ - kwargs['edgecolor']
+ - edgecolors (is an explicit kw argument in scatter())
+ - kwargs['color'] (==kwcolor)
+ - 'face' if not in classic mode else None
+
+ Parameters
+ ----------
+ c : :mpltype:`color` or array-like or list of :mpltype:`color` or None
+ See argument description of `.Axes.scatter`.
+ edgecolors : :mpltype:`color` or sequence of color or {'face', 'none'} or None
+ See argument description of `.Axes.scatter`.
+ kwargs : dict
+ Additional kwargs. If these keys exist, we pop and process them:
+ 'facecolors', 'facecolor', 'edgecolor', 'color'
+ Note: The dict is modified by this function.
+ xsize : int
+ The size of the x and y arrays passed to `.Axes.scatter`.
+ get_next_color_func : callable
+ A callable that returns a color. This color is used as facecolor
+ if no other color is provided.
+
+ Note, that this is a function rather than a fixed color value to
+ support conditional evaluation of the next color. As of the
+ current implementation obtaining the next color from the
+ property cycle advances the cycle. This must only happen if we
+ actually use the color, which will only be decided within this
+ method.
+
+ Returns
+ -------
+ c
+ The input *c* if it was not *None*, else a color derived from the
+ other inputs or defaults.
+ colors : array(N, 4) or None
+ The facecolors as RGBA values, or *None* if a colormap is used.
+ edgecolors
+ The edgecolor.
+
+ """
+ facecolors = kwargs.pop('facecolors', None)
+ facecolors = kwargs.pop('facecolor', facecolors)
+ edgecolors = kwargs.pop('edgecolor', edgecolors)
+
+ kwcolor = kwargs.pop('color', None)
+
+ if kwcolor is not None and c is not None:
+ raise ValueError("Supply a 'c' argument or a 'color'"
+ " kwarg but not both; they differ but"
+ " their functionalities overlap.")
+
+ if kwcolor is not None:
+ try:
+ mcolors.to_rgba_array(kwcolor)
+ except ValueError as err:
+ raise ValueError(
+ "'color' kwarg must be a color or sequence of color "
+ "specs. For a sequence of values to be color-mapped, use "
+ "the 'c' argument instead.") from err
+ if edgecolors is None:
+ edgecolors = kwcolor
+ if facecolors is None:
+ facecolors = kwcolor
+
+ if edgecolors is None and not mpl.rcParams['_internal.classic_mode']:
+ edgecolors = mpl.rcParams['scatter.edgecolors']
+
+ # Raise a warning if both `c` and `facecolor` are set (issue #24404).
+ if c is not None and facecolors is not None:
+ _api.warn_external(
+ "You passed both c and facecolor/facecolors for the markers. "
+ "c has precedence over facecolor/facecolors. "
+ "This behavior may change in the future."
+ )
+
+ c_was_none = c is None
+ if c is None:
+ c = (facecolors if facecolors is not None
+ else "b" if mpl.rcParams['_internal.classic_mode']
+ else get_next_color_func())
+ c_is_string_or_strings = (
+ isinstance(c, str)
+ or (np.iterable(c) and len(c) > 0
+ and isinstance(cbook._safe_first_finite(c), str)))
+
+ def invalid_shape_exception(csize, xsize):
+ return ValueError(
+ f"'c' argument has {csize} elements, which is inconsistent "
+ f"with 'x' and 'y' with size {xsize}.")
+
+ c_is_mapped = False # Unless proven otherwise below.
+ valid_shape = True # Unless proven otherwise below.
+ if not c_was_none and kwcolor is None and not c_is_string_or_strings:
+ try: # First, does 'c' look suitable for value-mapping?
+ c = np.asanyarray(c, dtype=float)
+ except ValueError:
+ pass # Failed to convert to float array; must be color specs.
+ else:
+ # handle the documented special case of a 2D array with 1
+ # row which as RGB(A) to broadcast.
+ if c.shape == (1, 4) or c.shape == (1, 3):
+ c_is_mapped = False
+ if c.size != xsize:
+ valid_shape = False
+ # If c can be either mapped values or an RGB(A) color, prefer
+ # the former if shapes match, the latter otherwise.
+ elif c.size == xsize:
+ c = c.ravel()
+ c_is_mapped = True
+ else: # Wrong size; it must not be intended for mapping.
+ if c.shape in ((3,), (4,)):
+ _api.warn_external(
+ "*c* argument looks like a single numeric RGB or "
+ "RGBA sequence, which should be avoided as value-"
+ "mapping will have precedence in case its length "
+ "matches with *x* & *y*. Please use the *color* "
+ "keyword-argument or provide a 2D array "
+ "with a single row if you intend to specify "
+ "the same RGB or RGBA value for all points.")
+ valid_shape = False
+ if not c_is_mapped:
+ try: # Is 'c' acceptable as PathCollection facecolors?
+ colors = mcolors.to_rgba_array(c)
+ except (TypeError, ValueError) as err:
+ if "RGBA values should be within 0-1 range" in str(err):
+ raise
+ else:
+ if not valid_shape:
+ raise invalid_shape_exception(c.size, xsize) from err
+ # Both the mapping *and* the RGBA conversion failed: pretty
+ # severe failure => one may appreciate a verbose feedback.
+ raise ValueError(
+ f"'c' argument must be a color, a sequence of colors, "
+ f"or a sequence of numbers, not {c!r}") from err
+ else:
+ if len(colors) not in (0, 1, xsize):
+ # NB: remember that a single color is also acceptable.
+ # Besides *colors* will be an empty array if c == 'none'.
+ raise invalid_shape_exception(len(colors), xsize)
+ else:
+ colors = None # use cmap, norm after collection is created
+ return c, colors, edgecolors
+
+ @_api.make_keyword_only("3.10", "marker")
+ @_preprocess_data(replace_names=["x", "y", "s", "linewidths",
+ "edgecolors", "c", "facecolor",
+ "facecolors", "color"],
+ label_namer="y")
+ @_docstring.interpd
+ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
+ vmin=None, vmax=None, alpha=None, linewidths=None, *,
+ edgecolors=None, colorizer=None, plotnonfinite=False, **kwargs):
+ """
+ A scatter plot of *y* vs. *x* with varying marker size and/or color.
+
+ Parameters
+ ----------
+ x, y : float or array-like, shape (n, )
+ The data positions.
+
+ s : float or array-like, shape (n, ), optional
+ The marker size in points**2 (typographic points are 1/72 in.).
+ Default is ``rcParams['lines.markersize'] ** 2``.
+
+ The linewidth and edgecolor can visually interact with the marker
+ size, and can lead to artifacts if the marker size is smaller than
+ the linewidth.
+
+ If the linewidth is greater than 0 and the edgecolor is anything
+ but *'none'*, then the effective size of the marker will be
+ increased by half the linewidth because the stroke will be centered
+ on the edge of the shape.
+
+ To eliminate the marker edge either set *linewidth=0* or
+ *edgecolor='none'*.
+
+ c : array-like or list of :mpltype:`color` or :mpltype:`color`, optional
+ The marker colors. Possible values:
+
+ - A scalar or sequence of n numbers to be mapped to colors using
+ *cmap* and *norm*.
+ - A 2D array in which the rows are RGB or RGBA.
+ - A sequence of colors of length n.
+ - A single color format string.
+
+ Note that *c* should not be a single numeric RGB or RGBA sequence
+ because that is indistinguishable from an array of values to be
+ colormapped. If you want to specify the same RGB or RGBA value for
+ all points, use a 2D array with a single row. Otherwise,
+ value-matching will have precedence in case of a size matching with
+ *x* and *y*.
+
+ If you wish to specify a single color for all points
+ prefer the *color* keyword argument.
+
+ Defaults to `None`. In that case the marker color is determined
+ by the value of *color*, *facecolor* or *facecolors*. In case
+ those are not specified or `None`, the marker color is determined
+ by the next color of the ``Axes``' current "shape and fill" color
+ cycle. This cycle defaults to :rc:`axes.prop_cycle`.
+
+ marker : `~.markers.MarkerStyle`, default: :rc:`scatter.marker`
+ The marker style. *marker* can be either an instance of the class
+ or the text shorthand for a particular marker.
+ See :mod:`matplotlib.markers` for more information about marker
+ styles.
+
+ %(cmap_doc)s
+
+ This parameter is ignored if *c* is RGB(A).
+
+ %(norm_doc)s
+
+ This parameter is ignored if *c* is RGB(A).
+
+ %(vmin_vmax_doc)s
+
+ This parameter is ignored if *c* is RGB(A).
+
+ alpha : float, default: None
+ The alpha blending value, between 0 (transparent) and 1 (opaque).
+
+ linewidths : float or array-like, default: :rc:`lines.linewidth`
+ The linewidth of the marker edges. Note: The default *edgecolors*
+ is 'face'. You may want to change this as well.
+
+ edgecolors : {'face', 'none', *None*} or :mpltype:`color` or list of \
+:mpltype:`color`, default: :rc:`scatter.edgecolors`
+ The edge color of the marker. Possible values:
+
+ - 'face': The edge color will always be the same as the face color.
+ - 'none': No patch boundary will be drawn.
+ - A color or sequence of colors.
+
+ For non-filled markers, *edgecolors* is ignored. Instead, the color
+ is determined like with 'face', i.e. from *c*, *colors*, or
+ *facecolors*.
+
+ %(colorizer_doc)s
+
+ This parameter is ignored if *c* is RGB(A).
+
+ plotnonfinite : bool, default: False
+ Whether to plot points with nonfinite *c* (i.e. ``inf``, ``-inf``
+ or ``nan``). If ``True`` the points are drawn with the *bad*
+ colormap color (see `.Colormap.set_bad`).
+
+ Returns
+ -------
+ `~matplotlib.collections.PathCollection`
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+ **kwargs : `~matplotlib.collections.PathCollection` properties
+ %(PathCollection:kwdoc)s
+
+ See Also
+ --------
+ plot : To plot scatter plots when markers are identical in size and
+ color.
+
+ Notes
+ -----
+ * The `.plot` function will be faster for scatterplots where markers
+ don't vary in size or color.
+
+ * Any or all of *x*, *y*, *s*, and *c* may be masked arrays, in which
+ case all masks will be combined and only unmasked points will be
+ plotted.
+
+ * Fundamentally, scatter works with 1D arrays; *x*, *y*, *s*, and *c*
+ may be input as N-D arrays, but within scatter they will be
+ flattened. The exception is *c*, which will be flattened only if its
+ size matches the size of *x* and *y*.
+
+ """
+ # add edgecolors and linewidths to kwargs so they
+ # can be processed by normailze_kwargs
+ if edgecolors is not None:
+ kwargs.update({'edgecolors': edgecolors})
+ if linewidths is not None:
+ kwargs.update({'linewidths': linewidths})
+
+ kwargs = cbook.normalize_kwargs(kwargs, mcoll.Collection)
+ # re direct linewidth and edgecolor so it can be
+ # further processed by the rest of the function
+ linewidths = kwargs.pop('linewidth', None)
+ edgecolors = kwargs.pop('edgecolor', None)
+ # Process **kwargs to handle aliases, conflicts with explicit kwargs:
+ x, y = self._process_unit_info([("x", x), ("y", y)], kwargs)
+ # np.ma.ravel yields an ndarray, not a masked array,
+ # unless its argument is a masked array.
+ x = np.ma.ravel(x)
+ y = np.ma.ravel(y)
+ if x.size != y.size:
+ raise ValueError("x and y must be the same size")
+
+ if s is None:
+ s = (20 if mpl.rcParams['_internal.classic_mode'] else
+ mpl.rcParams['lines.markersize'] ** 2.0)
+ s = np.ma.ravel(s)
+ if (len(s) not in (1, x.size) or
+ (not np.issubdtype(s.dtype, np.floating) and
+ not np.issubdtype(s.dtype, np.integer))):
+ raise ValueError(
+ "s must be a scalar, "
+ "or float array-like with the same size as x and y")
+
+ # get the original edgecolor the user passed before we normalize
+ orig_edgecolor = edgecolors
+ if edgecolors is None:
+ orig_edgecolor = kwargs.get('edgecolor', None)
+ c, colors, edgecolors = \
+ self._parse_scatter_color_args(
+ c, edgecolors, kwargs, x.size,
+ get_next_color_func=self._get_patches_for_fill.get_next_color)
+
+ if plotnonfinite and colors is None:
+ c = np.ma.masked_invalid(c)
+ x, y, s, edgecolors, linewidths = \
+ cbook._combine_masks(x, y, s, edgecolors, linewidths)
+ else:
+ x, y, s, c, colors, edgecolors, linewidths = \
+ cbook._combine_masks(
+ x, y, s, c, colors, edgecolors, linewidths)
+ # Unmask edgecolors if it was actually a single RGB or RGBA.
+ if (x.size in (3, 4)
+ and np.ma.is_masked(edgecolors)
+ and not np.ma.is_masked(orig_edgecolor)):
+ edgecolors = edgecolors.data
+
+ scales = s # Renamed for readability below.
+
+ # load default marker from rcParams
+ if marker is None:
+ marker = mpl.rcParams['scatter.marker']
+
+ if isinstance(marker, mmarkers.MarkerStyle):
+ marker_obj = marker
+ else:
+ marker_obj = mmarkers.MarkerStyle(marker)
+
+ path = marker_obj.get_path().transformed(
+ marker_obj.get_transform())
+ if not marker_obj.is_filled():
+ if orig_edgecolor is not None:
+ _api.warn_external(
+ f"You passed a edgecolor/edgecolors ({orig_edgecolor!r}) "
+ f"for an unfilled marker ({marker!r}). Matplotlib is "
+ "ignoring the edgecolor in favor of the facecolor. This "
+ "behavior may change in the future."
+ )
+ # We need to handle markers that cannot be filled (like
+ # '+' and 'x') differently than markers that can be
+ # filled, but have their fillstyle set to 'none'. This is
+ # to get:
+ #
+ # - respecting the fillestyle if set
+ # - maintaining back-compatibility for querying the facecolor of
+ # the un-fillable markers.
+ #
+ # While not an ideal situation, but is better than the
+ # alternatives.
+ if marker_obj.get_fillstyle() == 'none':
+ # promote the facecolor to be the edgecolor
+ edgecolors = colors
+ # set the facecolor to 'none' (at the last chance) because
+ # we cannot fill a path if the facecolor is non-null
+ # (which is defendable at the renderer level).
+ colors = 'none'
+ else:
+ # if we are not nulling the face color we can do this
+ # simpler
+ edgecolors = 'face'
+
+ if linewidths is None:
+ linewidths = mpl.rcParams['lines.linewidth']
+ elif np.iterable(linewidths):
+ linewidths = [
+ lw if lw is not None else mpl.rcParams['lines.linewidth']
+ for lw in linewidths]
+
+ offsets = np.ma.column_stack([x, y])
+
+ collection = mcoll.PathCollection(
+ (path,), scales,
+ facecolors=colors,
+ edgecolors=edgecolors,
+ linewidths=linewidths,
+ offsets=offsets,
+ offset_transform=kwargs.pop('transform', self.transData),
+ alpha=alpha,
+ )
+ collection.set_transform(mtransforms.IdentityTransform())
+ if colors is None:
+ if colorizer:
+ collection._set_colorizer_check_keywords(colorizer, cmap=cmap,
+ norm=norm, vmin=vmin,
+ vmax=vmax)
+ else:
+ collection.set_cmap(cmap)
+ collection.set_norm(norm)
+ collection.set_array(c)
+ collection._scale_norm(norm, vmin, vmax)
+ else:
+ extra_kwargs = {
+ 'cmap': cmap, 'norm': norm, 'vmin': vmin, 'vmax': vmax
+ }
+ extra_keys = [k for k, v in extra_kwargs.items() if v is not None]
+ if any(extra_keys):
+ keys_str = ", ".join(f"'{k}'" for k in extra_keys)
+ _api.warn_external(
+ "No data for colormapping provided via 'c'. "
+ f"Parameters {keys_str} will be ignored")
+ collection._internal_update(kwargs)
+
+ # Classic mode only:
+ # ensure there are margins to allow for the
+ # finite size of the symbols. In v2.x, margins
+ # are present by default, so we disable this
+ # scatter-specific override.
+ if mpl.rcParams['_internal.classic_mode']:
+ if self._xmargin < 0.05 and x.size > 0:
+ self.set_xmargin(0.05)
+ if self._ymargin < 0.05 and x.size > 0:
+ self.set_ymargin(0.05)
+
+ self.add_collection(collection)
+ self._request_autoscale_view()
+
+ return collection
+
+ @_api.make_keyword_only("3.10", "gridsize")
+ @_preprocess_data(replace_names=["x", "y", "C"], label_namer="y")
+ @_docstring.interpd
+ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
+ xscale='linear', yscale='linear', extent=None,
+ cmap=None, norm=None, vmin=None, vmax=None,
+ alpha=None, linewidths=None, edgecolors='face',
+ reduce_C_function=np.mean, mincnt=None, marginals=False,
+ colorizer=None, **kwargs):
+ """
+ Make a 2D hexagonal binning plot of points *x*, *y*.
+
+ If *C* is *None*, the value of the hexagon is determined by the number
+ of points in the hexagon. Otherwise, *C* specifies values at the
+ coordinate (x[i], y[i]). For each hexagon, these values are reduced
+ using *reduce_C_function*.
+
+ Parameters
+ ----------
+ x, y : array-like
+ The data positions. *x* and *y* must be of the same length.
+
+ C : array-like, optional
+ If given, these values are accumulated in the bins. Otherwise,
+ every point has a value of 1. Must be of the same length as *x*
+ and *y*.
+
+ gridsize : int or (int, int), default: 100
+ If a single int, the number of hexagons in the *x*-direction.
+ The number of hexagons in the *y*-direction is chosen such that
+ the hexagons are approximately regular.
+
+ Alternatively, if a tuple (*nx*, *ny*), the number of hexagons
+ in the *x*-direction and the *y*-direction. In the
+ *y*-direction, counting is done along vertically aligned
+ hexagons, not along the zig-zag chains of hexagons; see the
+ following illustration.
+
+ .. plot::
+
+ import numpy
+ import matplotlib.pyplot as plt
+
+ np.random.seed(19680801)
+ n= 300
+ x = np.random.standard_normal(n)
+ y = np.random.standard_normal(n)
+
+ fig, ax = plt.subplots(figsize=(4, 4))
+ h = ax.hexbin(x, y, gridsize=(5, 3))
+ hx, hy = h.get_offsets().T
+ ax.plot(hx[24::3], hy[24::3], 'ro-')
+ ax.plot(hx[-3:], hy[-3:], 'ro-')
+ ax.set_title('gridsize=(5, 3)')
+ ax.axis('off')
+
+ To get approximately regular hexagons, choose
+ :math:`n_x = \\sqrt{3}\\,n_y`.
+
+ bins : 'log' or int or sequence, default: None
+ Discretization of the hexagon values.
+
+ - If *None*, no binning is applied; the color of each hexagon
+ directly corresponds to its count value.
+ - If 'log', use a logarithmic scale for the colormap.
+ Internally, :math:`log_{10}(i+1)` is used to determine the
+ hexagon color. This is equivalent to ``norm=LogNorm()``.
+ - If an integer, divide the counts in the specified number
+ of bins, and color the hexagons accordingly.
+ - If a sequence of values, the values of the lower bound of
+ the bins to be used.
+
+ xscale : {'linear', 'log'}, default: 'linear'
+ Use a linear or log10 scale on the horizontal axis.
+
+ yscale : {'linear', 'log'}, default: 'linear'
+ Use a linear or log10 scale on the vertical axis.
+
+ mincnt : int >= 0, default: *None*
+ If not *None*, only display cells with at least *mincnt*
+ number of points in the cell.
+
+ marginals : bool, default: *False*
+ If marginals is *True*, plot the marginal density as
+ colormapped rectangles along the bottom of the x-axis and
+ left of the y-axis.
+
+ extent : 4-tuple of float, default: *None*
+ The limits of the bins (xmin, xmax, ymin, ymax).
+ The default assigns the limits based on
+ *gridsize*, *x*, *y*, *xscale* and *yscale*.
+
+ If *xscale* or *yscale* is set to 'log', the limits are
+ expected to be the exponent for a power of 10. E.g. for
+ x-limits of 1 and 50 in 'linear' scale and y-limits
+ of 10 and 1000 in 'log' scale, enter (1, 50, 1, 3).
+
+ Returns
+ -------
+ `~matplotlib.collections.PolyCollection`
+ A `.PolyCollection` defining the hexagonal bins.
+
+ - `.PolyCollection.get_offsets` contains a Mx2 array containing
+ the x, y positions of the M hexagon centers in data coordinates.
+ - `.PolyCollection.get_array` contains the values of the M
+ hexagons.
+
+ If *marginals* is *True*, horizontal
+ bar and vertical bar (both PolyCollections) will be attached
+ to the return collection as attributes *hbar* and *vbar*.
+
+ Other Parameters
+ ----------------
+ %(cmap_doc)s
+
+ %(norm_doc)s
+
+ %(vmin_vmax_doc)s
+
+ alpha : float between 0 and 1, optional
+ The alpha blending value, between 0 (transparent) and 1 (opaque).
+
+ linewidths : float, default: *None*
+ If *None*, defaults to :rc:`patch.linewidth`.
+
+ edgecolors : {'face', 'none', *None*} or color, default: 'face'
+ The color of the hexagon edges. Possible values are:
+
+ - 'face': Draw the edges in the same color as the fill color.
+ - 'none': No edges are drawn. This can sometimes lead to unsightly
+ unpainted pixels between the hexagons.
+ - *None*: Draw outlines in the default color.
+ - An explicit color.
+
+ reduce_C_function : callable, default: `numpy.mean`
+ The function to aggregate *C* within the bins. It is ignored if
+ *C* is not given. This must have the signature::
+
+ def reduce_C_function(C: array) -> float
+
+ Commonly used functions are:
+
+ - `numpy.mean`: average of the points
+ - `numpy.sum`: integral of the point values
+ - `numpy.amax`: value taken from the largest point
+
+ By default will only reduce cells with at least 1 point because some
+ reduction functions (such as `numpy.amax`) will error/warn with empty
+ input. Changing *mincnt* will adjust the cutoff, and if set to 0 will
+ pass empty input to the reduction function.
+
+ %(colorizer_doc)s
+
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs : `~matplotlib.collections.PolyCollection` properties
+ All other keyword arguments are passed on to `.PolyCollection`:
+
+ %(PolyCollection:kwdoc)s
+
+ See Also
+ --------
+ hist2d : 2D histogram rectangular bins
+ """
+ self._process_unit_info([("x", x), ("y", y)], kwargs, convert=False)
+
+ x, y, C = cbook.delete_masked_points(x, y, C)
+
+ # Set the size of the hexagon grid
+ if np.iterable(gridsize):
+ nx, ny = gridsize
+ else:
+ nx = gridsize
+ ny = int(nx / math.sqrt(3))
+ # Count the number of data in each hexagon
+ x = np.asarray(x, float)
+ y = np.asarray(y, float)
+
+ # Will be log()'d if necessary, and then rescaled.
+ tx = x
+ ty = y
+
+ if xscale == 'log':
+ if np.any(x <= 0.0):
+ raise ValueError(
+ "x contains non-positive values, so cannot be log-scaled")
+ tx = np.log10(tx)
+ if yscale == 'log':
+ if np.any(y <= 0.0):
+ raise ValueError(
+ "y contains non-positive values, so cannot be log-scaled")
+ ty = np.log10(ty)
+ if extent is not None:
+ xmin, xmax, ymin, ymax = extent
+ if xmin > xmax:
+ raise ValueError("In extent, xmax must be greater than xmin")
+ if ymin > ymax:
+ raise ValueError("In extent, ymax must be greater than ymin")
+ else:
+ xmin, xmax = (tx.min(), tx.max()) if len(x) else (0, 1)
+ ymin, ymax = (ty.min(), ty.max()) if len(y) else (0, 1)
+
+ # to avoid issues with singular data, expand the min/max pairs
+ xmin, xmax = mtransforms.nonsingular(xmin, xmax, expander=0.1)
+ ymin, ymax = mtransforms.nonsingular(ymin, ymax, expander=0.1)
+
+ nx1 = nx + 1
+ ny1 = ny + 1
+ nx2 = nx
+ ny2 = ny
+ n = nx1 * ny1 + nx2 * ny2
+
+ # In the x-direction, the hexagons exactly cover the region from
+ # xmin to xmax. Need some padding to avoid roundoff errors.
+ padding = 1.e-9 * (xmax - xmin)
+ xmin -= padding
+ xmax += padding
+ sx = (xmax - xmin) / nx
+ sy = (ymax - ymin) / ny
+ # Positions in hexagon index coordinates.
+ ix = (tx - xmin) / sx
+ iy = (ty - ymin) / sy
+ ix1 = np.round(ix).astype(int)
+ iy1 = np.round(iy).astype(int)
+ ix2 = np.floor(ix).astype(int)
+ iy2 = np.floor(iy).astype(int)
+ # flat indices, plus one so that out-of-range points go to position 0.
+ i1 = np.where((0 <= ix1) & (ix1 < nx1) & (0 <= iy1) & (iy1 < ny1),
+ ix1 * ny1 + iy1 + 1, 0)
+ i2 = np.where((0 <= ix2) & (ix2 < nx2) & (0 <= iy2) & (iy2 < ny2),
+ ix2 * ny2 + iy2 + 1, 0)
+
+ d1 = (ix - ix1) ** 2 + 3.0 * (iy - iy1) ** 2
+ d2 = (ix - ix2 - 0.5) ** 2 + 3.0 * (iy - iy2 - 0.5) ** 2
+ bdist = (d1 < d2)
+
+ if C is None: # [1:] drops out-of-range points.
+ counts1 = np.bincount(i1[bdist], minlength=1 + nx1 * ny1)[1:]
+ counts2 = np.bincount(i2[~bdist], minlength=1 + nx2 * ny2)[1:]
+ accum = np.concatenate([counts1, counts2]).astype(float)
+ if mincnt is not None:
+ accum[accum < mincnt] = np.nan
+ C = np.ones(len(x))
+ else:
+ # store the C values in a list per hexagon index
+ Cs_at_i1 = [[] for _ in range(1 + nx1 * ny1)]
+ Cs_at_i2 = [[] for _ in range(1 + nx2 * ny2)]
+ for i in range(len(x)):
+ if bdist[i]:
+ Cs_at_i1[i1[i]].append(C[i])
+ else:
+ Cs_at_i2[i2[i]].append(C[i])
+ if mincnt is None:
+ mincnt = 1
+ accum = np.array(
+ [reduce_C_function(acc) if len(acc) >= mincnt else np.nan
+ for Cs_at_i in [Cs_at_i1, Cs_at_i2]
+ for acc in Cs_at_i[1:]], # [1:] drops out-of-range points.
+ float)
+
+ good_idxs = ~np.isnan(accum)
+
+ offsets = np.zeros((n, 2), float)
+ offsets[:nx1 * ny1, 0] = np.repeat(np.arange(nx1), ny1)
+ offsets[:nx1 * ny1, 1] = np.tile(np.arange(ny1), nx1)
+ offsets[nx1 * ny1:, 0] = np.repeat(np.arange(nx2) + 0.5, ny2)
+ offsets[nx1 * ny1:, 1] = np.tile(np.arange(ny2), nx2) + 0.5
+ offsets[:, 0] *= sx
+ offsets[:, 1] *= sy
+ offsets[:, 0] += xmin
+ offsets[:, 1] += ymin
+ # remove accumulation bins with no data
+ offsets = offsets[good_idxs, :]
+ accum = accum[good_idxs]
+
+ polygon = [sx, sy / 3] * np.array(
+ [[.5, -.5], [.5, .5], [0., 1.], [-.5, .5], [-.5, -.5], [0., -1.]])
+
+ if linewidths is None:
+ linewidths = [mpl.rcParams['patch.linewidth']]
+
+ if xscale == 'log' or yscale == 'log':
+ polygons = np.expand_dims(polygon, 0)
+ if xscale == 'log':
+ polygons[:, :, 0] = 10.0 ** polygons[:, :, 0]
+ xmin = 10.0 ** xmin
+ xmax = 10.0 ** xmax
+ self.set_xscale(xscale)
+ if yscale == 'log':
+ polygons[:, :, 1] = 10.0 ** polygons[:, :, 1]
+ ymin = 10.0 ** ymin
+ ymax = 10.0 ** ymax
+ self.set_yscale(yscale)
+ else:
+ polygons = [polygon]
+
+ collection = mcoll.PolyCollection(
+ polygons,
+ edgecolors=edgecolors,
+ linewidths=linewidths,
+ offsets=offsets,
+ offset_transform=mtransforms.AffineDeltaTransform(self.transData)
+ )
+
+ # Set normalizer if bins is 'log'
+ if cbook._str_equal(bins, 'log'):
+ if norm is not None:
+ _api.warn_external("Only one of 'bins' and 'norm' arguments "
+ f"can be supplied, ignoring {bins=}")
+ else:
+ norm = mcolors.LogNorm(vmin=vmin, vmax=vmax)
+ vmin = vmax = None
+ bins = None
+
+ if bins is not None:
+ if not np.iterable(bins):
+ minimum, maximum = min(accum), max(accum)
+ bins -= 1 # one less edge than bins
+ bins = minimum + (maximum - minimum) * np.arange(bins) / bins
+ bins = np.sort(bins)
+ accum = bins.searchsorted(accum)
+
+ if colorizer:
+ collection._set_colorizer_check_keywords(colorizer, cmap=cmap,
+ norm=norm, vmin=vmin,
+ vmax=vmax)
+ else:
+ collection.set_cmap(cmap)
+ collection.set_norm(norm)
+ collection.set_array(accum)
+ collection.set_alpha(alpha)
+ collection._internal_update(kwargs)
+ collection._scale_norm(norm, vmin, vmax)
+
+ # autoscale the norm with current accum values if it hasn't been set
+ if norm is not None:
+ if collection.norm.vmin is None and collection.norm.vmax is None:
+ collection.norm.autoscale()
+
+ corners = ((xmin, ymin), (xmax, ymax))
+ self.update_datalim(corners)
+ self._request_autoscale_view(tight=True)
+
+ # add the collection last
+ self.add_collection(collection, autolim=False)
+ if not marginals:
+ return collection
+
+ # Process marginals
+ bars = []
+ for zname, z, zmin, zmax, zscale, nbins in [
+ ("x", x, xmin, xmax, xscale, nx),
+ ("y", y, ymin, ymax, yscale, 2 * ny),
+ ]:
+
+ if zscale == "log":
+ bin_edges = np.geomspace(zmin, zmax, nbins + 1)
+ else:
+ bin_edges = np.linspace(zmin, zmax, nbins + 1)
+
+ verts = np.empty((nbins, 4, 2))
+ verts[:, 0, 0] = verts[:, 1, 0] = bin_edges[:-1]
+ verts[:, 2, 0] = verts[:, 3, 0] = bin_edges[1:]
+ verts[:, 0, 1] = verts[:, 3, 1] = .00
+ verts[:, 1, 1] = verts[:, 2, 1] = .05
+ if zname == "y":
+ verts = verts[:, :, ::-1] # Swap x and y.
+
+ # Sort z-values into bins defined by bin_edges.
+ bin_idxs = np.searchsorted(bin_edges, z) - 1
+ values = np.empty(nbins)
+ for i in range(nbins):
+ # Get C-values for each bin, and compute bin value with
+ # reduce_C_function.
+ ci = C[bin_idxs == i]
+ values[i] = reduce_C_function(ci) if len(ci) > 0 else np.nan
+
+ mask = ~np.isnan(values)
+ verts = verts[mask]
+ values = values[mask]
+
+ trans = getattr(self, f"get_{zname}axis_transform")(which="grid")
+ bar = mcoll.PolyCollection(
+ verts, transform=trans, edgecolors="face")
+ bar.set_array(values)
+ bar.set_cmap(cmap)
+ bar.set_norm(norm)
+ bar.set_alpha(alpha)
+ bar._internal_update(kwargs)
+ bars.append(self.add_collection(bar, autolim=False))
+
+ collection.hbar, collection.vbar = bars
+
+ def on_changed(collection):
+ collection.hbar.set_cmap(collection.get_cmap())
+ collection.hbar.set_cmap(collection.get_cmap())
+ collection.vbar.set_clim(collection.get_clim())
+ collection.vbar.set_clim(collection.get_clim())
+
+ collection.callbacks.connect('changed', on_changed)
+
+ return collection
+
+ @_docstring.interpd
+ def arrow(self, x, y, dx, dy, **kwargs):
+ """
+ [*Discouraged*] Add an arrow to the Axes.
+
+ This draws an arrow from ``(x, y)`` to ``(x+dx, y+dy)``.
+
+ .. admonition:: Discouraged
+
+ The use of this method is discouraged because it is not guaranteed
+ that the arrow renders reasonably. For example, the resulting arrow
+ is affected by the Axes aspect ratio and limits, which may distort
+ the arrow.
+
+ Consider using `~.Axes.annotate` without a text instead, e.g. ::
+
+ ax.annotate("", xytext=(0, 0), xy=(0.5, 0.5),
+ arrowprops=dict(arrowstyle="->"))
+
+ Parameters
+ ----------
+ %(FancyArrow)s
+
+ Returns
+ -------
+ `.FancyArrow`
+ The created `.FancyArrow` object.
+ """
+ # Strip away units for the underlying patch since units
+ # do not make sense to most patch-like code
+ x = self.convert_xunits(x)
+ y = self.convert_yunits(y)
+ dx = self.convert_xunits(dx)
+ dy = self.convert_yunits(dy)
+
+ a = mpatches.FancyArrow(x, y, dx, dy, **kwargs)
+ self.add_patch(a)
+ self._request_autoscale_view()
+ return a
+
+ @_docstring.copy(mquiver.QuiverKey.__init__)
+ def quiverkey(self, Q, X, Y, U, label, **kwargs):
+ qk = mquiver.QuiverKey(Q, X, Y, U, label, **kwargs)
+ self.add_artist(qk)
+ return qk
+
+ # Handle units for x and y, if they've been passed
+ def _quiver_units(self, args, kwargs):
+ if len(args) > 3:
+ x, y = args[0:2]
+ x, y = self._process_unit_info([("x", x), ("y", y)], kwargs)
+ return (x, y) + args[2:]
+ return args
+
+ # args can be a combination of X, Y, U, V, C and all should be replaced
+ @_preprocess_data()
+ @_docstring.interpd
+ def quiver(self, *args, **kwargs):
+ """%(quiver_doc)s"""
+ # Make sure units are handled for x and y values
+ args = self._quiver_units(args, kwargs)
+ q = mquiver.Quiver(self, *args, **kwargs)
+ self.add_collection(q, autolim=True)
+ self._request_autoscale_view()
+ return q
+
+ # args can be some combination of X, Y, U, V, C and all should be replaced
+ @_preprocess_data()
+ @_docstring.interpd
+ def barbs(self, *args, **kwargs):
+ """%(barbs_doc)s"""
+ # Make sure units are handled for x and y values
+ args = self._quiver_units(args, kwargs)
+ b = mquiver.Barbs(self, *args, **kwargs)
+ self.add_collection(b, autolim=True)
+ self._request_autoscale_view()
+ return b
+
+ # Uses a custom implementation of data-kwarg handling in
+ # _process_plot_var_args.
+ def fill(self, *args, data=None, **kwargs):
+ """
+ Plot filled polygons.
+
+ Parameters
+ ----------
+ *args : sequence of x, y, [color]
+ Each polygon is defined by the lists of *x* and *y* positions of
+ its nodes, optionally followed by a *color* specifier. See
+ :mod:`matplotlib.colors` for supported color specifiers. The
+ standard color cycle is used for polygons without a color
+ specifier.
+
+ You can plot multiple polygons by providing multiple *x*, *y*,
+ *[color]* groups.
+
+ For example, each of the following is legal::
+
+ ax.fill(x, y) # a polygon with default color
+ ax.fill(x, y, "b") # a blue polygon
+ ax.fill(x, y, x2, y2) # two polygons
+ ax.fill(x, y, "b", x2, y2, "r") # a blue and a red polygon
+
+ data : indexable object, optional
+ An object with labelled data. If given, provide the label names to
+ plot in *x* and *y*, e.g.::
+
+ ax.fill("time", "signal",
+ data={"time": [0, 1, 2], "signal": [0, 1, 0]})
+
+ Returns
+ -------
+ list of `~matplotlib.patches.Polygon`
+
+ Other Parameters
+ ----------------
+ **kwargs : `~matplotlib.patches.Polygon` properties
+
+ Notes
+ -----
+ Use :meth:`fill_between` if you would like to fill the region between
+ two curves.
+ """
+ # For compatibility(!), get aliases from Line2D rather than Patch.
+ kwargs = cbook.normalize_kwargs(kwargs, mlines.Line2D)
+ # _get_patches_for_fill returns a generator, convert it to a list.
+ patches = [*self._get_patches_for_fill(self, *args, data=data, **kwargs)]
+ for poly in patches:
+ self.add_patch(poly)
+ self._request_autoscale_view()
+ return patches
+
+ def _fill_between_x_or_y(
+ self, ind_dir, ind, dep1, dep2=0, *,
+ where=None, interpolate=False, step=None, **kwargs):
+ # Common implementation between fill_between (*ind_dir*="x") and
+ # fill_betweenx (*ind_dir*="y"). *ind* is the independent variable,
+ # *dep* the dependent variable. The docstring below is interpolated
+ # to generate both methods' docstrings.
+ """
+ Fill the area between two {dir} curves.
+
+ The curves are defined by the points (*{ind}*, *{dep}1*) and (*{ind}*,
+ *{dep}2*). This creates one or multiple polygons describing the filled
+ area.
+
+ You may exclude some {dir} sections from filling using *where*.
+
+ By default, the edges connect the given points directly. Use *step*
+ if the filling should be a step function, i.e. constant in between
+ *{ind}*.
+
+ Parameters
+ ----------
+ {ind} : array-like
+ The {ind} coordinates of the nodes defining the curves.
+
+ {dep}1 : array-like or float
+ The {dep} coordinates of the nodes defining the first curve.
+
+ {dep}2 : array-like or float, default: 0
+ The {dep} coordinates of the nodes defining the second curve.
+
+ where : array-like of bool, optional
+ Define *where* to exclude some {dir} regions from being filled.
+ The filled regions are defined by the coordinates ``{ind}[where]``.
+ More precisely, fill between ``{ind}[i]`` and ``{ind}[i+1]`` if
+ ``where[i] and where[i+1]``. Note that this definition implies
+ that an isolated *True* value between two *False* values in *where*
+ will not result in filling. Both sides of the *True* position
+ remain unfilled due to the adjacent *False* values.
+
+ interpolate : bool, default: False
+ This option is only relevant if *where* is used and the two curves
+ are crossing each other.
+
+ Semantically, *where* is often used for *{dep}1* > *{dep}2* or
+ similar. By default, the nodes of the polygon defining the filled
+ region will only be placed at the positions in the *{ind}* array.
+ Such a polygon cannot describe the above semantics close to the
+ intersection. The {ind}-sections containing the intersection are
+ simply clipped.
+
+ Setting *interpolate* to *True* will calculate the actual
+ intersection point and extend the filled region up to this point.
+
+ step : {{'pre', 'post', 'mid'}}, optional
+ Define *step* if the filling should be a step function,
+ i.e. constant in between *{ind}*. The value determines where the
+ step will occur:
+
+ - 'pre': The {dep} value is continued constantly to the left from
+ every *{ind}* position, i.e. the interval ``({ind}[i-1], {ind}[i]]``
+ has the value ``{dep}[i]``.
+ - 'post': The y value is continued constantly to the right from
+ every *{ind}* position, i.e. the interval ``[{ind}[i], {ind}[i+1])``
+ has the value ``{dep}[i]``.
+ - 'mid': Steps occur half-way between the *{ind}* positions.
+
+ Returns
+ -------
+ `.FillBetweenPolyCollection`
+ A `.FillBetweenPolyCollection` containing the plotted polygons.
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ All other keyword arguments are passed on to
+ `.FillBetweenPolyCollection`. They control the `.Polygon` properties:
+
+ %(FillBetweenPolyCollection:kwdoc)s
+
+ See Also
+ --------
+ fill_between : Fill between two sets of y-values.
+ fill_betweenx : Fill between two sets of x-values.
+ """
+ dep_dir = mcoll.FillBetweenPolyCollection._f_dir_from_t(ind_dir)
+
+ if not mpl.rcParams["_internal.classic_mode"]:
+ kwargs = cbook.normalize_kwargs(kwargs, mcoll.Collection)
+ if not any(c in kwargs for c in ("color", "facecolor")):
+ kwargs["facecolor"] = self._get_patches_for_fill.get_next_color()
+
+ ind, dep1, dep2 = self._fill_between_process_units(
+ ind_dir, dep_dir, ind, dep1, dep2, **kwargs)
+
+ collection = mcoll.FillBetweenPolyCollection(
+ ind_dir, ind, dep1, dep2,
+ where=where, interpolate=interpolate, step=step, **kwargs)
+
+ self.add_collection(collection)
+ self._request_autoscale_view()
+ return collection
+
+ def _fill_between_process_units(self, ind_dir, dep_dir, ind, dep1, dep2, **kwargs):
+ """Handle united data, such as dates."""
+ return map(np.ma.masked_invalid, self._process_unit_info(
+ [(ind_dir, ind), (dep_dir, dep1), (dep_dir, dep2)], kwargs))
+
+ def fill_between(self, x, y1, y2=0, where=None, interpolate=False,
+ step=None, **kwargs):
+ return self._fill_between_x_or_y(
+ "x", x, y1, y2,
+ where=where, interpolate=interpolate, step=step, **kwargs)
+
+ if _fill_between_x_or_y.__doc__:
+ fill_between.__doc__ = _fill_between_x_or_y.__doc__.format(
+ dir="horizontal", ind="x", dep="y"
+ )
+ fill_between = _preprocess_data(
+ _docstring.interpd(fill_between),
+ replace_names=["x", "y1", "y2", "where"])
+
+ def fill_betweenx(self, y, x1, x2=0, where=None,
+ step=None, interpolate=False, **kwargs):
+ return self._fill_between_x_or_y(
+ "y", y, x1, x2,
+ where=where, interpolate=interpolate, step=step, **kwargs)
+
+ if _fill_between_x_or_y.__doc__:
+ fill_betweenx.__doc__ = _fill_between_x_or_y.__doc__.format(
+ dir="vertical", ind="y", dep="x"
+ )
+ fill_betweenx = _preprocess_data(
+ _docstring.interpd(fill_betweenx),
+ replace_names=["y", "x1", "x2", "where"])
+
+ #### plotting z(x, y): imshow, pcolor and relatives, contour
+
+ @_preprocess_data()
+ @_docstring.interpd
+ def imshow(self, X, cmap=None, norm=None, *, aspect=None,
+ interpolation=None, alpha=None,
+ vmin=None, vmax=None, colorizer=None, origin=None, extent=None,
+ interpolation_stage=None, filternorm=True, filterrad=4.0,
+ resample=None, url=None, **kwargs):
+ """
+ Display data as an image, i.e., on a 2D regular raster.
+
+ The input may either be actual RGB(A) data, or 2D scalar data, which
+ will be rendered as a pseudocolor image. For displaying a grayscale
+ image, set up the colormapping using the parameters
+ ``cmap='gray', vmin=0, vmax=255``.
+
+ The number of pixels used to render an image is set by the Axes size
+ and the figure *dpi*. This can lead to aliasing artifacts when
+ the image is resampled, because the displayed image size will usually
+ not match the size of *X* (see
+ :doc:`/gallery/images_contours_and_fields/image_antialiasing`).
+ The resampling can be controlled via the *interpolation* parameter
+ and/or :rc:`image.interpolation`.
+
+ Parameters
+ ----------
+ X : array-like or PIL image
+ The image data. Supported array shapes are:
+
+ - (M, N): an image with scalar data. The values are mapped to
+ colors using normalization and a colormap. See parameters *norm*,
+ *cmap*, *vmin*, *vmax*.
+ - (M, N, 3): an image with RGB values (0-1 float or 0-255 int).
+ - (M, N, 4): an image with RGBA values (0-1 float or 0-255 int),
+ i.e. including transparency.
+
+ The first two dimensions (M, N) define the rows and columns of
+ the image.
+
+ Out-of-range RGB(A) values are clipped.
+
+ %(cmap_doc)s
+
+ This parameter is ignored if *X* is RGB(A).
+
+ %(norm_doc)s
+
+ This parameter is ignored if *X* is RGB(A).
+
+ %(vmin_vmax_doc)s
+
+ This parameter is ignored if *X* is RGB(A).
+
+ %(colorizer_doc)s
+
+ This parameter is ignored if *X* is RGB(A).
+
+ aspect : {'equal', 'auto'} or float or None, default: None
+ The aspect ratio of the Axes. This parameter is particularly
+ relevant for images since it determines whether data pixels are
+ square.
+
+ This parameter is a shortcut for explicitly calling
+ `.Axes.set_aspect`. See there for further details.
+
+ - 'equal': Ensures an aspect ratio of 1. Pixels will be square
+ (unless pixel sizes are explicitly made non-square in data
+ coordinates using *extent*).
+ - 'auto': The Axes is kept fixed and the aspect is adjusted so
+ that the data fit in the Axes. In general, this will result in
+ non-square pixels.
+
+ Normally, None (the default) means to use :rc:`image.aspect`. However, if
+ the image uses a transform that does not contain the axes data transform,
+ then None means to not modify the axes aspect at all (in that case, directly
+ call `.Axes.set_aspect` if desired).
+
+ interpolation : str, default: :rc:`image.interpolation`
+ The interpolation method used.
+
+ Supported values are 'none', 'auto', 'nearest', 'bilinear',
+ 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite',
+ 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell',
+ 'sinc', 'lanczos', 'blackman'.
+
+ The data *X* is resampled to the pixel size of the image on the
+ figure canvas, using the interpolation method to either up- or
+ downsample the data.
+
+ If *interpolation* is 'none', then for the ps, pdf, and svg
+ backends no down- or upsampling occurs, and the image data is
+ passed to the backend as a native image. Note that different ps,
+ pdf, and svg viewers may display these raw pixels differently. On
+ other backends, 'none' is the same as 'nearest'.
+
+ If *interpolation* is the default 'auto', then 'nearest'
+ interpolation is used if the image is upsampled by more than a
+ factor of three (i.e. the number of display pixels is at least
+ three times the size of the data array). If the upsampling rate is
+ smaller than 3, or the image is downsampled, then 'hanning'
+ interpolation is used to act as an anti-aliasing filter, unless the
+ image happens to be upsampled by exactly a factor of two or one.
+
+ See
+ :doc:`/gallery/images_contours_and_fields/interpolation_methods`
+ for an overview of the supported interpolation methods, and
+ :doc:`/gallery/images_contours_and_fields/image_antialiasing` for
+ a discussion of image antialiasing.
+
+ Some interpolation methods require an additional radius parameter,
+ which can be set by *filterrad*. Additionally, the antigrain image
+ resize filter is controlled by the parameter *filternorm*.
+
+ interpolation_stage : {'auto', 'data', 'rgba'}, default: 'auto'
+ Supported values:
+
+ - 'data': Interpolation is carried out on the data provided by the user
+ This is useful if interpolating between pixels during upsampling.
+ - 'rgba': The interpolation is carried out in RGBA-space after the
+ color-mapping has been applied. This is useful if downsampling and
+ combining pixels visually.
+ - 'auto': Select a suitable interpolation stage automatically. This uses
+ 'rgba' when downsampling, or upsampling at a rate less than 3, and
+ 'data' when upsampling at a higher rate.
+
+ See :doc:`/gallery/images_contours_and_fields/image_antialiasing` for
+ a discussion of image antialiasing.
+
+ alpha : float or array-like, optional
+ The alpha blending value, between 0 (transparent) and 1 (opaque).
+ If *alpha* is an array, the alpha blending values are applied pixel
+ by pixel, and *alpha* must have the same shape as *X*.
+
+ origin : {'upper', 'lower'}, default: :rc:`image.origin`
+ Place the [0, 0] index of the array in the upper left or lower
+ left corner of the Axes. The convention (the default) 'upper' is
+ typically used for matrices and images.
+
+ Note that the vertical axis points upward for 'lower'
+ but downward for 'upper'.
+
+ See the :ref:`imshow_extent` tutorial for
+ examples and a more detailed description.
+
+ extent : floats (left, right, bottom, top), optional
+ The bounding box in data coordinates that the image will fill.
+ These values may be unitful and match the units of the Axes.
+ The image is stretched individually along x and y to fill the box.
+
+ The default extent is determined by the following conditions.
+ Pixels have unit size in data coordinates. Their centers are on
+ integer coordinates, and their center coordinates range from 0 to
+ columns-1 horizontally and from 0 to rows-1 vertically.
+
+ Note that the direction of the vertical axis and thus the default
+ values for top and bottom depend on *origin*:
+
+ - For ``origin == 'upper'`` the default is
+ ``(-0.5, numcols-0.5, numrows-0.5, -0.5)``.
+ - For ``origin == 'lower'`` the default is
+ ``(-0.5, numcols-0.5, -0.5, numrows-0.5)``.
+
+ See the :ref:`imshow_extent` tutorial for
+ examples and a more detailed description.
+
+ filternorm : bool, default: True
+ A parameter for the antigrain image resize filter (see the
+ antigrain documentation). If *filternorm* is set, the filter
+ normalizes integer values and corrects the rounding errors. It
+ doesn't do anything with the source floating point values, it
+ corrects only integers according to the rule of 1.0 which means
+ that any sum of pixel weights must be equal to 1.0. So, the
+ filter function must produce a graph of the proper shape.
+
+ filterrad : float > 0, default: 4.0
+ The filter radius for filters that have a radius parameter, i.e.
+ when interpolation is one of: 'sinc', 'lanczos' or 'blackman'.
+
+ resample : bool, default: :rc:`image.resample`
+ When *True*, use a full resampling method. When *False*, only
+ resample when the output image is larger than the input image.
+
+ url : str, optional
+ Set the url of the created `.AxesImage`. See `.Artist.set_url`.
+
+ Returns
+ -------
+ `~matplotlib.image.AxesImage`
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs : `~matplotlib.artist.Artist` properties
+ These parameters are passed on to the constructor of the
+ `.AxesImage` artist.
+
+ See Also
+ --------
+ matshow : Plot a matrix or an array as an image.
+
+ Notes
+ -----
+ Unless *extent* is used, pixel centers will be located at integer
+ coordinates. In other words: the origin will coincide with the center
+ of pixel (0, 0).
+
+ There are two common representations for RGB images with an alpha
+ channel:
+
+ - Straight (unassociated) alpha: R, G, and B channels represent the
+ color of the pixel, disregarding its opacity.
+ - Premultiplied (associated) alpha: R, G, and B channels represent
+ the color of the pixel, adjusted for its opacity by multiplication.
+
+ `~matplotlib.pyplot.imshow` expects RGB images adopting the straight
+ (unassociated) alpha representation.
+ """
+ im = mimage.AxesImage(self, cmap=cmap, norm=norm, colorizer=colorizer,
+ interpolation=interpolation, origin=origin,
+ extent=extent, filternorm=filternorm,
+ filterrad=filterrad, resample=resample,
+ interpolation_stage=interpolation_stage,
+ **kwargs)
+
+ if aspect is None and not (
+ im.is_transform_set()
+ and not im.get_transform().contains_branch(self.transData)):
+ aspect = mpl.rcParams['image.aspect']
+ if aspect is not None:
+ self.set_aspect(aspect)
+
+ im.set_data(X)
+ im.set_alpha(alpha)
+ if im.get_clip_path() is None:
+ # image does not already have clipping set, clip to Axes patch
+ im.set_clip_path(self.patch)
+ im._check_exclusionary_keywords(colorizer, vmin=vmin, vmax=vmax)
+ im._scale_norm(norm, vmin, vmax)
+ im.set_url(url)
+
+ # update ax.dataLim, and, if autoscaling, set viewLim
+ # to tightly fit the image, regardless of dataLim.
+ im.set_extent(im.get_extent())
+
+ self.add_image(im)
+ return im
+
+ def _pcolorargs(self, funcname, *args, shading='auto', **kwargs):
+ # - create X and Y if not present;
+ # - reshape X and Y as needed if they are 1-D;
+ # - check for proper sizes based on `shading` kwarg;
+ # - reset shading if shading='auto' to flat or nearest
+ # depending on size;
+
+ _valid_shading = ['gouraud', 'nearest', 'flat', 'auto']
+ try:
+ _api.check_in_list(_valid_shading, shading=shading)
+ except ValueError:
+ _api.warn_external(f"shading value '{shading}' not in list of "
+ f"valid values {_valid_shading}. Setting "
+ "shading='auto'.")
+ shading = 'auto'
+
+ if len(args) == 1:
+ C = np.asanyarray(args[0])
+ nrows, ncols = C.shape[:2]
+ if shading in ['gouraud', 'nearest']:
+ X, Y = np.meshgrid(np.arange(ncols), np.arange(nrows))
+ else:
+ X, Y = np.meshgrid(np.arange(ncols + 1), np.arange(nrows + 1))
+ shading = 'flat'
+ elif len(args) == 3:
+ # Check x and y for bad data...
+ C = np.asanyarray(args[2])
+ # unit conversion allows e.g. datetime objects as axis values
+ X, Y = args[:2]
+ X, Y = self._process_unit_info([("x", X), ("y", Y)], kwargs)
+ X, Y = (cbook.safe_masked_invalid(a, copy=True) for a in [X, Y])
+
+ if funcname == 'pcolormesh':
+ if np.ma.is_masked(X) or np.ma.is_masked(Y):
+ raise ValueError(
+ 'x and y arguments to pcolormesh cannot have '
+ 'non-finite values or be of type '
+ 'numpy.ma.MaskedArray with masked values')
+ nrows, ncols = C.shape[:2]
+ else:
+ raise _api.nargs_error(funcname, takes="1 or 3", given=len(args))
+
+ Nx = X.shape[-1]
+ Ny = Y.shape[0]
+ if X.ndim != 2 or X.shape[0] == 1:
+ x = X.reshape(1, Nx)
+ X = x.repeat(Ny, axis=0)
+ if Y.ndim != 2 or Y.shape[1] == 1:
+ y = Y.reshape(Ny, 1)
+ Y = y.repeat(Nx, axis=1)
+ if X.shape != Y.shape:
+ raise TypeError(f'Incompatible X, Y inputs to {funcname}; '
+ f'see help({funcname})')
+
+ if shading == 'auto':
+ if ncols == Nx and nrows == Ny:
+ shading = 'nearest'
+ else:
+ shading = 'flat'
+
+ if shading == 'flat':
+ if (Nx, Ny) != (ncols + 1, nrows + 1):
+ raise TypeError(f"Dimensions of C {C.shape} should"
+ f" be one smaller than X({Nx}) and Y({Ny})"
+ f" while using shading='flat'"
+ f" see help({funcname})")
+ else: # ['nearest', 'gouraud']:
+ if (Nx, Ny) != (ncols, nrows):
+ raise TypeError('Dimensions of C %s are incompatible with'
+ ' X (%d) and/or Y (%d); see help(%s)' % (
+ C.shape, Nx, Ny, funcname))
+ if shading == 'nearest':
+ # grid is specified at the center, so define corners
+ # at the midpoints between the grid centers and then use the
+ # flat algorithm.
+ def _interp_grid(X, require_monotonicity=False):
+ # helper for below. To ensure the cell edges are calculated
+ # correctly, when expanding columns, the monotonicity of
+ # X coords needs to be checked. When expanding rows, the
+ # monotonicity of Y coords needs to be checked.
+ if np.shape(X)[1] > 1:
+ dX = np.diff(X, axis=1) * 0.5
+ if (require_monotonicity and
+ not (np.all(dX >= 0) or np.all(dX <= 0))):
+ _api.warn_external(
+ f"The input coordinates to {funcname} are "
+ "interpreted as cell centers, but are not "
+ "monotonically increasing or decreasing. "
+ "This may lead to incorrectly calculated cell "
+ "edges, in which case, please supply "
+ f"explicit cell edges to {funcname}.")
+
+ hstack = np.ma.hstack if np.ma.isMA(X) else np.hstack
+ X = hstack((X[:, [0]] - dX[:, [0]],
+ X[:, :-1] + dX,
+ X[:, [-1]] + dX[:, [-1]]))
+ else:
+ # This is just degenerate, but we can't reliably guess
+ # a dX if there is just one value.
+ X = np.hstack((X, X))
+ return X
+
+ if ncols == Nx:
+ X = _interp_grid(X, require_monotonicity=True)
+ Y = _interp_grid(Y)
+ if nrows == Ny:
+ X = _interp_grid(X.T).T
+ Y = _interp_grid(Y.T, require_monotonicity=True).T
+ shading = 'flat'
+
+ C = cbook.safe_masked_invalid(C, copy=True)
+ return X, Y, C, shading
+
+ @_preprocess_data()
+ @_docstring.interpd
+ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
+ vmin=None, vmax=None, colorizer=None, **kwargs):
+ r"""
+ Create a pseudocolor plot with a non-regular rectangular grid.
+
+ Call signature::
+
+ pcolor([X, Y,] C, /, **kwargs)
+
+ *X* and *Y* can be used to specify the corners of the quadrilaterals.
+
+ The arguments *X*, *Y*, *C* are positional-only.
+
+ .. hint::
+
+ ``pcolor()`` can be very slow for large arrays. In most
+ cases you should use the similar but much faster
+ `~.Axes.pcolormesh` instead. See
+ :ref:`Differences between pcolor() and pcolormesh()
+ ` for a discussion of the
+ differences.
+
+ Parameters
+ ----------
+ C : 2D array-like
+ The color-mapped values. Color-mapping is controlled by *cmap*,
+ *norm*, *vmin*, and *vmax*.
+
+ X, Y : array-like, optional
+ The coordinates of the corners of quadrilaterals of a pcolormesh::
+
+ (X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1])
+ �╶───╴�
+ │ │
+ �╶───╴�
+ (X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1])
+
+ Note that the column index corresponds to the x-coordinate, and
+ the row index corresponds to y. For details, see the
+ :ref:`Notes ` section below.
+
+ If ``shading='flat'`` the dimensions of *X* and *Y* should be one
+ greater than those of *C*, and the quadrilateral is colored due
+ to the value at ``C[i, j]``. If *X*, *Y* and *C* have equal
+ dimensions, a warning will be raised and the last row and column
+ of *C* will be ignored.
+
+ If ``shading='nearest'``, the dimensions of *X* and *Y* should be
+ the same as those of *C* (if not, a ValueError will be raised). The
+ color ``C[i, j]`` will be centered on ``(X[i, j], Y[i, j])``.
+
+ If *X* and/or *Y* are 1-D arrays or column vectors they will be
+ expanded as needed into the appropriate 2D arrays, making a
+ rectangular grid.
+
+ shading : {'flat', 'nearest', 'auto'}, default: :rc:`pcolor.shading`
+ The fill style for the quadrilateral. Possible values:
+
+ - 'flat': A solid color is used for each quad. The color of the
+ quad (i, j), (i+1, j), (i, j+1), (i+1, j+1) is given by
+ ``C[i, j]``. The dimensions of *X* and *Y* should be
+ one greater than those of *C*; if they are the same as *C*,
+ then a deprecation warning is raised, and the last row
+ and column of *C* are dropped.
+ - 'nearest': Each grid point will have a color centered on it,
+ extending halfway between the adjacent grid centers. The
+ dimensions of *X* and *Y* must be the same as *C*.
+ - 'auto': Choose 'flat' if dimensions of *X* and *Y* are one
+ larger than *C*. Choose 'nearest' if dimensions are the same.
+
+ See :doc:`/gallery/images_contours_and_fields/pcolormesh_grids`
+ for more description.
+
+ %(cmap_doc)s
+
+ %(norm_doc)s
+
+ %(vmin_vmax_doc)s
+
+ %(colorizer_doc)s
+
+ edgecolors : {'none', None, 'face', color, color sequence}, optional
+ The color of the edges. Defaults to 'none'. Possible values:
+
+ - 'none' or '': No edge.
+ - *None*: :rc:`patch.edgecolor` will be used. Note that currently
+ :rc:`patch.force_edgecolor` has to be True for this to work.
+ - 'face': Use the adjacent face color.
+ - A color or sequence of colors will set the edge color.
+
+ The singular form *edgecolor* works as an alias.
+
+ alpha : float, default: None
+ The alpha blending value of the face color, between 0 (transparent)
+ and 1 (opaque). Note: The edgecolor is currently not affected by
+ this.
+
+ snap : bool, default: False
+ Whether to snap the mesh to pixel boundaries.
+
+ Returns
+ -------
+ `matplotlib.collections.PolyQuadMesh`
+
+ Other Parameters
+ ----------------
+ antialiaseds : bool, default: False
+ The default *antialiaseds* is False if the default
+ *edgecolors*\ ="none" is used. This eliminates artificial lines
+ at patch boundaries, and works regardless of the value of alpha.
+ If *edgecolors* is not "none", then the default *antialiaseds*
+ is taken from :rc:`patch.antialiased`.
+ Stroking the edges may be preferred if *alpha* is 1, but will
+ cause artifacts otherwise.
+
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Additionally, the following arguments are allowed. They are passed
+ along to the `~matplotlib.collections.PolyQuadMesh` constructor:
+
+ %(PolyCollection:kwdoc)s
+
+ See Also
+ --------
+ pcolormesh : for an explanation of the differences between
+ pcolor and pcolormesh.
+ imshow : If *X* and *Y* are each equidistant, `~.Axes.imshow` can be a
+ faster alternative.
+
+ Notes
+ -----
+ **Masked arrays**
+
+ *X*, *Y* and *C* may be masked arrays. If either ``C[i, j]``, or one
+ of the vertices surrounding ``C[i, j]`` (*X* or *Y* at
+ ``[i, j], [i+1, j], [i, j+1], [i+1, j+1]``) is masked, nothing is
+ plotted.
+
+ .. _axes-pcolor-grid-orientation:
+
+ **Grid orientation**
+
+ The grid orientation follows the standard matrix convention: An array
+ *C* with shape (nrows, ncolumns) is plotted with the column number as
+ *X* and the row number as *Y*.
+ """
+
+ if shading is None:
+ shading = mpl.rcParams['pcolor.shading']
+ shading = shading.lower()
+ X, Y, C, shading = self._pcolorargs('pcolor', *args, shading=shading,
+ kwargs=kwargs)
+ linewidths = (0.25,)
+ if 'linewidth' in kwargs:
+ kwargs['linewidths'] = kwargs.pop('linewidth')
+ kwargs.setdefault('linewidths', linewidths)
+
+ if 'edgecolor' in kwargs:
+ kwargs['edgecolors'] = kwargs.pop('edgecolor')
+ ec = kwargs.setdefault('edgecolors', 'none')
+
+ # aa setting will default via collections to patch.antialiased
+ # unless the boundary is not stroked, in which case the
+ # default will be False; with unstroked boundaries, aa
+ # makes artifacts that are often disturbing.
+ if 'antialiaseds' in kwargs:
+ kwargs['antialiased'] = kwargs.pop('antialiaseds')
+ if 'antialiased' not in kwargs and cbook._str_lower_equal(ec, "none"):
+ kwargs['antialiased'] = False
+
+ kwargs.setdefault('snap', False)
+
+ if np.ma.isMaskedArray(X) or np.ma.isMaskedArray(Y):
+ stack = np.ma.stack
+ X = np.ma.asarray(X)
+ Y = np.ma.asarray(Y)
+ # For bounds collections later
+ x = X.compressed()
+ y = Y.compressed()
+ else:
+ stack = np.stack
+ x = X
+ y = Y
+ coords = stack([X, Y], axis=-1)
+
+ collection = mcoll.PolyQuadMesh(
+ coords, array=C, cmap=cmap, norm=norm, colorizer=colorizer,
+ alpha=alpha, **kwargs)
+ collection._check_exclusionary_keywords(colorizer, vmin=vmin, vmax=vmax)
+ collection._scale_norm(norm, vmin, vmax)
+
+ # Transform from native to data coordinates?
+ t = collection._transform
+ if (not isinstance(t, mtransforms.Transform) and
+ hasattr(t, '_as_mpl_transform')):
+ t = t._as_mpl_transform(self.axes)
+
+ if t and any(t.contains_branch_seperately(self.transData)):
+ trans_to_data = t - self.transData
+ pts = np.vstack([x, y]).T.astype(float)
+ transformed_pts = trans_to_data.transform(pts)
+ x = transformed_pts[..., 0]
+ y = transformed_pts[..., 1]
+
+ self.add_collection(collection, autolim=False)
+
+ minx = np.min(x)
+ maxx = np.max(x)
+ miny = np.min(y)
+ maxy = np.max(y)
+ collection.sticky_edges.x[:] = [minx, maxx]
+ collection.sticky_edges.y[:] = [miny, maxy]
+ corners = (minx, miny), (maxx, maxy)
+ self.update_datalim(corners)
+ self._request_autoscale_view()
+ return collection
+
+ @_preprocess_data()
+ @_docstring.interpd
+ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
+ vmax=None, colorizer=None, shading=None, antialiased=False,
+ **kwargs):
+ """
+ Create a pseudocolor plot with a non-regular rectangular grid.
+
+ Call signature::
+
+ pcolormesh([X, Y,] C, /, **kwargs)
+
+ *X* and *Y* can be used to specify the corners of the quadrilaterals.
+
+ The arguments *X*, *Y*, *C* are positional-only.
+
+ .. hint::
+
+ `~.Axes.pcolormesh` is similar to `~.Axes.pcolor`. It is much faster
+ and preferred in most cases. For a detailed discussion on the
+ differences see :ref:`Differences between pcolor() and pcolormesh()
+ `.
+
+ Parameters
+ ----------
+ C : array-like
+ The mesh data. Supported array shapes are:
+
+ - (M, N) or M*N: a mesh with scalar data. The values are mapped to
+ colors using normalization and a colormap. See parameters *norm*,
+ *cmap*, *vmin*, *vmax*.
+ - (M, N, 3): an image with RGB values (0-1 float or 0-255 int).
+ - (M, N, 4): an image with RGBA values (0-1 float or 0-255 int),
+ i.e. including transparency.
+
+ The first two dimensions (M, N) define the rows and columns of
+ the mesh data.
+
+ X, Y : array-like, optional
+ The coordinates of the corners of quadrilaterals of a pcolormesh::
+
+ (X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1])
+ �╶───╴�
+ │ │
+ �╶───╴�
+ (X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1])
+
+ Note that the column index corresponds to the x-coordinate, and
+ the row index corresponds to y. For details, see the
+ :ref:`Notes ` section below.
+
+ If ``shading='flat'`` the dimensions of *X* and *Y* should be one
+ greater than those of *C*, and the quadrilateral is colored due
+ to the value at ``C[i, j]``. If *X*, *Y* and *C* have equal
+ dimensions, a warning will be raised and the last row and column
+ of *C* will be ignored.
+
+ If ``shading='nearest'`` or ``'gouraud'``, the dimensions of *X*
+ and *Y* should be the same as those of *C* (if not, a ValueError
+ will be raised). For ``'nearest'`` the color ``C[i, j]`` is
+ centered on ``(X[i, j], Y[i, j])``. For ``'gouraud'``, a smooth
+ interpolation is carried out between the quadrilateral corners.
+
+ If *X* and/or *Y* are 1-D arrays or column vectors they will be
+ expanded as needed into the appropriate 2D arrays, making a
+ rectangular grid.
+
+ %(cmap_doc)s
+
+ %(norm_doc)s
+
+ %(vmin_vmax_doc)s
+
+ %(colorizer_doc)s
+
+ edgecolors : {'none', None, 'face', color, color sequence}, optional
+ The color of the edges. Defaults to 'none'. Possible values:
+
+ - 'none' or '': No edge.
+ - *None*: :rc:`patch.edgecolor` will be used. Note that currently
+ :rc:`patch.force_edgecolor` has to be True for this to work.
+ - 'face': Use the adjacent face color.
+ - A color or sequence of colors will set the edge color.
+
+ The singular form *edgecolor* works as an alias.
+
+ alpha : float, default: None
+ The alpha blending value, between 0 (transparent) and 1 (opaque).
+
+ shading : {'flat', 'nearest', 'gouraud', 'auto'}, optional
+ The fill style for the quadrilateral; defaults to
+ :rc:`pcolor.shading`. Possible values:
+
+ - 'flat': A solid color is used for each quad. The color of the
+ quad (i, j), (i+1, j), (i, j+1), (i+1, j+1) is given by
+ ``C[i, j]``. The dimensions of *X* and *Y* should be
+ one greater than those of *C*; if they are the same as *C*,
+ then a deprecation warning is raised, and the last row
+ and column of *C* are dropped.
+ - 'nearest': Each grid point will have a color centered on it,
+ extending halfway between the adjacent grid centers. The
+ dimensions of *X* and *Y* must be the same as *C*.
+ - 'gouraud': Each quad will be Gouraud shaded: The color of the
+ corners (i', j') are given by ``C[i', j']``. The color values of
+ the area in between is interpolated from the corner values.
+ The dimensions of *X* and *Y* must be the same as *C*. When
+ Gouraud shading is used, *edgecolors* is ignored.
+ - 'auto': Choose 'flat' if dimensions of *X* and *Y* are one
+ larger than *C*. Choose 'nearest' if dimensions are the same.
+
+ See :doc:`/gallery/images_contours_and_fields/pcolormesh_grids`
+ for more description.
+
+ snap : bool, default: False
+ Whether to snap the mesh to pixel boundaries.
+
+ rasterized : bool, optional
+ Rasterize the pcolormesh when drawing vector graphics. This can
+ speed up rendering and produce smaller files for large data sets.
+ See also :doc:`/gallery/misc/rasterization_demo`.
+
+ Returns
+ -------
+ `matplotlib.collections.QuadMesh`
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Additionally, the following arguments are allowed. They are passed
+ along to the `~matplotlib.collections.QuadMesh` constructor:
+
+ %(QuadMesh:kwdoc)s
+
+ See Also
+ --------
+ pcolor : An alternative implementation with slightly different
+ features. For a detailed discussion on the differences see
+ :ref:`Differences between pcolor() and pcolormesh()
+ `.
+ imshow : If *X* and *Y* are each equidistant, `~.Axes.imshow` can be a
+ faster alternative.
+
+ Notes
+ -----
+ **Masked arrays**
+
+ *C* may be a masked array. If ``C[i, j]`` is masked, the corresponding
+ quadrilateral will be transparent. Masking of *X* and *Y* is not
+ supported. Use `~.Axes.pcolor` if you need this functionality.
+
+ .. _axes-pcolormesh-grid-orientation:
+
+ **Grid orientation**
+
+ The grid orientation follows the standard matrix convention: An array
+ *C* with shape (nrows, ncolumns) is plotted with the column number as
+ *X* and the row number as *Y*.
+
+ .. _differences-pcolor-pcolormesh:
+
+ **Differences between pcolor() and pcolormesh()**
+
+ Both methods are used to create a pseudocolor plot of a 2D array
+ using quadrilaterals.
+
+ The main difference lies in the created object and internal data
+ handling:
+ While `~.Axes.pcolor` returns a `.PolyQuadMesh`, `~.Axes.pcolormesh`
+ returns a `.QuadMesh`. The latter is more specialized for the given
+ purpose and thus is faster. It should almost always be preferred.
+
+ There is also a slight difference in the handling of masked arrays.
+ Both `~.Axes.pcolor` and `~.Axes.pcolormesh` support masked arrays
+ for *C*. However, only `~.Axes.pcolor` supports masked arrays for *X*
+ and *Y*. The reason lies in the internal handling of the masked values.
+ `~.Axes.pcolor` leaves out the respective polygons from the
+ PolyQuadMesh. `~.Axes.pcolormesh` sets the facecolor of the masked
+ elements to transparent. You can see the difference when using
+ edgecolors. While all edges are drawn irrespective of masking in a
+ QuadMesh, the edge between two adjacent masked quadrilaterals in
+ `~.Axes.pcolor` is not drawn as the corresponding polygons do not
+ exist in the PolyQuadMesh. Because PolyQuadMesh draws each individual
+ polygon, it also supports applying hatches and linestyles to the collection.
+
+ Another difference is the support of Gouraud shading in
+ `~.Axes.pcolormesh`, which is not available with `~.Axes.pcolor`.
+
+ """
+ if shading is None:
+ shading = mpl.rcParams['pcolor.shading']
+ shading = shading.lower()
+ kwargs.setdefault('edgecolors', 'none')
+
+ X, Y, C, shading = self._pcolorargs('pcolormesh', *args,
+ shading=shading, kwargs=kwargs)
+ coords = np.stack([X, Y], axis=-1)
+
+ kwargs.setdefault('snap', mpl.rcParams['pcolormesh.snap'])
+
+ collection = mcoll.QuadMesh(
+ coords, antialiased=antialiased, shading=shading,
+ array=C, cmap=cmap, norm=norm, colorizer=colorizer, alpha=alpha, **kwargs)
+ collection._check_exclusionary_keywords(colorizer, vmin=vmin, vmax=vmax)
+ collection._scale_norm(norm, vmin, vmax)
+
+ coords = coords.reshape(-1, 2) # flatten the grid structure; keep x, y
+
+ # Transform from native to data coordinates?
+ t = collection._transform
+ if (not isinstance(t, mtransforms.Transform) and
+ hasattr(t, '_as_mpl_transform')):
+ t = t._as_mpl_transform(self.axes)
+
+ if t and any(t.contains_branch_seperately(self.transData)):
+ trans_to_data = t - self.transData
+ coords = trans_to_data.transform(coords)
+
+ self.add_collection(collection, autolim=False)
+
+ minx, miny = np.min(coords, axis=0)
+ maxx, maxy = np.max(coords, axis=0)
+ collection.sticky_edges.x[:] = [minx, maxx]
+ collection.sticky_edges.y[:] = [miny, maxy]
+ corners = (minx, miny), (maxx, maxy)
+ self.update_datalim(corners)
+ self._request_autoscale_view()
+ return collection
+
+ @_preprocess_data()
+ @_docstring.interpd
+ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
+ vmax=None, colorizer=None, **kwargs):
+ """
+ Create a pseudocolor plot with a non-regular rectangular grid.
+
+ Call signature::
+
+ ax.pcolorfast([X, Y], C, /, **kwargs)
+
+ The arguments *X*, *Y*, *C* are positional-only.
+
+ This method is similar to `~.Axes.pcolor` and `~.Axes.pcolormesh`.
+ It's designed to provide the fastest pcolor-type plotting with the
+ Agg backend. To achieve this, it uses different algorithms internally
+ depending on the complexity of the input grid (regular rectangular,
+ non-regular rectangular or arbitrary quadrilateral).
+
+ .. warning::
+
+ This method is experimental. Compared to `~.Axes.pcolor` or
+ `~.Axes.pcolormesh` it has some limitations:
+
+ - It supports only flat shading (no outlines)
+ - It lacks support for log scaling of the axes.
+ - It does not have a pyplot wrapper.
+
+ Parameters
+ ----------
+ C : array-like
+ The image data. Supported array shapes are:
+
+ - (M, N): an image with scalar data. Color-mapping is controlled
+ by *cmap*, *norm*, *vmin*, and *vmax*.
+ - (M, N, 3): an image with RGB values (0-1 float or 0-255 int).
+ - (M, N, 4): an image with RGBA values (0-1 float or 0-255 int),
+ i.e. including transparency.
+
+ The first two dimensions (M, N) define the rows and columns of
+ the image.
+
+ This parameter can only be passed positionally.
+
+ X, Y : tuple or array-like, default: ``(0, N)``, ``(0, M)``
+ *X* and *Y* are used to specify the coordinates of the
+ quadrilaterals. There are different ways to do this:
+
+ - Use tuples ``X=(xmin, xmax)`` and ``Y=(ymin, ymax)`` to define
+ a *uniform rectangular grid*.
+
+ The tuples define the outer edges of the grid. All individual
+ quadrilaterals will be of the same size. This is the fastest
+ version.
+
+ - Use 1D arrays *X*, *Y* to specify a *non-uniform rectangular
+ grid*.
+
+ In this case *X* and *Y* have to be monotonic 1D arrays of length
+ *N+1* and *M+1*, specifying the x and y boundaries of the cells.
+
+ The speed is intermediate. Note: The grid is checked, and if
+ found to be uniform the fast version is used.
+
+ - Use 2D arrays *X*, *Y* if you need an *arbitrary quadrilateral
+ grid* (i.e. if the quadrilaterals are not rectangular).
+
+ In this case *X* and *Y* are 2D arrays with shape (M + 1, N + 1),
+ specifying the x and y coordinates of the corners of the colored
+ quadrilaterals.
+
+ This is the most general, but the slowest to render. It may
+ produce faster and more compact output using ps, pdf, and
+ svg backends, however.
+
+ These arguments can only be passed positionally.
+
+ %(cmap_doc)s
+
+ This parameter is ignored if *C* is RGB(A).
+
+ %(norm_doc)s
+
+ This parameter is ignored if *C* is RGB(A).
+
+ %(vmin_vmax_doc)s
+
+ This parameter is ignored if *C* is RGB(A).
+
+ %(colorizer_doc)s
+
+ This parameter is ignored if *C* is RGB(A).
+
+ alpha : float, default: None
+ The alpha blending value, between 0 (transparent) and 1 (opaque).
+
+ snap : bool, default: False
+ Whether to snap the mesh to pixel boundaries.
+
+ Returns
+ -------
+ `.AxesImage` or `.PcolorImage` or `.QuadMesh`
+ The return type depends on the type of grid:
+
+ - `.AxesImage` for a regular rectangular grid.
+ - `.PcolorImage` for a non-regular rectangular grid.
+ - `.QuadMesh` for a non-rectangular grid.
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Supported additional parameters depend on the type of grid.
+ See return types of *image* for further description.
+ """
+
+ C = args[-1]
+ nr, nc = np.shape(C)[:2]
+ if len(args) == 1:
+ style = "image"
+ x = [0, nc]
+ y = [0, nr]
+ elif len(args) == 3:
+ x, y = args[:2]
+ x = np.asarray(x)
+ y = np.asarray(y)
+ if x.ndim == 1 and y.ndim == 1:
+ if x.size == 2 and y.size == 2:
+ style = "image"
+ else:
+ if x.size != nc + 1:
+ raise ValueError(
+ f"Length of X ({x.size}) must be one larger than the "
+ f"number of columns in C ({nc})")
+ if y.size != nr + 1:
+ raise ValueError(
+ f"Length of Y ({y.size}) must be one larger than the "
+ f"number of rows in C ({nr})"
+ )
+ dx = np.diff(x)
+ dy = np.diff(y)
+ if (np.ptp(dx) < 0.01 * abs(dx.mean()) and
+ np.ptp(dy) < 0.01 * abs(dy.mean())):
+ style = "image"
+ else:
+ style = "pcolorimage"
+ elif x.ndim == 2 and y.ndim == 2:
+ style = "quadmesh"
+ else:
+ raise TypeError(
+ f"When 3 positional parameters are passed to pcolorfast, the first "
+ f"two (X and Y) must be both 1D or both 2D; the given X was "
+ f"{x.ndim}D and the given Y was {y.ndim}D")
+ else:
+ raise _api.nargs_error('pcolorfast', '1 or 3', len(args))
+
+ mcolorizer.ColorizingArtist._check_exclusionary_keywords(colorizer, vmin=vmin,
+ vmax=vmax)
+ if style == "quadmesh":
+ # data point in each cell is value at lower left corner
+ coords = np.stack([x, y], axis=-1)
+ if np.ndim(C) not in {2, 3}:
+ raise ValueError("C must be 2D or 3D")
+ collection = mcoll.QuadMesh(
+ coords, array=C,
+ alpha=alpha, cmap=cmap, norm=norm, colorizer=colorizer,
+ antialiased=False, edgecolors="none")
+ self.add_collection(collection, autolim=False)
+ xl, xr, yb, yt = x.min(), x.max(), y.min(), y.max()
+ ret = collection
+
+ else: # It's one of the two image styles.
+ extent = xl, xr, yb, yt = x[0], x[-1], y[0], y[-1]
+ if style == "image":
+ im = mimage.AxesImage(
+ self, cmap=cmap, norm=norm, colorizer=colorizer,
+ data=C, alpha=alpha, extent=extent,
+ interpolation='nearest', origin='lower',
+ **kwargs)
+ elif style == "pcolorimage":
+ im = mimage.PcolorImage(
+ self, x, y, C,
+ cmap=cmap, norm=norm, colorizer=colorizer, alpha=alpha,
+ extent=extent, **kwargs)
+ self.add_image(im)
+ ret = im
+
+ if np.ndim(C) == 2: # C.ndim == 3 is RGB(A) so doesn't need scaling.
+ ret._scale_norm(norm, vmin, vmax)
+
+ if ret.get_clip_path() is None:
+ # image does not already have clipping set, clip to Axes patch
+ ret.set_clip_path(self.patch)
+
+ ret.sticky_edges.x[:] = [xl, xr]
+ ret.sticky_edges.y[:] = [yb, yt]
+ self.update_datalim(np.array([[xl, yb], [xr, yt]]))
+ self._request_autoscale_view(tight=True)
+ return ret
+
+ @_preprocess_data()
+ @_docstring.interpd
+ def contour(self, *args, **kwargs):
+ """
+ Plot contour lines.
+
+ Call signature::
+
+ contour([X, Y,] Z, /, [levels], **kwargs)
+
+ The arguments *X*, *Y*, *Z* are positional-only.
+ %(contour_doc)s
+ """
+ kwargs['filled'] = False
+ contours = mcontour.QuadContourSet(self, *args, **kwargs)
+ self._request_autoscale_view()
+ return contours
+
+ @_preprocess_data()
+ @_docstring.interpd
+ def contourf(self, *args, **kwargs):
+ """
+ Plot filled contours.
+
+ Call signature::
+
+ contourf([X, Y,] Z, /, [levels], **kwargs)
+
+ The arguments *X*, *Y*, *Z* are positional-only.
+ %(contour_doc)s
+ """
+ kwargs['filled'] = True
+ contours = mcontour.QuadContourSet(self, *args, **kwargs)
+ self._request_autoscale_view()
+ return contours
+
+ def clabel(self, CS, levels=None, **kwargs):
+ """
+ Label a contour plot.
+
+ Adds labels to line contours in given `.ContourSet`.
+
+ Parameters
+ ----------
+ CS : `.ContourSet` instance
+ Line contours to label.
+
+ levels : array-like, optional
+ A list of level values, that should be labeled. The list must be
+ a subset of ``CS.levels``. If not given, all levels are labeled.
+
+ **kwargs
+ All other parameters are documented in `~.ContourLabeler.clabel`.
+ """
+ return CS.clabel(levels, **kwargs)
+
+ #### Data analysis
+
+ @_api.make_keyword_only("3.10", "range")
+ @_preprocess_data(replace_names=["x", 'weights'], label_namer="x")
+ def hist(self, x, bins=None, range=None, density=False, weights=None,
+ cumulative=False, bottom=None, histtype='bar', align='mid',
+ orientation='vertical', rwidth=None, log=False,
+ color=None, label=None, stacked=False, **kwargs):
+ """
+ Compute and plot a histogram.
+
+ This method uses `numpy.histogram` to bin the data in *x* and count the
+ number of values in each bin, then draws the distribution either as a
+ `.BarContainer` or `.Polygon`. The *bins*, *range*, *density*, and
+ *weights* parameters are forwarded to `numpy.histogram`.
+
+ If the data has already been binned and counted, use `~.bar` or
+ `~.stairs` to plot the distribution::
+
+ counts, bins = np.histogram(x)
+ plt.stairs(counts, bins)
+
+ Alternatively, plot pre-computed bins and counts using ``hist()`` by
+ treating each bin as a single point with a weight equal to its count::
+
+ plt.hist(bins[:-1], bins, weights=counts)
+
+ The data input *x* can be a singular array, a list of datasets of
+ potentially different lengths ([*x0*, *x1*, ...]), or a 2D ndarray in
+ which each column is a dataset. Note that the ndarray form is
+ transposed relative to the list form. If the input is an array, then
+ the return value is a tuple (*n*, *bins*, *patches*); if the input is a
+ sequence of arrays, then the return value is a tuple
+ ([*n0*, *n1*, ...], *bins*, [*patches0*, *patches1*, ...]).
+
+ Masked arrays are not supported.
+
+ Parameters
+ ----------
+ x : (n,) array or sequence of (n,) arrays
+ Input values, this takes either a single array or a sequence of
+ arrays which are not required to be of the same length.
+
+ bins : int or sequence or str, default: :rc:`hist.bins`
+ If *bins* is an integer, it defines the number of equal-width bins
+ in the range.
+
+ If *bins* is a sequence, it defines the bin edges, including the
+ left edge of the first bin and the right edge of the last bin;
+ in this case, bins may be unequally spaced. All but the last
+ (righthand-most) bin is half-open. In other words, if *bins* is::
+
+ [1, 2, 3, 4]
+
+ then the first bin is ``[1, 2)`` (including 1, but excluding 2) and
+ the second ``[2, 3)``. The last bin, however, is ``[3, 4]``, which
+ *includes* 4.
+
+ If *bins* is a string, it is one of the binning strategies
+ supported by `numpy.histogram_bin_edges`: 'auto', 'fd', 'doane',
+ 'scott', 'stone', 'rice', 'sturges', or 'sqrt'.
+
+ range : tuple or None, default: None
+ The lower and upper range of the bins. Lower and upper outliers
+ are ignored. If not provided, *range* is ``(x.min(), x.max())``.
+ Range has no effect if *bins* is a sequence.
+
+ If *bins* is a sequence or *range* is specified, autoscaling
+ is based on the specified bin range instead of the
+ range of x.
+
+ density : bool, default: False
+ If ``True``, draw and return a probability density: each bin
+ will display the bin's raw count divided by the total number of
+ counts *and the bin width*
+ (``density = counts / (sum(counts) * np.diff(bins))``),
+ so that the area under the histogram integrates to 1
+ (``np.sum(density * np.diff(bins)) == 1``).
+
+ If *stacked* is also ``True``, the sum of the histograms is
+ normalized to 1.
+
+ weights : (n,) array-like or None, default: None
+ An array of weights, of the same shape as *x*. Each value in
+ *x* only contributes its associated weight towards the bin count
+ (instead of 1). If *density* is ``True``, the weights are
+ normalized, so that the integral of the density over the range
+ remains 1.
+
+ cumulative : bool or -1, default: False
+ If ``True``, then a histogram is computed where each bin gives the
+ counts in that bin plus all bins for smaller values. The last bin
+ gives the total number of datapoints.
+
+ If *density* is also ``True`` then the histogram is normalized such
+ that the last bin equals 1.
+
+ If *cumulative* is a number less than 0 (e.g., -1), the direction
+ of accumulation is reversed. In this case, if *density* is also
+ ``True``, then the histogram is normalized such that the first bin
+ equals 1.
+
+ bottom : array-like or float, default: 0
+ Location of the bottom of each bin, i.e. bins are drawn from
+ ``bottom`` to ``bottom + hist(x, bins)`` If a scalar, the bottom
+ of each bin is shifted by the same amount. If an array, each bin
+ is shifted independently and the length of bottom must match the
+ number of bins. If None, defaults to 0.
+
+ histtype : {'bar', 'barstacked', 'step', 'stepfilled'}, default: 'bar'
+ The type of histogram to draw.
+
+ - 'bar' is a traditional bar-type histogram. If multiple data
+ are given the bars are arranged side by side.
+ - 'barstacked' is a bar-type histogram where multiple
+ data are stacked on top of each other.
+ - 'step' generates a lineplot that is by default unfilled.
+ - 'stepfilled' generates a lineplot that is by default filled.
+
+ align : {'left', 'mid', 'right'}, default: 'mid'
+ The horizontal alignment of the histogram bars.
+
+ - 'left': bars are centered on the left bin edges.
+ - 'mid': bars are centered between the bin edges.
+ - 'right': bars are centered on the right bin edges.
+
+ orientation : {'vertical', 'horizontal'}, default: 'vertical'
+ If 'horizontal', `~.Axes.barh` will be used for bar-type histograms
+ and the *bottom* kwarg will be the left edges.
+
+ rwidth : float or None, default: None
+ The relative width of the bars as a fraction of the bin width. If
+ ``None``, automatically compute the width.
+
+ Ignored if *histtype* is 'step' or 'stepfilled'.
+
+ log : bool, default: False
+ If ``True``, the histogram axis will be set to a log scale.
+
+ color : :mpltype:`color` or list of :mpltype:`color` or None, default: None
+ Color or sequence of colors, one per dataset. Default (``None``)
+ uses the standard line color sequence.
+
+ label : str or list of str, optional
+ String, or sequence of strings to match multiple datasets. Bar
+ charts yield multiple patches per dataset, but only the first gets
+ the label, so that `~.Axes.legend` will work as expected.
+
+ stacked : bool, default: False
+ If ``True``, multiple data are stacked on top of each other If
+ ``False`` multiple data are arranged side by side if histtype is
+ 'bar' or on top of each other if histtype is 'step'
+
+ Returns
+ -------
+ n : array or list of arrays
+ The values of the histogram bins. See *density* and *weights* for a
+ description of the possible semantics. If input *x* is an array,
+ then this is an array of length *nbins*. If input is a sequence of
+ arrays ``[data1, data2, ...]``, then this is a list of arrays with
+ the values of the histograms for each of the arrays in the same
+ order. The dtype of the array *n* (or of its element arrays) will
+ always be float even if no weighting or normalization is used.
+
+ bins : array
+ The edges of the bins. Length nbins + 1 (nbins left edges and right
+ edge of last bin). Always a single array even when multiple data
+ sets are passed in.
+
+ patches : `.BarContainer` or list of a single `.Polygon` or list of \
+such objects
+ Container of individual artists used to create the histogram
+ or list of such containers if there are multiple input datasets.
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ `~matplotlib.patches.Patch` properties. The following properties
+ additionally accept a sequence of values corresponding to the
+ datasets in *x*:
+ *edgecolor*, *facecolor*, *linewidth*, *linestyle*, *hatch*.
+
+ .. versionadded:: 3.10
+ Allowing sequences of values in above listed Patch properties.
+
+ See Also
+ --------
+ hist2d : 2D histogram with rectangular bins
+ hexbin : 2D histogram with hexagonal bins
+ stairs : Plot a pre-computed histogram
+ bar : Plot a pre-computed histogram
+
+ Notes
+ -----
+ For large numbers of bins (>1000), plotting can be significantly
+ accelerated by using `~.Axes.stairs` to plot a pre-computed histogram
+ (``plt.stairs(*np.histogram(data))``), or by setting *histtype* to
+ 'step' or 'stepfilled' rather than 'bar' or 'barstacked'.
+ """
+ # Avoid shadowing the builtin.
+ bin_range = range
+ from builtins import range
+
+ kwargs = cbook.normalize_kwargs(kwargs, mpatches.Patch)
+
+ if np.isscalar(x):
+ x = [x]
+
+ if bins is None:
+ bins = mpl.rcParams['hist.bins']
+
+ # Validate string inputs here to avoid cluttering subsequent code.
+ _api.check_in_list(['bar', 'barstacked', 'step', 'stepfilled'],
+ histtype=histtype)
+ _api.check_in_list(['left', 'mid', 'right'], align=align)
+ _api.check_in_list(['horizontal', 'vertical'], orientation=orientation)
+
+ if histtype == 'barstacked' and not stacked:
+ stacked = True
+
+ # Massage 'x' for processing.
+ x = cbook._reshape_2D(x, 'x')
+ nx = len(x) # number of datasets
+
+ # Process unit information. _process_unit_info sets the unit and
+ # converts the first dataset; then we convert each following dataset
+ # one at a time.
+ if orientation == "vertical":
+ convert_units = self.convert_xunits
+ x = [*self._process_unit_info([("x", x[0])], kwargs),
+ *map(convert_units, x[1:])]
+ else: # horizontal
+ convert_units = self.convert_yunits
+ x = [*self._process_unit_info([("y", x[0])], kwargs),
+ *map(convert_units, x[1:])]
+
+ if bin_range is not None:
+ bin_range = convert_units(bin_range)
+
+ if not cbook.is_scalar_or_string(bins):
+ bins = convert_units(bins)
+
+ # We need to do to 'weights' what was done to 'x'
+ if weights is not None:
+ w = cbook._reshape_2D(weights, 'weights')
+ else:
+ w = [None] * nx
+
+ if len(w) != nx:
+ raise ValueError('weights should have the same shape as x')
+
+ input_empty = True
+ for xi, wi in zip(x, w):
+ len_xi = len(xi)
+ if wi is not None and len(wi) != len_xi:
+ raise ValueError('weights should have the same shape as x')
+ if len_xi:
+ input_empty = False
+
+ if color is None:
+ colors = [self._get_lines.get_next_color() for i in range(nx)]
+ else:
+ colors = mcolors.to_rgba_array(color)
+ if len(colors) != nx:
+ raise ValueError(f"The 'color' keyword argument must have one "
+ f"color per dataset, but {nx} datasets and "
+ f"{len(colors)} colors were provided")
+
+ hist_kwargs = dict()
+
+ # if the bin_range is not given, compute without nan numpy
+ # does not do this for us when guessing the range (but will
+ # happily ignore nans when computing the histogram).
+ if bin_range is None:
+ xmin = np.inf
+ xmax = -np.inf
+ for xi in x:
+ if len(xi):
+ # python's min/max ignore nan,
+ # np.minnan returns nan for all nan input
+ xmin = min(xmin, np.nanmin(xi))
+ xmax = max(xmax, np.nanmax(xi))
+ if xmin <= xmax: # Only happens if we have seen a finite value.
+ bin_range = (xmin, xmax)
+
+ # If bins are not specified either explicitly or via range,
+ # we need to figure out the range required for all datasets,
+ # and supply that to np.histogram.
+ if not input_empty and len(x) > 1:
+ if weights is not None:
+ _w = np.concatenate(w)
+ else:
+ _w = None
+ bins = np.histogram_bin_edges(
+ np.concatenate(x), bins, bin_range, _w)
+ else:
+ hist_kwargs['range'] = bin_range
+
+ density = bool(density)
+ if density and not stacked:
+ hist_kwargs['density'] = density
+
+ # List to store all the top coordinates of the histograms
+ tops = [] # Will have shape (n_datasets, n_bins).
+ # Loop through datasets
+ for i in range(nx):
+ # this will automatically overwrite bins,
+ # so that each histogram uses the same bins
+ m, bins = np.histogram(x[i], bins, weights=w[i], **hist_kwargs)
+ tops.append(m)
+ tops = np.array(tops, float) # causes problems later if it's an int
+ bins = np.array(bins, float) # causes problems if float16
+ if stacked:
+ tops = tops.cumsum(axis=0)
+ # If a stacked density plot, normalize so the area of all the
+ # stacked histograms together is 1
+ if density:
+ tops = (tops / np.diff(bins)) / tops[-1].sum()
+ if cumulative:
+ slc = slice(None)
+ if isinstance(cumulative, Number) and cumulative < 0:
+ slc = slice(None, None, -1)
+ if density:
+ tops = (tops * np.diff(bins))[:, slc].cumsum(axis=1)[:, slc]
+ else:
+ tops = tops[:, slc].cumsum(axis=1)[:, slc]
+
+ patches = []
+
+ if histtype.startswith('bar'):
+
+ totwidth = np.diff(bins)
+
+ if rwidth is not None:
+ dr = np.clip(rwidth, 0, 1)
+ elif (len(tops) > 1 and
+ ((not stacked) or mpl.rcParams['_internal.classic_mode'])):
+ dr = 0.8
+ else:
+ dr = 1.0
+
+ if histtype == 'bar' and not stacked:
+ width = dr * totwidth / nx
+ dw = width
+ boffset = -0.5 * dr * totwidth * (1 - 1 / nx)
+ elif histtype == 'barstacked' or stacked:
+ width = dr * totwidth
+ boffset, dw = 0.0, 0.0
+
+ if align == 'mid':
+ boffset += 0.5 * totwidth
+ elif align == 'right':
+ boffset += totwidth
+
+ if orientation == 'horizontal':
+ _barfunc = self.barh
+ bottom_kwarg = 'left'
+ else: # orientation == 'vertical'
+ _barfunc = self.bar
+ bottom_kwarg = 'bottom'
+
+ for top, color in zip(tops, colors):
+ if bottom is None:
+ bottom = np.zeros(len(top))
+ if stacked:
+ height = top - bottom
+ else:
+ height = top
+ bars = _barfunc(bins[:-1]+boffset, height, width,
+ align='center', log=log,
+ color=color, **{bottom_kwarg: bottom})
+ patches.append(bars)
+ if stacked:
+ bottom = top
+ boffset += dw
+ # Remove stickies from all bars but the lowest ones, as otherwise
+ # margin expansion would be unable to cross the stickies in the
+ # middle of the bars.
+ for bars in patches[1:]:
+ for patch in bars:
+ patch.sticky_edges.x[:] = patch.sticky_edges.y[:] = []
+
+ elif histtype.startswith('step'):
+ # these define the perimeter of the polygon
+ x = np.zeros(4 * len(bins) - 3)
+ y = np.zeros(4 * len(bins) - 3)
+
+ x[0:2*len(bins)-1:2], x[1:2*len(bins)-1:2] = bins, bins[:-1]
+ x[2*len(bins)-1:] = x[1:2*len(bins)-1][::-1]
+
+ if bottom is None:
+ bottom = 0
+
+ y[1:2*len(bins)-1:2] = y[2:2*len(bins):2] = bottom
+ y[2*len(bins)-1:] = y[1:2*len(bins)-1][::-1]
+
+ if log:
+ if orientation == 'horizontal':
+ self.set_xscale('log', nonpositive='clip')
+ else: # orientation == 'vertical'
+ self.set_yscale('log', nonpositive='clip')
+
+ if align == 'left':
+ x -= 0.5*(bins[1]-bins[0])
+ elif align == 'right':
+ x += 0.5*(bins[1]-bins[0])
+
+ # If fill kwarg is set, it will be passed to the patch collection,
+ # overriding this
+ fill = (histtype == 'stepfilled')
+
+ xvals, yvals = [], []
+ for top in tops:
+ if stacked:
+ # top of the previous polygon becomes the bottom
+ y[2*len(bins)-1:] = y[1:2*len(bins)-1][::-1]
+ # set the top of this polygon
+ y[1:2*len(bins)-1:2] = y[2:2*len(bins):2] = top + bottom
+
+ # The starting point of the polygon has not yet been
+ # updated. So far only the endpoint was adjusted. This
+ # assignment closes the polygon. The redundant endpoint is
+ # later discarded (for step and stepfilled).
+ y[0] = y[-1]
+
+ if orientation == 'horizontal':
+ xvals.append(y.copy())
+ yvals.append(x.copy())
+ else:
+ xvals.append(x.copy())
+ yvals.append(y.copy())
+
+ # stepfill is closed, step is not
+ split = -1 if fill else 2 * len(bins)
+ # add patches in reverse order so that when stacking,
+ # items lower in the stack are plotted on top of
+ # items higher in the stack
+ for x, y, color in reversed(list(zip(xvals, yvals, colors))):
+ patches.append(self.fill(
+ x[:split], y[:split],
+ closed=True if fill else None,
+ facecolor=color,
+ edgecolor=None if fill else color,
+ fill=fill if fill else None,
+ zorder=None if fill else mlines.Line2D.zorder))
+ for patch_list in patches:
+ for patch in patch_list:
+ if orientation == 'vertical':
+ patch.sticky_edges.y.append(0)
+ elif orientation == 'horizontal':
+ patch.sticky_edges.x.append(0)
+
+ # we return patches, so put it back in the expected order
+ patches.reverse()
+
+ # If None, make all labels None (via zip_longest below); otherwise,
+ # cast each element to str, but keep a single str as it.
+ labels = [] if label is None else np.atleast_1d(np.asarray(label, str))
+
+ if histtype == "step":
+ ec = kwargs.get('edgecolor', colors)
+ else:
+ ec = kwargs.get('edgecolor', None)
+ if ec is None or cbook._str_lower_equal(ec, 'none'):
+ edgecolors = itertools.repeat(ec)
+ else:
+ edgecolors = itertools.cycle(mcolors.to_rgba_array(ec))
+
+ fc = kwargs.get('facecolor', colors)
+ if cbook._str_lower_equal(fc, 'none'):
+ facecolors = itertools.repeat(fc)
+ else:
+ facecolors = itertools.cycle(mcolors.to_rgba_array(fc))
+
+ hatches = itertools.cycle(np.atleast_1d(kwargs.get('hatch', None)))
+ linewidths = itertools.cycle(np.atleast_1d(kwargs.get('linewidth', None)))
+ if 'linestyle' in kwargs:
+ linestyles = itertools.cycle(mlines._get_dash_patterns(kwargs['linestyle']))
+ else:
+ linestyles = itertools.repeat(None)
+
+ for patch, lbl in itertools.zip_longest(patches, labels):
+ if not patch:
+ continue
+ p = patch[0]
+ kwargs.update({
+ 'hatch': next(hatches),
+ 'linewidth': next(linewidths),
+ 'linestyle': next(linestyles),
+ 'edgecolor': next(edgecolors),
+ 'facecolor': next(facecolors),
+ })
+ p._internal_update(kwargs)
+ if lbl is not None:
+ p.set_label(lbl)
+ for p in patch[1:]:
+ p._internal_update(kwargs)
+ p.set_label('_nolegend_')
+
+ if nx == 1:
+ return tops[0], bins, patches[0]
+ else:
+ patch_type = ("BarContainer" if histtype.startswith("bar")
+ else "list[Polygon]")
+ return tops, bins, cbook.silent_list(patch_type, patches)
+
+ @_preprocess_data()
+ def stairs(self, values, edges=None, *,
+ orientation='vertical', baseline=0, fill=False, **kwargs):
+ """
+ Draw a stepwise constant function as a line or a filled plot.
+
+ *edges* define the x-axis positions of the steps. *values* the function values
+ between these steps. Depending on *fill*, the function is drawn either as a
+ continuous line with vertical segments at the edges, or as a filled area.
+
+ Parameters
+ ----------
+ values : array-like
+ The step heights.
+
+ edges : array-like
+ The step positions, with ``len(edges) == len(vals) + 1``,
+ between which the curve takes on vals values.
+
+ orientation : {'vertical', 'horizontal'}, default: 'vertical'
+ The direction of the steps. Vertical means that *values* are along
+ the y-axis, and edges are along the x-axis.
+
+ baseline : float, array-like or None, default: 0
+ The bottom value of the bounding edges or when
+ ``fill=True``, position of lower edge. If *fill* is
+ True or an array is passed to *baseline*, a closed
+ path is drawn.
+
+ If None, then drawn as an unclosed Path.
+
+ fill : bool, default: False
+ Whether the area under the step curve should be filled.
+
+ Passing both ``fill=True` and ``baseline=None`` will likely result in
+ undesired filling: the first and last points will be connected
+ with a straight line and the fill will be between this line and the stairs.
+
+
+ Returns
+ -------
+ StepPatch : `~matplotlib.patches.StepPatch`
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ `~matplotlib.patches.StepPatch` properties
+
+ """
+
+ if 'color' in kwargs:
+ _color = kwargs.pop('color')
+ else:
+ _color = self._get_lines.get_next_color()
+ if fill:
+ kwargs.setdefault('linewidth', 0)
+ kwargs.setdefault('facecolor', _color)
+ else:
+ kwargs.setdefault('edgecolor', _color)
+
+ if edges is None:
+ edges = np.arange(len(values) + 1)
+
+ edges, values, baseline = self._process_unit_info(
+ [("x", edges), ("y", values), ("y", baseline)], kwargs)
+
+ patch = mpatches.StepPatch(values,
+ edges,
+ baseline=baseline,
+ orientation=orientation,
+ fill=fill,
+ **kwargs)
+ self.add_patch(patch)
+ if baseline is None and fill:
+ _api.warn_external(
+ f"Both {baseline=} and {fill=} have been passed. "
+ "baseline=None is only intended for unfilled stair plots. "
+ "Because baseline is None, the Path used to draw the stairs will "
+ "not be closed, thus because fill is True the polygon will be closed "
+ "by drawing an (unstroked) edge from the first to last point. It is "
+ "very likely that the resulting fill patterns is not the desired "
+ "result."
+ )
+
+ if baseline is not None:
+ if orientation == 'vertical':
+ patch.sticky_edges.y.append(np.min(baseline))
+ self.update_datalim([(edges[0], np.min(baseline))])
+ else:
+ patch.sticky_edges.x.append(np.min(baseline))
+ self.update_datalim([(np.min(baseline), edges[0])])
+ self._request_autoscale_view()
+ return patch
+
+ @_api.make_keyword_only("3.10", "range")
+ @_preprocess_data(replace_names=["x", "y", "weights"])
+ @_docstring.interpd
+ def hist2d(self, x, y, bins=10, range=None, density=False, weights=None,
+ cmin=None, cmax=None, **kwargs):
+ """
+ Make a 2D histogram plot.
+
+ Parameters
+ ----------
+ x, y : array-like, shape (n, )
+ Input values
+
+ bins : None or int or [int, int] or array-like or [array, array]
+
+ The bin specification:
+
+ - If int, the number of bins for the two dimensions
+ (``nx = ny = bins``).
+ - If ``[int, int]``, the number of bins in each dimension
+ (``nx, ny = bins``).
+ - If array-like, the bin edges for the two dimensions
+ (``x_edges = y_edges = bins``).
+ - If ``[array, array]``, the bin edges in each dimension
+ (``x_edges, y_edges = bins``).
+
+ The default value is 10.
+
+ range : array-like shape(2, 2), optional
+ The leftmost and rightmost edges of the bins along each dimension
+ (if not specified explicitly in the bins parameters): ``[[xmin,
+ xmax], [ymin, ymax]]``. All values outside of this range will be
+ considered outliers and not tallied in the histogram.
+
+ density : bool, default: False
+ Normalize histogram. See the documentation for the *density*
+ parameter of `~.Axes.hist` for more details.
+
+ weights : array-like, shape (n, ), optional
+ An array of values w_i weighing each sample (x_i, y_i).
+
+ cmin, cmax : float, default: None
+ All bins that has count less than *cmin* or more than *cmax* will not be
+ displayed (set to NaN before passing to `~.Axes.pcolormesh`) and these count
+ values in the return value count histogram will also be set to nan upon
+ return.
+
+ Returns
+ -------
+ h : 2D array
+ The bi-dimensional histogram of samples x and y. Values in x are
+ histogrammed along the first dimension and values in y are
+ histogrammed along the second dimension.
+ xedges : 1D array
+ The bin edges along the x-axis.
+ yedges : 1D array
+ The bin edges along the y-axis.
+ image : `~.matplotlib.collections.QuadMesh`
+
+ Other Parameters
+ ----------------
+ %(cmap_doc)s
+
+ %(norm_doc)s
+
+ %(vmin_vmax_doc)s
+
+ %(colorizer_doc)s
+
+ alpha : ``0 <= scalar <= 1`` or ``None``, optional
+ The alpha blending value.
+
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Additional parameters are passed along to the
+ `~.Axes.pcolormesh` method and `~matplotlib.collections.QuadMesh`
+ constructor.
+
+ See Also
+ --------
+ hist : 1D histogram plotting
+ hexbin : 2D histogram with hexagonal bins
+
+ Notes
+ -----
+ - Currently ``hist2d`` calculates its own axis limits, and any limits
+ previously set are ignored.
+ - Rendering the histogram with a logarithmic color scale is
+ accomplished by passing a `.colors.LogNorm` instance to the *norm*
+ keyword argument. Likewise, power-law normalization (similar
+ in effect to gamma correction) can be accomplished with
+ `.colors.PowerNorm`.
+ """
+
+ h, xedges, yedges = np.histogram2d(x, y, bins=bins, range=range,
+ density=density, weights=weights)
+
+ if cmin is not None:
+ h[h < cmin] = None
+ if cmax is not None:
+ h[h > cmax] = None
+
+ pc = self.pcolormesh(xedges, yedges, h.T, **kwargs)
+ self.set_xlim(xedges[0], xedges[-1])
+ self.set_ylim(yedges[0], yedges[-1])
+
+ return h, xedges, yedges, pc
+
+ @_preprocess_data(replace_names=["x", "weights"], label_namer="x")
+ @_docstring.interpd
+ def ecdf(self, x, weights=None, *, complementary=False,
+ orientation="vertical", compress=False, **kwargs):
+ """
+ Compute and plot the empirical cumulative distribution function of *x*.
+
+ .. versionadded:: 3.8
+
+ Parameters
+ ----------
+ x : 1d array-like
+ The input data. Infinite entries are kept (and move the relevant
+ end of the ecdf from 0/1), but NaNs and masked values are errors.
+
+ weights : 1d array-like or None, default: None
+ The weights of the entries; must have the same shape as *x*.
+ Weights corresponding to NaN data points are dropped, and then the
+ remaining weights are normalized to sum to 1. If unset, all
+ entries have the same weight.
+
+ complementary : bool, default: False
+ Whether to plot a cumulative distribution function, which increases
+ from 0 to 1 (the default), or a complementary cumulative
+ distribution function, which decreases from 1 to 0.
+
+ orientation : {"vertical", "horizontal"}, default: "vertical"
+ Whether the entries are plotted along the x-axis ("vertical", the
+ default) or the y-axis ("horizontal"). This parameter takes the
+ same values as in `~.Axes.hist`.
+
+ compress : bool, default: False
+ Whether multiple entries with the same values are grouped together
+ (with a summed weight) before plotting. This is mainly useful if
+ *x* contains many identical data points, to decrease the rendering
+ complexity of the plot. If *x* contains no duplicate points, this
+ has no effect and just uses some time and memory.
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Keyword arguments control the `.Line2D` properties:
+
+ %(Line2D:kwdoc)s
+
+ Returns
+ -------
+ `.Line2D`
+
+ Notes
+ -----
+ The ecdf plot can be thought of as a cumulative histogram with one bin
+ per data entry; i.e. it reports on the entire dataset without any
+ arbitrary binning.
+
+ If *x* contains NaNs or masked entries, either remove them first from
+ the array (if they should not taken into account), or replace them by
+ -inf or +inf (if they should be sorted at the beginning or the end of
+ the array).
+ """
+ _api.check_in_list(["horizontal", "vertical"], orientation=orientation)
+ if "drawstyle" in kwargs or "ds" in kwargs:
+ raise TypeError("Cannot pass 'drawstyle' or 'ds' to ecdf()")
+ if np.ma.getmask(x).any():
+ raise ValueError("ecdf() does not support masked entries")
+ x = np.asarray(x)
+ if np.isnan(x).any():
+ raise ValueError("ecdf() does not support NaNs")
+ argsort = np.argsort(x)
+ x = x[argsort]
+ if weights is None:
+ # Ensure that we end at exactly 1, avoiding floating point errors.
+ cum_weights = (1 + np.arange(len(x))) / len(x)
+ else:
+ weights = np.take(weights, argsort) # Reorder weights like we reordered x.
+ cum_weights = np.cumsum(weights / np.sum(weights))
+ if compress:
+ # Get indices of unique x values.
+ compress_idxs = [0, *(x[:-1] != x[1:]).nonzero()[0] + 1]
+ x = x[compress_idxs]
+ cum_weights = cum_weights[compress_idxs]
+ if orientation == "vertical":
+ if not complementary:
+ line, = self.plot([x[0], *x], [0, *cum_weights],
+ drawstyle="steps-post", **kwargs)
+ else:
+ line, = self.plot([*x, x[-1]], [1, *1 - cum_weights],
+ drawstyle="steps-pre", **kwargs)
+ line.sticky_edges.y[:] = [0, 1]
+ else: # orientation == "horizontal":
+ if not complementary:
+ line, = self.plot([0, *cum_weights], [x[0], *x],
+ drawstyle="steps-pre", **kwargs)
+ else:
+ line, = self.plot([1, *1 - cum_weights], [*x, x[-1]],
+ drawstyle="steps-post", **kwargs)
+ line.sticky_edges.x[:] = [0, 1]
+ return line
+
+ @_api.make_keyword_only("3.10", "NFFT")
+ @_preprocess_data(replace_names=["x"])
+ @_docstring.interpd
+ def psd(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
+ window=None, noverlap=None, pad_to=None,
+ sides=None, scale_by_freq=None, return_line=None, **kwargs):
+ r"""
+ Plot the power spectral density.
+
+ The power spectral density :math:`P_{xx}` by Welch's average
+ periodogram method. The vector *x* is divided into *NFFT* length
+ segments. Each segment is detrended by function *detrend* and
+ windowed by function *window*. *noverlap* gives the length of
+ the overlap between segments. The :math:`|\mathrm{fft}(i)|^2`
+ of each segment :math:`i` are averaged to compute :math:`P_{xx}`,
+ with a scaling to correct for power loss due to windowing.
+
+ If len(*x*) < *NFFT*, it will be zero padded to *NFFT*.
+
+ Parameters
+ ----------
+ x : 1-D array or sequence
+ Array or sequence containing the data
+
+ %(Spectral)s
+
+ %(PSD)s
+
+ noverlap : int, default: 0 (no overlap)
+ The number of points of overlap between segments.
+
+ Fc : int, default: 0
+ The center frequency of *x*, which offsets the x extents of the
+ plot to reflect the frequency range used when a signal is acquired
+ and then filtered and downsampled to baseband.
+
+ return_line : bool, default: False
+ Whether to include the line object plotted in the returned values.
+
+ Returns
+ -------
+ Pxx : 1-D array
+ The values for the power spectrum :math:`P_{xx}` before scaling
+ (real valued).
+
+ freqs : 1-D array
+ The frequencies corresponding to the elements in *Pxx*.
+
+ line : `~matplotlib.lines.Line2D`
+ The line created by this function.
+ Only returned if *return_line* is True.
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Keyword arguments control the `.Line2D` properties:
+
+ %(Line2D:kwdoc)s
+
+ See Also
+ --------
+ specgram
+ Differs in the default overlap; in not returning the mean of the
+ segment periodograms; in returning the times of the segments; and
+ in plotting a colormap instead of a line.
+ magnitude_spectrum
+ Plots the magnitude spectrum.
+ csd
+ Plots the spectral density between two signals.
+
+ Notes
+ -----
+ For plotting, the power is plotted as
+ :math:`10\log_{10}(P_{xx})` for decibels, though *Pxx* itself
+ is returned.
+
+ References
+ ----------
+ Bendat & Piersol -- Random Data: Analysis and Measurement Procedures,
+ John Wiley & Sons (1986)
+ """
+ if Fc is None:
+ Fc = 0
+
+ pxx, freqs = mlab.psd(x=x, NFFT=NFFT, Fs=Fs, detrend=detrend,
+ window=window, noverlap=noverlap, pad_to=pad_to,
+ sides=sides, scale_by_freq=scale_by_freq)
+ freqs += Fc
+
+ if scale_by_freq in (None, True):
+ psd_units = 'dB/Hz'
+ else:
+ psd_units = 'dB'
+
+ line = self.plot(freqs, 10 * np.log10(pxx), **kwargs)
+ self.set_xlabel('Frequency')
+ self.set_ylabel('Power Spectral Density (%s)' % psd_units)
+ self.grid(True)
+
+ vmin, vmax = self.get_ybound()
+ step = max(10 * int(np.log10(vmax - vmin)), 1)
+ ticks = np.arange(math.floor(vmin), math.ceil(vmax) + 1, step)
+ self.set_yticks(ticks)
+
+ if return_line is None or not return_line:
+ return pxx, freqs
+ else:
+ return pxx, freqs, line
+
+ @_api.make_keyword_only("3.10", "NFFT")
+ @_preprocess_data(replace_names=["x", "y"], label_namer="y")
+ @_docstring.interpd
+ def csd(self, x, y, NFFT=None, Fs=None, Fc=None, detrend=None,
+ window=None, noverlap=None, pad_to=None,
+ sides=None, scale_by_freq=None, return_line=None, **kwargs):
+ r"""
+ Plot the cross-spectral density.
+
+ The cross spectral density :math:`P_{xy}` by Welch's average
+ periodogram method. The vectors *x* and *y* are divided into
+ *NFFT* length segments. Each segment is detrended by function
+ *detrend* and windowed by function *window*. *noverlap* gives
+ the length of the overlap between segments. The product of
+ the direct FFTs of *x* and *y* are averaged over each segment
+ to compute :math:`P_{xy}`, with a scaling to correct for power
+ loss due to windowing.
+
+ If len(*x*) < *NFFT* or len(*y*) < *NFFT*, they will be zero
+ padded to *NFFT*.
+
+ Parameters
+ ----------
+ x, y : 1-D arrays or sequences
+ Arrays or sequences containing the data.
+
+ %(Spectral)s
+
+ %(PSD)s
+
+ noverlap : int, default: 0 (no overlap)
+ The number of points of overlap between segments.
+
+ Fc : int, default: 0
+ The center frequency of *x*, which offsets the x extents of the
+ plot to reflect the frequency range used when a signal is acquired
+ and then filtered and downsampled to baseband.
+
+ return_line : bool, default: False
+ Whether to include the line object plotted in the returned values.
+
+ Returns
+ -------
+ Pxy : 1-D array
+ The values for the cross spectrum :math:`P_{xy}` before scaling
+ (complex valued).
+
+ freqs : 1-D array
+ The frequencies corresponding to the elements in *Pxy*.
+
+ line : `~matplotlib.lines.Line2D`
+ The line created by this function.
+ Only returned if *return_line* is True.
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Keyword arguments control the `.Line2D` properties:
+
+ %(Line2D:kwdoc)s
+
+ See Also
+ --------
+ psd : is equivalent to setting ``y = x``.
+
+ Notes
+ -----
+ For plotting, the power is plotted as
+ :math:`10 \log_{10}(P_{xy})` for decibels, though :math:`P_{xy}` itself
+ is returned.
+
+ References
+ ----------
+ Bendat & Piersol -- Random Data: Analysis and Measurement Procedures,
+ John Wiley & Sons (1986)
+ """
+ if Fc is None:
+ Fc = 0
+
+ pxy, freqs = mlab.csd(x=x, y=y, NFFT=NFFT, Fs=Fs, detrend=detrend,
+ window=window, noverlap=noverlap, pad_to=pad_to,
+ sides=sides, scale_by_freq=scale_by_freq)
+ # pxy is complex
+ freqs += Fc
+
+ line = self.plot(freqs, 10 * np.log10(np.abs(pxy)), **kwargs)
+ self.set_xlabel('Frequency')
+ self.set_ylabel('Cross Spectrum Magnitude (dB)')
+ self.grid(True)
+
+ vmin, vmax = self.get_ybound()
+ step = max(10 * int(np.log10(vmax - vmin)), 1)
+ ticks = np.arange(math.floor(vmin), math.ceil(vmax) + 1, step)
+ self.set_yticks(ticks)
+
+ if return_line is None or not return_line:
+ return pxy, freqs
+ else:
+ return pxy, freqs, line
+
+ @_api.make_keyword_only("3.10", "Fs")
+ @_preprocess_data(replace_names=["x"])
+ @_docstring.interpd
+ def magnitude_spectrum(self, x, Fs=None, Fc=None, window=None,
+ pad_to=None, sides=None, scale=None,
+ **kwargs):
+ """
+ Plot the magnitude spectrum.
+
+ Compute the magnitude spectrum of *x*. Data is padded to a
+ length of *pad_to* and the windowing function *window* is applied to
+ the signal.
+
+ Parameters
+ ----------
+ x : 1-D array or sequence
+ Array or sequence containing the data.
+
+ %(Spectral)s
+
+ %(Single_Spectrum)s
+
+ scale : {'default', 'linear', 'dB'}
+ The scaling of the values in the *spec*. 'linear' is no scaling.
+ 'dB' returns the values in dB scale, i.e., the dB amplitude
+ (20 * log10). 'default' is 'linear'.
+
+ Fc : int, default: 0
+ The center frequency of *x*, which offsets the x extents of the
+ plot to reflect the frequency range used when a signal is acquired
+ and then filtered and downsampled to baseband.
+
+ Returns
+ -------
+ spectrum : 1-D array
+ The values for the magnitude spectrum before scaling (real valued).
+
+ freqs : 1-D array
+ The frequencies corresponding to the elements in *spectrum*.
+
+ line : `~matplotlib.lines.Line2D`
+ The line created by this function.
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Keyword arguments control the `.Line2D` properties:
+
+ %(Line2D:kwdoc)s
+
+ See Also
+ --------
+ psd
+ Plots the power spectral density.
+ angle_spectrum
+ Plots the angles of the corresponding frequencies.
+ phase_spectrum
+ Plots the phase (unwrapped angle) of the corresponding frequencies.
+ specgram
+ Can plot the magnitude spectrum of segments within the signal in a
+ colormap.
+ """
+ if Fc is None:
+ Fc = 0
+
+ spec, freqs = mlab.magnitude_spectrum(x=x, Fs=Fs, window=window,
+ pad_to=pad_to, sides=sides)
+ freqs += Fc
+
+ yunits = _api.check_getitem(
+ {None: 'energy', 'default': 'energy', 'linear': 'energy',
+ 'dB': 'dB'},
+ scale=scale)
+ if yunits == 'energy':
+ Z = spec
+ else: # yunits == 'dB'
+ Z = 20. * np.log10(spec)
+
+ line, = self.plot(freqs, Z, **kwargs)
+ self.set_xlabel('Frequency')
+ self.set_ylabel('Magnitude (%s)' % yunits)
+
+ return spec, freqs, line
+
+ @_api.make_keyword_only("3.10", "Fs")
+ @_preprocess_data(replace_names=["x"])
+ @_docstring.interpd
+ def angle_spectrum(self, x, Fs=None, Fc=None, window=None,
+ pad_to=None, sides=None, **kwargs):
+ """
+ Plot the angle spectrum.
+
+ Compute the angle spectrum (wrapped phase spectrum) of *x*.
+ Data is padded to a length of *pad_to* and the windowing function
+ *window* is applied to the signal.
+
+ Parameters
+ ----------
+ x : 1-D array or sequence
+ Array or sequence containing the data.
+
+ %(Spectral)s
+
+ %(Single_Spectrum)s
+
+ Fc : int, default: 0
+ The center frequency of *x*, which offsets the x extents of the
+ plot to reflect the frequency range used when a signal is acquired
+ and then filtered and downsampled to baseband.
+
+ Returns
+ -------
+ spectrum : 1-D array
+ The values for the angle spectrum in radians (real valued).
+
+ freqs : 1-D array
+ The frequencies corresponding to the elements in *spectrum*.
+
+ line : `~matplotlib.lines.Line2D`
+ The line created by this function.
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Keyword arguments control the `.Line2D` properties:
+
+ %(Line2D:kwdoc)s
+
+ See Also
+ --------
+ magnitude_spectrum
+ Plots the magnitudes of the corresponding frequencies.
+ phase_spectrum
+ Plots the unwrapped version of this function.
+ specgram
+ Can plot the angle spectrum of segments within the signal in a
+ colormap.
+ """
+ if Fc is None:
+ Fc = 0
+
+ spec, freqs = mlab.angle_spectrum(x=x, Fs=Fs, window=window,
+ pad_to=pad_to, sides=sides)
+ freqs += Fc
+
+ lines = self.plot(freqs, spec, **kwargs)
+ self.set_xlabel('Frequency')
+ self.set_ylabel('Angle (radians)')
+
+ return spec, freqs, lines[0]
+
+ @_api.make_keyword_only("3.10", "Fs")
+ @_preprocess_data(replace_names=["x"])
+ @_docstring.interpd
+ def phase_spectrum(self, x, Fs=None, Fc=None, window=None,
+ pad_to=None, sides=None, **kwargs):
+ """
+ Plot the phase spectrum.
+
+ Compute the phase spectrum (unwrapped angle spectrum) of *x*.
+ Data is padded to a length of *pad_to* and the windowing function
+ *window* is applied to the signal.
+
+ Parameters
+ ----------
+ x : 1-D array or sequence
+ Array or sequence containing the data
+
+ %(Spectral)s
+
+ %(Single_Spectrum)s
+
+ Fc : int, default: 0
+ The center frequency of *x*, which offsets the x extents of the
+ plot to reflect the frequency range used when a signal is acquired
+ and then filtered and downsampled to baseband.
+
+ Returns
+ -------
+ spectrum : 1-D array
+ The values for the phase spectrum in radians (real valued).
+
+ freqs : 1-D array
+ The frequencies corresponding to the elements in *spectrum*.
+
+ line : `~matplotlib.lines.Line2D`
+ The line created by this function.
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Keyword arguments control the `.Line2D` properties:
+
+ %(Line2D:kwdoc)s
+
+ See Also
+ --------
+ magnitude_spectrum
+ Plots the magnitudes of the corresponding frequencies.
+ angle_spectrum
+ Plots the wrapped version of this function.
+ specgram
+ Can plot the phase spectrum of segments within the signal in a
+ colormap.
+ """
+ if Fc is None:
+ Fc = 0
+
+ spec, freqs = mlab.phase_spectrum(x=x, Fs=Fs, window=window,
+ pad_to=pad_to, sides=sides)
+ freqs += Fc
+
+ lines = self.plot(freqs, spec, **kwargs)
+ self.set_xlabel('Frequency')
+ self.set_ylabel('Phase (radians)')
+
+ return spec, freqs, lines[0]
+
+ @_api.make_keyword_only("3.10", "NFFT")
+ @_preprocess_data(replace_names=["x", "y"])
+ @_docstring.interpd
+ def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
+ window=mlab.window_hanning, noverlap=0, pad_to=None,
+ sides='default', scale_by_freq=None, **kwargs):
+ r"""
+ Plot the coherence between *x* and *y*.
+
+ Coherence is the normalized cross spectral density:
+
+ .. math::
+
+ C_{xy} = \frac{|P_{xy}|^2}{P_{xx}P_{yy}}
+
+ Parameters
+ ----------
+ %(Spectral)s
+
+ %(PSD)s
+
+ noverlap : int, default: 0 (no overlap)
+ The number of points of overlap between blocks.
+
+ Fc : int, default: 0
+ The center frequency of *x*, which offsets the x extents of the
+ plot to reflect the frequency range used when a signal is acquired
+ and then filtered and downsampled to baseband.
+
+ Returns
+ -------
+ Cxy : 1-D array
+ The coherence vector.
+
+ freqs : 1-D array
+ The frequencies for the elements in *Cxy*.
+
+ Other Parameters
+ ----------------
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ **kwargs
+ Keyword arguments control the `.Line2D` properties:
+
+ %(Line2D:kwdoc)s
+
+ References
+ ----------
+ Bendat & Piersol -- Random Data: Analysis and Measurement Procedures,
+ John Wiley & Sons (1986)
+ """
+ cxy, freqs = mlab.cohere(x=x, y=y, NFFT=NFFT, Fs=Fs, detrend=detrend,
+ window=window, noverlap=noverlap,
+ scale_by_freq=scale_by_freq, sides=sides,
+ pad_to=pad_to)
+ freqs += Fc
+
+ self.plot(freqs, cxy, **kwargs)
+ self.set_xlabel('Frequency')
+ self.set_ylabel('Coherence')
+ self.grid(True)
+
+ return cxy, freqs
+
+ @_api.make_keyword_only("3.10", "NFFT")
+ @_preprocess_data(replace_names=["x"])
+ @_docstring.interpd
+ def specgram(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
+ window=None, noverlap=None,
+ cmap=None, xextent=None, pad_to=None, sides=None,
+ scale_by_freq=None, mode=None, scale=None,
+ vmin=None, vmax=None, **kwargs):
+ """
+ Plot a spectrogram.
+
+ Compute and plot a spectrogram of data in *x*. Data are split into
+ *NFFT* length segments and the spectrum of each section is
+ computed. The windowing function *window* is applied to each
+ segment, and the amount of overlap of each segment is
+ specified with *noverlap*. The spectrogram is plotted as a colormap
+ (using imshow).
+
+ Parameters
+ ----------
+ x : 1-D array or sequence
+ Array or sequence containing the data.
+
+ %(Spectral)s
+
+ %(PSD)s
+
+ mode : {'default', 'psd', 'magnitude', 'angle', 'phase'}
+ What sort of spectrum to use. Default is 'psd', which takes the
+ power spectral density. 'magnitude' returns the magnitude
+ spectrum. 'angle' returns the phase spectrum without unwrapping.
+ 'phase' returns the phase spectrum with unwrapping.
+
+ noverlap : int, default: 128
+ The number of points of overlap between blocks.
+
+ scale : {'default', 'linear', 'dB'}
+ The scaling of the values in the *spec*. 'linear' is no scaling.
+ 'dB' returns the values in dB scale. When *mode* is 'psd',
+ this is dB power (10 * log10). Otherwise, this is dB amplitude
+ (20 * log10). 'default' is 'dB' if *mode* is 'psd' or
+ 'magnitude' and 'linear' otherwise. This must be 'linear'
+ if *mode* is 'angle' or 'phase'.
+
+ Fc : int, default: 0
+ The center frequency of *x*, which offsets the x extents of the
+ plot to reflect the frequency range used when a signal is acquired
+ and then filtered and downsampled to baseband.
+
+ cmap : `.Colormap`, default: :rc:`image.cmap`
+
+ xextent : *None* or (xmin, xmax)
+ The image extent along the x-axis. The default sets *xmin* to the
+ left border of the first bin (*spectrum* column) and *xmax* to the
+ right border of the last bin. Note that for *noverlap>0* the width
+ of the bins is smaller than those of the segments.
+
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ vmin, vmax : float, optional
+ vmin and vmax define the data range that the colormap covers.
+ By default, the colormap covers the complete value range of the
+ data.
+
+ **kwargs
+ Additional keyword arguments are passed on to `~.axes.Axes.imshow`
+ which makes the specgram image. The origin keyword argument
+ is not supported.
+
+ Returns
+ -------
+ spectrum : 2D array
+ Columns are the periodograms of successive segments.
+
+ freqs : 1-D array
+ The frequencies corresponding to the rows in *spectrum*.
+
+ t : 1-D array
+ The times corresponding to midpoints of segments (i.e., the columns
+ in *spectrum*).
+
+ im : `.AxesImage`
+ The image created by imshow containing the spectrogram.
+
+ See Also
+ --------
+ psd
+ Differs in the default overlap; in returning the mean of the
+ segment periodograms; in not returning times; and in generating a
+ line plot instead of colormap.
+ magnitude_spectrum
+ A single spectrum, similar to having a single segment when *mode*
+ is 'magnitude'. Plots a line instead of a colormap.
+ angle_spectrum
+ A single spectrum, similar to having a single segment when *mode*
+ is 'angle'. Plots a line instead of a colormap.
+ phase_spectrum
+ A single spectrum, similar to having a single segment when *mode*
+ is 'phase'. Plots a line instead of a colormap.
+
+ Notes
+ -----
+ The parameters *detrend* and *scale_by_freq* do only apply when *mode*
+ is set to 'psd'.
+ """
+ if NFFT is None:
+ NFFT = 256 # same default as in mlab.specgram()
+ if Fc is None:
+ Fc = 0 # same default as in mlab._spectral_helper()
+ if noverlap is None:
+ noverlap = 128 # same default as in mlab.specgram()
+ if Fs is None:
+ Fs = 2 # same default as in mlab._spectral_helper()
+
+ if mode == 'complex':
+ raise ValueError('Cannot plot a complex specgram')
+
+ if scale is None or scale == 'default':
+ if mode in ['angle', 'phase']:
+ scale = 'linear'
+ else:
+ scale = 'dB'
+ elif mode in ['angle', 'phase'] and scale == 'dB':
+ raise ValueError('Cannot use dB scale with angle or phase mode')
+
+ spec, freqs, t = mlab.specgram(x=x, NFFT=NFFT, Fs=Fs,
+ detrend=detrend, window=window,
+ noverlap=noverlap, pad_to=pad_to,
+ sides=sides,
+ scale_by_freq=scale_by_freq,
+ mode=mode)
+
+ if scale == 'linear':
+ Z = spec
+ elif scale == 'dB':
+ if mode is None or mode == 'default' or mode == 'psd':
+ Z = 10. * np.log10(spec)
+ else:
+ Z = 20. * np.log10(spec)
+ else:
+ raise ValueError(f'Unknown scale {scale!r}')
+
+ Z = np.flipud(Z)
+
+ if xextent is None:
+ # padding is needed for first and last segment:
+ pad_xextent = (NFFT-noverlap) / Fs / 2
+ xextent = np.min(t) - pad_xextent, np.max(t) + pad_xextent
+ xmin, xmax = xextent
+ freqs += Fc
+ extent = xmin, xmax, freqs[0], freqs[-1]
+
+ if 'origin' in kwargs:
+ raise _api.kwarg_error("specgram", "origin")
+
+ im = self.imshow(Z, cmap, extent=extent, vmin=vmin, vmax=vmax,
+ origin='upper', **kwargs)
+ self.axis('auto')
+
+ return spec, freqs, t, im
+
+ @_api.make_keyword_only("3.10", "precision")
+ @_docstring.interpd
+ def spy(self, Z, precision=0, marker=None, markersize=None,
+ aspect='equal', origin="upper", **kwargs):
+ """
+ Plot the sparsity pattern of a 2D array.
+
+ This visualizes the non-zero values of the array.
+
+ Two plotting styles are available: image and marker. Both
+ are available for full arrays, but only the marker style
+ works for `scipy.sparse.spmatrix` instances.
+
+ **Image style**
+
+ If *marker* and *markersize* are *None*, `~.Axes.imshow` is used. Any
+ extra remaining keyword arguments are passed to this method.
+
+ **Marker style**
+
+ If *Z* is a `scipy.sparse.spmatrix` or *marker* or *markersize* are
+ *None*, a `.Line2D` object will be returned with the value of marker
+ determining the marker type, and any remaining keyword arguments
+ passed to `~.Axes.plot`.
+
+ Parameters
+ ----------
+ Z : (M, N) array-like
+ The array to be plotted.
+
+ precision : float or 'present', default: 0
+ If *precision* is 0, any non-zero value will be plotted. Otherwise,
+ values of :math:`|Z| > precision` will be plotted.
+
+ For `scipy.sparse.spmatrix` instances, you can also
+ pass 'present'. In this case any value present in the array
+ will be plotted, even if it is identically zero.
+
+ aspect : {'equal', 'auto', None} or float, default: 'equal'
+ The aspect ratio of the Axes. This parameter is particularly
+ relevant for images since it determines whether data pixels are
+ square.
+
+ This parameter is a shortcut for explicitly calling
+ `.Axes.set_aspect`. See there for further details.
+
+ - 'equal': Ensures an aspect ratio of 1. Pixels will be square.
+ - 'auto': The Axes is kept fixed and the aspect is adjusted so
+ that the data fit in the Axes. In general, this will result in
+ non-square pixels.
+ - *None*: Use :rc:`image.aspect`.
+
+ origin : {'upper', 'lower'}, default: :rc:`image.origin`
+ Place the [0, 0] index of the array in the upper left or lower left
+ corner of the Axes. The convention 'upper' is typically used for
+ matrices and images.
+
+ Returns
+ -------
+ `~matplotlib.image.AxesImage` or `.Line2D`
+ The return type depends on the plotting style (see above).
+
+ Other Parameters
+ ----------------
+ **kwargs
+ The supported additional parameters depend on the plotting style.
+
+ For the image style, you can pass the following additional
+ parameters of `~.Axes.imshow`:
+
+ - *cmap*
+ - *alpha*
+ - *url*
+ - any `.Artist` properties (passed on to the `.AxesImage`)
+
+ For the marker style, you can pass any `.Line2D` property except
+ for *linestyle*:
+
+ %(Line2D:kwdoc)s
+ """
+ if marker is None and markersize is None and hasattr(Z, 'tocoo'):
+ marker = 's'
+ _api.check_in_list(["upper", "lower"], origin=origin)
+ if marker is None and markersize is None:
+ Z = np.asarray(Z)
+ mask = np.abs(Z) > precision
+
+ if 'cmap' not in kwargs:
+ kwargs['cmap'] = mcolors.ListedColormap(['w', 'k'],
+ name='binary')
+ if 'interpolation' in kwargs:
+ raise _api.kwarg_error("spy", "interpolation")
+ if 'norm' not in kwargs:
+ kwargs['norm'] = mcolors.NoNorm()
+ ret = self.imshow(mask, interpolation='nearest',
+ aspect=aspect, origin=origin,
+ **kwargs)
+ else:
+ if hasattr(Z, 'tocoo'):
+ c = Z.tocoo()
+ if precision == 'present':
+ y = c.row
+ x = c.col
+ else:
+ nonzero = np.abs(c.data) > precision
+ y = c.row[nonzero]
+ x = c.col[nonzero]
+ else:
+ Z = np.asarray(Z)
+ nonzero = np.abs(Z) > precision
+ y, x = np.nonzero(nonzero)
+ if marker is None:
+ marker = 's'
+ if markersize is None:
+ markersize = 10
+ if 'linestyle' in kwargs:
+ raise _api.kwarg_error("spy", "linestyle")
+ ret = mlines.Line2D(
+ x, y, linestyle='None', marker=marker, markersize=markersize,
+ **kwargs)
+ self.add_line(ret)
+ nr, nc = Z.shape
+ self.set_xlim(-0.5, nc - 0.5)
+ if origin == "upper":
+ self.set_ylim(nr - 0.5, -0.5)
+ else:
+ self.set_ylim(-0.5, nr - 0.5)
+ self.set_aspect(aspect)
+ self.title.set_y(1.05)
+ if origin == "upper":
+ self.xaxis.tick_top()
+ else: # lower
+ self.xaxis.tick_bottom()
+ self.xaxis.set_ticks_position('both')
+ self.xaxis.set_major_locator(
+ mticker.MaxNLocator(nbins=9, steps=[1, 2, 5, 10], integer=True))
+ self.yaxis.set_major_locator(
+ mticker.MaxNLocator(nbins=9, steps=[1, 2, 5, 10], integer=True))
+ return ret
+
+ def matshow(self, Z, **kwargs):
+ """
+ Plot the values of a 2D matrix or array as color-coded image.
+
+ The matrix will be shown the way it would be printed, with the first
+ row at the top. Row and column numbering is zero-based.
+
+ Parameters
+ ----------
+ Z : (M, N) array-like
+ The matrix to be displayed.
+
+ Returns
+ -------
+ `~matplotlib.image.AxesImage`
+
+ Other Parameters
+ ----------------
+ **kwargs : `~matplotlib.axes.Axes.imshow` arguments
+
+ See Also
+ --------
+ imshow : More general function to plot data on a 2D regular raster.
+
+ Notes
+ -----
+ This is just a convenience function wrapping `.imshow` to set useful
+ defaults for displaying a matrix. In particular:
+
+ - Set ``origin='upper'``.
+ - Set ``interpolation='nearest'``.
+ - Set ``aspect='equal'``.
+ - Ticks are placed to the left and above.
+ - Ticks are formatted to show integer indices.
+
+ """
+ Z = np.asanyarray(Z)
+ kw = {'origin': 'upper',
+ 'interpolation': 'nearest',
+ 'aspect': 'equal', # (already the imshow default)
+ **kwargs}
+ im = self.imshow(Z, **kw)
+ self.title.set_y(1.05)
+ self.xaxis.tick_top()
+ self.xaxis.set_ticks_position('both')
+ self.xaxis.set_major_locator(
+ mticker.MaxNLocator(nbins=9, steps=[1, 2, 5, 10], integer=True))
+ self.yaxis.set_major_locator(
+ mticker.MaxNLocator(nbins=9, steps=[1, 2, 5, 10], integer=True))
+ return im
+
+ @_api.make_keyword_only("3.10", "vert")
+ @_preprocess_data(replace_names=["dataset"])
+ def violinplot(self, dataset, positions=None, vert=None,
+ orientation='vertical', widths=0.5, showmeans=False,
+ showextrema=True, showmedians=False, quantiles=None,
+ points=100, bw_method=None, side='both',):
+ """
+ Make a violin plot.
+
+ Make a violin plot for each column of *dataset* or each vector in
+ sequence *dataset*. Each filled area extends to represent the
+ entire data range, with optional lines at the mean, the median,
+ the minimum, the maximum, and user-specified quantiles.
+
+ Parameters
+ ----------
+ dataset : Array or a sequence of vectors.
+ The input data.
+
+ positions : array-like, default: [1, 2, ..., n]
+ The positions of the violins; i.e. coordinates on the x-axis for
+ vertical violins (or y-axis for horizontal violins).
+
+ vert : bool, optional
+ .. deprecated:: 3.10
+ Use *orientation* instead.
+
+ If this is given during the deprecation period, it overrides
+ the *orientation* parameter.
+
+ If True, plots the violins vertically.
+ If False, plots the violins horizontally.
+
+ orientation : {'vertical', 'horizontal'}, default: 'vertical'
+ If 'horizontal', plots the violins horizontally.
+ Otherwise, plots the violins vertically.
+
+ .. versionadded:: 3.10
+
+ widths : float or array-like, default: 0.5
+ The maximum width of each violin in units of the *positions* axis.
+ The default is 0.5, which is half the available space when using default
+ *positions*.
+
+ showmeans : bool, default: False
+ Whether to show the mean with a line.
+
+ showextrema : bool, default: True
+ Whether to show extrema with a line.
+
+ showmedians : bool, default: False
+ Whether to show the median with a line.
+
+ quantiles : array-like, default: None
+ If not None, set a list of floats in interval [0, 1] for each violin,
+ which stands for the quantiles that will be rendered for that
+ violin.
+
+ points : int, default: 100
+ The number of points to evaluate each of the gaussian kernel density
+ estimations at.
+
+ bw_method : {'scott', 'silverman'} or float or callable, default: 'scott'
+ The method used to calculate the estimator bandwidth. If a
+ float, this will be used directly as `kde.factor`. If a
+ callable, it should take a `matplotlib.mlab.GaussianKDE` instance as
+ its only parameter and return a float.
+
+ side : {'both', 'low', 'high'}, default: 'both'
+ 'both' plots standard violins. 'low'/'high' only
+ plots the side below/above the positions value.
+
+ data : indexable object, optional
+ DATA_PARAMETER_PLACEHOLDER
+
+ Returns
+ -------
+ dict
+ A dictionary mapping each component of the violinplot to a
+ list of the corresponding collection instances created. The
+ dictionary has the following keys:
+
+ - ``bodies``: A list of the `~.collections.PolyCollection`
+ instances containing the filled area of each violin.
+
+ - ``cmeans``: A `~.collections.LineCollection` instance that marks
+ the mean values of each of the violin's distribution.
+
+ - ``cmins``: A `~.collections.LineCollection` instance that marks
+ the bottom of each violin's distribution.
+
+ - ``cmaxes``: A `~.collections.LineCollection` instance that marks
+ the top of each violin's distribution.
+
+ - ``cbars``: A `~.collections.LineCollection` instance that marks
+ the centers of each violin's distribution.
+
+ - ``cmedians``: A `~.collections.LineCollection` instance that
+ marks the median values of each of the violin's distribution.
+
+ - ``cquantiles``: A `~.collections.LineCollection` instance created
+ to identify the quantile values of each of the violin's
+ distribution.
+
+ See Also
+ --------
+ .Axes.violin : Draw a violin from pre-computed statistics.
+ boxplot : Draw a box and whisker plot.
+ """
+
+ def _kde_method(X, coords):
+ # Unpack in case of e.g. Pandas or xarray object
+ X = cbook._unpack_to_numpy(X)
+ # fallback gracefully if the vector contains only one value
+ if np.all(X[0] == X):
+ return (X[0] == coords).astype(float)
+ kde = mlab.GaussianKDE(X, bw_method)
+ return kde.evaluate(coords)
+
+ vpstats = cbook.violin_stats(dataset, _kde_method, points=points,
+ quantiles=quantiles)
+ return self.violin(vpstats, positions=positions, vert=vert,
+ orientation=orientation, widths=widths,
+ showmeans=showmeans, showextrema=showextrema,
+ showmedians=showmedians, side=side)
+
+ @_api.make_keyword_only("3.10", "vert")
+ def violin(self, vpstats, positions=None, vert=None,
+ orientation='vertical', widths=0.5, showmeans=False,
+ showextrema=True, showmedians=False, side='both'):
+ """
+ Draw a violin plot from pre-computed statistics.
+
+ Draw a violin plot for each column of *vpstats*. Each filled area
+ extends to represent the entire data range, with optional lines at the
+ mean, the median, the minimum, the maximum, and the quantiles values.
+
+ Parameters
+ ----------
+ vpstats : list of dicts
+ A list of dictionaries containing stats for each violin plot.
+ Required keys are:
+
+ - ``coords``: A list of scalars containing the coordinates that
+ the violin's kernel density estimate were evaluated at.
+
+ - ``vals``: A list of scalars containing the values of the
+ kernel density estimate at each of the coordinates given
+ in *coords*.
+
+ - ``mean``: The mean value for this violin's dataset.
+
+ - ``median``: The median value for this violin's dataset.
+
+ - ``min``: The minimum value for this violin's dataset.
+
+ - ``max``: The maximum value for this violin's dataset.
+
+ Optional keys are:
+
+ - ``quantiles``: A list of scalars containing the quantile values
+ for this violin's dataset.
+
+ positions : array-like, default: [1, 2, ..., n]
+ The positions of the violins; i.e. coordinates on the x-axis for
+ vertical violins (or y-axis for horizontal violins).
+
+ vert : bool, optional
+ .. deprecated:: 3.10
+ Use *orientation* instead.
+
+ If this is given during the deprecation period, it overrides
+ the *orientation* parameter.
+
+ If True, plots the violins vertically.
+ If False, plots the violins horizontally.
+
+ orientation : {'vertical', 'horizontal'}, default: 'vertical'
+ If 'horizontal', plots the violins horizontally.
+ Otherwise, plots the violins vertically.
+
+ .. versionadded:: 3.10
+
+ widths : float or array-like, default: 0.5
+ The maximum width of each violin in units of the *positions* axis.
+ The default is 0.5, which is half available space when using default
+ *positions*.
+
+ showmeans : bool, default: False
+ Whether to show the mean with a line.
+
+ showextrema : bool, default: True
+ Whether to show extrema with a line.
+
+ showmedians : bool, default: False
+ Whether to show the median with a line.
+
+ side : {'both', 'low', 'high'}, default: 'both'
+ 'both' plots standard violins. 'low'/'high' only
+ plots the side below/above the positions value.
+
+ Returns
+ -------
+ dict
+ A dictionary mapping each component of the violinplot to a
+ list of the corresponding collection instances created. The
+ dictionary has the following keys:
+
+ - ``bodies``: A list of the `~.collections.PolyCollection`
+ instances containing the filled area of each violin.
+
+ - ``cmeans``: A `~.collections.LineCollection` instance that marks
+ the mean values of each of the violin's distribution.
+
+ - ``cmins``: A `~.collections.LineCollection` instance that marks
+ the bottom of each violin's distribution.
+
+ - ``cmaxes``: A `~.collections.LineCollection` instance that marks
+ the top of each violin's distribution.
+
+ - ``cbars``: A `~.collections.LineCollection` instance that marks
+ the centers of each violin's distribution.
+
+ - ``cmedians``: A `~.collections.LineCollection` instance that
+ marks the median values of each of the violin's distribution.
+
+ - ``cquantiles``: A `~.collections.LineCollection` instance created
+ to identify the quantiles values of each of the violin's
+ distribution.
+
+ See Also
+ --------
+ violinplot :
+ Draw a violin plot from data instead of pre-computed statistics.
+ """
+
+ # Statistical quantities to be plotted on the violins
+ means = []
+ mins = []
+ maxes = []
+ medians = []
+ quantiles = []
+
+ qlens = [] # Number of quantiles in each dataset.
+
+ artists = {} # Collections to be returned
+
+ N = len(vpstats)
+ datashape_message = ("List of violinplot statistics and `{0}` "
+ "values must have the same length")
+
+ # vert and orientation parameters are linked until vert's
+ # deprecation period expires. If both are selected,
+ # vert takes precedence.
+ if vert is not None:
+ _api.warn_deprecated(
+ "3.11",
+ name="vert: bool",
+ alternative="orientation: {'vertical', 'horizontal'}",
+ pending=True,
+ )
+ orientation = 'vertical' if vert else 'horizontal'
+ _api.check_in_list(['horizontal', 'vertical'], orientation=orientation)
+
+ # Validate positions
+ if positions is None:
+ positions = range(1, N + 1)
+ elif len(positions) != N:
+ raise ValueError(datashape_message.format("positions"))
+
+ # Validate widths
+ if np.isscalar(widths):
+ widths = [widths] * N
+ elif len(widths) != N:
+ raise ValueError(datashape_message.format("widths"))
+
+ # Validate side
+ _api.check_in_list(["both", "low", "high"], side=side)
+
+ # Calculate ranges for statistics lines (shape (2, N)).
+ line_ends = [[-0.25 if side in ['both', 'low'] else 0],
+ [0.25 if side in ['both', 'high'] else 0]] \
+ * np.array(widths) + positions
+
+ # Colors.
+ if mpl.rcParams['_internal.classic_mode']:
+ fillcolor = 'y'
+ linecolor = 'r'
+ else:
+ fillcolor = linecolor = self._get_lines.get_next_color()
+
+ # Check whether we are rendering vertically or horizontally
+ if orientation == 'vertical':
+ fill = self.fill_betweenx
+ if side in ['low', 'high']:
+ perp_lines = functools.partial(self.hlines, colors=linecolor,
+ capstyle='projecting')
+ par_lines = functools.partial(self.vlines, colors=linecolor,
+ capstyle='projecting')
+ else:
+ perp_lines = functools.partial(self.hlines, colors=linecolor)
+ par_lines = functools.partial(self.vlines, colors=linecolor)
+ else:
+ fill = self.fill_between
+ if side in ['low', 'high']:
+ perp_lines = functools.partial(self.vlines, colors=linecolor,
+ capstyle='projecting')
+ par_lines = functools.partial(self.hlines, colors=linecolor,
+ capstyle='projecting')
+ else:
+ perp_lines = functools.partial(self.vlines, colors=linecolor)
+ par_lines = functools.partial(self.hlines, colors=linecolor)
+
+ # Render violins
+ bodies = []
+ for stats, pos, width in zip(vpstats, positions, widths):
+ # The 0.5 factor reflects the fact that we plot from v-p to v+p.
+ vals = np.array(stats['vals'])
+ vals = 0.5 * width * vals / vals.max()
+ bodies += [fill(stats['coords'],
+ -vals + pos if side in ['both', 'low'] else pos,
+ vals + pos if side in ['both', 'high'] else pos,
+ facecolor=fillcolor, alpha=0.3)]
+ means.append(stats['mean'])
+ mins.append(stats['min'])
+ maxes.append(stats['max'])
+ medians.append(stats['median'])
+ q = stats.get('quantiles') # a list of floats, or None
+ if q is None:
+ q = []
+ quantiles.extend(q)
+ qlens.append(len(q))
+ artists['bodies'] = bodies
+
+ if showmeans: # Render means
+ artists['cmeans'] = perp_lines(means, *line_ends)
+ if showextrema: # Render extrema
+ artists['cmaxes'] = perp_lines(maxes, *line_ends)
+ artists['cmins'] = perp_lines(mins, *line_ends)
+ artists['cbars'] = par_lines(positions, mins, maxes)
+ if showmedians: # Render medians
+ artists['cmedians'] = perp_lines(medians, *line_ends)
+ if quantiles: # Render quantiles: each width is repeated qlen times.
+ artists['cquantiles'] = perp_lines(
+ quantiles, *np.repeat(line_ends, qlens, axis=1))
+
+ return artists
+
+ # Methods that are entirely implemented in other modules.
+
+ table = _make_axes_method(mtable.table)
+
+ # args can be either Y or y1, y2, ... and all should be replaced
+ stackplot = _preprocess_data()(_make_axes_method(mstack.stackplot))
+
+ streamplot = _preprocess_data(
+ replace_names=["x", "y", "u", "v", "start_points"])(
+ _make_axes_method(mstream.streamplot))
+
+ tricontour = _make_axes_method(mtri.tricontour)
+ tricontourf = _make_axes_method(mtri.tricontourf)
+ tripcolor = _make_axes_method(mtri.tripcolor)
+ triplot = _make_axes_method(mtri.triplot)
+
+ def _get_aspect_ratio(self):
+ """
+ Convenience method to calculate the aspect ratio of the Axes in
+ the display coordinate system.
+ """
+ figure_size = self.get_figure().get_size_inches()
+ ll, ur = self.get_position() * figure_size
+ width, height = ur - ll
+ return height / (width * self.get_data_ratio())
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_axes.pyi b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_axes.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..0c4be37b064b2a76ba89d5fd0a3a4c0e1cc91e93
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_axes.pyi
@@ -0,0 +1,780 @@
+from matplotlib.axes._base import _AxesBase
+from matplotlib.axes._secondary_axes import SecondaryAxis
+
+from matplotlib.artist import Artist
+from matplotlib.backend_bases import RendererBase
+from matplotlib.collections import (
+ Collection,
+ FillBetweenPolyCollection,
+ LineCollection,
+ PathCollection,
+ PolyCollection,
+ EventCollection,
+ QuadMesh,
+)
+from matplotlib.colorizer import Colorizer
+from matplotlib.colors import Colormap, Normalize
+from matplotlib.container import BarContainer, ErrorbarContainer, StemContainer
+from matplotlib.contour import ContourSet, QuadContourSet
+from matplotlib.image import AxesImage, PcolorImage
+from matplotlib.inset import InsetIndicator
+from matplotlib.legend import Legend
+from matplotlib.legend_handler import HandlerBase
+from matplotlib.lines import Line2D, AxLine
+from matplotlib.mlab import GaussianKDE
+from matplotlib.patches import Rectangle, FancyArrow, Polygon, StepPatch, Wedge
+from matplotlib.quiver import Quiver, QuiverKey, Barbs
+from matplotlib.text import Annotation, Text
+from matplotlib.transforms import Transform
+from matplotlib.typing import CoordsType
+import matplotlib.tri as mtri
+import matplotlib.table as mtable
+import matplotlib.stackplot as mstack
+import matplotlib.streamplot as mstream
+
+import datetime
+import PIL.Image
+from collections.abc import Callable, Iterable, Sequence
+from typing import Any, Literal, overload
+import numpy as np
+from numpy.typing import ArrayLike
+from matplotlib.typing import ColorType, MarkerType, LineStyleType
+
+class Axes(_AxesBase):
+ def get_title(self, loc: Literal["left", "center", "right"] = ...) -> str: ...
+ def set_title(
+ self,
+ label: str,
+ fontdict: dict[str, Any] | None = ...,
+ loc: Literal["left", "center", "right"] | None = ...,
+ pad: float | None = ...,
+ *,
+ y: float | None = ...,
+ **kwargs
+ ) -> Text: ...
+ def get_legend_handles_labels(
+ self, legend_handler_map: dict[type, HandlerBase] | None = ...
+ ) -> tuple[list[Artist], list[Any]]: ...
+ legend_: Legend | None
+
+ @overload
+ def legend(self) -> Legend: ...
+ @overload
+ def legend(self, handles: Iterable[Artist | tuple[Artist, ...]], labels: Iterable[str], **kwargs) -> Legend: ...
+ @overload
+ def legend(self, *, handles: Iterable[Artist | tuple[Artist, ...]], **kwargs) -> Legend: ...
+ @overload
+ def legend(self, labels: Iterable[str], **kwargs) -> Legend: ...
+ @overload
+ def legend(self, **kwargs) -> Legend: ...
+
+ def inset_axes(
+ self,
+ bounds: tuple[float, float, float, float],
+ *,
+ transform: Transform | None = ...,
+ zorder: float = ...,
+ **kwargs
+ ) -> Axes: ...
+ def indicate_inset(
+ self,
+ bounds: tuple[float, float, float, float] | None = ...,
+ inset_ax: Axes | None = ...,
+ *,
+ transform: Transform | None = ...,
+ facecolor: ColorType = ...,
+ edgecolor: ColorType = ...,
+ alpha: float = ...,
+ zorder: float | None = ...,
+ **kwargs
+ ) -> InsetIndicator: ...
+ def indicate_inset_zoom(self, inset_ax: Axes, **kwargs) -> InsetIndicator: ...
+ def secondary_xaxis(
+ self,
+ location: Literal["top", "bottom"] | float,
+ functions: tuple[
+ Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]
+ ]
+ | Transform
+ | None = ...,
+ *,
+ transform: Transform | None = ...,
+ **kwargs
+ ) -> SecondaryAxis: ...
+ def secondary_yaxis(
+ self,
+ location: Literal["left", "right"] | float,
+ functions: tuple[
+ Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]
+ ]
+ | Transform
+ | None = ...,
+ *,
+ transform: Transform | None = ...,
+ **kwargs
+ ) -> SecondaryAxis: ...
+ def text(
+ self,
+ x: float,
+ y: float,
+ s: str,
+ fontdict: dict[str, Any] | None = ...,
+ **kwargs
+ ) -> Text: ...
+ def annotate(
+ self,
+ text: str,
+ xy: tuple[float, float],
+ xytext: tuple[float, float] | None = ...,
+ xycoords: CoordsType = ...,
+ textcoords: CoordsType | None = ...,
+ arrowprops: dict[str, Any] | None = ...,
+ annotation_clip: bool | None = ...,
+ **kwargs
+ ) -> Annotation: ...
+ def axhline(
+ self, y: float = ..., xmin: float = ..., xmax: float = ..., **kwargs
+ ) -> Line2D: ...
+ def axvline(
+ self, x: float = ..., ymin: float = ..., ymax: float = ..., **kwargs
+ ) -> Line2D: ...
+
+ # TODO: Could separate the xy2 and slope signatures
+ def axline(
+ self,
+ xy1: tuple[float, float],
+ xy2: tuple[float, float] | None = ...,
+ *,
+ slope: float | None = ...,
+ **kwargs
+ ) -> AxLine: ...
+ def axhspan(
+ self, ymin: float, ymax: float, xmin: float = ..., xmax: float = ..., **kwargs
+ ) -> Rectangle: ...
+ def axvspan(
+ self, xmin: float, xmax: float, ymin: float = ..., ymax: float = ..., **kwargs
+ ) -> Rectangle: ...
+ def hlines(
+ self,
+ y: float | ArrayLike,
+ xmin: float | ArrayLike,
+ xmax: float | ArrayLike,
+ colors: ColorType | Sequence[ColorType] | None = ...,
+ linestyles: LineStyleType = ...,
+ *,
+ label: str = ...,
+ data=...,
+ **kwargs
+ ) -> LineCollection: ...
+ def vlines(
+ self,
+ x: float | ArrayLike,
+ ymin: float | ArrayLike,
+ ymax: float | ArrayLike,
+ colors: ColorType | Sequence[ColorType] | None = ...,
+ linestyles: LineStyleType = ...,
+ *,
+ label: str = ...,
+ data=...,
+ **kwargs
+ ) -> LineCollection: ...
+ def eventplot(
+ self,
+ positions: ArrayLike | Sequence[ArrayLike],
+ *,
+ orientation: Literal["horizontal", "vertical"] = ...,
+ lineoffsets: float | Sequence[float] = ...,
+ linelengths: float | Sequence[float] = ...,
+ linewidths: float | Sequence[float] | None = ...,
+ colors: ColorType | Sequence[ColorType] | None = ...,
+ alpha: float | Sequence[float] | None = ...,
+ linestyles: LineStyleType | Sequence[LineStyleType] = ...,
+ data=...,
+ **kwargs
+ ) -> EventCollection: ...
+ def plot(
+ self,
+ *args: float | ArrayLike | str,
+ scalex: bool = ...,
+ scaley: bool = ...,
+ data=...,
+ **kwargs
+ ) -> list[Line2D]: ...
+ def plot_date(
+ self,
+ x: ArrayLike,
+ y: ArrayLike,
+ fmt: str = ...,
+ tz: str | datetime.tzinfo | None = ...,
+ xdate: bool = ...,
+ ydate: bool = ...,
+ *,
+ data=...,
+ **kwargs
+ ) -> list[Line2D]: ...
+ def loglog(self, *args, **kwargs) -> list[Line2D]: ...
+ def semilogx(self, *args, **kwargs) -> list[Line2D]: ...
+ def semilogy(self, *args, **kwargs) -> list[Line2D]: ...
+ def acorr(
+ self, x: ArrayLike, *, data=..., **kwargs
+ ) -> tuple[np.ndarray, np.ndarray, LineCollection | Line2D, Line2D | None]: ...
+ def xcorr(
+ self,
+ x: ArrayLike,
+ y: ArrayLike,
+ *,
+ normed: bool = ...,
+ detrend: Callable[[ArrayLike], ArrayLike] = ...,
+ usevlines: bool = ...,
+ maxlags: int = ...,
+ data=...,
+ **kwargs
+ ) -> tuple[np.ndarray, np.ndarray, LineCollection | Line2D, Line2D | None]: ...
+ def step(
+ self,
+ x: ArrayLike,
+ y: ArrayLike,
+ *args,
+ where: Literal["pre", "post", "mid"] = ...,
+ data=...,
+ **kwargs
+ ) -> list[Line2D]: ...
+ def bar(
+ self,
+ x: float | ArrayLike,
+ height: float | ArrayLike,
+ width: float | ArrayLike = ...,
+ bottom: float | ArrayLike | None = ...,
+ *,
+ align: Literal["center", "edge"] = ...,
+ data=...,
+ **kwargs
+ ) -> BarContainer: ...
+ def barh(
+ self,
+ y: float | ArrayLike,
+ width: float | ArrayLike,
+ height: float | ArrayLike = ...,
+ left: float | ArrayLike | None = ...,
+ *,
+ align: Literal["center", "edge"] = ...,
+ data=...,
+ **kwargs
+ ) -> BarContainer: ...
+ def bar_label(
+ self,
+ container: BarContainer,
+ labels: ArrayLike | None = ...,
+ *,
+ fmt: str | Callable[[float], str] = ...,
+ label_type: Literal["center", "edge"] = ...,
+ padding: float = ...,
+ **kwargs
+ ) -> list[Annotation]: ...
+ def broken_barh(
+ self,
+ xranges: Sequence[tuple[float, float]],
+ yrange: tuple[float, float],
+ *,
+ data=...,
+ **kwargs
+ ) -> PolyCollection: ...
+ def stem(
+ self,
+ *args: ArrayLike | str,
+ linefmt: str | None = ...,
+ markerfmt: str | None = ...,
+ basefmt: str | None = ...,
+ bottom: float = ...,
+ label: str | None = ...,
+ orientation: Literal["vertical", "horizontal"] = ...,
+ data=...,
+ ) -> StemContainer: ...
+
+ # TODO: data kwarg preprocessor?
+ def pie(
+ self,
+ x: ArrayLike,
+ *,
+ explode: ArrayLike | None = ...,
+ labels: Sequence[str] | None = ...,
+ colors: ColorType | Sequence[ColorType] | None = ...,
+ autopct: str | Callable[[float], str] | None = ...,
+ pctdistance: float = ...,
+ shadow: bool = ...,
+ labeldistance: float | None = ...,
+ startangle: float = ...,
+ radius: float = ...,
+ counterclock: bool = ...,
+ wedgeprops: dict[str, Any] | None = ...,
+ textprops: dict[str, Any] | None = ...,
+ center: tuple[float, float] = ...,
+ frame: bool = ...,
+ rotatelabels: bool = ...,
+ normalize: bool = ...,
+ hatch: str | Sequence[str] | None = ...,
+ data=...,
+ ) -> tuple[list[Wedge], list[Text]] | tuple[
+ list[Wedge], list[Text], list[Text]
+ ]: ...
+ def errorbar(
+ self,
+ x: float | ArrayLike,
+ y: float | ArrayLike,
+ yerr: float | ArrayLike | None = ...,
+ xerr: float | ArrayLike | None = ...,
+ fmt: str = ...,
+ *,
+ ecolor: ColorType | None = ...,
+ elinewidth: float | None = ...,
+ capsize: float | None = ...,
+ barsabove: bool = ...,
+ lolims: bool | ArrayLike = ...,
+ uplims: bool | ArrayLike = ...,
+ xlolims: bool | ArrayLike = ...,
+ xuplims: bool | ArrayLike = ...,
+ errorevery: int | tuple[int, int] = ...,
+ capthick: float | None = ...,
+ data=...,
+ **kwargs
+ ) -> ErrorbarContainer: ...
+ def boxplot(
+ self,
+ x: ArrayLike | Sequence[ArrayLike],
+ *,
+ notch: bool | None = ...,
+ sym: str | None = ...,
+ vert: bool | None = ...,
+ orientation: Literal["vertical", "horizontal"] = ...,
+ whis: float | tuple[float, float] | None = ...,
+ positions: ArrayLike | None = ...,
+ widths: float | ArrayLike | None = ...,
+ patch_artist: bool | None = ...,
+ bootstrap: int | None = ...,
+ usermedians: ArrayLike | None = ...,
+ conf_intervals: ArrayLike | None = ...,
+ meanline: bool | None = ...,
+ showmeans: bool | None = ...,
+ showcaps: bool | None = ...,
+ showbox: bool | None = ...,
+ showfliers: bool | None = ...,
+ boxprops: dict[str, Any] | None = ...,
+ tick_labels: Sequence[str] | None = ...,
+ flierprops: dict[str, Any] | None = ...,
+ medianprops: dict[str, Any] | None = ...,
+ meanprops: dict[str, Any] | None = ...,
+ capprops: dict[str, Any] | None = ...,
+ whiskerprops: dict[str, Any] | None = ...,
+ manage_ticks: bool = ...,
+ autorange: bool = ...,
+ zorder: float | None = ...,
+ capwidths: float | ArrayLike | None = ...,
+ label: Sequence[str] | None = ...,
+ data=...,
+ ) -> dict[str, Any]: ...
+ def bxp(
+ self,
+ bxpstats: Sequence[dict[str, Any]],
+ positions: ArrayLike | None = ...,
+ *,
+ widths: float | ArrayLike | None = ...,
+ vert: bool | None = ...,
+ orientation: Literal["vertical", "horizontal"] = ...,
+ patch_artist: bool = ...,
+ shownotches: bool = ...,
+ showmeans: bool = ...,
+ showcaps: bool = ...,
+ showbox: bool = ...,
+ showfliers: bool = ...,
+ boxprops: dict[str, Any] | None = ...,
+ whiskerprops: dict[str, Any] | None = ...,
+ flierprops: dict[str, Any] | None = ...,
+ medianprops: dict[str, Any] | None = ...,
+ capprops: dict[str, Any] | None = ...,
+ meanprops: dict[str, Any] | None = ...,
+ meanline: bool = ...,
+ manage_ticks: bool = ...,
+ zorder: float | None = ...,
+ capwidths: float | ArrayLike | None = ...,
+ label: Sequence[str] | None = ...,
+ ) -> dict[str, Any]: ...
+ def scatter(
+ self,
+ x: float | ArrayLike,
+ y: float | ArrayLike,
+ s: float | ArrayLike | None = ...,
+ c: ArrayLike | Sequence[ColorType] | ColorType | None = ...,
+ *,
+ marker: MarkerType | None = ...,
+ cmap: str | Colormap | None = ...,
+ norm: str | Normalize | None = ...,
+ vmin: float | None = ...,
+ vmax: float | None = ...,
+ alpha: float | None = ...,
+ linewidths: float | Sequence[float] | None = ...,
+ edgecolors: Literal["face", "none"] | ColorType | Sequence[ColorType] | None = ...,
+ colorizer: Colorizer | None = ...,
+ plotnonfinite: bool = ...,
+ data=...,
+ **kwargs
+ ) -> PathCollection: ...
+ def hexbin(
+ self,
+ x: ArrayLike,
+ y: ArrayLike,
+ C: ArrayLike | None = ...,
+ *,
+ gridsize: int | tuple[int, int] = ...,
+ bins: Literal["log"] | int | Sequence[float] | None = ...,
+ xscale: Literal["linear", "log"] = ...,
+ yscale: Literal["linear", "log"] = ...,
+ extent: tuple[float, float, float, float] | None = ...,
+ cmap: str | Colormap | None = ...,
+ norm: str | Normalize | None = ...,
+ vmin: float | None = ...,
+ vmax: float | None = ...,
+ alpha: float | None = ...,
+ linewidths: float | None = ...,
+ edgecolors: Literal["face", "none"] | ColorType = ...,
+ reduce_C_function: Callable[[np.ndarray | list[float]], float] = ...,
+ mincnt: int | None = ...,
+ marginals: bool = ...,
+ colorizer: Colorizer | None = ...,
+ data=...,
+ **kwargs
+ ) -> PolyCollection: ...
+ def arrow(
+ self, x: float, y: float, dx: float, dy: float, **kwargs
+ ) -> FancyArrow: ...
+ def quiverkey(
+ self, Q: Quiver, X: float, Y: float, U: float, label: str, **kwargs
+ ) -> QuiverKey: ...
+ def quiver(self, *args, data=..., **kwargs) -> Quiver: ...
+ def barbs(self, *args, data=..., **kwargs) -> Barbs: ...
+ def fill(self, *args, data=..., **kwargs) -> list[Polygon]: ...
+ def fill_between(
+ self,
+ x: ArrayLike,
+ y1: ArrayLike | float,
+ y2: ArrayLike | float = ...,
+ where: Sequence[bool] | None = ...,
+ interpolate: bool = ...,
+ step: Literal["pre", "post", "mid"] | None = ...,
+ *,
+ data=...,
+ **kwargs
+ ) -> FillBetweenPolyCollection: ...
+ def fill_betweenx(
+ self,
+ y: ArrayLike,
+ x1: ArrayLike | float,
+ x2: ArrayLike | float = ...,
+ where: Sequence[bool] | None = ...,
+ step: Literal["pre", "post", "mid"] | None = ...,
+ interpolate: bool = ...,
+ *,
+ data=...,
+ **kwargs
+ ) -> FillBetweenPolyCollection: ...
+ def imshow(
+ self,
+ X: ArrayLike | PIL.Image.Image,
+ cmap: str | Colormap | None = ...,
+ norm: str | Normalize | None = ...,
+ *,
+ aspect: Literal["equal", "auto"] | float | None = ...,
+ interpolation: str | None = ...,
+ alpha: float | ArrayLike | None = ...,
+ vmin: float | None = ...,
+ vmax: float | None = ...,
+ colorizer: Colorizer | None = ...,
+ origin: Literal["upper", "lower"] | None = ...,
+ extent: tuple[float, float, float, float] | None = ...,
+ interpolation_stage: Literal["data", "rgba", "auto"] | None = ...,
+ filternorm: bool = ...,
+ filterrad: float = ...,
+ resample: bool | None = ...,
+ url: str | None = ...,
+ data=...,
+ **kwargs
+ ) -> AxesImage: ...
+ def pcolor(
+ self,
+ *args: ArrayLike,
+ shading: Literal["flat", "nearest", "auto"] | None = ...,
+ alpha: float | None = ...,
+ norm: str | Normalize | None = ...,
+ cmap: str | Colormap | None = ...,
+ vmin: float | None = ...,
+ vmax: float | None = ...,
+ colorizer: Colorizer | None = ...,
+ data=...,
+ **kwargs
+ ) -> Collection: ...
+ def pcolormesh(
+ self,
+ *args: ArrayLike,
+ alpha: float | None = ...,
+ norm: str | Normalize | None = ...,
+ cmap: str | Colormap | None = ...,
+ vmin: float | None = ...,
+ vmax: float | None = ...,
+ colorizer: Colorizer | None = ...,
+ shading: Literal["flat", "nearest", "gouraud", "auto"] | None = ...,
+ antialiased: bool = ...,
+ data=...,
+ **kwargs
+ ) -> QuadMesh: ...
+ def pcolorfast(
+ self,
+ *args: ArrayLike | tuple[float, float],
+ alpha: float | None = ...,
+ norm: str | Normalize | None = ...,
+ cmap: str | Colormap | None = ...,
+ vmin: float | None = ...,
+ vmax: float | None = ...,
+ colorizer: Colorizer | None = ...,
+ data=...,
+ **kwargs
+ ) -> AxesImage | PcolorImage | QuadMesh: ...
+ def contour(self, *args, data=..., **kwargs) -> QuadContourSet: ...
+ def contourf(self, *args, data=..., **kwargs) -> QuadContourSet: ...
+ def clabel(
+ self, CS: ContourSet, levels: ArrayLike | None = ..., **kwargs
+ ) -> list[Text]: ...
+ def hist(
+ self,
+ x: ArrayLike | Sequence[ArrayLike],
+ bins: int | Sequence[float] | str | None = ...,
+ *,
+ range: tuple[float, float] | None = ...,
+ density: bool = ...,
+ weights: ArrayLike | None = ...,
+ cumulative: bool | float = ...,
+ bottom: ArrayLike | float | None = ...,
+ histtype: Literal["bar", "barstacked", "step", "stepfilled"] = ...,
+ align: Literal["left", "mid", "right"] = ...,
+ orientation: Literal["vertical", "horizontal"] = ...,
+ rwidth: float | None = ...,
+ log: bool = ...,
+ color: ColorType | Sequence[ColorType] | None = ...,
+ label: str | Sequence[str] | None = ...,
+ stacked: bool = ...,
+ data=...,
+ **kwargs
+ ) -> tuple[
+ np.ndarray | list[np.ndarray],
+ np.ndarray,
+ BarContainer | Polygon | list[BarContainer | Polygon],
+ ]: ...
+ def stairs(
+ self,
+ values: ArrayLike,
+ edges: ArrayLike | None = ...,
+ *,
+ orientation: Literal["vertical", "horizontal"] = ...,
+ baseline: float | ArrayLike | None = ...,
+ fill: bool = ...,
+ data=...,
+ **kwargs
+ ) -> StepPatch: ...
+ def hist2d(
+ self,
+ x: ArrayLike,
+ y: ArrayLike,
+ bins: None
+ | int
+ | tuple[int, int]
+ | ArrayLike
+ | tuple[ArrayLike, ArrayLike] = ...,
+ *,
+ range: ArrayLike | None = ...,
+ density: bool = ...,
+ weights: ArrayLike | None = ...,
+ cmin: float | None = ...,
+ cmax: float | None = ...,
+ data=...,
+ **kwargs
+ ) -> tuple[np.ndarray, np.ndarray, np.ndarray, QuadMesh]: ...
+ def ecdf(
+ self,
+ x: ArrayLike,
+ weights: ArrayLike | None = ...,
+ *,
+ complementary: bool=...,
+ orientation: Literal["vertical", "horizontal"]=...,
+ compress: bool=...,
+ data=...,
+ **kwargs
+ ) -> Line2D: ...
+ def psd(
+ self,
+ x: ArrayLike,
+ *,
+ NFFT: int | None = ...,
+ Fs: float | None = ...,
+ Fc: int | None = ...,
+ detrend: Literal["none", "mean", "linear"]
+ | Callable[[ArrayLike], ArrayLike]
+ | None = ...,
+ window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ...,
+ noverlap: int | None = ...,
+ pad_to: int | None = ...,
+ sides: Literal["default", "onesided", "twosided"] | None = ...,
+ scale_by_freq: bool | None = ...,
+ return_line: bool | None = ...,
+ data=...,
+ **kwargs
+ ) -> tuple[np.ndarray, np.ndarray] | tuple[np.ndarray, np.ndarray, Line2D]: ...
+ def csd(
+ self,
+ x: ArrayLike,
+ y: ArrayLike,
+ *,
+ NFFT: int | None = ...,
+ Fs: float | None = ...,
+ Fc: int | None = ...,
+ detrend: Literal["none", "mean", "linear"]
+ | Callable[[ArrayLike], ArrayLike]
+ | None = ...,
+ window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ...,
+ noverlap: int | None = ...,
+ pad_to: int | None = ...,
+ sides: Literal["default", "onesided", "twosided"] | None = ...,
+ scale_by_freq: bool | None = ...,
+ return_line: bool | None = ...,
+ data=...,
+ **kwargs
+ ) -> tuple[np.ndarray, np.ndarray] | tuple[np.ndarray, np.ndarray, Line2D]: ...
+ def magnitude_spectrum(
+ self,
+ x: ArrayLike,
+ *,
+ Fs: float | None = ...,
+ Fc: int | None = ...,
+ window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ...,
+ pad_to: int | None = ...,
+ sides: Literal["default", "onesided", "twosided"] | None = ...,
+ scale: Literal["default", "linear", "dB"] | None = ...,
+ data=...,
+ **kwargs
+ ) -> tuple[np.ndarray, np.ndarray, Line2D]: ...
+ def angle_spectrum(
+ self,
+ x: ArrayLike,
+ *,
+ Fs: float | None = ...,
+ Fc: int | None = ...,
+ window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ...,
+ pad_to: int | None = ...,
+ sides: Literal["default", "onesided", "twosided"] | None = ...,
+ data=...,
+ **kwargs
+ ) -> tuple[np.ndarray, np.ndarray, Line2D]: ...
+ def phase_spectrum(
+ self,
+ x: ArrayLike,
+ *,
+ Fs: float | None = ...,
+ Fc: int | None = ...,
+ window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ...,
+ pad_to: int | None = ...,
+ sides: Literal["default", "onesided", "twosided"] | None = ...,
+ data=...,
+ **kwargs
+ ) -> tuple[np.ndarray, np.ndarray, Line2D]: ...
+ def cohere(
+ self,
+ x: ArrayLike,
+ y: ArrayLike,
+ *,
+ NFFT: int = ...,
+ Fs: float = ...,
+ Fc: int = ...,
+ detrend: Literal["none", "mean", "linear"]
+ | Callable[[ArrayLike], ArrayLike] = ...,
+ window: Callable[[ArrayLike], ArrayLike] | ArrayLike = ...,
+ noverlap: int = ...,
+ pad_to: int | None = ...,
+ sides: Literal["default", "onesided", "twosided"] = ...,
+ scale_by_freq: bool | None = ...,
+ data=...,
+ **kwargs
+ ) -> tuple[np.ndarray, np.ndarray]: ...
+ def specgram(
+ self,
+ x: ArrayLike,
+ *,
+ NFFT: int | None = ...,
+ Fs: float | None = ...,
+ Fc: int | None = ...,
+ detrend: Literal["none", "mean", "linear"]
+ | Callable[[ArrayLike], ArrayLike]
+ | None = ...,
+ window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ...,
+ noverlap: int | None = ...,
+ cmap: str | Colormap | None = ...,
+ xextent: tuple[float, float] | None = ...,
+ pad_to: int | None = ...,
+ sides: Literal["default", "onesided", "twosided"] | None = ...,
+ scale_by_freq: bool | None = ...,
+ mode: Literal["default", "psd", "magnitude", "angle", "phase"] | None = ...,
+ scale: Literal["default", "linear", "dB"] | None = ...,
+ vmin: float | None = ...,
+ vmax: float | None = ...,
+ data=...,
+ **kwargs
+ ) -> tuple[np.ndarray, np.ndarray, np.ndarray, AxesImage]: ...
+ def spy(
+ self,
+ Z: ArrayLike,
+ *,
+ precision: float | Literal["present"] = ...,
+ marker: str | None = ...,
+ markersize: float | None = ...,
+ aspect: Literal["equal", "auto"] | float | None = ...,
+ origin: Literal["upper", "lower"] = ...,
+ **kwargs
+ ) -> AxesImage: ...
+ def matshow(self, Z: ArrayLike, **kwargs) -> AxesImage: ...
+ def violinplot(
+ self,
+ dataset: ArrayLike | Sequence[ArrayLike],
+ positions: ArrayLike | None = ...,
+ *,
+ vert: bool | None = ...,
+ orientation: Literal["vertical", "horizontal"] = ...,
+ widths: float | ArrayLike = ...,
+ showmeans: bool = ...,
+ showextrema: bool = ...,
+ showmedians: bool = ...,
+ quantiles: Sequence[float | Sequence[float]] | None = ...,
+ points: int = ...,
+ bw_method: Literal["scott", "silverman"]
+ | float
+ | Callable[[GaussianKDE], float]
+ | None = ...,
+ side: Literal["both", "low", "high"] = ...,
+ data=...,
+ ) -> dict[str, Collection]: ...
+ def violin(
+ self,
+ vpstats: Sequence[dict[str, Any]],
+ positions: ArrayLike | None = ...,
+ *,
+ vert: bool | None = ...,
+ orientation: Literal["vertical", "horizontal"] = ...,
+ widths: float | ArrayLike = ...,
+ showmeans: bool = ...,
+ showextrema: bool = ...,
+ showmedians: bool = ...,
+ side: Literal["both", "low", "high"] = ...,
+ ) -> dict[str, Collection]: ...
+
+ table = mtable.table
+ stackplot = mstack.stackplot
+ streamplot = mstream.streamplot
+ tricontour = mtri.tricontour
+ tricontourf = mtri.tricontourf
+ tripcolor = mtri.tripcolor
+ triplot = mtri.triplot
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_base.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_base.py
new file mode 100644
index 0000000000000000000000000000000000000000..f34386245fd6849b4408a0c1745f55c0b3fce167
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_base.py
@@ -0,0 +1,4857 @@
+from collections.abc import Iterable, Sequence
+from contextlib import ExitStack
+import functools
+import inspect
+import logging
+from numbers import Real
+from operator import attrgetter
+import re
+import types
+
+import numpy as np
+
+import matplotlib as mpl
+from matplotlib import _api, cbook, _docstring, offsetbox
+import matplotlib.artist as martist
+import matplotlib.axis as maxis
+from matplotlib.cbook import _OrderedSet, _check_1d, index_of
+import matplotlib.collections as mcoll
+import matplotlib.colors as mcolors
+import matplotlib.font_manager as font_manager
+from matplotlib.gridspec import SubplotSpec
+import matplotlib.image as mimage
+import matplotlib.lines as mlines
+import matplotlib.patches as mpatches
+from matplotlib.rcsetup import cycler, validate_axisbelow
+import matplotlib.spines as mspines
+import matplotlib.table as mtable
+import matplotlib.text as mtext
+import matplotlib.ticker as mticker
+import matplotlib.transforms as mtransforms
+
+_log = logging.getLogger(__name__)
+
+
+class _axis_method_wrapper:
+ """
+ Helper to generate Axes methods wrapping Axis methods.
+
+ After ::
+
+ get_foo = _axis_method_wrapper("xaxis", "get_bar")
+
+ (in the body of a class) ``get_foo`` is a method that forwards it arguments
+ to the ``get_bar`` method of the ``xaxis`` attribute, and gets its
+ signature and docstring from ``Axis.get_bar``.
+
+ The docstring of ``get_foo`` is built by replacing "this Axis" by "the
+ {attr_name}" (i.e., "the xaxis", "the yaxis") in the wrapped method's
+ dedented docstring; additional replacements can be given in *doc_sub*.
+ """
+
+ def __init__(self, attr_name, method_name, *, doc_sub=None):
+ self.attr_name = attr_name
+ self.method_name = method_name
+ # Immediately put the docstring in ``self.__doc__`` so that docstring
+ # manipulations within the class body work as expected.
+ doc = inspect.getdoc(getattr(maxis.Axis, method_name))
+ self._missing_subs = []
+ if doc:
+ doc_sub = {"this Axis": f"the {self.attr_name}", **(doc_sub or {})}
+ for k, v in doc_sub.items():
+ if k not in doc: # Delay raising error until we know qualname.
+ self._missing_subs.append(k)
+ doc = doc.replace(k, v)
+ self.__doc__ = doc
+
+ def __set_name__(self, owner, name):
+ # This is called at the end of the class body as
+ # ``self.__set_name__(cls, name_under_which_self_is_assigned)``; we
+ # rely on that to give the wrapper the correct __name__/__qualname__.
+ get_method = attrgetter(f"{self.attr_name}.{self.method_name}")
+
+ def wrapper(self, *args, **kwargs):
+ return get_method(self)(*args, **kwargs)
+
+ wrapper.__module__ = owner.__module__
+ wrapper.__name__ = name
+ wrapper.__qualname__ = f"{owner.__qualname__}.{name}"
+ wrapper.__doc__ = self.__doc__
+ # Manually copy the signature instead of using functools.wraps because
+ # displaying the Axis method source when asking for the Axes method
+ # source would be confusing.
+ wrapper.__signature__ = inspect.signature(
+ getattr(maxis.Axis, self.method_name))
+
+ if self._missing_subs:
+ raise ValueError(
+ "The definition of {} expected that the docstring of Axis.{} "
+ "contains {!r} as substrings".format(
+ wrapper.__qualname__, self.method_name,
+ ", ".join(map(repr, self._missing_subs))))
+
+ setattr(owner, name, wrapper)
+
+
+class _TransformedBoundsLocator:
+ """
+ Axes locator for `.Axes.inset_axes` and similarly positioned Axes.
+
+ The locator is a callable object used in `.Axes.set_aspect` to compute the
+ Axes location depending on the renderer.
+ """
+
+ def __init__(self, bounds, transform):
+ """
+ *bounds* (a ``[l, b, w, h]`` rectangle) and *transform* together
+ specify the position of the inset Axes.
+ """
+ self._bounds = bounds
+ self._transform = transform
+
+ def __call__(self, ax, renderer):
+ # Subtracting transSubfigure will typically rely on inverted(),
+ # freezing the transform; thus, this needs to be delayed until draw
+ # time as transSubfigure may otherwise change after this is evaluated.
+ return mtransforms.TransformedBbox(
+ mtransforms.Bbox.from_bounds(*self._bounds),
+ self._transform - ax.get_figure(root=False).transSubfigure)
+
+
+def _process_plot_format(fmt, *, ambiguous_fmt_datakey=False):
+ """
+ Convert a MATLAB style color/line style format string to a (*linestyle*,
+ *marker*, *color*) tuple.
+
+ Example format strings include:
+
+ * 'ko': black circles
+ * '.b': blue dots
+ * 'r--': red dashed lines
+ * 'C2--': the third color in the color cycle, dashed lines
+
+ The format is absolute in the sense that if a linestyle or marker is not
+ defined in *fmt*, there is no line or marker. This is expressed by
+ returning 'None' for the respective quantity.
+
+ See Also
+ --------
+ matplotlib.Line2D.lineStyles, matplotlib.colors.cnames
+ All possible styles and color format strings.
+ """
+
+ linestyle = None
+ marker = None
+ color = None
+
+ # First check whether fmt is just a colorspec, but specifically exclude the
+ # grayscale string "1" (not "1.0"), which is interpreted as the tri_down
+ # marker "1". The grayscale string "0" could be unambiguously understood
+ # as a color (black) but also excluded for consistency.
+ if fmt not in ["0", "1"]:
+ try:
+ color = mcolors.to_rgba(fmt)
+ return linestyle, marker, color
+ except ValueError:
+ pass
+
+ errfmt = ("{!r} is neither a data key nor a valid format string ({})"
+ if ambiguous_fmt_datakey else
+ "{!r} is not a valid format string ({})")
+
+ i = 0
+ while i < len(fmt):
+ c = fmt[i]
+ if fmt[i:i+2] in mlines.lineStyles: # First, the two-char styles.
+ if linestyle is not None:
+ raise ValueError(errfmt.format(fmt, "two linestyle symbols"))
+ linestyle = fmt[i:i+2]
+ i += 2
+ elif c in mlines.lineStyles:
+ if linestyle is not None:
+ raise ValueError(errfmt.format(fmt, "two linestyle symbols"))
+ linestyle = c
+ i += 1
+ elif c in mlines.lineMarkers:
+ if marker is not None:
+ raise ValueError(errfmt.format(fmt, "two marker symbols"))
+ marker = c
+ i += 1
+ elif c in mcolors.get_named_colors_mapping():
+ if color is not None:
+ raise ValueError(errfmt.format(fmt, "two color symbols"))
+ color = c
+ i += 1
+ elif c == "C":
+ cn_color = re.match(r"C\d+", fmt[i:])
+ if not cn_color:
+ raise ValueError(errfmt.format(fmt, "'C' must be followed by a number"))
+ color = mcolors.to_rgba(cn_color[0])
+ i += len(cn_color[0])
+ else:
+ raise ValueError(errfmt.format(fmt, f"unrecognized character {c!r}"))
+
+ if linestyle is None and marker is None:
+ linestyle = mpl.rcParams['lines.linestyle']
+ if linestyle is None:
+ linestyle = 'None'
+ if marker is None:
+ marker = 'None'
+
+ return linestyle, marker, color
+
+
+class _process_plot_var_args:
+ """
+ Process variable length arguments to `~.Axes.plot`, to support ::
+
+ plot(t, s)
+ plot(t1, s1, t2, s2)
+ plot(t1, s1, 'ko', t2, s2)
+ plot(t1, s1, 'ko', t2, s2, 'r--', t3, e3)
+
+ an arbitrary number of *x*, *y*, *fmt* are allowed
+ """
+
+ def __init__(self, output='Line2D'):
+ _api.check_in_list(['Line2D', 'Polygon', 'coordinates'], output=output)
+ self.output = output
+ self.set_prop_cycle(None)
+
+ def set_prop_cycle(self, cycler):
+ if cycler is None:
+ cycler = mpl.rcParams['axes.prop_cycle']
+ self._idx = 0
+ self._cycler_items = [*cycler]
+
+ def __call__(self, axes, *args, data=None, return_kwargs=False, **kwargs):
+ axes._process_unit_info(kwargs=kwargs)
+
+ for pos_only in "xy":
+ if pos_only in kwargs:
+ raise _api.kwarg_error(inspect.stack()[1].function, pos_only)
+
+ if not args:
+ return
+
+ if data is None: # Process dict views
+ args = [cbook.sanitize_sequence(a) for a in args]
+ else: # Process the 'data' kwarg.
+ replaced = [mpl._replacer(data, arg) for arg in args]
+ if len(args) == 1:
+ label_namer_idx = 0
+ elif len(args) == 2: # Can be x, y or y, c.
+ # Figure out what the second argument is.
+ # 1) If the second argument cannot be a format shorthand, the
+ # second argument is the label_namer.
+ # 2) Otherwise (it could have been a format shorthand),
+ # a) if we did perform a substitution, emit a warning, and
+ # use it as label_namer.
+ # b) otherwise, it is indeed a format shorthand; use the
+ # first argument as label_namer.
+ try:
+ _process_plot_format(args[1])
+ except ValueError: # case 1)
+ label_namer_idx = 1
+ else:
+ if replaced[1] is not args[1]: # case 2a)
+ _api.warn_external(
+ f"Second argument {args[1]!r} is ambiguous: could "
+ f"be a format string but is in 'data'; using as "
+ f"data. If it was intended as data, set the "
+ f"format string to an empty string to suppress "
+ f"this warning. If it was intended as a format "
+ f"string, explicitly pass the x-values as well. "
+ f"Alternatively, rename the entry in 'data'.",
+ RuntimeWarning)
+ label_namer_idx = 1
+ else: # case 2b)
+ label_namer_idx = 0
+ elif len(args) == 3:
+ label_namer_idx = 1
+ else:
+ raise ValueError(
+ "Using arbitrary long args with data is not supported due "
+ "to ambiguity of arguments; use multiple plotting calls "
+ "instead")
+ if kwargs.get("label") is None:
+ kwargs["label"] = mpl._label_from_arg(
+ replaced[label_namer_idx], args[label_namer_idx])
+ args = replaced
+ ambiguous_fmt_datakey = data is not None and len(args) == 2
+
+ if len(args) >= 4 and not cbook.is_scalar_or_string(
+ kwargs.get("label")):
+ raise ValueError("plot() with multiple groups of data (i.e., "
+ "pairs of x and y) does not support multiple "
+ "labels")
+
+ # Repeatedly grab (x, y) or (x, y, format) from the front of args and
+ # massage them into arguments to plot() or fill().
+
+ while args:
+ this, args = args[:2], args[2:]
+ if args and isinstance(args[0], str):
+ this += args[0],
+ args = args[1:]
+ yield from self._plot_args(
+ axes, this, kwargs, ambiguous_fmt_datakey=ambiguous_fmt_datakey,
+ return_kwargs=return_kwargs
+ )
+
+ def get_next_color(self):
+ """Return the next color in the cycle."""
+ entry = self._cycler_items[self._idx]
+ if "color" in entry:
+ self._idx = (self._idx + 1) % len(self._cycler_items) # Advance cycler.
+ return entry["color"]
+ else:
+ return "k"
+
+ def _getdefaults(self, kw, ignore=frozenset()):
+ """
+ If some keys in the property cycle (excluding those in the set
+ *ignore*) are absent or set to None in the dict *kw*, return a copy
+ of the next entry in the property cycle, excluding keys in *ignore*.
+ Otherwise, don't advance the property cycle, and return an empty dict.
+ """
+ defaults = self._cycler_items[self._idx]
+ if any(kw.get(k, None) is None for k in {*defaults} - ignore):
+ self._idx = (self._idx + 1) % len(self._cycler_items) # Advance cycler.
+ # Return a new dict to avoid exposing _cycler_items entries to mutation.
+ return {k: v for k, v in defaults.items() if k not in ignore}
+ else:
+ return {}
+
+ def _setdefaults(self, defaults, kw):
+ """
+ Add to the dict *kw* the entries in the dict *default* that are absent
+ or set to None in *kw*.
+ """
+ for k in defaults:
+ if kw.get(k, None) is None:
+ kw[k] = defaults[k]
+
+ def _make_line(self, axes, x, y, kw, kwargs):
+ kw = {**kw, **kwargs} # Don't modify the original kw.
+ self._setdefaults(self._getdefaults(kw), kw)
+ seg = mlines.Line2D(x, y, **kw)
+ return seg, kw
+
+ def _make_coordinates(self, axes, x, y, kw, kwargs):
+ kw = {**kw, **kwargs} # Don't modify the original kw.
+ self._setdefaults(self._getdefaults(kw), kw)
+ return (x, y), kw
+
+ def _make_polygon(self, axes, x, y, kw, kwargs):
+ # Polygon doesn't directly support unitized inputs.
+ x = axes.convert_xunits(x)
+ y = axes.convert_yunits(y)
+
+ kw = kw.copy() # Don't modify the original kw.
+ kwargs = kwargs.copy()
+
+ # Ignore 'marker'-related properties as they aren't Polygon
+ # properties, but they are Line2D properties, and so they are
+ # likely to appear in the default cycler construction.
+ # This is done here to the defaults dictionary as opposed to the
+ # other two dictionaries because we do want to capture when a
+ # *user* explicitly specifies a marker which should be an error.
+ # We also want to prevent advancing the cycler if there are no
+ # defaults needed after ignoring the given properties.
+ ignores = ({'marker', 'markersize', 'markeredgecolor',
+ 'markerfacecolor', 'markeredgewidth'}
+ # Also ignore anything provided by *kwargs*.
+ | {k for k, v in kwargs.items() if v is not None})
+
+ # Only using the first dictionary to use as basis
+ # for getting defaults for back-compat reasons.
+ # Doing it with both seems to mess things up in
+ # various places (probably due to logic bugs elsewhere).
+ default_dict = self._getdefaults(kw, ignores)
+ self._setdefaults(default_dict, kw)
+
+ # Looks like we don't want "color" to be interpreted to
+ # mean both facecolor and edgecolor for some reason.
+ # So the "kw" dictionary is thrown out, and only its
+ # 'color' value is kept and translated as a 'facecolor'.
+ # This design should probably be revisited as it increases
+ # complexity.
+ facecolor = kw.get('color', None)
+
+ # Throw out 'color' as it is now handled as a facecolor
+ default_dict.pop('color', None)
+
+ # To get other properties set from the cycler
+ # modify the kwargs dictionary.
+ self._setdefaults(default_dict, kwargs)
+
+ seg = mpatches.Polygon(np.column_stack((x, y)),
+ facecolor=facecolor,
+ fill=kwargs.get('fill', True),
+ closed=kw['closed'])
+ seg.set(**kwargs)
+ return seg, kwargs
+
+ def _plot_args(self, axes, tup, kwargs, *,
+ return_kwargs=False, ambiguous_fmt_datakey=False):
+ """
+ Process the arguments of ``plot([x], y, [fmt], **kwargs)`` calls.
+
+ This processes a single set of ([x], y, [fmt]) parameters; i.e. for
+ ``plot(x, y, x2, y2)`` it will be called twice. Once for (x, y) and
+ once for (x2, y2).
+
+ x and y may be 2D and thus can still represent multiple datasets.
+
+ For multiple datasets, if the keyword argument *label* is a list, this
+ will unpack the list and assign the individual labels to the datasets.
+
+ Parameters
+ ----------
+ tup : tuple
+ A tuple of the positional parameters. This can be one of
+
+ - (y,)
+ - (x, y)
+ - (y, fmt)
+ - (x, y, fmt)
+
+ kwargs : dict
+ The keyword arguments passed to ``plot()``.
+
+ return_kwargs : bool
+ Whether to also return the effective keyword arguments after label
+ unpacking as well.
+
+ ambiguous_fmt_datakey : bool
+ Whether the format string in *tup* could also have been a
+ misspelled data key.
+
+ Returns
+ -------
+ result
+ If *return_kwargs* is false, a list of Artists representing the
+ dataset(s).
+ If *return_kwargs* is true, a list of (Artist, effective_kwargs)
+ representing the dataset(s). See *return_kwargs*.
+ The Artist is either `.Line2D` (if called from ``plot()``) or
+ `.Polygon` otherwise.
+ """
+ if len(tup) > 1 and isinstance(tup[-1], str):
+ # xy is tup with fmt stripped (could still be (y,) only)
+ *xy, fmt = tup
+ linestyle, marker, color = _process_plot_format(
+ fmt, ambiguous_fmt_datakey=ambiguous_fmt_datakey)
+ elif len(tup) == 3:
+ raise ValueError('third arg must be a format string')
+ else:
+ xy = tup
+ linestyle, marker, color = None, None, None
+
+ # Don't allow any None value; these would be up-converted to one
+ # element array of None which causes problems downstream.
+ if any(v is None for v in tup):
+ raise ValueError("x, y, and format string must not be None")
+
+ kw = {}
+ for prop_name, val in zip(('linestyle', 'marker', 'color'),
+ (linestyle, marker, color)):
+ if val is not None:
+ # check for conflicts between fmt and kwargs
+ if (fmt.lower() != 'none'
+ and prop_name in kwargs
+ and val != 'None'):
+ # Technically ``plot(x, y, 'o', ls='--')`` is a conflict
+ # because 'o' implicitly unsets the linestyle
+ # (linestyle='None').
+ # We'll gracefully not warn in this case because an
+ # explicit set via kwargs can be seen as intention to
+ # override an implicit unset.
+ # Note: We don't val.lower() != 'none' because val is not
+ # necessarily a string (can be a tuple for colors). This
+ # is safe, because *val* comes from _process_plot_format()
+ # which only returns 'None'.
+ _api.warn_external(
+ f"{prop_name} is redundantly defined by the "
+ f"'{prop_name}' keyword argument and the fmt string "
+ f'"{fmt}" (-> {prop_name}={val!r}). The keyword '
+ f"argument will take precedence.")
+ kw[prop_name] = val
+
+ if len(xy) == 2:
+ x = _check_1d(xy[0])
+ y = _check_1d(xy[1])
+ else:
+ x, y = index_of(xy[-1])
+
+ if axes.xaxis is not None:
+ axes.xaxis.update_units(x)
+ if axes.yaxis is not None:
+ axes.yaxis.update_units(y)
+
+ if x.shape[0] != y.shape[0]:
+ raise ValueError(f"x and y must have same first dimension, but "
+ f"have shapes {x.shape} and {y.shape}")
+ if x.ndim > 2 or y.ndim > 2:
+ raise ValueError(f"x and y can be no greater than 2D, but have "
+ f"shapes {x.shape} and {y.shape}")
+ if x.ndim == 1:
+ x = x[:, np.newaxis]
+ if y.ndim == 1:
+ y = y[:, np.newaxis]
+
+ if self.output == 'Line2D':
+ make_artist = self._make_line
+ elif self.output == 'Polygon':
+ kw['closed'] = kwargs.get('closed', True)
+ make_artist = self._make_polygon
+ elif self.output == 'coordinates':
+ make_artist = self._make_coordinates
+ else:
+ _api.check_in_list(['Line2D', 'Polygon', 'coordinates'], output=self.output)
+
+ ncx, ncy = x.shape[1], y.shape[1]
+ if ncx > 1 and ncy > 1 and ncx != ncy:
+ raise ValueError(f"x has {ncx} columns but y has {ncy} columns")
+ if ncx == 0 or ncy == 0:
+ return []
+
+ label = kwargs.get('label')
+ n_datasets = max(ncx, ncy)
+
+ if cbook.is_scalar_or_string(label):
+ labels = [label] * n_datasets
+ elif len(label) == n_datasets:
+ labels = label
+ elif n_datasets == 1:
+ msg = (f'Passing label as a length {len(label)} sequence when '
+ 'plotting a single dataset is deprecated in Matplotlib 3.9 '
+ 'and will error in 3.11. To keep the current behavior, '
+ 'cast the sequence to string before passing.')
+ _api.warn_deprecated('3.9', message=msg)
+ labels = [label]
+ else:
+ raise ValueError(
+ f"label must be scalar or have the same length as the input "
+ f"data, but found {len(label)} for {n_datasets} datasets.")
+
+ result = (make_artist(axes, x[:, j % ncx], y[:, j % ncy], kw,
+ {**kwargs, 'label': label})
+ for j, label in enumerate(labels))
+
+ if return_kwargs:
+ return list(result)
+ else:
+ return [l[0] for l in result]
+
+
+@_api.define_aliases({"facecolor": ["fc"]})
+class _AxesBase(martist.Artist):
+ name = "rectilinear"
+
+ # axis names are the prefixes for the attributes that contain the
+ # respective axis; e.g. 'x' <-> self.xaxis, containing an XAxis.
+ # Note that PolarAxes uses these attributes as well, so that we have
+ # 'x' <-> self.xaxis, containing a ThetaAxis. In particular we do not
+ # have 'theta' in _axis_names.
+ # In practice, this is ('x', 'y') for all 2D Axes and ('x', 'y', 'z')
+ # for Axes3D.
+ _axis_names = ("x", "y")
+ _shared_axes = {name: cbook.Grouper() for name in _axis_names}
+ _twinned_axes = cbook.Grouper()
+
+ _subclass_uses_cla = False
+
+ dataLim: mtransforms.Bbox
+ """The bounding `.Bbox` enclosing all data displayed in the Axes."""
+
+ spines: mspines.Spines
+ """
+ The `.Spines` container for the Axes' spines, i.e. the lines denoting the
+ data area boundaries.
+ """
+
+ xaxis: maxis.XAxis
+ """
+ The `.XAxis` instance.
+
+ Common axis-related configuration can be achieved through high-level wrapper
+ methods on Axes; e.g. `ax.set_xticks <.Axes.set_xticks>` is a shortcut for
+ `ax.xaxis.set_ticks <.Axis.set_ticks>`. The *xaxis* attribute gives direct
+ direct access to the underlying `~.axis.Axis` if you need more control.
+
+ See also
+
+ - :ref:`Axis wrapper methods on Axes `
+ - :doc:`Axis API `
+ """
+
+ yaxis: maxis.YAxis
+ """
+ The `.YAxis` instance.
+
+ Common axis-related configuration can be achieved through high-level wrapper
+ methods on Axes; e.g. `ax.set_yticks <.Axes.set_yticks>` is a shortcut for
+ `ax.yaxis.set_ticks <.Axis.set_ticks>`. The *yaxis* attribute gives direct
+ access to the underlying `~.axis.Axis` if you need more control.
+
+ See also
+
+ - :ref:`Axis wrapper methods on Axes `
+ - :doc:`Axis API `
+ """
+
+ @property
+ def _axis_map(self):
+ """A mapping of axis names, e.g. 'x', to `Axis` instances."""
+ return {name: getattr(self, f"{name}axis")
+ for name in self._axis_names}
+
+ def __str__(self):
+ return "{0}({1[0]:g},{1[1]:g};{1[2]:g}x{1[3]:g})".format(
+ type(self).__name__, self._position.bounds)
+
+ def __init__(self, fig,
+ *args,
+ facecolor=None, # defaults to rc axes.facecolor
+ frameon=True,
+ sharex=None, # use Axes instance's xaxis info
+ sharey=None, # use Axes instance's yaxis info
+ label='',
+ xscale=None,
+ yscale=None,
+ box_aspect=None,
+ forward_navigation_events="auto",
+ **kwargs
+ ):
+ """
+ Build an Axes in a figure.
+
+ Parameters
+ ----------
+ fig : `~matplotlib.figure.Figure`
+ The Axes is built in the `.Figure` *fig*.
+
+ *args
+ ``*args`` can be a single ``(left, bottom, width, height)``
+ rectangle or a single `.Bbox`. This specifies the rectangle (in
+ figure coordinates) where the Axes is positioned.
+
+ ``*args`` can also consist of three numbers or a single three-digit
+ number; in the latter case, the digits are considered as
+ independent numbers. The numbers are interpreted as ``(nrows,
+ ncols, index)``: ``(nrows, ncols)`` specifies the size of an array
+ of subplots, and ``index`` is the 1-based index of the subplot
+ being created. Finally, ``*args`` can also directly be a
+ `.SubplotSpec` instance.
+
+ sharex, sharey : `~matplotlib.axes.Axes`, optional
+ The x- or y-`~.matplotlib.axis` is shared with the x- or y-axis in
+ the input `~.axes.Axes`. Note that it is not possible to unshare
+ axes.
+
+ frameon : bool, default: True
+ Whether the Axes frame is visible.
+
+ box_aspect : float, optional
+ Set a fixed aspect for the Axes box, i.e. the ratio of height to
+ width. See `~.axes.Axes.set_box_aspect` for details.
+
+ forward_navigation_events : bool or "auto", default: "auto"
+ Control whether pan/zoom events are passed through to Axes below
+ this one. "auto" is *True* for axes with an invisible patch and
+ *False* otherwise.
+
+ **kwargs
+ Other optional keyword arguments:
+
+ %(Axes:kwdoc)s
+
+ Returns
+ -------
+ `~.axes.Axes`
+ The new `~.axes.Axes` object.
+ """
+
+ super().__init__()
+ if "rect" in kwargs:
+ if args:
+ raise TypeError(
+ "'rect' cannot be used together with positional arguments")
+ rect = kwargs.pop("rect")
+ _api.check_isinstance((mtransforms.Bbox, Iterable), rect=rect)
+ args = (rect,)
+ subplotspec = None
+ if len(args) == 1 and isinstance(args[0], mtransforms.Bbox):
+ self._position = args[0].frozen()
+ elif len(args) == 1 and np.iterable(args[0]):
+ self._position = mtransforms.Bbox.from_bounds(*args[0])
+ else:
+ self._position = self._originalPosition = mtransforms.Bbox.unit()
+ subplotspec = SubplotSpec._from_subplot_args(fig, args)
+ if self._position.width < 0 or self._position.height < 0:
+ raise ValueError('Width and height specified must be non-negative')
+ self._originalPosition = self._position.frozen()
+ self.axes = self
+ self._aspect = 'auto'
+ self._adjustable = 'box'
+ self._anchor = 'C'
+ self._stale_viewlims = dict.fromkeys(self._axis_names, False)
+ self._forward_navigation_events = forward_navigation_events
+ self._sharex = sharex
+ self._sharey = sharey
+ self.set_label(label)
+ self.set_figure(fig)
+ # The subplotspec needs to be set after the figure (so that
+ # figure-level subplotpars are taken into account), but the figure
+ # needs to be set after self._position is initialized.
+ if subplotspec:
+ self.set_subplotspec(subplotspec)
+ else:
+ self._subplotspec = None
+ self.set_box_aspect(box_aspect)
+ self._axes_locator = None # Optionally set via update(kwargs).
+
+ self._children = []
+
+ # placeholder for any colorbars added that use this Axes.
+ # (see colorbar.py):
+ self._colorbars = []
+ self.spines = mspines.Spines.from_dict(self._gen_axes_spines())
+
+ # this call may differ for non-sep axes, e.g., polar
+ self._init_axis()
+ if facecolor is None:
+ facecolor = mpl.rcParams['axes.facecolor']
+ self._facecolor = facecolor
+ self._frameon = frameon
+ self.set_axisbelow(mpl.rcParams['axes.axisbelow'])
+
+ self._rasterization_zorder = None
+ self.clear()
+
+ # funcs used to format x and y - fall back on major formatters
+ self.fmt_xdata = None
+ self.fmt_ydata = None
+
+ self.set_navigate(True)
+ self.set_navigate_mode(None)
+
+ if xscale:
+ self.set_xscale(xscale)
+ if yscale:
+ self.set_yscale(yscale)
+
+ self._internal_update(kwargs)
+
+ for name, axis in self._axis_map.items():
+ axis.callbacks._connect_picklable(
+ 'units', self._unit_change_handler(name))
+
+ rcParams = mpl.rcParams
+ self.tick_params(
+ top=rcParams['xtick.top'] and rcParams['xtick.minor.top'],
+ bottom=rcParams['xtick.bottom'] and rcParams['xtick.minor.bottom'],
+ labeltop=(rcParams['xtick.labeltop'] and
+ rcParams['xtick.minor.top']),
+ labelbottom=(rcParams['xtick.labelbottom'] and
+ rcParams['xtick.minor.bottom']),
+ left=rcParams['ytick.left'] and rcParams['ytick.minor.left'],
+ right=rcParams['ytick.right'] and rcParams['ytick.minor.right'],
+ labelleft=(rcParams['ytick.labelleft'] and
+ rcParams['ytick.minor.left']),
+ labelright=(rcParams['ytick.labelright'] and
+ rcParams['ytick.minor.right']),
+ which='minor')
+
+ self.tick_params(
+ top=rcParams['xtick.top'] and rcParams['xtick.major.top'],
+ bottom=rcParams['xtick.bottom'] and rcParams['xtick.major.bottom'],
+ labeltop=(rcParams['xtick.labeltop'] and
+ rcParams['xtick.major.top']),
+ labelbottom=(rcParams['xtick.labelbottom'] and
+ rcParams['xtick.major.bottom']),
+ left=rcParams['ytick.left'] and rcParams['ytick.major.left'],
+ right=rcParams['ytick.right'] and rcParams['ytick.major.right'],
+ labelleft=(rcParams['ytick.labelleft'] and
+ rcParams['ytick.major.left']),
+ labelright=(rcParams['ytick.labelright'] and
+ rcParams['ytick.major.right']),
+ which='major')
+
+ def __init_subclass__(cls, **kwargs):
+ parent_uses_cla = super(cls, cls)._subclass_uses_cla
+ if 'cla' in cls.__dict__:
+ _api.warn_deprecated(
+ '3.6',
+ pending=True,
+ message=f'Overriding `Axes.cla` in {cls.__qualname__} is '
+ 'pending deprecation in %(since)s and will be fully '
+ 'deprecated in favor of `Axes.clear` in the future. '
+ 'Please report '
+ f'this to the {cls.__module__!r} author.')
+ cls._subclass_uses_cla = 'cla' in cls.__dict__ or parent_uses_cla
+ super().__init_subclass__(**kwargs)
+
+ def __getstate__(self):
+ state = super().__getstate__()
+ # Prune the sharing & twinning info to only contain the current group.
+ state["_shared_axes"] = {
+ name: self._shared_axes[name].get_siblings(self)
+ for name in self._axis_names if self in self._shared_axes[name]}
+ state["_twinned_axes"] = (self._twinned_axes.get_siblings(self)
+ if self in self._twinned_axes else None)
+ return state
+
+ def __setstate__(self, state):
+ # Merge the grouping info back into the global groupers.
+ shared_axes = state.pop("_shared_axes")
+ for name, shared_siblings in shared_axes.items():
+ self._shared_axes[name].join(*shared_siblings)
+ twinned_siblings = state.pop("_twinned_axes")
+ if twinned_siblings:
+ self._twinned_axes.join(*twinned_siblings)
+ self.__dict__ = state
+ self._stale = True
+
+ def __repr__(self):
+ fields = []
+ if self.get_label():
+ fields += [f"label={self.get_label()!r}"]
+ if hasattr(self, "get_title"):
+ titles = {}
+ for k in ["left", "center", "right"]:
+ title = self.get_title(loc=k)
+ if title:
+ titles[k] = title
+ if titles:
+ fields += [f"title={titles}"]
+ for name, axis in self._axis_map.items():
+ if axis.label and axis.label.get_text():
+ fields += [f"{name}label={axis.label.get_text()!r}"]
+ return f"<{self.__class__.__name__}: " + ", ".join(fields) + ">"
+
+ def get_subplotspec(self):
+ """Return the `.SubplotSpec` associated with the subplot, or None."""
+ return self._subplotspec
+
+ def set_subplotspec(self, subplotspec):
+ """Set the `.SubplotSpec`. associated with the subplot."""
+ self._subplotspec = subplotspec
+ self._set_position(subplotspec.get_position(self.get_figure(root=False)))
+
+ def get_gridspec(self):
+ """Return the `.GridSpec` associated with the subplot, or None."""
+ return self._subplotspec.get_gridspec() if self._subplotspec else None
+
+ def get_window_extent(self, renderer=None):
+ """
+ Return the Axes bounding box in display space.
+
+ This bounding box does not include the spines, ticks, ticklabels,
+ or other labels. For a bounding box including these elements use
+ `~matplotlib.axes.Axes.get_tightbbox`.
+
+ See Also
+ --------
+ matplotlib.axes.Axes.get_tightbbox
+ matplotlib.axis.Axis.get_tightbbox
+ matplotlib.spines.Spine.get_window_extent
+ """
+ return self.bbox
+
+ def _init_axis(self):
+ # This is moved out of __init__ because non-separable axes don't use it
+ self.xaxis = maxis.XAxis(self, clear=False)
+ self.spines.bottom.register_axis(self.xaxis)
+ self.spines.top.register_axis(self.xaxis)
+ self.yaxis = maxis.YAxis(self, clear=False)
+ self.spines.left.register_axis(self.yaxis)
+ self.spines.right.register_axis(self.yaxis)
+
+ def set_figure(self, fig):
+ # docstring inherited
+ super().set_figure(fig)
+
+ self.bbox = mtransforms.TransformedBbox(self._position,
+ fig.transSubfigure)
+ # these will be updated later as data is added
+ self.dataLim = mtransforms.Bbox.null()
+ self._viewLim = mtransforms.Bbox.unit()
+ self.transScale = mtransforms.TransformWrapper(
+ mtransforms.IdentityTransform())
+
+ self._set_lim_and_transforms()
+
+ def _unstale_viewLim(self):
+ # We should arrange to store this information once per share-group
+ # instead of on every axis.
+ need_scale = {
+ name: any(ax._stale_viewlims[name]
+ for ax in self._shared_axes[name].get_siblings(self))
+ for name in self._axis_names}
+ if any(need_scale.values()):
+ for name in need_scale:
+ for ax in self._shared_axes[name].get_siblings(self):
+ ax._stale_viewlims[name] = False
+ self.autoscale_view(**{f"scale{name}": scale
+ for name, scale in need_scale.items()})
+
+ @property
+ def viewLim(self):
+ """The view limits as `.Bbox` in data coordinates."""
+ self._unstale_viewLim()
+ return self._viewLim
+
+ def _request_autoscale_view(self, axis="all", tight=None):
+ """
+ Mark a single axis, or all of them, as stale wrt. autoscaling.
+
+ No computation is performed until the next autoscaling; thus, separate
+ calls to control individual axises incur negligible performance cost.
+
+ Parameters
+ ----------
+ axis : str, default: "all"
+ Either an element of ``self._axis_names``, or "all".
+ tight : bool or None, default: None
+ """
+ axis_names = _api.check_getitem(
+ {**{k: [k] for k in self._axis_names}, "all": self._axis_names},
+ axis=axis)
+ for name in axis_names:
+ self._stale_viewlims[name] = True
+ if tight is not None:
+ self._tight = tight
+
+ def _set_lim_and_transforms(self):
+ """
+ Set the *_xaxis_transform*, *_yaxis_transform*, *transScale*,
+ *transData*, *transLimits* and *transAxes* transformations.
+
+ .. note::
+
+ This method is primarily used by rectilinear projections of the
+ `~matplotlib.axes.Axes` class, and is meant to be overridden by
+ new kinds of projection Axes that need different transformations
+ and limits. (See `~matplotlib.projections.polar.PolarAxes` for an
+ example.)
+ """
+ self.transAxes = mtransforms.BboxTransformTo(self.bbox)
+
+ # Transforms the x and y axis separately by a scale factor.
+ # It is assumed that this part will have non-linear components
+ # (e.g., for a log scale).
+ self.transScale = mtransforms.TransformWrapper(
+ mtransforms.IdentityTransform())
+
+ # An affine transformation on the data, generally to limit the
+ # range of the axes
+ self.transLimits = mtransforms.BboxTransformFrom(
+ mtransforms.TransformedBbox(self._viewLim, self.transScale))
+
+ # The parentheses are important for efficiency here -- they
+ # group the last two (which are usually affines) separately
+ # from the first (which, with log-scaling can be non-affine).
+ self.transData = self.transScale + (self.transLimits + self.transAxes)
+
+ self._xaxis_transform = mtransforms.blended_transform_factory(
+ self.transData, self.transAxes)
+ self._yaxis_transform = mtransforms.blended_transform_factory(
+ self.transAxes, self.transData)
+
+ def get_xaxis_transform(self, which='grid'):
+ """
+ Get the transformation used for drawing x-axis labels, ticks
+ and gridlines. The x-direction is in data coordinates and the
+ y-direction is in axis coordinates.
+
+ .. note::
+
+ This transformation is primarily used by the
+ `~matplotlib.axis.Axis` class, and is meant to be
+ overridden by new kinds of projections that may need to
+ place axis elements in different locations.
+
+ Parameters
+ ----------
+ which : {'grid', 'tick1', 'tick2'}
+ """
+ if which == 'grid':
+ return self._xaxis_transform
+ elif which == 'tick1':
+ # for cartesian projection, this is bottom spine
+ return self.spines.bottom.get_spine_transform()
+ elif which == 'tick2':
+ # for cartesian projection, this is top spine
+ return self.spines.top.get_spine_transform()
+ else:
+ raise ValueError(f'unknown value for which: {which!r}')
+
+ def get_xaxis_text1_transform(self, pad_points):
+ """
+ Returns
+ -------
+ transform : Transform
+ The transform used for drawing x-axis labels, which will add
+ *pad_points* of padding (in points) between the axis and the label.
+ The x-direction is in data coordinates and the y-direction is in
+ axis coordinates
+ valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
+ The text vertical alignment.
+ halign : {'center', 'left', 'right'}
+ The text horizontal alignment.
+
+ Notes
+ -----
+ This transformation is primarily used by the `~matplotlib.axis.Axis`
+ class, and is meant to be overridden by new kinds of projections that
+ may need to place axis elements in different locations.
+ """
+ labels_align = mpl.rcParams["xtick.alignment"]
+ return (self.get_xaxis_transform(which='tick1') +
+ mtransforms.ScaledTranslation(
+ 0, -1 * pad_points / 72,
+ self.get_figure(root=False).dpi_scale_trans),
+ "top", labels_align)
+
+ def get_xaxis_text2_transform(self, pad_points):
+ """
+ Returns
+ -------
+ transform : Transform
+ The transform used for drawing secondary x-axis labels, which will
+ add *pad_points* of padding (in points) between the axis and the
+ label. The x-direction is in data coordinates and the y-direction
+ is in axis coordinates
+ valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
+ The text vertical alignment.
+ halign : {'center', 'left', 'right'}
+ The text horizontal alignment.
+
+ Notes
+ -----
+ This transformation is primarily used by the `~matplotlib.axis.Axis`
+ class, and is meant to be overridden by new kinds of projections that
+ may need to place axis elements in different locations.
+ """
+ labels_align = mpl.rcParams["xtick.alignment"]
+ return (self.get_xaxis_transform(which='tick2') +
+ mtransforms.ScaledTranslation(
+ 0, pad_points / 72,
+ self.get_figure(root=False).dpi_scale_trans),
+ "bottom", labels_align)
+
+ def get_yaxis_transform(self, which='grid'):
+ """
+ Get the transformation used for drawing y-axis labels, ticks
+ and gridlines. The x-direction is in axis coordinates and the
+ y-direction is in data coordinates.
+
+ .. note::
+
+ This transformation is primarily used by the
+ `~matplotlib.axis.Axis` class, and is meant to be
+ overridden by new kinds of projections that may need to
+ place axis elements in different locations.
+
+ Parameters
+ ----------
+ which : {'grid', 'tick1', 'tick2'}
+ """
+ if which == 'grid':
+ return self._yaxis_transform
+ elif which == 'tick1':
+ # for cartesian projection, this is bottom spine
+ return self.spines.left.get_spine_transform()
+ elif which == 'tick2':
+ # for cartesian projection, this is top spine
+ return self.spines.right.get_spine_transform()
+ else:
+ raise ValueError(f'unknown value for which: {which!r}')
+
+ def get_yaxis_text1_transform(self, pad_points):
+ """
+ Returns
+ -------
+ transform : Transform
+ The transform used for drawing y-axis labels, which will add
+ *pad_points* of padding (in points) between the axis and the label.
+ The x-direction is in axis coordinates and the y-direction is in
+ data coordinates
+ valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
+ The text vertical alignment.
+ halign : {'center', 'left', 'right'}
+ The text horizontal alignment.
+
+ Notes
+ -----
+ This transformation is primarily used by the `~matplotlib.axis.Axis`
+ class, and is meant to be overridden by new kinds of projections that
+ may need to place axis elements in different locations.
+ """
+ labels_align = mpl.rcParams["ytick.alignment"]
+ return (self.get_yaxis_transform(which='tick1') +
+ mtransforms.ScaledTranslation(
+ -1 * pad_points / 72, 0,
+ self.get_figure(root=False).dpi_scale_trans),
+ labels_align, "right")
+
+ def get_yaxis_text2_transform(self, pad_points):
+ """
+ Returns
+ -------
+ transform : Transform
+ The transform used for drawing secondart y-axis labels, which will
+ add *pad_points* of padding (in points) between the axis and the
+ label. The x-direction is in axis coordinates and the y-direction
+ is in data coordinates
+ valign : {'center', 'top', 'bottom', 'baseline', 'center_baseline'}
+ The text vertical alignment.
+ halign : {'center', 'left', 'right'}
+ The text horizontal alignment.
+
+ Notes
+ -----
+ This transformation is primarily used by the `~matplotlib.axis.Axis`
+ class, and is meant to be overridden by new kinds of projections that
+ may need to place axis elements in different locations.
+ """
+ labels_align = mpl.rcParams["ytick.alignment"]
+ return (self.get_yaxis_transform(which='tick2') +
+ mtransforms.ScaledTranslation(
+ pad_points / 72, 0,
+ self.get_figure(root=False).dpi_scale_trans),
+ labels_align, "left")
+
+ def _update_transScale(self):
+ self.transScale.set(
+ mtransforms.blended_transform_factory(
+ self.xaxis.get_transform(), self.yaxis.get_transform()))
+
+ def get_position(self, original=False):
+ """
+ Return the position of the Axes within the figure as a `.Bbox`.
+
+ Parameters
+ ----------
+ original : bool
+ If ``True``, return the original position. Otherwise, return the
+ active position. For an explanation of the positions see
+ `.set_position`.
+
+ Returns
+ -------
+ `.Bbox`
+
+ """
+ if original:
+ return self._originalPosition.frozen()
+ else:
+ locator = self.get_axes_locator()
+ if not locator:
+ self.apply_aspect()
+ return self._position.frozen()
+
+ def set_position(self, pos, which='both'):
+ """
+ Set the Axes position.
+
+ Axes have two position attributes. The 'original' position is the
+ position allocated for the Axes. The 'active' position is the
+ position the Axes is actually drawn at. These positions are usually
+ the same unless a fixed aspect is set to the Axes. See
+ `.Axes.set_aspect` for details.
+
+ Parameters
+ ----------
+ pos : [left, bottom, width, height] or `~matplotlib.transforms.Bbox`
+ The new position of the Axes in `.Figure` coordinates.
+
+ which : {'both', 'active', 'original'}, default: 'both'
+ Determines which position variables to change.
+
+ See Also
+ --------
+ matplotlib.transforms.Bbox.from_bounds
+ matplotlib.transforms.Bbox.from_extents
+ """
+ self._set_position(pos, which=which)
+ # because this is being called externally to the library we
+ # don't let it be in the layout.
+ self.set_in_layout(False)
+
+ def _set_position(self, pos, which='both'):
+ """
+ Private version of set_position.
+
+ Call this internally to get the same functionality of `set_position`,
+ but not to take the axis out of the constrained_layout hierarchy.
+ """
+ if not isinstance(pos, mtransforms.BboxBase):
+ pos = mtransforms.Bbox.from_bounds(*pos)
+ for ax in self._twinned_axes.get_siblings(self):
+ if which in ('both', 'active'):
+ ax._position.set(pos)
+ if which in ('both', 'original'):
+ ax._originalPosition.set(pos)
+ self.stale = True
+
+ def reset_position(self):
+ """
+ Reset the active position to the original position.
+
+ This undoes changes to the active position (as defined in
+ `.set_position`) which may have been performed to satisfy fixed-aspect
+ constraints.
+ """
+ for ax in self._twinned_axes.get_siblings(self):
+ pos = ax.get_position(original=True)
+ ax.set_position(pos, which='active')
+
+ def set_axes_locator(self, locator):
+ """
+ Set the Axes locator.
+
+ Parameters
+ ----------
+ locator : Callable[[Axes, Renderer], Bbox]
+ """
+ self._axes_locator = locator
+ self.stale = True
+
+ def get_axes_locator(self):
+ """
+ Return the axes_locator.
+ """
+ return self._axes_locator
+
+ def _set_artist_props(self, a):
+ """Set the boilerplate props for artists added to Axes."""
+ a.set_figure(self.get_figure(root=False))
+ if not a.is_transform_set():
+ a.set_transform(self.transData)
+
+ a.axes = self
+ if a.get_mouseover():
+ self._mouseover_set.add(a)
+
+ def _gen_axes_patch(self):
+ """
+ Returns
+ -------
+ Patch
+ The patch used to draw the background of the Axes. It is also used
+ as the clipping path for any data elements on the Axes.
+
+ In the standard Axes, this is a rectangle, but in other projections
+ it may not be.
+
+ Notes
+ -----
+ Intended to be overridden by new projection types.
+ """
+ return mpatches.Rectangle((0.0, 0.0), 1.0, 1.0)
+
+ def _gen_axes_spines(self, locations=None, offset=0.0, units='inches'):
+ """
+ Returns
+ -------
+ dict
+ Mapping of spine names to `.Line2D` or `.Patch` instances that are
+ used to draw Axes spines.
+
+ In the standard Axes, spines are single line segments, but in other
+ projections they may not be.
+
+ Notes
+ -----
+ Intended to be overridden by new projection types.
+ """
+ return {side: mspines.Spine.linear_spine(self, side)
+ for side in ['left', 'right', 'bottom', 'top']}
+
+ def sharex(self, other):
+ """
+ Share the x-axis with *other*.
+
+ This is equivalent to passing ``sharex=other`` when constructing the
+ Axes, and cannot be used if the x-axis is already being shared with
+ another Axes. Note that it is not possible to unshare axes.
+ """
+ _api.check_isinstance(_AxesBase, other=other)
+ if self._sharex is not None and other is not self._sharex:
+ raise ValueError("x-axis is already shared")
+ self._shared_axes["x"].join(self, other)
+ self._sharex = other
+ self.xaxis.major = other.xaxis.major # Ticker instances holding
+ self.xaxis.minor = other.xaxis.minor # locator and formatter.
+ x0, x1 = other.get_xlim()
+ self.set_xlim(x0, x1, emit=False, auto=other.get_autoscalex_on())
+ self.xaxis._scale = other.xaxis._scale
+
+ def sharey(self, other):
+ """
+ Share the y-axis with *other*.
+
+ This is equivalent to passing ``sharey=other`` when constructing the
+ Axes, and cannot be used if the y-axis is already being shared with
+ another Axes. Note that it is not possible to unshare axes.
+ """
+ _api.check_isinstance(_AxesBase, other=other)
+ if self._sharey is not None and other is not self._sharey:
+ raise ValueError("y-axis is already shared")
+ self._shared_axes["y"].join(self, other)
+ self._sharey = other
+ self.yaxis.major = other.yaxis.major # Ticker instances holding
+ self.yaxis.minor = other.yaxis.minor # locator and formatter.
+ y0, y1 = other.get_ylim()
+ self.set_ylim(y0, y1, emit=False, auto=other.get_autoscaley_on())
+ self.yaxis._scale = other.yaxis._scale
+
+ def __clear(self):
+ """Clear the Axes."""
+ # The actual implementation of clear() as long as clear() has to be
+ # an adapter delegating to the correct implementation.
+ # The implementation can move back into clear() when the
+ # deprecation on cla() subclassing expires.
+
+ # stash the current visibility state
+ if hasattr(self, 'patch'):
+ patch_visible = self.patch.get_visible()
+ else:
+ patch_visible = True
+
+ xaxis_visible = self.xaxis.get_visible()
+ yaxis_visible = self.yaxis.get_visible()
+
+ for axis in self._axis_map.values():
+ axis.clear() # Also resets the scale to linear.
+ for spine in self.spines.values():
+ spine._clear() # Use _clear to not clear Axis again
+
+ self.ignore_existing_data_limits = True
+ self.callbacks = cbook.CallbackRegistry(
+ signals=["xlim_changed", "ylim_changed", "zlim_changed"])
+
+ # update the minor locator for x and y axis based on rcParams
+ if mpl.rcParams['xtick.minor.visible']:
+ self.xaxis.set_minor_locator(mticker.AutoMinorLocator())
+ if mpl.rcParams['ytick.minor.visible']:
+ self.yaxis.set_minor_locator(mticker.AutoMinorLocator())
+
+ self._xmargin = mpl.rcParams['axes.xmargin']
+ self._ymargin = mpl.rcParams['axes.ymargin']
+ self._tight = None
+ self._use_sticky_edges = True
+
+ self._get_lines = _process_plot_var_args()
+ self._get_patches_for_fill = _process_plot_var_args('Polygon')
+
+ self._gridOn = mpl.rcParams['axes.grid']
+ # Swap children to minimize time we spend in an invalid state
+ old_children, self._children = self._children, []
+ for chld in old_children:
+ chld._remove_method = None
+ chld._parent_figure = None
+ chld.axes = None
+ # Use list.clear to break the `artist._remove_method` reference cycle
+ old_children.clear()
+ self._mouseover_set = _OrderedSet()
+ self.child_axes = []
+ self._current_image = None # strictly for pyplot via _sci, _gci
+ self._projection_init = None # strictly for pyplot.subplot
+ self.legend_ = None
+ self.containers = []
+
+ self.grid(False) # Disable grid on init to use rcParameter
+ self.grid(self._gridOn, which=mpl.rcParams['axes.grid.which'],
+ axis=mpl.rcParams['axes.grid.axis'])
+ props = font_manager.FontProperties(
+ size=mpl.rcParams['axes.titlesize'],
+ weight=mpl.rcParams['axes.titleweight'])
+
+ y = mpl.rcParams['axes.titley']
+ if y is None:
+ y = 1.0
+ self._autotitlepos = True
+ else:
+ self._autotitlepos = False
+
+ self.title = mtext.Text(
+ x=0.5, y=y, text='',
+ fontproperties=props,
+ verticalalignment='baseline',
+ horizontalalignment='center',
+ )
+ self._left_title = mtext.Text(
+ x=0.0, y=y, text='',
+ fontproperties=props.copy(),
+ verticalalignment='baseline',
+ horizontalalignment='left', )
+ self._right_title = mtext.Text(
+ x=1.0, y=y, text='',
+ fontproperties=props.copy(),
+ verticalalignment='baseline',
+ horizontalalignment='right',
+ )
+ title_offset_points = mpl.rcParams['axes.titlepad']
+ # refactor this out so it can be called in ax.set_title if
+ # pad argument used...
+ self._set_title_offset_trans(title_offset_points)
+
+ for _title in (self.title, self._left_title, self._right_title):
+ self._set_artist_props(_title)
+
+ # The patch draws the background of the Axes. We want this to be below
+ # the other artists. We use the frame to draw the edges so we are
+ # setting the edgecolor to None.
+ self.patch = self._gen_axes_patch()
+ self.patch.set_figure(self.get_figure(root=False))
+ self.patch.set_facecolor(self._facecolor)
+ self.patch.set_edgecolor('none')
+ self.patch.set_linewidth(0)
+ self.patch.set_transform(self.transAxes)
+
+ self.set_axis_on()
+
+ self.xaxis.set_clip_path(self.patch)
+ self.yaxis.set_clip_path(self.patch)
+
+ if self._sharex is not None:
+ self.xaxis.set_visible(xaxis_visible)
+ self.patch.set_visible(patch_visible)
+ if self._sharey is not None:
+ self.yaxis.set_visible(yaxis_visible)
+ self.patch.set_visible(patch_visible)
+
+ # This comes last, as the call to _set_lim may trigger an autoscale (in
+ # case of shared axes), requiring children to be already set up.
+ for name, axis in self._axis_map.items():
+ share = getattr(self, f"_share{name}")
+ if share is not None:
+ getattr(self, f"share{name}")(share)
+ else:
+ # Although the scale was set to linear as part of clear,
+ # polar requires that _set_scale is called again
+ if self.name == "polar":
+ axis._set_scale("linear")
+ axis._set_lim(0, 1, auto=True)
+ self._update_transScale()
+
+ self.stale = True
+
+ def clear(self):
+ """Clear the Axes."""
+ # Act as an alias, or as the superclass implementation depending on the
+ # subclass implementation.
+ if self._subclass_uses_cla:
+ self.cla()
+ else:
+ self.__clear()
+
+ def cla(self):
+ """Clear the Axes."""
+ # Act as an alias, or as the superclass implementation depending on the
+ # subclass implementation.
+ if self._subclass_uses_cla:
+ self.__clear()
+ else:
+ self.clear()
+
+ class ArtistList(Sequence):
+ """
+ A sublist of Axes children based on their type.
+
+ The type-specific children sublists were made immutable in Matplotlib
+ 3.7. In the future these artist lists may be replaced by tuples. Use
+ as if this is a tuple already.
+ """
+ def __init__(self, axes, prop_name,
+ valid_types=None, invalid_types=None):
+ """
+ Parameters
+ ----------
+ axes : `~matplotlib.axes.Axes`
+ The Axes from which this sublist will pull the children
+ Artists.
+ prop_name : str
+ The property name used to access this sublist from the Axes;
+ used to generate deprecation warnings.
+ valid_types : list of type, optional
+ A list of types that determine which children will be returned
+ by this sublist. If specified, then the Artists in the sublist
+ must be instances of any of these types. If unspecified, then
+ any type of Artist is valid (unless limited by
+ *invalid_types*.)
+ invalid_types : tuple, optional
+ A list of types that determine which children will *not* be
+ returned by this sublist. If specified, then Artists in the
+ sublist will never be an instance of these types. Otherwise, no
+ types will be excluded.
+ """
+ self._axes = axes
+ self._prop_name = prop_name
+ self._type_check = lambda artist: (
+ (not valid_types or isinstance(artist, valid_types)) and
+ (not invalid_types or not isinstance(artist, invalid_types))
+ )
+
+ def __repr__(self):
+ return f''
+
+ def __len__(self):
+ return sum(self._type_check(artist)
+ for artist in self._axes._children)
+
+ def __iter__(self):
+ for artist in list(self._axes._children):
+ if self._type_check(artist):
+ yield artist
+
+ def __getitem__(self, key):
+ return [artist
+ for artist in self._axes._children
+ if self._type_check(artist)][key]
+
+ def __add__(self, other):
+ if isinstance(other, (list, _AxesBase.ArtistList)):
+ return [*self, *other]
+ if isinstance(other, (tuple, _AxesBase.ArtistList)):
+ return (*self, *other)
+ return NotImplemented
+
+ def __radd__(self, other):
+ if isinstance(other, list):
+ return other + list(self)
+ if isinstance(other, tuple):
+ return other + tuple(self)
+ return NotImplemented
+
+ @property
+ def artists(self):
+ return self.ArtistList(self, 'artists', invalid_types=(
+ mcoll.Collection, mimage.AxesImage, mlines.Line2D, mpatches.Patch,
+ mtable.Table, mtext.Text))
+
+ @property
+ def collections(self):
+ return self.ArtistList(self, 'collections',
+ valid_types=mcoll.Collection)
+
+ @property
+ def images(self):
+ return self.ArtistList(self, 'images', valid_types=mimage.AxesImage)
+
+ @property
+ def lines(self):
+ return self.ArtistList(self, 'lines', valid_types=mlines.Line2D)
+
+ @property
+ def patches(self):
+ return self.ArtistList(self, 'patches', valid_types=mpatches.Patch)
+
+ @property
+ def tables(self):
+ return self.ArtistList(self, 'tables', valid_types=mtable.Table)
+
+ @property
+ def texts(self):
+ return self.ArtistList(self, 'texts', valid_types=mtext.Text)
+
+ def get_facecolor(self):
+ """Get the facecolor of the Axes."""
+ return self.patch.get_facecolor()
+
+ def set_facecolor(self, color):
+ """
+ Set the facecolor of the Axes.
+
+ Parameters
+ ----------
+ color : :mpltype:`color`
+ """
+ self._facecolor = color
+ self.stale = True
+ return self.patch.set_facecolor(color)
+
+ def _set_title_offset_trans(self, title_offset_points):
+ """
+ Set the offset for the title either from :rc:`axes.titlepad`
+ or from set_title kwarg ``pad``.
+ """
+ self.titleOffsetTrans = mtransforms.ScaledTranslation(
+ 0.0, title_offset_points / 72,
+ self.get_figure(root=False).dpi_scale_trans)
+ for _title in (self.title, self._left_title, self._right_title):
+ _title.set_transform(self.transAxes + self.titleOffsetTrans)
+ _title.set_clip_box(None)
+
+ def set_prop_cycle(self, *args, **kwargs):
+ """
+ Set the property cycle of the Axes.
+
+ The property cycle controls the style properties such as color,
+ marker and linestyle of future plot commands. The style properties
+ of data already added to the Axes are not modified.
+
+ Call signatures::
+
+ set_prop_cycle(cycler)
+ set_prop_cycle(label=values, label2=values2, ...)
+ set_prop_cycle(label, values)
+
+ Form 1 sets given `~cycler.Cycler` object.
+
+ Form 2 creates a `~cycler.Cycler` which cycles over one or more
+ properties simultaneously and set it as the property cycle of the
+ Axes. If multiple properties are given, their value lists must have
+ the same length. This is just a shortcut for explicitly creating a
+ cycler and passing it to the function, i.e. it's short for
+ ``set_prop_cycle(cycler(label=values, label2=values2, ...))``.
+
+ Form 3 creates a `~cycler.Cycler` for a single property and set it
+ as the property cycle of the Axes. This form exists for compatibility
+ with the original `cycler.cycler` interface. Its use is discouraged
+ in favor of the kwarg form, i.e. ``set_prop_cycle(label=values)``.
+
+ Parameters
+ ----------
+ cycler : `~cycler.Cycler` or ``None``
+ Set the given Cycler. *None* resets to the cycle defined by the
+ current style.
+
+ .. ACCEPTS: `~cycler.Cycler`
+
+ label : str
+ The property key. Must be a valid `.Artist` property.
+ For example, 'color' or 'linestyle'. Aliases are allowed,
+ such as 'c' for 'color' and 'lw' for 'linewidth'.
+
+ values : iterable
+ Finite-length iterable of the property values. These values
+ are validated and will raise a ValueError if invalid.
+
+ See Also
+ --------
+ matplotlib.rcsetup.cycler
+ Convenience function for creating validated cyclers for properties.
+ cycler.cycler
+ The original function for creating unvalidated cyclers.
+
+ Examples
+ --------
+ Setting the property cycle for a single property:
+
+ >>> ax.set_prop_cycle(color=['red', 'green', 'blue'])
+
+ Setting the property cycle for simultaneously cycling over multiple
+ properties (e.g. red circle, green plus, blue cross):
+
+ >>> ax.set_prop_cycle(color=['red', 'green', 'blue'],
+ ... marker=['o', '+', 'x'])
+
+ """
+ if args and kwargs:
+ raise TypeError("Cannot supply both positional and keyword "
+ "arguments to this method.")
+ # Can't do `args == (None,)` as that crashes cycler.
+ if len(args) == 1 and args[0] is None:
+ prop_cycle = None
+ else:
+ prop_cycle = cycler(*args, **kwargs)
+ self._get_lines.set_prop_cycle(prop_cycle)
+ self._get_patches_for_fill.set_prop_cycle(prop_cycle)
+
+ def get_aspect(self):
+ """
+ Return the aspect ratio of the Axes scaling.
+
+ This is either "auto" or a float giving the ratio of y/x-scale.
+ """
+ return self._aspect
+
+ def set_aspect(self, aspect, adjustable=None, anchor=None, share=False):
+ """
+ Set the aspect ratio of the Axes scaling, i.e. y/x-scale.
+
+ Parameters
+ ----------
+ aspect : {'auto', 'equal'} or float
+ Possible values:
+
+ - 'auto': fill the position rectangle with data.
+ - 'equal': same as ``aspect=1``, i.e. same scaling for x and y.
+ - *float*: The displayed size of 1 unit in y-data coordinates will
+ be *aspect* times the displayed size of 1 unit in x-data
+ coordinates; e.g. for ``aspect=2`` a square in data coordinates
+ will be rendered with a height of twice its width.
+
+ adjustable : None or {'box', 'datalim'}, optional
+ If not ``None``, this defines which parameter will be adjusted to
+ meet the required aspect. See `.set_adjustable` for further
+ details.
+
+ anchor : None or str or (float, float), optional
+ If not ``None``, this defines where the Axes will be drawn if there
+ is extra space due to aspect constraints. The most common way
+ to specify the anchor are abbreviations of cardinal directions:
+
+ ===== =====================
+ value description
+ ===== =====================
+ 'C' centered
+ 'SW' lower left corner
+ 'S' middle of bottom edge
+ 'SE' lower right corner
+ etc.
+ ===== =====================
+
+ See `~.Axes.set_anchor` for further details.
+
+ share : bool, default: False
+ If ``True``, apply the settings to all shared Axes.
+
+ See Also
+ --------
+ matplotlib.axes.Axes.set_adjustable
+ Set how the Axes adjusts to achieve the required aspect ratio.
+ matplotlib.axes.Axes.set_anchor
+ Set the position in case of extra space.
+ """
+ if cbook._str_equal(aspect, 'equal'):
+ aspect = 1
+ if not cbook._str_equal(aspect, 'auto'):
+ aspect = float(aspect) # raise ValueError if necessary
+ if aspect <= 0 or not np.isfinite(aspect):
+ raise ValueError("aspect must be finite and positive ")
+
+ if share:
+ axes = {sibling for name in self._axis_names
+ for sibling in self._shared_axes[name].get_siblings(self)}
+ else:
+ axes = [self]
+
+ for ax in axes:
+ ax._aspect = aspect
+
+ if adjustable is None:
+ adjustable = self._adjustable
+ self.set_adjustable(adjustable, share=share) # Handle sharing.
+
+ if anchor is not None:
+ self.set_anchor(anchor, share=share)
+ self.stale = True
+
+ def get_adjustable(self):
+ """
+ Return whether the Axes will adjust its physical dimension ('box') or
+ its data limits ('datalim') to achieve the desired aspect ratio.
+
+ See Also
+ --------
+ matplotlib.axes.Axes.set_adjustable
+ Set how the Axes adjusts to achieve the required aspect ratio.
+ matplotlib.axes.Axes.set_aspect
+ For a description of aspect handling.
+ """
+ return self._adjustable
+
+ def set_adjustable(self, adjustable, share=False):
+ """
+ Set how the Axes adjusts to achieve the required aspect ratio.
+
+ Parameters
+ ----------
+ adjustable : {'box', 'datalim'}
+ If 'box', change the physical dimensions of the Axes.
+ If 'datalim', change the ``x`` or ``y`` data limits. This
+ may ignore explicitly defined axis limits.
+
+ share : bool, default: False
+ If ``True``, apply the settings to all shared Axes.
+
+ See Also
+ --------
+ matplotlib.axes.Axes.set_aspect
+ For a description of aspect handling.
+
+ Notes
+ -----
+ Shared Axes (of which twinned Axes are a special case)
+ impose restrictions on how aspect ratios can be imposed.
+ For twinned Axes, use 'datalim'. For Axes that share both
+ x and y, use 'box'. Otherwise, either 'datalim' or 'box'
+ may be used. These limitations are partly a requirement
+ to avoid over-specification, and partly a result of the
+ particular implementation we are currently using, in
+ which the adjustments for aspect ratios are done sequentially
+ and independently on each Axes as it is drawn.
+ """
+ _api.check_in_list(["box", "datalim"], adjustable=adjustable)
+ if share:
+ axs = {sibling for name in self._axis_names
+ for sibling in self._shared_axes[name].get_siblings(self)}
+ else:
+ axs = [self]
+ if (adjustable == "datalim"
+ and any(getattr(ax.get_data_ratio, "__func__", None)
+ != _AxesBase.get_data_ratio
+ for ax in axs)):
+ # Limits adjustment by apply_aspect assumes that the axes' aspect
+ # ratio can be computed from the data limits and scales.
+ raise ValueError("Cannot set Axes adjustable to 'datalim' for "
+ "Axes which override 'get_data_ratio'")
+ for ax in axs:
+ ax._adjustable = adjustable
+ self.stale = True
+
+ def get_box_aspect(self):
+ """
+ Return the Axes box aspect, i.e. the ratio of height to width.
+
+ The box aspect is ``None`` (i.e. chosen depending on the available
+ figure space) unless explicitly specified.
+
+ See Also
+ --------
+ matplotlib.axes.Axes.set_box_aspect
+ for a description of box aspect.
+ matplotlib.axes.Axes.set_aspect
+ for a description of aspect handling.
+ """
+ return self._box_aspect
+
+ def set_box_aspect(self, aspect=None):
+ """
+ Set the Axes box aspect, i.e. the ratio of height to width.
+
+ This defines the aspect of the Axes in figure space and is not to be
+ confused with the data aspect (see `~.Axes.set_aspect`).
+
+ Parameters
+ ----------
+ aspect : float or None
+ Changes the physical dimensions of the Axes, such that the ratio
+ of the Axes height to the Axes width in physical units is equal to
+ *aspect*. Defining a box aspect will change the *adjustable*
+ property to 'datalim' (see `~.Axes.set_adjustable`).
+
+ *None* will disable a fixed box aspect so that height and width
+ of the Axes are chosen independently.
+
+ See Also
+ --------
+ matplotlib.axes.Axes.set_aspect
+ for a description of aspect handling.
+ """
+ axs = {*self._twinned_axes.get_siblings(self),
+ *self._twinned_axes.get_siblings(self)}
+
+ if aspect is not None:
+ aspect = float(aspect)
+ # when box_aspect is set to other than ´None`,
+ # adjustable must be "datalim"
+ for ax in axs:
+ ax.set_adjustable("datalim")
+
+ for ax in axs:
+ ax._box_aspect = aspect
+ ax.stale = True
+
+ def get_anchor(self):
+ """
+ Get the anchor location.
+
+ See Also
+ --------
+ matplotlib.axes.Axes.set_anchor
+ for a description of the anchor.
+ matplotlib.axes.Axes.set_aspect
+ for a description of aspect handling.
+ """
+ return self._anchor
+
+ def set_anchor(self, anchor, share=False):
+ """
+ Define the anchor location.
+
+ The actual drawing area (active position) of the Axes may be smaller
+ than the Bbox (original position) when a fixed aspect is required. The
+ anchor defines where the drawing area will be located within the
+ available space.
+
+ Parameters
+ ----------
+ anchor : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
+ Either an (*x*, *y*) pair of relative coordinates (0 is left or
+ bottom, 1 is right or top), 'C' (center), or a cardinal direction
+ ('SW', southwest, is bottom left, etc.). str inputs are shorthands
+ for (*x*, *y*) coordinates, as shown in the following diagram::
+
+ ┌─────────────────┬─────────────────┬─────────────────�
+ │ 'NW' (0.0, 1.0) │ 'N' (0.5, 1.0) │ 'NE' (1.0, 1.0) │
+ ├─────────────────┼─────────────────┼─────────────────┤
+ │ 'W' (0.0, 0.5) │ 'C' (0.5, 0.5) │ 'E' (1.0, 0.5) │
+ ├─────────────────┼─────────────────┼─────────────────┤
+ │ 'SW' (0.0, 0.0) │ 'S' (0.5, 0.0) │ 'SE' (1.0, 0.0) │
+ └─────────────────┴─────────────────┴─────────────────┘
+
+ share : bool, default: False
+ If ``True``, apply the settings to all shared Axes.
+
+ See Also
+ --------
+ matplotlib.axes.Axes.set_aspect
+ for a description of aspect handling.
+ """
+ if not (anchor in mtransforms.Bbox.coefs or len(anchor) == 2):
+ raise ValueError('argument must be among %s' %
+ ', '.join(mtransforms.Bbox.coefs))
+ if share:
+ axes = {sibling for name in self._axis_names
+ for sibling in self._shared_axes[name].get_siblings(self)}
+ else:
+ axes = [self]
+ for ax in axes:
+ ax._anchor = anchor
+
+ self.stale = True
+
+ def get_data_ratio(self):
+ """
+ Return the aspect ratio of the scaled data.
+
+ Notes
+ -----
+ This method is intended to be overridden by new projection types.
+ """
+ txmin, txmax = self.xaxis.get_transform().transform(self.get_xbound())
+ tymin, tymax = self.yaxis.get_transform().transform(self.get_ybound())
+ xsize = max(abs(txmax - txmin), 1e-30)
+ ysize = max(abs(tymax - tymin), 1e-30)
+ return ysize / xsize
+
+ def apply_aspect(self, position=None):
+ """
+ Adjust the Axes for a specified data aspect ratio.
+
+ Depending on `.get_adjustable` this will modify either the
+ Axes box (position) or the view limits. In the former case,
+ `~matplotlib.axes.Axes.get_anchor` will affect the position.
+
+ Parameters
+ ----------
+ position : None or .Bbox
+
+ .. note::
+ This parameter exists for historic reasons and is considered
+ internal. End users should not use it.
+
+ If not ``None``, this defines the position of the
+ Axes within the figure as a Bbox. See `~.Axes.get_position`
+ for further details.
+
+ Notes
+ -----
+ This is called automatically when each Axes is drawn. You may need
+ to call it yourself if you need to update the Axes position and/or
+ view limits before the Figure is drawn.
+
+ An alternative with a broader scope is `.Figure.draw_without_rendering`,
+ which updates all stale components of a figure, not only the positioning /
+ view limits of a single Axes.
+
+ See Also
+ --------
+ matplotlib.axes.Axes.set_aspect
+ For a description of aspect ratio handling.
+ matplotlib.axes.Axes.set_adjustable
+ Set how the Axes adjusts to achieve the required aspect ratio.
+ matplotlib.axes.Axes.set_anchor
+ Set the position in case of extra space.
+ matplotlib.figure.Figure.draw_without_rendering
+ Update all stale components of a figure.
+
+ Examples
+ --------
+ A typical usage example would be the following. `~.Axes.imshow` sets the
+ aspect to 1, but adapting the Axes position and extent to reflect this is
+ deferred until rendering for performance reasons. If you want to know the
+ Axes size before, you need to call `.apply_aspect` to get the correct
+ values.
+
+ >>> fig, ax = plt.subplots()
+ >>> ax.imshow(np.zeros((3, 3)))
+ >>> ax.bbox.width, ax.bbox.height
+ (496.0, 369.59999999999997)
+ >>> ax.apply_aspect()
+ >>> ax.bbox.width, ax.bbox.height
+ (369.59999999999997, 369.59999999999997)
+ """
+ if position is None:
+ position = self.get_position(original=True)
+
+ aspect = self.get_aspect()
+
+ if aspect == 'auto' and self._box_aspect is None:
+ self._set_position(position, which='active')
+ return
+
+ trans = self.get_figure(root=False).transSubfigure
+ bb = mtransforms.Bbox.unit().transformed(trans)
+ # this is the physical aspect of the panel (or figure):
+ fig_aspect = bb.height / bb.width
+
+ if self._adjustable == 'box':
+ if self in self._twinned_axes:
+ raise RuntimeError("Adjustable 'box' is not allowed in a "
+ "twinned Axes; use 'datalim' instead")
+ box_aspect = aspect * self.get_data_ratio()
+ pb = position.frozen()
+ pb1 = pb.shrunk_to_aspect(box_aspect, pb, fig_aspect)
+ self._set_position(pb1.anchored(self.get_anchor(), pb), 'active')
+ return
+
+ # The following is only seen if self._adjustable == 'datalim'
+ if self._box_aspect is not None:
+ pb = position.frozen()
+ pb1 = pb.shrunk_to_aspect(self._box_aspect, pb, fig_aspect)
+ self._set_position(pb1.anchored(self.get_anchor(), pb), 'active')
+ if aspect == "auto":
+ return
+
+ # reset active to original in case it had been changed by prior use
+ # of 'box'
+ if self._box_aspect is None:
+ self._set_position(position, which='active')
+ else:
+ position = pb1.anchored(self.get_anchor(), pb)
+
+ x_trf = self.xaxis.get_transform()
+ y_trf = self.yaxis.get_transform()
+ xmin, xmax = x_trf.transform(self.get_xbound())
+ ymin, ymax = y_trf.transform(self.get_ybound())
+ xsize = max(abs(xmax - xmin), 1e-30)
+ ysize = max(abs(ymax - ymin), 1e-30)
+
+ box_aspect = fig_aspect * (position.height / position.width)
+ data_ratio = box_aspect / aspect
+
+ y_expander = data_ratio * xsize / ysize - 1
+ # If y_expander > 0, the dy/dx viewLim ratio needs to increase
+ if abs(y_expander) < 0.005:
+ return
+
+ dL = self.dataLim
+ x0, x1 = x_trf.transform(dL.intervalx)
+ y0, y1 = y_trf.transform(dL.intervaly)
+ xr = 1.05 * (x1 - x0)
+ yr = 1.05 * (y1 - y0)
+
+ xmarg = xsize - xr
+ ymarg = ysize - yr
+ Ysize = data_ratio * xsize
+ Xsize = ysize / data_ratio
+ Xmarg = Xsize - xr
+ Ymarg = Ysize - yr
+ # Setting these targets to, e.g., 0.05*xr does not seem to help.
+ xm = 0
+ ym = 0
+
+ shared_x = self in self._shared_axes["x"]
+ shared_y = self in self._shared_axes["y"]
+
+ if shared_x and shared_y:
+ raise RuntimeError("set_aspect(..., adjustable='datalim') or "
+ "axis('equal') are not allowed when both axes "
+ "are shared. Try set_aspect(..., "
+ "adjustable='box').")
+
+ # If y is shared, then we are only allowed to change x, etc.
+ if shared_y:
+ adjust_y = False
+ else:
+ if xmarg > xm and ymarg > ym:
+ adjy = ((Ymarg > 0 and y_expander < 0) or
+ (Xmarg < 0 and y_expander > 0))
+ else:
+ adjy = y_expander > 0
+ adjust_y = shared_x or adjy # (Ymarg > xmarg)
+
+ if adjust_y:
+ yc = 0.5 * (ymin + ymax)
+ y0 = yc - Ysize / 2.0
+ y1 = yc + Ysize / 2.0
+ if not self.get_autoscaley_on():
+ _log.warning("Ignoring fixed y limits to fulfill fixed data aspect "
+ "with adjustable data limits.")
+ self.set_ybound(y_trf.inverted().transform([y0, y1]))
+ else:
+ xc = 0.5 * (xmin + xmax)
+ x0 = xc - Xsize / 2.0
+ x1 = xc + Xsize / 2.0
+ if not self.get_autoscalex_on():
+ _log.warning("Ignoring fixed x limits to fulfill fixed data aspect "
+ "with adjustable data limits.")
+ self.set_xbound(x_trf.inverted().transform([x0, x1]))
+
+ def axis(self, arg=None, /, *, emit=True, **kwargs):
+ """
+ Convenience method to get or set some axis properties.
+
+ Call signatures::
+
+ xmin, xmax, ymin, ymax = axis()
+ xmin, xmax, ymin, ymax = axis([xmin, xmax, ymin, ymax])
+ xmin, xmax, ymin, ymax = axis(option)
+ xmin, xmax, ymin, ymax = axis(**kwargs)
+
+ Parameters
+ ----------
+ xmin, xmax, ymin, ymax : float, optional
+ The axis limits to be set. This can also be achieved using ::
+
+ ax.set(xlim=(xmin, xmax), ylim=(ymin, ymax))
+
+ option : bool or str
+ If a bool, turns axis lines and labels on or off. If a string,
+ possible values are:
+
+ ================ ===========================================================
+ Value Description
+ ================ ===========================================================
+ 'off' or `False` Hide all axis decorations, i.e. axis labels, spines,
+ tick marks, tick labels, and grid lines.
+ This is the same as `~.Axes.set_axis_off()`.
+ 'on' or `True` Do not hide all axis decorations, i.e. axis labels, spines,
+ tick marks, tick labels, and grid lines.
+ This is the same as `~.Axes.set_axis_on()`.
+ 'equal' Set equal scaling (i.e., make circles circular) by
+ changing the axis limits. This is the same as
+ ``ax.set_aspect('equal', adjustable='datalim')``.
+ Explicit data limits may not be respected in this case.
+ 'scaled' Set equal scaling (i.e., make circles circular) by
+ changing dimensions of the plot box. This is the same as
+ ``ax.set_aspect('equal', adjustable='box', anchor='C')``.
+ Additionally, further autoscaling will be disabled.
+ 'tight' Set limits just large enough to show all data, then
+ disable further autoscaling.
+ 'auto' Automatic scaling (fill plot box with data).
+ 'image' 'scaled' with axis limits equal to data limits.
+ 'square' Square plot; similar to 'scaled', but initially forcing
+ ``xmax-xmin == ymax-ymin``.
+ ================ ===========================================================
+
+ emit : bool, default: True
+ Whether observers are notified of the axis limit change.
+ This option is passed on to `~.Axes.set_xlim` and
+ `~.Axes.set_ylim`.
+
+ Returns
+ -------
+ xmin, xmax, ymin, ymax : float
+ The axis limits.
+
+ See Also
+ --------
+ matplotlib.axes.Axes.set_xlim
+ matplotlib.axes.Axes.set_ylim
+
+ Notes
+ -----
+ For 3D Axes, this method additionally takes *zmin*, *zmax* as
+ parameters and likewise returns them.
+ """
+ if isinstance(arg, (str, bool)):
+ if arg is True:
+ arg = 'on'
+ if arg is False:
+ arg = 'off'
+ arg = arg.lower()
+ if arg == 'on':
+ self.set_axis_on()
+ elif arg == 'off':
+ self.set_axis_off()
+ elif arg in [
+ 'equal', 'tight', 'scaled', 'auto', 'image', 'square']:
+ self.set_autoscale_on(True)
+ self.set_aspect('auto')
+ self.autoscale_view(tight=False)
+ if arg == 'equal':
+ self.set_aspect('equal', adjustable='datalim')
+ elif arg == 'scaled':
+ self.set_aspect('equal', adjustable='box', anchor='C')
+ self.set_autoscale_on(False) # Req. by Mark Bakker
+ elif arg == 'tight':
+ self.autoscale_view(tight=True)
+ self.set_autoscale_on(False)
+ elif arg == 'image':
+ self.autoscale_view(tight=True)
+ self.set_autoscale_on(False)
+ self.set_aspect('equal', adjustable='box', anchor='C')
+ elif arg == 'square':
+ self.set_aspect('equal', adjustable='box', anchor='C')
+ self.set_autoscale_on(False)
+ xlim = self.get_xlim()
+ ylim = self.get_ylim()
+ edge_size = max(np.diff(xlim), np.diff(ylim))[0]
+ self.set_xlim([xlim[0], xlim[0] + edge_size],
+ emit=emit, auto=False)
+ self.set_ylim([ylim[0], ylim[0] + edge_size],
+ emit=emit, auto=False)
+ else:
+ raise ValueError(f"Unrecognized string {arg!r} to axis; "
+ "try 'on' or 'off'")
+ else:
+ if arg is not None:
+ if len(arg) != 2*len(self._axis_names):
+ raise TypeError(
+ "The first argument to axis() must be an iterable of the form "
+ "[{}]".format(", ".join(
+ f"{name}min, {name}max" for name in self._axis_names)))
+ limits = {
+ name: arg[2*i:2*(i+1)]
+ for i, name in enumerate(self._axis_names)
+ }
+ else:
+ limits = {}
+ for name in self._axis_names:
+ ax_min = kwargs.pop(f'{name}min', None)
+ ax_max = kwargs.pop(f'{name}max', None)
+ limits[name] = (ax_min, ax_max)
+ for name, (ax_min, ax_max) in limits.items():
+ ax_auto = (None # Keep autoscale state as is.
+ if ax_min is None and ax_max is None
+ else False) # Turn off autoscale.
+ set_ax_lim = getattr(self, f'set_{name}lim')
+ set_ax_lim(ax_min, ax_max, emit=emit, auto=ax_auto)
+ if kwargs:
+ raise _api.kwarg_error("axis", kwargs)
+ lims = ()
+ for name in self._axis_names:
+ get_ax_lim = getattr(self, f'get_{name}lim')
+ lims += get_ax_lim()
+ return lims
+
+ def get_legend(self):
+ """Return the `.Legend` instance, or None if no legend is defined."""
+ return self.legend_
+
+ def get_images(self):
+ r"""Return a list of `.AxesImage`\s contained by the Axes."""
+ return cbook.silent_list('AxesImage', self.images)
+
+ def get_lines(self):
+ """Return a list of lines contained by the Axes."""
+ return cbook.silent_list('Line2D', self.lines)
+
+ def get_xaxis(self):
+ """
+ [*Discouraged*] Return the XAxis instance.
+
+ .. admonition:: Discouraged
+
+ The use of this function is discouraged. You should instead
+ directly access the attribute `~.Axes.xaxis`.
+ """
+ return self.xaxis
+
+ def get_yaxis(self):
+ """
+ [*Discouraged*] Return the YAxis instance.
+
+ .. admonition:: Discouraged
+
+ The use of this function is discouraged. You should instead
+ directly access the attribute `~.Axes.yaxis`.
+ """
+ return self.yaxis
+
+ get_xgridlines = _axis_method_wrapper("xaxis", "get_gridlines")
+ get_xticklines = _axis_method_wrapper("xaxis", "get_ticklines")
+ get_ygridlines = _axis_method_wrapper("yaxis", "get_gridlines")
+ get_yticklines = _axis_method_wrapper("yaxis", "get_ticklines")
+
+ # Adding and tracking artists
+
+ def _sci(self, im):
+ """
+ Set the current image.
+
+ This image will be the target of colormap functions like
+ ``pyplot.viridis``, and other functions such as `~.pyplot.clim`. The
+ current image is an attribute of the current Axes.
+ """
+ _api.check_isinstance((mcoll.Collection, mimage.AxesImage), im=im)
+ if im not in self._children:
+ raise ValueError("Argument must be an image or collection in this Axes")
+ self._current_image = im
+
+ def _gci(self):
+ """Helper for `~matplotlib.pyplot.gci`; do not use elsewhere."""
+ return self._current_image
+
+ def has_data(self):
+ """
+ Return whether any artists have been added to the Axes.
+
+ This should not be used to determine whether the *dataLim*
+ need to be updated, and may not actually be useful for
+ anything.
+ """
+ return any(isinstance(a, (mcoll.Collection, mimage.AxesImage,
+ mlines.Line2D, mpatches.Patch))
+ for a in self._children)
+
+ def add_artist(self, a):
+ """
+ Add an `.Artist` to the Axes; return the artist.
+
+ Use `add_artist` only for artists for which there is no dedicated
+ "add" method; and if necessary, use a method such as `update_datalim`
+ to manually update the `~.Axes.dataLim` if the artist is to be included
+ in autoscaling.
+
+ If no ``transform`` has been specified when creating the artist (e.g.
+ ``artist.get_transform() == None``) then the transform is set to
+ ``ax.transData``.
+ """
+ a.axes = self
+ self._children.append(a)
+ a._remove_method = self._children.remove
+ self._set_artist_props(a)
+ if a.get_clip_path() is None:
+ a.set_clip_path(self.patch)
+ self.stale = True
+ return a
+
+ def add_child_axes(self, ax):
+ """
+ Add an `.Axes` to the Axes' children; return the child Axes.
+
+ This is the lowlevel version. See `.axes.Axes.inset_axes`.
+ """
+
+ # normally Axes have themselves as the Axes, but these need to have
+ # their parent...
+ # Need to bypass the getter...
+ ax._axes = self
+ ax.stale_callback = martist._stale_axes_callback
+
+ self.child_axes.append(ax)
+ ax._remove_method = functools.partial(
+ self.get_figure(root=False)._remove_axes, owners=[self.child_axes])
+ self.stale = True
+ return ax
+
+ def add_collection(self, collection, autolim=True):
+ """
+ Add a `.Collection` to the Axes; return the collection.
+ """
+ _api.check_isinstance(mcoll.Collection, collection=collection)
+ if not collection.get_label():
+ collection.set_label(f'_child{len(self._children)}')
+ self._children.append(collection)
+ collection._remove_method = self._children.remove
+ self._set_artist_props(collection)
+
+ if collection.get_clip_path() is None:
+ collection.set_clip_path(self.patch)
+
+ if autolim:
+ # Make sure viewLim is not stale (mostly to match
+ # pre-lazy-autoscale behavior, which is not really better).
+ self._unstale_viewLim()
+ datalim = collection.get_datalim(self.transData)
+ points = datalim.get_points()
+ if not np.isinf(datalim.minpos).all():
+ # By definition, if minpos (minimum positive value) is set
+ # (i.e., non-inf), then min(points) <= minpos <= max(points),
+ # and minpos would be superfluous. However, we add minpos to
+ # the call so that self.dataLim will update its own minpos.
+ # This ensures that log scales see the correct minimum.
+ points = np.concatenate([points, [datalim.minpos]])
+ # only update the dataLim for x/y if the collection uses transData
+ # in this direction.
+ x_is_data, y_is_data = (collection.get_transform()
+ .contains_branch_seperately(self.transData))
+ ox_is_data, oy_is_data = (collection.get_offset_transform()
+ .contains_branch_seperately(self.transData))
+ self.update_datalim(
+ points,
+ updatex=x_is_data or ox_is_data,
+ updatey=y_is_data or oy_is_data,
+ )
+
+ self.stale = True
+ return collection
+
+ def add_image(self, image):
+ """
+ Add an `.AxesImage` to the Axes; return the image.
+ """
+ _api.check_isinstance(mimage.AxesImage, image=image)
+ self._set_artist_props(image)
+ if not image.get_label():
+ image.set_label(f'_child{len(self._children)}')
+ self._children.append(image)
+ image._remove_method = self._children.remove
+ self.stale = True
+ return image
+
+ def _update_image_limits(self, image):
+ xmin, xmax, ymin, ymax = image.get_extent()
+ self.axes.update_datalim(((xmin, ymin), (xmax, ymax)))
+
+ def add_line(self, line):
+ """
+ Add a `.Line2D` to the Axes; return the line.
+ """
+ _api.check_isinstance(mlines.Line2D, line=line)
+ self._set_artist_props(line)
+ if line.get_clip_path() is None:
+ line.set_clip_path(self.patch)
+
+ self._update_line_limits(line)
+ if not line.get_label():
+ line.set_label(f'_child{len(self._children)}')
+ self._children.append(line)
+ line._remove_method = self._children.remove
+ self.stale = True
+ return line
+
+ def _add_text(self, txt):
+ """
+ Add a `.Text` to the Axes; return the text.
+ """
+ _api.check_isinstance(mtext.Text, txt=txt)
+ self._set_artist_props(txt)
+ self._children.append(txt)
+ txt._remove_method = self._children.remove
+ self.stale = True
+ return txt
+
+ def _update_line_limits(self, line):
+ """
+ Figures out the data limit of the given line, updating `.Axes.dataLim`.
+ """
+ path = line.get_path()
+ if path.vertices.size == 0:
+ return
+
+ line_trf = line.get_transform()
+
+ if line_trf == self.transData:
+ data_path = path
+ elif any(line_trf.contains_branch_seperately(self.transData)):
+ # Compute the transform from line coordinates to data coordinates.
+ trf_to_data = line_trf - self.transData
+ # If transData is affine we can use the cached non-affine component
+ # of line's path (since the non-affine part of line_trf is
+ # entirely encapsulated in trf_to_data).
+ if self.transData.is_affine:
+ line_trans_path = line._get_transformed_path()
+ na_path, _ = line_trans_path.get_transformed_path_and_affine()
+ data_path = trf_to_data.transform_path_affine(na_path)
+ else:
+ data_path = trf_to_data.transform_path(path)
+ else:
+ # For backwards compatibility we update the dataLim with the
+ # coordinate range of the given path, even though the coordinate
+ # systems are completely different. This may occur in situations
+ # such as when ax.transAxes is passed through for absolute
+ # positioning.
+ data_path = path
+
+ if not data_path.vertices.size:
+ return
+
+ updatex, updatey = line_trf.contains_branch_seperately(self.transData)
+ if self.name != "rectilinear":
+ # This block is mostly intended to handle axvline in polar plots,
+ # for which updatey would otherwise be True.
+ if updatex and line_trf == self.get_yaxis_transform():
+ updatex = False
+ if updatey and line_trf == self.get_xaxis_transform():
+ updatey = False
+ self.dataLim.update_from_path(data_path,
+ self.ignore_existing_data_limits,
+ updatex=updatex, updatey=updatey)
+ self.ignore_existing_data_limits = False
+
+ def add_patch(self, p):
+ """
+ Add a `.Patch` to the Axes; return the patch.
+ """
+ _api.check_isinstance(mpatches.Patch, p=p)
+ self._set_artist_props(p)
+ if p.get_clip_path() is None:
+ p.set_clip_path(self.patch)
+ self._update_patch_limits(p)
+ self._children.append(p)
+ p._remove_method = self._children.remove
+ return p
+
+ def _update_patch_limits(self, patch):
+ """Update the data limits for the given patch."""
+ # hist can add zero height Rectangles, which is useful to keep
+ # the bins, counts and patches lined up, but it throws off log
+ # scaling. We'll ignore rects with zero height or width in
+ # the auto-scaling
+
+ # cannot check for '==0' since unitized data may not compare to zero
+ # issue #2150 - we update the limits if patch has non zero width
+ # or height.
+ if (isinstance(patch, mpatches.Rectangle) and
+ ((not patch.get_width()) and (not patch.get_height()))):
+ return
+ p = patch.get_path()
+ # Get all vertices on the path
+ # Loop through each segment to get extrema for Bezier curve sections
+ vertices = []
+ for curve, code in p.iter_bezier(simplify=False):
+ # Get distance along the curve of any extrema
+ _, dzeros = curve.axis_aligned_extrema()
+ # Calculate vertices of start, end and any extrema in between
+ vertices.append(curve([0, *dzeros, 1]))
+
+ if len(vertices):
+ vertices = np.vstack(vertices)
+
+ patch_trf = patch.get_transform()
+ updatex, updatey = patch_trf.contains_branch_seperately(self.transData)
+ if not (updatex or updatey):
+ return
+ if self.name != "rectilinear":
+ # As in _update_line_limits, but for axvspan.
+ if updatex and patch_trf == self.get_yaxis_transform():
+ updatex = False
+ if updatey and patch_trf == self.get_xaxis_transform():
+ updatey = False
+ trf_to_data = patch_trf - self.transData
+ xys = trf_to_data.transform(vertices)
+ self.update_datalim(xys, updatex=updatex, updatey=updatey)
+
+ def add_table(self, tab):
+ """
+ Add a `.Table` to the Axes; return the table.
+ """
+ _api.check_isinstance(mtable.Table, tab=tab)
+ self._set_artist_props(tab)
+ self._children.append(tab)
+ if tab.get_clip_path() is None:
+ tab.set_clip_path(self.patch)
+ tab._remove_method = self._children.remove
+ return tab
+
+ def add_container(self, container):
+ """
+ Add a `.Container` to the Axes' containers; return the container.
+ """
+ label = container.get_label()
+ if not label:
+ container.set_label('_container%d' % len(self.containers))
+ self.containers.append(container)
+ container._remove_method = self.containers.remove
+ return container
+
+ def _unit_change_handler(self, axis_name, event=None):
+ """
+ Process axis units changes: requests updates to data and view limits.
+ """
+ if event is None: # Allow connecting `self._unit_change_handler(name)`
+ return functools.partial(
+ self._unit_change_handler, axis_name, event=object())
+ _api.check_in_list(self._axis_map, axis_name=axis_name)
+ for line in self.lines:
+ line.recache_always()
+ self.relim()
+ self._request_autoscale_view(axis_name)
+
+ def relim(self, visible_only=False):
+ """
+ Recompute the data limits based on current artists.
+
+ At present, `.Collection` instances are not supported.
+
+ Parameters
+ ----------
+ visible_only : bool, default: False
+ Whether to exclude invisible artists.
+ """
+ # Collections are deliberately not supported (yet); see
+ # the TODO note in artists.py.
+ self.dataLim.ignore(True)
+ self.dataLim.set_points(mtransforms.Bbox.null().get_points())
+ self.ignore_existing_data_limits = True
+
+ for artist in self._children:
+ if not visible_only or artist.get_visible():
+ if isinstance(artist, mlines.Line2D):
+ self._update_line_limits(artist)
+ elif isinstance(artist, mpatches.Patch):
+ self._update_patch_limits(artist)
+ elif isinstance(artist, mimage.AxesImage):
+ self._update_image_limits(artist)
+
+ def update_datalim(self, xys, updatex=True, updatey=True):
+ """
+ Extend the `~.Axes.dataLim` Bbox to include the given points.
+
+ If no data is set currently, the Bbox will ignore its limits and set
+ the bound to be the bounds of the xydata (*xys*). Otherwise, it will
+ compute the bounds of the union of its current data and the data in
+ *xys*.
+
+ Parameters
+ ----------
+ xys : 2D array-like
+ The points to include in the data limits Bbox. This can be either
+ a list of (x, y) tuples or a (N, 2) array.
+
+ updatex, updatey : bool, default: True
+ Whether to update the x/y limits.
+ """
+ xys = np.asarray(xys)
+ if not np.any(np.isfinite(xys)):
+ return
+ self.dataLim.update_from_data_xy(xys, self.ignore_existing_data_limits,
+ updatex=updatex, updatey=updatey)
+ self.ignore_existing_data_limits = False
+
+ def _process_unit_info(self, datasets=None, kwargs=None, *, convert=True):
+ """
+ Set axis units based on *datasets* and *kwargs*, and optionally apply
+ unit conversions to *datasets*.
+
+ Parameters
+ ----------
+ datasets : list
+ List of (axis_name, dataset) pairs (where the axis name is defined
+ as in `._axis_map`). Individual datasets can also be None
+ (which gets passed through).
+ kwargs : dict
+ Other parameters from which unit info (i.e., the *xunits*,
+ *yunits*, *zunits* (for 3D Axes), *runits* and *thetaunits* (for
+ polar) entries) is popped, if present. Note that this dict is
+ mutated in-place!
+ convert : bool, default: True
+ Whether to return the original datasets or the converted ones.
+
+ Returns
+ -------
+ list
+ Either the original datasets if *convert* is False, or the
+ converted ones if *convert* is True (the default).
+ """
+ # The API makes datasets a list of pairs rather than an axis_name to
+ # dataset mapping because it is sometimes necessary to process multiple
+ # datasets for a single axis, and concatenating them may be tricky
+ # (e.g. if some are scalars, etc.).
+ datasets = datasets or []
+ kwargs = kwargs or {}
+ axis_map = self._axis_map
+ for axis_name, data in datasets:
+ try:
+ axis = axis_map[axis_name]
+ except KeyError:
+ raise ValueError(f"Invalid axis name: {axis_name!r}") from None
+ # Update from data if axis is already set but no unit is set yet.
+ if axis is not None and data is not None and not axis.have_units():
+ axis.update_units(data)
+ for axis_name, axis in axis_map.items():
+ # Return if no axis is set.
+ if axis is None:
+ continue
+ # Check for units in the kwargs, and if present update axis.
+ units = kwargs.pop(f"{axis_name}units", axis.units)
+ if self.name == "polar":
+ # Special case: polar supports "thetaunits"/"runits".
+ polar_units = {"x": "thetaunits", "y": "runits"}
+ units = kwargs.pop(polar_units[axis_name], units)
+ if units != axis.units and units is not None:
+ axis.set_units(units)
+ # If the units being set imply a different converter,
+ # we need to update again.
+ for dataset_axis_name, data in datasets:
+ if dataset_axis_name == axis_name and data is not None:
+ axis.update_units(data)
+ return [axis_map[axis_name].convert_units(data)
+ if convert and data is not None else data
+ for axis_name, data in datasets]
+
+ def in_axes(self, mouseevent):
+ """
+ Return whether the given event (in display coords) is in the Axes.
+ """
+ return self.patch.contains(mouseevent)[0]
+
+ get_autoscalex_on = _axis_method_wrapper("xaxis", "_get_autoscale_on")
+ get_autoscaley_on = _axis_method_wrapper("yaxis", "_get_autoscale_on")
+ set_autoscalex_on = _axis_method_wrapper("xaxis", "_set_autoscale_on")
+ set_autoscaley_on = _axis_method_wrapper("yaxis", "_set_autoscale_on")
+
+ def get_autoscale_on(self):
+ """Return True if each axis is autoscaled, False otherwise."""
+ return all(axis._get_autoscale_on()
+ for axis in self._axis_map.values())
+
+ def set_autoscale_on(self, b):
+ """
+ Set whether autoscaling is applied to each axis on the next draw or
+ call to `.Axes.autoscale_view`.
+
+ Parameters
+ ----------
+ b : bool
+ """
+ for axis in self._axis_map.values():
+ axis._set_autoscale_on(b)
+
+ @property
+ def use_sticky_edges(self):
+ """
+ When autoscaling, whether to obey all `.Artist.sticky_edges`.
+
+ Default is ``True``.
+
+ Setting this to ``False`` ensures that the specified margins
+ will be applied, even if the plot includes an image, for
+ example, which would otherwise force a view limit to coincide
+ with its data limit.
+
+ The changing this property does not change the plot until
+ `autoscale` or `autoscale_view` is called.
+ """
+ return self._use_sticky_edges
+
+ @use_sticky_edges.setter
+ def use_sticky_edges(self, b):
+ self._use_sticky_edges = bool(b)
+ # No effect until next autoscaling, which will mark the Axes as stale.
+
+ def get_xmargin(self):
+ """
+ Retrieve autoscaling margin of the x-axis.
+
+ .. versionadded:: 3.9
+
+ Returns
+ -------
+ xmargin : float
+
+ See Also
+ --------
+ matplotlib.axes.Axes.set_xmargin
+ """
+ return self._xmargin
+
+ def get_ymargin(self):
+ """
+ Retrieve autoscaling margin of the y-axis.
+
+ .. versionadded:: 3.9
+
+ Returns
+ -------
+ ymargin : float
+
+ See Also
+ --------
+ matplotlib.axes.Axes.set_ymargin
+ """
+ return self._ymargin
+
+ def set_xmargin(self, m):
+ """
+ Set padding of X data limits prior to autoscaling.
+
+ *m* times the data interval will be added to each end of that interval
+ before it is used in autoscaling. If *m* is negative, this will clip
+ the data range instead of expanding it.
+
+ For example, if your data is in the range [0, 2], a margin of 0.1 will
+ result in a range [-0.2, 2.2]; a margin of -0.1 will result in a range
+ of [0.2, 1.8].
+
+ Parameters
+ ----------
+ m : float greater than -0.5
+ """
+ if m <= -0.5:
+ raise ValueError("margin must be greater than -0.5")
+ self._xmargin = m
+ self._request_autoscale_view("x")
+ self.stale = True
+
+ def set_ymargin(self, m):
+ """
+ Set padding of Y data limits prior to autoscaling.
+
+ *m* times the data interval will be added to each end of that interval
+ before it is used in autoscaling. If *m* is negative, this will clip
+ the data range instead of expanding it.
+
+ For example, if your data is in the range [0, 2], a margin of 0.1 will
+ result in a range [-0.2, 2.2]; a margin of -0.1 will result in a range
+ of [0.2, 1.8].
+
+ Parameters
+ ----------
+ m : float greater than -0.5
+ """
+ if m <= -0.5:
+ raise ValueError("margin must be greater than -0.5")
+ self._ymargin = m
+ self._request_autoscale_view("y")
+ self.stale = True
+
+ def margins(self, *margins, x=None, y=None, tight=True):
+ """
+ Set or retrieve margins around the data for autoscaling axis limits.
+
+ This allows to configure the padding around the data without having to
+ set explicit limits using `~.Axes.set_xlim` / `~.Axes.set_ylim`.
+
+ Autoscaling determines the axis limits by adding *margin* times the
+ data interval as padding around the data. See the following illustration:
+
+ .. plot:: _embedded_plots/axes_margins.py
+
+ All input parameters must be floats greater than -0.5. Passing both
+ positional and keyword arguments is invalid and will raise a TypeError.
+ If no arguments (positional or otherwise) are provided, the current
+ margins will remain unchanged and simply be returned.
+
+ The default margins are :rc:`axes.xmargin` and :rc:`axes.ymargin`.
+
+ Parameters
+ ----------
+ *margins : float, optional
+ If a single positional argument is provided, it specifies
+ both margins of the x-axis and y-axis limits. If two
+ positional arguments are provided, they will be interpreted
+ as *xmargin*, *ymargin*. If setting the margin on a single
+ axis is desired, use the keyword arguments described below.
+
+ x, y : float, optional
+ Specific margin values for the x-axis and y-axis,
+ respectively. These cannot be used with positional
+ arguments, but can be used individually to alter on e.g.,
+ only the y-axis.
+
+ tight : bool or None, default: True
+ The *tight* parameter is passed to `~.axes.Axes.autoscale_view`,
+ which is executed after a margin is changed; the default
+ here is *True*, on the assumption that when margins are
+ specified, no additional padding to match tick marks is
+ usually desired. Setting *tight* to *None* preserves
+ the previous setting.
+
+ Returns
+ -------
+ xmargin, ymargin : float
+
+ Notes
+ -----
+ If a previously used Axes method such as :meth:`pcolor` has set
+ `~.Axes.use_sticky_edges` to `True`, only the limits not set by
+ the "sticky artists" will be modified. To force all
+ margins to be set, set `~.Axes.use_sticky_edges` to `False`
+ before calling :meth:`margins`.
+
+ See Also
+ --------
+ .Axes.set_xmargin, .Axes.set_ymargin
+ """
+
+ if margins and (x is not None or y is not None):
+ raise TypeError('Cannot pass both positional and keyword '
+ 'arguments for x and/or y.')
+ elif len(margins) == 1:
+ x = y = margins[0]
+ elif len(margins) == 2:
+ x, y = margins
+ elif margins:
+ raise TypeError('Must pass a single positional argument for all '
+ 'margins, or one for each margin (x, y).')
+
+ if x is None and y is None:
+ if tight is not True:
+ _api.warn_external(f'ignoring tight={tight!r} in get mode')
+ return self._xmargin, self._ymargin
+
+ if tight is not None:
+ self._tight = tight
+ if x is not None:
+ self.set_xmargin(x)
+ if y is not None:
+ self.set_ymargin(y)
+
+ def set_rasterization_zorder(self, z):
+ """
+ Set the zorder threshold for rasterization for vector graphics output.
+
+ All artists with a zorder below the given value will be rasterized if
+ they support rasterization.
+
+ This setting is ignored for pixel-based output.
+
+ See also :doc:`/gallery/misc/rasterization_demo`.
+
+ Parameters
+ ----------
+ z : float or None
+ The zorder below which artists are rasterized.
+ If ``None`` rasterization based on zorder is deactivated.
+ """
+ self._rasterization_zorder = z
+ self.stale = True
+
+ def get_rasterization_zorder(self):
+ """Return the zorder value below which artists will be rasterized."""
+ return self._rasterization_zorder
+
+ def autoscale(self, enable=True, axis='both', tight=None):
+ """
+ Autoscale the axis view to the data (toggle).
+
+ Convenience method for simple axis view autoscaling.
+ It turns autoscaling on or off, and then,
+ if autoscaling for either axis is on, it performs
+ the autoscaling on the specified axis or Axes.
+
+ Parameters
+ ----------
+ enable : bool or None, default: True
+ True turns autoscaling on, False turns it off.
+ None leaves the autoscaling state unchanged.
+ axis : {'both', 'x', 'y'}, default: 'both'
+ The axis on which to operate. (For 3D Axes, *axis* can also be set
+ to 'z', and 'both' refers to all three Axes.)
+ tight : bool or None, default: None
+ If True, first set the margins to zero. Then, this argument is
+ forwarded to `~.axes.Axes.autoscale_view` (regardless of
+ its value); see the description of its behavior there.
+ """
+ if enable is None:
+ scalex = True
+ scaley = True
+ else:
+ if axis in ['x', 'both']:
+ self.set_autoscalex_on(bool(enable))
+ scalex = self.get_autoscalex_on()
+ else:
+ scalex = False
+ if axis in ['y', 'both']:
+ self.set_autoscaley_on(bool(enable))
+ scaley = self.get_autoscaley_on()
+ else:
+ scaley = False
+ if tight and scalex:
+ self._xmargin = 0
+ if tight and scaley:
+ self._ymargin = 0
+ if scalex:
+ self._request_autoscale_view("x", tight=tight)
+ if scaley:
+ self._request_autoscale_view("y", tight=tight)
+
+ def autoscale_view(self, tight=None, scalex=True, scaley=True):
+ """
+ Autoscale the view limits using the data limits.
+
+ Parameters
+ ----------
+ tight : bool or None
+ If *True*, only expand the axis limits using the margins. Note
+ that unlike for `autoscale`, ``tight=True`` does *not* set the
+ margins to zero.
+
+ If *False* and :rc:`axes.autolimit_mode` is 'round_numbers', then
+ after expansion by the margins, further expand the axis limits
+ using the axis major locator.
+
+ If None (the default), reuse the value set in the previous call to
+ `autoscale_view` (the initial value is False, but the default style
+ sets :rc:`axes.autolimit_mode` to 'data', in which case this
+ behaves like True).
+
+ scalex : bool, default: True
+ Whether to autoscale the x-axis.
+
+ scaley : bool, default: True
+ Whether to autoscale the y-axis.
+
+ Notes
+ -----
+ The autoscaling preserves any preexisting axis direction reversal.
+
+ The data limits are not updated automatically when artist data are
+ changed after the artist has been added to an Axes instance. In that
+ case, use :meth:`matplotlib.axes.Axes.relim` prior to calling
+ autoscale_view.
+
+ If the views of the Axes are fixed, e.g. via `set_xlim`, they will
+ not be changed by autoscale_view().
+ See :meth:`matplotlib.axes.Axes.autoscale` for an alternative.
+ """
+ if tight is not None:
+ self._tight = bool(tight)
+
+ x_stickies = y_stickies = np.array([])
+ if self.use_sticky_edges:
+ if self._xmargin and scalex and self.get_autoscalex_on():
+ x_stickies = np.sort(np.concatenate([
+ artist.sticky_edges.x
+ for ax in self._shared_axes["x"].get_siblings(self)
+ for artist in ax.get_children()]))
+ if self._ymargin and scaley and self.get_autoscaley_on():
+ y_stickies = np.sort(np.concatenate([
+ artist.sticky_edges.y
+ for ax in self._shared_axes["y"].get_siblings(self)
+ for artist in ax.get_children()]))
+ if self.get_xscale() == 'log':
+ x_stickies = x_stickies[x_stickies > 0]
+ if self.get_yscale() == 'log':
+ y_stickies = y_stickies[y_stickies > 0]
+
+ def handle_single_axis(
+ scale, shared_axes, name, axis, margin, stickies, set_bound):
+
+ if not (scale and axis._get_autoscale_on()):
+ return # nothing to do...
+
+ shared = shared_axes.get_siblings(self)
+ # Base autoscaling on finite data limits when there is at least one
+ # finite data limit among all the shared_axes and intervals.
+ values = [val for ax in shared
+ for val in getattr(ax.dataLim, f"interval{name}")
+ if np.isfinite(val)]
+ if values:
+ x0, x1 = (min(values), max(values))
+ elif getattr(self._viewLim, f"mutated{name}")():
+ # No data, but explicit viewLims already set:
+ # in mutatedx or mutatedy.
+ return
+ else:
+ x0, x1 = (-np.inf, np.inf)
+ # If x0 and x1 are nonfinite, get default limits from the locator.
+ locator = axis.get_major_locator()
+ x0, x1 = locator.nonsingular(x0, x1)
+ # Find the minimum minpos for use in the margin calculation.
+ minimum_minpos = min(
+ getattr(ax.dataLim, f"minpos{name}") for ax in shared)
+
+ # Prevent margin addition from crossing a sticky value. A small
+ # tolerance must be added due to floating point issues with
+ # streamplot; it is defined relative to x1-x0 but has
+ # no absolute term (e.g. "+1e-8") to avoid issues when working with
+ # datasets where all values are tiny (less than 1e-8).
+ tol = 1e-5 * abs(x1 - x0)
+ # Index of largest element < x0 + tol, if any.
+ i0 = stickies.searchsorted(x0 + tol) - 1
+ x0bound = stickies[i0] if i0 != -1 else None
+ # Index of smallest element > x1 - tol, if any.
+ i1 = stickies.searchsorted(x1 - tol)
+ x1bound = stickies[i1] if i1 != len(stickies) else None
+
+ # Add the margin in figure space and then transform back, to handle
+ # non-linear scales.
+ transform = axis.get_transform()
+ inverse_trans = transform.inverted()
+ x0, x1 = axis._scale.limit_range_for_scale(x0, x1, minimum_minpos)
+ x0t, x1t = transform.transform([x0, x1])
+ delta = (x1t - x0t) * margin
+ if not np.isfinite(delta):
+ delta = 0 # If a bound isn't finite, set margin to zero.
+ x0, x1 = inverse_trans.transform([x0t - delta, x1t + delta])
+
+ # Apply sticky bounds.
+ if x0bound is not None:
+ x0 = max(x0, x0bound)
+ if x1bound is not None:
+ x1 = min(x1, x1bound)
+
+ if not self._tight:
+ x0, x1 = locator.view_limits(x0, x1)
+ set_bound(x0, x1)
+ # End of definition of internal function 'handle_single_axis'.
+
+ handle_single_axis(
+ scalex, self._shared_axes["x"], 'x', self.xaxis, self._xmargin,
+ x_stickies, self.set_xbound)
+ handle_single_axis(
+ scaley, self._shared_axes["y"], 'y', self.yaxis, self._ymargin,
+ y_stickies, self.set_ybound)
+
+ def _update_title_position(self, renderer):
+ """
+ Update the title position based on the bounding box enclosing
+ all the ticklabels and x-axis spine and xlabel...
+ """
+ if self._autotitlepos is not None and not self._autotitlepos:
+ _log.debug('title position was updated manually, not adjusting')
+ return
+
+ titles = (self.title, self._left_title, self._right_title)
+
+ if not any(title.get_text() for title in titles):
+ # If the titles are all empty, there is no need to update their positions.
+ return
+
+ # Need to check all our twins too, aligned axes, and all the children
+ # as well.
+ axs = set()
+ axs.update(self.child_axes)
+ axs.update(self._twinned_axes.get_siblings(self))
+ axs.update(
+ self.get_figure(root=False)._align_label_groups['title'].get_siblings(self))
+
+ for ax in self.child_axes: # Child positions must be updated first.
+ locator = ax.get_axes_locator()
+ ax.apply_aspect(locator(self, renderer) if locator else None)
+
+ top = -np.inf
+ for ax in axs:
+ bb = None
+ if (ax.xaxis.get_ticks_position() in ['top', 'unknown'] or
+ ax.xaxis.get_label_position() == 'top'):
+ bb = ax.xaxis.get_tightbbox(renderer)
+ if bb is None:
+ # Extent of the outline for colorbars, of the axes otherwise.
+ bb = ax.spines.get("outline", ax).get_window_extent()
+ top = max(top, bb.ymax)
+
+ for title in titles:
+ x, _ = title.get_position()
+ # need to start again in case of window resizing
+ title.set_position((x, 1.0))
+ if title.get_text():
+ for ax in axs:
+ ax.yaxis.get_tightbbox(renderer) # update offsetText
+ if ax.yaxis.offsetText.get_text():
+ bb = ax.yaxis.offsetText.get_tightbbox(renderer)
+ if bb.intersection(title.get_tightbbox(renderer), bb):
+ top = bb.ymax
+ if top < 0:
+ # the top of Axes is not even on the figure, so don't try and
+ # automatically place it.
+ _log.debug('top of Axes not in the figure, so title not moved')
+ return
+ if title.get_window_extent(renderer).ymin < top:
+ _, y = self.transAxes.inverted().transform((0, top))
+ title.set_position((x, y))
+ # empirically, this doesn't always get the min to top,
+ # so we need to adjust again.
+ if title.get_window_extent(renderer).ymin < top:
+ _, y = self.transAxes.inverted().transform(
+ (0., 2 * top - title.get_window_extent(renderer).ymin))
+ title.set_position((x, y))
+
+ ymax = max(title.get_position()[1] for title in titles)
+ for title in titles:
+ # now line up all the titles at the highest baseline.
+ x, _ = title.get_position()
+ title.set_position((x, ymax))
+
+ # Drawing
+ @martist.allow_rasterization
+ def draw(self, renderer):
+ # docstring inherited
+ if renderer is None:
+ raise RuntimeError('No renderer defined')
+ if not self.get_visible():
+ return
+ self._unstale_viewLim()
+
+ renderer.open_group('axes', gid=self.get_gid())
+
+ # prevent triggering call backs during the draw process
+ self._stale = True
+
+ # loop over self and child Axes...
+ locator = self.get_axes_locator()
+ self.apply_aspect(locator(self, renderer) if locator else None)
+
+ artists = self.get_children()
+ artists.remove(self.patch)
+
+ # the frame draws the edges around the Axes patch -- we
+ # decouple these so the patch can be in the background and the
+ # frame in the foreground. Do this before drawing the axis
+ # objects so that the spine has the opportunity to update them.
+ if not (self.axison and self._frameon):
+ for spine in self.spines.values():
+ artists.remove(spine)
+
+ self._update_title_position(renderer)
+
+ if not self.axison:
+ for _axis in self._axis_map.values():
+ artists.remove(_axis)
+
+ if not self.get_figure(root=True).canvas.is_saving():
+ artists = [
+ a for a in artists
+ if not a.get_animated() or isinstance(a, mimage.AxesImage)]
+ artists = sorted(artists, key=attrgetter('zorder'))
+
+ # rasterize artists with negative zorder
+ # if the minimum zorder is negative, start rasterization
+ rasterization_zorder = self._rasterization_zorder
+
+ if (rasterization_zorder is not None and
+ artists and artists[0].zorder < rasterization_zorder):
+ split_index = np.searchsorted(
+ [art.zorder for art in artists],
+ rasterization_zorder, side='right'
+ )
+ artists_rasterized = artists[:split_index]
+ artists = artists[split_index:]
+ else:
+ artists_rasterized = []
+
+ if self.axison and self._frameon:
+ if artists_rasterized:
+ artists_rasterized = [self.patch] + artists_rasterized
+ else:
+ artists = [self.patch] + artists
+
+ if artists_rasterized:
+ _draw_rasterized(self.get_figure(root=True), artists_rasterized, renderer)
+
+ mimage._draw_list_compositing_images(
+ renderer, self, artists, self.get_figure(root=True).suppressComposite)
+
+ renderer.close_group('axes')
+ self.stale = False
+
+ def draw_artist(self, a):
+ """
+ Efficiently redraw a single artist.
+ """
+ a.draw(self.get_figure(root=True).canvas.get_renderer())
+
+ def redraw_in_frame(self):
+ """
+ Efficiently redraw Axes data, but not axis ticks, labels, etc.
+ """
+ with ExitStack() as stack:
+ for artist in [*self._axis_map.values(),
+ self.title, self._left_title, self._right_title]:
+ stack.enter_context(artist._cm_set(visible=False))
+ self.draw(self.get_figure(root=True).canvas.get_renderer())
+
+ # Axes rectangle characteristics
+
+ def get_frame_on(self):
+ """Get whether the Axes rectangle patch is drawn."""
+ return self._frameon
+
+ def set_frame_on(self, b):
+ """
+ Set whether the Axes rectangle patch is drawn.
+
+ Parameters
+ ----------
+ b : bool
+ """
+ self._frameon = b
+ self.stale = True
+
+ def get_axisbelow(self):
+ """
+ Get whether axis ticks and gridlines are above or below most artists.
+
+ Returns
+ -------
+ bool or 'line'
+
+ See Also
+ --------
+ set_axisbelow
+ """
+ return self._axisbelow
+
+ def set_axisbelow(self, b):
+ """
+ Set whether axis ticks and gridlines are above or below most artists.
+
+ This controls the zorder of the ticks and gridlines. For more
+ information on the zorder see :doc:`/gallery/misc/zorder_demo`.
+
+ Parameters
+ ----------
+ b : bool or 'line'
+ Possible values:
+
+ - *True* (zorder = 0.5): Ticks and gridlines are below patches and
+ lines, though still above images.
+ - 'line' (zorder = 1.5): Ticks and gridlines are above patches
+ (e.g. rectangles, with default zorder = 1) but still below lines
+ and markers (with their default zorder = 2).
+ - *False* (zorder = 2.5): Ticks and gridlines are above patches
+ and lines / markers.
+
+ Notes
+ -----
+ For more control, call the `~.Artist.set_zorder` method of each axis.
+
+ See Also
+ --------
+ get_axisbelow
+ """
+ # Check that b is True, False or 'line'
+ self._axisbelow = axisbelow = validate_axisbelow(b)
+ zorder = {
+ True: 0.5,
+ 'line': 1.5,
+ False: 2.5,
+ }[axisbelow]
+ for axis in self._axis_map.values():
+ axis.set_zorder(zorder)
+ self.stale = True
+
+ @_docstring.interpd
+ def grid(self, visible=None, which='major', axis='both', **kwargs):
+ """
+ Configure the grid lines.
+
+ Parameters
+ ----------
+ visible : bool or None, optional
+ Whether to show the grid lines. If any *kwargs* are supplied, it
+ is assumed you want the grid on and *visible* will be set to True.
+
+ If *visible* is *None* and there are no *kwargs*, this toggles the
+ visibility of the lines.
+
+ which : {'major', 'minor', 'both'}, optional
+ The grid lines to apply the changes on.
+
+ axis : {'both', 'x', 'y'}, optional
+ The axis to apply the changes on.
+
+ **kwargs : `~matplotlib.lines.Line2D` properties
+ Define the line properties of the grid, e.g.::
+
+ grid(color='r', linestyle='-', linewidth=2)
+
+ Valid keyword arguments are:
+
+ %(Line2D:kwdoc)s
+
+ Notes
+ -----
+ The axis is drawn as a unit, so the effective zorder for drawing the
+ grid is determined by the zorder of each axis, not by the zorder of the
+ `.Line2D` objects comprising the grid. Therefore, to set grid zorder,
+ use `.set_axisbelow` or, for more control, call the
+ `~.Artist.set_zorder` method of each axis.
+ """
+ _api.check_in_list(['x', 'y', 'both'], axis=axis)
+ if axis in ['x', 'both']:
+ self.xaxis.grid(visible, which=which, **kwargs)
+ if axis in ['y', 'both']:
+ self.yaxis.grid(visible, which=which, **kwargs)
+
+ def ticklabel_format(self, *, axis='both', style=None, scilimits=None,
+ useOffset=None, useLocale=None, useMathText=None):
+ r"""
+ Configure the `.ScalarFormatter` used by default for linear Axes.
+
+ If a parameter is not set, the corresponding property of the formatter
+ is left unchanged.
+
+ Parameters
+ ----------
+ axis : {'x', 'y', 'both'}, default: 'both'
+ The axis to configure. Only major ticks are affected.
+
+ style : {'sci', 'scientific', 'plain'}
+ Whether to use scientific notation.
+ The formatter default is to use scientific notation.
+ 'sci' is equivalent to 'scientific'.
+
+ scilimits : pair of ints (m, n)
+ Scientific notation is used only for numbers outside the range
+ 10\ :sup:`m` to 10\ :sup:`n` (and only if the formatter is
+ configured to use scientific notation at all). Use (0, 0) to
+ include all numbers. Use (m, m) where m != 0 to fix the order of
+ magnitude to 10\ :sup:`m`.
+ The formatter default is :rc:`axes.formatter.limits`.
+
+ useOffset : bool or float
+ If True, the offset is calculated as needed.
+ If False, no offset is used.
+ If a numeric value, it sets the offset.
+ The formatter default is :rc:`axes.formatter.useoffset`.
+
+ useLocale : bool
+ Whether to format the number using the current locale or using the
+ C (English) locale. This affects e.g. the decimal separator. The
+ formatter default is :rc:`axes.formatter.use_locale`.
+
+ useMathText : bool
+ Render the offset and scientific notation in mathtext.
+ The formatter default is :rc:`axes.formatter.use_mathtext`.
+
+ Raises
+ ------
+ AttributeError
+ If the current formatter is not a `.ScalarFormatter`.
+ """
+ if isinstance(style, str):
+ style = style.lower()
+ axis = axis.lower()
+ if scilimits is not None:
+ try:
+ m, n = scilimits
+ m + n + 1 # check that both are numbers
+ except (ValueError, TypeError) as err:
+ raise ValueError("scilimits must be a sequence of 2 integers"
+ ) from err
+ STYLES = {'sci': True, 'scientific': True, 'plain': False, '': None, None: None}
+ # The '' option is included for backwards-compatibility.
+ is_sci_style = _api.check_getitem(STYLES, style=style)
+ axis_map = {**{k: [v] for k, v in self._axis_map.items()},
+ 'both': list(self._axis_map.values())}
+ axises = _api.check_getitem(axis_map, axis=axis)
+ try:
+ for axis in axises:
+ if is_sci_style is not None:
+ axis.major.formatter.set_scientific(is_sci_style)
+ if scilimits is not None:
+ axis.major.formatter.set_powerlimits(scilimits)
+ if useOffset is not None:
+ axis.major.formatter.set_useOffset(useOffset)
+ if useLocale is not None:
+ axis.major.formatter.set_useLocale(useLocale)
+ if useMathText is not None:
+ axis.major.formatter.set_useMathText(useMathText)
+ except AttributeError as err:
+ raise AttributeError(
+ "This method only works with the ScalarFormatter") from err
+
+ def locator_params(self, axis='both', tight=None, **kwargs):
+ """
+ Control behavior of major tick locators.
+
+ Because the locator is involved in autoscaling, `~.Axes.autoscale_view`
+ is called automatically after the parameters are changed.
+
+ Parameters
+ ----------
+ axis : {'both', 'x', 'y'}, default: 'both'
+ The axis on which to operate. (For 3D Axes, *axis* can also be
+ set to 'z', and 'both' refers to all three axes.)
+ tight : bool or None, optional
+ Parameter passed to `~.Axes.autoscale_view`.
+ Default is None, for no change.
+
+ Other Parameters
+ ----------------
+ **kwargs
+ Remaining keyword arguments are passed to directly to the
+ ``set_params()`` method of the locator. Supported keywords depend
+ on the type of the locator. See for example
+ `~.ticker.MaxNLocator.set_params` for the `.ticker.MaxNLocator`
+ used by default for linear.
+
+ Examples
+ --------
+ When plotting small subplots, one might want to reduce the maximum
+ number of ticks and use tight bounds, for example::
+
+ ax.locator_params(tight=True, nbins=4)
+
+ """
+ _api.check_in_list([*self._axis_names, "both"], axis=axis)
+ for name in self._axis_names:
+ if axis in [name, "both"]:
+ loc = self._axis_map[name].get_major_locator()
+ loc.set_params(**kwargs)
+ self._request_autoscale_view(name, tight=tight)
+ self.stale = True
+
+ def tick_params(self, axis='both', **kwargs):
+ """
+ Change the appearance of ticks, tick labels, and gridlines.
+
+ Tick properties that are not explicitly set using the keyword
+ arguments remain unchanged unless *reset* is True. For the current
+ style settings, see `.Axis.get_tick_params`.
+
+ Parameters
+ ----------
+ axis : {'x', 'y', 'both'}, default: 'both'
+ The axis to which the parameters are applied.
+ which : {'major', 'minor', 'both'}, default: 'major'
+ The group of ticks to which the parameters are applied.
+ reset : bool, default: False
+ Whether to reset the ticks to defaults before updating them.
+
+ Other Parameters
+ ----------------
+ direction : {'in', 'out', 'inout'}
+ Puts ticks inside the Axes, outside the Axes, or both.
+ length : float
+ Tick length in points.
+ width : float
+ Tick width in points.
+ color : :mpltype:`color`
+ Tick color.
+ pad : float
+ Distance in points between tick and label.
+ labelsize : float or str
+ Tick label font size in points or as a string (e.g., 'large').
+ labelcolor : :mpltype:`color`
+ Tick label color.
+ labelfontfamily : str
+ Tick label font.
+ colors : :mpltype:`color`
+ Tick color and label color.
+ zorder : float
+ Tick and label zorder.
+ bottom, top, left, right : bool
+ Whether to draw the respective ticks.
+ labelbottom, labeltop, labelleft, labelright : bool
+ Whether to draw the respective tick labels.
+ labelrotation : float
+ Tick label rotation
+ grid_color : :mpltype:`color`
+ Gridline color.
+ grid_alpha : float
+ Transparency of gridlines: 0 (transparent) to 1 (opaque).
+ grid_linewidth : float
+ Width of gridlines in points.
+ grid_linestyle : str
+ Any valid `.Line2D` line style spec.
+
+ Examples
+ --------
+ ::
+
+ ax.tick_params(direction='out', length=6, width=2, colors='r',
+ grid_color='r', grid_alpha=0.5)
+
+ This will make all major ticks be red, pointing out of the box,
+ and with dimensions 6 points by 2 points. Tick labels will
+ also be red. Gridlines will be red and translucent.
+
+ """
+ _api.check_in_list(['x', 'y', 'both'], axis=axis)
+ if axis in ['x', 'both']:
+ xkw = dict(kwargs)
+ xkw.pop('left', None)
+ xkw.pop('right', None)
+ xkw.pop('labelleft', None)
+ xkw.pop('labelright', None)
+ self.xaxis.set_tick_params(**xkw)
+ if axis in ['y', 'both']:
+ ykw = dict(kwargs)
+ ykw.pop('top', None)
+ ykw.pop('bottom', None)
+ ykw.pop('labeltop', None)
+ ykw.pop('labelbottom', None)
+ self.yaxis.set_tick_params(**ykw)
+
+ def set_axis_off(self):
+ """
+ Hide all visual components of the x- and y-axis.
+
+ This sets a flag to suppress drawing of all axis decorations, i.e.
+ axis labels, axis spines, and the axis tick component (tick markers,
+ tick labels, and grid lines). Individual visibility settings of these
+ components are ignored as long as `set_axis_off()` is in effect.
+ """
+ self.axison = False
+ self.stale = True
+
+ def set_axis_on(self):
+ """
+ Do not hide all visual components of the x- and y-axis.
+
+ This reverts the effect of a prior `.set_axis_off()` call. Whether the
+ individual axis decorations are drawn is controlled by their respective
+ visibility settings.
+
+ This is on by default.
+ """
+ self.axison = True
+ self.stale = True
+
+ # data limits, ticks, tick labels, and formatting
+
+ def get_xlabel(self):
+ """
+ Get the xlabel text string.
+ """
+ label = self.xaxis.label
+ return label.get_text()
+
+ def set_xlabel(self, xlabel, fontdict=None, labelpad=None, *,
+ loc=None, **kwargs):
+ """
+ Set the label for the x-axis.
+
+ Parameters
+ ----------
+ xlabel : str
+ The label text.
+
+ labelpad : float, default: :rc:`axes.labelpad`
+ Spacing in points from the Axes bounding box including ticks
+ and tick labels. If None, the previous value is left as is.
+
+ loc : {'left', 'center', 'right'}, default: :rc:`xaxis.labellocation`
+ The label position. This is a high-level alternative for passing
+ parameters *x* and *horizontalalignment*.
+
+ Other Parameters
+ ----------------
+ **kwargs : `~matplotlib.text.Text` properties
+ `.Text` properties control the appearance of the label.
+
+ See Also
+ --------
+ text : Documents the properties supported by `.Text`.
+ """
+ if labelpad is not None:
+ self.xaxis.labelpad = labelpad
+ protected_kw = ['x', 'horizontalalignment', 'ha']
+ if {*kwargs} & {*protected_kw}:
+ if loc is not None:
+ raise TypeError(f"Specifying 'loc' is disallowed when any of "
+ f"its corresponding low level keyword "
+ f"arguments ({protected_kw}) are also "
+ f"supplied")
+
+ else:
+ loc = (loc if loc is not None
+ else mpl.rcParams['xaxis.labellocation'])
+ _api.check_in_list(('left', 'center', 'right'), loc=loc)
+
+ x = {
+ 'left': 0,
+ 'center': 0.5,
+ 'right': 1,
+ }[loc]
+ kwargs.update(x=x, horizontalalignment=loc)
+
+ return self.xaxis.set_label_text(xlabel, fontdict, **kwargs)
+
+ def invert_xaxis(self):
+ """
+ Invert the x-axis.
+
+ See Also
+ --------
+ xaxis_inverted
+ get_xlim, set_xlim
+ get_xbound, set_xbound
+ """
+ self.xaxis.set_inverted(not self.xaxis.get_inverted())
+
+ xaxis_inverted = _axis_method_wrapper("xaxis", "get_inverted")
+
+ def get_xbound(self):
+ """
+ Return the lower and upper x-axis bounds, in increasing order.
+
+ See Also
+ --------
+ set_xbound
+ get_xlim, set_xlim
+ invert_xaxis, xaxis_inverted
+ """
+ left, right = self.get_xlim()
+ if left < right:
+ return left, right
+ else:
+ return right, left
+
+ def set_xbound(self, lower=None, upper=None):
+ """
+ Set the lower and upper numerical bounds of the x-axis.
+
+ This method will honor axis inversion regardless of parameter order.
+ It will not change the autoscaling setting (`.get_autoscalex_on()`).
+
+ Parameters
+ ----------
+ lower, upper : float or None
+ The lower and upper bounds. If *None*, the respective axis bound
+ is not modified.
+
+ .. ACCEPTS: (lower: float, upper: float)
+
+ See Also
+ --------
+ get_xbound
+ get_xlim, set_xlim
+ invert_xaxis, xaxis_inverted
+ """
+ if upper is None and np.iterable(lower):
+ lower, upper = lower
+
+ old_lower, old_upper = self.get_xbound()
+ if lower is None:
+ lower = old_lower
+ if upper is None:
+ upper = old_upper
+
+ self.set_xlim(sorted((lower, upper),
+ reverse=bool(self.xaxis_inverted())),
+ auto=None)
+
+ def get_xlim(self):
+ """
+ Return the x-axis view limits.
+
+ Returns
+ -------
+ left, right : (float, float)
+ The current x-axis limits in data coordinates.
+
+ See Also
+ --------
+ .Axes.set_xlim
+ .Axes.set_xbound, .Axes.get_xbound
+ .Axes.invert_xaxis, .Axes.xaxis_inverted
+
+ Notes
+ -----
+ The x-axis may be inverted, in which case the *left* value will
+ be greater than the *right* value.
+ """
+ return tuple(self.viewLim.intervalx)
+
+ def _validate_converted_limits(self, limit, convert):
+ """
+ Raise ValueError if converted limits are non-finite.
+
+ Note that this function also accepts None as a limit argument.
+
+ Returns
+ -------
+ The limit value after call to convert(), or None if limit is None.
+ """
+ if limit is not None:
+ converted_limit = convert(limit)
+ if isinstance(converted_limit, np.ndarray):
+ converted_limit = converted_limit.squeeze()
+ if (isinstance(converted_limit, Real)
+ and not np.isfinite(converted_limit)):
+ raise ValueError("Axis limits cannot be NaN or Inf")
+ return converted_limit
+
+ def set_xlim(self, left=None, right=None, *, emit=True, auto=False,
+ xmin=None, xmax=None):
+ """
+ Set the x-axis view limits.
+
+ Parameters
+ ----------
+ left : float, optional
+ The left xlim in data coordinates. Passing *None* leaves the
+ limit unchanged.
+
+ The left and right xlims may also be passed as the tuple
+ (*left*, *right*) as the first positional argument (or as
+ the *left* keyword argument).
+
+ .. ACCEPTS: (left: float, right: float)
+
+ right : float, optional
+ The right xlim in data coordinates. Passing *None* leaves the
+ limit unchanged.
+
+ emit : bool, default: True
+ Whether to notify observers of limit change.
+
+ auto : bool or None, default: False
+ Whether to turn on autoscaling of the x-axis. True turns on,
+ False turns off, None leaves unchanged.
+
+ xmin, xmax : float, optional
+ They are equivalent to left and right respectively, and it is an
+ error to pass both *xmin* and *left* or *xmax* and *right*.
+
+ Returns
+ -------
+ left, right : (float, float)
+ The new x-axis limits in data coordinates.
+
+ See Also
+ --------
+ get_xlim
+ set_xbound, get_xbound
+ invert_xaxis, xaxis_inverted
+
+ Notes
+ -----
+ The *left* value may be greater than the *right* value, in which
+ case the x-axis values will decrease from left to right.
+
+ Examples
+ --------
+ >>> set_xlim(left, right)
+ >>> set_xlim((left, right))
+ >>> left, right = set_xlim(left, right)
+
+ One limit may be left unchanged.
+
+ >>> set_xlim(right=right_lim)
+
+ Limits may be passed in reverse order to flip the direction of
+ the x-axis. For example, suppose *x* represents the number of
+ years before present. The x-axis limits might be set like the
+ following so 5000 years ago is on the left of the plot and the
+ present is on the right.
+
+ >>> set_xlim(5000, 0)
+ """
+ if right is None and np.iterable(left):
+ left, right = left
+ if xmin is not None:
+ if left is not None:
+ raise TypeError("Cannot pass both 'left' and 'xmin'")
+ left = xmin
+ if xmax is not None:
+ if right is not None:
+ raise TypeError("Cannot pass both 'right' and 'xmax'")
+ right = xmax
+ return self.xaxis._set_lim(left, right, emit=emit, auto=auto)
+
+ get_xscale = _axis_method_wrapper("xaxis", "get_scale")
+ set_xscale = _axis_method_wrapper("xaxis", "_set_axes_scale")
+ get_xticks = _axis_method_wrapper("xaxis", "get_ticklocs")
+ set_xticks = _axis_method_wrapper("xaxis", "set_ticks",
+ doc_sub={'set_ticks': 'set_xticks'})
+ get_xmajorticklabels = _axis_method_wrapper("xaxis", "get_majorticklabels")
+ get_xminorticklabels = _axis_method_wrapper("xaxis", "get_minorticklabels")
+ get_xticklabels = _axis_method_wrapper("xaxis", "get_ticklabels")
+ set_xticklabels = _axis_method_wrapper(
+ "xaxis", "set_ticklabels",
+ doc_sub={"Axis.set_ticks": "Axes.set_xticks"})
+
+ def get_ylabel(self):
+ """
+ Get the ylabel text string.
+ """
+ label = self.yaxis.label
+ return label.get_text()
+
+ def set_ylabel(self, ylabel, fontdict=None, labelpad=None, *,
+ loc=None, **kwargs):
+ """
+ Set the label for the y-axis.
+
+ Parameters
+ ----------
+ ylabel : str
+ The label text.
+
+ labelpad : float, default: :rc:`axes.labelpad`
+ Spacing in points from the Axes bounding box including ticks
+ and tick labels. If None, the previous value is left as is.
+
+ loc : {'bottom', 'center', 'top'}, default: :rc:`yaxis.labellocation`
+ The label position. This is a high-level alternative for passing
+ parameters *y* and *horizontalalignment*.
+
+ Other Parameters
+ ----------------
+ **kwargs : `~matplotlib.text.Text` properties
+ `.Text` properties control the appearance of the label.
+
+ See Also
+ --------
+ text : Documents the properties supported by `.Text`.
+ """
+ if labelpad is not None:
+ self.yaxis.labelpad = labelpad
+ protected_kw = ['y', 'horizontalalignment', 'ha']
+ if {*kwargs} & {*protected_kw}:
+ if loc is not None:
+ raise TypeError(f"Specifying 'loc' is disallowed when any of "
+ f"its corresponding low level keyword "
+ f"arguments ({protected_kw}) are also "
+ f"supplied")
+
+ else:
+ loc = (loc if loc is not None
+ else mpl.rcParams['yaxis.labellocation'])
+ _api.check_in_list(('bottom', 'center', 'top'), loc=loc)
+
+ y, ha = {
+ 'bottom': (0, 'left'),
+ 'center': (0.5, 'center'),
+ 'top': (1, 'right')
+ }[loc]
+ kwargs.update(y=y, horizontalalignment=ha)
+
+ return self.yaxis.set_label_text(ylabel, fontdict, **kwargs)
+
+ def invert_yaxis(self):
+ """
+ Invert the y-axis.
+
+ See Also
+ --------
+ yaxis_inverted
+ get_ylim, set_ylim
+ get_ybound, set_ybound
+ """
+ self.yaxis.set_inverted(not self.yaxis.get_inverted())
+
+ yaxis_inverted = _axis_method_wrapper("yaxis", "get_inverted")
+
+ def get_ybound(self):
+ """
+ Return the lower and upper y-axis bounds, in increasing order.
+
+ See Also
+ --------
+ set_ybound
+ get_ylim, set_ylim
+ invert_yaxis, yaxis_inverted
+ """
+ bottom, top = self.get_ylim()
+ if bottom < top:
+ return bottom, top
+ else:
+ return top, bottom
+
+ def set_ybound(self, lower=None, upper=None):
+ """
+ Set the lower and upper numerical bounds of the y-axis.
+
+ This method will honor axis inversion regardless of parameter order.
+ It will not change the autoscaling setting (`.get_autoscaley_on()`).
+
+ Parameters
+ ----------
+ lower, upper : float or None
+ The lower and upper bounds. If *None*, the respective axis bound
+ is not modified.
+
+ .. ACCEPTS: (lower: float, upper: float)
+
+ See Also
+ --------
+ get_ybound
+ get_ylim, set_ylim
+ invert_yaxis, yaxis_inverted
+ """
+ if upper is None and np.iterable(lower):
+ lower, upper = lower
+
+ old_lower, old_upper = self.get_ybound()
+ if lower is None:
+ lower = old_lower
+ if upper is None:
+ upper = old_upper
+
+ self.set_ylim(sorted((lower, upper),
+ reverse=bool(self.yaxis_inverted())),
+ auto=None)
+
+ def get_ylim(self):
+ """
+ Return the y-axis view limits.
+
+ Returns
+ -------
+ bottom, top : (float, float)
+ The current y-axis limits in data coordinates.
+
+ See Also
+ --------
+ .Axes.set_ylim
+ .Axes.set_ybound, .Axes.get_ybound
+ .Axes.invert_yaxis, .Axes.yaxis_inverted
+
+ Notes
+ -----
+ The y-axis may be inverted, in which case the *bottom* value
+ will be greater than the *top* value.
+ """
+ return tuple(self.viewLim.intervaly)
+
+ def set_ylim(self, bottom=None, top=None, *, emit=True, auto=False,
+ ymin=None, ymax=None):
+ """
+ Set the y-axis view limits.
+
+ Parameters
+ ----------
+ bottom : float, optional
+ The bottom ylim in data coordinates. Passing *None* leaves the
+ limit unchanged.
+
+ The bottom and top ylims may also be passed as the tuple
+ (*bottom*, *top*) as the first positional argument (or as
+ the *bottom* keyword argument).
+
+ .. ACCEPTS: (bottom: float, top: float)
+
+ top : float, optional
+ The top ylim in data coordinates. Passing *None* leaves the
+ limit unchanged.
+
+ emit : bool, default: True
+ Whether to notify observers of limit change.
+
+ auto : bool or None, default: False
+ Whether to turn on autoscaling of the y-axis. *True* turns on,
+ *False* turns off, *None* leaves unchanged.
+
+ ymin, ymax : float, optional
+ They are equivalent to bottom and top respectively, and it is an
+ error to pass both *ymin* and *bottom* or *ymax* and *top*.
+
+ Returns
+ -------
+ bottom, top : (float, float)
+ The new y-axis limits in data coordinates.
+
+ See Also
+ --------
+ get_ylim
+ set_ybound, get_ybound
+ invert_yaxis, yaxis_inverted
+
+ Notes
+ -----
+ The *bottom* value may be greater than the *top* value, in which
+ case the y-axis values will decrease from *bottom* to *top*.
+
+ Examples
+ --------
+ >>> set_ylim(bottom, top)
+ >>> set_ylim((bottom, top))
+ >>> bottom, top = set_ylim(bottom, top)
+
+ One limit may be left unchanged.
+
+ >>> set_ylim(top=top_lim)
+
+ Limits may be passed in reverse order to flip the direction of
+ the y-axis. For example, suppose ``y`` represents depth of the
+ ocean in m. The y-axis limits might be set like the following
+ so 5000 m depth is at the bottom of the plot and the surface,
+ 0 m, is at the top.
+
+ >>> set_ylim(5000, 0)
+ """
+ if top is None and np.iterable(bottom):
+ bottom, top = bottom
+ if ymin is not None:
+ if bottom is not None:
+ raise TypeError("Cannot pass both 'bottom' and 'ymin'")
+ bottom = ymin
+ if ymax is not None:
+ if top is not None:
+ raise TypeError("Cannot pass both 'top' and 'ymax'")
+ top = ymax
+ return self.yaxis._set_lim(bottom, top, emit=emit, auto=auto)
+
+ get_yscale = _axis_method_wrapper("yaxis", "get_scale")
+ set_yscale = _axis_method_wrapper("yaxis", "_set_axes_scale")
+ get_yticks = _axis_method_wrapper("yaxis", "get_ticklocs")
+ set_yticks = _axis_method_wrapper("yaxis", "set_ticks",
+ doc_sub={'set_ticks': 'set_yticks'})
+ get_ymajorticklabels = _axis_method_wrapper("yaxis", "get_majorticklabels")
+ get_yminorticklabels = _axis_method_wrapper("yaxis", "get_minorticklabels")
+ get_yticklabels = _axis_method_wrapper("yaxis", "get_ticklabels")
+ set_yticklabels = _axis_method_wrapper(
+ "yaxis", "set_ticklabels",
+ doc_sub={"Axis.set_ticks": "Axes.set_yticks"})
+
+ xaxis_date = _axis_method_wrapper("xaxis", "axis_date")
+ yaxis_date = _axis_method_wrapper("yaxis", "axis_date")
+
+ def format_xdata(self, x):
+ """
+ Return *x* formatted as an x-value.
+
+ This function will use the `.fmt_xdata` attribute if it is not None,
+ else will fall back on the xaxis major formatter.
+ """
+ return (self.fmt_xdata if self.fmt_xdata is not None
+ else self.xaxis.get_major_formatter().format_data_short)(x)
+
+ def format_ydata(self, y):
+ """
+ Return *y* formatted as a y-value.
+
+ This function will use the `.fmt_ydata` attribute if it is not None,
+ else will fall back on the yaxis major formatter.
+ """
+ return (self.fmt_ydata if self.fmt_ydata is not None
+ else self.yaxis.get_major_formatter().format_data_short)(y)
+
+ def format_coord(self, x, y):
+ """Return a format string formatting the *x*, *y* coordinates."""
+ twins = self._twinned_axes.get_siblings(self)
+ if len(twins) == 1:
+ return "(x, y) = ({}, {})".format(
+ "???" if x is None else self.format_xdata(x),
+ "???" if y is None else self.format_ydata(y))
+ screen_xy = self.transData.transform((x, y))
+ xy_strs = []
+ # Retrieve twins in the order of self.figure.axes to sort tied zorders (which is
+ # the common case) by the order in which they are added to the figure.
+ for ax in sorted(twins, key=attrgetter("zorder")):
+ data_x, data_y = ax.transData.inverted().transform(screen_xy)
+ xy_strs.append(
+ "({}, {})".format(ax.format_xdata(data_x), ax.format_ydata(data_y)))
+ return "(x, y) = {}".format(" | ".join(xy_strs))
+
+ def minorticks_on(self):
+ """
+ Display minor ticks on the Axes.
+
+ Displaying minor ticks may reduce performance; you may turn them off
+ using `minorticks_off()` if drawing speed is a problem.
+ """
+ self.xaxis.minorticks_on()
+ self.yaxis.minorticks_on()
+
+ def minorticks_off(self):
+ """Remove minor ticks from the Axes."""
+ self.xaxis.minorticks_off()
+ self.yaxis.minorticks_off()
+
+ # Interactive manipulation
+
+ def can_zoom(self):
+ """
+ Return whether this Axes supports the zoom box button functionality.
+ """
+ return True
+
+ def can_pan(self):
+ """
+ Return whether this Axes supports any pan/zoom button functionality.
+ """
+ return True
+
+ def get_navigate(self):
+ """
+ Get whether the Axes responds to navigation commands.
+ """
+ return self._navigate
+
+ def set_navigate(self, b):
+ """
+ Set whether the Axes responds to navigation toolbar commands.
+
+ Parameters
+ ----------
+ b : bool
+
+ See Also
+ --------
+ matplotlib.axes.Axes.set_forward_navigation_events
+
+ """
+ self._navigate = b
+
+ def get_navigate_mode(self):
+ """
+ Get the navigation toolbar button status: 'PAN', 'ZOOM', or None.
+ """
+ return self._navigate_mode
+
+ def set_navigate_mode(self, b):
+ """
+ Set the navigation toolbar button status.
+
+ .. warning::
+ This is not a user-API function.
+
+ """
+ self._navigate_mode = b
+
+ def _get_view(self):
+ """
+ Save information required to reproduce the current view.
+
+ This method is called before a view is changed, such as during a pan or zoom
+ initiated by the user. It returns an opaque object that describes the current
+ view, in a format compatible with :meth:`_set_view`.
+
+ The default implementation saves the view limits and autoscaling state.
+ Subclasses may override this as needed, as long as :meth:`_set_view` is also
+ adjusted accordingly.
+ """
+ return {
+ "xlim": self.get_xlim(), "autoscalex_on": self.get_autoscalex_on(),
+ "ylim": self.get_ylim(), "autoscaley_on": self.get_autoscaley_on(),
+ }
+
+ def _set_view(self, view):
+ """
+ Apply a previously saved view.
+
+ This method is called when restoring a view (with the return value of
+ :meth:`_get_view` as argument), such as with the navigation buttons.
+
+ Subclasses that override :meth:`_get_view` also need to override this method
+ accordingly.
+ """
+ self.set(**view)
+
+ def _prepare_view_from_bbox(self, bbox, direction='in',
+ mode=None, twinx=False, twiny=False):
+ """
+ Helper function to prepare the new bounds from a bbox.
+
+ This helper function returns the new x and y bounds from the zoom
+ bbox. This a convenience method to abstract the bbox logic
+ out of the base setter.
+ """
+ if len(bbox) == 3:
+ xp, yp, scl = bbox # Zooming code
+ if scl == 0: # Should not happen
+ scl = 1.
+ if scl > 1:
+ direction = 'in'
+ else:
+ direction = 'out'
+ scl = 1/scl
+ # get the limits of the axes
+ (xmin, ymin), (xmax, ymax) = self.transData.transform(
+ np.transpose([self.get_xlim(), self.get_ylim()]))
+ # set the range
+ xwidth = xmax - xmin
+ ywidth = ymax - ymin
+ xcen = (xmax + xmin)*.5
+ ycen = (ymax + ymin)*.5
+ xzc = (xp*(scl - 1) + xcen)/scl
+ yzc = (yp*(scl - 1) + ycen)/scl
+ bbox = [xzc - xwidth/2./scl, yzc - ywidth/2./scl,
+ xzc + xwidth/2./scl, yzc + ywidth/2./scl]
+ elif len(bbox) != 4:
+ # should be len 3 or 4 but nothing else
+ _api.warn_external(
+ "Warning in _set_view_from_bbox: bounding box is not a tuple "
+ "of length 3 or 4. Ignoring the view change.")
+ return
+
+ # Original limits.
+ xmin0, xmax0 = self.get_xbound()
+ ymin0, ymax0 = self.get_ybound()
+ # The zoom box in screen coords.
+ startx, starty, stopx, stopy = bbox
+ # Convert to data coords.
+ (startx, starty), (stopx, stopy) = self.transData.inverted().transform(
+ [(startx, starty), (stopx, stopy)])
+ # Clip to axes limits.
+ xmin, xmax = np.clip(sorted([startx, stopx]), xmin0, xmax0)
+ ymin, ymax = np.clip(sorted([starty, stopy]), ymin0, ymax0)
+ # Don't double-zoom twinned axes or if zooming only the other axis.
+ if twinx or mode == "y":
+ xmin, xmax = xmin0, xmax0
+ if twiny or mode == "x":
+ ymin, ymax = ymin0, ymax0
+
+ if direction == "in":
+ new_xbound = xmin, xmax
+ new_ybound = ymin, ymax
+
+ elif direction == "out":
+ x_trf = self.xaxis.get_transform()
+ sxmin0, sxmax0, sxmin, sxmax = x_trf.transform(
+ [xmin0, xmax0, xmin, xmax]) # To screen space.
+ factor = (sxmax0 - sxmin0) / (sxmax - sxmin) # Unzoom factor.
+ # Move original bounds away by
+ # (factor) x (distance between unzoom box and Axes bbox).
+ sxmin1 = sxmin0 - factor * (sxmin - sxmin0)
+ sxmax1 = sxmax0 + factor * (sxmax0 - sxmax)
+ # And back to data space.
+ new_xbound = x_trf.inverted().transform([sxmin1, sxmax1])
+
+ y_trf = self.yaxis.get_transform()
+ symin0, symax0, symin, symax = y_trf.transform(
+ [ymin0, ymax0, ymin, ymax])
+ factor = (symax0 - symin0) / (symax - symin)
+ symin1 = symin0 - factor * (symin - symin0)
+ symax1 = symax0 + factor * (symax0 - symax)
+ new_ybound = y_trf.inverted().transform([symin1, symax1])
+
+ return new_xbound, new_ybound
+
+ def _set_view_from_bbox(self, bbox, direction='in',
+ mode=None, twinx=False, twiny=False):
+ """
+ Update view from a selection bbox.
+
+ .. note::
+
+ Intended to be overridden by new projection types, but if not, the
+ default implementation sets the view limits to the bbox directly.
+
+ Parameters
+ ----------
+ bbox : 4-tuple or 3 tuple
+ * If bbox is a 4 tuple, it is the selected bounding box limits,
+ in *display* coordinates.
+ * If bbox is a 3 tuple, it is an (xp, yp, scl) triple, where
+ (xp, yp) is the center of zooming and scl the scale factor to
+ zoom by.
+
+ direction : str
+ The direction to apply the bounding box.
+ * `'in'` - The bounding box describes the view directly, i.e.,
+ it zooms in.
+ * `'out'` - The bounding box describes the size to make the
+ existing view, i.e., it zooms out.
+
+ mode : str or None
+ The selection mode, whether to apply the bounding box in only the
+ `'x'` direction, `'y'` direction or both (`None`).
+
+ twinx : bool
+ Whether this axis is twinned in the *x*-direction.
+
+ twiny : bool
+ Whether this axis is twinned in the *y*-direction.
+ """
+ new_xbound, new_ybound = self._prepare_view_from_bbox(
+ bbox, direction=direction, mode=mode, twinx=twinx, twiny=twiny)
+ if not twinx and mode != "y":
+ self.set_xbound(new_xbound)
+ self.set_autoscalex_on(False)
+ if not twiny and mode != "x":
+ self.set_ybound(new_ybound)
+ self.set_autoscaley_on(False)
+
+ def start_pan(self, x, y, button):
+ """
+ Called when a pan operation has started.
+
+ Parameters
+ ----------
+ x, y : float
+ The mouse coordinates in display coords.
+ button : `.MouseButton`
+ The pressed mouse button.
+
+ Notes
+ -----
+ This is intended to be overridden by new projection types.
+ """
+ self._pan_start = types.SimpleNamespace(
+ lim=self.viewLim.frozen(),
+ trans=self.transData.frozen(),
+ trans_inverse=self.transData.inverted().frozen(),
+ bbox=self.bbox.frozen(),
+ x=x,
+ y=y)
+
+ def end_pan(self):
+ """
+ Called when a pan operation completes (when the mouse button is up.)
+
+ Notes
+ -----
+ This is intended to be overridden by new projection types.
+ """
+ del self._pan_start
+
+ def _get_pan_points(self, button, key, x, y):
+ """
+ Helper function to return the new points after a pan.
+
+ This helper function returns the points on the axis after a pan has
+ occurred. This is a convenience method to abstract the pan logic
+ out of the base setter.
+ """
+ def format_deltas(key, dx, dy):
+ if key == 'control':
+ if abs(dx) > abs(dy):
+ dy = dx
+ else:
+ dx = dy
+ elif key == 'x':
+ dy = 0
+ elif key == 'y':
+ dx = 0
+ elif key == 'shift':
+ if 2 * abs(dx) < abs(dy):
+ dx = 0
+ elif 2 * abs(dy) < abs(dx):
+ dy = 0
+ elif abs(dx) > abs(dy):
+ dy = dy / abs(dy) * abs(dx)
+ else:
+ dx = dx / abs(dx) * abs(dy)
+ return dx, dy
+
+ p = self._pan_start
+ dx = x - p.x
+ dy = y - p.y
+ if dx == dy == 0:
+ return
+ if button == 1:
+ dx, dy = format_deltas(key, dx, dy)
+ result = p.bbox.translated(-dx, -dy).transformed(p.trans_inverse)
+ elif button == 3:
+ try:
+ dx = -dx / self.bbox.width
+ dy = -dy / self.bbox.height
+ dx, dy = format_deltas(key, dx, dy)
+ if self.get_aspect() != 'auto':
+ dx = dy = 0.5 * (dx + dy)
+ alpha = np.power(10.0, (dx, dy))
+ start = np.array([p.x, p.y])
+ oldpoints = p.lim.transformed(p.trans)
+ newpoints = start + alpha * (oldpoints - start)
+ result = (mtransforms.Bbox(newpoints)
+ .transformed(p.trans_inverse))
+ except OverflowError:
+ _api.warn_external('Overflow while panning')
+ return
+ else:
+ return
+
+ valid = np.isfinite(result.transformed(p.trans))
+ points = result.get_points().astype(object)
+ # Just ignore invalid limits (typically, underflow in log-scale).
+ points[~valid] = None
+ return points
+
+ def drag_pan(self, button, key, x, y):
+ """
+ Called when the mouse moves during a pan operation.
+
+ Parameters
+ ----------
+ button : `.MouseButton`
+ The pressed mouse button.
+ key : str or None
+ The pressed key, if any.
+ x, y : float
+ The mouse coordinates in display coords.
+
+ Notes
+ -----
+ This is intended to be overridden by new projection types.
+ """
+ points = self._get_pan_points(button, key, x, y)
+ if points is not None:
+ self.set_xlim(points[:, 0])
+ self.set_ylim(points[:, 1])
+
+ def get_children(self):
+ # docstring inherited.
+ return [
+ *self._children,
+ *self.spines.values(),
+ *self._axis_map.values(),
+ self.title, self._left_title, self._right_title,
+ *self.child_axes,
+ *([self.legend_] if self.legend_ is not None else []),
+ self.patch,
+ ]
+
+ def contains(self, mouseevent):
+ # docstring inherited.
+ return self.patch.contains(mouseevent)
+
+ def contains_point(self, point):
+ """
+ Return whether *point* (pair of pixel coordinates) is inside the Axes
+ patch.
+ """
+ return self.patch.contains_point(point, radius=1.0)
+
+ def get_default_bbox_extra_artists(self):
+ """
+ Return a default list of artists that are used for the bounding box
+ calculation.
+
+ Artists are excluded either by not being visible or
+ ``artist.set_in_layout(False)``.
+ """
+
+ artists = self.get_children()
+
+ for axis in self._axis_map.values():
+ # axis tight bboxes are calculated separately inside
+ # Axes.get_tightbbox() using for_layout_only=True
+ artists.remove(axis)
+ if not (self.axison and self._frameon):
+ # don't do bbox on spines if frame not on.
+ for spine in self.spines.values():
+ artists.remove(spine)
+
+ artists.remove(self.title)
+ artists.remove(self._left_title)
+ artists.remove(self._right_title)
+
+ # always include types that do not internally implement clipping
+ # to Axes. may have clip_on set to True and clip_box equivalent
+ # to ax.bbox but then ignore these properties during draws.
+ noclip = (_AxesBase, maxis.Axis,
+ offsetbox.AnnotationBbox, offsetbox.OffsetBox)
+ return [a for a in artists if a.get_visible() and a.get_in_layout()
+ and (isinstance(a, noclip) or not a._fully_clipped_to_axes())]
+
+ def get_tightbbox(self, renderer=None, *, call_axes_locator=True,
+ bbox_extra_artists=None, for_layout_only=False):
+ """
+ Return the tight bounding box of the Axes, including axis and their
+ decorators (xlabel, title, etc).
+
+ Artists that have ``artist.set_in_layout(False)`` are not included
+ in the bbox.
+
+ Parameters
+ ----------
+ renderer : `.RendererBase` subclass
+ renderer that will be used to draw the figures (i.e.
+ ``fig.canvas.get_renderer()``)
+
+ bbox_extra_artists : list of `.Artist` or ``None``
+ List of artists to include in the tight bounding box. If
+ ``None`` (default), then all artist children of the Axes are
+ included in the tight bounding box.
+
+ call_axes_locator : bool, default: True
+ If *call_axes_locator* is ``False``, it does not call the
+ ``_axes_locator`` attribute, which is necessary to get the correct
+ bounding box. ``call_axes_locator=False`` can be used if the
+ caller is only interested in the relative size of the tightbbox
+ compared to the Axes bbox.
+
+ for_layout_only : default: False
+ The bounding box will *not* include the x-extent of the title and
+ the xlabel, or the y-extent of the ylabel.
+
+ Returns
+ -------
+ `.BboxBase`
+ Bounding box in figure pixel coordinates.
+
+ See Also
+ --------
+ matplotlib.axes.Axes.get_window_extent
+ matplotlib.axis.Axis.get_tightbbox
+ matplotlib.spines.Spine.get_window_extent
+ """
+
+ bb = []
+ if renderer is None:
+ renderer = self.get_figure(root=True)._get_renderer()
+
+ if not self.get_visible():
+ return None
+
+ locator = self.get_axes_locator()
+ self.apply_aspect(
+ locator(self, renderer) if locator and call_axes_locator else None)
+
+ for axis in self._axis_map.values():
+ if self.axison and axis.get_visible():
+ ba = martist._get_tightbbox_for_layout_only(axis, renderer)
+ if ba:
+ bb.append(ba)
+ self._update_title_position(renderer)
+ axbbox = self.get_window_extent(renderer)
+ bb.append(axbbox)
+
+ for title in [self.title, self._left_title, self._right_title]:
+ if title.get_visible():
+ bt = title.get_window_extent(renderer)
+ if for_layout_only and bt.width > 0:
+ # make the title bbox 1 pixel wide so its width
+ # is not accounted for in bbox calculations in
+ # tight/constrained_layout
+ bt.x0 = (bt.x0 + bt.x1) / 2 - 0.5
+ bt.x1 = bt.x0 + 1.0
+ bb.append(bt)
+
+ bbox_artists = bbox_extra_artists
+ if bbox_artists is None:
+ bbox_artists = self.get_default_bbox_extra_artists()
+
+ for a in bbox_artists:
+ bbox = a.get_tightbbox(renderer)
+ if (bbox is not None
+ and 0 < bbox.width < np.inf
+ and 0 < bbox.height < np.inf):
+ bb.append(bbox)
+ return mtransforms.Bbox.union(
+ [b for b in bb if b.width != 0 or b.height != 0])
+
+ def _make_twin_axes(self, *args, **kwargs):
+ """Make a twinx Axes of self. This is used for twinx and twiny."""
+ if 'sharex' in kwargs and 'sharey' in kwargs:
+ # The following line is added in v2.2 to avoid breaking Seaborn,
+ # which currently uses this internal API.
+ if kwargs["sharex"] is not self and kwargs["sharey"] is not self:
+ raise ValueError("Twinned Axes may share only one axis")
+ ss = self.get_subplotspec()
+ if ss:
+ twin = self.get_figure(root=False).add_subplot(ss, *args, **kwargs)
+ else:
+ twin = self.get_figure(root=False).add_axes(
+ self.get_position(True), *args, **kwargs,
+ axes_locator=_TransformedBoundsLocator(
+ [0, 0, 1, 1], self.transAxes))
+ self.set_adjustable('datalim')
+ twin.set_adjustable('datalim')
+ twin.set_zorder(self.zorder)
+
+ self._twinned_axes.join(self, twin)
+ return twin
+
+ def twinx(self):
+ """
+ Create a twin Axes sharing the xaxis.
+
+ Create a new Axes with an invisible x-axis and an independent
+ y-axis positioned opposite to the original one (i.e. at right). The
+ x-axis autoscale setting will be inherited from the original
+ Axes. To ensure that the tick marks of both y-axes align, see
+ `~matplotlib.ticker.LinearLocator`.
+
+ Returns
+ -------
+ Axes
+ The newly created Axes instance
+
+ Notes
+ -----
+ For those who are 'picking' artists while using twinx, pick
+ events are only called for the artists in the top-most Axes.
+ """
+ ax2 = self._make_twin_axes(sharex=self)
+ ax2.yaxis.tick_right()
+ ax2.yaxis.set_label_position('right')
+ ax2.yaxis.set_offset_position('right')
+ ax2.set_autoscalex_on(self.get_autoscalex_on())
+ self.yaxis.tick_left()
+ ax2.xaxis.set_visible(False)
+ ax2.patch.set_visible(False)
+ ax2.xaxis.units = self.xaxis.units
+ return ax2
+
+ def twiny(self):
+ """
+ Create a twin Axes sharing the yaxis.
+
+ Create a new Axes with an invisible y-axis and an independent
+ x-axis positioned opposite to the original one (i.e. at top). The
+ y-axis autoscale setting will be inherited from the original Axes.
+ To ensure that the tick marks of both x-axes align, see
+ `~matplotlib.ticker.LinearLocator`.
+
+ Returns
+ -------
+ Axes
+ The newly created Axes instance
+
+ Notes
+ -----
+ For those who are 'picking' artists while using twiny, pick
+ events are only called for the artists in the top-most Axes.
+ """
+ ax2 = self._make_twin_axes(sharey=self)
+ ax2.xaxis.tick_top()
+ ax2.xaxis.set_label_position('top')
+ ax2.set_autoscaley_on(self.get_autoscaley_on())
+ self.xaxis.tick_bottom()
+ ax2.yaxis.set_visible(False)
+ ax2.patch.set_visible(False)
+ ax2.yaxis.units = self.yaxis.units
+ return ax2
+
+ def get_shared_x_axes(self):
+ """Return an immutable view on the shared x-axes Grouper."""
+ return cbook.GrouperView(self._shared_axes["x"])
+
+ def get_shared_y_axes(self):
+ """Return an immutable view on the shared y-axes Grouper."""
+ return cbook.GrouperView(self._shared_axes["y"])
+
+ def label_outer(self, remove_inner_ticks=False):
+ """
+ Only show "outer" labels and tick labels.
+
+ x-labels are only kept for subplots on the last row (or first row, if
+ labels are on the top side); y-labels only for subplots on the first
+ column (or last column, if labels are on the right side).
+
+ Parameters
+ ----------
+ remove_inner_ticks : bool, default: False
+ If True, remove the inner ticks as well (not only tick labels).
+
+ .. versionadded:: 3.8
+ """
+ self._label_outer_xaxis(skip_non_rectangular_axes=False,
+ remove_inner_ticks=remove_inner_ticks)
+ self._label_outer_yaxis(skip_non_rectangular_axes=False,
+ remove_inner_ticks=remove_inner_ticks)
+
+ def _get_subplotspec_with_optional_colorbar(self):
+ """
+ Return the subplotspec for this Axes, except that if this Axes has been
+ moved to a subgridspec to make room for a colorbar, then return the
+ subplotspec that encloses both this Axes and the colorbar Axes.
+ """
+ ss = self.get_subplotspec()
+ if any(cax.get_subplotspec() for cax in self._colorbars):
+ ss = ss.get_gridspec()._subplot_spec
+ return ss
+
+ def _label_outer_xaxis(self, *, skip_non_rectangular_axes,
+ remove_inner_ticks=False):
+ # see documentation in label_outer.
+ if skip_non_rectangular_axes and not isinstance(self.patch,
+ mpl.patches.Rectangle):
+ return
+ ss = self._get_subplotspec_with_optional_colorbar()
+ if ss is None:
+ return
+ label_position = self.xaxis.get_label_position()
+ if not ss.is_first_row(): # Remove top label/ticklabels/offsettext.
+ if label_position == "top":
+ self.set_xlabel("")
+ top_kw = {'top': False} if remove_inner_ticks else {}
+ self.xaxis.set_tick_params(
+ which="both", labeltop=False, **top_kw)
+ if self.xaxis.offsetText.get_position()[1] == 1:
+ self.xaxis.offsetText.set_visible(False)
+ if not ss.is_last_row(): # Remove bottom label/ticklabels/offsettext.
+ if label_position == "bottom":
+ self.set_xlabel("")
+ bottom_kw = {'bottom': False} if remove_inner_ticks else {}
+ self.xaxis.set_tick_params(
+ which="both", labelbottom=False, **bottom_kw)
+ if self.xaxis.offsetText.get_position()[1] == 0:
+ self.xaxis.offsetText.set_visible(False)
+
+ def _label_outer_yaxis(self, *, skip_non_rectangular_axes,
+ remove_inner_ticks=False):
+ # see documentation in label_outer.
+ if skip_non_rectangular_axes and not isinstance(self.patch,
+ mpl.patches.Rectangle):
+ return
+ ss = self._get_subplotspec_with_optional_colorbar()
+ if ss is None:
+ return
+ label_position = self.yaxis.get_label_position()
+ if not ss.is_first_col(): # Remove left label/ticklabels/offsettext.
+ if label_position == "left":
+ self.set_ylabel("")
+ left_kw = {'left': False} if remove_inner_ticks else {}
+ self.yaxis.set_tick_params(
+ which="both", labelleft=False, **left_kw)
+ if self.yaxis.offsetText.get_position()[0] == 0:
+ self.yaxis.offsetText.set_visible(False)
+ if not ss.is_last_col(): # Remove right label/ticklabels/offsettext.
+ if label_position == "right":
+ self.set_ylabel("")
+ right_kw = {'right': False} if remove_inner_ticks else {}
+ self.yaxis.set_tick_params(
+ which="both", labelright=False, **right_kw)
+ if self.yaxis.offsetText.get_position()[0] == 1:
+ self.yaxis.offsetText.set_visible(False)
+
+ def set_forward_navigation_events(self, forward):
+ """
+ Set how pan/zoom events are forwarded to Axes below this one.
+
+ Parameters
+ ----------
+ forward : bool or "auto"
+ Possible values:
+
+ - True: Forward events to other axes with lower or equal zorder.
+ - False: Events are only executed on this axes.
+ - "auto": Default behaviour (*True* for axes with an invisible
+ patch and *False* otherwise)
+
+ See Also
+ --------
+ matplotlib.axes.Axes.set_navigate
+
+ """
+ self._forward_navigation_events = forward
+
+ def get_forward_navigation_events(self):
+ """Get how pan/zoom events are forwarded to Axes below this one."""
+ return self._forward_navigation_events
+
+
+def _draw_rasterized(figure, artists, renderer):
+ """
+ A helper function for rasterizing the list of artists.
+
+ The bookkeeping to track if we are or are not in rasterizing mode
+ with the mixed-mode backends is relatively complicated and is now
+ handled in the matplotlib.artist.allow_rasterization decorator.
+
+ This helper defines the absolute minimum methods and attributes on a
+ shim class to be compatible with that decorator and then uses it to
+ rasterize the list of artists.
+
+ This is maybe too-clever, but allows us to reuse the same code that is
+ used on normal artists to participate in the "are we rasterizing"
+ accounting.
+
+ Please do not use this outside of the "rasterize below a given zorder"
+ functionality of Axes.
+
+ Parameters
+ ----------
+ figure : matplotlib.figure.Figure
+ The figure all of the artists belong to (not checked). We need this
+ because we can at the figure level suppress composition and insert each
+ rasterized artist as its own image.
+
+ artists : List[matplotlib.artist.Artist]
+ The list of Artists to be rasterized. These are assumed to all
+ be in the same Figure.
+
+ renderer : matplotlib.backendbases.RendererBase
+ The currently active renderer
+
+ Returns
+ -------
+ None
+
+ """
+ class _MinimalArtist:
+ def get_rasterized(self):
+ return True
+
+ def get_agg_filter(self):
+ return None
+
+ def __init__(self, figure, artists):
+ self.figure = figure
+ self.artists = artists
+
+ def get_figure(self, root=False):
+ if root:
+ return self.figure.get_figure(root=True)
+ else:
+ return self.figure
+
+ @martist.allow_rasterization
+ def draw(self, renderer):
+ for a in self.artists:
+ a.draw(renderer)
+
+ return _MinimalArtist(figure, artists).draw(renderer)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_base.pyi b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_base.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..dcfcc4ca902790edcaf7b63b6886a2ba7f0700bd
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_base.pyi
@@ -0,0 +1,459 @@
+import matplotlib.artist as martist
+
+import datetime
+from collections.abc import Callable, Iterable, Iterator, Sequence
+from matplotlib import cbook
+from matplotlib.artist import Artist
+from matplotlib.axes import Axes
+from matplotlib.axis import XAxis, YAxis, Tick
+from matplotlib.backend_bases import RendererBase, MouseButton, MouseEvent
+from matplotlib.cbook import CallbackRegistry
+from matplotlib.container import Container
+from matplotlib.collections import Collection
+from matplotlib.colorizer import ColorizingArtist
+from matplotlib.legend import Legend
+from matplotlib.lines import Line2D
+from matplotlib.gridspec import SubplotSpec, GridSpec
+from matplotlib.figure import Figure, SubFigure
+from matplotlib.image import AxesImage
+from matplotlib.patches import Patch
+from matplotlib.scale import ScaleBase
+from matplotlib.spines import Spines
+from matplotlib.table import Table
+from matplotlib.text import Text
+from matplotlib.transforms import Transform, Bbox
+
+from cycler import Cycler
+
+import numpy as np
+from numpy.typing import ArrayLike
+from typing import Any, Literal, TypeVar, overload
+from matplotlib.typing import ColorType
+
+_T = TypeVar("_T", bound=Artist)
+
+class _axis_method_wrapper:
+ attr_name: str
+ method_name: str
+ __doc__: str
+ def __init__(
+ self, attr_name: str, method_name: str, *, doc_sub: dict[str, str] | None = ...
+ ) -> None: ...
+ def __set_name__(self, owner: Any, name: str) -> None: ...
+
+class _AxesBase(martist.Artist):
+ name: str
+ patch: Patch
+ spines: Spines
+ fmt_xdata: Callable[[float], str] | None
+ fmt_ydata: Callable[[float], str] | None
+ xaxis: XAxis
+ yaxis: YAxis
+ bbox: Bbox
+ dataLim: Bbox
+ transAxes: Transform
+ transScale: Transform
+ transLimits: Transform
+ transData: Transform
+ ignore_existing_data_limits: bool
+ axison: bool
+ containers: list[Container]
+ callbacks: CallbackRegistry
+ child_axes: list[_AxesBase]
+ legend_: Legend | None
+ title: Text
+ _projection_init: Any
+
+ def __init__(
+ self,
+ fig: Figure,
+ *args: tuple[float, float, float, float] | Bbox | int,
+ facecolor: ColorType | None = ...,
+ frameon: bool = ...,
+ sharex: _AxesBase | None = ...,
+ sharey: _AxesBase | None = ...,
+ label: Any = ...,
+ xscale: str | ScaleBase | None = ...,
+ yscale: str | ScaleBase | None = ...,
+ box_aspect: float | None = ...,
+ forward_navigation_events: bool | Literal["auto"] = ...,
+ **kwargs
+ ) -> None: ...
+ def get_subplotspec(self) -> SubplotSpec | None: ...
+ def set_subplotspec(self, subplotspec: SubplotSpec) -> None: ...
+ def get_gridspec(self) -> GridSpec | None: ...
+ def set_figure(self, fig: Figure | SubFigure) -> None: ...
+ @property
+ def viewLim(self) -> Bbox: ...
+ def get_xaxis_transform(
+ self, which: Literal["grid", "tick1", "tick2"] = ...
+ ) -> Transform: ...
+ def get_xaxis_text1_transform(
+ self, pad_points: float
+ ) -> tuple[
+ Transform,
+ Literal["center", "top", "bottom", "baseline", "center_baseline"],
+ Literal["center", "left", "right"],
+ ]: ...
+ def get_xaxis_text2_transform(
+ self, pad_points
+ ) -> tuple[
+ Transform,
+ Literal["center", "top", "bottom", "baseline", "center_baseline"],
+ Literal["center", "left", "right"],
+ ]: ...
+ def get_yaxis_transform(
+ self, which: Literal["grid", "tick1", "tick2"] = ...
+ ) -> Transform: ...
+ def get_yaxis_text1_transform(
+ self, pad_points
+ ) -> tuple[
+ Transform,
+ Literal["center", "top", "bottom", "baseline", "center_baseline"],
+ Literal["center", "left", "right"],
+ ]: ...
+ def get_yaxis_text2_transform(
+ self, pad_points
+ ) -> tuple[
+ Transform,
+ Literal["center", "top", "bottom", "baseline", "center_baseline"],
+ Literal["center", "left", "right"],
+ ]: ...
+ def get_position(self, original: bool = ...) -> Bbox: ...
+ def set_position(
+ self,
+ pos: Bbox | tuple[float, float, float, float],
+ which: Literal["both", "active", "original"] = ...,
+ ) -> None: ...
+ def reset_position(self) -> None: ...
+ def set_axes_locator(
+ self, locator: Callable[[_AxesBase, RendererBase], Bbox]
+ ) -> None: ...
+ def get_axes_locator(self) -> Callable[[_AxesBase, RendererBase], Bbox]: ...
+ def sharex(self, other: _AxesBase) -> None: ...
+ def sharey(self, other: _AxesBase) -> None: ...
+ def clear(self) -> None: ...
+ def cla(self) -> None: ...
+
+ class ArtistList(Sequence[_T]):
+ def __init__(
+ self,
+ axes: _AxesBase,
+ prop_name: str,
+ valid_types: type | Iterable[type] | None = ...,
+ invalid_types: type | Iterable[type] | None = ...,
+ ) -> None: ...
+ def __len__(self) -> int: ...
+ def __iter__(self) -> Iterator[_T]: ...
+ @overload
+ def __getitem__(self, key: int) -> _T: ...
+ @overload
+ def __getitem__(self, key: slice) -> list[_T]: ...
+
+ @overload
+ def __add__(self, other: _AxesBase.ArtistList[_T]) -> list[_T]: ...
+ @overload
+ def __add__(self, other: list[Any]) -> list[Any]: ...
+ @overload
+ def __add__(self, other: tuple[Any]) -> tuple[Any]: ...
+
+ @overload
+ def __radd__(self, other: _AxesBase.ArtistList[_T]) -> list[_T]: ...
+ @overload
+ def __radd__(self, other: list[Any]) -> list[Any]: ...
+ @overload
+ def __radd__(self, other: tuple[Any]) -> tuple[Any]: ...
+
+ @property
+ def artists(self) -> _AxesBase.ArtistList[Artist]: ...
+ @property
+ def collections(self) -> _AxesBase.ArtistList[Collection]: ...
+ @property
+ def images(self) -> _AxesBase.ArtistList[AxesImage]: ...
+ @property
+ def lines(self) -> _AxesBase.ArtistList[Line2D]: ...
+ @property
+ def patches(self) -> _AxesBase.ArtistList[Patch]: ...
+ @property
+ def tables(self) -> _AxesBase.ArtistList[Table]: ...
+ @property
+ def texts(self) -> _AxesBase.ArtistList[Text]: ...
+ def get_facecolor(self) -> ColorType: ...
+ def set_facecolor(self, color: ColorType | None) -> None: ...
+ @overload
+ def set_prop_cycle(self, cycler: Cycler | None) -> None: ...
+ @overload
+ def set_prop_cycle(self, label: str, values: Iterable[Any]) -> None: ...
+ @overload
+ def set_prop_cycle(self, **kwargs: Iterable[Any]) -> None: ...
+ def get_aspect(self) -> float | Literal["auto"]: ...
+ def set_aspect(
+ self,
+ aspect: float | Literal["auto", "equal"],
+ adjustable: Literal["box", "datalim"] | None = ...,
+ anchor: str | tuple[float, float] | None = ...,
+ share: bool = ...,
+ ) -> None: ...
+ def get_adjustable(self) -> Literal["box", "datalim"]: ...
+ def set_adjustable(
+ self, adjustable: Literal["box", "datalim"], share: bool = ...
+ ) -> None: ...
+ def get_box_aspect(self) -> float | None: ...
+ def set_box_aspect(self, aspect: float | None = ...) -> None: ...
+ def get_anchor(self) -> str | tuple[float, float]: ...
+ def set_anchor(
+ self, anchor: str | tuple[float, float], share: bool = ...
+ ) -> None: ...
+ def get_data_ratio(self) -> float: ...
+ def apply_aspect(self, position: Bbox | None = ...) -> None: ...
+ @overload
+ def axis(
+ self,
+ arg: tuple[float, float, float, float] | bool | str | None = ...,
+ /,
+ *,
+ emit: bool = ...
+ ) -> tuple[float, float, float, float]: ...
+ @overload
+ def axis(
+ self,
+ *,
+ emit: bool = ...,
+ xmin: float | None = ...,
+ xmax: float | None = ...,
+ ymin: float | None = ...,
+ ymax: float | None = ...
+ ) -> tuple[float, float, float, float]: ...
+ def get_legend(self) -> Legend | None: ...
+ def get_images(self) -> list[AxesImage]: ...
+ def get_lines(self) -> list[Line2D]: ...
+ def get_xaxis(self) -> XAxis: ...
+ def get_yaxis(self) -> YAxis: ...
+ def has_data(self) -> bool: ...
+ def add_artist(self, a: Artist) -> Artist: ...
+ def add_child_axes(self, ax: _AxesBase) -> _AxesBase: ...
+ def add_collection(
+ self, collection: Collection, autolim: bool = ...
+ ) -> Collection: ...
+ def add_image(self, image: AxesImage) -> AxesImage: ...
+ def add_line(self, line: Line2D) -> Line2D: ...
+ def add_patch(self, p: Patch) -> Patch: ...
+ def add_table(self, tab: Table) -> Table: ...
+ def add_container(self, container: Container) -> Container: ...
+ def relim(self, visible_only: bool = ...) -> None: ...
+ def update_datalim(
+ self, xys: ArrayLike, updatex: bool = ..., updatey: bool = ...
+ ) -> None: ...
+ def in_axes(self, mouseevent: MouseEvent) -> bool: ...
+ def get_autoscale_on(self) -> bool: ...
+ def set_autoscale_on(self, b: bool) -> None: ...
+ @property
+ def use_sticky_edges(self) -> bool: ...
+ @use_sticky_edges.setter
+ def use_sticky_edges(self, b: bool) -> None: ...
+ def get_xmargin(self) -> float: ...
+ def get_ymargin(self) -> float: ...
+ def set_xmargin(self, m: float) -> None: ...
+ def set_ymargin(self, m: float) -> None: ...
+
+ # Probably could be made better with overloads
+ def margins(
+ self,
+ *margins: float,
+ x: float | None = ...,
+ y: float | None = ...,
+ tight: bool | None = ...
+ ) -> tuple[float, float] | None: ...
+ def set_rasterization_zorder(self, z: float | None) -> None: ...
+ def get_rasterization_zorder(self) -> float | None: ...
+ def autoscale(
+ self,
+ enable: bool = ...,
+ axis: Literal["both", "x", "y"] = ...,
+ tight: bool | None = ...,
+ ) -> None: ...
+ def autoscale_view(
+ self, tight: bool | None = ..., scalex: bool = ..., scaley: bool = ...
+ ) -> None: ...
+ def draw_artist(self, a: Artist) -> None: ...
+ def redraw_in_frame(self) -> None: ...
+ def get_frame_on(self) -> bool: ...
+ def set_frame_on(self, b: bool) -> None: ...
+ def get_axisbelow(self) -> bool | Literal["line"]: ...
+ def set_axisbelow(self, b: bool | Literal["line"]) -> None: ...
+ def grid(
+ self,
+ visible: bool | None = ...,
+ which: Literal["major", "minor", "both"] = ...,
+ axis: Literal["both", "x", "y"] = ...,
+ **kwargs
+ ) -> None: ...
+ def ticklabel_format(
+ self,
+ *,
+ axis: Literal["both", "x", "y"] = ...,
+ style: Literal["", "sci", "scientific", "plain"] | None = ...,
+ scilimits: tuple[int, int] | None = ...,
+ useOffset: bool | float | None = ...,
+ useLocale: bool | None = ...,
+ useMathText: bool | None = ...
+ ) -> None: ...
+ def locator_params(
+ self, axis: Literal["both", "x", "y"] = ..., tight: bool | None = ..., **kwargs
+ ) -> None: ...
+ def tick_params(self, axis: Literal["both", "x", "y"] = ..., **kwargs) -> None: ...
+ def set_axis_off(self) -> None: ...
+ def set_axis_on(self) -> None: ...
+ def get_xlabel(self) -> str: ...
+ def set_xlabel(
+ self,
+ xlabel: str,
+ fontdict: dict[str, Any] | None = ...,
+ labelpad: float | None = ...,
+ *,
+ loc: Literal["left", "center", "right"] | None = ...,
+ **kwargs
+ ) -> Text: ...
+ def invert_xaxis(self) -> None: ...
+ def get_xbound(self) -> tuple[float, float]: ...
+ def set_xbound(
+ self, lower: float | None = ..., upper: float | None = ...
+ ) -> None: ...
+ def get_xlim(self) -> tuple[float, float]: ...
+ def set_xlim(
+ self,
+ left: float | tuple[float, float] | None = ...,
+ right: float | None = ...,
+ *,
+ emit: bool = ...,
+ auto: bool | None = ...,
+ xmin: float | None = ...,
+ xmax: float | None = ...
+ ) -> tuple[float, float]: ...
+ def get_ylabel(self) -> str: ...
+ def set_ylabel(
+ self,
+ ylabel: str,
+ fontdict: dict[str, Any] | None = ...,
+ labelpad: float | None = ...,
+ *,
+ loc: Literal["bottom", "center", "top"] | None = ...,
+ **kwargs
+ ) -> Text: ...
+ def invert_yaxis(self) -> None: ...
+ def get_ybound(self) -> tuple[float, float]: ...
+ def set_ybound(
+ self, lower: float | None = ..., upper: float | None = ...
+ ) -> None: ...
+ def get_ylim(self) -> tuple[float, float]: ...
+ def set_ylim(
+ self,
+ bottom: float | tuple[float, float] | None = ...,
+ top: float | None = ...,
+ *,
+ emit: bool = ...,
+ auto: bool | None = ...,
+ ymin: float | None = ...,
+ ymax: float | None = ...
+ ) -> tuple[float, float]: ...
+ def format_xdata(self, x: float) -> str: ...
+ def format_ydata(self, y: float) -> str: ...
+ def format_coord(self, x: float, y: float) -> str: ...
+ def minorticks_on(self) -> None: ...
+ def minorticks_off(self) -> None: ...
+ def can_zoom(self) -> bool: ...
+ def can_pan(self) -> bool: ...
+ def get_navigate(self) -> bool: ...
+ def set_navigate(self, b: bool) -> None: ...
+ def get_forward_navigation_events(self) -> bool | Literal["auto"]: ...
+ def set_forward_navigation_events(self, forward: bool | Literal["auto"]) -> None: ...
+ def get_navigate_mode(self) -> Literal["PAN", "ZOOM"] | None: ...
+ def set_navigate_mode(self, b: Literal["PAN", "ZOOM"] | None) -> None: ...
+ def start_pan(self, x: float, y: float, button: MouseButton) -> None: ...
+ def end_pan(self) -> None: ...
+ def drag_pan(
+ self, button: MouseButton, key: str | None, x: float, y: float
+ ) -> None: ...
+ def get_children(self) -> list[Artist]: ...
+ def contains_point(self, point: tuple[int, int]) -> bool: ...
+ def get_default_bbox_extra_artists(self) -> list[Artist]: ...
+ def get_tightbbox(
+ self,
+ renderer: RendererBase | None = ...,
+ *,
+ call_axes_locator: bool = ...,
+ bbox_extra_artists: Sequence[Artist] | None = ...,
+ for_layout_only: bool = ...
+ ) -> Bbox | None: ...
+ def twinx(self) -> Axes: ...
+ def twiny(self) -> Axes: ...
+ def get_shared_x_axes(self) -> cbook.GrouperView: ...
+ def get_shared_y_axes(self) -> cbook.GrouperView: ...
+ def label_outer(self, remove_inner_ticks: bool = ...) -> None: ...
+
+ # The methods underneath this line are added via the `_axis_method_wrapper` class
+ # Initially they are set to an object, but that object uses `__set_name__` to override
+ # itself with a method modified from the Axis methods for the x or y Axis.
+ # As such, they are typed according to the resultant method rather than as that object.
+
+ def get_xgridlines(self) -> list[Line2D]: ...
+ def get_xticklines(self, minor: bool = ...) -> list[Line2D]: ...
+ def get_ygridlines(self) -> list[Line2D]: ...
+ def get_yticklines(self, minor: bool = ...) -> list[Line2D]: ...
+ def _sci(self, im: ColorizingArtist) -> None: ...
+ def get_autoscalex_on(self) -> bool: ...
+ def get_autoscaley_on(self) -> bool: ...
+ def set_autoscalex_on(self, b: bool) -> None: ...
+ def set_autoscaley_on(self, b: bool) -> None: ...
+ def xaxis_inverted(self) -> bool: ...
+ def get_xscale(self) -> str: ...
+ def set_xscale(self, value: str | ScaleBase, **kwargs) -> None: ...
+ def get_xticks(self, *, minor: bool = ...) -> np.ndarray: ...
+ def set_xticks(
+ self,
+ ticks: ArrayLike,
+ labels: Iterable[str] | None = ...,
+ *,
+ minor: bool = ...,
+ **kwargs
+ ) -> list[Tick]: ...
+ def get_xmajorticklabels(self) -> list[Text]: ...
+ def get_xminorticklabels(self) -> list[Text]: ...
+ def get_xticklabels(
+ self, minor: bool = ..., which: Literal["major", "minor", "both"] | None = ...
+ ) -> list[Text]: ...
+ def set_xticklabels(
+ self,
+ labels: Iterable[str | Text],
+ *,
+ minor: bool = ...,
+ fontdict: dict[str, Any] | None = ...,
+ **kwargs
+ ) -> list[Text]: ...
+ def yaxis_inverted(self) -> bool: ...
+ def get_yscale(self) -> str: ...
+ def set_yscale(self, value: str | ScaleBase, **kwargs) -> None: ...
+ def get_yticks(self, *, minor: bool = ...) -> np.ndarray: ...
+ def set_yticks(
+ self,
+ ticks: ArrayLike,
+ labels: Iterable[str] | None = ...,
+ *,
+ minor: bool = ...,
+ **kwargs
+ ) -> list[Tick]: ...
+ def get_ymajorticklabels(self) -> list[Text]: ...
+ def get_yminorticklabels(self) -> list[Text]: ...
+ def get_yticklabels(
+ self, minor: bool = ..., which: Literal["major", "minor", "both"] | None = ...
+ ) -> list[Text]: ...
+ def set_yticklabels(
+ self,
+ labels: Iterable[str | Text],
+ *,
+ minor: bool = ...,
+ fontdict: dict[str, Any] | None = ...,
+ **kwargs
+ ) -> list[Text]: ...
+ def xaxis_date(self, tz: str | datetime.tzinfo | None = ...) -> None: ...
+ def yaxis_date(self, tz: str | datetime.tzinfo | None = ...) -> None: ...
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_secondary_axes.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_secondary_axes.py
new file mode 100644
index 0000000000000000000000000000000000000000..15a1970fa4a6e7762da98b58c6c5317e0ede7ec1
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_secondary_axes.py
@@ -0,0 +1,322 @@
+import numbers
+
+import numpy as np
+
+from matplotlib import _api, _docstring, transforms
+import matplotlib.ticker as mticker
+from matplotlib.axes._base import _AxesBase, _TransformedBoundsLocator
+from matplotlib.axis import Axis
+from matplotlib.transforms import Transform
+
+
+class SecondaryAxis(_AxesBase):
+ """
+ General class to hold a Secondary_X/Yaxis.
+ """
+
+ def __init__(self, parent, orientation, location, functions, transform=None,
+ **kwargs):
+ """
+ See `.secondary_xaxis` and `.secondary_yaxis` for the doc string.
+ While there is no need for this to be private, it should really be
+ called by those higher level functions.
+ """
+ _api.check_in_list(["x", "y"], orientation=orientation)
+ self._functions = functions
+ self._parent = parent
+ self._orientation = orientation
+ self._ticks_set = False
+
+ fig = self._parent.get_figure(root=False)
+ if self._orientation == 'x':
+ super().__init__(fig, [0, 1., 1, 0.0001], **kwargs)
+ self._axis = self.xaxis
+ self._locstrings = ['top', 'bottom']
+ self._otherstrings = ['left', 'right']
+ else: # 'y'
+ super().__init__(fig, [0, 1., 0.0001, 1], **kwargs)
+ self._axis = self.yaxis
+ self._locstrings = ['right', 'left']
+ self._otherstrings = ['top', 'bottom']
+ self._parentscale = None
+ # this gets positioned w/o constrained_layout so exclude:
+
+ self.set_location(location, transform)
+ self.set_functions(functions)
+
+ # styling:
+ otheraxis = self.yaxis if self._orientation == 'x' else self.xaxis
+ otheraxis.set_major_locator(mticker.NullLocator())
+ otheraxis.set_ticks_position('none')
+
+ self.spines[self._otherstrings].set_visible(False)
+ self.spines[self._locstrings].set_visible(True)
+
+ if self._pos < 0.5:
+ # flip the location strings...
+ self._locstrings = self._locstrings[::-1]
+ self.set_alignment(self._locstrings[0])
+
+ def set_alignment(self, align):
+ """
+ Set if axes spine and labels are drawn at top or bottom (or left/right)
+ of the Axes.
+
+ Parameters
+ ----------
+ align : {'top', 'bottom', 'left', 'right'}
+ Either 'top' or 'bottom' for orientation='x' or
+ 'left' or 'right' for orientation='y' axis.
+ """
+ _api.check_in_list(self._locstrings, align=align)
+ if align == self._locstrings[1]: # Need to change the orientation.
+ self._locstrings = self._locstrings[::-1]
+ self.spines[self._locstrings[0]].set_visible(True)
+ self.spines[self._locstrings[1]].set_visible(False)
+ self._axis.set_ticks_position(align)
+ self._axis.set_label_position(align)
+
+ def set_location(self, location, transform=None):
+ """
+ Set the vertical or horizontal location of the axes in
+ parent-normalized coordinates.
+
+ Parameters
+ ----------
+ location : {'top', 'bottom', 'left', 'right'} or float
+ The position to put the secondary axis. Strings can be 'top' or
+ 'bottom' for orientation='x' and 'right' or 'left' for
+ orientation='y'. A float indicates the relative position on the
+ parent Axes to put the new Axes, 0.0 being the bottom (or left)
+ and 1.0 being the top (or right).
+
+ transform : `.Transform`, optional
+ Transform for the location to use. Defaults to
+ the parent's ``transAxes``, so locations are normally relative to
+ the parent axes.
+
+ .. versionadded:: 3.9
+ """
+
+ _api.check_isinstance((transforms.Transform, None), transform=transform)
+
+ # This puts the rectangle into figure-relative coordinates.
+ if isinstance(location, str):
+ _api.check_in_list(self._locstrings, location=location)
+ self._pos = 1. if location in ('top', 'right') else 0.
+ elif isinstance(location, numbers.Real):
+ self._pos = location
+ else:
+ raise ValueError(
+ f"location must be {self._locstrings[0]!r}, "
+ f"{self._locstrings[1]!r}, or a float, not {location!r}")
+
+ self._loc = location
+
+ if self._orientation == 'x':
+ # An x-secondary axes is like an inset axes from x = 0 to x = 1 and
+ # from y = pos to y = pos + eps, in the parent's transAxes coords.
+ bounds = [0, self._pos, 1., 1e-10]
+
+ # If a transformation is provided, use its y component rather than
+ # the parent's transAxes. This can be used to place axes in the data
+ # coords, for instance.
+ if transform is not None:
+ transform = transforms.blended_transform_factory(
+ self._parent.transAxes, transform)
+ else: # 'y'
+ bounds = [self._pos, 0, 1e-10, 1]
+ if transform is not None:
+ transform = transforms.blended_transform_factory(
+ transform, self._parent.transAxes) # Use provided x axis
+
+ # If no transform is provided, use the parent's transAxes
+ if transform is None:
+ transform = self._parent.transAxes
+
+ # this locator lets the axes move in the parent axes coordinates.
+ # so it never needs to know where the parent is explicitly in
+ # figure coordinates.
+ # it gets called in ax.apply_aspect() (of all places)
+ self.set_axes_locator(_TransformedBoundsLocator(bounds, transform))
+
+ def apply_aspect(self, position=None):
+ # docstring inherited.
+ self._set_lims()
+ super().apply_aspect(position)
+
+ @_docstring.copy(Axis.set_ticks)
+ def set_ticks(self, ticks, labels=None, *, minor=False, **kwargs):
+ ret = self._axis.set_ticks(ticks, labels, minor=minor, **kwargs)
+ self.stale = True
+ self._ticks_set = True
+ return ret
+
+ def set_functions(self, functions):
+ """
+ Set how the secondary axis converts limits from the parent Axes.
+
+ Parameters
+ ----------
+ functions : 2-tuple of func, or `Transform` with an inverse.
+ Transform between the parent axis values and the secondary axis
+ values.
+
+ If supplied as a 2-tuple of functions, the first function is
+ the forward transform function and the second is the inverse
+ transform.
+
+ If a transform is supplied, then the transform must have an
+ inverse.
+ """
+
+ if (isinstance(functions, tuple) and len(functions) == 2 and
+ callable(functions[0]) and callable(functions[1])):
+ # make an arbitrary convert from a two-tuple of functions
+ # forward and inverse.
+ self._functions = functions
+ elif isinstance(functions, Transform):
+ self._functions = (
+ functions.transform,
+ lambda x: functions.inverted().transform(x)
+ )
+ elif functions is None:
+ self._functions = (lambda x: x, lambda x: x)
+ else:
+ raise ValueError('functions argument of secondary Axes '
+ 'must be a two-tuple of callable functions '
+ 'with the first function being the transform '
+ 'and the second being the inverse')
+ self._set_scale()
+
+ def draw(self, renderer):
+ """
+ Draw the secondary Axes.
+
+ Consults the parent Axes for its limits and converts them
+ using the converter specified by
+ `~.axes._secondary_axes.set_functions` (or *functions*
+ parameter when Axes initialized.)
+ """
+ self._set_lims()
+ # this sets the scale in case the parent has set its scale.
+ self._set_scale()
+ super().draw(renderer)
+
+ def _set_scale(self):
+ """
+ Check if parent has set its scale
+ """
+
+ if self._orientation == 'x':
+ pscale = self._parent.xaxis.get_scale()
+ set_scale = self.set_xscale
+ else: # 'y'
+ pscale = self._parent.yaxis.get_scale()
+ set_scale = self.set_yscale
+ if pscale == self._parentscale:
+ return
+
+ if self._ticks_set:
+ ticks = self._axis.get_ticklocs()
+
+ # need to invert the roles here for the ticks to line up.
+ set_scale('functionlog' if pscale == 'log' else 'function',
+ functions=self._functions[::-1])
+
+ # OK, set_scale sets the locators, but if we've called
+ # axsecond.set_ticks, we want to keep those.
+ if self._ticks_set:
+ self._axis.set_major_locator(mticker.FixedLocator(ticks))
+
+ # If the parent scale doesn't change, we can skip this next time.
+ self._parentscale = pscale
+
+ def _set_lims(self):
+ """
+ Set the limits based on parent limits and the convert method
+ between the parent and this secondary Axes.
+ """
+ if self._orientation == 'x':
+ lims = self._parent.get_xlim()
+ set_lim = self.set_xlim
+ else: # 'y'
+ lims = self._parent.get_ylim()
+ set_lim = self.set_ylim
+ order = lims[0] < lims[1]
+ lims = self._functions[0](np.array(lims))
+ neworder = lims[0] < lims[1]
+ if neworder != order:
+ # Flip because the transform will take care of the flipping.
+ lims = lims[::-1]
+ set_lim(lims)
+
+ def set_aspect(self, *args, **kwargs):
+ """
+ Secondary Axes cannot set the aspect ratio, so calling this just
+ sets a warning.
+ """
+ _api.warn_external("Secondary Axes can't set the aspect ratio")
+
+ def set_color(self, color):
+ """
+ Change the color of the secondary Axes and all decorators.
+
+ Parameters
+ ----------
+ color : :mpltype:`color`
+ """
+ axis = self._axis_map[self._orientation]
+ axis.set_tick_params(colors=color)
+ for spine in self.spines.values():
+ if spine.axis is axis:
+ spine.set_color(color)
+ axis.label.set_color(color)
+
+
+_secax_docstring = '''
+Warnings
+--------
+This method is experimental as of 3.1, and the API may change.
+
+Parameters
+----------
+location : {'top', 'bottom', 'left', 'right'} or float
+ The position to put the secondary axis. Strings can be 'top' or
+ 'bottom' for orientation='x' and 'right' or 'left' for
+ orientation='y'. A float indicates the relative position on the
+ parent Axes to put the new Axes, 0.0 being the bottom (or left)
+ and 1.0 being the top (or right).
+
+functions : 2-tuple of func, or Transform with an inverse
+
+ If a 2-tuple of functions, the user specifies the transform
+ function and its inverse. i.e.
+ ``functions=(lambda x: 2 / x, lambda x: 2 / x)`` would be an
+ reciprocal transform with a factor of 2. Both functions must accept
+ numpy arrays as input.
+
+ The user can also directly supply a subclass of
+ `.transforms.Transform` so long as it has an inverse.
+
+ See :doc:`/gallery/subplots_axes_and_figures/secondary_axis`
+ for examples of making these conversions.
+
+transform : `.Transform`, optional
+ If specified, *location* will be
+ placed relative to this transform (in the direction of the axis)
+ rather than the parent's axis. i.e. a secondary x-axis will
+ use the provided y transform and the x transform of the parent.
+
+ .. versionadded:: 3.9
+
+Returns
+-------
+ax : axes._secondary_axes.SecondaryAxis
+
+Other Parameters
+----------------
+**kwargs : `~matplotlib.axes.Axes` properties.
+ Other miscellaneous Axes parameters.
+'''
+_docstring.interpd.register(_secax_docstring=_secax_docstring)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_secondary_axes.pyi b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_secondary_axes.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..afb429f740c4aa58a42b64f9209e1e0bd9ee57f7
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/axes/_secondary_axes.pyi
@@ -0,0 +1,45 @@
+from matplotlib.axes._base import _AxesBase
+from matplotlib.axis import Tick
+
+from matplotlib.transforms import Transform
+
+from collections.abc import Callable, Iterable
+from typing import Literal
+from numpy.typing import ArrayLike
+from matplotlib.typing import ColorType
+
+class SecondaryAxis(_AxesBase):
+ def __init__(
+ self,
+ parent: _AxesBase,
+ orientation: Literal["x", "y"],
+ location: Literal["top", "bottom", "right", "left"] | float,
+ functions: tuple[
+ Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]
+ ]
+ | Transform,
+ transform: Transform | None = ...,
+ **kwargs
+ ) -> None: ...
+ def set_alignment(
+ self, align: Literal["top", "bottom", "right", "left"]
+ ) -> None: ...
+ def set_location(
+ self,
+ location: Literal["top", "bottom", "right", "left"] | float,
+ transform: Transform | None = ...
+ ) -> None: ...
+ def set_ticks(
+ self,
+ ticks: ArrayLike,
+ labels: Iterable[str] | None = ...,
+ *,
+ minor: bool = ...,
+ **kwargs
+ ) -> list[Tick]: ...
+ def set_functions(
+ self,
+ functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]] | Transform,
+ ) -> None: ...
+ def set_aspect(self, *args, **kwargs) -> None: ...
+ def set_color(self, color: ColorType) -> None: ...
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..cf0f682d5d4b4772426ea2ff0e62251ce947a827
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__init__.py
@@ -0,0 +1,5 @@
+from .registry import BackendFilter, backend_registry # noqa: F401
+
+# NOTE: plt.switch_backend() (called at import time) will add a "backend"
+# attribute here for backcompat.
+_QT_FORCE_QT5_BINDING = False
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..64de39db198b466b67f5f0ebf6b071889ec23640
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/_backend_gtk.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/_backend_gtk.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3c72a75297c26dfa1807ef6c830aef8086bdf54d
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/_backend_gtk.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/_backend_pdf_ps.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/_backend_pdf_ps.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..08897b57a44edaa8ec8592237db6d4bbe1c541fd
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/_backend_pdf_ps.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/_backend_tk.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/_backend_tk.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..75ba0c4c39dc316fd16bd04f612c64af1e31429c
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/_backend_tk.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_agg.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_agg.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a84252132bd9ce66dd04e0bad62cfd67c3708c5d
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_agg.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_cairo.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_cairo.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a62ff9c909aed8823f5e3e0bf1104fcdf9a76fab
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_cairo.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk3.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk3.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..faf80eb02a0f5a22ed52de55d97e4f8a4d074b5b
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk3.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk3agg.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk3agg.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9f776b4f880c09f6917145e2bb8b0b9200d6e7fe
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk3agg.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk3cairo.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk3cairo.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..de84c42988a86dba1cc70eb46f94b504cc97d5ce
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk3cairo.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk4.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk4.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..403ce30ea08fa08cfbdbc3109ac4b1198c82c424
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk4.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk4agg.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk4agg.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cd1b952c510aec4c48dfeabe44616af7a0ec88a1
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk4agg.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk4cairo.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk4cairo.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..593af5f48f8c28ff35db40fb4ec3dbe679ae4528
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_gtk4cairo.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_macosx.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_macosx.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..13146d454106322358957c31bb2b1ac24380b49a
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_macosx.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_mixed.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_mixed.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b8775dd51537d06d285e611687ea58d423c76320
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_mixed.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_nbagg.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_nbagg.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1d3eac1a81bc2282f349e0c67e3ddf216cbd1fbc
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_nbagg.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_pgf.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_pgf.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ec5d6efd96ae2ebbfe18108c766baf313fbb9057
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_pgf.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_ps.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_ps.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1aaa453c73e4b3a147b7d3e46e6024c8de91b974
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_ps.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qt.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qt.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9fc21bbdf867d8b574aa6e9f17be102e3c51f9a1
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qt.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qt5.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qt5.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..54cdf7c21eec02f5dd52a7f7f2a8245f4090e2a9
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qt5.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qt5agg.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qt5agg.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1613483a413972d808cc078043eb18b64d4ee46e
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qt5agg.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qt5cairo.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qt5cairo.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d77aa10609fe179e6bb8c00cbcd0ea81bd523119
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qt5cairo.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qtagg.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qtagg.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..20daed31336789b750de0c6c226f10b602c35073
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qtagg.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qtcairo.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qtcairo.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b29aea1280a2ed9b7ab52c58979a5446de321f6e
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_qtcairo.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_svg.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_svg.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..17eafcb4b567d397595687142eae2558c9dde10e
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_svg.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_template.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_template.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..04da15767eb6bd4eb06e8c3a8dfdec2b46f6919a
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_template.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_tkagg.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_tkagg.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a8735638dff80927f204e6f91aec447984d153d1
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_tkagg.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_tkcairo.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_tkcairo.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c610c8b58bb28069890840ca61ad6efe4d072cdb
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_tkcairo.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_webagg.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_webagg.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..75ab2d1491da26e7011a6aa50531b4501f5a33c9
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_webagg.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_webagg_core.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_webagg_core.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..252e00c0546ce945a3e624267f775a8d5048df24
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_webagg_core.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_wx.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_wx.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..690df6d840de81f7a5b179c47b4af7fe2ec1b9c0
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_wx.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_wxagg.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_wxagg.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e1e94b12a051d982699402e96e34cf89061c1ba0
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_wxagg.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_wxcairo.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_wxcairo.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c1676d3d98785e7bf1b24072ac86848eb45df850
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/backend_wxcairo.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/qt_compat.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/qt_compat.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..59412798179fb4bfcf22a3e36f2a95681d7a4bda
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/qt_compat.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/registry.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/registry.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b447974c8f94d1561fd9743b1e1032c2a4ed6d48
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/__pycache__/registry.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/_backend_agg.pyi b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/_backend_agg.pyi
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/_backend_gtk.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/_backend_gtk.py
new file mode 100644
index 0000000000000000000000000000000000000000..ac443730e28a89ffb8c31d9163e343835aa6d9fe
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/_backend_gtk.py
@@ -0,0 +1,331 @@
+"""
+Common code for GTK3 and GTK4 backends.
+"""
+
+import logging
+import sys
+
+import matplotlib as mpl
+from matplotlib import _api, backend_tools, cbook
+from matplotlib._pylab_helpers import Gcf
+from matplotlib.backend_bases import (
+ _Backend, FigureCanvasBase, FigureManagerBase, NavigationToolbar2,
+ TimerBase)
+from matplotlib.backend_tools import Cursors
+
+import gi
+# The GTK3/GTK4 backends will have already called `gi.require_version` to set
+# the desired GTK.
+from gi.repository import Gdk, Gio, GLib, Gtk
+
+
+try:
+ gi.require_foreign("cairo")
+except ImportError as e:
+ raise ImportError("Gtk-based backends require cairo") from e
+
+_log = logging.getLogger(__name__)
+_application = None # Placeholder
+
+
+def _shutdown_application(app):
+ # The application might prematurely shut down if Ctrl-C'd out of IPython,
+ # so close all windows.
+ for win in app.get_windows():
+ win.close()
+ # The PyGObject wrapper incorrectly thinks that None is not allowed, or we
+ # would call this:
+ # Gio.Application.set_default(None)
+ # Instead, we set this property and ignore default applications with it:
+ app._created_by_matplotlib = True
+ global _application
+ _application = None
+
+
+def _create_application():
+ global _application
+
+ if _application is None:
+ app = Gio.Application.get_default()
+ if app is None or getattr(app, '_created_by_matplotlib', False):
+ # display_is_valid returns False only if on Linux and neither X11
+ # nor Wayland display can be opened.
+ if not mpl._c_internal_utils.display_is_valid():
+ raise RuntimeError('Invalid DISPLAY variable')
+ _application = Gtk.Application.new('org.matplotlib.Matplotlib3',
+ Gio.ApplicationFlags.NON_UNIQUE)
+ # The activate signal must be connected, but we don't care for
+ # handling it, since we don't do any remote processing.
+ _application.connect('activate', lambda *args, **kwargs: None)
+ _application.connect('shutdown', _shutdown_application)
+ _application.register()
+ cbook._setup_new_guiapp()
+ else:
+ _application = app
+
+ return _application
+
+
+def mpl_to_gtk_cursor_name(mpl_cursor):
+ return _api.check_getitem({
+ Cursors.MOVE: "move",
+ Cursors.HAND: "pointer",
+ Cursors.POINTER: "default",
+ Cursors.SELECT_REGION: "crosshair",
+ Cursors.WAIT: "wait",
+ Cursors.RESIZE_HORIZONTAL: "ew-resize",
+ Cursors.RESIZE_VERTICAL: "ns-resize",
+ }, cursor=mpl_cursor)
+
+
+class TimerGTK(TimerBase):
+ """Subclass of `.TimerBase` using GTK timer events."""
+
+ def __init__(self, *args, **kwargs):
+ self._timer = None
+ super().__init__(*args, **kwargs)
+
+ def _timer_start(self):
+ # Need to stop it, otherwise we potentially leak a timer id that will
+ # never be stopped.
+ self._timer_stop()
+ self._timer = GLib.timeout_add(self._interval, self._on_timer)
+
+ def _timer_stop(self):
+ if self._timer is not None:
+ GLib.source_remove(self._timer)
+ self._timer = None
+
+ def _timer_set_interval(self):
+ # Only stop and restart it if the timer has already been started.
+ if self._timer is not None:
+ self._timer_stop()
+ self._timer_start()
+
+ def _on_timer(self):
+ super()._on_timer()
+
+ # Gtk timeout_add() requires that the callback returns True if it
+ # is to be called again.
+ if self.callbacks and not self._single:
+ return True
+ else:
+ self._timer = None
+ return False
+
+
+class _FigureCanvasGTK(FigureCanvasBase):
+ _timer_cls = TimerGTK
+
+
+class _FigureManagerGTK(FigureManagerBase):
+ """
+ Attributes
+ ----------
+ canvas : `FigureCanvas`
+ The FigureCanvas instance
+ num : int or str
+ The Figure number
+ toolbar : Gtk.Toolbar or Gtk.Box
+ The toolbar
+ vbox : Gtk.VBox
+ The Gtk.VBox containing the canvas and toolbar
+ window : Gtk.Window
+ The Gtk.Window
+ """
+
+ def __init__(self, canvas, num):
+ self._gtk_ver = gtk_ver = Gtk.get_major_version()
+
+ app = _create_application()
+ self.window = Gtk.Window()
+ app.add_window(self.window)
+ super().__init__(canvas, num)
+
+ if gtk_ver == 3:
+ icon_ext = "png" if sys.platform == "win32" else "svg"
+ self.window.set_icon_from_file(
+ str(cbook._get_data_path(f"images/matplotlib.{icon_ext}")))
+
+ self.vbox = Gtk.Box()
+ self.vbox.set_property("orientation", Gtk.Orientation.VERTICAL)
+
+ if gtk_ver == 3:
+ self.window.add(self.vbox)
+ self.vbox.show()
+ self.canvas.show()
+ self.vbox.pack_start(self.canvas, True, True, 0)
+ elif gtk_ver == 4:
+ self.window.set_child(self.vbox)
+ self.vbox.prepend(self.canvas)
+
+ # calculate size for window
+ w, h = self.canvas.get_width_height()
+
+ if self.toolbar is not None:
+ if gtk_ver == 3:
+ self.toolbar.show()
+ self.vbox.pack_end(self.toolbar, False, False, 0)
+ elif gtk_ver == 4:
+ sw = Gtk.ScrolledWindow(vscrollbar_policy=Gtk.PolicyType.NEVER)
+ sw.set_child(self.toolbar)
+ self.vbox.append(sw)
+ min_size, nat_size = self.toolbar.get_preferred_size()
+ h += nat_size.height
+
+ self.window.set_default_size(w, h)
+
+ self._destroying = False
+ self.window.connect("destroy", lambda *args: Gcf.destroy(self))
+ self.window.connect({3: "delete_event", 4: "close-request"}[gtk_ver],
+ lambda *args: Gcf.destroy(self))
+ if mpl.is_interactive():
+ self.window.show()
+ self.canvas.draw_idle()
+
+ self.canvas.grab_focus()
+
+ def destroy(self, *args):
+ if self._destroying:
+ # Otherwise, this can be called twice when the user presses 'q',
+ # which calls Gcf.destroy(self), then this destroy(), then triggers
+ # Gcf.destroy(self) once again via
+ # `connect("destroy", lambda *args: Gcf.destroy(self))`.
+ return
+ self._destroying = True
+ self.window.destroy()
+ self.canvas.destroy()
+
+ @classmethod
+ def start_main_loop(cls):
+ global _application
+ if _application is None:
+ return
+
+ try:
+ _application.run() # Quits when all added windows close.
+ except KeyboardInterrupt:
+ # Ensure all windows can process their close event from
+ # _shutdown_application.
+ context = GLib.MainContext.default()
+ while context.pending():
+ context.iteration(True)
+ raise
+ finally:
+ # Running after quit is undefined, so create a new one next time.
+ _application = None
+
+ def show(self):
+ # show the figure window
+ self.window.show()
+ self.canvas.draw()
+ if mpl.rcParams["figure.raise_window"]:
+ meth_name = {3: "get_window", 4: "get_surface"}[self._gtk_ver]
+ if getattr(self.window, meth_name)():
+ self.window.present()
+ else:
+ # If this is called by a callback early during init,
+ # self.window (a GtkWindow) may not have an associated
+ # low-level GdkWindow (on GTK3) or GdkSurface (on GTK4) yet,
+ # and present() would crash.
+ _api.warn_external("Cannot raise window yet to be setup")
+
+ def full_screen_toggle(self):
+ is_fullscreen = {
+ 3: lambda w: (w.get_window().get_state()
+ & Gdk.WindowState.FULLSCREEN),
+ 4: lambda w: w.is_fullscreen(),
+ }[self._gtk_ver]
+ if is_fullscreen(self.window):
+ self.window.unfullscreen()
+ else:
+ self.window.fullscreen()
+
+ def get_window_title(self):
+ return self.window.get_title()
+
+ def set_window_title(self, title):
+ self.window.set_title(title)
+
+ def resize(self, width, height):
+ width = int(width / self.canvas.device_pixel_ratio)
+ height = int(height / self.canvas.device_pixel_ratio)
+ if self.toolbar:
+ min_size, nat_size = self.toolbar.get_preferred_size()
+ height += nat_size.height
+ canvas_size = self.canvas.get_allocation()
+ if self._gtk_ver >= 4 or canvas_size.width == canvas_size.height == 1:
+ # A canvas size of (1, 1) cannot exist in most cases, because
+ # window decorations would prevent such a small window. This call
+ # must be before the window has been mapped and widgets have been
+ # sized, so just change the window's starting size.
+ self.window.set_default_size(width, height)
+ else:
+ self.window.resize(width, height)
+
+
+class _NavigationToolbar2GTK(NavigationToolbar2):
+ # Must be implemented in GTK3/GTK4 backends:
+ # * __init__
+ # * save_figure
+
+ def set_message(self, s):
+ escaped = GLib.markup_escape_text(s)
+ self.message.set_markup(f'{escaped}')
+
+ def draw_rubberband(self, event, x0, y0, x1, y1):
+ height = self.canvas.figure.bbox.height
+ y1 = height - y1
+ y0 = height - y0
+ rect = [int(val) for val in (x0, y0, x1 - x0, y1 - y0)]
+ self.canvas._draw_rubberband(rect)
+
+ def remove_rubberband(self):
+ self.canvas._draw_rubberband(None)
+
+ def _update_buttons_checked(self):
+ for name, active in [("Pan", "PAN"), ("Zoom", "ZOOM")]:
+ button = self._gtk_ids.get(name)
+ if button:
+ with button.handler_block(button._signal_handler):
+ button.set_active(self.mode.name == active)
+
+ def pan(self, *args):
+ super().pan(*args)
+ self._update_buttons_checked()
+
+ def zoom(self, *args):
+ super().zoom(*args)
+ self._update_buttons_checked()
+
+ def set_history_buttons(self):
+ can_backward = self._nav_stack._pos > 0
+ can_forward = self._nav_stack._pos < len(self._nav_stack) - 1
+ if 'Back' in self._gtk_ids:
+ self._gtk_ids['Back'].set_sensitive(can_backward)
+ if 'Forward' in self._gtk_ids:
+ self._gtk_ids['Forward'].set_sensitive(can_forward)
+
+
+class RubberbandGTK(backend_tools.RubberbandBase):
+ def draw_rubberband(self, x0, y0, x1, y1):
+ _NavigationToolbar2GTK.draw_rubberband(
+ self._make_classic_style_pseudo_toolbar(), None, x0, y0, x1, y1)
+
+ def remove_rubberband(self):
+ _NavigationToolbar2GTK.remove_rubberband(
+ self._make_classic_style_pseudo_toolbar())
+
+
+class ConfigureSubplotsGTK(backend_tools.ConfigureSubplotsBase):
+ def trigger(self, *args):
+ _NavigationToolbar2GTK.configure_subplots(self, None)
+
+
+class _BackendGTK(_Backend):
+ backend_version = "{}.{}.{}".format(
+ Gtk.get_major_version(),
+ Gtk.get_minor_version(),
+ Gtk.get_micro_version(),
+ )
+ mainloop = _FigureManagerGTK.start_main_loop
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/_backend_pdf_ps.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/_backend_pdf_ps.py
new file mode 100644
index 0000000000000000000000000000000000000000..a2a878d54156f7fb54ad31c1c109f7a5be23e0ee
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/_backend_pdf_ps.py
@@ -0,0 +1,189 @@
+"""
+Common functionality between the PDF and PS backends.
+"""
+
+from io import BytesIO
+import functools
+import logging
+
+from fontTools import subset
+
+import matplotlib as mpl
+from .. import font_manager, ft2font
+from .._afm import AFM
+from ..backend_bases import RendererBase
+
+
+@functools.lru_cache(50)
+def _cached_get_afm_from_fname(fname):
+ with open(fname, "rb") as fh:
+ return AFM(fh)
+
+
+def get_glyphs_subset(fontfile, characters):
+ """
+ Subset a TTF font
+
+ Reads the named fontfile and restricts the font to the characters.
+
+ Parameters
+ ----------
+ fontfile : str
+ Path to the font file
+ characters : str
+ Continuous set of characters to include in subset
+
+ Returns
+ -------
+ fontTools.ttLib.ttFont.TTFont
+ An open font object representing the subset, which needs to
+ be closed by the caller.
+ """
+
+ options = subset.Options(glyph_names=True, recommended_glyphs=True)
+
+ # Prevent subsetting extra tables.
+ options.drop_tables += [
+ 'FFTM', # FontForge Timestamp.
+ 'PfEd', # FontForge personal table.
+ 'BDF', # X11 BDF header.
+ 'meta', # Metadata stores design/supported languages (meaningless for subsets).
+ 'MERG', # Merge Table.
+ 'TSIV', # Microsoft Visual TrueType extension.
+ 'Zapf', # Information about the individual glyphs in the font.
+ 'bdat', # The bitmap data table.
+ 'bloc', # The bitmap location table.
+ 'cidg', # CID to Glyph ID table (Apple Advanced Typography).
+ 'fdsc', # The font descriptors table.
+ 'feat', # Feature name table (Apple Advanced Typography).
+ 'fmtx', # The Font Metrics Table.
+ 'fond', # Data-fork font information (Apple Advanced Typography).
+ 'just', # The justification table (Apple Advanced Typography).
+ 'kerx', # An extended kerning table (Apple Advanced Typography).
+ 'ltag', # Language Tag.
+ 'morx', # Extended Glyph Metamorphosis Table.
+ 'trak', # Tracking table.
+ 'xref', # The cross-reference table (some Apple font tooling information).
+ ]
+ # if fontfile is a ttc, specify font number
+ if fontfile.endswith(".ttc"):
+ options.font_number = 0
+
+ font = subset.load_font(fontfile, options)
+ subsetter = subset.Subsetter(options=options)
+ subsetter.populate(text=characters)
+ subsetter.subset(font)
+ return font
+
+
+def font_as_file(font):
+ """
+ Convert a TTFont object into a file-like object.
+
+ Parameters
+ ----------
+ font : fontTools.ttLib.ttFont.TTFont
+ A font object
+
+ Returns
+ -------
+ BytesIO
+ A file object with the font saved into it
+ """
+ fh = BytesIO()
+ font.save(fh, reorderTables=False)
+ return fh
+
+
+class CharacterTracker:
+ """
+ Helper for font subsetting by the pdf and ps backends.
+
+ Maintains a mapping of font paths to the set of character codepoints that
+ are being used from that font.
+ """
+
+ def __init__(self):
+ self.used = {}
+
+ def track(self, font, s):
+ """Record that string *s* is being typeset using font *font*."""
+ char_to_font = font._get_fontmap(s)
+ for _c, _f in char_to_font.items():
+ self.used.setdefault(_f.fname, set()).add(ord(_c))
+
+ def track_glyph(self, font, glyph):
+ """Record that codepoint *glyph* is being typeset using font *font*."""
+ self.used.setdefault(font.fname, set()).add(glyph)
+
+
+class RendererPDFPSBase(RendererBase):
+ # The following attributes must be defined by the subclasses:
+ # - _afm_font_dir
+ # - _use_afm_rc_name
+
+ def __init__(self, width, height):
+ super().__init__()
+ self.width = width
+ self.height = height
+
+ def flipy(self):
+ # docstring inherited
+ return False # y increases from bottom to top.
+
+ def option_scale_image(self):
+ # docstring inherited
+ return True # PDF and PS support arbitrary image scaling.
+
+ def option_image_nocomposite(self):
+ # docstring inherited
+ # Decide whether to composite image based on rcParam value.
+ return not mpl.rcParams["image.composite_image"]
+
+ def get_canvas_width_height(self):
+ # docstring inherited
+ return self.width * 72.0, self.height * 72.0
+
+ def get_text_width_height_descent(self, s, prop, ismath):
+ # docstring inherited
+ if ismath == "TeX":
+ return super().get_text_width_height_descent(s, prop, ismath)
+ elif ismath:
+ parse = self._text2path.mathtext_parser.parse(s, 72, prop)
+ return parse.width, parse.height, parse.depth
+ elif mpl.rcParams[self._use_afm_rc_name]:
+ font = self._get_font_afm(prop)
+ l, b, w, h, d = font.get_str_bbox_and_descent(s)
+ scale = prop.get_size_in_points() / 1000
+ w *= scale
+ h *= scale
+ d *= scale
+ return w, h, d
+ else:
+ font = self._get_font_ttf(prop)
+ font.set_text(s, 0.0, flags=ft2font.LoadFlags.NO_HINTING)
+ w, h = font.get_width_height()
+ d = font.get_descent()
+ scale = 1 / 64
+ w *= scale
+ h *= scale
+ d *= scale
+ return w, h, d
+
+ def _get_font_afm(self, prop):
+ fname = font_manager.findfont(
+ prop, fontext="afm", directory=self._afm_font_dir)
+ return _cached_get_afm_from_fname(fname)
+
+ def _get_font_ttf(self, prop):
+ fnames = font_manager.fontManager._find_fonts_by_props(prop)
+ try:
+ font = font_manager.get_font(fnames)
+ font.clear()
+ font.set_size(prop.get_size_in_points(), 72)
+ return font
+ except RuntimeError:
+ logging.getLogger(__name__).warning(
+ "The PostScript/PDF backend does not currently "
+ "support the selected font (%s).", fnames)
+ raise
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/_backend_tk.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/_backend_tk.py
new file mode 100644
index 0000000000000000000000000000000000000000..eaf868fd8becaf503f926e50eb7e7203dcbee202
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/matplotlib/backends/_backend_tk.py
@@ -0,0 +1,1077 @@
+import uuid
+import weakref
+from contextlib import contextmanager
+import logging
+import math
+import os.path
+import pathlib
+import sys
+import tkinter as tk
+import tkinter.filedialog
+import tkinter.font
+import tkinter.messagebox
+from tkinter.simpledialog import SimpleDialog
+
+import numpy as np
+from PIL import Image, ImageTk
+
+import matplotlib as mpl
+from matplotlib import _api, backend_tools, cbook, _c_internal_utils
+from matplotlib.backend_bases import (
+ _Backend, FigureCanvasBase, FigureManagerBase, NavigationToolbar2,
+ TimerBase, ToolContainerBase, cursors, _Mode, MouseButton,
+ CloseEvent, KeyEvent, LocationEvent, MouseEvent, ResizeEvent)
+from matplotlib._pylab_helpers import Gcf
+from . import _tkagg
+from ._tkagg import TK_PHOTO_COMPOSITE_OVERLAY, TK_PHOTO_COMPOSITE_SET
+
+
+_log = logging.getLogger(__name__)
+cursord = {
+ cursors.MOVE: "fleur",
+ cursors.HAND: "hand2",
+ cursors.POINTER: "arrow",
+ cursors.SELECT_REGION: "crosshair",
+ cursors.WAIT: "watch",
+ cursors.RESIZE_HORIZONTAL: "sb_h_double_arrow",
+ cursors.RESIZE_VERTICAL: "sb_v_double_arrow",
+}
+
+
+@contextmanager
+def _restore_foreground_window_at_end():
+ foreground = _c_internal_utils.Win32_GetForegroundWindow()
+ try:
+ yield
+ finally:
+ if foreground and mpl.rcParams['tk.window_focus']:
+ _c_internal_utils.Win32_SetForegroundWindow(foreground)
+
+
+_blit_args = {}
+# Initialize to a non-empty string that is not a Tcl command
+_blit_tcl_name = "mpl_blit_" + uuid.uuid4().hex
+
+
+def _blit(argsid):
+ """
+ Thin wrapper to blit called via tkapp.call.
+
+ *argsid* is a unique string identifier to fetch the correct arguments from
+ the ``_blit_args`` dict, since arguments cannot be passed directly.
+ """
+ photoimage, data, offsets, bbox, comp_rule = _blit_args.pop(argsid)
+ if not photoimage.tk.call("info", "commands", photoimage):
+ return
+ _tkagg.blit(photoimage.tk.interpaddr(), str(photoimage), data, comp_rule, offsets,
+ bbox)
+
+
+def blit(photoimage, aggimage, offsets, bbox=None):
+ """
+ Blit *aggimage* to *photoimage*.
+
+ *offsets* is a tuple describing how to fill the ``offset`` field of the
+ ``Tk_PhotoImageBlock`` struct: it should be (0, 1, 2, 3) for RGBA8888 data,
+ (2, 1, 0, 3) for little-endian ARBG32 (i.e. GBRA8888) data and (1, 2, 3, 0)
+ for big-endian ARGB32 (i.e. ARGB8888) data.
+
+ If *bbox* is passed, it defines the region that gets blitted. That region
+ will be composed with the previous data according to the alpha channel.
+ Blitting will be clipped to pixels inside the canvas, including silently
+ doing nothing if the *bbox* region is entirely outside the canvas.
+
+ Tcl events must be dispatched to trigger a blit from a non-Tcl thread.
+ """
+ data = np.asarray(aggimage)
+ height, width = data.shape[:2]
+ if bbox is not None:
+ (x1, y1), (x2, y2) = bbox.__array__()
+ x1 = max(math.floor(x1), 0)
+ x2 = min(math.ceil(x2), width)
+ y1 = max(math.floor(y1), 0)
+ y2 = min(math.ceil(y2), height)
+ if (x1 > x2) or (y1 > y2):
+ return
+ bboxptr = (x1, x2, y1, y2)
+ comp_rule = TK_PHOTO_COMPOSITE_OVERLAY
+ else:
+ bboxptr = (0, width, 0, height)
+ comp_rule = TK_PHOTO_COMPOSITE_SET
+
+ # NOTE: _tkagg.blit is thread unsafe and will crash the process if called
+ # from a thread (GH#13293). Instead of blanking and blitting here,
+ # use tkapp.call to post a cross-thread event if this function is called
+ # from a non-Tcl thread.
+
+ # tkapp.call coerces all arguments to strings, so to avoid string parsing
+ # within _blit, pack up the arguments into a global data structure.
+ args = photoimage, data, offsets, bboxptr, comp_rule
+ # Need a unique key to avoid thread races.
+ # Again, make the key a string to avoid string parsing in _blit.
+ argsid = str(id(args))
+ _blit_args[argsid] = args
+
+ try:
+ photoimage.tk.call(_blit_tcl_name, argsid)
+ except tk.TclError as e:
+ if "invalid command name" not in str(e):
+ raise
+ photoimage.tk.createcommand(_blit_tcl_name, _blit)
+ photoimage.tk.call(_blit_tcl_name, argsid)
+
+
+class TimerTk(TimerBase):
+ """Subclass of `backend_bases.TimerBase` using Tk timer events."""
+
+ def __init__(self, parent, *args, **kwargs):
+ self._timer = None
+ super().__init__(*args, **kwargs)
+ self.parent = parent
+
+ def _timer_start(self):
+ self._timer_stop()
+ self._timer = self.parent.after(self._interval, self._on_timer)
+
+ def _timer_stop(self):
+ if self._timer is not None:
+ self.parent.after_cancel(self._timer)
+ self._timer = None
+
+ def _on_timer(self):
+ super()._on_timer()
+ # Tk after() is only a single shot, so we need to add code here to
+ # reset the timer if we're not operating in single shot mode. However,
+ # if _timer is None, this means that _timer_stop has been called; so
+ # don't recreate the timer in that case.
+ if not self._single and self._timer:
+ if self._interval > 0:
+ self._timer = self.parent.after(self._interval, self._on_timer)
+ else:
+ # Edge case: Tcl after 0 *prepends* events to the queue
+ # so a 0 interval does not allow any other events to run.
+ # This incantation is cancellable and runs as fast as possible
+ # while also allowing events and drawing every frame. GH#18236
+ self._timer = self.parent.after_idle(
+ lambda: self.parent.after(self._interval, self._on_timer)
+ )
+ else:
+ self._timer = None
+
+
+class FigureCanvasTk(FigureCanvasBase):
+ required_interactive_framework = "tk"
+ manager_class = _api.classproperty(lambda cls: FigureManagerTk)
+
+ def __init__(self, figure=None, master=None):
+ super().__init__(figure)
+ self._idle_draw_id = None
+ self._event_loop_id = None
+ w, h = self.get_width_height(physical=True)
+ self._tkcanvas = tk.Canvas(
+ master=master, background="white",
+ width=w, height=h, borderwidth=0, highlightthickness=0)
+ self._tkphoto = tk.PhotoImage(
+ master=self._tkcanvas, width=w, height=h)
+ self._tkcanvas_image_region = self._tkcanvas.create_image(
+ w//2, h//2, image=self._tkphoto)
+ self._tkcanvas.bind("", self.resize)
+ self._tkcanvas.bind("