tags inside of any
+ block-level elements, e.g. transform word
to
+ word
"""
+ doc = parse_html(html, cleanup=False)
+ _fixup_ins_del_tags(doc)
+ html = serialize_html_fragment(doc, skip_outer=True)
+ return html
+
+def serialize_html_fragment(el, skip_outer=False):
+ """ Serialize a single lxml element as HTML. The serialized form
+ includes the elements tail.
+
+ If skip_outer is true, then don't serialize the outermost tag
+ """
+ assert not isinstance(el, str), (
+ f"You should pass in an element, not a string like {el!r}")
+ html = etree.tostring(el, method="html", encoding='unicode')
+ if skip_outer:
+ # Get rid of the extra starting tag:
+ html = html[html.find('>')+1:]
+ # Get rid of the extra end tag:
+ html = html[:html.rfind('<')]
+ return html.strip()
+ else:
+ return html
+
+
+@cython.cfunc
+def _fixup_ins_del_tags(doc):
+ """fixup_ins_del_tags that works on an lxml document in-place
+ """
+ for el in list(doc.iter('ins', 'del')):
+ if not _contains_block_level_tag(el):
+ continue
+ _move_el_inside_block(el, tag=el.tag)
+ el.drop_tag()
+ #_merge_element_contents(el)
+
+
+@cython.cfunc
+def _contains_block_level_tag(el):
+ """True if the element contains any block-level elements, like ,
, etc.
+ """
+ for el in el.iter(*any_block_level_tag):
+ return True
+ return False
+
+
+@cython.cfunc
+def _move_el_inside_block(el, tag):
+ """ helper for _fixup_ins_del_tags; actually takes the etc tags
+ and moves them inside any block-level tags. """
+ makeelement = el.makeelement
+ for block_level_el in el.iter(*any_block_level_tag):
+ if block_level_el is not el:
+ break
+ else:
+ # No block-level tags in any child
+ children_tag = makeelement(tag)
+ children_tag.text = el.text
+ el.text = None
+ children_tag.extend(iter(el))
+ el[:] = [children_tag]
+ return
+
+ for child in list(el):
+ if _contains_block_level_tag(child):
+ _move_el_inside_block(child, tag)
+ if child.tail:
+ tail_tag = makeelement(tag)
+ tail_tag.text = child.tail
+ child.tail = None
+ child.addnext(tail_tag)
+ else:
+ child_tag = makeelement(tag)
+ el.replace(child, child_tag)
+ child_tag.append(child)
+ if el.text:
+ text_tag = makeelement(tag)
+ text_tag.text = el.text
+ el.text = None
+ el.insert(0, text_tag)
+
+
+def _merge_element_contents(el):
+ """
+ Removes an element, but merges its contents into its place, e.g.,
+ given Hi there! , if you remove the element you get
+ Hi there!
+ """
+ parent = el.getparent()
+ text = el.text
+ tail = el.tail
+ if tail:
+ if not len(el):
+ text = (text or '') + tail
+ else:
+ el[-1].tail = (el[-1].tail or '') + tail
+ index = parent.index(el)
+ if text:
+ previous = el.getprevious()
+ if previous is None:
+ parent.text = (parent.text or '') + text
+ else:
+ previous.tail = (previous.tail or '') + text
+ parent[index:index+1] = el.getchildren()
+
+
+@cython.final
+@cython.cclass
+class InsensitiveSequenceMatcher(SequenceMatcher):
+ """
+ Acts like SequenceMatcher, but tries not to find very small equal
+ blocks amidst large spans of changes
+ """
+
+ threshold = 2
+
+ @cython.cfunc
+ def get_matching_blocks(self) -> list:
+ size: cython.Py_ssize_t = min(len(self.b), len(self.b))
+ threshold: cython.Py_ssize_t = self.threshold
+ threshold = min(threshold, size // 4)
+ actual = SequenceMatcher.get_matching_blocks(self)
+ return [item for item in actual
+ if item[2] > threshold
+ or not item[2]]
+
+
+if __name__ == '__main__':
+ from lxml.html import _diffcommand
+ _diffcommand.main()
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/formfill.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/formfill.py
new file mode 100644
index 0000000000000000000000000000000000000000..9741c28b747c8f84114d415ac6b4f76169b406aa
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/formfill.py
@@ -0,0 +1,299 @@
+from lxml.etree import XPath, ElementBase
+from lxml.html import fromstring, XHTML_NAMESPACE
+from lxml.html import _forms_xpath, _options_xpath, _nons, _transform_result
+from lxml.html import defs
+import copy
+
+try:
+ basestring
+except NameError:
+ # Python 3
+ basestring = str
+
+__all__ = ['FormNotFound', 'fill_form', 'fill_form_html',
+ 'insert_errors', 'insert_errors_html',
+ 'DefaultErrorCreator']
+
+class FormNotFound(LookupError):
+ """
+ Raised when no form can be found
+ """
+
+_form_name_xpath = XPath('descendant-or-self::form[name=$name]|descendant-or-self::x:form[name=$name]', namespaces={'x':XHTML_NAMESPACE})
+_input_xpath = XPath('|'.join(['descendant-or-self::'+_tag for _tag in ('input','select','textarea','x:input','x:select','x:textarea')]),
+ namespaces={'x':XHTML_NAMESPACE})
+_label_for_xpath = XPath('//label[@for=$for_id]|//x:label[@for=$for_id]',
+ namespaces={'x':XHTML_NAMESPACE})
+_name_xpath = XPath('descendant-or-self::*[@name=$name]')
+
+def fill_form(
+ el,
+ values,
+ form_id=None,
+ form_index=None,
+ ):
+ el = _find_form(el, form_id=form_id, form_index=form_index)
+ _fill_form(el, values)
+
+def fill_form_html(html, values, form_id=None, form_index=None):
+ result_type = type(html)
+ if isinstance(html, basestring):
+ doc = fromstring(html)
+ else:
+ doc = copy.deepcopy(html)
+ fill_form(doc, values, form_id=form_id, form_index=form_index)
+ return _transform_result(result_type, doc)
+
+def _fill_form(el, values):
+ counts = {}
+ if hasattr(values, 'mixed'):
+ # For Paste request parameters
+ values = values.mixed()
+ inputs = _input_xpath(el)
+ for input in inputs:
+ name = input.get('name')
+ if not name:
+ continue
+ if _takes_multiple(input):
+ value = values.get(name, [])
+ if not isinstance(value, (list, tuple)):
+ value = [value]
+ _fill_multiple(input, value)
+ elif name not in values:
+ continue
+ else:
+ index = counts.get(name, 0)
+ counts[name] = index + 1
+ value = values[name]
+ if isinstance(value, (list, tuple)):
+ try:
+ value = value[index]
+ except IndexError:
+ continue
+ elif index > 0:
+ continue
+ _fill_single(input, value)
+
+def _takes_multiple(input):
+ if _nons(input.tag) == 'select' and input.get('multiple'):
+ # FIXME: multiple="0"?
+ return True
+ type = input.get('type', '').lower()
+ if type in ('radio', 'checkbox'):
+ return True
+ return False
+
+def _fill_multiple(input, value):
+ type = input.get('type', '').lower()
+ if type == 'checkbox':
+ v = input.get('value')
+ if v is None:
+ if not value:
+ result = False
+ else:
+ result = value[0]
+ if isinstance(value, basestring):
+ # The only valid "on" value for an unnamed checkbox is 'on'
+ result = result == 'on'
+ _check(input, result)
+ else:
+ _check(input, v in value)
+ elif type == 'radio':
+ v = input.get('value')
+ _check(input, v in value)
+ else:
+ assert _nons(input.tag) == 'select'
+ for option in _options_xpath(input):
+ v = option.get('value')
+ if v is None:
+ # This seems to be the default, at least on IE
+ # FIXME: but I'm not sure
+ v = option.text_content()
+ _select(option, v in value)
+
+def _check(el, check):
+ if check:
+ el.set('checked', '')
+ else:
+ if 'checked' in el.attrib:
+ del el.attrib['checked']
+
+def _select(el, select):
+ if select:
+ el.set('selected', '')
+ else:
+ if 'selected' in el.attrib:
+ del el.attrib['selected']
+
+def _fill_single(input, value):
+ if _nons(input.tag) == 'textarea':
+ input.text = value
+ else:
+ input.set('value', value)
+
+def _find_form(el, form_id=None, form_index=None):
+ if form_id is None and form_index is None:
+ forms = _forms_xpath(el)
+ for form in forms:
+ return form
+ raise FormNotFound(
+ "No forms in page")
+ if form_id is not None:
+ form = el.get_element_by_id(form_id)
+ if form is not None:
+ return form
+ forms = _form_name_xpath(el, name=form_id)
+ if forms:
+ return forms[0]
+ else:
+ raise FormNotFound(
+ "No form with the name or id of %r (forms: %s)"
+ % (id, ', '.join(_find_form_ids(el))))
+ if form_index is not None:
+ forms = _forms_xpath(el)
+ try:
+ return forms[form_index]
+ except IndexError:
+ raise FormNotFound(
+ "There is no form with the index %r (%i forms found)"
+ % (form_index, len(forms)))
+
+def _find_form_ids(el):
+ forms = _forms_xpath(el)
+ if not forms:
+ yield '(no forms)'
+ return
+ for index, form in enumerate(forms):
+ if form.get('id'):
+ if form.get('name'):
+ yield '%s or %s' % (form.get('id'),
+ form.get('name'))
+ else:
+ yield form.get('id')
+ elif form.get('name'):
+ yield form.get('name')
+ else:
+ yield '(unnamed form %s)' % index
+
+############################################################
+## Error filling
+############################################################
+
+class DefaultErrorCreator:
+ insert_before = True
+ block_inside = True
+ error_container_tag = 'div'
+ error_message_class = 'error-message'
+ error_block_class = 'error-block'
+ default_message = "Invalid"
+
+ def __init__(self, **kw):
+ for name, value in kw.items():
+ if not hasattr(self, name):
+ raise TypeError(
+ "Unexpected keyword argument: %s" % name)
+ setattr(self, name, value)
+
+ def __call__(self, el, is_block, message):
+ error_el = el.makeelement(self.error_container_tag)
+ if self.error_message_class:
+ error_el.set('class', self.error_message_class)
+ if is_block and self.error_block_class:
+ error_el.set('class', error_el.get('class', '')+' '+self.error_block_class)
+ if message is None or message == '':
+ message = self.default_message
+ if isinstance(message, ElementBase):
+ error_el.append(message)
+ else:
+ assert isinstance(message, basestring), (
+ "Bad message; should be a string or element: %r" % message)
+ error_el.text = message or self.default_message
+ if is_block and self.block_inside:
+ if self.insert_before:
+ error_el.tail = el.text
+ el.text = None
+ el.insert(0, error_el)
+ else:
+ el.append(error_el)
+ else:
+ parent = el.getparent()
+ pos = parent.index(el)
+ if self.insert_before:
+ parent.insert(pos, error_el)
+ else:
+ error_el.tail = el.tail
+ el.tail = None
+ parent.insert(pos+1, error_el)
+
+default_error_creator = DefaultErrorCreator()
+
+
+def insert_errors(
+ el,
+ errors,
+ form_id=None,
+ form_index=None,
+ error_class="error",
+ error_creator=default_error_creator,
+ ):
+ el = _find_form(el, form_id=form_id, form_index=form_index)
+ for name, error in errors.items():
+ if error is None:
+ continue
+ for error_el, message in _find_elements_for_name(el, name, error):
+ assert isinstance(message, (basestring, type(None), ElementBase)), (
+ "Bad message: %r" % message)
+ _insert_error(error_el, message, error_class, error_creator)
+
+def insert_errors_html(html, values, **kw):
+ result_type = type(html)
+ if isinstance(html, basestring):
+ doc = fromstring(html)
+ else:
+ doc = copy.deepcopy(html)
+ insert_errors(doc, values, **kw)
+ return _transform_result(result_type, doc)
+
+def _insert_error(el, error, error_class, error_creator):
+ if _nons(el.tag) in defs.empty_tags or _nons(el.tag) == 'textarea':
+ is_block = False
+ else:
+ is_block = True
+ if _nons(el.tag) != 'form' and error_class:
+ _add_class(el, error_class)
+ if el.get('id'):
+ labels = _label_for_xpath(el, for_id=el.get('id'))
+ if labels:
+ for label in labels:
+ _add_class(label, error_class)
+ error_creator(el, is_block, error)
+
+def _add_class(el, class_name):
+ if el.get('class'):
+ el.set('class', el.get('class')+' '+class_name)
+ else:
+ el.set('class', class_name)
+
+def _find_elements_for_name(form, name, error):
+ if name is None:
+ # An error for the entire form
+ yield form, error
+ return
+ if name.startswith('#'):
+ # By id
+ el = form.get_element_by_id(name[1:])
+ if el is not None:
+ yield el, error
+ return
+ els = _name_xpath(form, name=name)
+ if not els:
+ # FIXME: should this raise an exception?
+ return
+ if not isinstance(error, (list, tuple)):
+ yield els[0], error
+ return
+ # FIXME: if error is longer than els, should it raise an error?
+ for el, err in zip(els, error):
+ if err is None:
+ continue
+ yield el, err
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/html5parser.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/html5parser.py
new file mode 100644
index 0000000000000000000000000000000000000000..2f7be1568977aff1ccc6533f0626226e0f57bec9
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/html5parser.py
@@ -0,0 +1,260 @@
+"""
+An interface to html5lib that mimics the lxml.html interface.
+"""
+import sys
+import string
+
+from html5lib import HTMLParser as _HTMLParser
+from html5lib.treebuilders.etree_lxml import TreeBuilder
+from lxml import etree
+from lxml.html import Element, XHTML_NAMESPACE, _contains_block_level_tag
+
+# python3 compatibility
+try:
+ _strings = basestring
+except NameError:
+ _strings = (bytes, str)
+try:
+ from urllib2 import urlopen
+except ImportError:
+ from urllib.request import urlopen
+try:
+ from urlparse import urlparse
+except ImportError:
+ from urllib.parse import urlparse
+
+
+class HTMLParser(_HTMLParser):
+ """An html5lib HTML parser with lxml as tree."""
+
+ def __init__(self, strict=False, **kwargs):
+ _HTMLParser.__init__(self, strict=strict, tree=TreeBuilder, **kwargs)
+
+
+try:
+ from html5lib import XHTMLParser as _XHTMLParser
+except ImportError:
+ pass
+else:
+ class XHTMLParser(_XHTMLParser):
+ """An html5lib XHTML Parser with lxml as tree."""
+
+ def __init__(self, strict=False, **kwargs):
+ _XHTMLParser.__init__(self, strict=strict, tree=TreeBuilder, **kwargs)
+
+ xhtml_parser = XHTMLParser()
+
+
+def _find_tag(tree, tag):
+ elem = tree.find(tag)
+ if elem is not None:
+ return elem
+ return tree.find('{%s}%s' % (XHTML_NAMESPACE, tag))
+
+
+def document_fromstring(html, guess_charset=None, parser=None):
+ """
+ Parse a whole document into a string.
+
+ If `guess_charset` is true, or if the input is not Unicode but a
+ byte string, the `chardet` library will perform charset guessing
+ on the string.
+ """
+ if not isinstance(html, _strings):
+ raise TypeError('string required')
+
+ if parser is None:
+ parser = html_parser
+
+ options = {}
+ if guess_charset is None and isinstance(html, bytes):
+ # html5lib does not accept useChardet as an argument, if it
+ # detected the html argument would produce unicode objects.
+ guess_charset = True
+ if guess_charset is not None:
+ options['useChardet'] = guess_charset
+ return parser.parse(html, **options).getroot()
+
+
+def fragments_fromstring(html, no_leading_text=False,
+ guess_charset=None, parser=None):
+ """Parses several HTML elements, returning a list of elements.
+
+ The first item in the list may be a string. If no_leading_text is true,
+ then it will be an error if there is leading text, and it will always be
+ a list of only elements.
+
+ If `guess_charset` is true, the `chardet` library will perform charset
+ guessing on the string.
+ """
+ if not isinstance(html, _strings):
+ raise TypeError('string required')
+
+ if parser is None:
+ parser = html_parser
+
+ options = {}
+ if guess_charset is None and isinstance(html, bytes):
+ # html5lib does not accept useChardet as an argument, if it
+ # detected the html argument would produce unicode objects.
+ guess_charset = False
+ if guess_charset is not None:
+ options['useChardet'] = guess_charset
+ children = parser.parseFragment(html, 'div', **options)
+ if children and isinstance(children[0], _strings):
+ if no_leading_text:
+ if children[0].strip():
+ raise etree.ParserError('There is leading text: %r' %
+ children[0])
+ del children[0]
+ return children
+
+
+def fragment_fromstring(html, create_parent=False,
+ guess_charset=None, parser=None):
+ """Parses a single HTML element; it is an error if there is more than
+ one element, or if anything but whitespace precedes or follows the
+ element.
+
+ If 'create_parent' is true (or is a tag name) then a parent node
+ will be created to encapsulate the HTML in a single element. In
+ this case, leading or trailing text is allowed.
+
+ If `guess_charset` is true, the `chardet` library will perform charset
+ guessing on the string.
+ """
+ if not isinstance(html, _strings):
+ raise TypeError('string required')
+
+ accept_leading_text = bool(create_parent)
+
+ elements = fragments_fromstring(
+ html, guess_charset=guess_charset, parser=parser,
+ no_leading_text=not accept_leading_text)
+
+ if create_parent:
+ if not isinstance(create_parent, _strings):
+ create_parent = 'div'
+ new_root = Element(create_parent)
+ if elements:
+ if isinstance(elements[0], _strings):
+ new_root.text = elements[0]
+ del elements[0]
+ new_root.extend(elements)
+ return new_root
+
+ if not elements:
+ raise etree.ParserError('No elements found')
+ if len(elements) > 1:
+ raise etree.ParserError('Multiple elements found')
+ result = elements[0]
+ if result.tail and result.tail.strip():
+ raise etree.ParserError('Element followed by text: %r' % result.tail)
+ result.tail = None
+ return result
+
+
+def fromstring(html, guess_charset=None, parser=None):
+ """Parse the html, returning a single element/document.
+
+ This tries to minimally parse the chunk of text, without knowing if it
+ is a fragment or a document.
+
+ 'base_url' will set the document's base_url attribute (and the tree's
+ docinfo.URL)
+
+ If `guess_charset` is true, or if the input is not Unicode but a
+ byte string, the `chardet` library will perform charset guessing
+ on the string.
+ """
+ if not isinstance(html, _strings):
+ raise TypeError('string required')
+ doc = document_fromstring(html, parser=parser,
+ guess_charset=guess_charset)
+
+ # document starts with doctype or , full document!
+ start = html[:50]
+ if isinstance(start, bytes):
+ # Allow text comparison in python3.
+ # Decode as ascii, that also covers latin-1 and utf-8 for the
+ # characters we need.
+ start = start.decode('ascii', 'replace')
+
+ start = start.lstrip().lower()
+ if start.startswith(' implies too much structure.
+ if _contains_block_level_tag(body):
+ body.tag = 'div'
+ else:
+ body.tag = 'span'
+ return body
+
+
+def parse(filename_url_or_file, guess_charset=None, parser=None):
+ """Parse a filename, URL, or file-like object into an HTML document
+ tree. Note: this returns a tree, not an element. Use
+ ``parse(...).getroot()`` to get the document root.
+
+ If ``guess_charset`` is true, the ``useChardet`` option is passed into
+ html5lib to enable character detection. This option is on by default
+ when parsing from URLs, off by default when parsing from file(-like)
+ objects (which tend to return Unicode more often than not), and on by
+ default when parsing from a file path (which is read in binary mode).
+ """
+ if parser is None:
+ parser = html_parser
+ if not isinstance(filename_url_or_file, _strings):
+ fp = filename_url_or_file
+ if guess_charset is None:
+ # assume that file-like objects return Unicode more often than bytes
+ guess_charset = False
+ elif _looks_like_url(filename_url_or_file):
+ fp = urlopen(filename_url_or_file)
+ if guess_charset is None:
+ # assume that URLs return bytes
+ guess_charset = True
+ else:
+ fp = open(filename_url_or_file, 'rb')
+ if guess_charset is None:
+ guess_charset = True
+
+ options = {}
+ # html5lib does not accept useChardet as an argument, if it
+ # detected the html argument would produce unicode objects.
+ if guess_charset:
+ options['useChardet'] = guess_charset
+ return parser.parse(fp, **options)
+
+
+def _looks_like_url(str):
+ scheme = urlparse(str)[0]
+ if not scheme:
+ return False
+ elif (sys.platform == 'win32' and
+ scheme in string.ascii_letters
+ and len(scheme) == 1):
+ # looks like a 'normal' absolute path
+ return False
+ else:
+ return True
+
+
+html_parser = HTMLParser()
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/soupparser.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/soupparser.py
new file mode 100644
index 0000000000000000000000000000000000000000..b288a8a1597663ea2cbaa55bc41e46434a3a589f
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/soupparser.py
@@ -0,0 +1,314 @@
+"""External interface to the BeautifulSoup HTML parser.
+"""
+
+__all__ = ["fromstring", "parse", "convert_tree"]
+
+import re
+from lxml import etree, html
+
+try:
+ from bs4 import (
+ BeautifulSoup, Tag, Comment, ProcessingInstruction, NavigableString,
+ Declaration, Doctype)
+ _DECLARATION_OR_DOCTYPE = (Declaration, Doctype)
+except ImportError:
+ from BeautifulSoup import (
+ BeautifulSoup, Tag, Comment, ProcessingInstruction, NavigableString,
+ Declaration)
+ _DECLARATION_OR_DOCTYPE = Declaration
+
+
+def fromstring(data, beautifulsoup=None, makeelement=None, **bsargs):
+ """Parse a string of HTML data into an Element tree using the
+ BeautifulSoup parser.
+
+ Returns the root ```` Element of the tree.
+
+ You can pass a different BeautifulSoup parser through the
+ `beautifulsoup` keyword, and a diffent Element factory function
+ through the `makeelement` keyword. By default, the standard
+ ``BeautifulSoup`` class and the default factory of `lxml.html` are
+ used.
+ """
+ return _parse(data, beautifulsoup, makeelement, **bsargs)
+
+
+def parse(file, beautifulsoup=None, makeelement=None, **bsargs):
+ """Parse a file into an ElemenTree using the BeautifulSoup parser.
+
+ You can pass a different BeautifulSoup parser through the
+ `beautifulsoup` keyword, and a diffent Element factory function
+ through the `makeelement` keyword. By default, the standard
+ ``BeautifulSoup`` class and the default factory of `lxml.html` are
+ used.
+ """
+ if not hasattr(file, 'read'):
+ file = open(file)
+ root = _parse(file, beautifulsoup, makeelement, **bsargs)
+ return etree.ElementTree(root)
+
+
+def convert_tree(beautiful_soup_tree, makeelement=None):
+ """Convert a BeautifulSoup tree to a list of Element trees.
+
+ Returns a list instead of a single root Element to support
+ HTML-like soup with more than one root element.
+
+ You can pass a different Element factory through the `makeelement`
+ keyword.
+ """
+ root = _convert_tree(beautiful_soup_tree, makeelement)
+ children = root.getchildren()
+ for child in children:
+ root.remove(child)
+ return children
+
+
+# helpers
+
+def _parse(source, beautifulsoup, makeelement, **bsargs):
+ if beautifulsoup is None:
+ beautifulsoup = BeautifulSoup
+ if hasattr(beautifulsoup, "HTML_ENTITIES"): # bs3
+ if 'convertEntities' not in bsargs:
+ bsargs['convertEntities'] = 'html'
+ if hasattr(beautifulsoup, "DEFAULT_BUILDER_FEATURES"): # bs4
+ if 'features' not in bsargs:
+ bsargs['features'] = 'html.parser' # use Python html parser
+ tree = beautifulsoup(source, **bsargs)
+ root = _convert_tree(tree, makeelement)
+ # from ET: wrap the document in a html root element, if necessary
+ if len(root) == 1 and root[0].tag == "html":
+ return root[0]
+ root.tag = "html"
+ return root
+
+
+_parse_doctype_declaration = re.compile(
+ r'(?:\s|[ element. However, the document
+ # may be a soup like 'HelloHi
+ # all<\p>'. In this example roots is a list containing meta, head
+ # and body elements.
+ if first_element_idx is None:
+ pre_root = post_root = []
+ roots = beautiful_soup_tree.contents
+ else:
+ pre_root = beautiful_soup_tree.contents[:first_element_idx]
+ roots = beautiful_soup_tree.contents[first_element_idx:last_element_idx+1]
+ post_root = beautiful_soup_tree.contents[last_element_idx+1:]
+
+ # Reorganize so that there is one root...
+ if html_root is not None:
+ # ... use existing one if possible, ...
+ i = roots.index(html_root)
+ html_root.contents = roots[:i] + html_root.contents + roots[i+1:]
+ else:
+ # ... otherwise create a new one.
+ html_root = _PseudoTag(roots)
+
+ convert_node = _init_node_converters(makeelement)
+
+ # Process pre_root
+ res_root = convert_node(html_root)
+ prev = res_root
+ for e in reversed(pre_root):
+ converted = convert_node(e)
+ if converted is not None:
+ prev.addprevious(converted)
+ prev = converted
+
+ # ditto for post_root
+ prev = res_root
+ for e in post_root:
+ converted = convert_node(e)
+ if converted is not None:
+ prev.addnext(converted)
+ prev = converted
+
+ if declaration is not None:
+ try:
+ # bs4 provides full Doctype string
+ doctype_string = declaration.output_ready()
+ except AttributeError:
+ doctype_string = declaration.string
+
+ match = _parse_doctype_declaration(doctype_string)
+ if not match:
+ # Something is wrong if we end up in here. Since soupparser should
+ # tolerate errors, do not raise Exception, just let it pass.
+ pass
+ else:
+ external_id, sys_uri = match.groups()
+ docinfo = res_root.getroottree().docinfo
+ # strip quotes and update DOCTYPE values (any of None, '', '...')
+ docinfo.public_id = external_id and external_id[1:-1]
+ docinfo.system_url = sys_uri and sys_uri[1:-1]
+
+ return res_root
+
+
+def _init_node_converters(makeelement):
+ converters = {}
+ ordered_node_types = []
+
+ def converter(*types):
+ def add(handler):
+ for t in types:
+ converters[t] = handler
+ ordered_node_types.append(t)
+ return handler
+ return add
+
+ def find_best_converter(node):
+ for t in ordered_node_types:
+ if isinstance(node, t):
+ return converters[t]
+ return None
+
+ def convert_node(bs_node, parent=None):
+ # duplicated in convert_tag() below
+ try:
+ handler = converters[type(bs_node)]
+ except KeyError:
+ handler = converters[type(bs_node)] = find_best_converter(bs_node)
+ if handler is None:
+ return None
+ return handler(bs_node, parent)
+
+ def map_attrs(bs_attrs):
+ if isinstance(bs_attrs, dict): # bs4
+ attribs = {}
+ for k, v in bs_attrs.items():
+ if isinstance(v, list):
+ v = " ".join(v)
+ attribs[k] = unescape(v)
+ else:
+ attribs = {k: unescape(v) for k, v in bs_attrs}
+ return attribs
+
+ def append_text(parent, text):
+ if len(parent) == 0:
+ parent.text = (parent.text or '') + text
+ else:
+ parent[-1].tail = (parent[-1].tail or '') + text
+
+ # converters are tried in order of their definition
+
+ @converter(Tag, _PseudoTag)
+ def convert_tag(bs_node, parent):
+ attrs = bs_node.attrs
+ if parent is not None:
+ attribs = map_attrs(attrs) if attrs else None
+ res = etree.SubElement(parent, bs_node.name, attrib=attribs)
+ else:
+ attribs = map_attrs(attrs) if attrs else {}
+ res = makeelement(bs_node.name, attrib=attribs)
+
+ for child in bs_node:
+ # avoid double recursion by inlining convert_node(), see above
+ try:
+ handler = converters[type(child)]
+ except KeyError:
+ pass
+ else:
+ if handler is not None:
+ handler(child, res)
+ continue
+ convert_node(child, res)
+ return res
+
+ @converter(Comment)
+ def convert_comment(bs_node, parent):
+ res = html.HtmlComment(bs_node)
+ if parent is not None:
+ parent.append(res)
+ return res
+
+ @converter(ProcessingInstruction)
+ def convert_pi(bs_node, parent):
+ if bs_node.endswith('?'):
+ # The PI is of XML style () but BeautifulSoup
+ # interpreted it as being SGML style (). Fix.
+ bs_node = bs_node[:-1]
+ res = etree.ProcessingInstruction(*bs_node.split(' ', 1))
+ if parent is not None:
+ parent.append(res)
+ return res
+
+ @converter(NavigableString)
+ def convert_text(bs_node, parent):
+ if parent is not None:
+ append_text(parent, unescape(bs_node))
+ return None
+
+ return convert_node
+
+
+# copied from ET's ElementSoup
+
+try:
+ from html.entities import name2codepoint # Python 3
+except ImportError:
+ from htmlentitydefs import name2codepoint
+
+
+handle_entities = re.compile(r"&(\w+);").sub
+
+
+try:
+ unichr
+except NameError:
+ # Python 3
+ unichr = chr
+
+
+def unescape(string):
+ if not string:
+ return ''
+ # work around oddities in BeautifulSoup's entity handling
+ def unescape_entity(m):
+ try:
+ return unichr(name2codepoint[m.group(1)])
+ except KeyError:
+ return m.group(0) # use as is
+ return handle_entities(unescape_entity, string)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/usedoctest.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/usedoctest.py
new file mode 100644
index 0000000000000000000000000000000000000000..f352a1cc203ac40dea31066dfb20286a3a9c6406
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/html/usedoctest.py
@@ -0,0 +1,13 @@
+"""Doctest module for HTML comparison.
+
+Usage::
+
+ >>> import lxml.html.usedoctest
+ >>> # now do your HTML doctests ...
+
+See `lxml.doctestcompare`.
+"""
+
+from lxml import doctestcompare
+
+doctestcompare.temp_install(html=True, del_module=__name__)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/__init__.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/__init__.pxd
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/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/__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/c14n.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/c14n.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..8b1f3c4c516b23ec938da286e0ddb7b8f5795ee2
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/c14n.pxd
@@ -0,0 +1,25 @@
+from lxml.includes.tree cimport xmlDoc, xmlOutputBuffer, xmlChar
+from lxml.includes.xpath cimport xmlNodeSet
+
+cdef extern from "libxml/c14n.h" nogil:
+ cdef int xmlC14NDocDumpMemory(xmlDoc* doc,
+ xmlNodeSet* nodes,
+ int exclusive,
+ xmlChar** inclusive_ns_prefixes,
+ int with_comments,
+ xmlChar** doc_txt_ptr)
+
+ cdef int xmlC14NDocSave(xmlDoc* doc,
+ xmlNodeSet* nodes,
+ int exclusive,
+ xmlChar** inclusive_ns_prefixes,
+ int with_comments,
+ char* filename,
+ int compression)
+
+ cdef int xmlC14NDocSaveTo(xmlDoc* doc,
+ xmlNodeSet* nodes,
+ int exclusive,
+ xmlChar** inclusive_ns_prefixes,
+ int with_comments,
+ xmlOutputBuffer* buffer)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/etree_defs.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/etree_defs.h
new file mode 100644
index 0000000000000000000000000000000000000000..d0182bcad1ecb265adc367dd8dd99861cbd095bd
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/etree_defs.h
@@ -0,0 +1,379 @@
+#ifndef HAS_ETREE_DEFS_H
+#define HAS_ETREE_DEFS_H
+
+/* quick check for Python/libxml2/libxslt devel setup */
+#include "Python.h"
+#ifndef PY_VERSION_HEX
+# error the development package of Python (header files etc.) is not installed correctly
+#elif PY_VERSION_HEX < 0x03060000
+# error this version of lxml requires Python 3.6 or later
+#endif
+
+#include "libxml/xmlversion.h"
+#ifndef LIBXML_VERSION
+# error the development package of libxml2 (header files etc.) is not installed correctly
+#elif LIBXML_VERSION < 20700
+# error minimum required version of libxml2 is 2.7.0
+#endif
+
+#include "libxslt/xsltconfig.h"
+#ifndef LIBXSLT_VERSION
+# error the development package of libxslt (header files etc.) is not installed correctly
+#elif LIBXSLT_VERSION < 10123
+# error minimum required version of libxslt is 1.1.23
+#endif
+
+
+/* v_arg functions */
+#define va_int(ap) va_arg(ap, int)
+#define va_charptr(ap) va_arg(ap, char *)
+
+#ifdef PYPY_VERSION
+# define IS_PYPY 1
+#else
+# define IS_PYPY 0
+#endif
+
+/* unused */
+#define IS_PYTHON2 0
+#define IS_PYTHON3 1
+#undef LXML_UNICODE_STRINGS
+#define LXML_UNICODE_STRINGS 1
+
+#if !IS_PYPY
+# define PyWeakref_LockObject(obj) (NULL)
+#endif
+
+/* Threading is not currently supported by PyPy */
+#if IS_PYPY
+# ifndef WITHOUT_THREADING
+# define WITHOUT_THREADING
+# endif
+#endif
+
+#if IS_PYPY
+# ifndef PyUnicode_FromFormat
+# define PyUnicode_FromFormat PyString_FromFormat
+# endif
+# if !defined(PyBytes_FromFormat)
+# ifdef PyString_FromFormat
+# define PyBytes_FromFormat PyString_FromFormat
+# else
+#include
+static PyObject* PyBytes_FromFormat(const char* format, ...) {
+ PyObject *string;
+ va_list vargs;
+#ifdef HAVE_STDARG_PROTOTYPES
+ va_start(vargs, format);
+#else
+ va_start(vargs);
+#endif
+ string = PyUnicode_FromFormatV(format, vargs);
+ va_end(vargs);
+ if (string && PyUnicode_Check(string)) {
+ PyObject *bstring = PyUnicode_AsUTF8String(string);
+ Py_DECREF(string);
+ string = bstring;
+ }
+ if (string && !PyBytes_CheckExact(string)) {
+ Py_DECREF(string);
+ string = NULL;
+ PyErr_SetString(PyExc_TypeError, "String formatting and encoding failed to return bytes object");
+ }
+ return string;
+}
+# endif
+# endif
+#endif
+
+#if PY_VERSION_HEX >= 0x030B00A1
+/* Python 3.12 doesn't have wstr Unicode strings any more. */
+#undef PyUnicode_GET_DATA_SIZE
+#define PyUnicode_GET_DATA_SIZE(ustr) (0)
+#undef PyUnicode_AS_DATA
+#define PyUnicode_AS_DATA(ustr) (NULL)
+#undef PyUnicode_IS_READY
+#define PyUnicode_IS_READY(ustr) (1)
+#endif
+
+#ifdef WITHOUT_THREADING
+# undef PyEval_SaveThread
+# define PyEval_SaveThread() (NULL)
+# undef PyEval_RestoreThread
+# define PyEval_RestoreThread(state) if (state); else {}
+# undef PyGILState_Ensure
+# define PyGILState_Ensure() (PyGILState_UNLOCKED)
+# undef PyGILState_Release
+# define PyGILState_Release(state) if (state); else {}
+# undef Py_UNBLOCK_THREADS
+# define Py_UNBLOCK_THREADS _save = NULL;
+# undef Py_BLOCK_THREADS
+# define Py_BLOCK_THREADS if (_save); else {}
+#endif
+
+#ifdef WITHOUT_THREADING
+# define ENABLE_THREADING 0
+#else
+# define ENABLE_THREADING 1
+#endif
+
+#if LIBXML_VERSION < 20704
+/* FIXME: hack to make new error reporting compile in old libxml2 versions */
+# define xmlStructuredErrorContext NULL
+# define xmlXIncludeProcessTreeFlagsData(n,o,d) xmlXIncludeProcessTreeFlags(n,o)
+#endif
+
+/* schematron was added in libxml2 2.6.21 */
+#ifdef LIBXML_SCHEMATRON_ENABLED
+# define ENABLE_SCHEMATRON 1
+#else
+# define ENABLE_SCHEMATRON 0
+# define XML_SCHEMATRON_OUT_QUIET 0
+# define XML_SCHEMATRON_OUT_XML 0
+# define XML_SCHEMATRON_OUT_ERROR 0
+ typedef void xmlSchematron;
+ typedef void xmlSchematronParserCtxt;
+ typedef void xmlSchematronValidCtxt;
+# define xmlSchematronNewDocParserCtxt(doc) NULL
+# define xmlSchematronNewParserCtxt(file) NULL
+# define xmlSchematronParse(ctxt) NULL
+# define xmlSchematronFreeParserCtxt(ctxt)
+# define xmlSchematronFree(schema)
+# define xmlSchematronNewValidCtxt(schema, options) NULL
+# define xmlSchematronValidateDoc(ctxt, doc) 0
+# define xmlSchematronFreeValidCtxt(ctxt)
+# define xmlSchematronSetValidStructuredErrors(ctxt, errorfunc, data)
+#endif
+
+#if LIBXML_VERSION < 20708
+# define HTML_PARSE_NODEFDTD 4
+#endif
+#if LIBXML_VERSION < 20900
+# define XML_PARSE_BIG_LINES 4194304
+#endif
+
+#include "libxml/tree.h"
+#ifndef LIBXML2_NEW_BUFFER
+ typedef xmlBuffer xmlBuf;
+# define xmlBufContent(buf) xmlBufferContent(buf)
+# define xmlBufUse(buf) xmlBufferLength(buf)
+#endif
+
+#if LIBXML_VERSION < 21500
+# define xmlCtxtIsStopped(p_ctxt) ((p_ctxt)->disableSAX != 0)
+#endif
+
+/* libexslt 1.1.25+ support EXSLT functions in XPath */
+#if LIBXSLT_VERSION < 10125
+#define exsltDateXpathCtxtRegister(ctxt, prefix)
+#define exsltSetsXpathCtxtRegister(ctxt, prefix)
+#define exsltMathXpathCtxtRegister(ctxt, prefix)
+#define exsltStrXpathCtxtRegister(ctxt, prefix)
+#endif
+
+#define LXML_GET_XSLT_ENCODING(result_var, style) XSLT_GET_IMPORT_PTR(result_var, style, encoding)
+
+/* work around MSDEV 6.0 */
+#if (_MSC_VER == 1200) && (WINVER < 0x0500)
+long _ftol( double ); //defined by VC6 C libs
+long _ftol2( double dblSource ) { return _ftol( dblSource ); }
+#endif
+
+#ifdef __GNUC__
+/* Test for GCC > 2.95 */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
+#define unlikely_condition(x) __builtin_expect((x), 0)
+#else /* __GNUC__ > 2 ... */
+#define unlikely_condition(x) (x)
+#endif /* __GNUC__ > 2 ... */
+#else /* __GNUC__ */
+#define unlikely_condition(x) (x)
+#endif /* __GNUC__ */
+
+#ifndef Py_TYPE
+ #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
+#endif
+
+#define _fqtypename(o) ((Py_TYPE(o))->tp_name)
+
+#define lxml_malloc(count, item_size) \
+ (unlikely_condition((size_t)(count) > (size_t) (PY_SSIZE_T_MAX / item_size)) ? NULL : \
+ (PyMem_Malloc((count) * item_size)))
+
+#define lxml_realloc(mem, count, item_size) \
+ (unlikely_condition((size_t)(count) > (size_t) (PY_SSIZE_T_MAX / item_size)) ? NULL : \
+ (PyMem_Realloc(mem, (count) * item_size)))
+
+#define lxml_free(mem) PyMem_Free(mem)
+
+#define _isString(obj) (PyUnicode_Check(obj) || PyBytes_Check(obj))
+
+#define _isElement(c_node) \
+ (((c_node)->type == XML_ELEMENT_NODE) || \
+ ((c_node)->type == XML_COMMENT_NODE) || \
+ ((c_node)->type == XML_ENTITY_REF_NODE) || \
+ ((c_node)->type == XML_PI_NODE))
+
+#define _isElementOrXInclude(c_node) \
+ (_isElement(c_node) || \
+ ((c_node)->type == XML_XINCLUDE_START) || \
+ ((c_node)->type == XML_XINCLUDE_END))
+
+#define _getNs(c_node) \
+ (((c_node)->ns == 0) ? 0 : ((c_node)->ns->href))
+
+
+#include "string.h"
+static void* lxml_unpack_xmldoc_capsule(PyObject* capsule, int* is_owned) {
+ xmlDoc *c_doc;
+ void *context;
+ *is_owned = 0;
+ if (unlikely_condition(!PyCapsule_IsValid(capsule, (const char*)"libxml2:xmlDoc"))) {
+ PyErr_SetString(
+ PyExc_TypeError,
+ "Not a valid capsule. The capsule argument must be a capsule object with name libxml2:xmlDoc");
+ return NULL;
+ }
+ c_doc = (xmlDoc*) PyCapsule_GetPointer(capsule, (const char*)"libxml2:xmlDoc");
+ if (unlikely_condition(!c_doc)) return NULL;
+
+ if (unlikely_condition(c_doc->type != XML_DOCUMENT_NODE && c_doc->type != XML_HTML_DOCUMENT_NODE)) {
+ PyErr_Format(
+ PyExc_ValueError,
+ "Illegal document provided: expected XML or HTML, found %d", (int)c_doc->type);
+ return NULL;
+ }
+
+ context = PyCapsule_GetContext(capsule);
+ if (unlikely_condition(!context && PyErr_Occurred())) return NULL;
+ if (context && strcmp((const char*) context, "destructor:xmlFreeDoc") == 0) {
+ /* take ownership by setting destructor to NULL */
+ if (PyCapsule_SetDestructor(capsule, NULL) == 0) {
+ /* ownership transferred => invalidate capsule by clearing its name */
+ if (unlikely_condition(PyCapsule_SetName(capsule, NULL))) {
+ /* this should never happen since everything above succeeded */
+ xmlFreeDoc(c_doc);
+ return NULL;
+ }
+ *is_owned = 1;
+ }
+ }
+ return c_doc;
+}
+
+/* Macro pair implementation of a depth first tree walker
+ *
+ * Calls the code block between the BEGIN and END macros for all elements
+ * below c_tree_top (exclusively), starting at c_node (inclusively iff
+ * 'inclusive' is 1). The _ELEMENT_ variants will only stop on nodes
+ * that match _isElement(), the normal variant will stop on every node
+ * except text nodes.
+ *
+ * To traverse the node and all of its children and siblings in Pyrex, call
+ * cdef xmlNode* some_node
+ * BEGIN_FOR_EACH_ELEMENT_FROM(some_node.parent, some_node, 1)
+ * # do something with some_node
+ * END_FOR_EACH_ELEMENT_FROM(some_node)
+ *
+ * To traverse only the children and siblings of a node, call
+ * cdef xmlNode* some_node
+ * BEGIN_FOR_EACH_ELEMENT_FROM(some_node.parent, some_node, 0)
+ * # do something with some_node
+ * END_FOR_EACH_ELEMENT_FROM(some_node)
+ *
+ * To traverse only the children, do:
+ * cdef xmlNode* some_node
+ * some_node = parent_node.children
+ * BEGIN_FOR_EACH_ELEMENT_FROM(parent_node, some_node, 1)
+ * # do something with some_node
+ * END_FOR_EACH_ELEMENT_FROM(some_node)
+ *
+ * NOTE: 'some_node' MUST be a plain 'xmlNode*' !
+ *
+ * NOTE: parent modification during the walk can divert the iterator, but
+ * should not segfault !
+ */
+
+#define _LX__ELEMENT_MATCH(c_node, only_elements) \
+ ((only_elements) ? (_isElement(c_node)) : 1)
+
+#define _LX__ADVANCE_TO_NEXT(c_node, only_elements) \
+ while ((c_node != 0) && (!_LX__ELEMENT_MATCH(c_node, only_elements))) \
+ c_node = c_node->next;
+
+#define _LX__TRAVERSE_TO_NEXT(c_stop_node, c_node, only_elements) \
+{ \
+ /* walk through children first */ \
+ xmlNode* _lx__next = c_node->children; \
+ if (_lx__next != 0) { \
+ if (c_node->type == XML_ENTITY_REF_NODE || c_node->type == XML_DTD_NODE) { \
+ _lx__next = 0; \
+ } else { \
+ _LX__ADVANCE_TO_NEXT(_lx__next, only_elements) \
+ } \
+ } \
+ if ((_lx__next == 0) && (c_node != c_stop_node)) { \
+ /* try siblings */ \
+ _lx__next = c_node->next; \
+ _LX__ADVANCE_TO_NEXT(_lx__next, only_elements) \
+ /* back off through parents */ \
+ while (_lx__next == 0) { \
+ c_node = c_node->parent; \
+ if (c_node == 0) \
+ break; \
+ if (c_node == c_stop_node) \
+ break; \
+ if ((only_elements) && !_isElement(c_node)) \
+ break; \
+ /* we already traversed the parents -> siblings */ \
+ _lx__next = c_node->next; \
+ _LX__ADVANCE_TO_NEXT(_lx__next, only_elements) \
+ } \
+ } \
+ c_node = _lx__next; \
+}
+
+#define _LX__BEGIN_FOR_EACH_FROM(c_tree_top, c_node, inclusive, only_elements) \
+{ \
+ if (c_node != 0) { \
+ const xmlNode* _lx__tree_top = (c_tree_top); \
+ const int _lx__only_elements = (only_elements); \
+ /* make sure we start at an element */ \
+ if (!_LX__ELEMENT_MATCH(c_node, _lx__only_elements)) { \
+ /* we skip the node, so 'inclusive' is irrelevant */ \
+ if (c_node == _lx__tree_top) \
+ c_node = 0; /* nothing to traverse */ \
+ else { \
+ c_node = c_node->next; \
+ _LX__ADVANCE_TO_NEXT(c_node, _lx__only_elements) \
+ } \
+ } else if (! (inclusive)) { \
+ /* skip the first node */ \
+ _LX__TRAVERSE_TO_NEXT(_lx__tree_top, c_node, _lx__only_elements) \
+ } \
+ \
+ /* now run the user code on the elements we find */ \
+ while (c_node != 0) { \
+ /* here goes the code to be run for each element */
+
+#define _LX__END_FOR_EACH_FROM(c_node) \
+ _LX__TRAVERSE_TO_NEXT(_lx__tree_top, c_node, _lx__only_elements) \
+ } \
+ } \
+}
+
+
+#define BEGIN_FOR_EACH_ELEMENT_FROM(c_tree_top, c_node, inclusive) \
+ _LX__BEGIN_FOR_EACH_FROM(c_tree_top, c_node, inclusive, 1)
+
+#define END_FOR_EACH_ELEMENT_FROM(c_node) \
+ _LX__END_FOR_EACH_FROM(c_node)
+
+#define BEGIN_FOR_EACH_FROM(c_tree_top, c_node, inclusive) \
+ _LX__BEGIN_FOR_EACH_FROM(c_tree_top, c_node, inclusive, 0)
+
+#define END_FOR_EACH_FROM(c_node) \
+ _LX__END_FOR_EACH_FROM(c_node)
+
+
+#endif /* HAS_ETREE_DEFS_H */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/etreepublic.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/etreepublic.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..7ef001b17b765de2a94172412681e6029e931c54
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/etreepublic.pxd
@@ -0,0 +1,237 @@
+# public Cython/C interface to lxml.etree
+
+from lxml.includes cimport tree
+from lxml.includes.tree cimport const_xmlChar
+
+cdef extern from "lxml-version.h":
+ cdef char* LXML_VERSION_STRING
+
+cdef extern from "etree_defs.h":
+ # test if c_node is considered an Element (i.e. Element, Comment, etc.)
+ cdef bint _isElement(tree.xmlNode* c_node) noexcept nogil
+
+ # return the namespace URI of the node or NULL
+ cdef const_xmlChar* _getNs(tree.xmlNode* node) noexcept nogil
+
+ # pair of macros for tree traversal
+ cdef void BEGIN_FOR_EACH_ELEMENT_FROM(tree.xmlNode* tree_top,
+ tree.xmlNode* start_node,
+ int start_node_inclusive) noexcept nogil
+ cdef void END_FOR_EACH_ELEMENT_FROM(tree.xmlNode* start_node) noexcept nogil
+
+cdef extern from "etree_api.h":
+
+ # first function to call!
+ cdef int import_lxml__etree() except -1
+
+ ##########################################################################
+ # public ElementTree API classes
+
+ cdef class lxml.etree._Document [ object LxmlDocument ]:
+ cdef tree.xmlDoc* _c_doc
+
+ cdef class lxml.etree._Element [ object LxmlElement ]:
+ cdef _Document _doc
+ cdef tree.xmlNode* _c_node
+
+ cdef class lxml.etree.ElementBase(_Element) [ object LxmlElementBase ]:
+ pass
+
+ cdef class lxml.etree._ElementTree [ object LxmlElementTree ]:
+ cdef _Document _doc
+ cdef _Element _context_node
+
+ cdef class lxml.etree.ElementClassLookup [ object LxmlElementClassLookup ]:
+ cdef object (*_lookup_function)(object, _Document, tree.xmlNode*)
+
+ cdef class lxml.etree.FallbackElementClassLookup(ElementClassLookup) \
+ [ object LxmlFallbackElementClassLookup ]:
+ cdef ElementClassLookup fallback
+ cdef object (*_fallback_function)(object, _Document, tree.xmlNode*)
+
+ ##########################################################################
+ # creating Element objects
+
+ # create an Element for a C-node in the Document
+ cdef _Element elementFactory(_Document doc, tree.xmlNode* c_node)
+
+ # create an ElementTree for an Element
+ cdef _ElementTree elementTreeFactory(_Element context_node)
+
+ # create an ElementTree subclass for an Element
+ cdef _ElementTree newElementTree(_Element context_node, object subclass)
+
+ # create an ElementTree from an external document
+ cdef _ElementTree adoptExternalDocument(tree.xmlDoc* c_doc, parser, bint is_owned)
+
+ # create a new Element for an existing or new document (doc = None)
+ # builds Python object after setting text, tail, namespaces and attributes
+ cdef _Element makeElement(tag, _Document doc, parser,
+ text, tail, attrib, nsmap)
+
+ # create a new SubElement for an existing parent
+ # builds Python object after setting text, tail, namespaces and attributes
+ cdef _Element makeSubElement(_Element parent, tag, text, tail,
+ attrib, nsmap)
+
+ # deep copy a node to include it in the Document
+ cdef _Element deepcopyNodeToDocument(_Document doc, tree.xmlNode* c_root)
+
+ # set the internal lookup function for Element/Comment/PI classes
+ # use setElementClassLookupFunction(NULL, None) to reset it
+ # note that the lookup function *must always* return an _Element subclass!
+ cdef void setElementClassLookupFunction(
+ object (*function)(object, _Document, tree.xmlNode*), object state)
+
+ # lookup function that always returns the default Element class
+ # note that the first argument is expected to be None!
+ cdef object lookupDefaultElementClass(_1, _Document _2,
+ tree.xmlNode* c_node)
+
+ # lookup function for namespace/tag specific Element classes
+ # note that the first argument is expected to be None!
+ cdef object lookupNamespaceElementClass(_1, _Document _2,
+ tree.xmlNode* c_node)
+
+ # call the fallback lookup function of a FallbackElementClassLookup
+ cdef object callLookupFallback(FallbackElementClassLookup lookup,
+ _Document doc, tree.xmlNode* c_node)
+
+ ##########################################################################
+ # XML attribute access
+
+ # return an attribute value for a C attribute on a C element node
+ cdef unicode attributeValue(tree.xmlNode* c_element,
+ tree.xmlAttr* c_attrib_node)
+
+ # return the value of the attribute with 'ns' and 'name' (or None)
+ cdef unicode attributeValueFromNsName(tree.xmlNode* c_element,
+ const_xmlChar* c_ns, const_xmlChar* c_name)
+
+ # return the value of attribute "{ns}name", or the default value
+ cdef object getAttributeValue(_Element element, key, default)
+
+ # return an iterator over attribute names (1), values (2) or items (3)
+ # attributes must not be removed during iteration!
+ cdef object iterattributes(_Element element, int keysvalues)
+
+ # return the list of all attribute names (1), values (2) or items (3)
+ cdef list collectAttributes(tree.xmlNode* c_element, int keysvalues)
+
+ # set an attribute value on an element
+ # on failure, sets an exception and returns -1
+ cdef int setAttributeValue(_Element element, key, value) except -1
+
+ # delete an attribute
+ # on failure, sets an exception and returns -1
+ cdef int delAttribute(_Element element, key) except -1
+
+ # delete an attribute based on name and namespace URI
+ # returns -1 if the attribute was not found (no exception)
+ cdef int delAttributeFromNsName(tree.xmlNode* c_element,
+ const_xmlChar* c_href, const_xmlChar* c_name) noexcept
+
+ ##########################################################################
+ # XML node helper functions
+
+ # check if the element has at least one child
+ cdef bint hasChild(tree.xmlNode* c_node) noexcept nogil
+
+ # find child element number 'index' (supports negative indexes)
+ cdef tree.xmlNode* findChild(tree.xmlNode* c_node,
+ Py_ssize_t index) noexcept nogil
+
+ # find child element number 'index' starting at first one
+ cdef tree.xmlNode* findChildForwards(tree.xmlNode* c_node,
+ Py_ssize_t index) nogil
+
+ # find child element number 'index' starting at last one
+ cdef tree.xmlNode* findChildBackwards(tree.xmlNode* c_node,
+ Py_ssize_t index) nogil
+
+ # return next/previous sibling element of the node
+ cdef tree.xmlNode* nextElement(tree.xmlNode* c_node) nogil
+ cdef tree.xmlNode* previousElement(tree.xmlNode* c_node) nogil
+
+ ##########################################################################
+ # iterators (DEPRECATED API, don't use in new code!)
+
+ cdef class lxml.etree._ElementTagMatcher [ object LxmlElementTagMatcher ]:
+ cdef char* _href
+ cdef char* _name
+
+ # store "{ns}tag" (or None) filter for this matcher or element iterator
+ # ** unless _href *and* _name are set up 'by hand', this function *must*
+ # ** be called when subclassing the iterator below!
+ cdef void initTagMatch(_ElementTagMatcher matcher, tag)
+
+ cdef class lxml.etree._ElementIterator(_ElementTagMatcher) [
+ object LxmlElementIterator ]:
+ cdef _Element _node
+ cdef tree.xmlNode* (*_next_element)(tree.xmlNode*)
+
+ # store the initial node of the iterator if it matches the required tag
+ # or its next matching sibling if not
+ cdef void iteratorStoreNext(_ElementIterator iterator, _Element node)
+
+ ##########################################################################
+ # other helper functions
+
+ # check if a C node matches a tag name and namespace
+ # (NULL allowed for each => always matches)
+ cdef int tagMatches(tree.xmlNode* c_node, const_xmlChar* c_href, const_xmlChar* c_name)
+
+ # convert a UTF-8 char* to a Python unicode string
+ cdef unicode pyunicode(const_xmlChar* s)
+
+ # convert the string to UTF-8 using the normal lxml.etree semantics
+ cdef bytes utf8(object s)
+
+ # split a tag into a (URI, name) tuple, return None as URI for '{}tag'
+ cdef tuple getNsTag(object tag)
+
+ # split a tag into a (URI, name) tuple, return b'' as URI for '{}tag'
+ cdef tuple getNsTagWithEmptyNs(object tag)
+
+ # get the "{ns}tag" string for a C node
+ cdef unicode namespacedName(tree.xmlNode* c_node)
+
+ # get the "{ns}tag" string for a href/tagname pair (c_ns may be NULL)
+ cdef unicode namespacedNameFromNsName(const_xmlChar* c_ns, const_xmlChar* c_tag)
+
+ # check if the node has a text value (which may be '')
+ cdef bint hasText(tree.xmlNode* c_node) nogil
+
+ # check if the node has a tail value (which may be '')
+ cdef bint hasTail(tree.xmlNode* c_node) nogil
+
+ # get the text content of an element (or None)
+ cdef unicode textOf(tree.xmlNode* c_node)
+
+ # get the tail content of an element (or None)
+ cdef unicode tailOf(tree.xmlNode* c_node)
+
+ # set the text value of an element
+ cdef int setNodeText(tree.xmlNode* c_node, text) except -1
+
+ # set the tail text value of an element
+ cdef int setTailText(tree.xmlNode* c_node, text) except -1
+
+ # append an element to the children of a parent element
+ # deprecated: don't use, does not propagate exceptions!
+ # use appendChildToElement() instead
+ cdef void appendChild(_Element parent, _Element child)
+
+ # added in lxml 3.3 as a safe replacement for appendChild()
+ # return -1 for exception, 0 for ok
+ cdef int appendChildToElement(_Element parent, _Element child) except -1
+
+ # recursively lookup a namespace in element or ancestors, or create it
+ cdef tree.xmlNs* findOrBuildNodeNsPrefix(
+ _Document doc, tree.xmlNode* c_node, const_xmlChar* href, const_xmlChar* prefix)
+
+ # find the Document of an Element, ElementTree or Document (itself!)
+ cdef _Document documentOrRaise(object input)
+
+ # find the root Element of an Element (itself!), ElementTree or Document
+ cdef _Element rootNodeOrRaise(object input)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d48139d8b05eb1f91dbd735740428f2d3c1018e3
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/extlibs/__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/htmlparser.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/htmlparser.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..31dcc406cdc3d006afe811e7e1f778b56407510f
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/htmlparser.pxd
@@ -0,0 +1,56 @@
+from libc.string cimport const_char
+
+from lxml.includes.tree cimport xmlDoc
+from lxml.includes.tree cimport xmlInputReadCallback, xmlInputCloseCallback
+from lxml.includes.xmlparser cimport xmlParserCtxt, xmlSAXHandler, xmlSAXHandlerV1
+
+cdef extern from "libxml/HTMLparser.h" nogil:
+ ctypedef enum htmlParserOption:
+ HTML_PARSE_NOERROR # suppress error reports
+ HTML_PARSE_NOWARNING # suppress warning reports
+ HTML_PARSE_PEDANTIC # pedantic error reporting
+ HTML_PARSE_NOBLANKS # remove blank nodes
+ HTML_PARSE_NONET # Forbid network access
+ # libxml2 2.6.21+ only:
+ HTML_PARSE_RECOVER # Relaxed parsing
+ HTML_PARSE_COMPACT # compact small text nodes
+ # libxml2 2.7.7+ only:
+ HTML_PARSE_NOIMPLIED # Do not add implied html/body... elements
+ # libxml2 2.7.8+ only:
+ HTML_PARSE_NODEFDTD # do not default a doctype if not found
+ # libxml2 2.8.0+ only:
+ XML_PARSE_IGNORE_ENC # ignore internal document encoding hint
+
+ xmlSAXHandlerV1 htmlDefaultSAXHandler
+
+ cdef xmlParserCtxt* htmlCreateMemoryParserCtxt(
+ char* buffer, int size)
+ cdef xmlParserCtxt* htmlCreateFileParserCtxt(
+ char* filename, char* encoding)
+ cdef xmlParserCtxt* htmlCreatePushParserCtxt(xmlSAXHandler* sax,
+ void* user_data,
+ char* chunk, int size,
+ char* filename, int enc)
+ cdef void htmlFreeParserCtxt(xmlParserCtxt* ctxt)
+ cdef void htmlCtxtReset(xmlParserCtxt* ctxt)
+ cdef int htmlCtxtUseOptions(xmlParserCtxt* ctxt, int options)
+ cdef int htmlParseDocument(xmlParserCtxt* ctxt)
+ cdef int htmlParseChunk(xmlParserCtxt* ctxt,
+ char* chunk, int size, int terminate)
+
+ cdef xmlDoc* htmlCtxtReadFile(xmlParserCtxt* ctxt,
+ char* filename, const_char* encoding,
+ int options)
+ cdef xmlDoc* htmlCtxtReadDoc(xmlParserCtxt* ctxt,
+ char* buffer, char* URL, const_char* encoding,
+ int options)
+ cdef xmlDoc* htmlCtxtReadIO(xmlParserCtxt* ctxt,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void* ioctx,
+ char* URL, const_char* encoding,
+ int options)
+ cdef xmlDoc* htmlCtxtReadMemory(xmlParserCtxt* ctxt,
+ char* buffer, int size,
+ char* filename, const_char* encoding,
+ int options)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f8e5751875f6f942d02e3469b3bffd4bde319802
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libexslt/__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/libxml/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4d68c63c661da422eb76dafb9ac212857b48275f
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxml/__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/libxslt/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f4f64a89b15d2e312a4d362b601377b5142223f9
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/__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/libxslt/transform.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/transform.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a6f79591079a8ed59a3003936279acb504378fc
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/transform.h
@@ -0,0 +1,207 @@
+/*
+ * Summary: the XSLT engine transformation part.
+ * Description: This module implements the bulk of the actual
+ * transformation processing. Most of the xsl: element
+ * constructs are implemented in this module.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLT_TRANSFORM_H__
+#define __XML_XSLT_TRANSFORM_H__
+
+#include
+#include
+#include "xsltexports.h"
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XInclude default processing.
+ */
+XSLTPUBFUN void XSLTCALL
+ xsltSetXIncludeDefault (int xinclude);
+XSLTPUBFUN int XSLTCALL
+ xsltGetXIncludeDefault (void);
+
+/**
+ * Export context to users.
+ */
+XSLTPUBFUN xsltTransformContextPtr XSLTCALL
+ xsltNewTransformContext (xsltStylesheetPtr style,
+ xmlDocPtr doc);
+
+XSLTPUBFUN void XSLTCALL
+ xsltFreeTransformContext(xsltTransformContextPtr ctxt);
+
+XSLTPUBFUN xmlDocPtr XSLTCALL
+ xsltApplyStylesheetUser (xsltStylesheetPtr style,
+ xmlDocPtr doc,
+ const char **params,
+ const char *output,
+ FILE * profile,
+ xsltTransformContextPtr userCtxt);
+XSLTPUBFUN void XSLTCALL
+ xsltProcessOneNode (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xsltStackElemPtr params);
+/**
+ * Private Interfaces.
+ */
+XSLTPUBFUN void XSLTCALL
+ xsltApplyStripSpaces (xsltTransformContextPtr ctxt,
+ xmlNodePtr node);
+XSLTPUBFUN xmlDocPtr XSLTCALL
+ xsltApplyStylesheet (xsltStylesheetPtr style,
+ xmlDocPtr doc,
+ const char **params);
+XSLTPUBFUN xmlDocPtr XSLTCALL
+ xsltProfileStylesheet (xsltStylesheetPtr style,
+ xmlDocPtr doc,
+ const char **params,
+ FILE * output);
+XSLTPUBFUN int XSLTCALL
+ xsltRunStylesheet (xsltStylesheetPtr style,
+ xmlDocPtr doc,
+ const char **params,
+ const char *output,
+ xmlSAXHandlerPtr SAX,
+ xmlOutputBufferPtr IObuf);
+XSLTPUBFUN int XSLTCALL
+ xsltRunStylesheetUser (xsltStylesheetPtr style,
+ xmlDocPtr doc,
+ const char **params,
+ const char *output,
+ xmlSAXHandlerPtr SAX,
+ xmlOutputBufferPtr IObuf,
+ FILE * profile,
+ xsltTransformContextPtr userCtxt);
+XSLTPUBFUN void XSLTCALL
+ xsltApplyOneTemplate (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr list,
+ xsltTemplatePtr templ,
+ xsltStackElemPtr params);
+XSLTPUBFUN void XSLTCALL
+ xsltDocumentElem (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltSort (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltCopy (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltText (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltElement (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltComment (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltAttribute (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltProcessingInstruction(xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltCopyOf (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltValueOf (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltNumber (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltApplyImports (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltCallTemplate (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltApplyTemplates (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltChoose (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltIf (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltForEach (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst,
+ xsltElemPreCompPtr comp);
+XSLTPUBFUN void XSLTCALL
+ xsltRegisterAllElement (xsltTransformContextPtr ctxt);
+
+XSLTPUBFUN xmlNodePtr XSLTCALL
+ xsltCopyTextString (xsltTransformContextPtr ctxt,
+ xmlNodePtr target,
+ const xmlChar *string,
+ int noescape);
+
+/* Following 2 functions needed for libexslt/functions.c */
+XSLTPUBFUN void XSLTCALL
+ xsltLocalVariablePop (xsltTransformContextPtr ctxt,
+ int limitNr,
+ int level);
+XSLTPUBFUN int XSLTCALL
+ xsltLocalVariablePush (xsltTransformContextPtr ctxt,
+ xsltStackElemPtr variable,
+ int level);
+/*
+ * Hook for the debugger if activated.
+ */
+XSLTPUBFUN void XSLTCALL
+ xslHandleDebugger (xmlNodePtr cur,
+ xmlNodePtr node,
+ xsltTemplatePtr templ,
+ xsltTransformContextPtr ctxt);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLT_TRANSFORM_H__ */
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltconfig.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltconfig.h
new file mode 100644
index 0000000000000000000000000000000000000000..4f4b7f1f65a9f662257cafa823e4f6f70dc9389b
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltconfig.h
@@ -0,0 +1,146 @@
+/*
+ * Summary: compile-time version information for the XSLT engine
+ * Description: compile-time version information for the XSLT engine
+ * this module is autogenerated.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLTCONFIG_H__
+#define __XML_XSLTCONFIG_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * LIBXSLT_DOTTED_VERSION:
+ *
+ * the version string like "1.2.3"
+ */
+#define LIBXSLT_DOTTED_VERSION "1.1.43"
+
+/**
+ * LIBXSLT_VERSION:
+ *
+ * the version number: 1.2.3 value is 10203
+ */
+#define LIBXSLT_VERSION 10143
+
+/**
+ * LIBXSLT_VERSION_STRING:
+ *
+ * the version number string, 1.2.3 value is "10203"
+ */
+#define LIBXSLT_VERSION_STRING "10143"
+
+/**
+ * LIBXSLT_VERSION_EXTRA:
+ *
+ * extra version information, used to show a Git commit description
+ */
+#define LIBXSLT_VERSION_EXTRA ""
+
+/**
+ * WITH_XSLT_DEBUG:
+ *
+ * Activate the compilation of the debug reporting. Speed penalty
+ * is insignifiant and being able to run xsltpoc -v is useful. On
+ * by default unless --without-debug is passed to configure
+ */
+#if 0
+#define WITH_XSLT_DEBUG
+#endif
+
+/**
+ * XSLT_NEED_TRIO:
+ *
+ * should be activated if the existing libc library lacks some of the
+ * string formatting function, in that case reuse the Trio ones already
+ * compiled in the libxml2 library.
+ */
+
+#if 0
+#define XSLT_NEED_TRIO
+#endif
+#ifdef __VMS
+#define HAVE_SYS_STAT_H 1
+#ifndef XSLT_NEED_TRIO
+#define XSLT_NEED_TRIO
+#endif
+#endif
+
+#ifdef XSLT_NEED_TRIO
+#define TRIO_REPLACE_STDIO
+#endif
+
+/**
+ * WITH_XSLT_DEBUGGER:
+ *
+ * Activate the compilation of the debugger support. Speed penalty
+ * is insignifiant.
+ * On by default unless --without-debugger is passed to configure
+ */
+#if 0
+#ifndef WITH_DEBUGGER
+#define WITH_DEBUGGER
+#endif
+#endif
+
+/**
+ * WITH_PROFILER:
+ *
+ * Activate the compilation of the profiler. Speed penalty
+ * is insignifiant.
+ * On by default unless --without-profiler is passed to configure
+ */
+#if 1
+#ifndef WITH_PROFILER
+#define WITH_PROFILER
+#endif
+#endif
+
+/**
+ * WITH_MODULES:
+ *
+ * Whether module support is configured into libxslt
+ * Note: no default module path for win32 platforms
+ */
+#if 0
+#ifndef WITH_MODULES
+#define WITH_MODULES
+#endif
+#define LIBXSLT_DEFAULT_PLUGINS_PATH() ""
+#endif
+
+/**
+ * LIBXSLT_ATTR_FORMAT:
+ *
+ * This macro is used to indicate to GCC the parameters are printf-like
+ */
+#ifdef __GNUC__
+#define LIBXSLT_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
+#else
+#define LIBXSLT_ATTR_FORMAT(fmt,args)
+#endif
+
+/**
+ * LIBXSLT_PUBLIC:
+ *
+ * This macro is used to declare PUBLIC variables for Cygwin and for MSC on Windows
+ */
+#if !defined LIBXSLT_PUBLIC
+#if (defined(__CYGWIN__) || defined _MSC_VER) && !defined IN_LIBXSLT && !defined LIBXSLT_STATIC
+#define LIBXSLT_PUBLIC __declspec(dllimport)
+#else
+#define LIBXSLT_PUBLIC
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLTCONFIG_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltlocale.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltlocale.h
new file mode 100644
index 0000000000000000000000000000000000000000..c8be58d3dbef5e311da65a7ef9bdf9074bcc483d
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltlocale.h
@@ -0,0 +1,44 @@
+/*
+ * Summary: Locale handling
+ * Description: Interfaces for locale handling. Needed for language dependent
+ * sorting.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Nick Wellnhofer
+ */
+
+#ifndef __XML_XSLTLOCALE_H__
+#define __XML_XSLTLOCALE_H__
+
+#include
+#include "xsltexports.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XSLTPUBFUN void * XSLTCALL
+ xsltNewLocale (const xmlChar *langName,
+ int lowerFirst);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeLocale (void *locale);
+XSLTPUBFUN xmlChar * XSLTCALL
+ xsltStrxfrm (void *locale,
+ const xmlChar *string);
+XSLTPUBFUN void XSLTCALL
+ xsltFreeLocales (void);
+
+/* Backward compatibility */
+typedef void *xsltLocale;
+typedef xmlChar xsltLocaleChar;
+XSLTPUBFUN int XSLTCALL
+ xsltLocaleStrcmp (void *locale,
+ const xmlChar *str1,
+ const xmlChar *str2);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLTLOCALE_H__ */
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltutils.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltutils.h
new file mode 100644
index 0000000000000000000000000000000000000000..2514774b3f11a0c0dd3069484b31c8a282d1d411
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/libxslt/xsltutils.h
@@ -0,0 +1,343 @@
+/*
+ * Summary: set of utilities for the XSLT engine
+ * Description: interfaces for the utilities module of the XSLT engine.
+ * things like message handling, profiling, and other
+ * generally useful routines.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XSLTUTILS_H__
+#define __XML_XSLTUTILS_H__
+
+#include
+#include
+#include
+#include
+#include "xsltexports.h"
+#include "xsltInternals.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XSLT_TODO:
+ *
+ * Macro to flag unimplemented blocks.
+ */
+#define XSLT_TODO \
+ xsltGenericError(xsltGenericErrorContext, \
+ "Unimplemented block at %s:%d\n", \
+ __FILE__, __LINE__);
+
+/**
+ * XSLT_STRANGE:
+ *
+ * Macro to flag that a problem was detected internally.
+ */
+#define XSLT_STRANGE \
+ xsltGenericError(xsltGenericErrorContext, \
+ "Internal error at %s:%d\n", \
+ __FILE__, __LINE__);
+
+/**
+ * IS_XSLT_ELEM:
+ *
+ * Checks that the element pertains to XSLT namespace.
+ */
+#define IS_XSLT_ELEM(n) \
+ (((n) != NULL) && ((n)->type == XML_ELEMENT_NODE) && \
+ ((n)->ns != NULL) && (xmlStrEqual((n)->ns->href, XSLT_NAMESPACE)))
+
+/**
+ * IS_XSLT_NAME:
+ *
+ * Checks the value of an element in XSLT namespace.
+ */
+#define IS_XSLT_NAME(n, val) \
+ (xmlStrEqual((n)->name, (const xmlChar *) (val)))
+
+/**
+ * IS_XSLT_REAL_NODE:
+ *
+ * Check that a node is a 'real' one: document, element, text or attribute.
+ */
+#define IS_XSLT_REAL_NODE(n) \
+ (((n) != NULL) && \
+ (((n)->type == XML_ELEMENT_NODE) || \
+ ((n)->type == XML_TEXT_NODE) || \
+ ((n)->type == XML_CDATA_SECTION_NODE) || \
+ ((n)->type == XML_ATTRIBUTE_NODE) || \
+ ((n)->type == XML_DOCUMENT_NODE) || \
+ ((n)->type == XML_HTML_DOCUMENT_NODE) || \
+ ((n)->type == XML_COMMENT_NODE) || \
+ ((n)->type == XML_PI_NODE)))
+
+/*
+ * Our own version of namespaced attributes lookup.
+ */
+XSLTPUBFUN xmlChar * XSLTCALL
+ xsltGetNsProp (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *nameSpace);
+XSLTPUBFUN const xmlChar * XSLTCALL
+ xsltGetCNsProp (xsltStylesheetPtr style,
+ xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *nameSpace);
+XSLTPUBFUN int XSLTCALL
+ xsltGetUTF8Char (const unsigned char *utf,
+ int *len);
+#ifdef IN_LIBXSLT
+/** DOC_DISABLE */
+XSLTPUBFUN int XSLTCALL
+ xsltGetUTF8CharZ (const unsigned char *utf,
+ int *len);
+/** DOC_ENABLE */
+#endif
+
+/*
+ * XSLT Debug Tracing Tracing Types
+ */
+typedef enum {
+ XSLT_TRACE_ALL = -1,
+ XSLT_TRACE_NONE = 0,
+ XSLT_TRACE_COPY_TEXT = 1<<0,
+ XSLT_TRACE_PROCESS_NODE = 1<<1,
+ XSLT_TRACE_APPLY_TEMPLATE = 1<<2,
+ XSLT_TRACE_COPY = 1<<3,
+ XSLT_TRACE_COMMENT = 1<<4,
+ XSLT_TRACE_PI = 1<<5,
+ XSLT_TRACE_COPY_OF = 1<<6,
+ XSLT_TRACE_VALUE_OF = 1<<7,
+ XSLT_TRACE_CALL_TEMPLATE = 1<<8,
+ XSLT_TRACE_APPLY_TEMPLATES = 1<<9,
+ XSLT_TRACE_CHOOSE = 1<<10,
+ XSLT_TRACE_IF = 1<<11,
+ XSLT_TRACE_FOR_EACH = 1<<12,
+ XSLT_TRACE_STRIP_SPACES = 1<<13,
+ XSLT_TRACE_TEMPLATES = 1<<14,
+ XSLT_TRACE_KEYS = 1<<15,
+ XSLT_TRACE_VARIABLES = 1<<16
+} xsltDebugTraceCodes;
+
+/**
+ * XSLT_TRACE:
+ *
+ * Control the type of xsl debugtrace messages emitted.
+ */
+#define XSLT_TRACE(ctxt,code,call) \
+ if (ctxt->traceCode && (*(ctxt->traceCode) & code)) \
+ call
+
+XSLTPUBFUN void XSLTCALL
+ xsltDebugSetDefaultTrace(xsltDebugTraceCodes val);
+XSLTPUBFUN xsltDebugTraceCodes XSLTCALL
+ xsltDebugGetDefaultTrace(void);
+
+/*
+ * XSLT specific error and debug reporting functions.
+ */
+XSLTPUBVAR xmlGenericErrorFunc xsltGenericError;
+XSLTPUBVAR void *xsltGenericErrorContext;
+XSLTPUBVAR xmlGenericErrorFunc xsltGenericDebug;
+XSLTPUBVAR void *xsltGenericDebugContext;
+
+XSLTPUBFUN void XSLTCALL
+ xsltPrintErrorContext (xsltTransformContextPtr ctxt,
+ xsltStylesheetPtr style,
+ xmlNodePtr node);
+XSLTPUBFUN void XSLTCALL
+ xsltMessage (xsltTransformContextPtr ctxt,
+ xmlNodePtr node,
+ xmlNodePtr inst);
+XSLTPUBFUN void XSLTCALL
+ xsltSetGenericErrorFunc (void *ctx,
+ xmlGenericErrorFunc handler);
+XSLTPUBFUN void XSLTCALL
+ xsltSetGenericDebugFunc (void *ctx,
+ xmlGenericErrorFunc handler);
+XSLTPUBFUN void XSLTCALL
+ xsltSetTransformErrorFunc (xsltTransformContextPtr ctxt,
+ void *ctx,
+ xmlGenericErrorFunc handler);
+XSLTPUBFUN void XSLTCALL
+ xsltTransformError (xsltTransformContextPtr ctxt,
+ xsltStylesheetPtr style,
+ xmlNodePtr node,
+ const char *msg,
+ ...) LIBXSLT_ATTR_FORMAT(4,5);
+
+XSLTPUBFUN int XSLTCALL
+ xsltSetCtxtParseOptions (xsltTransformContextPtr ctxt,
+ int options);
+/*
+ * Sorting.
+ */
+
+XSLTPUBFUN void XSLTCALL
+ xsltDocumentSortFunction (xmlNodeSetPtr list);
+XSLTPUBFUN void XSLTCALL
+ xsltSetSortFunc (xsltSortFunc handler);
+XSLTPUBFUN void XSLTCALL
+ xsltSetCtxtSortFunc (xsltTransformContextPtr ctxt,
+ xsltSortFunc handler);
+XSLTPUBFUN void XSLTCALL
+ xsltSetCtxtLocaleHandlers (xsltTransformContextPtr ctxt,
+ xsltNewLocaleFunc newLocale,
+ xsltFreeLocaleFunc freeLocale,
+ xsltGenSortKeyFunc genSortKey);
+XSLTPUBFUN void XSLTCALL
+ xsltDefaultSortFunction (xsltTransformContextPtr ctxt,
+ xmlNodePtr *sorts,
+ int nbsorts);
+XSLTPUBFUN void XSLTCALL
+ xsltDoSortFunction (xsltTransformContextPtr ctxt,
+ xmlNodePtr * sorts,
+ int nbsorts);
+XSLTPUBFUN xmlXPathObjectPtr * XSLTCALL
+ xsltComputeSortResult (xsltTransformContextPtr ctxt,
+ xmlNodePtr sort);
+
+/*
+ * QNames handling.
+ */
+
+XSLTPUBFUN const xmlChar * XSLTCALL
+ xsltSplitQName (xmlDictPtr dict,
+ const xmlChar *name,
+ const xmlChar **prefix);
+XSLTPUBFUN const xmlChar * XSLTCALL
+ xsltGetQNameURI (xmlNodePtr node,
+ xmlChar **name);
+
+XSLTPUBFUN const xmlChar * XSLTCALL
+ xsltGetQNameURI2 (xsltStylesheetPtr style,
+ xmlNodePtr node,
+ const xmlChar **name);
+
+/*
+ * Output, reuse libxml I/O buffers.
+ */
+XSLTPUBFUN int XSLTCALL
+ xsltSaveResultTo (xmlOutputBufferPtr buf,
+ xmlDocPtr result,
+ xsltStylesheetPtr style);
+XSLTPUBFUN int XSLTCALL
+ xsltSaveResultToFilename (const char *URI,
+ xmlDocPtr result,
+ xsltStylesheetPtr style,
+ int compression);
+XSLTPUBFUN int XSLTCALL
+ xsltSaveResultToFile (FILE *file,
+ xmlDocPtr result,
+ xsltStylesheetPtr style);
+XSLTPUBFUN int XSLTCALL
+ xsltSaveResultToFd (int fd,
+ xmlDocPtr result,
+ xsltStylesheetPtr style);
+XSLTPUBFUN int XSLTCALL
+ xsltSaveResultToString (xmlChar **doc_txt_ptr,
+ int * doc_txt_len,
+ xmlDocPtr result,
+ xsltStylesheetPtr style);
+
+/*
+ * XPath interface
+ */
+XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL
+ xsltXPathCompile (xsltStylesheetPtr style,
+ const xmlChar *str);
+XSLTPUBFUN xmlXPathCompExprPtr XSLTCALL
+ xsltXPathCompileFlags (xsltStylesheetPtr style,
+ const xmlChar *str,
+ int flags);
+
+#ifdef IN_LIBXSLT
+/** DOC_DISABLE */
+#define XSLT_SOURCE_NODE_MASK 15u
+#define XSLT_SOURCE_NODE_HAS_KEY 1u
+#define XSLT_SOURCE_NODE_HAS_ID 2u
+int
+xsltGetSourceNodeFlags(xmlNodePtr node);
+int
+xsltSetSourceNodeFlags(xsltTransformContextPtr ctxt, xmlNodePtr node,
+ int flags);
+int
+xsltClearSourceNodeFlags(xmlNodePtr node, int flags);
+void **
+xsltGetPSVIPtr(xmlNodePtr cur);
+/** DOC_ENABLE */
+#endif
+
+#ifdef WITH_PROFILER
+/*
+ * Profiling.
+ */
+XSLTPUBFUN void XSLTCALL
+ xsltSaveProfiling (xsltTransformContextPtr ctxt,
+ FILE *output);
+XSLTPUBFUN xmlDocPtr XSLTCALL
+ xsltGetProfileInformation (xsltTransformContextPtr ctxt);
+
+XSLTPUBFUN long XSLTCALL
+ xsltTimestamp (void);
+XSLTPUBFUN void XSLTCALL
+ xsltCalibrateAdjust (long delta);
+#endif
+
+/**
+ * XSLT_TIMESTAMP_TICS_PER_SEC:
+ *
+ * Sampling precision for profiling
+ */
+#define XSLT_TIMESTAMP_TICS_PER_SEC 100000l
+
+/*
+ * Hooks for the debugger.
+ */
+
+typedef enum {
+ XSLT_DEBUG_NONE = 0, /* no debugging allowed */
+ XSLT_DEBUG_INIT,
+ XSLT_DEBUG_STEP,
+ XSLT_DEBUG_STEPOUT,
+ XSLT_DEBUG_NEXT,
+ XSLT_DEBUG_STOP,
+ XSLT_DEBUG_CONT,
+ XSLT_DEBUG_RUN,
+ XSLT_DEBUG_RUN_RESTART,
+ XSLT_DEBUG_QUIT
+} xsltDebugStatusCodes;
+
+XSLTPUBVAR int xslDebugStatus;
+
+typedef void (*xsltHandleDebuggerCallback) (xmlNodePtr cur, xmlNodePtr node,
+ xsltTemplatePtr templ, xsltTransformContextPtr ctxt);
+typedef int (*xsltAddCallCallback) (xsltTemplatePtr templ, xmlNodePtr source);
+typedef void (*xsltDropCallCallback) (void);
+
+XSLTPUBFUN int XSLTCALL
+ xsltGetDebuggerStatus (void);
+#ifdef WITH_DEBUGGER
+XSLTPUBFUN void XSLTCALL
+ xsltSetDebuggerStatus (int value);
+XSLTPUBFUN int XSLTCALL
+ xsltSetDebuggerCallbacks (int no, void *block);
+XSLTPUBFUN int XSLTCALL
+ xslAddCall (xsltTemplatePtr templ,
+ xmlNodePtr source);
+XSLTPUBFUN void XSLTCALL
+ xslDropCall (void);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XSLTUTILS_H__ */
+
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/lxml-version.h b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/lxml-version.h
new file mode 100644
index 0000000000000000000000000000000000000000..75d9703397df9eb99ad4de2fa0bca45207f56913
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/lxml-version.h
@@ -0,0 +1,3 @@
+#ifndef LXML_VERSION_STRING
+#define LXML_VERSION_STRING "6.0.1"
+#endif
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/relaxng.pxd b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/relaxng.pxd
new file mode 100644
index 0000000000000000000000000000000000000000..5ac96711e7b8124400fe6a8acb59f0e4192d2949
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/includes/relaxng.pxd
@@ -0,0 +1,64 @@
+from lxml.includes.tree cimport xmlDoc
+from lxml.includes.xmlerror cimport xmlStructuredErrorFunc
+
+cdef extern from "libxml/relaxng.h" nogil:
+ ctypedef struct xmlRelaxNG
+ ctypedef struct xmlRelaxNGParserCtxt
+
+ ctypedef struct xmlRelaxNGValidCtxt
+
+ 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
+
+ cdef xmlRelaxNGValidCtxt* xmlRelaxNGNewValidCtxt(xmlRelaxNG* schema)
+ cdef int xmlRelaxNGValidateDoc(xmlRelaxNGValidCtxt* ctxt, xmlDoc* doc)
+ cdef xmlRelaxNG* xmlRelaxNGParse(xmlRelaxNGParserCtxt* ctxt)
+ cdef xmlRelaxNGParserCtxt* xmlRelaxNGNewParserCtxt(char* URL)
+ cdef xmlRelaxNGParserCtxt* xmlRelaxNGNewDocParserCtxt(xmlDoc* doc)
+ cdef void xmlRelaxNGFree(xmlRelaxNG* schema)
+ cdef void xmlRelaxNGFreeParserCtxt(xmlRelaxNGParserCtxt* ctxt)
+ cdef void xmlRelaxNGFreeValidCtxt(xmlRelaxNGValidCtxt* ctxt)
+
+ cdef void xmlRelaxNGSetValidStructuredErrors(
+ xmlRelaxNGValidCtxt* ctxt, xmlStructuredErrorFunc serror, void *ctx)
+ cdef void xmlRelaxNGSetParserStructuredErrors(
+ xmlRelaxNGParserCtxt* ctxt, xmlStructuredErrorFunc serror, void *ctx)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c2b06dcad20bfd258d916f8f12a0c39b00a89a1b
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/rng/iso-schematron.rng b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/rng/iso-schematron.rng
new file mode 100644
index 0000000000000000000000000000000000000000..a4f504af1f7d6f01f7523d447b9304f417c01800
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/rng/iso-schematron.rng
@@ -0,0 +1,709 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ltr
+ rtl
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ preserve
+ default
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+
+
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..21a5d2a069cab9fa327d9a3cd4e4d56c21bb10db
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..de0c9ea700d20c78111660e5fe8bf4ddc5a88137
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..5018395234799dd65d53a339daaddf445a09dbea
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl
@@ -0,0 +1,313 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Suppressed abstract pattern was here
+
+
+
+
+
+
+ Start pattern based on abstract
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..44e5573b73077e015d404935479bdc9344c5ea4d
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl
@@ -0,0 +1,1160 @@
+
+
+
+
+
+
+
+
+
+ true
+ true
+ true
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error: Impossible URL in RELAX NG extRef
+ include
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error: Impossible URL in Schematron include
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+
+ Schema error: Use include to
+ include fragments, not a whole
+ schema
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+ Schema error: Use include to include
+ fragments, not a whole schema
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error: Impossible URL in Schematron include
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error: Impossible URL in Schematron include
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+
+
+ Schema error: Use include to include
+ fragments, not a whole schema
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+ Schema error: Use include to include
+ fragments, not a whole schema
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error: Impossible URL in DTLL include
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error: Impossible URL in CRDL include
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fatal error: Xinclude href contains fragment
+ identifier #
+
+
+
+
+
+
+ Fatal error: Sorry, this software only
+ supports simple ids in XInclude xpointers
+
+
+
+
+
+
+ Fatal Error: Impossible URL in XInclude
+ include
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file and fallback
+ file:
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error: Impossible URL in XLink embedding
+ link
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Unable to open referenced included file:
+
+
+
+
+
+
+ Unable to locate id attribute:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..d59b8f38fe0bf28bc089b033c2acdd314839b8cc
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (
+ /
+ )
+
+
+
\ No newline at end of file
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..b0e7175cfff34fb05d631622c9429f0adcda8d5d
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl
@@ -0,0 +1,1796 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ #ALL
+
+
+
+false
+
+true
+
+
+
+
+ true
+ false
+
+
+
+
+
+
+ true
+ false
+
+
+
+
+
+
+
+
+ @*|
+
+ *
+ node()
+ *|comment()|processing-instruction()
+
+
+
+
+
+
+
+
+
+
+
+
+default
+
+false
+
+
+
+1
+
+
+
+
+ Schema error: Schematron elements in old and new namespaces found
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Schema error: in the queryBinding attribute, use 'xslt'
+
+
+
+
+ 1.0
+
+
+
+
+
+
+
+
+ This XSLT was automatically generated from a Schematron schema.
+
+
+
+
+ 1.0
+
+
+
+
+
+
+
+
+
+ Fail: This implementation of ISO Schematron does not work with
+ schemas using the "" query language.
+
+
+
+
+ Implementers: please note that overriding process-prolog or process-root is
+ the preferred method for meta-stylesheets to use where possible.
+
+
+
+
+
+
+
+
+
+
PHASES
+
+
PROLOG
+
+
KEYS
+
+
DEFAULT RULES
+
+
SCHEMA METADATA
+
+
SCHEMATRON PATTERNS
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Phase Error: no phase with name has been defined.
+
+
+
+
+
+
+ MODE: SCHEMATRON-SELECT-FULL-PATH
+ This mode can be used to generate an ugly though full XPath for locators
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MODE: SCHEMATRON-FULL-PATH
+ This mode can be used to generate an ugly though full XPath for locators
+
+
+
+
+
+ /
+
+
+
+
+
+ []
+
+
+
+ *[local-name()='
+ ' and namespace-uri()='
+
+ ']
+
+
+ []
+
+
+
+
+
+
+
+
+
+ /
+
+ @
+
+ @*[local-name()='
+
+ ' and namespace-uri()='
+
+ ']
+
+
+
+
+
+
+
+
+ MODE: SCHEMATRON-FULL-PATH-2
+
+ This mode can be used to generate prefixed XPath for humans
+
+
+
+
+
+ /
+
+
+ [
+
+ ]
+
+
+
+
+ /@
+
+
+
+
+ MODE: GENERATE-ID-FROM-PATH
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ .
+
+
+
+
+
+
+ MODE: SCHEMATRON-FULL-PATH-3
+
+
+ This mode can be used to generate prefixed XPath for humans
+ (Top-level element has index)
+
+
+
+
+
+ /
+
+
+ [
+
+ ]
+
+
+
+
+ /@
+
+
+
+
+ MODE: GENERATE-ID-2
+
+
+ U
+
+
+ U
+
+
+
+
+ U.
+
+ n
+
+
+
+
+ U.
+
+ _
+
+ _
+
+
+
+
+ Strip characters
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Markup Error: no pattern attribute in <active>
+
+
+
+ Reference Error: the pattern "" has been activated but is not declared
+
+
+
+
+
+
+
+ Markup Error: no test attribute in <assert
+
+
+ ASSERT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Markup Error: no test attribute in <report>
+
+
+
+ REPORT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Markup Error: no id attribute in <diagnostic>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Markup Error: no rule attribute in <extends>
+
+
+ Reference Error: the abstract rule "" has been referenced but is not declared
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Markup Error: no name attribute in <key>
+
+
+ Markup Error: no path or use attribute in <key>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Markup Error: no path or use attribute in <key>
+
+
+
+
+
+
+
+
+
+
+
+ Schema error: The key element is not in the ISO Schematron namespace. Use the XSLT namespace.
+
+
+
+
+
+
+
+ Schema error: Empty href= attribute for include directive.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error: Impossible URL in Schematron include
+
+
+
+
+
+
+ Schema error: Use include to include fragments, not a whole schema
+
+
+
+
+
+
+
+
+
+ Schema error: Use include to include fragments, not a whole schema
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error: Impossible URL in Schematron include
+
+
+
+
+
+
+ Schema error: Use include to include fragments, not a whole schema
+
+
+
+
+
+
+
+
+
+
+ Schema error: Use include to include fragments, not a whole schema
+
+
+
+
+
+
+
+
+
+ Warning: Variables should not be used with the "xpath" query language binding.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Markup Error: no uri attribute in <ns>
+
+
+ Markup Error: no prefix attribute in <ns>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ //(
+
+ (
+
+ )
+ |
+
+ )
+ [not(self::text())]
+
+
+
+
+
+
+
+
+
+
+
+
+ Schema implementation error: This schema has abstract patterns, yet they are supposed to be preprocessed out already
+
+
+
+
+
+
+
+
+
+ PATTERN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Markup Error: no id attribute in <phase>
+
+
+
+
+
+
+
+ Markup Error: no context attribute in <rule>
+
+
+ RULE
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Markup Error: no id attribute on abstract <rule>
+
+
+ Markup Error: (2) context attribute on abstract <rule>
+
+
+
+
+
+ Markup Error: context attribute on abstract <rule>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Markup Error: no select attribute in <value-of>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Warning:
+
+ must not contain any child elements
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Reference error: A diagnostic "" has been referenced but is not declared
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Using the XSLT namespace with a prefix other than "xsl" in
+ Schematron rules is not supported
+ in this processor:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Error: unrecognized element in ISO Schematron namespace: check spelling
+ and capitalization
+
+
+
+
+
+
+
+
+
+
+
+
+ Warning: unrecognized element
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Warning: unrecognized element
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ title
+
+
+
+
+
+
+ schema-title
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl
new file mode 100644
index 0000000000000000000000000000000000000000..dae74ff6a2bd56a4f21147905c3a1661baf0b3ab
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl
@@ -0,0 +1,588 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+true
+
+
+
+
+
+
+
+
+
+
+ #ALL
+
+
+false
+true
+true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ xslt1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt
new file mode 100644
index 0000000000000000000000000000000000000000..e5d6dfcd9e9c2787c32d98b0063a1fa1ec3236ad
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt
@@ -0,0 +1,84 @@
+ISO SCHEMATRON 2010
+
+XSLT implementation by Rick Jelliffe with assistance from members of Schematron-love-in maillist.
+
+2010-04-21
+
+Two distributions are available. One is for XSLT1 engines.
+The other is for XSLT2 engines, such as SAXON 9.
+
+
+This version of Schematron splits the process into a pipeline of several different XSLT stages.
+
+1) First, preprocess your Schematron schema with iso_dsdl_include.xsl.
+This is a macro processor to assemble the schema from various parts.
+If your schema is not in separate parts, you can skip this stage.
+This stage also generates error messages for some common XPath syntax problems.
+
+2) Second, preprocess the output from stage 1 with iso_abstract_expand.xsl.
+This is a macro processor to convert abstract patterns to real patterns.
+If your schema does not use abstract patterns, you can skip this
+stage.
+
+3) Third, compile the Schematron schema into an XSLT script.
+This will typically use iso_svrl_for_xslt1.xsl or iso_svrl_for_xslt2.xsl
+(which in turn invoke iso_schematron_skeleton_for_xslt1.xsl or iso_schematron_skeleton_for_saxon.xsl)
+However, other "meta-stylesheets" are also in common use; the principle of operation is the same.
+If your schema uses Schematron phases, supply these as command line/invocation parameters
+to this process.
+
+4) Fourth, run the script generated by stage 3 against the document being validated.
+If you are using the SVRL script, then the output of validation will be an XML document.
+If your schema uses Schematron parameters, supply these as command line/invocation parameters
+to this process.
+
+
+The XSLT2 distribution also features several next generation features,
+such as validating multiple documents. See the source code for details.
+
+Schematron assertions can be written in any language, of course; the file
+sch-messages-en.xhtml contains the diagnostics messages from the XSLT2 skeleton
+in English, and this can be used as template to localize the skeleton's
+error messages. Note that typically programming errors in Schematron are XPath
+errors, which requires localized messages from the XSLT engine.
+
+ANT
+---
+To give an example of how to process a document, here is a sample ANT task.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako-1.3.10.dist-info/licenses/LICENSE b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako-1.3.10.dist-info/licenses/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..4c18adee3da2a51fb5b2b77567cb408ea4395b50
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako-1.3.10.dist-info/licenses/LICENSE
@@ -0,0 +1,19 @@
+Copyright 2006-2025 the Mako authors and contributors .
+
+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/mako/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9021b6899455dd37a26b56d64604b610d8348332
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/_ast_util.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/_ast_util.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..17da835920eddd86d6989f69d9047d60c9ccf218
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/_ast_util.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/ast.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/ast.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4e9e6b4d86df305fc30e5c8f941c20beeb9f3df7
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/ast.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/cache.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/cache.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2fb0cf1c3c8388ee8f54f1b19c46985491790160
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/cache.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/cmd.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/cmd.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..27788870da8ac77dca4b200c0680e1915a07047c
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/cmd.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/codegen.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/codegen.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..847bc495b1c2d9b9ed2f94b5b6c4252affc88e5c
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/codegen.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/compat.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/compat.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1de0980aba68d155efe22d7f33ea00745353de3e
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/compat.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/exceptions.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/exceptions.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b1fbdcedb08cabcd15b4d7d68f1750c4295aa137
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/exceptions.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/filters.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/filters.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c51c61b45446776c0d5bbcb3aa4455548472121f
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/filters.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/lexer.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/lexer.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e01aa7d07e6eff6539673593dda1e9680628cd9c
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/lexer.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/lookup.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/lookup.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..267313270f5de1c14fa9e51b5e4924075ef9f4f3
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/lookup.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/parsetree.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/parsetree.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8b05d15a1c871326ac6f4e2fcbe2bbe5011286bb
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/parsetree.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/pygen.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/pygen.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..340415c4bf69ce16a0d6e00901a170591a455e93
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/pygen.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/pyparser.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/pyparser.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ce1a164525cdac720cb8dd71e5d61d3da554eb7b
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/pyparser.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/runtime.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/runtime.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ab5b305f7bb65076f214e4996ca93802da5a3eec
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/runtime.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/template.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/template.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6984f39186789a2ef0d66e739e9cd51bbf614239
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/template.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/util.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/util.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e628ebdb898e84b73673a8b917196d2934f0d0e2
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/__pycache__/util.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__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/mako/ext/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1043d3b64ca89dc8c384093fa86dfd7d381bdd18
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/autohandler.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/autohandler.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f9e4c0375c14ffa7277f5ac85524745c0b024ae6
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/autohandler.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/babelplugin.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/babelplugin.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7965f4f76931330ea40c9d8273e7296b64dfbc48
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/babelplugin.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/beaker_cache.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/beaker_cache.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..79ddc8c1c0fa72fd2b97f8edc0c35301b73a3aae
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/beaker_cache.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/extract.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/extract.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..51abd6161918119722685522fa435d3347f51e0c
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/extract.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/linguaplugin.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/linguaplugin.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..bd11cd4ea07dd9536b55fc03e4cb7daefadc6c98
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/linguaplugin.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/preprocessors.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/preprocessors.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..279fabda2406537e8d7589d272e1db5e321cf881
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/preprocessors.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/pygmentplugin.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/pygmentplugin.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..64ad4cede9416781279bb55c658f4de7165264c9
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/pygmentplugin.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/turbogears.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/turbogears.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..3b5e85d943505f85253ff99067cab8c0f3e1837f
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/__pycache__/turbogears.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/autohandler.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/autohandler.py
new file mode 100644
index 0000000000000000000000000000000000000000..829ed097ce1dd90fd517760f0f49ee23d41cf8c6
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/autohandler.py
@@ -0,0 +1,70 @@
+# ext/autohandler.py
+# Copyright 2006-2025 the Mako authors and contributors
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""adds autohandler functionality to Mako templates.
+
+requires that the TemplateLookup class is used with templates.
+
+usage::
+
+ <%!
+ from mako.ext.autohandler import autohandler
+ %>
+ <%inherit file="${autohandler(template, context)}"/>
+
+
+or with custom autohandler filename::
+
+ <%!
+ from mako.ext.autohandler import autohandler
+ %>
+ <%inherit file="${autohandler(template, context, name='somefilename')}"/>
+
+"""
+
+import os
+import posixpath
+import re
+
+
+def autohandler(template, context, name="autohandler"):
+ lookup = context.lookup
+ _template_uri = template.module._template_uri
+ if not lookup.filesystem_checks:
+ try:
+ return lookup._uri_cache[(autohandler, _template_uri, name)]
+ except KeyError:
+ pass
+
+ tokens = re.findall(r"([^/]+)", posixpath.dirname(_template_uri)) + [name]
+ while len(tokens):
+ path = "/" + "/".join(tokens)
+ if path != _template_uri and _file_exists(lookup, path):
+ if not lookup.filesystem_checks:
+ return lookup._uri_cache.setdefault(
+ (autohandler, _template_uri, name), path
+ )
+ else:
+ return path
+ if len(tokens) == 1:
+ break
+ tokens[-2:] = [name]
+
+ if not lookup.filesystem_checks:
+ return lookup._uri_cache.setdefault(
+ (autohandler, _template_uri, name), None
+ )
+ else:
+ return None
+
+
+def _file_exists(lookup, path):
+ psub = re.sub(r"^/", "", path)
+ for d in lookup.directories:
+ if os.path.exists(d + "/" + psub):
+ return True
+ else:
+ return False
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/babelplugin.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/babelplugin.py
new file mode 100644
index 0000000000000000000000000000000000000000..541ea54091c80974ab9091ad478692673816befa
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/babelplugin.py
@@ -0,0 +1,57 @@
+# ext/babelplugin.py
+# Copyright 2006-2025 the Mako authors and contributors
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""gettext message extraction via Babel: https://pypi.org/project/Babel/"""
+from babel.messages.extract import extract_python
+
+from mako.ext.extract import MessageExtractor
+
+
+class BabelMakoExtractor(MessageExtractor):
+ def __init__(self, keywords, comment_tags, options):
+ self.keywords = keywords
+ self.options = options
+ self.config = {
+ "comment-tags": " ".join(comment_tags),
+ "encoding": options.get(
+ "input_encoding", options.get("encoding", None)
+ ),
+ }
+ super().__init__()
+
+ def __call__(self, fileobj):
+ return self.process_file(fileobj)
+
+ def process_python(self, code, code_lineno, translator_strings):
+ comment_tags = self.config["comment-tags"]
+ for (
+ lineno,
+ funcname,
+ messages,
+ python_translator_comments,
+ ) in extract_python(code, self.keywords, comment_tags, self.options):
+ yield (
+ code_lineno + (lineno - 1),
+ funcname,
+ messages,
+ translator_strings + python_translator_comments,
+ )
+
+
+def extract(fileobj, keywords, comment_tags, options):
+ """Extract messages from Mako templates.
+
+ :param fileobj: the file-like object the messages should be extracted from
+ :param keywords: a list of keywords (i.e. function names) that should be
+ recognized as translation functions
+ :param comment_tags: a list of translator tags to search for and include
+ in the results
+ :param options: a dictionary of additional options (optional)
+ :return: an iterator over ``(lineno, funcname, message, comments)`` tuples
+ :rtype: ``iterator``
+ """
+ extractor = BabelMakoExtractor(keywords, comment_tags, options)
+ yield from extractor(fileobj)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/beaker_cache.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/beaker_cache.py
new file mode 100644
index 0000000000000000000000000000000000000000..b1392f30f684de1dc830888a11337d20afb478bc
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/beaker_cache.py
@@ -0,0 +1,82 @@
+# ext/beaker_cache.py
+# Copyright 2006-2025 the Mako authors and contributors
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""Provide a :class:`.CacheImpl` for the Beaker caching system."""
+
+from mako import exceptions
+from mako.cache import CacheImpl
+
+try:
+ from beaker import cache as beaker_cache
+except:
+ has_beaker = False
+else:
+ has_beaker = True
+
+_beaker_cache = None
+
+
+class BeakerCacheImpl(CacheImpl):
+
+ """A :class:`.CacheImpl` provided for the Beaker caching system.
+
+ This plugin is used by default, based on the default
+ value of ``'beaker'`` for the ``cache_impl`` parameter of the
+ :class:`.Template` or :class:`.TemplateLookup` classes.
+
+ """
+
+ def __init__(self, cache):
+ if not has_beaker:
+ raise exceptions.RuntimeException(
+ "Can't initialize Beaker plugin; Beaker is not installed."
+ )
+ global _beaker_cache
+ if _beaker_cache is None:
+ if "manager" in cache.template.cache_args:
+ _beaker_cache = cache.template.cache_args["manager"]
+ else:
+ _beaker_cache = beaker_cache.CacheManager()
+ super().__init__(cache)
+
+ def _get_cache(self, **kw):
+ expiretime = kw.pop("timeout", None)
+ if "dir" in kw:
+ kw["data_dir"] = kw.pop("dir")
+ elif self.cache.template.module_directory:
+ kw["data_dir"] = self.cache.template.module_directory
+
+ if "manager" in kw:
+ kw.pop("manager")
+
+ if kw.get("type") == "memcached":
+ kw["type"] = "ext:memcached"
+
+ if "region" in kw:
+ region = kw.pop("region")
+ cache = _beaker_cache.get_cache_region(self.cache.id, region, **kw)
+ else:
+ cache = _beaker_cache.get_cache(self.cache.id, **kw)
+ cache_args = {"starttime": self.cache.starttime}
+ if expiretime:
+ cache_args["expiretime"] = expiretime
+ return cache, cache_args
+
+ def get_or_create(self, key, creation_function, **kw):
+ cache, kw = self._get_cache(**kw)
+ return cache.get(key, createfunc=creation_function, **kw)
+
+ def put(self, key, value, **kw):
+ cache, kw = self._get_cache(**kw)
+ cache.put(key, value, **kw)
+
+ def get(self, key, **kw):
+ cache, kw = self._get_cache(**kw)
+ return cache.get(key, **kw)
+
+ def invalidate(self, key, **kw):
+ cache, kw = self._get_cache(**kw)
+ cache.remove_value(key, **kw)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/extract.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/extract.py
new file mode 100644
index 0000000000000000000000000000000000000000..609c5c29882b36165a381f527938f939c55010ee
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/extract.py
@@ -0,0 +1,129 @@
+# ext/extract.py
+# Copyright 2006-2025 the Mako authors and contributors
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+from io import BytesIO
+from io import StringIO
+import re
+
+from mako import lexer
+from mako import parsetree
+
+
+class MessageExtractor:
+ use_bytes = True
+
+ def process_file(self, fileobj):
+ template_node = lexer.Lexer(
+ fileobj.read(), input_encoding=self.config["encoding"]
+ ).parse()
+ yield from self.extract_nodes(template_node.get_children())
+
+ def extract_nodes(self, nodes):
+ translator_comments = []
+ in_translator_comments = False
+ input_encoding = self.config["encoding"] or "ascii"
+ comment_tags = list(
+ filter(None, re.split(r"\s+", self.config["comment-tags"]))
+ )
+
+ for node in nodes:
+ child_nodes = None
+ if (
+ in_translator_comments
+ and isinstance(node, parsetree.Text)
+ and not node.content.strip()
+ ):
+ # Ignore whitespace within translator comments
+ continue
+
+ if isinstance(node, parsetree.Comment):
+ value = node.text.strip()
+ if in_translator_comments:
+ translator_comments.extend(
+ self._split_comment(node.lineno, value)
+ )
+ continue
+ for comment_tag in comment_tags:
+ if value.startswith(comment_tag):
+ in_translator_comments = True
+ translator_comments.extend(
+ self._split_comment(node.lineno, value)
+ )
+ continue
+
+ if isinstance(node, parsetree.DefTag):
+ code = node.function_decl.code
+ child_nodes = node.nodes
+ elif isinstance(node, parsetree.BlockTag):
+ code = node.body_decl.code
+ child_nodes = node.nodes
+ elif isinstance(node, parsetree.CallTag):
+ code = node.code.code
+ child_nodes = node.nodes
+ elif isinstance(node, parsetree.PageTag):
+ code = node.body_decl.code
+ elif isinstance(node, parsetree.CallNamespaceTag):
+ code = node.expression
+ child_nodes = node.nodes
+ elif isinstance(node, parsetree.ControlLine):
+ if node.isend:
+ in_translator_comments = False
+ continue
+ code = node.text
+ elif isinstance(node, parsetree.Code):
+ in_translator_comments = False
+ code = node.code.code
+ elif isinstance(node, parsetree.Expression):
+ code = node.code.code
+ else:
+ continue
+
+ # Comments don't apply unless they immediately precede the message
+ if (
+ translator_comments
+ and translator_comments[-1][0] < node.lineno - 1
+ ):
+ translator_comments = []
+
+ translator_strings = [
+ comment[1] for comment in translator_comments
+ ]
+
+ if isinstance(code, str) and self.use_bytes:
+ code = code.encode(input_encoding, "backslashreplace")
+
+ used_translator_comments = False
+ # We add extra newline to work around a pybabel bug
+ # (see python-babel/babel#274, parse_encoding dies if the first
+ # input string of the input is non-ascii)
+ # Also, because we added it, we have to subtract one from
+ # node.lineno
+ if self.use_bytes:
+ code = BytesIO(b"\n" + code)
+ else:
+ code = StringIO("\n" + code)
+
+ for message in self.process_python(
+ code, node.lineno - 1, translator_strings
+ ):
+ yield message
+ used_translator_comments = True
+
+ if used_translator_comments:
+ translator_comments = []
+ in_translator_comments = False
+
+ if child_nodes:
+ yield from self.extract_nodes(child_nodes)
+
+ @staticmethod
+ def _split_comment(lineno, comment):
+ """Return the multiline comment at lineno split into a list of
+ comment line numbers and the accompanying comment line"""
+ return [
+ (lineno + index, line)
+ for index, line in enumerate(comment.splitlines())
+ ]
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/linguaplugin.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/linguaplugin.py
new file mode 100644
index 0000000000000000000000000000000000000000..118668de2c19d987a15eea5f0e29ca3c9a068035
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/linguaplugin.py
@@ -0,0 +1,57 @@
+# ext/linguaplugin.py
+# Copyright 2006-2025 the Mako authors and contributors
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+import contextlib
+import io
+
+from lingua.extractors import Extractor
+from lingua.extractors import get_extractor
+from lingua.extractors import Message
+
+from mako.ext.extract import MessageExtractor
+
+
+class LinguaMakoExtractor(Extractor, MessageExtractor):
+ """Mako templates"""
+
+ use_bytes = False
+ extensions = [".mako"]
+ default_config = {"encoding": "utf-8", "comment-tags": ""}
+
+ def __call__(self, filename, options, fileobj=None):
+ self.options = options
+ self.filename = filename
+ self.python_extractor = get_extractor("x.py")
+ if fileobj is None:
+ ctx = open(filename, "r")
+ else:
+ ctx = contextlib.nullcontext(fileobj)
+ with ctx as file_:
+ yield from self.process_file(file_)
+
+ def process_python(self, code, code_lineno, translator_strings):
+ source = code.getvalue().strip()
+ if source.endswith(":"):
+ if source in ("try:", "else:") or source.startswith("except"):
+ source = "" # Ignore try/except and else
+ elif source.startswith("elif"):
+ source = source[2:] # Replace "elif" with "if"
+ source += "pass"
+ code = io.StringIO(source)
+ for msg in self.python_extractor(
+ self.filename, self.options, code, code_lineno - 1
+ ):
+ if translator_strings:
+ msg = Message(
+ msg.msgctxt,
+ msg.msgid,
+ msg.msgid_plural,
+ msg.flags,
+ " ".join(translator_strings + [msg.comment]),
+ msg.tcomment,
+ msg.location,
+ )
+ yield msg
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/preprocessors.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/preprocessors.py
new file mode 100644
index 0000000000000000000000000000000000000000..21f2db54db507b236146432c39d4b4cc40bb2f9a
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/preprocessors.py
@@ -0,0 +1,20 @@
+# ext/preprocessors.py
+# Copyright 2006-2025 the Mako authors and contributors
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+"""preprocessing functions, used with the 'preprocessor'
+argument on Template, TemplateLookup"""
+
+import re
+
+
+def convert_comments(text):
+ """preprocess old style comments.
+
+ example:
+
+ from mako.ext.preprocessors import convert_comments
+ t = Template(..., preprocessor=convert_comments)"""
+ return re.sub(r"(?<=\n)\s*#[^#]", "##", text)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/pygmentplugin.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/pygmentplugin.py
new file mode 100644
index 0000000000000000000000000000000000000000..74a8fb9dbcf6578b30ba8874ac31838c221ac19e
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/pygmentplugin.py
@@ -0,0 +1,150 @@
+# ext/pygmentplugin.py
+# Copyright 2006-2025 the Mako authors and contributors
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+from pygments import highlight
+from pygments.formatters.html import HtmlFormatter
+from pygments.lexer import bygroups
+from pygments.lexer import DelegatingLexer
+from pygments.lexer import include
+from pygments.lexer import RegexLexer
+from pygments.lexer import using
+from pygments.lexers.agile import Python3Lexer
+from pygments.lexers.agile import PythonLexer
+from pygments.lexers.web import CssLexer
+from pygments.lexers.web import HtmlLexer
+from pygments.lexers.web import JavascriptLexer
+from pygments.lexers.web import XmlLexer
+from pygments.token import Comment
+from pygments.token import Keyword
+from pygments.token import Name
+from pygments.token import Operator
+from pygments.token import Other
+from pygments.token import String
+from pygments.token import Text
+
+
+class MakoLexer(RegexLexer):
+ name = "Mako"
+ aliases = ["mako"]
+ filenames = ["*.mao"]
+
+ tokens = {
+ "root": [
+ (
+ r"(\s*)(\%)(\s*end(?:\w+))(\n|\Z)",
+ bygroups(Text, Comment.Preproc, Keyword, Other),
+ ),
+ (
+ r"(\s*)(\%(?!%))([^\n]*)(\n|\Z)",
+ bygroups(Text, Comment.Preproc, using(PythonLexer), Other),
+ ),
+ (
+ r"(\s*)(##[^\n]*)(\n|\Z)",
+ bygroups(Text, Comment.Preproc, Other),
+ ),
+ (r"""(?s)<%doc>.*?%doc>""", Comment.Preproc),
+ (
+ r"(<%)([\w\.\:]+)",
+ bygroups(Comment.Preproc, Name.Builtin),
+ "tag",
+ ),
+ (
+ r"(%)([\w\.\:]+)(>)",
+ bygroups(Comment.Preproc, Name.Builtin, Comment.Preproc),
+ ),
+ (r"<%(?=([\w\.\:]+))", Comment.Preproc, "ondeftags"),
+ (
+ r"(?s)(<%(?:!?))(.*?)(%>)",
+ bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc),
+ ),
+ (
+ r"(\$\{)(.*?)(\})",
+ bygroups(Comment.Preproc, using(PythonLexer), Comment.Preproc),
+ ),
+ (
+ r"""(?sx)
+ (.+?) # anything, followed by:
+ (?:
+ (?<=\n)(?=%(?!%)|\#\#) | # an eval or comment line
+ (?=\#\*) | # multiline comment
+ (?=?%) | # a python block
+ # call start or end
+ (?=\$\{) | # a substitution
+ (?<=\n)(?=\s*%) |
+ # - don't consume
+ (\\\n) | # an escaped newline
+ \Z # end of string
+ )
+ """,
+ bygroups(Other, Operator),
+ ),
+ (r"\s+", Text),
+ ],
+ "ondeftags": [
+ (r"<%", Comment.Preproc),
+ (r"(?<=<%)(include|inherit|namespace|page)", Name.Builtin),
+ include("tag"),
+ ],
+ "tag": [
+ (r'((?:\w+)\s*=)\s*(".*?")', bygroups(Name.Attribute, String)),
+ (r"/?\s*>", Comment.Preproc, "#pop"),
+ (r"\s+", Text),
+ ],
+ "attr": [
+ ('".*?"', String, "#pop"),
+ ("'.*?'", String, "#pop"),
+ (r"[^\s>]+", String, "#pop"),
+ ],
+ }
+
+
+class MakoHtmlLexer(DelegatingLexer):
+ name = "HTML+Mako"
+ aliases = ["html+mako"]
+
+ def __init__(self, **options):
+ super().__init__(HtmlLexer, MakoLexer, **options)
+
+
+class MakoXmlLexer(DelegatingLexer):
+ name = "XML+Mako"
+ aliases = ["xml+mako"]
+
+ def __init__(self, **options):
+ super().__init__(XmlLexer, MakoLexer, **options)
+
+
+class MakoJavascriptLexer(DelegatingLexer):
+ name = "JavaScript+Mako"
+ aliases = ["js+mako", "javascript+mako"]
+
+ def __init__(self, **options):
+ super().__init__(JavascriptLexer, MakoLexer, **options)
+
+
+class MakoCssLexer(DelegatingLexer):
+ name = "CSS+Mako"
+ aliases = ["css+mako"]
+
+ def __init__(self, **options):
+ super().__init__(CssLexer, MakoLexer, **options)
+
+
+pygments_html_formatter = HtmlFormatter(
+ cssclass="syntax-highlighted", linenos=True
+)
+
+
+def syntax_highlight(filename="", language=None):
+ mako_lexer = MakoLexer()
+ python_lexer = Python3Lexer()
+ if filename.startswith("memory:") or language == "mako":
+ return lambda string: highlight(
+ string, mako_lexer, pygments_html_formatter
+ )
+ return lambda string: highlight(
+ string, python_lexer, pygments_html_formatter
+ )
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/turbogears.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/turbogears.py
new file mode 100644
index 0000000000000000000000000000000000000000..25ad35e7746b82a2e65a4c33c70da701912ccf00
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/ext/turbogears.py
@@ -0,0 +1,61 @@
+# ext/turbogears.py
+# Copyright 2006-2025 the Mako authors and contributors
+#
+# This module is part of Mako and is released under
+# the MIT License: http://www.opensource.org/licenses/mit-license.php
+
+from mako import compat
+from mako.lookup import TemplateLookup
+from mako.template import Template
+
+
+class TGPlugin:
+
+ """TurboGears compatible Template Plugin."""
+
+ def __init__(self, extra_vars_func=None, options=None, extension="mak"):
+ self.extra_vars_func = extra_vars_func
+ self.extension = extension
+ if not options:
+ options = {}
+
+ # Pull the options out and initialize the lookup
+ lookup_options = {}
+ for k, v in options.items():
+ if k.startswith("mako."):
+ lookup_options[k[5:]] = v
+ elif k in ["directories", "filesystem_checks", "module_directory"]:
+ lookup_options[k] = v
+ self.lookup = TemplateLookup(**lookup_options)
+
+ self.tmpl_options = {}
+ # transfer lookup args to template args, based on those available
+ # in getargspec
+ for kw in compat.inspect_getargspec(Template.__init__)[0]:
+ if kw in lookup_options:
+ self.tmpl_options[kw] = lookup_options[kw]
+
+ def load_template(self, templatename, template_string=None):
+ """Loads a template from a file or a string"""
+ if template_string is not None:
+ return Template(template_string, **self.tmpl_options)
+ # Translate TG dot notation to normal / template path
+ if "/" not in templatename:
+ templatename = (
+ "/" + templatename.replace(".", "/") + "." + self.extension
+ )
+
+ # Lookup template
+ return self.lookup.get_template(templatename)
+
+ def render(
+ self, info, format="html", fragment=False, template=None # noqa
+ ):
+ if isinstance(template, str):
+ template = self.load_template(template)
+
+ # Load extra vars func if provided
+ if self.extra_vars_func:
+ info.update(self.extra_vars_func())
+
+ return template.render(**info)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__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/mako/testing/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2fc7fb9db9e5297396c743933ae84b6f5c411cfe
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/__init__.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/_config.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/_config.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..42c8b852751ca9af400ea38c0227bca7122a837b
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/_config.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/assertions.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/assertions.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..72ba77711c4c81fe42fe4e570374b013511faf52
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/assertions.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/config.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/config.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5b5c2d901d99d6666f9c239304101f0acbd576ae
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/config.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/exclusions.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/exclusions.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..7caac3d68e5ef7f91a7e493569e674b12476b115
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/exclusions.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/fixtures.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/fixtures.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b4846b384f349e6ed4992da2e96b47f3a847cf99
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/fixtures.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/helpers.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/helpers.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cfe0e62b8de266801833777a867bfa28cdc926b4
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/__pycache__/helpers.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/_config.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/_config.py
new file mode 100644
index 0000000000000000000000000000000000000000..4ee3d0a6ed770aba19adb757ffd552d504c5b9e2
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/_config.py
@@ -0,0 +1,128 @@
+import configparser
+import dataclasses
+from dataclasses import dataclass
+from pathlib import Path
+from typing import Callable
+from typing import ClassVar
+from typing import Optional
+from typing import Union
+
+from .helpers import make_path
+
+
+class ConfigError(BaseException):
+ pass
+
+
+class MissingConfig(ConfigError):
+ pass
+
+
+class MissingConfigSection(ConfigError):
+ pass
+
+
+class MissingConfigItem(ConfigError):
+ pass
+
+
+class ConfigValueTypeError(ConfigError):
+ pass
+
+
+class _GetterDispatch:
+ def __init__(self, initialdata, default_getter: Callable):
+ self.default_getter = default_getter
+ self.data = initialdata
+
+ def get_fn_for_type(self, type_):
+ return self.data.get(type_, self.default_getter)
+
+ def get_typed_value(self, type_, name):
+ get_fn = self.get_fn_for_type(type_)
+ return get_fn(name)
+
+
+def _parse_cfg_file(filespec: Union[Path, str]):
+ cfg = configparser.ConfigParser()
+ try:
+ filepath = make_path(filespec, check_exists=True)
+ except FileNotFoundError as e:
+ raise MissingConfig(f"No config file found at {filespec}") from e
+ else:
+ with open(filepath, encoding="utf-8") as f:
+ cfg.read_file(f)
+ return cfg
+
+
+def _build_getter(cfg_obj, cfg_section, method, converter=None):
+ def caller(option, **kwargs):
+ try:
+ rv = getattr(cfg_obj, method)(cfg_section, option, **kwargs)
+ except configparser.NoSectionError as nse:
+ raise MissingConfigSection(
+ f"No config section named {cfg_section}"
+ ) from nse
+ except configparser.NoOptionError as noe:
+ raise MissingConfigItem(f"No config item for {option}") from noe
+ except ValueError as ve:
+ # ConfigParser.getboolean, .getint, .getfloat raise ValueError
+ # on bad types
+ raise ConfigValueTypeError(
+ f"Wrong value type for {option}"
+ ) from ve
+ else:
+ if converter:
+ try:
+ rv = converter(rv)
+ except Exception as e:
+ raise ConfigValueTypeError(
+ f"Wrong value type for {option}"
+ ) from e
+ return rv
+
+ return caller
+
+
+def _build_getter_dispatch(cfg_obj, cfg_section, converters=None):
+ converters = converters or {}
+
+ default_getter = _build_getter(cfg_obj, cfg_section, "get")
+
+ # support ConfigParser builtins
+ getters = {
+ int: _build_getter(cfg_obj, cfg_section, "getint"),
+ bool: _build_getter(cfg_obj, cfg_section, "getboolean"),
+ float: _build_getter(cfg_obj, cfg_section, "getfloat"),
+ str: default_getter,
+ }
+
+ # use ConfigParser.get and convert value
+ getters.update(
+ {
+ type_: _build_getter(
+ cfg_obj, cfg_section, "get", converter=converter_fn
+ )
+ for type_, converter_fn in converters.items()
+ }
+ )
+
+ return _GetterDispatch(getters, default_getter)
+
+
+@dataclass
+class ReadsCfg:
+ section_header: ClassVar[str]
+ converters: ClassVar[Optional[dict]] = None
+
+ @classmethod
+ def from_cfg_file(cls, filespec: Union[Path, str]):
+ cfg = _parse_cfg_file(filespec)
+ dispatch = _build_getter_dispatch(
+ cfg, cls.section_header, converters=cls.converters
+ )
+ kwargs = {
+ field.name: dispatch.get_typed_value(field.type, field.name)
+ for field in dataclasses.fields(cls)
+ }
+ return cls(**kwargs)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/assertions.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/assertions.py
new file mode 100644
index 0000000000000000000000000000000000000000..22221cd20c4a65054ad0f6fec17640255671a81d
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/assertions.py
@@ -0,0 +1,166 @@
+import contextlib
+import re
+import sys
+
+
+def eq_(a, b, msg=None):
+ """Assert a == b, with repr messaging on failure."""
+ assert a == b, msg or "%r != %r" % (a, b)
+
+
+def ne_(a, b, msg=None):
+ """Assert a != b, with repr messaging on failure."""
+ assert a != b, msg or "%r == %r" % (a, b)
+
+
+def in_(a, b, msg=None):
+ """Assert a in b, with repr messaging on failure."""
+ assert a in b, msg or "%r not in %r" % (a, b)
+
+
+def not_in(a, b, msg=None):
+ """Assert a in not b, with repr messaging on failure."""
+ assert a not in b, msg or "%r is in %r" % (a, b)
+
+
+def _assert_proper_exception_context(exception):
+ """assert that any exception we're catching does not have a __context__
+ without a __cause__, and that __suppress_context__ is never set.
+
+ Python 3 will report nested as exceptions as "during the handling of
+ error X, error Y occurred". That's not what we want to do. We want
+ these exceptions in a cause chain.
+
+ """
+
+ if (
+ exception.__context__ is not exception.__cause__
+ and not exception.__suppress_context__
+ ):
+ assert False, (
+ "Exception %r was correctly raised but did not set a cause, "
+ "within context %r as its cause."
+ % (exception, exception.__context__)
+ )
+
+
+def _assert_proper_cause_cls(exception, cause_cls):
+ """assert that any exception we're catching does not have a __context__
+ without a __cause__, and that __suppress_context__ is never set.
+
+ Python 3 will report nested as exceptions as "during the handling of
+ error X, error Y occurred". That's not what we want to do. We want
+ these exceptions in a cause chain.
+
+ """
+ assert isinstance(exception.__cause__, cause_cls), (
+ "Exception %r was correctly raised but has cause %r, which does not "
+ "have the expected cause type %r."
+ % (exception, exception.__cause__, cause_cls)
+ )
+
+
+def assert_raises(except_cls, callable_, *args, **kw):
+ return _assert_raises(except_cls, callable_, args, kw)
+
+
+def assert_raises_with_proper_context(except_cls, callable_, *args, **kw):
+ return _assert_raises(except_cls, callable_, args, kw, check_context=True)
+
+
+def assert_raises_with_given_cause(
+ except_cls, cause_cls, callable_, *args, **kw
+):
+ return _assert_raises(except_cls, callable_, args, kw, cause_cls=cause_cls)
+
+
+def assert_raises_message(except_cls, msg, callable_, *args, **kwargs):
+ return _assert_raises(except_cls, callable_, args, kwargs, msg=msg)
+
+
+def assert_raises_message_with_proper_context(
+ except_cls, msg, callable_, *args, **kwargs
+):
+ return _assert_raises(
+ except_cls, callable_, args, kwargs, msg=msg, check_context=True
+ )
+
+
+def assert_raises_message_with_given_cause(
+ except_cls, msg, cause_cls, callable_, *args, **kwargs
+):
+ return _assert_raises(
+ except_cls, callable_, args, kwargs, msg=msg, cause_cls=cause_cls
+ )
+
+
+def _assert_raises(
+ except_cls,
+ callable_,
+ args,
+ kwargs,
+ msg=None,
+ check_context=False,
+ cause_cls=None,
+):
+ with _expect_raises(except_cls, msg, check_context, cause_cls) as ec:
+ callable_(*args, **kwargs)
+ return ec.error
+
+
+class _ErrorContainer:
+ error = None
+
+
+@contextlib.contextmanager
+def _expect_raises(except_cls, msg=None, check_context=False, cause_cls=None):
+ ec = _ErrorContainer()
+ if check_context:
+ are_we_already_in_a_traceback = sys.exc_info()[0]
+ try:
+ yield ec
+ success = False
+ except except_cls as err:
+ ec.error = err
+ success = True
+ if msg is not None:
+ # I'm often pdbing here, and "err" above isn't
+ # in scope, so assign the string explicitly
+ error_as_string = str(err)
+ assert re.search(msg, error_as_string, re.UNICODE), "%r !~ %s" % (
+ msg,
+ error_as_string,
+ )
+ if cause_cls is not None:
+ _assert_proper_cause_cls(err, cause_cls)
+ if check_context and not are_we_already_in_a_traceback:
+ _assert_proper_exception_context(err)
+ print(str(err).encode("utf-8"))
+
+ # it's generally a good idea to not carry traceback objects outside
+ # of the except: block, but in this case especially we seem to have
+ # hit some bug in either python 3.10.0b2 or greenlet or both which
+ # this seems to fix:
+ # https://github.com/python-greenlet/greenlet/issues/242
+ del ec
+
+ # assert outside the block so it works for AssertionError too !
+ assert success, "Callable did not raise an exception"
+
+
+def expect_raises(except_cls, check_context=False):
+ return _expect_raises(except_cls, check_context=check_context)
+
+
+def expect_raises_message(except_cls, msg, check_context=False):
+ return _expect_raises(except_cls, msg=msg, check_context=check_context)
+
+
+def expect_raises_with_proper_context(except_cls, check_context=True):
+ return _expect_raises(except_cls, check_context=check_context)
+
+
+def expect_raises_message_with_proper_context(
+ except_cls, msg, check_context=True
+):
+ return _expect_raises(except_cls, msg=msg, check_context=check_context)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/config.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/config.py
new file mode 100644
index 0000000000000000000000000000000000000000..b77d0c08084b0a9b1b5e7395e1bd54895ba689e6
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/config.py
@@ -0,0 +1,17 @@
+from dataclasses import dataclass
+from pathlib import Path
+
+from ._config import ReadsCfg
+from .helpers import make_path
+
+
+@dataclass
+class Config(ReadsCfg):
+ module_base: Path
+ template_base: Path
+
+ section_header = "mako_testing"
+ converters = {Path: make_path}
+
+
+config = Config.from_cfg_file("./setup.cfg")
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/exclusions.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/exclusions.py
new file mode 100644
index 0000000000000000000000000000000000000000..37b2d14a395f5c27ed608955860471d597e2ae3d
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/exclusions.py
@@ -0,0 +1,80 @@
+import pytest
+
+from mako.ext.beaker_cache import has_beaker
+from mako.util import update_wrapper
+
+
+try:
+ import babel.messages.extract as babel
+except ImportError:
+ babel = None
+
+
+try:
+ import lingua
+except ImportError:
+ lingua = None
+
+
+try:
+ import dogpile.cache # noqa
+except ImportError:
+ has_dogpile_cache = False
+else:
+ has_dogpile_cache = True
+
+
+requires_beaker = pytest.mark.skipif(
+ not has_beaker, reason="Beaker is required for these tests."
+)
+
+
+requires_babel = pytest.mark.skipif(
+ babel is None, reason="babel not installed: skipping babelplugin test"
+)
+
+
+requires_lingua = pytest.mark.skipif(
+ lingua is None, reason="lingua not installed: skipping linguaplugin test"
+)
+
+
+requires_dogpile_cache = pytest.mark.skipif(
+ not has_dogpile_cache,
+ reason="dogpile.cache is required to run these tests",
+)
+
+
+def _pygments_version():
+ try:
+ import pygments
+
+ version = pygments.__version__
+ except:
+ version = "0"
+ return version
+
+
+requires_pygments_14 = pytest.mark.skipif(
+ _pygments_version() < "1.4", reason="Requires pygments 1.4 or greater"
+)
+
+
+# def requires_pygments_14(fn):
+
+# return skip_if(
+# lambda: version < "1.4", "Requires pygments 1.4 or greater"
+# )(fn)
+
+
+def requires_no_pygments_exceptions(fn):
+ def go(*arg, **kw):
+ from mako import exceptions
+
+ exceptions._install_fallback()
+ try:
+ return fn(*arg, **kw)
+ finally:
+ exceptions._install_highlighting()
+
+ return update_wrapper(go, fn)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/fixtures.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/fixtures.py
new file mode 100644
index 0000000000000000000000000000000000000000..01e996171d16be446ee849ceafafaf2cf699f256
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/fixtures.py
@@ -0,0 +1,119 @@
+import os
+
+from mako.cache import CacheImpl
+from mako.cache import register_plugin
+from mako.template import Template
+from .assertions import eq_
+from .config import config
+
+
+class TemplateTest:
+ def _file_template(self, filename, **kw):
+ filepath = self._file_path(filename)
+ return Template(
+ uri=filename,
+ filename=filepath,
+ module_directory=config.module_base,
+ **kw,
+ )
+
+ def _file_path(self, filename):
+ name, ext = os.path.splitext(filename)
+ py3k_path = os.path.join(config.template_base, name + "_py3k" + ext)
+ if os.path.exists(py3k_path):
+ return py3k_path
+
+ return os.path.join(config.template_base, filename)
+
+ def _do_file_test(
+ self,
+ filename,
+ expected,
+ filters=None,
+ unicode_=True,
+ template_args=None,
+ **kw,
+ ):
+ t1 = self._file_template(filename, **kw)
+ self._do_test(
+ t1,
+ expected,
+ filters=filters,
+ unicode_=unicode_,
+ template_args=template_args,
+ )
+
+ def _do_memory_test(
+ self,
+ source,
+ expected,
+ filters=None,
+ unicode_=True,
+ template_args=None,
+ **kw,
+ ):
+ t1 = Template(text=source, **kw)
+ self._do_test(
+ t1,
+ expected,
+ filters=filters,
+ unicode_=unicode_,
+ template_args=template_args,
+ )
+
+ def _do_test(
+ self,
+ template,
+ expected,
+ filters=None,
+ template_args=None,
+ unicode_=True,
+ ):
+ if template_args is None:
+ template_args = {}
+ if unicode_:
+ output = template.render_unicode(**template_args)
+ else:
+ output = template.render(**template_args)
+
+ if filters:
+ output = filters(output)
+ eq_(output, expected)
+
+ def indicates_unbound_local_error(self, rendered_output, unbound_var):
+ var = f"'{unbound_var}'"
+ error_msgs = (
+ # < 3.11
+ f"local variable {var} referenced before assignment",
+ # >= 3.11
+ f"cannot access local variable {var} where it is not associated",
+ )
+ return any((msg in rendered_output) for msg in error_msgs)
+
+
+class PlainCacheImpl(CacheImpl):
+ """Simple memory cache impl so that tests which
+ use caching can run without beaker."""
+
+ def __init__(self, cache):
+ self.cache = cache
+ self.data = {}
+
+ def get_or_create(self, key, creation_function, **kw):
+ if key in self.data:
+ return self.data[key]
+ else:
+ self.data[key] = data = creation_function(**kw)
+ return data
+
+ def put(self, key, value, **kw):
+ self.data[key] = value
+
+ def get(self, key, **kw):
+ return self.data[key]
+
+ def invalidate(self, key, **kw):
+ del self.data[key]
+
+
+register_plugin("plain", __name__, "PlainCacheImpl")
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/helpers.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/helpers.py
new file mode 100644
index 0000000000000000000000000000000000000000..5ae9d38d3d590d51cfe4486dab31589207a287d3
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/mako/testing/helpers.py
@@ -0,0 +1,71 @@
+import contextlib
+import pathlib
+from pathlib import Path
+import re
+import time
+from typing import Union
+from unittest import mock
+
+
+def flatten_result(result):
+ return re.sub(r"[\s\r\n]+", " ", result).strip()
+
+
+def result_lines(result):
+ return [
+ x.strip()
+ for x in re.split(r"\r?\n", re.sub(r" +", " ", result))
+ if x.strip() != ""
+ ]
+
+
+def result_raw_lines(result):
+ return [x for x in re.split(r"\r?\n", result) if x.strip() != ""]
+
+
+def make_path(
+ filespec: Union[Path, str],
+ make_absolute: bool = True,
+ check_exists: bool = False,
+) -> Path:
+ path = Path(filespec)
+ if make_absolute:
+ path = path.resolve(strict=check_exists)
+ if check_exists and (not path.exists()):
+ raise FileNotFoundError(f"No file or directory at {filespec}")
+ return path
+
+
+def _unlink_path(path, missing_ok=False):
+ # Replicate 3.8+ functionality in 3.7
+ cm = contextlib.nullcontext()
+ if missing_ok:
+ cm = contextlib.suppress(FileNotFoundError)
+
+ with cm:
+ path.unlink()
+
+
+def replace_file_with_dir(pathspec):
+ path = pathlib.Path(pathspec)
+ _unlink_path(path, missing_ok=True)
+ path.mkdir(exist_ok=True)
+ return path
+
+
+def file_with_template_code(filespec):
+ with open(filespec, "w") as f:
+ f.write(
+ """
+i am an artificial template just for you
+"""
+ )
+ return filespec
+
+
+@contextlib.contextmanager
+def rewind_compile_time(hours=1):
+ rewound = time.time() - (hours * 3_600)
+ with mock.patch("mako.codegen.time") as codegen_time:
+ codegen_time.time.return_value = rewound
+ yield
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/marisa_trie-1.3.0.dist-info/licenses/AUTHORS.rst b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/marisa_trie-1.3.0.dist-info/licenses/AUTHORS.rst
new file mode 100644
index 0000000000000000000000000000000000000000..9df75381ed61b42fd6d7a0c9804b92a850b5e619
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/marisa_trie-1.3.0.dist-info/licenses/AUTHORS.rst
@@ -0,0 +1,7 @@
+Authors and contributors, in no particular order:
+
+* Mikhail Korobov
+* `Matt Hickford `_
+* Sergei Lebedev
+* Tomasz Melcer
+* `Mickaël Schoentgen `
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/marisa_trie-1.3.0.dist-info/licenses/LICENSE b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/marisa_trie-1.3.0.dist-info/licenses/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..4581b9d6b8f961850b0272da43022a0b1d4a896c
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/marisa_trie-1.3.0.dist-info/licenses/LICENSE
@@ -0,0 +1,18 @@
+Copyright (c) marisa-trie authors and contributors, 2012-2025
+
+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/marisa_trie-1.3.0.dist-info/licenses/marisa-trie/AUTHORS b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/marisa_trie-1.3.0.dist-info/licenses/marisa-trie/AUTHORS
new file mode 100644
index 0000000000000000000000000000000000000000..4ee985a7ba723e8826a1b9f9e4f767611b160276
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/marisa_trie-1.3.0.dist-info/licenses/marisa-trie/AUTHORS
@@ -0,0 +1 @@
+Susumu Yata
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/marisa_trie-1.3.0.dist-info/licenses/marisa-trie/COPYING.md b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/marisa_trie-1.3.0.dist-info/licenses/marisa-trie/COPYING.md
new file mode 100644
index 0000000000000000000000000000000000000000..64c9ce64bf1aeb9b11ba7652ed1fc664d88ff8c5
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/marisa_trie-1.3.0.dist-info/licenses/marisa-trie/COPYING.md
@@ -0,0 +1,34 @@
+### COPYING
+
+libmarisa and its command line tools are licensed under BSD-2-Clause OR LGPL-2.1-or-later.
+
+#### The BSD 2-clause license
+
+Copyright (c) 2010-2025, Susumu Yata
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#### The LGPL 2.1 or any later version
+
+marisa-trie - A static and space-efficient trie data structure.
+Copyright (C) 2010-2025 Susumu Yata
+
+This 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.1 of the License, or (at your option) any later version.
+
+This 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 this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/__init__.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d55d59205b13c64f3d167b0c6680439392d810f3
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__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/__pycache__/_compat.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/_compat.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a7c44e8c69ef64fc5df3740d2066750251a7c33c
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/_compat.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/_punycode.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/_punycode.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..8d4b5a581c7210f810b64e2797aca65545fad703
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/_punycode.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/main.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/main.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4282425e9a42f712d8c5fbc72b99c256c9e955e5
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/main.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/parser_block.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/parser_block.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cfbbad3d3f231bc9cc302dbecbc7ee5fb8411abe
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/parser_block.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/parser_core.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/parser_core.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ab411c0db7b62937876fb8617a62033940886860
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/parser_core.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/parser_inline.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/parser_inline.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ebc53bff1d1259fef63e8738827ec9a026232324
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/parser_inline.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/renderer.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/renderer.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0c3d107e4a1f25b943f6bd797393feaf09790cdd
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/renderer.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/ruler.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/ruler.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..631ec029cf20d71168d65213f6c98b1f25a2b533
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/ruler.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/token.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/token.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..32bff55a27cadb64b6725c74c99f4af00defac2e
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/token.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/tree.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/tree.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..fb040ebd60b642da630dfdddd66e1e439d7066be
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/tree.cpython-312.pyc differ
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/utils.cpython-312.pyc b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__pycache__/utils.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6542bf3f5178c1e405b97ac3ba0012819ed93591
Binary files /dev/null and b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/__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/cli/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/cli/__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/markdown_it/cli/parse.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/cli/parse.py
new file mode 100644
index 0000000000000000000000000000000000000000..fe346b2f51b055b62966c081139f9706e3295363
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/cli/parse.py
@@ -0,0 +1,110 @@
+#!/usr/bin/env python
+"""
+CLI interface to markdown-it-py
+
+Parse one or more markdown files, convert each to HTML, and print to stdout.
+"""
+
+from __future__ import annotations
+
+import argparse
+from collections.abc import Iterable, Sequence
+import sys
+
+from markdown_it import __version__
+from markdown_it.main import MarkdownIt
+
+version_str = f"markdown-it-py [version {__version__}]"
+
+
+def main(args: Sequence[str] | None = None) -> int:
+ namespace = parse_args(args)
+ if namespace.filenames:
+ convert(namespace.filenames)
+ else:
+ interactive()
+ return 0
+
+
+def convert(filenames: Iterable[str]) -> None:
+ for filename in filenames:
+ convert_file(filename)
+
+
+def convert_file(filename: str) -> None:
+ """
+ Parse a Markdown file and dump the output to stdout.
+ """
+ try:
+ with open(filename, encoding="utf8", errors="ignore") as fin:
+ rendered = MarkdownIt().render(fin.read())
+ print(rendered, end="")
+ except OSError:
+ sys.stderr.write(f'Cannot open file "{filename}".\n')
+ sys.exit(1)
+
+
+def interactive() -> None:
+ """
+ Parse user input, dump to stdout, rinse and repeat.
+ Python REPL style.
+ """
+ print_heading()
+ contents = []
+ more = False
+ while True:
+ try:
+ prompt, more = ("... ", True) if more else (">>> ", True)
+ contents.append(input(prompt) + "\n")
+ except EOFError:
+ print("\n" + MarkdownIt().render("\n".join(contents)), end="")
+ more = False
+ contents = []
+ except KeyboardInterrupt:
+ print("\nExiting.")
+ break
+
+
+def parse_args(args: Sequence[str] | None) -> argparse.Namespace:
+ """Parse input CLI arguments."""
+ parser = argparse.ArgumentParser(
+ description="Parse one or more markdown files, "
+ "convert each to HTML, and print to stdout",
+ # NOTE: Remember to update README.md w/ the output of `markdown-it -h`
+ epilog=(
+ f"""
+Interactive:
+
+ $ markdown-it
+ markdown-it-py [version {__version__}] (interactive)
+ Type Ctrl-D to complete input, or Ctrl-C to exit.
+ >>> # Example
+ ... > markdown *input*
+ ...
+ Example
+
+ markdown input
+
+
+Batch:
+
+ $ markdown-it README.md README.footer.md > index.html
+"""
+ ),
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ )
+ parser.add_argument("-v", "--version", action="version", version=version_str)
+ parser.add_argument(
+ "filenames", nargs="*", help="specify an optional list of files to convert"
+ )
+ return parser.parse_args(args)
+
+
+def print_heading() -> None:
+ print(f"{version_str} (interactive)")
+ print("Type Ctrl-D to complete input, or Ctrl-C to exit.")
+
+
+if __name__ == "__main__":
+ exit_code = main(sys.argv[1:])
+ sys.exit(exit_code)
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__init__.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/__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/markdown_it/common/entities.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/entities.py
new file mode 100644
index 0000000000000000000000000000000000000000..14d08ec9546995f8eea3e9b83ea896f29ef020cb
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/entities.py
@@ -0,0 +1,5 @@
+"""HTML5 entities map: { name -> characters }."""
+
+import html.entities
+
+entities = {name.rstrip(";"): chars for name, chars in html.entities.html5.items()}
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/html_blocks.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/html_blocks.py
new file mode 100644
index 0000000000000000000000000000000000000000..8a3b0b7d5ab7bc174a3c96cbc8976816278a6c21
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/html_blocks.py
@@ -0,0 +1,69 @@
+"""List of valid html blocks names, according to commonmark spec
+http://jgm.github.io/CommonMark/spec.html#html-blocks
+"""
+
+# see https://spec.commonmark.org/0.31.2/#html-blocks
+block_names = [
+ "address",
+ "article",
+ "aside",
+ "base",
+ "basefont",
+ "blockquote",
+ "body",
+ "caption",
+ "center",
+ "col",
+ "colgroup",
+ "dd",
+ "details",
+ "dialog",
+ "dir",
+ "div",
+ "dl",
+ "dt",
+ "fieldset",
+ "figcaption",
+ "figure",
+ "footer",
+ "form",
+ "frame",
+ "frameset",
+ "h1",
+ "h2",
+ "h3",
+ "h4",
+ "h5",
+ "h6",
+ "head",
+ "header",
+ "hr",
+ "html",
+ "iframe",
+ "legend",
+ "li",
+ "link",
+ "main",
+ "menu",
+ "menuitem",
+ "nav",
+ "noframes",
+ "ol",
+ "optgroup",
+ "option",
+ "p",
+ "param",
+ "search",
+ "section",
+ "summary",
+ "table",
+ "tbody",
+ "td",
+ "tfoot",
+ "th",
+ "thead",
+ "title",
+ "tr",
+ "track",
+ "ul",
+]
diff --git a/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/normalize_url.py b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/normalize_url.py
new file mode 100644
index 0000000000000000000000000000000000000000..92720b31621b0f6b4ac853179d886cb58e4e2f36
--- /dev/null
+++ b/platform/dbops/archive/databases_old/data/home/x/.local/lib/python3.12/site-packages/markdown_it/common/normalize_url.py
@@ -0,0 +1,81 @@
+from __future__ import annotations
+
+from collections.abc import Callable
+from contextlib import suppress
+import re
+from urllib.parse import quote, unquote, urlparse, urlunparse # noqa: F401
+
+import mdurl
+
+from .. import _punycode
+
+RECODE_HOSTNAME_FOR = ("http:", "https:", "mailto:")
+
+
+def normalizeLink(url: str) -> str:
+ """Normalize destination URLs in links
+
+ ::
+
+ [label]: destination 'title'
+ ^^^^^^^^^^^
+ """
+ parsed = mdurl.parse(url, slashes_denote_host=True)
+
+ # Encode hostnames in urls like:
+ # `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
+ #
+ # We don't encode unknown schemas, because it's likely that we encode
+ # something we shouldn't (e.g. `skype:name` treated as `skype:host`)
+ #
+ if parsed.hostname and (
+ not parsed.protocol or parsed.protocol in RECODE_HOSTNAME_FOR
+ ):
+ with suppress(Exception):
+ parsed = parsed._replace(hostname=_punycode.to_ascii(parsed.hostname))
+
+ return mdurl.encode(mdurl.format(parsed))
+
+
+def normalizeLinkText(url: str) -> str:
+ """Normalize autolink content
+
+ ::
+
+
+ ~~~~~~~~~~~
+ """
+ parsed = mdurl.parse(url, slashes_denote_host=True)
+
+ # Encode hostnames in urls like:
+ # `http://host/`, `https://host/`, `mailto:user@host`, `//host/`
+ #
+ # We don't encode unknown schemas, because it's likely that we encode
+ # something we shouldn't (e.g. `skype:name` treated as `skype:host`)
+ #
+ if parsed.hostname and (
+ not parsed.protocol or parsed.protocol in RECODE_HOSTNAME_FOR
+ ):
+ with suppress(Exception):
+ parsed = parsed._replace(hostname=_punycode.to_unicode(parsed.hostname))
+
+ # add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720
+ return mdurl.decode(mdurl.format(parsed), mdurl.DECODE_DEFAULT_CHARS + "%")
+
+
+BAD_PROTO_RE = re.compile(r"^(vbscript|javascript|file|data):")
+GOOD_DATA_RE = re.compile(r"^data:image\/(gif|png|jpeg|webp);")
+
+
+def validateLink(url: str, validator: Callable[[str], bool] | None = None) -> bool:
+ """Validate URL link is allowed in output.
+
+ This validator can prohibit more than really needed to prevent XSS.
+ It's a tradeoff to keep code simple and to be secure by default.
+
+ Note: url should be normalized at this point, and existing entities decoded.
+ """
+ if validator is not None:
+ return validator(url)
+ url = url.strip().lower()
+ return bool(GOOD_DATA_RE.search(url)) if BAD_PROTO_RE.search(url) else True
|